From 0fc470a8d588cac1a51cc4b3e1a2237dc56041c9 Mon Sep 17 00:00:00 2001 From: grm Date: Fri, 18 Sep 2026 14:32:22 +0300 Subject: Special pages: a gallery page of the blog's images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/web/web_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/web/web_test.go') 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{} -- cgit v1.2.3