views/header.html (view raw)
1<!doctype html>
2<html>
3 <head>
4 <title>honk</title>
5 <link href="https://cdn.icyphox.sh/fonts/inter.css" rel="stylesheet">
6 <link href="/style.css{{ .StyleParam }}" rel="stylesheet">
7 {{ if .LocalStyleParam }}
8 <link href="/local.css{{ .LocalStyleParam }}" rel="stylesheet">
9 {{ end }}
10 <style>
11 {{ .UserStyle }}
12 </style>
13 {{ .APAltLink }}
14 {{ .Honkology }}
15 <link rel="manifest" href="/manifest.webmanifest">
16 <link href="/icon.png" rel="icon">
17 <meta name="theme-color" media="(prefers-color-scheme: light) "content="#f4f4f4">
18 <meta name="theme-color" media="(prefers-color-scheme: dark) "content="#509c93">
19 <meta name="viewport" content="width=device-width">
20 <script>
21 if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js') }
22 </script>
23 </head>
24 <body>
25 <header>
26 {{ if .UserInfo }}
27 <script src="/mecount.js"></script>
28 <nav>
29 <ul class="easylinks">
30 <li><a id="homelink" href="/">home</a>
31 <li><a id="atmelink" href="/atme">@me<span id=mecount>{{ if .UserInfo.Options.MeCount }}{{ .UserInfo.Options.MeCount }}{{ end }}</span></a>
32 <script>
33 var mecount = document.getElementById("mecount");
34 if (mecount.innerHTML !== "") {
35 mecount.style.width = "18px";
36 if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
37 mecount.style.backgroundColor = "var(--bg-page)"
38 mecount.style.color = "var(--fg-subtle)"
39 }
40 } else {
41 mecount.style.width = "0px";
42 }
43
44 </script>
45 <li><a href="/account">account</a>
46 <li><a href="/honkers">honkers</a>
47 <li><a href="/{{ .UserSep }}/{{ .UserInfo.Name }}">{{ .UserInfo.Name }}</a>
48 </ul>
49 </nav>
50
51 <details id="topmenu">
52 <summary>menu</summary>
53 <ul>
54 <li><a id="firstlink" href="/first">first</a>
55 <li style="list-style-type:none; margin-left:-1em">
56 <details>
57 <summary>combos</summary>
58 <ul>
59 {{ range .Combos }}
60 <li><a class="combolink" href="/c/{{ . }}">{{ . }}</a>
61 {{ end }}
62 </ul>
63 </details>
64 <li><a href="/chatter">chatter<span id=chatcount>{{ if .UserInfo.Options.ChatCount }}({{ .UserInfo.Options.ChatCount }}){{ end }}</span></a>
65 <li><a href="/o">tags</a>
66 <li><a href="/events">events</a>
67 <li><a id="longagolink" href="/longago">long ago</a>
68 <li><a id="savedlink" href="/saved">saved</a>
69 <li><a href="/hfcs">filters</a>
70 <li style="list-style-type:none; margin-left:-1em">
71 <details>
72 <summary>more stuff</summary>
73 <ul>
74 <li><a href="/about">about</a>
75 <li><a href="/front">front</a>
76 <li><a href="/funzone">funzone</a>
77 <li><a href="/xzone">xzone</a>
78 </ul>
79 </details>
80 <li><a href="/help/honk.1.html">help</a>
81 </ul>
82 </details>
83 {{ else }}
84 <div id="topmenu">
85 <span><a id="homelink" href="/">home</a></span>
86 <span><a href="/about">about</a></span>
87 {{ if .ShowRSS }}
88 <span><a href="/rss">rss</a></span>
89 {{ end }}
90 <span><a href="/login">login</a></span>
91 </div>
92 {{ end }}
93 </header>
94