This repository has no description
1{{ define "layouts/base" }}
2 <!doctype html>
3 <html lang="en" class="dark:bg-gray-900">
4 <head>
5 <meta charset="UTF-8" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"/>
7 <meta name="description" content="The next-generation social coding platform."/>
8 <meta name="htmx-config" content='{"includeIndicatorStyles": false}'>
9
10 <!-- Open Graph defaults -->
11 <meta property="og:site_name" content="Tangled" />
12 <meta property="og:type" content="website" />
13 <meta property="og:locale" content="en_US" />
14
15
16 <!-- Keywords -->
17 <meta name="keywords" content="git, code collaboration, AT Protocol, open source, version control, social coding, code hosting" />
18
19 <!-- Author and copyright -->
20 <meta name="author" content="Tangled" />
21 <meta name="robots" content="index, follow" />
22
23 <script defer src="/static/htmx.min.js"></script>
24 <script defer src="/static/htmx-ext-ws.min.js"></script>
25 <script defer src="/static/actor-typeahead.js" type="module"></script>
26 <script defer src="/static/markdown-editor.js" type="module"></script>
27 <script defer src="/static/topbar-search.js"></script>
28
29 <link rel="icon" href="/static/logos/dolly.ico" sizes="48x48"/>
30 <link rel="icon" href="/static/logos/dolly.svg" sizes="any" type="image/svg+xml"/>
31 <link rel="apple-touch-icon" href="/static/logos/dolly.png"/>
32
33 <!-- preconnect to image cdn -->
34 <link rel="preconnect" href="https://avatar.tangled.sh" />
35 <link rel="preconnect" href="https://camo.tangled.sh" />
36
37 <!-- pwa manifest -->
38 <link rel="manifest" href="/pwa-manifest.json" />
39
40 <!-- preload main font -->
41 <link rel="preload" href="/static/fonts/InterVariable.woff2" as="font" type="font/woff2" crossorigin />
42
43 <link rel="stylesheet" href="/static/tw.css?{{ cssContentHash }}" type="text/css" />
44
45 <script>
46 document.addEventListener('DOMContentLoaded', () => {
47 const nodes = document.querySelectorAll('pre.mermaid');
48 if (!nodes.length) return;
49 const script = document.createElement('script');
50 script.src = '/static/mermaid.min.js';
51 script.onload = async () => {
52 mermaid.initialize({
53 startOnLoad: true,
54 theme: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'default',
55 });
56 await mermaid.run({ nodes });
57 };
58 document.head.appendChild(script);
59 });
60 </script>
61 <script>
62 document.addEventListener('DOMContentLoaded', () => {
63 const nodes = document.querySelectorAll('span.math');
64 if (!nodes.length) return;
65 window.MathJax = {
66 tex: {
67 inlineMath: [['\\(', '\\)']],
68 displayMath: [['\\[', '\\]']],
69 },
70 options: {
71 skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
72 // v4 turns on semantic enrichment + speech by default, which
73 // spins up a speech webworker. These are gated by the menu
74 // settings (even when the menu itself is disabled), so turn
75 // them off here to keep rendering self-contained.
76 enableMenu: false,
77 menuOptions: {
78 settings: {
79 enrich: false,
80 speech: false,
81 braille: false,
82 assistiveMml: false,
83 collapsible: false,
84 },
85 },
86 },
87 startup: { typeset: false },
88 };
89 const script = document.createElement('script');
90 script.src = '/static/mathjax.min.js';
91 script.onload = () => {
92 MathJax.typesetPromise(Array.from(nodes));
93 };
94 document.head.appendChild(script);
95 });
96 </script>
97 <script>
98 window.addEventListener('scroll', function() {
99 document.querySelectorAll('[data-profile-popover]:not(.hidden)').forEach(function(p) {
100 p.classList.add('hidden');
101 });
102 }, { passive: true });
103 </script>
104 <title>{{ block "title" . }}{{ end }}</title>
105 {{ block "extrameta" . }}{{ end }}
106 </head>
107 <body class="min-h-screen flex flex-col gap-4 bg-slate-100 dark:bg-gray-900 dark:text-white transition-colors duration-200 {{ block "bodyClasses" . }} {{ end }}">
108 {{ block "topbarLayout" . }}
109 <header class="w-full col-span-full md:col-span-1 md:col-start-2 shadow-sm dark:text-white bg-white dark:bg-gray-800 pt-[env(safe-area-inset-top)]" style="z-index: 20;">
110
111 {{ if .LoggedInUser }}
112 <div id="upgrade-banner"
113 hx-get="/upgradeBanner"
114 hx-trigger="load"
115 hx-swap="innerHTML">
116 </div>
117 {{ end }}
118 {{ template "layouts/fragments/topbar" . }}
119 </header>
120 {{ end }}
121
122 {{ block "mainLayout" . }}
123 <div class="flex-grow">
124 <div class="max-w-screen-lg mx-auto flex flex-col gap-4">
125 {{ block "contentLayout" . }}
126 <main>
127 {{ block "content" . }}{{ end }}
128 </main>
129 {{ end }}
130
131 {{ block "contentAfterLayout" . }}
132 <main>
133 {{ block "contentAfter" . }}{{ end }}
134 </main>
135 {{ end }}
136 </div>
137 </div>
138 {{ end }}
139
140 {{ block "footerLayout" . }}
141 <footer class="mt-12 pb-[env(safe-area-inset-bottom)]">
142 {{ template "layouts/fragments/footer" . }}
143 </footer>
144 {{ end }}
145
146 {{ template "focus/pill" .FocusParams }}
147 </body>
148 </html>
149{{ end }}