Branding, theming and custom assets for pebble.moe Forgejo
  • CSS 62.7%
  • Python 29.2%
  • Shell 8.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
kit 2da254e58c logo: real mark, correct aspect ratio, PNG favicons
The traced pebble was installed with two bugs:

- the favicon scaled the 773-wide mark down to a 441-wide canvas and
  cropped it, chopping the sides off the pebble. Use a 773x773 canvas
  and centre the mark with a plain translate instead.
- Forgejo's navbar hardcodes width=30 height=30, so the 1.754:1 mark
  rendered 30x17. Append a #navbar-logo img rule setting width:auto
  and height:30px, which renders 53x30 - correct aspect, legible.

Also generate favicon.png / logo.png / apple-touch-icon.png, since the
stock templates request PNG variants too.

Themes rebuilt from the same source; the accent-only override is
unchanged, this only adds the structural block.
2026-10-18 02:37:51 +01:00
assets logo: real mark, correct aspect ratio, PNG favicons 2026-10-18 02:37:51 +01:00
themes logo: real mark, correct aspect ratio, PNG favicons 2026-10-18 02:37:51 +01:00
upstream pebble.moe Forgejo branding: themes, build script, installer 2026-10-18 01:56:17 +01:00
.gitignore pebble.moe Forgejo branding: themes, build script, installer 2026-10-18 01:56:17 +01:00
build-themes.py logo: real mark, correct aspect ratio, PNG favicons 2026-10-18 02:37:51 +01:00
install.sh fix: use the pebble.moe palette, not the repo landing page 2026-10-18 02:09:09 +01:00
make-logo.py logo: real mark, correct aspect ratio, PNG favicons 2026-10-18 02:37:51 +01:00
README.md fix: use the pebble.moe palette, not the repo landing page 2026-10-18 02:09:09 +01:00

pebble.moe branding

Branding and theming for the pebble.moe Forgejo instance.

Everything here is drop-in: no Forgejo rebuild, no patched binary. Forgejo serves its public/assets/ directory at /assets/, so files land straight in the web root.

What's in here

themes/                  drop-in CSS themes
  theme-pebble-dark.css  periwinkle on navy
  theme-pebble-light.css periwinkle on cool white
  theme-pebble-auto.css  follows the OS preference
upstream/                vendored Forgejo themes the builds derive from
build-themes.py          regenerates themes/ from upstream/ + the palette
install.sh               copies themes into a running instance
assets/                  logo / favicon replacements

Palette

Taken from the pebble.moe stylesheet: a deep navy fading to black, with a periwinkle-blue accent. The site also carries a set of secondary section accents (violet, pink, teal, green, amber) used for individual blocks; the UI accent here is the blue.

role hex
accent #8cb8ff
accent (soft) #c2d6ff
gradient top #0a1633
gradient bottom #000000
text #e6eeff
muted #8fa3c7

Light mode uses #2f6fe0 as the accent — the same hue darkened so it keeps contrast against white.

Install

./install.sh <forgejo-data-dir> [container-name]

e.g. ./install.sh /srv/forgejo/data forgejo. The data dir is the one mounted at /data in the container; the installer derives the asset path and app.ini from it.

Or by hand — copy the themes into the instance's custom public dir. Note that /assets/* maps to <CustomPath>/public/assets/*, so the URL path sits inside public/:

install -d -m 755 "$DATA/gitea/public/assets/css"
install -m 644 themes/theme-pebble-*.css "$DATA/gitea/public/assets/css/"

Then add the themes to app.ini:

[ui]
DEFAULT_THEME = pebble-auto
THEMES = pebble-auto,pebble-light,pebble-dark,forgejo-auto,forgejo-light,forgejo-dark

Restart the container and the themes appear in the user's theme picker. No rebuild needed.

DEFAULT_THEME only sets the default for new users — existing users keep whatever they picked, and can switch any time in Settings → Appearance.

How the themes are built

Forgejo themes are plain CSS with a few hundred custom properties on :root. Hand-maintaining that is a losing game, so build-themes.py does this instead:

  1. take the fully-compiled upstream theme (all chroma syntax-highlighting, codemirror and markup rules included)
  2. append a :root override block with the pebble palette

Same specificity, later declaration wins, so the brand colours take over and everything structural stays upstream. Regenerate with:

python3 build-themes.py

upstream/theme-forgejo-*.css are the compiled assets as served by a running instance, at /assets/css/theme-forgejo-{dark,light}.css. The *.src.css copies are the source trees from the Forgejo repo, kept for reference.

Adding a logo / favicon

Forgejo serves these from the same place. Drop replacements in as:

public/assets/img/logo.svg
public/assets/img/favicon.png
public/assets/img/favicon.svg

That's what assets/ is for. The stock filenames are what the templates request, so matching the names is all that's needed.

Notes

  • Theme changes are per-user in Forgejo; there is no instance-wide force beyond DEFAULT_THEME.
  • Bump the theme name (pebble-auto → pebble-auto-v2) if you ever need to bust aggressive browser caches for everyone at once.