chore: cleanup instructions
This commit is contained in:
4 files changed
+92
-77
No files matched your search
@@ -1,75 +0,0 @@
|
||||
# scient.ing theme for git.scient.ing
|
||||
|
||||
Everything here goes into Gitea's custom folder (`$GITEA_CUSTOM`).
|
||||
Nothing replaces a Gitea file, and removing these files restores the defaults.
|
||||
|
||||
| Path in the custom folder | What it does |
|
||||
| --- | --- |
|
||||
| `public/assets/css/theme-scienting-auto.css` | follows each visitor's light or dark setting; the default |
|
||||
| `public/assets/css/theme-scienting-light.css` | the computation pad |
|
||||
| `public/assets/css/theme-scienting-dark.css` | the greenboard |
|
||||
| `public/assets/fonts/scienting/` | Atkinson Hyperlegible Next and Mono, self-hosted, with their license |
|
||||
| `public/assets/img/` | the dot-with-spread logo and favicons in place of Gitea's teacup |
|
||||
| `templates/home.tmpl` | the signed-out home page, in the studio's voice |
|
||||
| `templates/custom/extra_links_footer.tmpl` | adds a scient.ing link to the footer |
|
||||
|
||||
The themes start from Gitea 28.1.0's own theme files and change only the brand colors, fonts, and corner radius.
|
||||
Gitea's named colors for status, diffs, and syntax highlighting stay as Gitea tuned them.
|
||||
Every text color passes WCAG AA against its background in both themes.
|
||||
|
||||
## Find the custom folder
|
||||
|
||||
Sign in as an admin and open Site Administration, then Configuration.
|
||||
The path is listed as "Custom File Root Path."
|
||||
In the official Docker image it is `/data/gitea`.
|
||||
Binary installs often use `/var/lib/gitea/custom`.
|
||||
|
||||
## Back up what you have
|
||||
|
||||
Your current home page and any logo you added live in that folder. Copy them aside first:
|
||||
|
||||
```
|
||||
cp -a $GITEA_CUSTOM/templates/home.tmpl ~/home.tmpl.bak
|
||||
cp -a $GITEA_CUSTOM/public/assets/img ~/gitea-img.bak
|
||||
```
|
||||
|
||||
Skip a line if the file or folder does not exist.
|
||||
|
||||
## Copy the files in
|
||||
|
||||
From the folder this README is in:
|
||||
|
||||
```
|
||||
rsync -a --exclude README-scienting-theme.md --exclude app.ini.scienting ./ $GITEA_CUSTOM/
|
||||
chown -R git:git $GITEA_CUSTOM/public $GITEA_CUSTOM/templates
|
||||
```
|
||||
|
||||
Use the user and group Gitea runs as in place of `git:git`. In Docker, copy into the volume mounted at `/data`.
|
||||
|
||||
## Edit app.ini
|
||||
|
||||
Merge `app.ini.scienting` into your `app.ini`. It sets three things:
|
||||
|
||||
- `APP_NAME = scient.ing git`, which replaces "Scienting Git" in page titles. The brand writes the name lowercase, with the dot.
|
||||
- `[ui] DEFAULT_THEME = scienting-auto`. If your `app.ini` already has a `THEMES` line, it must list the three scient.ing themes, or Gitea hides them. Without a `THEMES` line, Gitea offers every theme it finds.
|
||||
- `[ui.meta]`, the author, description, and keywords search engines see.
|
||||
|
||||
## 5. Restart Gitea and check
|
||||
|
||||
```
|
||||
docker restart server
|
||||
```
|
||||
|
||||
Then check, signed out:
|
||||
|
||||
- The home page shows the scient.ing wordmark and "Where we show our work."
|
||||
- The navbar shows the green tile with the dot-with-spread mark.
|
||||
- The theme menu in the footer lists "scient.ing auto."
|
||||
|
||||
Gitea stores a theme for each account when it is created, so existing accounts, including yours, keep their old theme. Switch under Settings, then Appearance. New accounts and signed-out visitors get scient.ing automatically. Hard-refresh the browser if the old logo lingers.
|
||||
|
||||
## Optional
|
||||
|
||||
- To hide the Gitea version from visitors, set `SHOW_FOOTER_VERSION = false` in an `[other]` section. Admins still see it. Leaving "Powered by Gitea" in place credits the software the studio stands on, so this bundle keeps it.
|
||||
- The home page text is in English only. Edit `templates/home.tmpl` to change the wording; its styles use Gitea's color variables, so it also works under Gitea's own themes.
|
||||
- The fonts are under the SIL Open Font License 1.1 (`public/assets/fonts/scienting/OFL.txt`).
|
||||
@@ -0,0 +1,89 @@
|
||||
# scient.ing theme for git.scient.ing
|
||||
|
||||
This repo is Gitea's custom folder. On the server it is cloned once and mounted into the container, so an update is `git pull` and a restart.
|
||||
Nothing replaces a Gitea file, and removing the mount restores the defaults.
|
||||
|
||||
| Path in the repo | What it does |
|
||||
| --- | --- |
|
||||
| `public/assets/css/theme-scienting-auto.css` | follows each visitor's light or dark setting; the default |
|
||||
| `public/assets/css/theme-scienting-light.css` | the computation pad |
|
||||
| `public/assets/css/theme-scienting-dark.css` | the greenboard |
|
||||
| `public/assets/fonts/scienting/` | Atkinson Hyperlegible Next and Mono, self-hosted, with their license |
|
||||
| `public/assets/img/` | the dot-with-spread logo and favicons in place of Gitea's teacup |
|
||||
| `templates/home.tmpl` | the signed-out home page, in the studio's voice |
|
||||
| `templates/custom/extra_links_footer.tmpl` | adds a scient.ing link and the company's legal name, Scientific Computing Studio, LLC, to the footer |
|
||||
|
||||
The themes start from Gitea 28.1.0's own theme files and change only the brand colors, fonts, and corner radius.
|
||||
Gitea's named colors for status, diffs, and syntax highlighting stay as Gitea tuned them.
|
||||
Every text color passes WCAG AA against its background in both themes.
|
||||
|
||||
## How it is wired
|
||||
|
||||
The server runs the rootless Gitea image with `/opt/gitea/data` mounted at `/var/lib/gitea`.
|
||||
Gitea's custom folder is therefore `/opt/gitea/data/custom` on the host.
|
||||
The clone lives at `/opt/gitea/theme` and is mounted read-only over that folder.
|
||||
|
||||
## First-time setup
|
||||
|
||||
On the server, as root.
|
||||
|
||||
1. Back up what is in the current custom folder. The mount hides it, so nothing is lost, but keep a copy:
|
||||
|
||||
```
|
||||
cp -a /opt/gitea/data/custom /opt/gitea/custom.bak
|
||||
```
|
||||
|
||||
2. Clone the repo:
|
||||
|
||||
```
|
||||
git clone https://git.scient.ing/core/gitea-custom-theme.git /opt/gitea/theme
|
||||
```
|
||||
|
||||
The files must be readable by uid 1000, which a normal clone already is.
|
||||
|
||||
3. Add one line under `volumes:` of the `server` service in `/opt/gitea/docker-compose.yml`:
|
||||
|
||||
```
|
||||
- /opt/gitea/theme:/var/lib/gitea/custom:ro
|
||||
```
|
||||
|
||||
4. Merge `app.ini.scienting` into `/opt/gitea/config/app.ini`. It sets three things:
|
||||
|
||||
- `APP_NAME = scient.ing git`, which replaces "Scienting Git" in page titles. It goes at the top of the file, before any `[section]`. The brand writes the name lowercase, with the dot.
|
||||
- `[ui] DEFAULT_THEME = scienting-auto`. Your `app.ini` has no `THEMES` line, so Gitea offers every theme it finds. If you add one later, it must list the three scient.ing themes.
|
||||
- `[ui.meta]`, the author, description, and keywords search engines see.
|
||||
|
||||
`[ui]` already exists in your file with `SHOW_USER_EMAIL`; add `DEFAULT_THEME` to that section instead of creating a second one.
|
||||
|
||||
5. Recreate the container so the new mount takes effect:
|
||||
|
||||
```
|
||||
cd /opt/gitea && docker compose up -d
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
```
|
||||
git -C /opt/gitea/theme pull
|
||||
docker restart gitea
|
||||
```
|
||||
|
||||
Gitea caches templates in production mode, so the restart is needed for `.tmpl` changes. CSS and images are read from disk, but the restart is harmless and browsers may need a hard refresh.
|
||||
The container is named `gitea` (the compose service is `server`).
|
||||
|
||||
## Check
|
||||
|
||||
Signed out:
|
||||
|
||||
- The home page shows the scient.ing wordmark and "Where we show our work."
|
||||
- The navbar shows the green tile with the dot-with-spread mark.
|
||||
- The theme menu in the footer lists "scient.ing auto."
|
||||
|
||||
Gitea stores a theme for each account when it is created, so existing accounts, including yours, keep their old theme. Switch under Settings, then Appearance. New accounts and signed-out visitors get scient.ing automatically. Hard-refresh the browser if the old logo lingers.
|
||||
|
||||
## Optional
|
||||
|
||||
- To hide the Gitea version from visitors, set `SHOW_FOOTER_VERSION = false` in an `[other]` section. Admins still see it. Leaving "Powered by Gitea" in place credits the software the studio stands on, so this bundle keeps it.
|
||||
- The home page text is in English only. Edit `templates/home.tmpl` to change the wording; its styles use Gitea's color variables, so it also works under Gitea's own themes.
|
||||
- The fonts are under the SIL Open Font License 1.1 (`public/assets/fonts/scienting/OFL.txt`).
|
||||
- `README-scienting-theme.md` and `app.ini.scienting` sit in the custom folder too. Gitea ignores them.
|
||||
+2
-2
@@ -3,8 +3,8 @@ APP_NAME = scient.ing git
|
||||
|
||||
[ui]
|
||||
DEFAULT_THEME = scienting-auto
|
||||
; Only needed if your app.ini already lists THEMES; otherwise Gitea offers every theme it finds.
|
||||
THEMES = scienting-auto,scienting-light,scienting-dark,gitea-auto,gitea-light,gitea-dark
|
||||
; Only needed if your app.ini lists THEMES; otherwise Gitea offers every theme it finds.
|
||||
; THEMES = scienting-auto,scienting-light,scienting-dark,gitea-auto,gitea-light,gitea-dark
|
||||
|
||||
[ui.meta]
|
||||
AUTHOR = Alex M. Maldonado
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
<a href="https://scient.ing/">scient.ing</a>
|
||||
<span>Scientific Computing Studio, LLC</span>
|
||||
Reference in new issue
Block a user