From a98ba473673eb54ee50d57149ce0ac6b953e86d2 Mon Sep 17 00:00:00 2001 From: Adrian Simmons Date: Wed, 3 Jul 2024 09:29:05 +0100 Subject: [PATCH] Update theme names. Add fork specific theme vars. Update README --- README.md | 4 ++-- defaults/forgejo.yml | 3 +++ defaults/gitea.yml | 3 +++ defaults/main.yml | 2 -- tasks/main.yml | 9 +++++++++ 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 defaults/forgejo.yml create mode 100644 defaults/gitea.yml diff --git a/README.md b/README.md index 4f56b60..65c189c 100644 --- a/README.md +++ b/README.md @@ -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` | `gitea-auto,gitea-light,gitea-dark` or `forgejo-auto,forgejo-light,forgejo-dark` (plus accessible variants see `defaults/forgejo.yml` for full list)| 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)) diff --git a/defaults/forgejo.yml b/defaults/forgejo.yml new file mode 100644 index 0000000..bc5a46f --- /dev/null +++ b/defaults/forgejo.yml @@ -0,0 +1,3 @@ +--- +gitea_theme_default: "forgejo-auto" +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" diff --git a/defaults/gitea.yml b/defaults/gitea.yml new file mode 100644 index 0000000..d972a5e --- /dev/null +++ b/defaults/gitea.yml @@ -0,0 +1,3 @@ +--- +gitea_theme_default: "gitea-auto" +gitea_themes: "gitea-auto,gitea-light,gitea-dark" diff --git a/defaults/main.yml b/defaults/main.yml index d7483ec..b338783 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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) diff --git a/tasks/main.yml b/tasks/main.yml index 01f1272..ed5cdd7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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) }}"