Skip to content

Commit 46a3512

Browse files
committed
hugo: css overhaul
- Remove manual breakpoint definitions and use tailwind defaults - Fix various overflow and other rendering issues Signed-off-by: David Karlsson <[email protected]>
1 parent 22ea9e5 commit 46a3512

File tree

22 files changed

+170
-159
lines changed

22 files changed

+170
-159
lines changed

assets/css/code.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
background: theme("colors.gray.light.200");
1717
display: inline-block;
1818
margin: 0;
19-
white-space: nowrap;
2019
font-weight: 400;
20+
overflow-wrap: anywhere;
2121
padding: 0 4px;
22+
table & {
23+
overflow-wrap: nowrap;
24+
}
2225
}
2326

2427
.highlight {

assets/css/typography.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,10 @@
7373
@apply text-lg;
7474
line-height: 1.75;
7575
}
76+
table {
77+
display: block;
78+
overflow-x: auto;
79+
max-width: 100%;
80+
}
7681
}
7782
}

assets/images/docker-docs-white.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 58 additions & 0 deletions
Loading

content/language/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In addition to the language-specific modules, Docker documentation also provides
2323

2424
Learn how to containerize your applications and start developing using Docker. Choose one of the following languages to get started.
2525

26-
<div class="grid grid-cols-3 auto-rows-fr sm:flex-col sm:h-auto gap-4">
26+
<div class="grid grid-cols-2 md:grid-cols-3 h-auto gap-4">
2727
<div class="flex items-center flex-1 shadow p-4">
2828
<a href="/language/nodejs/"><img class="m-auto rounded" src="/language/images/nodejs.webp" alt="Develop with Node"></a>
2929
</div>
@@ -48,4 +48,4 @@ Learn how to containerize your applications and start developing using Docker. C
4848
<div class="flex items-center flex-1 shadow p-4">
4949
<a href="/language/php/"><img class="m-auto rounded" src="/language/images/php-logo.webp" alt="Develop with PHP"></a>
5050
</div>
51-
</div>
51+
</div>

hugo_stats.json

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"!mt-0",
66
"--mount",
77
"--tmpfs",
8+
"-mb-3",
89
"-mt-4",
910
"-top-16",
1011
"-v",
@@ -112,7 +113,6 @@
112113
"Without-systemd",
113114
"absolute",
114115
"aspect-video",
115-
"auto-rows-fr",
116116
"bake-action",
117117
"basis-1/3",
118118
"basis-2/3",
@@ -150,6 +150,7 @@
150150
"build-push-action",
151151
"chroma",
152152
"cls-1",
153+
"col-start-2",
153154
"cursor-not-allowed",
154155
"cursor-pointer",
155156
"dark:bg-accent-dark",
@@ -208,8 +209,6 @@
208209
"flex-1",
209210
"flex-col",
210211
"flex-col-reverse",
211-
"flex-initial",
212-
"flex-row-reverse",
213212
"flex-wrap",
214213
"font-medium",
215214
"footnote-backref",
@@ -227,17 +226,15 @@
227226
"gap-6",
228227
"gap-8",
229228
"grid",
229+
"grid-cols-1",
230230
"grid-cols-2",
231-
"grid-cols-3",
232-
"grid-cols-4",
233231
"group",
234232
"group-hover:block'",
235-
"grow",
236233
"h-16",
237234
"h-2",
238235
"h-32",
239236
"h-8",
240-
"h-[334px]",
237+
"h-auto",
241238
"h-full",
242239
"h-max",
243240
"h-screen",
@@ -258,6 +255,7 @@
258255
"icon-sm",
259256
"icon-svg",
260257
"important",
258+
"information",
261259
"inline",
262260
"inset-0",
263261
"invertible",
@@ -272,39 +270,37 @@
272270
"leading-snug",
273271
"left-0",
274272
"lg:block",
273+
"lg:flex",
275274
"lg:grid-cols-2",
276-
"lg:grow-0",
275+
"lg:grid-cols-3",
276+
"lg:grid-cols-main-lg",
277277
"lg:hidden",
278-
"lg:link",
279-
"lg:pb-0",
280-
"lg:px-4",
278+
"lg:max-w-[300px]",
279+
"lg:ml-auto",
280+
"lg:scale-100",
281281
"lg:text-base",
282-
"lg:w-full",
282+
"lg:w-[1200px]",
283283
"link",
284284
"lntable",
285285
"lntd",
286286
"m-auto",
287287
"max-h-full",
288288
"max-w-56",
289289
"max-w-[1400px]",
290-
"max-w-[66%]",
290+
"max-w-[840px]",
291291
"max-w-full",
292292
"max-w-none",
293293
"mb-4",
294294
"mb-8",
295295
"md:block",
296-
"md:fixed",
297-
"md:flex",
298-
"md:gap-2",
299-
"md:grid-cols-1",
300-
"md:h-screen",
301-
"md:hidden",
302-
"md:ml-[21px]",
303-
"md:scale-50",
304-
"md:w-full",
305-
"md:w-lvw",
306-
"md:w-screen",
307-
"md:z-10",
296+
"md:col-start-3",
297+
"md:flex-row",
298+
"md:gap-8",
299+
"md:grid-cols-2",
300+
"md:grid-cols-3",
301+
"md:h-[334px]",
302+
"md:max-w-[66%]",
303+
"md:scale-100",
308304
"min-h-screen",
309305
"min-w-0",
310306
"ml-3",
@@ -332,15 +328,18 @@
332328
"p-6",
333329
"p-8",
334330
"p-[2px]",
331+
"pb-0",
335332
"pb-0.5",
336333
"pb-2",
334+
"pb-32",
337335
"pb-4",
338336
"pl-1",
339337
"pl-2",
340338
"pl-3",
341339
"pl-4",
342340
"pl-5",
343341
"place-items-center",
342+
"pr-2",
344343
"prose",
345344
"pt-0",
346345
"px-1",
@@ -351,6 +350,7 @@
351350
"py-2",
352351
"py-20",
353352
"py-4",
353+
"py-8",
354354
"regular-install",
355355
"relative",
356356
"restricted",
@@ -364,23 +364,13 @@
364364
"rounded-b-lg",
365365
"rounded-full",
366366
"rounded-sm",
367+
"scale-50",
368+
"scale-75",
367369
"scroll-mt-20",
368370
"scroll-mt-36",
369371
"self-center",
370372
"shadow",
371-
"shrink",
372-
"shrink-0",
373373
"sidebar-hover",
374-
"sm:col-start-2",
375-
"sm:flex",
376-
"sm:flex-col",
377-
"sm:grid-cols-2",
378-
"sm:h-auto",
379-
"sm:h-full",
380-
"sm:hidden",
381-
"sm:max-w-full",
382-
"sm:py-8",
383-
"sm:scale-75",
384374
"space-x-2",
385375
"space-y-4",
386376
"sticky",
@@ -421,14 +411,17 @@
421411
"w-2",
422412
"w-8",
423413
"w-[1200px]",
424-
"w-[300px]",
425414
"w-[32px]",
426-
"w-[840px]",
427415
"w-full",
416+
"w-lvw",
428417
"warning",
429-
"xl:grid-cols-1",
430-
"xl:grid-cols-2",
431418
"xl:grid-cols-3",
419+
"xl:grid-cols-4",
420+
"xl:grid-cols-main",
421+
"xl:hidden",
422+
"xl:no-underline",
423+
"xl:pb-2",
424+
"xl:w-[1200px]",
432425
"youtube-video",
433426
"z-10",
434427
"z-20",

