1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

Merge pull request #169 from adrinux/issue165-fix-themes

Fix for Issue #165 missing themes
This commit is contained in:
L3D 2024-07-23 14:05:53 +02:00 committed by GitHub
commit 49224c8e8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 4 deletions

View file

@ -165,8 +165,8 @@ This is because the Forgejo project maintains both `stable` and `old stable` rel
| variable name | default value | description | | variable name | default value | description |
| ------------- | ------------- | ----------- | | ------------- | ------------- | ----------- |
| `gitea_show_user_email` | `false` | Do you want to display email addresses ? (true/false) | | `gitea_show_user_email` | `false` | Do you want to display email addresses ? (true/false) |
| `gitea_theme_default` | `auto` | Default theme | | `gitea_theme_default` | `gitea-auto` or `forgejo-auto` | Default theme |
| `gitea_themes` | `auto,gitea,arc-green` | List of enabled themes | | `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. | | `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)) ### UI - Meta ([ui.meta](https://docs.gitea.com/administration/config-cheat-sheet#ui---metadata-uimeta))

5
defaults/forgejo.yml Normal file
View file

@ -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
defaults/gitea.yml Normal file
View file

@ -0,0 +1,3 @@
---
gitea_theme_default: "gitea-auto"
gitea_themes: "gitea-auto,gitea-light,gitea-dark"

View file

@ -92,8 +92,6 @@ gitea_cors_extra: ''
# UI (ui) # UI (ui)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui # -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui
gitea_show_user_email: false gitea_show_user_email: false
gitea_theme_default: 'auto'
gitea_themes: 'auto,gitea,arc-green'
gitea_ui_extra_config: '' gitea_ui_extra_config: ''
# UI - Metadata (ui.meta) # UI - Metadata (ui.meta)

View file

@ -18,6 +18,15 @@
ansible.builtin.fail: ansible.builtin.fail:
msg: "Currently only {{ gitea_supported_forks }} are supported." 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 - name: Gather variables for each operating system
ansible.builtin.include_vars: ansible.builtin.include_vars:
file: "{{ lookup('first_found', gitea_variables) }}" file: "{{ lookup('first_found', gitea_variables) }}"