diff --git a/2026/2026-07-10--forgejo-theme-exchange-dark.md b/2026/2026-07-10--forgejo-theme-exchange-dark.md new file mode 100644 index 0000000..f255abe --- /dev/null +++ b/2026/2026-07-10--forgejo-theme-exchange-dark.md @@ -0,0 +1,27 @@ +# 2026-07-10 — Forgejo global theme (exchange-dark) + +## Goal + +Make https://git.hacktivism.ch look closer to https://exchange.hacktivism.ch: warm dark layout, gold + teal accents, readable text. + +## Done on koopa + +- Custom theme file `theme-hacktivism.css` (full variable set from forgejo-dark + exchange palette). +- Installed under `~/koopa-forgejo/data/custom/public/assets/css/` (and gitea/custom mirror). +- Logo/favicon under `…/assets/img/`. +- `DEFAULT_THEME = hacktivism` in app.ini + compose `FORGEJO__ui__*`. +- Forced DB: `UPDATE "user" SET theme = 'hacktivism'` (logged-in preference was still `forgejo-auto`). + +## Readability + +- Body/text cream on `#1a1410`; muted secondary not below ~`#c9b8a0`. +- Gold primary buttons with dark label text. +- Explicit overrides for menus, forms, code, labels, messages, footer. + +## Admin-log + +Source of truth: `configs/forgejo/assets/` + `configs/forgejo/README.md`. + +## Note + +Browser cache may hold old CSS (`Cache-Control: max-age=21600`). Hard-reload or private window if UI looks stale. diff --git a/configs/forgejo/README.md b/configs/forgejo/README.md index 54624c0..b1c66ce 100644 --- a/configs/forgejo/README.md +++ b/configs/forgejo/README.md @@ -1,36 +1,60 @@ -# Forgejo — git.hacktivism.ch +# Forgejo (git.hacktivism.ch) -**Rootless** install (image + rootless podman as `hernani`). Details: `2026/2026-07-10--forgejo-rootless.md`. +Rootless stack on koopa: `~/koopa-forgejo/` (podman user hernani). +Site: https://git.hacktivism.ch — HTTP `:9024`, git-SSH `:9200`. -| Item | Value | -|------|--------| -| Live path | `/home/hernani/koopa-forgejo/` | -| Compose | `compose.yml` (this dir = mirror) | -| Image | `codeberg.org/forgejo/forgejo:11-rootless` | -| HTTP | **9024** → Caddy `git.hacktivism.ch` | -| Git SSH | **9200** → container 2222 (not via Caddy) | -| DB | `koopa-forgejo-db` postgres:16-alpine | -| Registration | **disabled** (admin-created users only) | -| Admin user | `hernani` (not reserved name `admin`) | +## Branding theme: `hacktivism` (exchange-dark) -## Files here +Global default and intended look match **exchange.hacktivism.ch**: -| File | Notes | -|------|--------| -| `compose.yml` | live mirror | -| `app.ini.example` | redacted live `data/custom/conf/app.ini` (`@inline-secret@`) | +- Warm dark body (`#1a1410`), cream text (`#fff6e8`) +- Gold primary (`#e8a838` / `#f0c86a`), teal accents (`#3ecfbf`) +- Readable contrast on body, menus, code, forms, labels, messages -## Secrets +### Files (this repo) -`koopa-admin-secrets/koopa/home-hernani/koopa-forgejo/{.env,users.env}` -→ live `~/koopa-forgejo/`. +| Path | Role | +|------|------| +| `assets/css/theme-hacktivism.css` | Full dark theme (based on forgejo-dark vars + exchange palette) | +| `assets/img/logo.svg` / `logo.png` / `favicon.svg` | Site logo / favicon | +| `compose.yml` | Rootless compose reference | +| `app.ini.example` | Config sketch | -## Ops +### Live paths on koopa + +``` +~/koopa-forgejo/data/custom/public/assets/css/theme-hacktivism.css +~/koopa-forgejo/data/custom/public/assets/img/{logo.svg,logo.png,favicon.svg} +~/koopa-forgejo/data/custom/conf/app.ini # [ui] DEFAULT_THEME = hacktivism +``` + +Compose also sets `FORGEJO__ui__DEFAULT_THEME=hacktivism`. + +### Deploy assets (do not wipe git data) ```bash -cd ~/koopa-forgejo -set -a && source .env && set +a -podman-compose up -d -curl -sS http://127.0.0.1:9024/api/healthz -# SSH clone: ssh://git@git.hacktivism.ch:9200//.git +install -m 644 configs/forgejo/assets/css/theme-hacktivism.css \ + ~/koopa-forgejo/data/custom/public/assets/css/ +install -m 644 configs/forgejo/assets/img/* \ + ~/koopa-forgejo/data/custom/public/assets/img/ +# optional mirror if present: +# cp same under data/gitea/custom/public/assets/... ``` + +**Never** remove `~/koopa-forgejo/data/git/` — repositories live there (`hernani/koopa-admin-log`, …). + +### Logged-in users + +`DEFAULT_THEME` only applies to new sessions / users without a preference. +Existing accounts store `user.theme` in Postgres. Force all users: + +```bash +podman exec koopa-forgejo-db psql -U forgejo -d forgejo \ + -c "UPDATE \"user\" SET theme = 'hacktivism';" +``` + +Or: Profile → Appearance → theme **hacktivism**, then hard-reload. + +### Registration + +Public signup is disabled (`DISABLE_REGISTRATION`, no registration button).