Gitea: Allow custom CSS to be appended to Gitea

Created on 17 Jan 2017  路  9Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.0.1
  • Git version: 2.9.3
  • Operating system: Alpine Linux
  • Database (use [x]):

    • [ ] PostgreSQL

    • [ ] MySQL

    • [X] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [ ] No

    • [X] Not relevant

Description

I have a Gitea server. I would like to be able to append custom CSS to the page to make small changes, such as the size of the buttons, and padding on certain elements. Sometimes, I want to make other small changes. I would like a way CSS can be injected from a file to the end of the page, so I can do this quickly, and without rebuilding Gitea after patching it with my CSS.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

kinfeature

Most helpful comment

Implemented by #3051

All 9 comments

As of today if you build from source without the bindata tag you can use custom templates which in this case would get you what you want. Once you've compiled the code without bindata you'll be able to update the CSS whenever you want.

EDIT: as a reference you can check out this existing issue: https://github.com/go-gitea/gitea/issues/529

I already know about bindata, but I require bindata at the moment. Also, if I modify the original CSS, I cannot update without losing my changes.

I am asking about a file which gitea would append CSS from automatically, even with bindata.

With custom templates you can add additional css files, but there is currently an open issue related to that.

A pr for custom public data have been merged, hopefully I can fix custom templates as well soon

@tboerger I have opened pull request #784. This builds on your work on #782 to allow custom css without overriding the whole gitea stylesheet.

+1 ?

Pulling out the head.tmpl is getting more complicated with each release.

Pulling out the head.tmpl is getting more complicated with each release.

Just use this custom template: https://github.com/go-gitea/gitea/blob/master/templates/base/head.tmpl#L130

I think this can be closed already as we provide custom block to be added in head

Implemented by #3051

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cookiengineer picture cookiengineer  路  3Comments

lunny picture lunny  路  3Comments

BNolet picture BNolet  路  3Comments

jakimfett picture jakimfett  路  3Comments

internalfx picture internalfx  路  3Comments