All Projects → pat-s → gitea-github-theme

pat-s / gitea-github-theme

Licence: MIT license
Opinionated GitHub-based light and dark themes for Gitea

Programming Languages

CSS
56736 projects

Projects that are alternatives of or similar to gitea-github-theme

nebula
Source Code for the Home Server setup.
Stars: ✭ 48 (-33.33%)
Mutual labels:  gitea
emrah-buster-templates
The templates of the emrah-buster installer.
Stars: ✭ 57 (-20.83%)
Mutual labels:  gitea
MigrateGitlabToGogs
Migrate repositories from Gitlab to Gogs or Gitea
Stars: ✭ 49 (-31.94%)
Mutual labels:  gitea
swingletree
☔ Integrate and observe the results of your CI/CD pipeline tools
Stars: ✭ 14 (-80.56%)
Mutual labels:  gitea
gitea-buildkite-connector
Connect Gitea & Buildkite
Stars: ✭ 16 (-77.78%)
Mutual labels:  gitea
Gitea
Git with a cup of tea, painless self-hosted git service
Stars: ✭ 27,320 (+37844.44%)
Mutual labels:  gitea
go-scm
Package scm provides a unified interface to multiple source code management systems.
Stars: ✭ 117 (+62.5%)
Mutual labels:  gitea
gitea-auto-update
A script which can update gitea via crontab automatically to a new version.
Stars: ✭ 25 (-65.28%)
Mutual labels:  gitea
infrastructure
Deprecated due to new Gitea.com infra
Stars: ✭ 14 (-80.56%)
Mutual labels:  gitea
go-sdk
Gitea: Golang SDK, moved to https://gitea.com/gitea/go-sdk
Stars: ✭ 28 (-61.11%)
Mutual labels:  gitea
your own git
Your own git server, not Microsoft's
Stars: ✭ 34 (-52.78%)
Mutual labels:  gitea
Gigrator
Git repos migration tool which supports Github / Gitee / Gitlab / Gitea / Coding / Gogs / 腾讯工蜂.
Stars: ✭ 34 (-52.78%)
Mutual labels:  gitea
gitlab to gitea
Gitlab to Gitea migration script.
Stars: ✭ 54 (-25%)
Mutual labels:  gitea
crumpets
🍵🥐 Tools to Work with and Manage 'gitea' in R
Stars: ✭ 13 (-81.94%)
Mutual labels:  gitea
Attribouter
A lightweight "about screen" library to allow quick but customizable attribution in Android apps.
Stars: ✭ 117 (+62.5%)
Mutual labels:  gitea

gitea-github-theme

Opinionated GitHub-based light and dark themes for Gitea including an automatic theme switch option.

Created and tested with Gitea v1.15 - 1.17. The theme might work with future versions though Gitea devs might change some CSS classes in the meantime and things might potentially look odd - just try yourself :)

I might update the theme over time to fix oversights and other issues - no guarantee though.

Installation

  1. If you do not have admin access to a Gitea instance, you can use the Stylus browser extension and use the CSS provided in this repo for the Gitea URL
  2. If you are an admin and want to make this theme available to all users:
    1. Put theme-github.css into $GITEA_PUBLIC/public/css/theme-github.css where $GITEA_PUBLIC is the "CustomPath" of your instance reported by gitea help.
    2. Add github to the comma-separated list in the setting THEMES in app.ini
    3. Now users can select this theme in their settings under "account"
    4. (optional) If you want to make this theme the default of your instance, set it in DEFAULT_THEME in app.ini

Using automatic theme switching based on system preference

To use automatic theme switching, add theme-github-auto.css into your respective themes folder as described above. This file contains both light and dark styles and selects the respective one based on the system preference selected by the user via the @media (prefers-color-scheme: CSS selector (tested on macOS).

For some reasons using @imports does not work and hence the file contains the c/p content of both the light and dark themes together. If this is somehow possible and I did not managed to get it configured, please let me know!

Changes to default Gitea theme

  • Aligned primary green, grey, red and blue colors with GitHub
  • Aligned border-radius with GitHub
  • Related theme by removing a lot of hover colors and dominant button background-colors
  • Aligned markup background to GitHub's value
  • Decreased navbar height and font size
  • Many small overrides of colors and font-sizes

Helm chart instructions

To use custom themes with the Gitea helm chart:

  1. Create a secret containing the CSS files (here's an example via terraform, plain k8s secrets will also work)
resource "kubernetes_secret" "gitea-themes" {
  metadata {
    name      = "gitea-themes"
    namespace = "gitea"
  }

  data = {
    "theme-github.css"      = "${file("files/gitea/gitea-github-theme-light.css")}"
    "theme-github-dark.css" = "${file("files/gitea/gitea-github-theme-dark.css")}"
    "theme-github-auto.css" = "${file("files/gitea/gitea-github-theme-auto.css")}"
  }

  type = "Opaque"
}
  1. Mount the secret via extraVolumes in values.yaml:
extraVolumes:
  - name: gitea-themes
    secret:
      secretName: gitea-themes
  1. Add the theme options into the config in values.yaml:
gitea:
  config:
    ui:
      DEFAULT_THEME: github-auto
      THEMES: auto,gitea,arc-green,github,github-dark,github-auto

Screenshots

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].