1
0
Fork 0
mirror of https://github.com/SunRed/theme-dark-arc-gitea.git synced 2024-10-22 15:06:13 +02:00
theme-dark-arc-gitea/README.md

88 lines
2.9 KiB
Markdown
Raw Normal View History

2022-04-14 04:40:30 +02:00
# Dark Arc
2022-04-14 04:41:06 +02:00
A dark theme for gitea with high contrast.
2022-04-14 04:39:17 +02:00
This theme was created by making a copy of theme-arc-green.css and making things darker for better contrast.
If you make improvements/tweaks to this theme please send a pull request, or dump your changes in an issue report.
![dark-arc-dashboard](screenshot.png)
![dark-arc-repository](screenshot2.png)
2022-04-21 01:04:27 +02:00
## Before install, first you need to identify 3 things:
- Location of $GITEA_CUSTOM
2022-04-21 01:29:08 +02:00
- Location of app.ini ([Example app.ini](https://raw.githubusercontent.com/go-gitea/gitea/main/custom/conf/app.example.ini))
2022-04-21 01:04:27 +02:00
- User the gitea service runs as
Here is a screenshot of my environment and where to find this info:
2022-04-21 01:26:46 +02:00
![gitea-config](install.png)
2022-04-21 01:04:27 +02:00
2024-05-03 20:21:29 +02:00
## Create a public/assets/css directory under your gitea/custom path and download the theme.
2022-04-21 01:04:27 +02:00
2024-05-03 20:21:29 +02:00
Create `/public/assets/css` below your $GITEA_CUSTOM path, MY custom path is `/var/lib/gitea/custom`, as seen in the [install screenshot](install.png).
2022-04-21 01:04:27 +02:00
2024-05-03 20:21:29 +02:00
sudo mkdir -p /var/lib/gitea/custom/public/assets/css
cd /var/lib/gitea/custom/public/assets/css
2022-04-21 01:04:27 +02:00
wget https://raw.githubusercontent.com/Jieiku/theme-dark-arc-gitea/main/theme-dark-arc.css
2022-04-21 01:21:27 +02:00
## Make sure ownership is correct:
2022-04-21 01:28:00 +02:00
Set ownership of your $GITEA_CUSTOM directory and files, I set ownership to git because gitea runs as user git, as seen in the [install screenshot](install.png).
2022-04-21 01:21:27 +02:00
sudo chown -R git:git /var/lib/gitea/custom
2022-04-21 01:04:27 +02:00
## Edit the app.ini config file to include dark-arc theme:
2022-04-21 01:28:00 +02:00
The app.ini file location may differ depending on environment, this matches the location of my file, as seen in the [install screenshot](install.png).
2022-04-21 01:04:27 +02:00
`sudo nano /var/lib/gitea/custom/conf/app.ini`
[ui]
DEFAULT_THEME = dark-arc
THEMES = gitea,dark-arc
## Restart gitea service
sudo systemctl restart gitea
2022-04-21 01:17:13 +02:00
2022-04-21 01:04:27 +02:00
*or*
2022-04-21 01:17:13 +02:00
2022-04-21 01:04:27 +02:00
sudo reboot
2022-04-21 01:17:13 +02:00
The theme may automatically be active now, but if not click your avatar in top right, click settings, click appearance tab, select the theme and click update theme button.
## Notes
### assets:
2024-05-03 20:23:44 +02:00
As of [1.21.0](https://blog.gitea.com/release-of-1.21.0/#%EF%B8%8F-move-public-asset-files-to-the-proper-directory-25907) `/assets` now points to `custom/public/assets/*` instead of `custom/public/*`
2022-04-21 01:17:13 +02:00
So for me my directory structure is:
2024-05-03 20:21:29 +02:00
`/var/lib/gitea/custom/public/assets/css/theme-dark-arc.css`
2022-04-21 01:17:13 +02:00
2022-04-21 01:43:15 +02:00
### You can set `config` and `custom-path` values when running gitea as a service:
2022-04-21 01:17:13 +02:00
2022-06-16 20:21:27 +02:00
```shell
sudo nano /etc/systemd/system/gitea.service
2022-04-21 01:17:13 +02:00
2022-06-16 20:21:27 +02:00
ExecStart=/usr/local/bin/gitea web --custom-path /var/lib/gitea/custom --config /var/lib/gitea/custom/conf/app.ini
```
2022-04-21 01:17:13 +02:00
### Organizations:
2022-04-21 01:04:27 +02:00
2022-04-14 04:39:17 +02:00
I created a feature request for a way to disable organizations because I don't use them.
I was promptly told to use css and my request was closed: https://github.com/go-gitea/gitea/issues/19391
This theme hides Organizations using CSS, you can find it at the bottom of the theme:
2022-06-16 20:21:27 +02:00
```css
#dashboard-repo-list > div > div:first-child {
display: none !important;
}
```