Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom CSS and Custom Themes #7595

Closed
2 of 7 tasks
HarvsG opened this issue Jul 24, 2019 · 3 comments
Closed
2 of 7 tasks

Custom CSS and Custom Themes #7595

HarvsG opened this issue Jul 24, 2019 · 3 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@HarvsG
Copy link
Contributor

HarvsG commented Jul 24, 2019

  • Gitea version (or commit ref): 1.8.2
  • Git version: Na
  • Operating system: Ubuntu 18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

How do I load a custom stylesheet into my Gitea deployment? I have tried putting a styles.css in custom/public/ and custom/public/css/ the only method I have found that works is to place it in the templates which is sub-optimal.

Perhaps the best way to do this would be to allow for a custom/themes/ folder where users could create and share themes, then make the appropriate changes in custom/conf/app.ini and change the default theme.

It looks as if a similar idea was discussed before #56.
...

Edit

A shift+refresh revealed that a new index.css in custom/public/css/ will overwrite the gitea index.css and is helpful for changing some styles. However I am still finding myself running up against the semantic UI css. Which, itself, supports theming

@sapk
Copy link
Member

sapk commented Jul 24, 2019

I think you will find what you need under https://docs.gitea.io/en-us/customizing-gitea/ especially Other additions to the page you can add the custom/templates/custom/header.tmpl to load your css under custom/public/css/style.css that will be available at the path /css/style.css.

@techknowlogick techknowlogick added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Jul 24, 2019
@HarvsG
Copy link
Contributor Author

HarvsG commented Jul 25, 2019

Thank you, this is what I did and it has worked well. Would still be cool to be able to develop whole custom themes that could be user-selectable and shared amongst the community.

@sapk
Copy link
Member

sapk commented Jul 25, 2019

If you want to share you can make a PR and add your css style under the contrib folder.
Being able to extend gitea via plugin (and theme) is a long goal but it need a lot of refactor and there is a lot of issue to be fix before. You can see that gitea still change a lot and for a plugin solution to exist we need to support a stable standard. We are near it because we soon be able to host gitea on a gitea instance and that mean a more stable approach.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

3 participants