diff options
| author | grm <grm@eyesin.space> | 2026-09-12 19:47:28 +0300 |
|---|---|---|
| committer | grm <grm@eyesin.space> | 2026-09-12 19:47:28 +0300 |
| commit | e974eb6f3feb06c8951f85c1d34161938905f807 (patch) | |
| tree | 3bba878b6764e9d18519efd393d4e780eaabd81a /internal/web/templates/layouts/blog.html | |
| parent | dd13e4b73a105ee416b6cfd8eb19b217622c0031 (diff) | |
| download | blogspace-e974eb6f3feb06c8951f85c1d34161938905f807.tar.gz blogspace-e974eb6f3feb06c8951f85c1d34161938905f807.tar.bz2 blogspace-e974eb6f3feb06c8951f85c1d34161938905f807.zip | |
Add a favicon and rework the Design page
Blogs had no icon at all, and browsers probing /favicon.ico ended up
rendering the 404 page. Ship a default paper & ink icon (svg + png) and
let each blog replace it from the Design page; /favicon.ico now serves
the default or redirects to the blog's own image. ICO uploads accepted.
The Design page gains colour schemes, reset to defaults, thumbnail
image pickers, jump links and a sticky save bar, plus new options:
heading font, link underline/hover, content box style and padding,
header image height, post dates and format, footer RSS toggle, menu
alignment/style/hover and sidebar width. The Menu card picks the
position with illustrated tiles and shows only the options that apply
to it, using CSS :checked rules rather than JavaScript.
All new defaults reproduce the previous look, so existing blogs are
unchanged until edited. Theme is jsonb, so no migration.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/templates/layouts/blog.html')
| -rw-r--r-- | internal/web/templates/layouts/blog.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/web/templates/layouts/blog.html b/internal/web/templates/layouts/blog.html index ac6595b..3447e1f 100644 --- a/internal/web/templates/layouts/blog.html +++ b/internal/web/templates/layouts/blog.html @@ -5,7 +5,10 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{{block "title" .}}{{.Blog.Title}}{{end}}</title> <link rel="alternate" type="application/rss+xml" title="{{.Blog.Title}}" href="/feed.xml"> -<link rel="stylesheet" href="/static/blog.css"> +{{if .Data.theme.Favicon}}<link rel="icon" href="/media/{{.Data.theme.Favicon}}"> +{{else}}<link rel="icon" href="/static/favicon.png" sizes="48x48"> +<link rel="icon" href="/static/favicon.svg" type="image/svg+xml"> +{{end}}<link rel="stylesheet" href="/static/blog.css"> <style>{{css .Data.css}}</style> </head> <body class="nav-{{.Data.theme.NavPosition}}"> @@ -29,7 +32,7 @@ <div class="site-footer"> <div class="wrap footer-inner"> {{if .Data.theme.FooterText}}<p>{{.Data.theme.FooterText}}</p>{{end}} - <p class="small"><a href="/feed.xml">RSS</a> · {{.Blog.Title}}</p> + <p class="small">{{if .Data.theme.FooterShowRSS}}<a href="/feed.xml">RSS</a> · {{end}}{{.Blog.Title}}</p> </div> </div> </body> |
