Commit 0df4711d authored by Stephan Großberndt's avatar Stephan Großberndt
Browse files

[TASK] Updated theme for Gerrit v3.2

- added support of TYPO3-theme for dark-mode
- smaller TYPO3 logo in login screen
- improved SVG of logo
parent 6069b1d3
......@@ -16,14 +16,15 @@ body {
}
#login_form:before {
background-image: url(/static/typo3_11562277385.cache.svg);
background-image: url(/static/typo3_logo_1604607499.cache.svg);
background-repeat: no-repeat;
background-position: center center;
content: "";
position: absolute;
top: 0;
height: 168px;
width: 350px
top: 50px;
left: 87px;
width: 250px;
height: 70px;
}
#login_form table {
......
<!--
Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Implemented with help of
https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/refs/heads/production/modules/gerrit/files/homedir/review_site/static/gerrit-theme.html
https://gerrit-review.googlesource.com/Documentation/pg-plugin-dev.html
https://gerrit-review.googlesource.com/Documentation/config-themes.html
-->
<script>
var doc = document.querySelector("footer.style-scope.gr-app div.style-scope.gr-app");
if (doc) {
appendLink('https://typo3.org/legal-notice/', 'Legal Notice',);
appendLink('https://typo3.org/privacy-policy', 'Privacy Policy',);
}
function appendLink(url, text) {
var a = document.createElement('a');
var linkText = document.createTextNode(text);
a.appendChild(linkText);
a.href = url;
a.target = '_blank';
a.className = 'style-scope gr-app';
a.rel = 'noopener';
var seperator = document.createTextNode(" | ");
doc.appendChild(seperator);
return doc.appendChild(a);
}
</script>
<dom-module>
<dom-module id="typo3-styles">
<script>
Gerrit.install(plugin => {
Gerrit.install(function (plugin) {
plugin.registerStyleModule('app-theme-light', 'typo3-light-style');
plugin.registerStyleModule('app-theme', 'typo3-common-style');
plugin.registerCustomComponent('footer-left', 'typo3-custom-links');
});
</script>
<style>
.gr-app-0 gr-main-header.gr-app {
background-color: white;
padding: 0 0.5em;
border-width: 0 0 3px 0;
border-style: solid;
border-bottom: 0;
box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.075), 0 0 2px rgba(0, 0, 0, 0.2);
}
</dom-module>
<dom-module id="typo3-light-style">
<template>
<style>
html {
--header-background-color: white;
}
</style>
</template>
</dom-module>
.gr-main-header-0 .titleText.gr-main-header::after {
content: "";
}
<dom-module id="typo3-common-style">
<template>
<style>
html {
--border-width: 0 0 3px 0;
--border-style: solid;
--header-box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.075), 0 0 2px rgba(0, 0, 0, 0.2);
}
</style>
</template>
</dom-module>
.gr-main-header-0 .titleText.gr-main-header::before {
background: no-repeat url(/static/typo3_11562277385.cache.svg);
background-size: 4em 1.8em;
height: 1.8em;
width: 4em;
}
<dom-module id="typo3-custom-links">
<template>
<style>
a {
color: var(--link-color);
}
</style>
| <a href="https://typo3.org/legal-notice/">Legal Notice</a>
| <a href="https://typo3.org/privacy-policy">Privacy Policy</a>
</template>
<script>
Polymer({is: 'typo3-custom-links'});
</script>
</dom-module>
</style>
</dom-module>
\ No newline at end of file
<dom-module id="typo3-header-logo">
<script>
Gerrit.install(plugin => {
const domHook = plugin.hook('header-title', {replace: true});
domHook.onAttached(element => {
const el = element.appendChild(document.createElement('div'));
el.title = 'TYPO3 Code Review';
const logo_name = window.localStorage.getItem('dark-theme') ? 'typo3_logo_dark_1604607499.cache.svg' : 'typo3_logo_1604607499.cache.svg';
el.style.cssText = 'height: 1.8em; width: 4em; background: url(/static/' + logo_name + ') no-repeat left top / 4em 1.8em;';
});
});
</script>
</dom-module>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 303.05 84.17" style="enable-background:new 0 0 303.05 84.17;" xml:space="preserve">
<style type="text/css">
.st0{fill:#f49800;}
</style>
<g>
<g>
<polygon points="99.94,28.37 113.57,28.37 113.57,83.56 121.26,83.56 121.26,28.37 134.88,28.37 134.88,21.65 99.94,21.65 "/>
<polygon points="158.9,46.67 147.23,21.65 138.74,21.65 154.57,54.81 154.57,83.56 162.53,83.56 162.53,54.81 178.63,21.65
170.57,21.65 "/>
<path d="M247.43,21.03c-14.59,0-18.48,10.08-18.48,30.87c0,21.66,3.89,32.27,18.48,32.27c14.59,0,18.48-10.61,18.48-32.27
C265.91,31.11,262.02,21.03,247.43,21.03z M247.43,77.72c-7.95,0-10.61-6.38-10.61-25.38c0-19.46,2.66-24.86,10.61-24.86
s10.61,5.4,10.61,24.86C258.04,71.35,255.39,77.72,247.43,77.72z"/>
<path d="M295.18,51.11c4.69-1.69,6.82-6.99,6.82-13c0-13.18-5.23-17.08-14.33-17.08c-4.5,0-9.73,1.33-10.7,1.51v6.45
c2.56-0.53,6.99-1.51,10.88-1.51c4.42,0,6.62,2.83,6.62,9.82c0,3.53-0.34,10.87-7.52,10.87h-6.36v6.46h7.26
c6.28,0,7.6,4.25,7.6,12.29c0,6.82-2.93,10.64-7.43,10.64c-3.9,0-9.37-0.91-11.5-1.35v6.44c0.81,0.19,7.26,1.51,11.59,1.51
c9.82,0,14.94-4.94,14.94-18.13C303.05,57.38,300.58,51.46,295.18,51.11z"/>
<path d="M202.33,21.03c-7.34,0-14.96,0.63-14.96,0.63v61.91h7.7V60.21h7.43c12.56,0,17.16-6.55,17.16-19.99
C219.66,29.34,215.77,21.03,202.33,21.03z M203.38,53.75h-8.31V27.93c0,0,3.45-0.53,8.31-0.53c6.28,0,8.41,4.59,8.41,13.44
C211.79,50.48,208.34,53.75,203.38,53.75z"/>
</g>
<g>
<path class="st0" d="M32.94,8.72c0-4.58,1.08-6.1,2.61-7.42C22.46,2.83,6.76,7.63,1.74,13.74C0.66,15.27,0,17.66,0,20.72
c0,19.41,20.72,63.46,35.33,63.46c6.76,0,18.16-11.11,27.54-26.17c-1.25,0.37-2.24,0.51-3.55,0.51
C48.63,58.51,32.94,21.15,32.94,8.72z"/>
<path class="st0" d="M56.05,0c-5.67,0-7.85,1.09-7.85,6.76c0,12.43,11.12,37.3,20.07,37.3c5.01,0,14.83-18.76,14.83-34.25
C83.1,2.18,69.57,0,56.05,0z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 303.05 84.17"
style="enable-background:new 0 0 303.05 84.17;" xml:space="preserve">
<style type="text/css">
#logo * {fill: #f49800}
</style>
<g>
<g id="letters">
<polygon points="99.94,28.37 113.57,28.37 113.57,83.56 121.26,83.56 121.26,28.37 134.88,28.37 134.88,21.65 99.94,21.65"/>
<polygon points="158.9,46.67 147.23,21.65 138.74,21.65 154.57,54.81 154.57,83.56 162.53,83.56 162.53,54.81 178.63,21.65 170.57,21.65"/>
<path d="M247.43,21.03c-14.59,0-18.48,10.08-18.48,30.87c0,21.66,3.89,32.27,18.48,32.27c14.59,0,18.48-10.61,18.48-32.27 C265.91,31.11,262.02,21.03,247.43,21.03z M247.43,77.72c-7.95,0-10.61-6.38-10.61-25.38c0-19.46,2.66-24.86,10.61-24.86 s10.61,5.4,10.61,24.86C258.04,71.35,255.39,77.72,247.43,77.72z"/>
<path d="M295.18,51.11c4.69-1.69,6.82-6.99,6.82-13c0-13.18-5.23-17.08-14.33-17.08c-4.5,0-9.73,1.33-10.7,1.51v6.45 c2.56-0.53,6.99-1.51,10.88-1.51c4.42,0,6.62,2.83,6.62,9.82c0,3.53-0.34,10.87-7.52,10.87h-6.36v6.46h7.26 c6.28,0,7.6,4.25,7.6,12.29c0,6.82-2.93,10.64-7.43,10.64c-3.9,0-9.37-0.91-11.5-1.35v6.44c0.81,0.19,7.26,1.51,11.59,1.51 c9.82,0,14.94-4.94,14.94-18.13C303.05,57.38,300.58,51.46,295.18,51.11z"/>
<path d="M202.33,21.03c-7.34,0-14.96,0.63-14.96,0.63v61.91h7.7V60.21h7.43c12.56,0,17.16-6.55,17.16-19.99 C219.66,29.34,215.77,21.03,202.33,21.03z M203.38,53.75h-8.31V27.93c0,0,3.45-0.53,8.31-0.53c6.28,0,8.41,4.59,8.41,13.44 C211.79,50.48,208.34,53.75,203.38,53.75z"/>
</g>
<g id="logo">
<path d="M32.94,8.72c0-4.58,1.08-6.1,2.61-7.42C22.46,2.83,6.76,7.63,1.74,13.74C0.66,15.27,0,17.66,0,20.72 c0,19.41,20.72,63.46,35.33,63.46c6.76,0,18.16-11.11,27.54-26.17c-1.25,0.37-2.24,0.51-3.55,0.51 C48.63,58.51,32.94,21.15,32.94,8.72z"/>
<path d="M56.05,0c-5.67,0-7.85,1.09-7.85,6.76c0,12.43,11.12,37.3,20.07,37.3c5.01,0,14.83-18.76,14.83-34.25 C83.1,2.18,69.57,0,56.05,0z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 303.05 84.17"
style="enable-background:new 0 0 303.05 84.17;" xml:space="preserve">
<style type="text/css">
#letters * {fill: white}
#logo * {fill: #f49800}
</style>
<g>
<g id="letters">
<polygon points="99.94,28.37 113.57,28.37 113.57,83.56 121.26,83.56 121.26,28.37 134.88,28.37 134.88,21.65 99.94,21.65"/>
<polygon points="158.9,46.67 147.23,21.65 138.74,21.65 154.57,54.81 154.57,83.56 162.53,83.56 162.53,54.81 178.63,21.65 170.57,21.65"/>
<path d="M247.43,21.03c-14.59,0-18.48,10.08-18.48,30.87c0,21.66,3.89,32.27,18.48,32.27c14.59,0,18.48-10.61,18.48-32.27 C265.91,31.11,262.02,21.03,247.43,21.03z M247.43,77.72c-7.95,0-10.61-6.38-10.61-25.38c0-19.46,2.66-24.86,10.61-24.86 s10.61,5.4,10.61,24.86C258.04,71.35,255.39,77.72,247.43,77.72z"/>
<path d="M295.18,51.11c4.69-1.69,6.82-6.99,6.82-13c0-13.18-5.23-17.08-14.33-17.08c-4.5,0-9.73,1.33-10.7,1.51v6.45 c2.56-0.53,6.99-1.51,10.88-1.51c4.42,0,6.62,2.83,6.62,9.82c0,3.53-0.34,10.87-7.52,10.87h-6.36v6.46h7.26 c6.28,0,7.6,4.25,7.6,12.29c0,6.82-2.93,10.64-7.43,10.64c-3.9,0-9.37-0.91-11.5-1.35v6.44c0.81,0.19,7.26,1.51,11.59,1.51 c9.82,0,14.94-4.94,14.94-18.13C303.05,57.38,300.58,51.46,295.18,51.11z"/>
<path d="M202.33,21.03c-7.34,0-14.96,0.63-14.96,0.63v61.91h7.7V60.21h7.43c12.56,0,17.16-6.55,17.16-19.99 C219.66,29.34,215.77,21.03,202.33,21.03z M203.38,53.75h-8.31V27.93c0,0,3.45-0.53,8.31-0.53c6.28,0,8.41,4.59,8.41,13.44 C211.79,50.48,208.34,53.75,203.38,53.75z"/>
</g>
<g id="logo">
<path d="M32.94,8.72c0-4.58,1.08-6.1,2.61-7.42C22.46,2.83,6.76,7.63,1.74,13.74C0.66,15.27,0,17.66,0,20.72 c0,19.41,20.72,63.46,35.33,63.46c6.76,0,18.16-11.11,27.54-26.17c-1.25,0.37-2.24,0.51-3.55,0.51 C48.63,58.51,32.94,21.15,32.94,8.72z"/>
<path d="M56.05,0c-5.67,0-7.85,1.09-7.85,6.76c0,12.43,11.12,37.3,20.07,37.3c5.01,0,14.83-18.76,14.83-34.25 C83.1,2.18,69.57,0,56.05,0z"/>
</g>
</g>
</svg>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment