Skip to content

Commit a94e438

Browse files
authored
Merge pull request #19864 from dvdksn/css-overflows-sizes
hugo: css overhaul
2 parents faa980a + c27e60b commit a94e438

File tree

23 files changed

+171
-158
lines changed

23 files changed

+171
-158
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

assets/js/src/toc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const toc = document.querySelector("#TableOfContents");
1+
const toc = document.querySelector("#TableOfContents .toc");
22
const headings = document.querySelectorAll("main article h2, main article h3");
33

44
if (toc) {

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: 33 additions & 39 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",
@@ -273,38 +271,40 @@
273271
"left-0",
274272
"lg:block",
275273
"lg:grid-cols-2",
276-
"lg:grow-0",
274+
"lg:grid-cols-3",
275+
"lg:grid-cols-main-lg",
277276
"lg:hidden",
278-
"lg:link",
279-
"lg:pb-0",
280-
"lg:px-4",
277+
"lg:max-w-[300px]",
278+
"lg:ml-auto",
279+
"lg:no-underline",
280+
"lg:pb-2",
281+
"lg:scale-100",
281282
"lg:text-base",
282-
"lg:w-full",
283+
"lg:w-[1200px]",
283284
"link",
284285
"lntable",
285286
"lntd",
286287
"m-auto",
287288
"max-h-full",
288289
"max-w-56",
289290
"max-w-[1400px]",
290-
"max-w-[66%]",
291+
"max-w-[840px]",
291292
"max-w-full",
292293
"max-w-none",
293294
"mb-4",
294295
"mb-8",
295296
"md:block",
296-
"md:fixed",
297+
"md:col-start-3",
297298
"md:flex",
298-
"md:gap-2",
299-
"md:grid-cols-1",
300-
"md:h-screen",
299+
"md:flex-row",
300+
"md:gap-8",
301+
"md:grid-cols-2",
302+
"md:grid-cols-3",
303+
"md:grid-cols-main-md",
304+
"md:h-[334px]",
301305
"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",
306+
"md:max-w-[66%]",
307+
"md:scale-100",
308308
"min-h-screen",
309309
"min-w-0",
310310
"ml-3",
@@ -332,15 +332,18 @@
332332
"p-6",
333333
"p-8",
334334
"p-[2px]",
335+
"pb-0",
335336
"pb-0.5",
336337
"pb-2",
338+
"pb-32",
337339
"pb-4",
338340
"pl-1",
339341
"pl-2",
340342
"pl-3",
341343
"pl-4",
342344
"pl-5",
343345
"place-items-center",
346+
"pr-2",
344347
"prose",
345348
"pt-0",
346349
"px-1",
@@ -351,6 +354,7 @@
351354
"py-2",
352355
"py-20",
353356
"py-4",
357+
"py-8",
354358
"regular-install",
355359
"relative",
356360
"restricted",
@@ -364,23 +368,13 @@
364368
"rounded-b-lg",
365369
"rounded-full",
366370
"rounded-sm",
371+
"scale-50",
372+
"scale-75",
367373
"scroll-mt-20",
368374
"scroll-mt-36",
369375
"self-center",
370376
"shadow",
371-
"shrink",
372-
"shrink-0",
373377
"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",
384378
"space-x-2",
385379
"space-y-4",
386380
"sticky",
@@ -421,14 +415,14 @@
421415
"w-2",
422416
"w-8",
423417
"w-[1200px]",
424-
"w-[300px]",
425418
"w-[32px]",
426-
"w-[840px]",
427419
"w-full",
420+
"w-lvw",
428421
"warning",
429-
"xl:grid-cols-1",
430-
"xl:grid-cols-2",
431422
"xl:grid-cols-3",
423+
"xl:grid-cols-4",
424+
"xl:grid-cols-main-xl",
425+
"xl:w-[1200px]",
432426
"youtube-video",
433427
"z-10",
434428
"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-xl lg:grid-cols-main-lg md:grid-cols-main-md">
11+
<!-- First column: visible on lg and xl -->
12+
<div class="hidden md:block bg-background-light dark:bg-gray-dark-100 overflow-y-scroll"
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 lg:hidden">
1212
{{ partial "pagemeta.html" . }}
1313
</div>
1414
{{ .Content }}

0 commit comments

Comments
 (0)