- CSS 75.1%
- Go Template 18.7%
- Python 3.3%
- Shell 2.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| custom | ||
| tools | ||
| install.sh | ||
| README.md | ||
ADK theme for Forgejo
A fortysix-flavored theme for adk.codes: moss and balsam greens, Inter and JetBrains Mono, pill buttons, soft corners, and the Adirondack contour lines along the bottom of the home and sign-in pages.
Three themes:
| Name | What it is |
|---|---|
adk-auto |
Follows the visitor's system light or dark |
adk-dark |
Forest floor at night |
adk-light |
Birch bark and balsam |
Built on top of Forgejo's own forgejo-dark and forgejo-light, so it only
overrides colors and a few shapes. A Forgejo upgrade won't break it.
Tested against Forgejo 17.0.1.
What's in here
custom/templates/
home.tmpl the ADK Codes landing page (signed-out visitors)
explore/user_list.tmpl Explore users/orgs: "Full Name handle" (copy of
Forgejo 17's, one line changed)
user/dashboard/feeds.tmpl the home/profile feed as a timeline with month
headers (a copy of Forgejo 17's, lightly edited;
re-copy and re-apply after a big Forgejo upgrade)
custom/public/assets/
css/
theme-adk-auto.css the three themes
theme-adk-dark.css
theme-adk-light.css
adk-base.css fonts, shapes, topo art (shared, not a theme itself)
adk-radius.css makes every Forgejo box corner use the theme radius
(generated by tools/gen_radius.py; rerun after a Forgejo upgrade)
fonts/ Inter + JetBrains Mono (OFL)
img/
adk-topo-dark.svg contour band, from fortysix
adk-topo-light.svg
adk-codes.svg full ADK Codes logo (home page)
adk-topo-summit-*.svg smaller contour art for phones
logo.svg / logo.png ADK mark / full logo (replaces the Forgejo logo)
favicon.svg / favicon.png / apple-touch-icon.png
The img/logo.*, favicon.* and apple-touch-icon.png files swap the
Forgejo logo site-wide, no matter which theme someone picks. Leave them out
if you only want the colors.
Install on adk.codes (from this repo)
This repo lives on adk.codes itself, so the Forgejo container can read it straight off its own volume. Push a change, then run inside the container:
sh -c "$(git -c safe.directory="*" --git-dir=/data/git/repositories/adk-interactive/forgejo-adk-theme.git show main:install.sh)"
On Dokploy, that's a schedule on the Forgejo compose, service forgejo,
run by hand. CSS and image changes show up right away; a change to
home.tmpl or app.ini needs a container restart. install.sh copies the files into
/data/gitea/public and /data/gitea/templates (on the forgejo_server volume, so redeploys keep it),
sets THEMES and DEFAULT_THEME under [ui] in app.ini, and leaves a
backup at app.ini.bak-adk-theme.
Install by hand
1. Copy the files into Forgejo's custom folder
Where that folder lives depends on the image:
| Image | Custom folder |
|---|---|
codeberg.org/forgejo/forgejo (root) |
/data/gitea |
...forgejo:*-rootless |
/var/lib/gitea/custom |
| Binary install | <work dir>/custom |
Copy custom/public so you end up with
<custom folder>/public/assets/css/theme-adk-dark.css and so on.
From your machine, into a running container:
docker cp custom/public/. <forgejo-container>:/data/gitea/public/
2. Turn the themes on
In <custom folder>/conf/app.ini:
[ui]
DEFAULT_THEME = adk-auto
THEMES = adk-auto,adk-light,adk-dark,forgejo-auto,forgejo-light,forgejo-dark
Or, with env vars in your compose file:
environment:
- FORGEJO__ui__DEFAULT_THEME=adk-auto
- FORGEJO__ui__THEMES=adk-auto,adk-light,adk-dark,forgejo-auto,forgejo-light,forgejo-dark
3. Restart Forgejo
Users who already picked a theme keep theirs. They can switch under Settings → Appearance.
Tweaking
- The green:
--color-primaryand its-dark-*/-light-*steps in each theme file. - The greys: the
--steel-*(dark) and--zinc-*(light) scales. - No pill buttons: delete the "Buttons" block in
adk-base.css. - No contour lines: delete the
body:has(...)blocks inadk-base.css.