Hi Dave, others,
I am looking into options how to adapt the gitiles' look to our company's look.
Ideally, I'd add a CSS to override the styles that need to be tweaked.
We plan to run gitiles using the the gerrit-gitiles plugin (which we forked). In the plugin it seems to be possible to register a CSS programatically using
BaseServlet.putSoyData(req, "css", sinletonList(<my css>)) …
Would there be an easier option?
Moreover, I'd like to exchange the default header by a custom header.
This seems to be possible somehow using the "headerVariant" parameter of the soy templates. But so far I wasn't able to figure out how to properly use this parameter. Should I add my own template for my custom header and refer to it's variant name using the "headerVariant" parameter?
-Adrian
[gitiles]
customTemplates = path-to-soy-file
[template]
customHeader = <your-variant>On Thu, Oct 15, 2015 at 8:10 AM, Goerler, Adrian <adrian....@sap.com> wrote:Hi Dave, others,
I am looking into options how to adapt the gitiles' look to our company's look.
Ideally, I'd add a CSS to override the styles that need to be tweaked.
We plan to run gitiles using the the gerrit-gitiles plugin (which we forked). In the plugin it seems to be possible to register a CSS programatically using
BaseServlet.putSoyData(req, "css", sinletonList(<my css>)) …If you want to replace the base stylesheet instead of adding another one (which might require overriding with !important or whatever), you can pass the gitiles.BASE_CSS_URL key in the globals map in the constructor to Renderer. But that just tells it to stick that URL in the output HTML; you'd still be responsible for ensuring the stylesheet actually gets served up at the right location.Would there be an easier option?There is not an option that is not programmatic, if that's what you're asking. Although I wouldn't object to adding a configuration in gitiles.config for that.