docs: Forgejo branding deploy notes (exchange-dark)

Document live paths, DEFAULT_THEME vs user.theme, and safe asset deploy
without touching data/git repositories.
This commit is contained in:
Hernâni Marques 2026-07-10 16:14:26 +02:00
parent 32df461023
commit 1bc4a3fff5
No known key found for this signature in database
2 changed files with 77 additions and 26 deletions

View file

@ -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.

View file

@ -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 | ## Branding theme: `hacktivism` (exchange-dark)
|------|--------|
| 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`) |
## Files here Global default and intended look match **exchange.hacktivism.ch**:
| File | Notes | - Warm dark body (`#1a1410`), cream text (`#fff6e8`)
|------|--------| - Gold primary (`#e8a838` / `#f0c86a`), teal accents (`#3ecfbf`)
| `compose.yml` | live mirror | - Readable contrast on body, menus, code, forms, labels, messages
| `app.ini.example` | redacted live `data/custom/conf/app.ini` (`@inline-secret@`) |
## Secrets ### Files (this repo)
`koopa-admin-secrets/koopa/home-hernani/koopa-forgejo/{.env,users.env}` | Path | Role |
→ live `~/koopa-forgejo/`. |------|------|
| `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 ```bash
cd ~/koopa-forgejo install -m 644 configs/forgejo/assets/css/theme-hacktivism.css \
set -a && source .env && set +a ~/koopa-forgejo/data/custom/public/assets/css/
podman-compose up -d install -m 644 configs/forgejo/assets/img/* \
curl -sS http://127.0.0.1:9024/api/healthz ~/koopa-forgejo/data/custom/public/assets/img/
# SSH clone: ssh://git@git.hacktivism.ch:9200/<user>/<repo>.git # 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).