diff options
| author | grm <grm@eyesin.space> | 2026-09-18 14:35:59 +0300 |
|---|---|---|
| committer | grm <grm@eyesin.space> | 2026-09-18 14:36:17 +0300 |
| commit | 7ac90f8e99dbf763b0fe04a17d7eef19dd22cae8 (patch) | |
| tree | fa2409b9c201a27e19a64afcdd5057eeba0a61ac /internal/web/templates/dashboard | |
| parent | 0fc470a8d588cac1a51cc4b3e1a2237dc56041c9 (diff) | |
| download | blogspace-7ac90f8e99dbf763b0fe04a17d7eef19dd22cae8.tar.gz blogspace-7ac90f8e99dbf763b0fe04a17d7eef19dd22cae8.tar.bz2 blogspace-7ac90f8e99dbf763b0fe04a17d7eef19dd22cae8.zip | |
Revert "Special pages: a gallery page of the blog's images"
This reverts commit 0fc470a. The feature was not wanted. Migration
00013 stays on disk because databases have already run it (goose refuses
a missing applied migration); 00014 drops the column and table it added.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/templates/dashboard')
| -rw-r--r-- | internal/web/templates/dashboard/overview.html | 2 | ||||
| -rw-r--r-- | internal/web/templates/dashboard/page_form.html | 15 | ||||
| -rw-r--r-- | internal/web/templates/dashboard/pages.html | 6 | ||||
| -rw-r--r-- | internal/web/templates/dashboard/post_form.html | 2 | ||||
| -rw-r--r-- | internal/web/templates/dashboard/posts.html | 2 |
5 files changed, 8 insertions, 19 deletions
diff --git a/internal/web/templates/dashboard/overview.html b/internal/web/templates/dashboard/overview.html index 2a797d8..e239445 100644 --- a/internal/web/templates/dashboard/overview.html +++ b/internal/web/templates/dashboard/overview.html @@ -12,7 +12,7 @@ <div class="card"> <h2>{{t "Pages"}}</h2> <ul class="plain"> - {{range .Data.pages}}<li><a href="{{if .Special}}/b/{{$.Blog.Subdomain}}/pages/{{.ID}}/edit{{else}}/b/{{$.Blog.Subdomain}}/posts?page={{.ID}}{{end}}">{{.Title}}</a> <span class="muted">({{if .Special}}{{t .Kind}}{{else}}{{tf "%d posts" .PostCount}}{{end}}{{if .IsHome}}, {{t "home"}}{{end}}{{if not .ShowInNav}}, {{t "hidden from menu"}}{{end}})</span></li>{{end}} + {{range .Data.pages}}<li><a href="/b/{{$.Blog.Subdomain}}/posts?page={{.ID}}">{{.Title}}</a> <span class="muted">({{tf "%d posts" .PostCount}}{{if .IsHome}}, {{t "home"}}{{end}}{{if not .ShowInNav}}, {{t "hidden from menu"}}{{end}})</span></li>{{end}} </ul> </div> </div> diff --git a/internal/web/templates/dashboard/page_form.html b/internal/web/templates/dashboard/page_form.html index 5b47d05..4ee720b 100644 --- a/internal/web/templates/dashboard/page_form.html +++ b/internal/web/templates/dashboard/page_form.html @@ -1,12 +1,9 @@ -{{define "title"}}{{template "pageformtitle" .}} · {{.Blog.Title}}{{end}} -{{define "pageformtitle"}}{{if eq .Data.page.Kind "gallery"}}{{if .Data.page.ID}}{{t "Edit gallery page"}}{{else}}{{t "New gallery page"}}{{end}}{{else}}{{if .Data.page.ID}}{{t "Edit page"}}{{else}}{{t "New page"}}{{end}}{{end}}{{end}} +{{define "title"}}{{if .Data.page.ID}}{{t "Edit page"}}{{else}}{{t "New page"}}{{end}} · {{.Blog.Title}}{{end}} {{define "content"}} <div class="card"> - <h1>{{template "pageformtitle" .}}</h1> - {{if eq .Data.page.Kind "gallery"}}<p class="lead muted">{{t "A gallery page shows every image in your files as a wall of pictures, newest first, between its intro and closing text."}}</p>{{end}} + <h1>{{if .Data.page.ID}}{{t "Edit page"}}{{else}}{{t "New page"}}{{end}}</h1> <form method="post" enctype="multipart/form-data"> <input type="hidden" name="_csrf" value="{{.CSRF}}"> - {{if not .Data.page.ID}}<input type="hidden" name="kind" value="{{.Data.page.Kind}}">{{end}} <label>{{t "Title"}}<br><input name="title" value="{{.Data.page.Title}}" required maxlength="120"></label> <label>{{t "Address"}} <span class="muted">({{t "leave empty to make one from the title; e.g."}} <code>about</code> → {{.BlogURL}}/about)</span><br> <input name="slug" value="{{.Data.page.Slug}}" pattern="[a-z0-9]([a-z0-9-]*[a-z0-9])?" maxlength="80"></label> @@ -14,14 +11,6 @@ {{template "editor" (dict "name" "intro" "value" .Data.page.IntroMD "format" .Data.page.Format "rows" 8 "tall" false "upload" (print "/b/" .Blog.Subdomain "/files/upload") "preview" (print "/b/" .Blog.Subdomain "/preview") "csrf" .CSRF)}} <label for="ed-outro">{{t "Closing text"}} <span class="muted">({{t "shown after the posts, in the same format; optional"}})</span></label> {{template "editor" (dict "name" "outro" "value" .Data.page.OutroMD "format" .Data.page.Format "formatof" "intro" "rows" 8 "tall" false "upload" (print "/b/" .Blog.Subdomain "/files/upload") "preview" (print "/b/" .Blog.Subdomain "/preview") "csrf" .CSRF)}} - {{if eq .Data.page.Kind "gallery"}} - <h2>{{t "Images"}}</h2> - <p class="muted small">{{t "Every image in your files is shown except the ones ticked here. The logo, favicon, header and background images are never shown."}}</p> - {{if .Data.images}}<div class="imagegrid hidegrid"> - {{range .Data.images}}<label class="pick"><img src="/b/{{$.Blog.Subdomain}}/media/{{.ID}}" alt="" loading="lazy"><span class="name" title="{{.Filename}}">{{.Filename}}</span><span class="hide"><input type="checkbox" name="hide" value="{{.ID}}"{{if index $.Data.hidden .ID.String}} checked{{end}}> {{t "Hide"}}</span></label>{{end}} - </div> - {{else}}<p class="muted">{{t "No images in your files yet."}} <a href="/b/{{.Blog.Subdomain}}/files">{{t "Files"}}</a></p>{{end}} - {{end}} <label class="check"><input type="checkbox" name="show_in_nav"{{if .Data.page.ShowInNav}} checked{{end}}> {{t "Show in menu"}}</label> <label class="check"><input type="checkbox" name="show_notices"{{if .Data.page.ShowNotices}} checked{{end}}> {{t "Show announcements on this page"}}</label> <p class="actionrow"> diff --git a/internal/web/templates/dashboard/pages.html b/internal/web/templates/dashboard/pages.html index af3bb5e..6c3b56d 100644 --- a/internal/web/templates/dashboard/pages.html +++ b/internal/web/templates/dashboard/pages.html @@ -2,7 +2,7 @@ {{define "content"}} <div class="pagehead"> <h1>{{t "Pages"}}</h1> - <div class="actions"><a class="btn" href="/b/{{.Blog.Subdomain}}/pages/new">+ {{t "New page"}}</a> <a class="btn secondary" href="/b/{{.Blog.Subdomain}}/pages/new?kind=gallery" title="{{t "A gallery of every image in your files"}}">+ {{t "New special page"}}</a></div> + <div class="actions"><a class="btn" href="/b/{{.Blog.Subdomain}}/pages/new">+ {{t "New page"}}</a></div> <p class="lead muted">{{t "Each page holds its own list of posts. Which pages are in the menu, and in what order, is set on the"}} <a href="/b/{{.Blog.Subdomain}}/design#menu">{{t "Design"}}</a> {{t "tab."}}</p> </div> <div class="card"> @@ -14,9 +14,9 @@ <form method="post" action="/b/{{$.Blog.Subdomain}}/pages/{{.ID}}/move" class="inline"><input type="hidden" name="_csrf" value="{{$.CSRF}}"><input type="hidden" name="dir" value="down"><button class="mini" title="{{t "Move down"}}">▼</button></form> </td> <td><a href="/b/{{$.Blog.Subdomain}}/pages/{{.ID}}/edit">{{.Title}}</a> - {{if .Special}}<span class="tag">{{t .Kind}}</span>{{end}}{{if .IsHome}}<span class="tag">{{t "home"}}</span>{{end}}{{if not .ShowInNav}}<span class="tag off">{{t "not in menu"}}</span>{{end}}</td> + {{if .IsHome}}<span class="tag">{{t "home"}}</span>{{end}}{{if not .ShowInNav}}<span class="tag off">{{t "not in menu"}}</span>{{end}}</td> <td><a href="{{$.BlogURL}}{{if .IsHome}}/{{else}}/{{.Slug}}{{end}}" target="_blank">{{if .IsHome}}/{{else}}/{{.Slug}}{{end}} ↗</a></td> - <td>{{if .Special}}<span class="muted">—</span>{{else}}<a href="/b/{{$.Blog.Subdomain}}/posts?page={{.ID}}">{{.PostCount}}</a>{{end}}</td> + <td><a href="/b/{{$.Blog.Subdomain}}/posts?page={{.ID}}">{{.PostCount}}</a></td> <td class="nowrap"> {{if not .IsHome}}<form method="post" action="/b/{{$.Blog.Subdomain}}/pages/{{.ID}}/home" class="inline"><input type="hidden" name="_csrf" value="{{$.CSRF}}"><button class="mini">{{t "Make home"}}</button></form> <a class="danger" href="/b/{{$.Blog.Subdomain}}/pages/{{.ID}}/delete">{{t "delete"}}</a>{{end}} diff --git a/internal/web/templates/dashboard/post_form.html b/internal/web/templates/dashboard/post_form.html index edb60fd..e64a331 100644 --- a/internal/web/templates/dashboard/post_form.html +++ b/internal/web/templates/dashboard/post_form.html @@ -7,7 +7,7 @@ <label>{{t "Title"}}<br><input name="title" value="{{.Data.post.Title}}" required maxlength="200" autofocus></label> <div class="row"> <label>{{t "Page"}}<br> - <select name="page_id">{{range .Data.pages}}{{if not .Special}}<option value="{{.ID}}"{{if eq .ID $.Data.post.PageID}} selected{{end}}>{{.Title}}</option>{{end}}{{end}}</select> + <select name="page_id">{{range .Data.pages}}<option value="{{.ID}}"{{if eq .ID $.Data.post.PageID}} selected{{end}}>{{.Title}}</option>{{end}}</select> </label> <label>{{t "Address"}} <span class="muted">({{t "optional, made from the title"}})</span><br> <input name="slug" value="{{.Data.post.Slug}}" pattern="[a-z0-9]([a-z0-9-]*[a-z0-9])?" maxlength="80"></label> diff --git a/internal/web/templates/dashboard/posts.html b/internal/web/templates/dashboard/posts.html index 217c966..983fbae 100644 --- a/internal/web/templates/dashboard/posts.html +++ b/internal/web/templates/dashboard/posts.html @@ -8,7 +8,7 @@ <label>{{t "Page:"}} <select name="page" onchange="this.form.submit()"> <option value="0">{{t "All pages"}}</option> - {{range .Data.pages}}{{if not .Special}}<option value="{{.ID}}"{{if eq .ID $.Data.pageID}} selected{{end}}>{{.Title}}</option>{{end}}{{end}} + {{range .Data.pages}}<option value="{{.ID}}"{{if eq .ID $.Data.pageID}} selected{{end}}>{{.Title}}</option>{{end}} </select></label> <noscript><button type="submit">{{t "Filter"}}</button></noscript> </form> |
