diff --git a/README.md b/README.md index 4b67cf98b5a40d38bb536090a0eed5501860212e..0ba57ceaa8ac98081998326151b7cc11c654cc73 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ ```sh make install PREFIX=/usr/local # → /usr/local/bin/comparesrht - # → /usr/share/sourcehut/compare.sr.ht/static/{bundle..js,main.min..css,logo.svg} + # → /usr/share/sourcehut/compare.sr.ht/static/{bundle..js,main.min..css} ``` 2. **Config.** Append the `[compare.sr.ht]` section (`origin=` and diff --git a/web/static/logo.svg b/web/static/logo.svg deleted file mode 100644 index 953592414791428a927096b765e30eac02fe096a..0000000000000000000000000000000000000000 --- a/web/static/logo.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/web/templates.go b/web/templates.go index cc3c114e84c097aac6bd8b6329ea2c4a4f6c92ec..37fe60aeea8f545e72fa44d347f289e964c81450 100644 --- a/web/templates.go +++ b/web/templates.go @@ -19,8 +19,9 @@ // //go:embed templates/*.html var tmplFS embed.FS -// staticFS holds the built front-end assets (the hashed bundle..js, the -// hashed stylesheet, logo.svg). It is served read-only under /static/. +// staticFS holds the built front-end assets: the hashed bundle..js and +// the hashed stylesheet, and nothing else since the favicon became chrome's +// inlined one. It is served read-only under /static/. // //go:embed static var staticFS embed.FS diff --git a/web/templates/layout.html b/web/templates/layout.html index 815cac6596cfa1ca845bdb451564336d20af4497..3cc85d9f766061963a6d6b75c48a8b08eff0044b 100644 --- a/web/templates/layout.html +++ b/web/templates/layout.html @@ -19,13 +19,14 @@ {{.Title}} - - {{/* Guarded rather than emitted empty: re-requests the page - it is on, which is a page load per page load. assets.Resolve answers "" - for a binary built without `make css`, which is a checkout run from - source; a deployed build always has the artefact and always takes - this. */}} - {{if .StyleHref}}{{end}} + {{/* The stylesheet and the icon, both guarded rather than emitted empty: + re-requests the page it is on, which is a page load per + page load. assets.Resolve answers "" for a binary built without `make + css`, which is a checkout run from source; a deployed build always has + the artefact. The icon is chrome's own brand circle, inlined as a + data: URI — it cannot 404 and costs no request, which the copy of the + same circle this service shipped under /static/logo.svg did. */}} + {{template "srht-head-links" .}}