Customize gerrit home page:logo and color

2020-08-01 05:50发布

问题:

I have installed and configured gerrit, I see it has white color background instead of green like https://codereview.qt-project.org (probably changed from green to white in recent versions) but, want to know if we can customize color and add a logo.

From gerrit-documentation I see we have to create below files and place them in $site_path/etc/ but, I am not sure how to create them, I am bad in HTML.

$site_path/etc/GerritSiteHeader.html and 
$site_path/etc/GerritSiteFooter.html
$site_path/etc/GerritSite.css
$site_path/static/logo.png
  1. Is it possible to change the color of gerrit pages, I mean from default white to any other?

  2. Please provide me the sample GerritSiteHeader.html and GerritSiteFooter.html so that I can make changes to them and use in my gerrit. I haven't used HTML before.

回答1:

  1. There are couple of settings to change colors in gerrit.conf: theme settings.
  2. An example for our theme files we are using on review.typo3.org: GerritSiteHeader.html:

    <h2 class="typo3-logo">
    <a href="/"><img src="/static/typo3-logo.cache.png" alt="TYPO3" /></a>
    </h2>
    

I won't paste our CSS file (GerritSite.css), as it won't help you a lot.

If you write down, what you want to put in the header or footer, one can help you. But when you say you don't know HTML (it's very easy..) and don't say, what you want, it's hard to tell you the exact soluation. I at least hope that https://review.typo3.org gives you an impression, how you can customize it. Finding somebody to write you 5 lines of HTML or CSS should be easy.



标签: gerrit