diff options
Diffstat (limited to 'qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html')
-rw-r--r-- | qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html | 31 |
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 |