chore: cleanup documentation
This commit is contained in:
13 files changed
+100
-60
No files matched your search
@@ -1,7 +1,10 @@
|
||||
# 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.
|
||||
This repository serves as the custom folder for Gitea.
|
||||
Clone the repository once on your server and mount it into the container.
|
||||
To update, use `git pull` and then restart the container.
|
||||
No Gitea files are overwritten.
|
||||
If you remove the mount, the default settings are restored.
|
||||
|
||||
| Path in the repo | What it does |
|
||||
| --- | --- |
|
||||
@@ -9,81 +12,84 @@ Nothing replaces a Gitea file, and removing the mount restores the defaults.
|
||||
| `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 |
|
||||
| `public/assets/img/` | the custom scienting git 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.
|
||||
These themes are based on Gitea 28.1.0’s original theme files, with changes only to brand colors, fonts, and corner radius.
|
||||
The named colors for status, diffs, and syntax highlighting remain as Gitea originally set them.
|
||||
All text colors meet WCAG AA standards for contrast with their backgrounds 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.
|
||||
The server uses the rootless Gitea image, mounting `/opt/gitea/data` to `/var/lib/gitea`.
|
||||
This means Gitea’s custom folder is located at `/opt/gitea/data/custom` on the host.
|
||||
The cloned repository is stored at `/opt/gitea/theme` and mounted as read-only over the custom folder.
|
||||
|
||||
## First-time setup
|
||||
|
||||
On the server, as root.
|
||||
Perform these steps on the server as the root user.
|
||||
Back up your current custom folder.
|
||||
The mount will hide it, so nothing is lost, but it’s good to keep a copy:
|
||||
|
||||
1. Back up what is in the current custom folder. The mount hides it, so nothing is lost, but keep a copy:
|
||||
```bash
|
||||
cp -a /opt/gitea/data/custom /opt/gitea/custom.bak
|
||||
```
|
||||
|
||||
```
|
||||
cp -a /opt/gitea/data/custom /opt/gitea/custom.bak
|
||||
```
|
||||
Clone the repository:
|
||||
|
||||
2. Clone the repo:
|
||||
```bash
|
||||
git clone https://git.scient.ing/core/gitea-custom-theme.git /opt/gitea/theme
|
||||
```
|
||||
|
||||
```
|
||||
git clone https://git.scient.ing/core/gitea-custom-theme.git /opt/gitea/theme
|
||||
```
|
||||
The files need to be readable by UID 1000, which is the default for a standard clone.
|
||||
|
||||
The files must be readable by uid 1000, which a normal clone already is.
|
||||
Add the following line under `volumes:` for the `server` service in `/opt/gitea/docker-compose.yml`:
|
||||
|
||||
3. Add one line under `volumes:` of the `server` service in `/opt/gitea/docker-compose.yml`:
|
||||
```yaml
|
||||
- /opt/gitea/theme:/var/lib/gitea/custom:ro
|
||||
```
|
||||
|
||||
```
|
||||
- /opt/gitea/theme:/var/lib/gitea/custom:ro
|
||||
```
|
||||
Merge the contents of `app.ini.scienting` into `/opt/gitea/config/app.ini`.
|
||||
This sets three main options:
|
||||
|
||||
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.
|
||||
|
||||
- `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.
|
||||
Recreate the container to apply the new mount:
|
||||
|
||||
`[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
|
||||
```
|
||||
```bash
|
||||
cd /opt/gitea && docker compose up -d
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
```
|
||||
```bash
|
||||
git -C /opt/gitea/theme pull
|
||||
docker restart gitea
|
||||
docker restart server
|
||||
```
|
||||
|
||||
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`).
|
||||
Gitea caches templates in production mode, so you need to restart the container for `.tmpl` changes to take effect.
|
||||
CSS and images are loaded directly from disk. Restarting the container is safe, and you may need to hard refresh your browser.
|
||||
The container is named `gitea`, while the compose service is called `server`.
|
||||
|
||||
## Check
|
||||
## License
|
||||
|
||||
Signed out:
|
||||
This repo is released under the MIT License (`LICENSE`). Because the theme files start from Gitea's own CSS, the notice also carries the copyright of The Gitea Authors and The Gogs Authors. Unlike the studio's tools, this repo is not under the Prosperity Public License, and you may use its source under the MIT License.
|
||||
|
||||
- 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."
|
||||
The fonts in `public/assets/fonts/scienting/` are Atkinson Hyperlegible Next and Mono, copyright 2020-2024 The Atkinson Hyperlegible Mono Project Authors, under the SIL Open Font License 1.1. The license text and copyright notice are in `public/assets/fonts/scienting/OFL.txt`.
|
||||
|
||||
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.
|
||||
## Credits
|
||||
|
||||
## Optional
|
||||
- [Gitea](https://about.gitea.com/), whose theme files, templates, and variables this builds on.
|
||||
- [Atkinson Hyperlegible Next and Mono](https://github.com/googlefonts/atkinson-hyperlegible-next-mono), from the Braille Institute and the Atkinson Hyperlegible Project Authors.
|
||||
|
||||
- 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.
|
||||
## Contributing
|
||||
|
||||
We are not accepting external contributions at this time.
|
||||
We will update this section if that changes.
|
||||
Reference in new issue
Block a user