Compare commits
	
		
			10 Commits
		
	
	
		
			14335dce97
			...
			63b626845d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						63b626845d
	
				 | 
					
					
						|||
| 
						 | 
					3bb00e9c8a | ||
| 
						 | 
					974d4e3304 | ||
| 
						 | 
					5014b7d0aa | ||
| 
						 | 
					d41573fb0f | ||
| 
						 | 
					c451fefe58 | ||
| 
						 | 
					6b55736d6c | ||
| 
						 | 
					9f36d3f154 | ||
| 
						 | 
					7c3ba98a29 | ||
| 
						 | 
					d77b911846 | 
							
								
								
									
										45
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								README.md
									
									
									
									
									
								
							@@ -2,8 +2,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
**Opinionated** GitHub-based light and dark themes for Gitea including an automatic theme switch option.
 | 
					**Opinionated** GitHub-based light and dark themes for Gitea including an automatic theme switch option.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Created and tested with Gitea v1.15 - 1.17.
 | 
					Tested with Gitea v1.20.
 | 
				
			||||||
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 :)
 | 
					Older Gitea versions can use previous releases from this repo.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
I might update the theme over time to fix oversights and other issues - no guarantee though.
 | 
					I might update the theme over time to fix oversights and other issues - no guarantee though.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -11,7 +11,7 @@ I might update the theme over time to fix oversights and other issues - no guara
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
1. If you do not have admin access to a Gitea instance, you can use the [Stylus](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne/related) browser extension and use the CSS provided in this repo for the Gitea URL
 | 
					1. If you do not have admin access to a Gitea instance, you can use the [Stylus](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne/related) 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:
 | 
					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`.
 | 
					   1. Put `theme-github.css` into `$GITEA_PUBLIC/public/assets/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`
 | 
					   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"
 | 
					   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`
 | 
					   4. (optional) If you want to make this theme the default of your instance, set it in `DEFAULT_THEME` in `app.ini`
 | 
				
			||||||
@@ -37,7 +37,8 @@ If this is somehow possible and I did not managed to get it configured, please l
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
To use custom themes with the [Gitea helm chart](https://gitea.com/gitea/helm-chart):
 | 
					To use custom themes with the [Gitea helm chart](https://gitea.com/gitea/helm-chart):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. Create a secret containing the CSS files (here's an example via `terraform`, plain k8s secrets will also work)
 | 
					1. Configure the [http](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) provider
 | 
				
			||||||
 | 
					2. Create a secret containing the CSS files (here's an example via `terraform`, plain k8s secrets will also work)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```hcl
 | 
					```hcl
 | 
				
			||||||
resource "kubernetes_secret" "gitea-themes" {
 | 
					resource "kubernetes_secret" "gitea-themes" {
 | 
				
			||||||
@@ -47,16 +48,42 @@ resource "kubernetes_secret" "gitea-themes" {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  data = {
 | 
					  data = {
 | 
				
			||||||
    "theme-github.css"      = "${file("files/gitea/gitea-github-theme-light.css")}"
 | 
					    "theme-github.css"      = data.http.gitea-theme-light.body
 | 
				
			||||||
    "theme-github-dark.css" = "${file("files/gitea/gitea-github-theme-dark.css")}"
 | 
					    "theme-github-dark.css" = data.http.gitea-theme-dark.body
 | 
				
			||||||
    "theme-github-auto.css" = "${file("files/gitea/gitea-github-theme-auto.css")}"
 | 
					    "theme-github-auto.css" = data.http.gitea-theme-auto.body
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  type = "Opaque"
 | 
					  type = "Opaque"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					data "http" "gitea-theme-light" {
 | 
				
			||||||
 | 
					  url = "https://codeberg.org/pat-s/gitea-github-theme/raw/branch/main/theme-github.css"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  request_headers = {
 | 
				
			||||||
 | 
					    Accept = "application/json"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					data "http" "gitea-theme-dark" {
 | 
				
			||||||
 | 
					  url = "https://codeberg.org/pat-s/gitea-github-theme/raw/branch/main/theme-github-dark.css"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  request_headers = {
 | 
				
			||||||
 | 
					    Accept = "application/json"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					data "http" "gitea-theme-auto" {
 | 
				
			||||||
 | 
					  url = "https://codeberg.org/pat-s/gitea-github-theme/raw/branch/main/theme-github-auto.css"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  request_headers = {
 | 
				
			||||||
 | 
					    Accept = "application/json"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2. Mount the secret via `extraVolumes` in `values.yaml`:
 | 
					3. Mount the secret via `extraVolumes` in `values.yaml`:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yml
 | 
					```yml
 | 
				
			||||||
extraVolumes:
 | 
					extraVolumes:
 | 
				
			||||||
@@ -65,7 +92,7 @@ extraVolumes:
 | 
				
			|||||||
      secretName: gitea-themes
 | 
					      secretName: gitea-themes
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
3. Add the theme options into the config in `values.yaml`:
 | 
					4. Add the theme options into the config in `values.yaml`:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yml
 | 
					```yml
 | 
				
			||||||
gitea:
 | 
					gitea:
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 233 KiB  | 
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user