Skip to content

Commit

Permalink
Merge pull request #169 from adrinux/issue165-fix-themes
Browse files Browse the repository at this point in the history
Fix for Issue #165 missing themes
  • Loading branch information
DO1JLR authored Jul 23, 2024
2 parents 16df701 + 6ecdeee commit 49224c8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ This is because the Forgejo project maintains both `stable` and `old stable` rel
| variable name | default value | description |
| ------------- | ------------- | ----------- |
| `gitea_show_user_email` | `false` | Do you want to display email addresses ? (true/false) |
| `gitea_theme_default` | `auto` | Default theme |
| `gitea_themes` | `auto,gitea,arc-green` | List of enabled themes |
| `gitea_theme_default` | `gitea-auto` or `forgejo-auto` | Default theme |
| `gitea_themes` | (See `defaults/gitea.yml` or `defaults/forgejo.yml`)| List of enabled themes |
| `gitea_ui_extra_config` | | you can use this variable to pass additional config parameters in the `[ui]` section of the config. |

### UI - Meta ([ui.meta](https://docs.gitea.com/administration/config-cheat-sheet#ui---metadata-uimeta))
Expand Down
5 changes: 5 additions & 0 deletions defaults/forgejo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
gitea_theme_default: "forgejo-auto"
# yamllint disable rule:line-length
gitea_themes: "forgejo-auto,forgejo-light,forgejo-dark,gitea-auto,gitea-light,gitea-dark,forgejo-auto-deuteranopia-protanopia,forgejo-light-deuteranopia-protanopia,forgejo-dark-deuteranopia-protanopia,forgejo-auto-tritanopia,forgejo-light-tritanopia,forgejo-dark-tritanopia"
# yamllint enable rule:line-length
3 changes: 3 additions & 0 deletions defaults/gitea.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
gitea_theme_default: "gitea-auto"
gitea_themes: "gitea-auto,gitea-light,gitea-dark"
2 changes: 0 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ gitea_cors_extra: ''
# UI (ui)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui
gitea_show_user_email: false
gitea_theme_default: 'auto'
gitea_themes: 'auto,gitea,arc-green'
gitea_ui_extra_config: ''

# UI - Metadata (ui.meta)
Expand Down
9 changes: 9 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
ansible.builtin.fail:
msg: "Currently only {{ gitea_supported_forks }} are supported."

- name: Gather Gitea/Forgejo UI Theme variables
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ gitea_fork }}.yml"
paths:
- "defaults"

- name: Gather variables for each operating system
ansible.builtin.include_vars:
file: "{{ lookup('first_found', gitea_variables) }}"
Expand Down

0 comments on commit 49224c8

Please sign in to comment.