- CSS 100%
|
|
||
|---|---|---|
| img | ||
| LICENSE | ||
| README.md | ||
| theme-oxocarbon.css | ||
Oxocarbon Theme for Forgejo
Oxocarbon is a sleek, modern dark theme for Forgejo, inspired by IBM's Carbon Design System and specifically tailored to match the aesthetics of the Oxocarbon color scheme. This theme enhances the user interface with a consistent, visually appealing look that aligns with the design principles of the Carbon Design System.
Table of Contents
Installation
Prerequisites
- Forgejo instance running v8.0.2 or later.
- Access to the server's file system to add custom theme files.
Step-by-Step Guide
For Standard Installations
-
Download the Theme Files
Clone or download the theme files from the repository:
# https clone git clone https://codeberg.org/bipp/oxocarbon-forgejo.git # ssh clone git clone git@codeberg.org:bipp/oxocarbon-forgejo.git -
Locate the Custom Theme Directory
Navigate to your Gitea custom configuration directory. By default, this is usually located at:
/var/lib/gitea/custom/If you have configured a different
CUSTOM_PATH, use that path instead. -
Create Theme Directories
Inside the
customdirectory, create the following subdirectories if they don't already exist:mkdir -p public/css/themes mkdir -p templates -
Copy the Theme CSS File
Copy the
theme-oxocarbon.cssfile into thepublic/css/themesdirectory:cp oxocarbon-forgejo/theme-oxocarbon.css /var/lib/gitea/custom/public/css/themes/ -
Restart Forgejo
Restart the Forgejo service to apply the changes:
sudo systemctl restart forgejo -
Select the Oxocarbon Theme
Log in to your Forgejo instance, navigate to your user settings, and select oxocarbon from the list of available themes.
For Docker Installations
If you're running Forgejo within a Docker container, the steps are similar, but the file paths will be different. The /data directory inside the container is typically mounted to a local directory on your host machine. Replace /var/lib/gitea with your local mount point.
-
Download the Theme Files
Clone or download the theme files from the Codeberg repository:
git clone https://codeberg.org/bipp/oxocarbon-forgejo.git -
Locate the Custom Theme Directory
Navigate to your Forgejo data directory on the host machine. This is the directory you have mounted to
/datainside the Docker container. For example:/path/to/your/forgejo/data -
Create Theme Directories
Inside the
datadirectory, create the following subdirectories if they don't already exist:mkdir -p custom/public/css/themes mkdir -p custom/templates -
Copy the Theme CSS File
Copy the
theme-oxocarbon.cssfile into thecustom/public/css/themesdirectory:cp oxocarbon-forgejo/theme-oxocarbon.css /path/to/your/gitea/data/custom/public/css/themes/ -
Restart the Forgejo Container
Restart your Forgejo Docker container to apply the changes:
docker restart forgejo_container_nameOr restart the Forgejo Docker stack:
docker compose down && docker compose up -d -
Select the Oxocarbon Theme
Log in to your Forgejo instance, navigate to your user settings, and select oxocarbon from the list of available themes.
Setting as Default Theme
To set Oxocarbon as the default theme for all users:
-
Edit the
app.iniConfiguration File-
Standard Installations:
Locate and open your
app.inifile, typically found at/etc/gitea/app.inior/var/lib/gitea/custom/conf/app.ini. -
Docker Installations:
The
app.inifile is located inside your Forgejo data directory on the host machine:/path/to/your/forgejo/data/gitea/conf/app.ini
-
-
Update the UI Theme Settings
Under the
[ui]section, setDEFAULT_THEMEtooxocarbon:[ui] DEFAULT_THEME = oxocarbon -
Restart Forgejo
-
Standard Installations:
Apply the changes by restarting the Forgejo service:
sudo systemctl restart forgejo -
Docker Installations:
Restart your Forgejo Docker container:
docker restart forgejo_container_nameOr restart your Forgejo Docker stack:
docker compose down && docker compose up -d
-
Now, all users will see the Oxocarbon theme by default when they visit your Forgejo instance.
Acknowledgments
- This theme is based on the Gitea Dark Theme.
- The Oxocarbon theme was created with the assistance of ChatGPT o1-preview, with minor tweaking from the author to ensure compatibility and adherence to the Carbon Design System's principles (separate of the code-viewer, which uses the code-editor's background for consistency in viewing/editing code).
- Special thanks to the Forgejo community for their continuous support and contributions.
License
This project is licensed under the GNU GPL-v3.0 License. See the LICENSE file for details.
Note: This theme is not an official Forgejo product. It is an independent project aimed at enhancing the user experience by providing an alternative dark theme option.
