head.html (7789B)
1 {{ define "head" }} 2 <!DOCTYPE html> 3 <html lang="en"> 4 <head> 5 <meta charset="UTF-8"/> 6 <meta name="viewport" content="width=device-width, initial-scale=1"/> 7 8 <title>{{ .ForumName }} — {{ .Title }}</title> 9 10 <style> 11 /* reset */ 12 *,*::after,*::before{box-sizing:border-box}blockquote,body,dd,dl,figure,h1,h2,h3,h4,p{margin:0}ul[role='list'],ol[role='list']{list-style:none}html:focus-within{scroll-behavior:smooth}body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5}a:not([class]){text-decoration-skip-ink:auto}img,picture{max-width:100%;display:block}button,input,select,textarea{font:inherit}@media (prefers-reduced-motion: reduce){html:focus-within{scroll-behavior:auto}*,*::after,*::before{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}} 13 /* end reset */ 14 br { margin-bottom: unset; } 15 html { 16 max-width: 50rem; 17 font-family: sans-serif; 18 } 19 header { 20 display: flex; 21 justify-content: space-between; 22 align-items: center; 23 margin-bottom: 2rem; 24 } 25 26 hr { 27 width: 4rem; 28 margin: 2rem 0; 29 border-bottom-width: 0; 30 } 31 32 label { 33 display: block; 34 } 35 article h1, article h2, article h3 { 36 /* normalize post titles */ 37 font-size: 1rem; 38 } 39 button { 40 cursor: pointer; 41 } 42 button, select { 43 margin-bottom: 0; 44 } 45 #logo { 46 width: 48px; 47 height: 48px; 48 display: block; 49 } 50 ul[type="menu"] { 51 display: flex; 52 list-style-type: none; 53 margin: 0; 54 padding: 0; 55 grid-column-gap: 0.5rem; 56 } 57 li { margin-bottom: 0rem; } 58 ul { padding-left: 1rem; } 59 h1, h2 { margin-bottom: 1rem; } 60 p { margin-bottom: 1rem; } 61 blockquote { padding-left: 1rem; border-left-style: solid;; border-left-width: 3px; } 62 div { margin-bottom: 2rem; } 63 textarea { min-height: 10rem; } 64 article > section { margin-bottom: 0.5rem; } 65 article { margin-bottom: 2rem; } 66 form div, label { margin-bottom: 0; } 67 .selectable { 68 -webkit-touch-callout: all; 69 -webkit-user-select: all; 70 -khtml-user-select: all; 71 -moz-user-select: all; 72 -ms-user-select: all; 73 user-select: all; 74 } 75 pre { overflow: auto; } 76 table { border:2px solid; } 77 th, td { text-align:left; padding: 2px 7px; border: 1px solid; } 78 th { font-weight: bold; } 79 80 .post-container { 81 max-width: 30rem; 82 margin-top: 1rem; 83 } 84 .post-container > * { 85 display: block; 86 width: 100%; 87 } 88 #thread-private { 89 label { display: inline; } 90 } 91 92 body { padding: 2rem; } 93 * { margin-bottom: 1rem; } 94 95 .visually-hidden { 96 clip: rect(0 0 0 0); 97 clip-path: inset(50%); 98 height: 1px; 99 overflow: hidden; 100 position: absolute; 101 white-space: nowrap; 102 width: 1px; 103 } 104 105 header nav { 106 float: right; 107 } 108 109 header ul > li { 110 display: inline-block; 111 margin-left: 0.5rem; 112 } 113 114 @supports (display: flex) { 115 header nav { 116 float: unset; 117 } 118 119 header ul > li { 120 display: unset; 121 margin-left: unset; 122 } 123 } 124 125 header > a { 126 background-size: 100%; 127 background-repeat: no-repeat; 128 display: inline-block; 129 height: 48px; 130 width: 48px; 131 } 132 133 header svg { 134 display: none; 135 } 136 137 header details { 138 cursor: pointer; 139 } 140 header details, header details summary { 141 margin-bottom: unset; 142 } 143 header details ul { 144 position: absolute; 145 } 146 header details ul > li { 147 display: block; 148 } 149 150 @supports (display: flex) { 151 header > a { 152 background-image: none; 153 background-size: unset; 154 background-repeat: unset; 155 } 156 157 header svg { 158 display: initial; 159 } 160 } 161 </style> 162 163 <link href="/assets/theme.css" rel="stylesheet"/> 164 165 <link rel="icon" href="/assets/favicon.png"/> 166 <!-- <link rel="icon" href="/assets/favicon.svg" type="image/svg+xml"/> --> 167 <link rel="shortcut icon" href="/assets/favicon.png"/> 168 <link rel="apple-touch-icon" href="/assets/favicon.png"/> 169 <meta name="theme-color" content="#000000"/> 170 171 <!-- <meta name="description" content=""> --> 172 173 <!-- <meta property="og:title" content=""> --> 174 <!-- <meta property="og:description" content=""> --> 175 <!-- <meta property="og:image" content="/assets/favicon.png"> --> 176 <!-- <meta property="og:image:alt" content=""> --> 177 <!-- <meta property="og:locale" content="en_US"> --> 178 <!-- <meta property="og:type" content="website"> --> 179 <!-- <meta name="twitter:card" content=""> --> 180 <!-- <meta property="og:url" content=""> --> 181 <!-- --> 182 <!-- <link rel="canonical" href=""> --> 183 184 <!-- <link rel="search" type="application/opensearchdescription+xml" title="" href="/assets/opensearch.xml"> --> 185 </head> 186 <body> 187 <header> 188 <a style="margin-bottom: 0; height: 48px;" href="/" aria-label='{{ "AriaHome" | translate }}'> 189 {{ dumpLogo }} 190 </a> 191 <nav> 192 <ul type="menu"> 193 194 {{ $threads := "Threads" | translate }} 195 {{ if eq .Title $threads }} 196 <li> 197 <details> 198 <summary>{{ "Sort" | translate }}</summary> 199 <ul> 200 <li> <a href="/?sort=posts">{{ "SortRecentPosts" | translate }}</a></li> 201 <li> <a href="/">{{ "SortRecentThreads" | translate }}</a></li> 202 </ul> 203 </details> 204 </li> 205 {{ end }} 206 {{ if .QuickNav }} 207 <li><a href="#bottom">{{ "Bottom" | translate }}</a></li> 208 {{end}} 209 {{ if .IsAdmin }} 210 <li><a href="/admin">admin</a></li> 211 {{end}} 212 <li><a href="/about">{{ "About" | translate }}</a></li> 213 {{ if .HasRSS }} 214 <li><a href="/rss.xml">rss</a></li> 215 {{ end }} 216 {{ if .LoggedIn }} 217 <li><a href="/logout">{{"Logout" | translate }}</a></li> 218 {{ else }} 219 <li><a href="/login">{{ "Login" | translate }}</a></li> 220 {{ end }} 221 </ul> 222 </nav> 223 </header> 224 225 226 227 {{ end }}