all repos — honk @ master

my fork of honk

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