From c1e5924f90f70f565583142d275e3e8fc9c69d2e Mon Sep 17 00:00:00 2001 From: Norwin Roosen Date: Fri, 30 Jul 2021 12:10:03 +0200 Subject: [PATCH 1/3] document & simplify deployment as gitea theme --- Gitea/readme.md | 33 +++++++++++++------ ...rn-compiled.css => theme-gitea-modern.css} | 0 ...tea-modern.css => theme-gitea-modern.less} | 0 ...n.user.css => theme-gitea-modern.user.css} | 4 +-- 4 files changed, 25 insertions(+), 12 deletions(-) rename Gitea/{Gitea-modern-compiled.css => theme-gitea-modern.css} (100%) rename Gitea/{Gitea-modern.css => theme-gitea-modern.less} (100%) rename Gitea/{Gitea-modern.user.css => theme-gitea-modern.user.css} (96%) diff --git a/Gitea/readme.md b/Gitea/readme.md index ed500ed..ce3600c 100644 --- a/Gitea/readme.md +++ b/Gitea/readme.md @@ -4,17 +4,30 @@ This style changes the layout of Gitea, and uses Gitea's color variables. It can be used with any theme that changes only colors. -Using -[`Gitea-modern.css`](Gitea-modern.css) -requires a preprocessor that supports CSS nesting, like 'Stylus' (recommended) or 'Less'. +### Disclaimer +**I don't know if everything is properly polished, and the style is still being worked on. If you find an issue with the style, please create an issue. Or if you can fix an issue yourself, create a pull request!** -Or you can use the already compiled version, -[`Gitea-modern-compiled.css`](Gitea-modern-compiled.css) -instead. +### Usage as Gitea theme +To install the theme for all Gitea users: -When making contributions, don't use the compiled version. +1. Download the [`theme-gitea-modern.css` file][theme-file] and add it to your custom folder in `$GITEA_CUSTOM/public/css/` ([learn how to find that directory][doc-dir]). + - The path has changed in Gitea 1.15, there the file needs to be placed in `$GITEA_CUSTOM/public/assets/css` +2. Adapt your `app.ini` to make it the default theme or be user-selectable: + - To change the default theme, change the value of `DEFAULT_THEME` in the [ui section][doc-config] of `app.ini` to `gitea-modern` -I've never hosted a Gitea instance before so I have no idea how to apply it. -If you use the Stylus browser extension, you can use the [`Gitea-modern.user.css`](https://codeberg.org/Freeplay/CSS-Styles/raw/branch/main/Gitea/Gitea-modern.user.css) file instead to apply to any Gitea instance. + - To make a theme selectable by users in their profile settings, append `,gitea-modern` to the list of `THEMES` in your `app.ini`. +3. Restart Gitea +4. Enjoy :) -**I don't know if everything is properly polished, and the style is still being worked on. If you find an issue with the style, please create an issue. Or if you can fix an issue yourself, create a pull request!** \ No newline at end of file + +### Usage with Stylus +If you use the Stylus browser extension, you can use the [`theme-gitea-modern.user.css`][usertheme-file]) file to apply to any Gitea instance. + +### Contributing +To make changes, always base them on [`theme-gitea-modern.less`](theme-gitea-modern.less), which is written for any CSS preprocessor that supports CSS nesting, like 'Stylus' (recommended) or 'Less'. +When making contributions, don't use the compiled version for your changes. + +[theme-file]: https://codeberg.org/Freeplay/CSS-Styles/raw/branch/main/Gitea/theme-gitea-modern.css +[usertheme-file]: https://codeberg.org/Freeplay/CSS-Styles/raw/branch/main/Gitea/theme-gitea-modern.user.css +[doc-config]: https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui +[doc-dir]: https://docs.gitea.io/en-us/faq/#where-does-gitea-store-what-file diff --git a/Gitea/Gitea-modern-compiled.css b/Gitea/theme-gitea-modern.css similarity index 100% rename from Gitea/Gitea-modern-compiled.css rename to Gitea/theme-gitea-modern.css diff --git a/Gitea/Gitea-modern.css b/Gitea/theme-gitea-modern.less similarity index 100% rename from Gitea/Gitea-modern.css rename to Gitea/theme-gitea-modern.less diff --git a/Gitea/Gitea-modern.user.css b/Gitea/theme-gitea-modern.user.css similarity index 96% rename from Gitea/Gitea-modern.user.css rename to Gitea/theme-gitea-modern.user.css index 55e1b86..2d07cad 100644 --- a/Gitea/Gitea-modern.user.css +++ b/Gitea/theme-gitea-modern.user.css @@ -28,5 +28,5 @@ @-moz-document domain("codeberg.org"), domain("gitea.com"), domain("try.gitea.io"), domain("gitdab.com"), domain("git.fsfe.org"), domain("git.passageenseine.fr"), domain("dev.sum7.eu") { - @import url("https://codeberg.org/Freeplay/CSS-Styles/raw/branch/main/Gitea/Gitea-modern-compiled.css"); -} \ No newline at end of file + @import url("https://codeberg.org/Freeplay/CSS-Styles/raw/branch/main/Gitea/theme-gitea-modern.css"); +} From 473cb4b45c9f19bf652543407a45515e393b7625 Mon Sep 17 00:00:00 2001 From: Norwin Roosen Date: Fri, 30 Jul 2021 12:11:47 +0200 Subject: [PATCH 2/3] fix syntax error --- Gitea/theme-gitea-modern.less | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Gitea/theme-gitea-modern.less b/Gitea/theme-gitea-modern.less index 8cff797..f9c0358 100644 --- a/Gitea/theme-gitea-modern.less +++ b/Gitea/theme-gitea-modern.less @@ -28,8 +28,7 @@ a[rel*="nofollow"]:not(.ui), .link:not(.ui) { } .ui.button, .ui.basic.button, .ui.menu, .input.action.fluid, .ui.label, .ui.form input:not([type]), .ui.form input[type="date"], .ui.form input[type="datetime-local"], .ui.form input[type="email"], .ui.form input[type="file"], .ui.form input[type="number"], .ui.form input[type="password"], .ui.form input[type="search"], .ui.form input[type="tel"], .ui.form input[type="text"], .ui.form input[type="time"], .ui.form input[type="url"], -.ui.table, .tab-size-8, -{ +.ui.table, .tab-size-8 { border-radius: var(--base-border-radius); } .ui.menu > .item:first-child, From 5b99a60c2ff2890f4d38a5961e0f67836fc0fa91 Mon Sep 17 00:00:00 2001 From: Norwin Roosen Date: Sat, 31 Jul 2021 17:38:26 +0200 Subject: [PATCH 3/3] less -> styl --- Gitea/readme.md | 2 +- Gitea/{theme-gitea-modern.less => theme-gitea-modern.styl} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Gitea/{theme-gitea-modern.less => theme-gitea-modern.styl} (100%) diff --git a/Gitea/readme.md b/Gitea/readme.md index ce3600c..9d40fbf 100644 --- a/Gitea/readme.md +++ b/Gitea/readme.md @@ -24,7 +24,7 @@ To install the theme for all Gitea users: If you use the Stylus browser extension, you can use the [`theme-gitea-modern.user.css`][usertheme-file]) file to apply to any Gitea instance. ### Contributing -To make changes, always base them on [`theme-gitea-modern.less`](theme-gitea-modern.less), which is written for any CSS preprocessor that supports CSS nesting, like 'Stylus' (recommended) or 'Less'. +To make changes, always base them on [`theme-gitea-modern.styl`](theme-gitea-modern.styl), which is written for any CSS preprocessor that supports CSS nesting, like 'Stylus' (recommended) or 'Less'. When making contributions, don't use the compiled version for your changes. [theme-file]: https://codeberg.org/Freeplay/CSS-Styles/raw/branch/main/Gitea/theme-gitea-modern.css diff --git a/Gitea/theme-gitea-modern.less b/Gitea/theme-gitea-modern.styl similarity index 100% rename from Gitea/theme-gitea-modern.less rename to Gitea/theme-gitea-modern.styl