File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 1
1
//
2
- // Copyright (C) 2018 The Qt Company
2
+ // Copyright (C) 2019 The Qt Company
3
3
//
4
4
// This plugin provides UI customization for codereview.qt-project.org
5
5
//
28
28
return template . content . firstChild ;
29
29
}
30
30
31
+ // Customize header
32
+ plugin . hook ( 'header-title' , { replace : true } ) . onAttached ( element => {
33
+ const css_str = '<style> \
34
+ #qt-header ul { \
35
+ width: 100%; \
36
+ margin: 0; \
37
+ text-align: left; \
38
+ padding: 0.5em 0 .1em 0; \
39
+ } \
40
+ #qt-header li { \
41
+ display: inline; \
42
+ padding: 0.3em; \
43
+ } \
44
+ #qt-header img { \
45
+ vertical-align: top; \
46
+ } \
47
+ </style>' ;
48
+ const html_str = '<div id="qt-header"> \
49
+ <ul> \
50
+ <li><img src="/static/logo_qt.png"/></li> \
51
+ <li><img src="/static/logo_open_gov.png"/></li> \
52
+ </ul> \
53
+ </div>' ;
54
+ var elem = htmlToElement ( css_str ) ;
55
+ element . appendChild ( elem ) ;
56
+ elem = htmlToElement ( html_str ) ;
57
+ element . appendChild ( elem ) ;
58
+ } ) ;
59
+
31
60
// Customize header changes dropdown menu
32
61
plugin . hook ( 'header-dropdown-Changes' ) . onAttached ( element => {
33
62
// this is ugly, but there is no API for this
You can’t perform that action at this time.
0 commit comments