Skip to main content

max / makenotwork

2.7 KB · 55 lines History Blame Raw
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 {% if let Some(token) = csrf_token %}<meta name="csrf-token" content="{{ token }}">{% endif %}
7 <title>{% block title %}Multithreaded{% endblock %}</title>
8 {# htmx 4 swaps every response except 204 and 304. The one htmx-driven element
9 here is the search box, and a failed /search answers with a whole rendered
10 error page (src/error_page.rs), so the default would paint that page inside
11 #search-results. Turning 4xx and 5xx back off keeps the toast in mt.js as the
12 only thing an error produces, which is what 2.x did. Read once as the script
13 below runs, so it has to stay above that include. #}
14 <meta name="htmx-config" content='{"noSwap":[204,304,"4xx","5xx"]}'>
15 {% include "_head_assets.html" %}
16 {% block head %}{% endblock %}
17 </head>
18 <body data-mnw-url="{{ mnw_base_url }}"{% block body_attrs %}{% endblock %}>
19 <a href="#main-content" class="skip-to-main">Skip to main content</a>
20 {% block header %}{% endblock %}
21 <main id="main-content">
22 {% block content %}{% endblock %}
23 </main>
24
25 <footer class="site-footer">
26 <div class="site-footer-links">
27 <a href="{{ mnw_base_url }}/pricing">Pricing</a>
28 <a href="{{ mnw_base_url }}/creators">Creators</a>
29 <a href="{{ mnw_base_url }}/docs">Docs</a>
30 <a href="{{ mnw_base_url }}/policy">Policy</a>
31 <a href="{{ mnw_base_url }}/guide/moderation">Forum moderation</a>
32 </div>
33 <span>Powered by <a href="{{ mnw_base_url }}/">Makenot<span class="dot">.</span>work</a></span>
34 <span class="footer-sep">&middot;</span>
35 <a href="/about/tracking">Tracking</a>
36 <span class="footer-sep">&middot;</span>
37 <span>Report abuse: moderation@makenot.work</span>
38 </footer>
39
40 <div id="search-modal" class="search-modal" hidden aria-modal="true" role="dialog" aria-label="Search forums">
41 <div class="search-modal-backdrop" id="search-backdrop"></div>
42 <div class="search-modal-content">
43 <input type="text" id="search-input" class="search-input" placeholder="Search threads..."
44 autocomplete="off" spellcheck="false"
45 hx-get="/search" hx-trigger="keyup changed delay:150ms" hx-target="#search-results"
46 hx-swap="innerHTML" name="q">
47 <div id="search-results" class="search-results-container"></div>
48 </div>
49 </div>
50 <div id="notifications" class="toast-container" role="alert" aria-live="polite"></div>
51 {% include "_body_scripts.html" %}
52 {% block scripts %}{% endblock %}
53 </body>
54 </html>
55