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/topbar-search.js"></script>
27
28 <link rel="icon" href="/static/logos/dolly.ico" sizes="48x48"/>
29 <link rel="icon" href="/static/logos/dolly.svg" sizes="any" type="image/svg+xml"/>
30 <link rel="apple-touch-icon" href="/static/logos/dolly.png"/>
31
32 <!-- preconnect to image cdn -->
33 <link rel="preconnect" href="https://avatar.tangled.sh" />
34 <link rel="preconnect" href="https://camo.tangled.sh" />
35
36 <!-- pwa manifest -->
37 <link rel="manifest" href="/pwa-manifest.json" />
38
39 <!-- preload main font -->
40 <link rel="preload" href="/static/fonts/InterVariable.woff2" as="font" type="font/woff2" crossorigin />
41
42 <link rel="stylesheet" href="/static/tw.css?{{ cssContentHash }}" type="text/css" />
43
44 <script>
45 document.addEventListener('DOMContentLoaded', () => {
46 const nodes = document.querySelectorAll('pre.mermaid');
47 if (!nodes.length) return;
48 const script = document.createElement('script');
49 script.src = '/static/mermaid.min.js';
50 script.onload = async () => {
51 mermaid.initialize({
52 startOnLoad: true,
53 theme: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'default',
54 });
55 await mermaid.run({ nodes });
56 };
57 document.head.appendChild(script);
58 });
59 </script>
60 <script>
61 document.addEventListener('DOMContentLoaded', () => {
62 const nodes = document.querySelectorAll('span.math');
63 if (!nodes.length) return;
64 window.MathJax = {
65 tex: {
66 inlineMath: [['\\(', '\\)']],
67 displayMath: [['\\[', '\\]']],
68 },
69 options: {
70 skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
71 // v4 turns on semantic enrichment + speech by default, which
72 // spins up a speech webworker. These are gated by the menu
73 // settings (even when the menu itself is disabled), so turn
74 // them off here to keep rendering self-contained.
75 enableMenu: false,
76 menuOptions: {
77 settings: {
78 enrich: false,
79 speech: false,
80 braille: false,
81 assistiveMml: false,
82 collapsible: false,
83 },
84 },
85 },
86 startup: { typeset: false },
87 };
88 const script = document.createElement('script');
89 script.src = '/static/mathjax.min.js';
90 script.onload = () => {
91 MathJax.typesetPromise(Array.from(nodes));
92 };
93 document.head.appendChild(script);
94 });
95 </script>
96 <script>
97 window.addEventListener('scroll', function() {
98 document.querySelectorAll('[data-profile-popover]:not(.hidden)').forEach(function(p) {
99 p.classList.add('hidden');
100 });
101 }, { passive: true });
102 </script>
103 <title>{{ block "title" . }}{{ end }}</title>
104 {{ block "extrameta" . }}{{ end }}
105 </head>
106 <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 }}">
107 {{ block "topbarLayout" . }}
108 <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;">
109
110 {{ if .LoggedInUser }}
111 <div id="upgrade-banner"
112 hx-get="/upgradeBanner"
113 hx-trigger="load"
114 hx-swap="innerHTML">
115 </div>
116 {{ end }}
117 {{ template "layouts/fragments/topbar" . }}
118 </header>
119 {{ end }}
120
121 {{ block "mainLayout" . }}
122 <div class="flex-grow">
123 <div class="max-w-screen-lg mx-auto flex flex-col gap-4">
124 {{ block "contentLayout" . }}
125 <main>
126 {{ block "content" . }}{{ end }}
127 </main>
128 {{ end }}
129
130 {{ block "contentAfterLayout" . }}
131 <main>
132 {{ block "contentAfter" . }}{{ end }}
133 </main>
134 {{ end }}
135 </div>
136 </div>
137 {{ end }}
138
139 {{ block "footerLayout" . }}
140 <footer class="mt-12 pb-[env(safe-area-inset-bottom)]">
141 {{ template "layouts/fragments/footer" . }}
142 </footer>
143 {{ end }}
144
145 {{ template "focus/pill" .FocusParams }}
146 </body>
147 </html>
148{{ end }}