Merge "gerrit: update OpenDev theme CSS installation"

This commit is contained in:
Zuul 2023-04-28 16:42:54 +00:00 committed by Gerrit Code Review
commit 5a96a4c70b

View File

@ -17,23 +17,17 @@
'use strict';
const openDevThemeStyle = document.createElement('dom-module');
openDevThemeStyle.innerHTML = `
<template>
<style>
html {
--header-title-content: "OpenDev";
--header-icon: url("/static/opendev-sm.png");
--header-background-color: var(--background-color-primary);
--header-icon-size: 1.2em;
--header-border-bottom: 1px solid;
--header-border-image: linear-gradient(to right, #ee265e, #f9b8cb, #ee265e) 1;
}
</style>
</template>
`;
openDevThemeStyle.register('opendev-site-theme');
Gerrit.install(plugin => {
plugin.registerStyleModule('app-theme', 'opendev-site-theme');
const styleEl = document.createElement('style');
styleEl.innerHTML = `
html {
--header-title-content: "OpenDev";
--header-icon: url("/static/opendev-sm.png");
--header-background-color: var(--background-color-primary);
--header-icon-size: 1.2em;
--header-border-bottom: 1px solid;
--header-border-image: linear-gradient(to right, #ee265e, #f9b8cb, #ee265e) 1;
}
`;
document.head.appendChild(styleEl);
});