Skip to content

Commit 6765411

Browse files
committed
fix ad in mobile version
1 parent 804a569 commit 6765411

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

theme/css/chrome.css

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,27 @@ body.sidebar-visible #menu-bar {
9090
column-gap: 0.5rem;
9191
}
9292

93+
.mobile-toc-toggle {
94+
display: none;
95+
}
96+
@media only screen and (max-width:799px) {
97+
#mobile-toc-toggle {
98+
display: inline-flex !important;
99+
align-items: center;
100+
justify-content: center;
101+
width: 32px;
102+
height: 32px;
103+
border: 1px solid var(--table-border-color);
104+
border-radius: 6px;
105+
background: color-mix(in srgb, var(--bg) 85%, transparent);
106+
color: var(--fg);
107+
}
108+
#mobile-toc-toggle .mobile-toc-icon {
109+
font-size: 16px;
110+
line-height: 1;
111+
}
112+
}
113+
93114
.icon-button {
94115
border: none;
95116
background: var(--bg);
@@ -860,14 +881,23 @@ ul#searchresults li a span.teaser em {
860881
}
861882
@media only screen and (max-width:549px) {
862883
#sidebar {
863-
display: none !important;
884+
display: none;
864885
}
865886
#sidebar-toggle {
866887
display: none !important;
867888
}
868889
.sidebar-float-toggle {
869890
display: none !important;
870891
}
892+
#mobile-toc-toggle {
893+
display: inline-flex !important;
894+
}
895+
#sidebar-toggle-anchor:checked ~ .page-wrapper .page #container #sidebar {
896+
display: block !important;
897+
}
898+
#sidebar-toggle-anchor:checked ~ .page-wrapper .page #container #content {
899+
display: none !important;
900+
}
871901
}
872902
.sidebar-iframe-inner {
873903
background-color: transparent;

theme/index.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@
202202
</button>
203203
{{/if}}
204204

205+
<label id="mobile-toc-toggle" class="icon-button mobile-toc-toggle" for="sidebar-toggle-anchor" title="Open Table of Contents" aria-label="Open Table of Contents">
206+
<span class="mobile-toc-icon" aria-hidden="true">📚</span>
207+
</label>
208+
205209
<div id="menubar-languages-toggle" class="icon-button" type="button" title="Translations" aria-label="Toggle Tanslations" aria-expanded="false" aria-controls="translations">
206210
<i class="fa fa-globe"></i>
207211
<span class="menu-bar-link">Translations</span>

theme/pagetoc.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@media only screen and (max-width:1439px) {
1+
@media only screen and (max-width:799px) {
22
.sidetoc {
33
display: none !important;
44
}
@@ -61,7 +61,7 @@
6161
}
6262
}
6363

64-
@media only screen and (min-width:1440px) {
64+
@media only screen and (min-width:800px) {
6565
main {
6666
position: relative;
6767
}

0 commit comments

Comments
 (0)