diff options
| author | grm <grm@eyesin.space> | 2026-09-12 11:43:14 +0300 |
|---|---|---|
| committer | grm <grm@eyesin.space> | 2026-09-12 11:43:14 +0300 |
| commit | f0eaf46755e04b806e2df07a2fabd4060a72d54c (patch) | |
| tree | f6d8f9fda0bb6e2fa7ae6304d4ad0c12217f3233 /internal/web/templates | |
| parent | 3eb04b1a2bdf9e53231fe862cfd76327371a9741 (diff) | |
| download | blogspace-f0eaf46755e04b806e2df07a2fabd4060a72d54c.tar.gz blogspace-f0eaf46755e04b806e2df07a2fabd4060a72d54c.tar.bz2 blogspace-f0eaf46755e04b806e2df07a2fabd4060a72d54c.zip | |
Serve the superadmin's blog on the root domain
The base domain (and www.) now serves a regular blog owned by the first
superadmin, created automatically on startup, alongside the management
routes. Literal management paths take precedence over the blog's page
wildcards, and the slugs they would shadow are reserved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/templates')
| -rw-r--r-- | internal/web/templates/admin/index.html | 2 | ||||
| -rw-r--r-- | internal/web/templates/dashboard/settings.html | 2 | ||||
| -rw-r--r-- | internal/web/templates/layouts/blog.html | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/web/templates/admin/index.html b/internal/web/templates/admin/index.html index c74d426..bea9266 100644 --- a/internal/web/templates/admin/index.html +++ b/internal/web/templates/admin/index.html @@ -7,7 +7,7 @@ {{range .Data.users}}<tr{{if .Disabled}} class="disabled"{{end}}> <td>{{.Username}}{{if .Disabled}} <span class="tag">disabled</span>{{end}}</td> <td>{{.Role}}</td> - <td>{{if .Subdomain}}<a href="/b/{{deref .Subdomain}}/">{{deref .BlogTitle}}</a> <a href="{{$.Data.cfg.BlogURL (deref .Subdomain)}}" target="_blank" class="muted">{{deref .Subdomain}} ↗</a>{{else}}<span class="muted">—</span>{{end}}</td> + <td>{{if .Subdomain}}<a href="/b/{{deref .Subdomain}}/">{{deref .BlogTitle}}</a> <a href="{{$.Data.cfg.BlogURL (deref .Subdomain)}}" target="_blank" class="muted">{{if eq (deref .Subdomain) "www"}}{{$.Data.cfg.BaseDomain}}{{else}}{{deref .Subdomain}}{{end}} ↗</a>{{else}}<span class="muted">—</span>{{end}}</td> <td class="nowrap">{{date .CreatedAt}}</td> <td class="nowrap"> {{if ne .ID $.User.ID}} diff --git a/internal/web/templates/dashboard/settings.html b/internal/web/templates/dashboard/settings.html index 24dffb4..9b2b325 100644 --- a/internal/web/templates/dashboard/settings.html +++ b/internal/web/templates/dashboard/settings.html @@ -6,7 +6,7 @@ <input type="hidden" name="_csrf" value="{{.CSRF}}"> <label>Blog title<br><input name="title" value="{{.Blog.Title}}" required maxlength="120"></label> <label>Tagline <span class="muted">(shown under the title)</span><br><input name="tagline" value="{{.Blog.Tagline}}" maxlength="300"></label> - <p class="muted">Address: <code>{{.BlogURL}}</code> — only the administrator can change this.</p> + <p class="muted">Address: <code>{{.BlogURL}}</code>{{if ne .Blog.Subdomain "www"}} — only the administrator can change this{{end}}.</p> <button type="submit">Save</button> </form> </div> diff --git a/internal/web/templates/layouts/blog.html b/internal/web/templates/layouts/blog.html index 7e3128e..ff66c59 100644 --- a/internal/web/templates/layouts/blog.html +++ b/internal/web/templates/layouts/blog.html @@ -27,7 +27,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"><a href="/feed.xml">RSS</a> · {{.Blog.Title}}{{if .Data.isRoot}} · <a href="/login">Log in</a>{{end}}</p> </div> </div> </body> |
