Skip to content

Commit e359bef

Browse files
committed
fix ad in mobile version
1 parent 98363bc commit e359bef

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

theme/css/chrome.css

Lines changed: 41 additions & 0 deletions
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);
@@ -858,6 +879,26 @@ ul#searchresults li a span.teaser em {
858879
z-index: 105;
859880
}
860881
}
882+
@media only screen and (max-width:549px) {
883+
#sidebar {
884+
display: none;
885+
}
886+
#sidebar-toggle {
887+
display: none !important;
888+
}
889+
.sidebar-float-toggle {
890+
display: none !important;
891+
}
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+
}
901+
}
861902
@media only screen and (max-width:549px) {
862903
#sidebar {
863904
display: none !important;

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)