File tree Expand file tree Collapse file tree 2 files changed +50
-7
lines changed Expand file tree Collapse file tree 2 files changed +50
-7
lines changed Original file line number Diff line number Diff line change 10
10
11
11
{% block header %}
12
12
< div class ="pageheader ">
13
- < a href ="{{ pathto(root_doc)|e }} ">
14
- < img src ="{{ pathto('_static/sphinx-logo.svg', resource=True) }} " alt ="logo " />
15
- </ a >
16
- < h1 > Sphinx</ h1 >
13
+ < div class ="brand ">
14
+ < a href ="{{ pathto(root_doc)|e }} ">
15
+ < img src ="{{ pathto('_static/sphinx-logo.svg', resource=True) }} " alt ="logo " />
16
+ </ a >
17
+ < h1 > Sphinx</ h1 >
18
+ </ div >
19
+ < div class ="icons ">
20
+ < a href ="https://github.com/sphinx-doc/sphinx " title ="{{ _('Source Code') }} " target ="_blank ">
21
+ {{ github_icon() }}
22
+ </ a >
23
+ </ div >
17
24
</ div >
18
25
{% endblock %}
19
26
@@ -60,3 +67,18 @@ <h3>{{ _('On this page') }}</h3>
60
67
{% trans sphinx_version=sphinx_version|e %}Created using < a href ="https://www.sphinx-doc.org/ "> Sphinx</ a > {{ sphinx_version }}.{% endtrans %}
61
68
</ div >
62
69
{%- endblock %}
70
+
71
+ {% macro github_icon() %}
72
+ < svg
73
+ stroke ="currentColor "
74
+ fill ="currentColor "
75
+ stroke-width ="0 "
76
+ viewBox ="0 0 16 16 "
77
+ class ="gh-source "
78
+ >
79
+ < path
80
+ fill-rule ="evenodd "
81
+ d ="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z "
82
+ > </ path >
83
+ </ svg >
84
+ {% endmacro %}
Original file line number Diff line number Diff line change @@ -23,28 +23,49 @@ body {
23
23
display : flex;
24
24
column-gap : 1em ;
25
25
align-items : center;
26
+ justify-content : space-between;
26
27
width : 100% ;
27
28
background-color : var (--colour-sphinx-blue );
28
29
padding : 10px 20px ;
29
30
box-sizing : border-box;
30
31
}
31
32
32
- .pageheader a {
33
+ .pageheader .brand {
34
+ display : flex;
35
+ align-items : baseline;
36
+ column-gap : 1em ;
37
+ color : white;
38
+ text-decoration : none;
39
+ }
40
+
41
+ .pageheader .brand a {
33
42
width : 2em ;
34
43
}
35
44
36
- .pageheader img {
45
+ .pageheader . brand img {
37
46
filter : invert (1 ) drop-shadow (1px 1px 2px black);
38
47
}
39
48
40
- .pageheader h1 {
49
+ .pageheader . brand h1 {
41
50
color : white;
42
51
margin : 0 ;
43
52
font-weight : 400 ;
44
53
font-size : 2em ;
45
54
line-height : 1 ;
46
55
}
47
56
57
+ .pageheader .icons a {
58
+ color : white;
59
+ }
60
+
61
+ .pageheader .icons a : hover {
62
+ color : rgba (255 , 255 , 255 , 0.8 );
63
+ }
64
+
65
+ .pageheader .icons svg {
66
+ height : 1.6em ;
67
+ }
68
+
48
69
div .document {
49
70
display : flex;
50
71
margin : 0 0.5em ;
You can’t perform that action at this time.
0 commit comments