aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/web_test.go
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-18 14:32:22 +0300
committergrm <grm@eyesin.space>2026-09-18 14:32:22 +0300
commit0fc470a8d588cac1a51cc4b3e1a2237dc56041c9 (patch)
treef4cde97479977d46046bc18953a1d0ecc3686165 /internal/web/web_test.go
parenta2b2574538c30278f4edd8e6b2704a176a7750a2 (diff)
downloadblogspace-0fc470a8d588cac1a51cc4b3e1a2237dc56041c9.tar.gz
blogspace-0fc470a8d588cac1a51cc4b3e1a2237dc56041c9.tar.bz2
blogspace-0fc470a8d588cac1a51cc4b3e1a2237dc56041c9.zip
Special pages: a gallery page of the blog's images
A page's kind says what it shows between its intro and outro: posts, as before, or something special. The first special kind is a gallery — every image in the files library as a masonry wall (CSS columns, no script), newest first, each linked to its full-size file. The page form lists the library's images with a Hide tick per picture; exclusions are stored (page_hidden_files) rather than inclusions so a new upload shows up without editing the page, and the design's own pictures — logo, favicon, header and background image — are never shown. Special pages keep the page chrome (menu, announcements, home, ordering) but hold no posts: the post forms skip them and a forced page id is refused. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/web_test.go')
-rw-r--r--internal/web/web_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/web/web_test.go b/internal/web/web_test.go
index 2f3bc4f..2d4df5c 100644
--- a/internal/web/web_test.go
+++ b/internal/web/web_test.go
@@ -643,7 +643,7 @@ func TestAllTemplatesParse(t *testing.T) {
for _, name := range []string{"auth/login.html", "dashboard/overview.html", "dashboard/pages.html", "dashboard/page_form.html",
"dashboard/posts.html", "dashboard/post_form.html", "dashboard/design.html", "dashboard/files.html", "dashboard/settings.html",
"dashboard/password.html", "dashboard/confirm.html", "dashboard/sections.html", "dashboard/section_form.html", "admin/index.html", "admin/new_user.html", "admin/delete_user.html",
- "blog/page.html", "blog/post.html", "blog/tag.html", "blog/search.html", "blog/404.html"} {
+ "blog/page.html", "blog/gallery.html", "blog/post.html", "blog/tag.html", "blog/search.html", "blog/404.html"} {
for _, l := range i18n.Languages() {
if _, err := tpl.get(l.Code, name); err != nil {
t.Errorf("%s (%s): %v", name, l.Code, err)
@@ -694,7 +694,7 @@ func TestGreekCatalogComplete(t *testing.T) {
for _, p := range Presets() {
used[p.Name] = true
}
- for _, k := range []string{"top", "bottom", store.RoleSuperadmin, store.RoleBlogger} {
+ for _, k := range []string{"top", "bottom", store.RoleSuperadmin, store.RoleBlogger, store.PageKindGallery} {
used[k] = true
}
have := map[string]bool{}