aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJukka Jokiniva <jukka.jokiniva@qt.io>2019-01-04 13:05:32 +0200
committerJukka Jokiniva <jukka.jokiniva@qt.io>2019-01-10 10:51:19 +0000
commit282ed4ea88f9ce0f1ab7e07a07e2814f966d8f74 (patch)
tree132bd3aa85693f5486cb9dd8c359bcd0464ab1b0
parentb6c336cc2dcc75553d860a18682d893c0505bfd2 (diff)
Add Qt logos to the UI header
Fixes: QTBI-1555 Change-Id: I415474bec72275bd98139005fb9fdaa82cafb242 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
-rw-r--r--qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html31
1 files changed, 30 insertions, 1 deletions
diff --git a/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html b/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html
index 2d42702..1739d2a 100644
--- a/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html
+++ b/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html
@@ -1,5 +1,5 @@
//
-// Copyright (C) 2018 The Qt Company
+// Copyright (C) 2019 The Qt Company
//
// This plugin provides UI customization for codereview.qt-project.org
//
@@ -28,6 +28,35 @@
return template.content.firstChild;
}
+ // Customize header
+ plugin.hook('header-title', {replace: true} ).onAttached(element => {
+ const css_str = '<style> \
+ #qt-header ul { \
+ width: 100%; \
+ margin: 0; \
+ text-align: left; \
+ padding: 0.5em 0 .1em 0; \
+ } \
+ #qt-header li { \
+ display: inline; \
+ padding: 0.3em; \
+ } \
+ #qt-header img { \
+ vertical-align: top; \
+ } \
+ </style>';
+ const html_str = '<div id="qt-header"> \
+ <ul> \
+ <li><img src="/static/logo_qt.png"/></li> \
+ <li><img src="/static/logo_open_gov.png"/></li> \
+ </ul> \
+ </div>';
+ var elem = htmlToElement(css_str);
+ element.appendChild(elem);
+ elem = htmlToElement(html_str);
+ element.appendChild(elem);
+ });
+
// Customize header changes dropdown menu
plugin.hook('header-dropdown-Changes').onAttached(element => {
// this is ugly, but there is no API for this