4 Commits

Author SHA1 Message Date
Ian Wienand
7b6125aace
gerrit: update OpenDev theme CSS installation
registerStyleModule has been deprecated for a few releases, and is
removed in 3.8.  This inserts the style element directly, as suggested
by the Gerrit plugin documentation [1].

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/3.7.2/pg-plugin-dev.html#low-level-style

Change-Id: I23600754dc35a9d455e611ac25a6162b2e973a03
2023-04-27 13:26:03 +10:00
Ian Wienand
6e232716e7 gerrit: update theme to javascript plugin
Gerrit 3.4 deprecates HTML-based plugins, so the old theme doesn't
work.  I have reworked this into a javascript plugin.

This should look the same, although I've achieved things in different
ways.

This doesn't register light and dark variants; since
background-primary-color is white, by setting the
header-background-color to this we get white behind the header bar,
and it correctly switches to the default black(ish) when in dark mode
(currently its seems the header doesn't obey dark mode, so this is an
improvement).

I'm not sure what's going on with the extant header-border-image which
is a linear gradient all of the same color.  I modified this down to
1px (same as default) and made it fade in-and-out of the logo colour,
just for fun.

Change-Id: Ia2e32731c1cfe97639de2ec0e7660c7ed583e045
2021-11-04 18:45:18 +11:00
Ian Wienand
f19e41e893 gerrit: host logo in static files
Instead of using the opendev.org/... logo file, host a copy from
gerrit's static location and use that.  This isolates us from changes
to the way gitea serves its static assets.

Change-Id: I8ffb47e636a59e5ecc3919cc7a16d93de3eae08d
2021-09-17 12:35:12 +10:00
Ian Wienand
791d09be46 gerrit: copy theme plugin from plugins/
This is a minor refactor to make a follow-on that copies static files
more logical.

Change-Id: Id31106a875926dd4eca31972b1fc52a1cd0b67bd
2021-09-17 12:35:12 +10:00