+4
appview/pages/pages.go
+4
appview/pages/pages.go
+26
appview/pages/templates/favicon.html
+26
appview/pages/templates/favicon.html
···
···
1
+
{{ define "favicon" }}
2
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
3
+
<style>
4
+
.favicon-text {
5
+
fill: #000000;
6
+
stroke: none;
7
+
}
8
+
9
+
@media (prefers-color-scheme: dark) {
10
+
.favicon-text {
11
+
fill: #ffffff;
12
+
stroke: none;
13
+
}
14
+
}
15
+
</style>
16
+
17
+
<g style="display:inline">
18
+
<path d="M0-2.117h62.177v25.135H0z" style="display:inline;fill:none;fill-opacity:1;stroke-width:.396875" transform="translate(11.01 6.9)"/>
19
+
<path d="M3.64 22.787c-1.697 0-2.943-.45-3.74-1.35-.77-.9-1.156-2.094-1.156-3.585 0-.36.013-.72.038-1.08.052-.385.129-.873.232-1.464L.44 6.826h-5.089l.733-4.394h3.2c.822 0 1.439-.168 1.85-.502.437-.334.72-.938.848-1.812l.771-4.703h5.243L6.84 2.432h7.787l-.733 4.394H6.107L4.257 17.93l.77.27 6.015-4.742 2.775 3.161-2.313 2.005c-.822.694-1.568 1.31-2.236 1.85-.668.515-1.31.952-1.927 1.311a7.406 7.406 0 0 1-1.774.733c-.59.18-1.233.27-1.927.27z"
20
+
aria-label="tangled.sh"
21
+
class="favicon-text"
22
+
style="font-size:16.2278px;font-family:'IBM Plex Mono';-inkscape-font-specification:'IBM Plex Mono, Normal';display:inline;fill-opacity:1"
23
+
transform="translate(11.01 6.9)"/>
24
+
</g>
25
+
</svg>
26
+
{{ end }}
+1
-1
appview/pages/templates/layouts/topbar.html
+1
-1
appview/pages/templates/layouts/topbar.html
+3
appview/state/router.go
+3
appview/state/router.go
+13
appview/state/state.go
+13
appview/state/state.go
···
157
return state, nil
158
}
159
160
+
func (s *State) Favicon(w http.ResponseWriter, r *http.Request) {
161
+
w.Header().Set("Content-Type", "image/svg+xml")
162
+
w.Header().Set("Cache-Control", "public, max-age=31536000") // one year
163
+
w.Header().Set("ETag", `"favicon-svg-v1"`)
164
+
165
+
if match := r.Header.Get("If-None-Match"); match == `"favicon-svg-v1"` {
166
+
w.WriteHeader(http.StatusNotModified)
167
+
return
168
+
}
169
+
170
+
s.pages.Favicon(w)
171
+
}
172
+
173
func (s *State) TermsOfService(w http.ResponseWriter, r *http.Request) {
174
user := s.oauth.GetUser(r)
175
s.pages.TermsOfService(w, pages.TermsOfServiceParams{