Add flowtheme_2026: a responsive theme with light/dark/system appearance - #184
Open
martinbogo wants to merge 1 commit into
Open
Add flowtheme_2026: a responsive theme with light/dark/system appearance#184martinbogo wants to merge 1 commit into
martinbogo wants to merge 1 commit into
Conversation
A modern theme for Gallery 2.3, built against the existing theme API
(core 7.20 / theme 2.4) with no core changes required.
- Three-state appearance: follows the system by default, with an explicit
light/dark override remembered in localStorage. Colours are defined as
custom properties on :root so both themes stay in sync, and
color-scheme is declared so form controls follow too.
- Justified photo grid whose row heights come from each photo's real
aspect ratio rather than the square thumbnail crop.
- Optional lightbox and infinite scroll, both progressive enhancements:
with JavaScript off, per-photo pages and the normal pager still work.
- Styles Gallery2's own admin and module markup (gcBackground/gcBorder,
gbAdminLink lists, gbDataTable) rather than overriding it away, so
Site Admin renders consistently with the rest of the theme.
Ships MANIFEST and po/ scaffolding; all user-visible strings go through
i18n()/{g->text}.
images/screenshot.png is a synthetic placeholder rendered from the
theme's own palette, showing the light and dark appearances side by
side. It should be replaced with a real capture before release.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015pPeWCa9ToJFseWqbPrDH4
Contributor
Author
|
Apologies for not having a pretty thumbnail… I didn’t want to expose my own private photos, and I don’t have the example photo data to match the original thumbnail. “IOU” a nice thumbnail .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A modern theme for Gallery 2.3, built entirely against the existing theme API —
requiredCoreApi 7.20/requiredThemeApi 2.4, the same asmatrix. No core changes are required, and it lives alongside the bundled themes without touching them.It has been running a real ~4,300-item gallery on PHP 8.2 / Debian 12 for the work that produced #180, #181 and #183.
Design notes
localStorage. All colours are custom properties on:root, redefined once under@media (prefers-color-scheme: dark)and once under[data-theme="dark"], so the two appearances can't drift apart.color-schemeis declared so form controls and scrollbars follow too.$child.width/height) rather than the square thumbnail crop, so portraits stop being letterboxed into squares.flow.jsreturns early if the grid isn't present, and every enhanced element degrades to a plain link.gcBackground1/gcBorder1,gbAdminLinklists,gbDataTable, fieldsets and submit buttons all get theme-consistent styling, so Site Admin and module views render as part of the theme instead of unstyled. (An early revision neutralisedgcBackground1totransparent; with 385 uses across 192 module templates that flattened the entire admin UI, which is worth knowing if anyone attempts something similar.)MANIFESTandpo/scaffolding. Every user-visible string goes throughi18n()/{g->text}.Screenshot
images/screenshot.pngis a synthetic placeholder, not a real capture — 505×170 to match the bundled themes, rendered programmatically from the theme's own palette tokens and showing the light and dark appearances side by side. The install it runs on is a private family gallery, so a genuine screenshot would have meant publishing personal photographs. Happy to replace it with a real capture from a demo gallery if you'd prefer, or drop the file entirely.Testing
Exercised on a live 2.3.2 install: album grids, single-photo pages, video items, Site Admin (Plugins, Themes, Maintenance), the module views, error pages, and both appearances. Install/uninstall and switching to and from
matrixboth work through the normal Themes UI.Caveats, stated plainly
po/contains onlystrings.rawand theGNUmakefile; there are no translations yet.🤖 Generated with Claude Code
https://claude.ai/code/session_015pPeWCa9ToJFseWqbPrDH4