Skip to content

Commit 951851c

Browse files
Make mobile top bar and sidebar prettier; fix theme toggle hover color on landing page; stop toc sidebar scrollbar from always showing on linux chromium
1 parent 6bcc163 commit 951851c

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

jekyll-assets/_layouts/docs.html

+1-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ <h1 id="docs-header-title">
1818
</a>
1919
</h1>
2020
<label class="mobile-menu-toggle" for="mobile-toggle">
21-
<svg width="35px" height="30px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
22-
<rect x="0" fill="none" width="20" height="20"/>
23-
<g>
24-
<path fill="var(--textcolor)" d="M20 5V2H0v3h20zm0 6V8H0v3h20zm0 6v-3H0v3h20z"/>
25-
</g>
26-
</svg>
21+
<div class="mobile-menu-toggle-inner"></div>
2722
</label>
2823
{% include theme.html %}
2924
</div>

jekyll-assets/css/style.css

+21-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
--textcolor: white;
2121
--subtle-text: #CCC;
2222
--theme-toggle-label: url("data:image/svg+xml;utf8,<svg width=\'30px\' height=\'30px\' viewBox=\'0 0 16 16\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M7 3V0H9V3H7Z\' fill=\'%23FFF\'/><path d=\'M9 13V16H7V13H9Z\' fill=\'%23FFF\'/><path d=\'M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z\' fill=\'%23FFF\'/><path d=\'M0 9H3V7H0V9Z\' fill=\'%23FFF\'/><path d=\'M16 7H13V9H16V7Z\' fill=\'%23FFF\'/><path d=\'M3.75735 5.17157L1.63603 3.05025L3.05025 1.63603L5.17157 3.75735L3.75735 5.17157Z\' fill=\'%23FFF\'/><path d=\'M12.2426 10.8284L14.364 12.9497L12.9497 14.364L10.8284 12.2426L12.2426 10.8284Z\' fill=\'%23FFF\'/><path d=\'M3.05025 14.364L5.17157 12.2426L3.75735 10.8284L1.63603 12.9498L3.05025 14.364Z\' fill=\'%23FFF\'/><path d=\'M12.9497 1.63604L10.8284 3.75736L12.2426 5.17158L14.364 3.05026L12.9497 1.63604Z\' fill=\'%23FFF\'/></svg>");
23+
--mobile-menu-label: url("data:image/svg+xml,%3Csvg width='30px' height='40px' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' fill='none' width='20' height='20'/%3E%3Cg%3E%3Cpath fill='%23FFF' d='M20 5V2H0v3h20zm0 6V8H0v3h20zm0 6v-3H0v3h20z'/%3E%3C/g%3E%3C/svg%3E");
2324

2425
/* header and footer styling */
2526
--rptl-header-background-color: var(--bg);
@@ -59,6 +60,7 @@
5960
--textcolor: black;
6061
--subtle-text: #444;
6162
--theme-toggle-label: url("data:image/svg+xml;utf8,<svg width=\'30px\' height=\'30px\' viewBox=\'0 0 24 24\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M3.32031 11.6835C3.32031 16.6541 7.34975 20.6835 12.3203 20.6835C16.1075 20.6835 19.3483 18.3443 20.6768 15.032C19.6402 15.4486 18.5059 15.6834 17.3203 15.6834C12.3497 15.6834 8.32031 11.654 8.32031 6.68342C8.32031 5.50338 8.55165 4.36259 8.96453 3.32996C5.65605 4.66028 3.32031 7.89912 3.32031 11.6835Z\' stroke=\'%23000\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'/></svg>");
63+
--mobile-menu-label: url("data:image/svg+xml,%3Csvg width='30px' height='40px' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' fill='none' width='20' height='20'/%3E%3Cg%3E%3Cpath fill='var(--textcolor)' d='M20 5V2H0v3h20zm0 6V8H0v3h20zm0 6v-3H0v3h20z'/%3E%3C/g%3E%3C/svg%3E");
6264

6365
/* header and footer styling */
6466
--rptl-header-background-color: var(--bg);
@@ -127,7 +129,7 @@ code {
127129
margin-bottom: 0px;
128130
top: 0;
129131
z-index: 99;
130-
background-color: var(--bg);
132+
background-color: var(--code-bg-colour);
131133
}
132134

133135
.toptitle h1 {
@@ -138,7 +140,7 @@ code {
138140
position: relative;
139141
margin-top: 0px;
140142
text-align: center;
141-
margin-top: 10px;
143+
padding-top: 10px;
142144
margin-left: 10px;
143145
flex-grow: 1;
144146
}
@@ -176,7 +178,7 @@ div.subtitle p {
176178
}
177179

178180
#docs-header a:hover {
179-
color: var(--brand-colour);
181+
color: var(--accent);
180182
text-decoration: none;
181183
background-color: var(--toc-hover-colour);
182184
}
@@ -304,6 +306,7 @@ pre {
304306
#theme-toggle-container {
305307
align-self: center;
306308
align-items: start;
309+
display: block;
307310
}
308311

309312
#docsearch {
@@ -1386,6 +1389,11 @@ footer {
13861389

13871390
.mobile-menu-toggle {
13881391
display: none;
1392+
align-self: baseline;
1393+
}
1394+
1395+
.mobile-menu-toggle-inner {
1396+
content: var(--mobile-menu-label);
13891397
}
13901398

13911399
#mobile-toggle {
@@ -1415,7 +1423,7 @@ input:not(:checked) ~ li ~ .itemcontents .sectlevel1 {
14151423
}
14161424

14171425
.toc {
1418-
overflow-y: scroll;
1426+
overflow-y: auto;
14191427
height: 90vh;
14201428
background-color: var(--code-bg-colour);
14211429
max-width: 25vw;
@@ -1426,6 +1434,7 @@ input:not(:checked) ~ li ~ .itemcontents .sectlevel1 {
14261434
position: sticky;
14271435
background-color: var(--code-bg-colour);
14281436
z-index: 102;
1437+
padding-bottom: 10px;
14291438
box-shadow: var(--code-bg-colour-transparent) 0px 10px 15px -5px, var(--code-bg-colour-transparent) 0px 10px 10px -5px;
14301439
}
14311440

@@ -1464,6 +1473,7 @@ input:not(:checked) ~ li ~ .itemcontents .sectlevel1 {
14641473
/* no need for box shadow in mobile mode */
14651474
#toc-inner {
14661475
box-shadow: var(--code-bg-colour-transparent) 0px;
1476+
padding-bottom: 0px;
14671477
}
14681478

14691479
#mobile-toggle:checked ~ .legal {
@@ -1488,23 +1498,23 @@ input:not(:checked) ~ li ~ .itemcontents .sectlevel1 {
14881498
}
14891499

14901500
.mobile-menu-toggle {
1491-
font-size: 3em;
14921501
display: block;
14931502
padding-left: 5px;
14941503
padding-right: 5px;
14951504
}
14961505

1497-
.toc {
1498-
height: auto;
1506+
#theme-toggle-container {
1507+
display: block;
1508+
padding-left: 5px;
1509+
padding-right: 5px;
14991510
}
15001511

1501-
.mobile-menu-toggle div {
1502-
transform: translateY(-3px);
1512+
.toc {
1513+
height: auto;
15031514
}
15041515

15051516
.mobile-menu-toggle:hover {
1506-
color: var(--brand-colour);
1507-
text-decoration: none;
1517+
border-radius: 3px;
15081518
background-color: var(--toc-hover-colour);
15091519
}
15101520

0 commit comments

Comments
 (0)