i18n/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ editPage:
55
requestChanges:
66
other: Request changes
77
tableOfContents:
8-
other: Contents
8+
other: Table of contents
99
relatedContent:
1010
other: Related content
1111

layouts/_default/baseof.html

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,34 @@
77

88
<body class="bg-background-light text-base dark:bg-background-dark dark:text-white">
99
{{ partial "header.html" . }}
10-
<main class="flex">
11-
<div id="sidebar"
12-
class="sticky top-16 flex h-screen shrink-0 grow flex-row-reverse overflow-y-scroll bg-background-light dark:bg-gray-dark-100 md:fixed md:z-10 md:hidden md:h-screen md:w-screen lg:grow-0">
10+
<main class="grid grid-cols-1 xl:grid-cols-main lg:grid-cols-main-lg">
11+
<!-- First column: visible on lg and xl -->
12+
<div class="hidden lg:block bg-background-light dark:bg-gray-dark-100"
13+
{{- $classes := "'fixed', 'z-20', 'left-0', 'top-16', 'w-full', 'flex', 'h-lvh'" }}
14+
x-data @togglesidebar.window="
15+
if ($store.showSidebar == false) {
16+
document.body.classList.add('overflow-hidden');
17+
$el.classList.remove('hidden');
18+
$el.classList.add({{$classes}});
19+
$store.showSidebar = true;
20+
return;
21+
}
22+
document.body.classList.remove('overflow-hidden');
23+
$el.classList.add('hidden');
24+
$el.classList.remove({{$classes}});
25+
$store.showSidebar = false;
26+
"
27+
>
28+
<div class="w-full ml-auto p-2">
1329
{{ block "left" . }}
1430
{{ end }}
31+
</div>
1532
</div>
16-
<div class="w-[840px] flex-initial overflow-clip p-6 pt-0 md:w-lvw">
33+
<div class="min-w-0 px-4 pb-32">
1734
{{ block "main" . }}
1835
{{ end }}
1936
</div>
20-
<div class="sticky top-16 h-screen w-[300px] shrink grow overflow-y-scroll lg:hidden">
37+
<div class="sticky top-16 pb-32 h-screen hidden lg:block overflow-x-hidden overflow-y-scroll pr-2">
2138
{{ block "right" . }}
2239
{{ end }}
2340
</div>

layouts/_default/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ with .Title }}
99
<h1 class="scroll-mt-36">{{ . }}</h1>
1010
{{ end }}
11-
<div class="hidden lg:block">
11+
<div class="block xl:hidden">
1212
{{ partial "pagemeta.html" . }}
1313
</div>
1414
{{ .Content }}

layouts/_default/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ with .Title }}
99
<h1 class="scroll-mt-36">{{ . }}</h1>
1010
{{ end }}
11-
<div class="hidden lg:block">
11+
<div class="block xl:hidden">
1212
{{ partial "pagemeta.html" . }}
1313
<hr>
1414
</div>

0 commit comments

Comments
 (0)