Skip to content

Commit 0f237b9

Browse files
committed
Adding secondary "Report an Issue" button mobile.
Responsive CSS reduces the amount of horizontal items at 50em (800px) so we hide the anchored button and reveal one at the top next to "Version History".
1 parent 046ed3d commit 0f237b9

2 files changed

Lines changed: 24 additions & 21 deletions

File tree

docs/_static/css/main.css

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,11 @@ h2 .headerlink:hover {
752752
display: none;
753753
}
754754

755+
#file-issue-secondary {
756+
margin-top: 1em;
757+
display: inline-block;
758+
}
759+
755760
.v-list {
756761
color: rgba(0,0,0,0.2);
757762
}
@@ -1029,26 +1034,6 @@ h2 .headerlink:hover {
10291034

10301035
}
10311036

1032-
@media only screen and (min-width: 45em) {
1033-
1034-
/*
1035-
Docs Header
1036-
*/
1037-
1038-
.versions {
1039-
position: absolute;
1040-
top: 6em;
1041-
right: 2em;
1042-
margin: 0;
1043-
}
1044-
1045-
.v-btn {
1046-
font-size: 0.7em;
1047-
line-height: normal;
1048-
}
1049-
1050-
}
1051-
10521037
@media only screen and (min-width: 50em) {
10531038

10541039
/*
@@ -1073,6 +1058,10 @@ h2 .headerlink:hover {
10731058
display: inline;
10741059
}
10751060

1061+
#file-issue-secondary {
1062+
display: none;
1063+
}
1064+
10761065
/*
10771066
Logo
10781067
*/
@@ -1144,7 +1133,15 @@ h2 .headerlink:hover {
11441133
}
11451134

11461135
.versions {
1147-
top: 7em;
1136+
position: absolute;
1137+
top: 6em;
1138+
right: 2em;
1139+
margin: 0;
1140+
}
1141+
1142+
.v-btn {
1143+
font-size: 0.7em;
1144+
line-height: normal;
11481145
}
11491146

11501147
/*

docs/_templates/layout.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ <h1 class="page-title">Python</h1>
108108
Version History ({{ release|e }})
109109
</a>
110110
</div><!-- end of .versions -->
111+
<div>
112+
<a href="{{ issue_uri }}" target="_blank" class="v-btn" id="file-issue-secondary">
113+
<img src="_static/images/icon-link-github.svg" />
114+
Report an Issue
115+
</a>
116+
</div>
111117
</header>
112118

113119
<section class="content">

0 commit comments

Comments
 (0)