roles-ansible / ansible_role_gitea

Ansible role to configure and deploy gitea and forgejo, a painless self-hosted Git service.
BSD 3-Clause "New" or "Revised" License
57 stars 31 forks source link

Forgejo installs now have theme issues, lack theming #165

Open adrinux opened 3 months ago

adrinux commented 3 months ago

I've been having issues with the theme on my Forgejo installs and have just figured out why.

(I note https://git.l3d.ch/ appears to show the same issue.)

I left the gitea_theme_default and gitea_themes undefined in my vars and just fell back onto the defaults defined by this role:

  gitea_theme_default: auto
  gitea_themes: auto,gitea,arc-green

But Forgejo no longer seems to provide gitea or arc-green themes in the default install and the default auto theme is now called forgejo-auto. There seems to be some theming if you leave everything as default but change the settings > appearance to one of those themes and there is now way to get back to a working theme (except presumably editing your account settings in the database..).

The solution was to define those two vars in my setup and rerun the role.

  gitea_theme_default: forgejo-auto
  gitea_themes: forgejo-auto

Then go to settings > appearance and set the theme to forgejo-auto.

Another fix that needs documenting? Also relevant to issue #147 I think.

andrew-aiken commented 3 months ago

The current default theme names are incorrect in the role. I switched them out the following and now it uses the default gitea themes.

gitea_theme_default: gitea-auto
gitea_themes: gitea-auto

https://docs.gitea.com/administration/customizing-gitea

adrinux commented 3 months ago

Ah yes, and Forgejo still ships the Gitea themes as well as Forgejo variants, so that's a sensible fix. I can work up a pull request unless someone beats me too it...

The full list of Forgejo default themes, including several colourblind friendly variants can be found here.

carranzamarioagustin commented 2 months ago

I can reproduce the lack of theming on Gitea as well as Forgejo.

adrinux commented 2 months ago

Untested as yet, but WIP using Jinja2 if statement to customize theme vars in my fork.

Edit: Well that was a stupid idea, but I now have a working attempt. Pull request on the way.

adrinux commented 2 months ago

@carranzamarioagustin Can you test my suggested changes in Gitea? This Pull request works well with Forgejo but I have no testing setup for Gitea.