hugo: css overhaul

- Remove manual breakpoint definitions and use tailwind defaults
- Fix various overflow and other rendering issues

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-04-24 16:39:15 +02:00
parent 22ea9e5e34
commit 46a3512a54
22 changed files with 170 additions and 159 deletions

View File

@ -16,9 +16,12 @@
background: theme("colors.gray.light.200"); background: theme("colors.gray.light.200");
display: inline-block; display: inline-block;
margin: 0; margin: 0;
white-space: nowrap;
font-weight: 400; font-weight: 400;
overflow-wrap: anywhere;
padding: 0 4px; padding: 0 4px;
table & {
overflow-wrap: nowrap;
}
} }
.highlight { .highlight {

View File

@ -73,5 +73,10 @@
@apply text-lg; @apply text-lg;
line-height: 1.75; line-height: 1.75;
} }
table {
display: block;
overflow-x: auto;
max-width: 100%;
}
} }
} }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg height="24" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3477.6 530.79"> <svg height="22" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3477.6 530.79">
<defs> <defs>
<style> <style>
.cls-1 { .cls-1 {

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,58 @@
<svg class="dark:hidden" width="555" height="334" viewBox="0 0 555 334" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g style="mix-blend-mode: multiply">
<path d="M0 249.997L283.445 0H555V334H89.8843L0 249.997Z" fill="url(#paint0_linear_129_29139)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M80 84.003L363.445 334H554.5V0H169.884L80 84.003Z" fill="url(#paint1_linear_129_29139)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M279 334L555 104V182.33V254.174V334H279Z" fill="url(#paint2_linear_129_29139)" />
</g>
<defs>
<linearGradient id="paint0_linear_129_29139" x1="18.5" y1="61.5" x2="502" y2="240.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C0E0FA" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint1_linear_129_29139" x1="98.5" y1="272.5" x2="582" y2="93.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#F7ECFF" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint2_linear_129_29139" x1="282.381" y1="-33.7561" x2="1315.56" y2="352.19"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C6EAE1" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
</defs>
</svg>
<svg class="hidden dark:block" width="555" height="334" viewBox="0 0 555 334" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g style="mix-blend-mode: multiply">
<path d="M0 249.997L283.445 0H555V334H89.8843L0 249.997Z" fill="url(#paint0_linear_129_29443)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M80 84.003L363.445 334H554.5V0H169.884L80 84.003Z" fill="url(#paint1_linear_129_29443)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M279 334L555 104V182.33V254.174V334H279Z" fill="url(#paint2_linear_129_29443)" />
</g>
<defs>
<linearGradient id="paint0_linear_129_29443" x1="18.5" y1="61.5" x2="502" y2="240.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C0E0FA" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint1_linear_129_29443" x1="98.5" y1="272.5" x2="582" y2="93.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#F7ECFF" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint2_linear_129_29443" x1="282.381" y1="-33.7561" x2="1315.56" y2="352.19"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C6EAE1" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -23,7 +23,7 @@ In addition to the language-specific modules, Docker documentation also provides
Learn how to containerize your applications and start developing using Docker. Choose one of the following languages to get started. Learn how to containerize your applications and start developing using Docker. Choose one of the following languages to get started.
<div class="grid grid-cols-3 auto-rows-fr sm:flex-col sm:h-auto gap-4"> <div class="grid grid-cols-2 md:grid-cols-3 h-auto gap-4">
<div class="flex items-center flex-1 shadow p-4"> <div class="flex items-center flex-1 shadow p-4">
<a href="/language/nodejs/"><img class="m-auto rounded" src="/language/images/nodejs.webp" alt="Develop with Node"></a> <a href="/language/nodejs/"><img class="m-auto rounded" src="/language/images/nodejs.webp" alt="Develop with Node"></a>
</div> </div>

View File

@ -5,6 +5,7 @@
"!mt-0", "!mt-0",
"--mount", "--mount",
"--tmpfs", "--tmpfs",
"-mb-3",
"-mt-4", "-mt-4",
"-top-16", "-top-16",
"-v", "-v",
@ -112,7 +113,6 @@
"Without-systemd", "Without-systemd",
"absolute", "absolute",
"aspect-video", "aspect-video",
"auto-rows-fr",
"bake-action", "bake-action",
"basis-1/3", "basis-1/3",
"basis-2/3", "basis-2/3",
@ -150,6 +150,7 @@
"build-push-action", "build-push-action",
"chroma", "chroma",
"cls-1", "cls-1",
"col-start-2",
"cursor-not-allowed", "cursor-not-allowed",
"cursor-pointer", "cursor-pointer",
"dark:bg-accent-dark", "dark:bg-accent-dark",
@ -208,8 +209,6 @@
"flex-1", "flex-1",
"flex-col", "flex-col",
"flex-col-reverse", "flex-col-reverse",
"flex-initial",
"flex-row-reverse",
"flex-wrap", "flex-wrap",
"font-medium", "font-medium",
"footnote-backref", "footnote-backref",
@ -227,17 +226,15 @@
"gap-6", "gap-6",
"gap-8", "gap-8",
"grid", "grid",
"grid-cols-1",
"grid-cols-2", "grid-cols-2",
"grid-cols-3",
"grid-cols-4",
"group", "group",
"group-hover:block'", "group-hover:block'",
"grow",
"h-16", "h-16",
"h-2", "h-2",
"h-32", "h-32",
"h-8", "h-8",
"h-[334px]", "h-auto",
"h-full", "h-full",
"h-max", "h-max",
"h-screen", "h-screen",
@ -258,6 +255,7 @@
"icon-sm", "icon-sm",
"icon-svg", "icon-svg",
"important", "important",
"information",
"inline", "inline",
"inset-0", "inset-0",
"invertible", "invertible",
@ -272,14 +270,16 @@
"leading-snug", "leading-snug",
"left-0", "left-0",
"lg:block", "lg:block",
"lg:flex",
"lg:grid-cols-2", "lg:grid-cols-2",
"lg:grow-0", "lg:grid-cols-3",
"lg:grid-cols-main-lg",
"lg:hidden", "lg:hidden",
"lg:link", "lg:max-w-[300px]",
"lg:pb-0", "lg:ml-auto",
"lg:px-4", "lg:scale-100",
"lg:text-base", "lg:text-base",
"lg:w-full", "lg:w-[1200px]",
"link", "link",
"lntable", "lntable",
"lntd", "lntd",
@ -287,24 +287,20 @@
"max-h-full", "max-h-full",
"max-w-56", "max-w-56",
"max-w-[1400px]", "max-w-[1400px]",
"max-w-[66%]", "max-w-[840px]",
"max-w-full", "max-w-full",
"max-w-none", "max-w-none",
"mb-4", "mb-4",
"mb-8", "mb-8",
"md:block", "md:block",
"md:fixed", "md:col-start-3",
"md:flex", "md:flex-row",
"md:gap-2", "md:gap-8",
"md:grid-cols-1", "md:grid-cols-2",
"md:h-screen", "md:grid-cols-3",
"md:hidden", "md:h-[334px]",
"md:ml-[21px]", "md:max-w-[66%]",
"md:scale-50", "md:scale-100",
"md:w-full",
"md:w-lvw",
"md:w-screen",
"md:z-10",
"min-h-screen", "min-h-screen",
"min-w-0", "min-w-0",
"ml-3", "ml-3",
@ -332,8 +328,10 @@
"p-6", "p-6",
"p-8", "p-8",
"p-[2px]", "p-[2px]",
"pb-0",
"pb-0.5", "pb-0.5",
"pb-2", "pb-2",
"pb-32",
"pb-4", "pb-4",
"pl-1", "pl-1",
"pl-2", "pl-2",
@ -341,6 +339,7 @@
"pl-4", "pl-4",
"pl-5", "pl-5",
"place-items-center", "place-items-center",
"pr-2",
"prose", "prose",
"pt-0", "pt-0",
"px-1", "px-1",
@ -351,6 +350,7 @@
"py-2", "py-2",
"py-20", "py-20",
"py-4", "py-4",
"py-8",
"regular-install", "regular-install",
"relative", "relative",
"restricted", "restricted",
@ -364,23 +364,13 @@
"rounded-b-lg", "rounded-b-lg",
"rounded-full", "rounded-full",
"rounded-sm", "rounded-sm",
"scale-50",
"scale-75",
"scroll-mt-20", "scroll-mt-20",
"scroll-mt-36", "scroll-mt-36",
"self-center", "self-center",
"shadow", "shadow",
"shrink",
"shrink-0",
"sidebar-hover", "sidebar-hover",
"sm:col-start-2",
"sm:flex",
"sm:flex-col",
"sm:grid-cols-2",
"sm:h-auto",
"sm:h-full",
"sm:hidden",
"sm:max-w-full",
"sm:py-8",
"sm:scale-75",
"space-x-2", "space-x-2",
"space-y-4", "space-y-4",
"sticky", "sticky",
@ -421,14 +411,17 @@
"w-2", "w-2",
"w-8", "w-8",
"w-[1200px]", "w-[1200px]",
"w-[300px]",
"w-[32px]", "w-[32px]",
"w-[840px]",
"w-full", "w-full",
"w-lvw",
"warning", "warning",
"xl:grid-cols-1",
"xl:grid-cols-2",
"xl:grid-cols-3", "xl:grid-cols-3",
"xl:grid-cols-4",
"xl:grid-cols-main",
"xl:hidden",
"xl:no-underline",
"xl:pb-2",
"xl:w-[1200px]",
"youtube-video", "youtube-video",
"z-10", "z-10",
"z-20", "z-20",

View File

@ -5,7 +5,7 @@ editPage:
requestChanges: requestChanges:
other: Request changes other: Request changes
tableOfContents: tableOfContents:
other: Contents other: Table of contents
relatedContent: relatedContent:
other: Related content other: Related content

View File

@ -7,17 +7,34 @@
<body class="bg-background-light text-base dark:bg-background-dark dark:text-white"> <body class="bg-background-light text-base dark:bg-background-dark dark:text-white">
{{ partial "header.html" . }} {{ partial "header.html" . }}
<main class="flex"> <main class="grid grid-cols-1 xl:grid-cols-main lg:grid-cols-main-lg">
<div id="sidebar" <!-- First column: visible on lg and xl -->
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"> <div class="hidden lg:block bg-background-light dark:bg-gray-dark-100"
{{- $classes := "'fixed', 'z-20', 'left-0', 'top-16', 'w-full', 'flex', 'h-lvh'" }}
x-data @togglesidebar.window="
if ($store.showSidebar == false) {
document.body.classList.add('overflow-hidden');
$el.classList.remove('hidden');
$el.classList.add({{$classes}});
$store.showSidebar = true;
return;
}
document.body.classList.remove('overflow-hidden');
$el.classList.add('hidden');
$el.classList.remove({{$classes}});
$store.showSidebar = false;
"
>
<div class="w-full ml-auto p-2">
{{ block "left" . }} {{ block "left" . }}
{{ end }} {{ end }}
</div>
</div> </div>
<div class="w-[840px] flex-initial overflow-clip p-6 pt-0 md:w-lvw"> <div class="min-w-0 px-4 pb-32">
{{ block "main" . }} {{ block "main" . }}
{{ end }} {{ end }}
</div> </div>
<div class="sticky top-16 h-screen w-[300px] shrink grow overflow-y-scroll lg:hidden"> <div class="sticky top-16 pb-32 h-screen hidden lg:block overflow-x-hidden overflow-y-scroll pr-2">
{{ block "right" . }} {{ block "right" . }}
{{ end }} {{ end }}
</div> </div>

View File

@ -8,7 +8,7 @@
{{ with .Title }} {{ with .Title }}
<h1 class="scroll-mt-36">{{ . }}</h1> <h1 class="scroll-mt-36">{{ . }}</h1>
{{ end }} {{ end }}
<div class="hidden lg:block"> <div class="block xl:hidden">
{{ partial "pagemeta.html" . }} {{ partial "pagemeta.html" . }}
</div> </div>
{{ .Content }} {{ .Content }}

View File

@ -8,7 +8,7 @@
{{ with .Title }} {{ with .Title }}
<h1 class="scroll-mt-36">{{ . }}</h1> <h1 class="scroll-mt-36">{{ . }}</h1>
{{ end }} {{ end }}
<div class="hidden lg:block"> <div class="block xl:hidden">
{{ partial "pagemeta.html" . }} {{ partial "pagemeta.html" . }}
<hr> <hr>
</div> </div>

View File

@ -16,7 +16,7 @@
</div> </div>
{{ partial "header.html" . }} {{ partial "header.html" . }}
<main class="flex min-h-screen w-full flex-col items-stretch self-center"> <main class="flex min-h-screen w-full flex-col items-stretch self-center">
<div class="flex w-[1200px] flex-col items-stretch gap-20 self-center py-20 lg:w-full lg:px-4"> <div class="flex xl:w-[1200px] flex-col items-stretch gap-20 self-center py-20 w-full px-4">
<div class="bg-pattern-blue relative overflow-hidden rounded drop-shadow"> <div class="bg-pattern-blue relative overflow-hidden rounded drop-shadow">
<div class="flex h-full flex-col items-start justify-between gap-4 p-8"> <div class="flex h-full flex-col items-start justify-between gap-4 p-8">
<div class="flex items-center gap-6"> <div class="flex items-center gap-6">
@ -34,14 +34,14 @@
Get Docker Get Docker
</a> </a>
</div> </div>
<div class="absolute bottom-0 right-0 origin-bottom-right md:scale-50"> <div class="absolute bottom-0 right-0 origin-bottom-right scale-50 lg:scale-100">
<img class="dark:hidden" alt="Low-fi desktop app" src="/assets/images/app-wf-light-1.svg" /> <img class="dark:hidden" alt="Low-fi desktop app" src="/assets/images/app-wf-light-1.svg" />
<img class="hidden dark:block" alt="Low-fi desktop app" src="/assets/images/app-wf-dark-1.svg" /> <img class="hidden dark:block" alt="Low-fi desktop app" src="/assets/images/app-wf-dark-1.svg" />
</div> </div>
</div> </div>
<div> <div>
<div class="grid grid-cols-3 gap-4 sm:flex sm:flex-col md:grid-cols-1"> <div class="grid grid-cols-1 gap-4 lg:grid-cols-3">
<div> <div>
<a class="h-full" href="/get-started/overview/"> <a class="h-full" href="/get-started/overview/">
<div <div
@ -109,7 +109,7 @@
</div> </div>
</div> </div>
<div class="z-10 grid grid-cols-2 gap-20 md:grid-cols-1"> <div class="z-10 grid grid-cols-1 gap-20 lg:grid-cols-2">
<div class="bg-pattern-verde relative rounded p-6 drop-shadow"> <div class="bg-pattern-verde relative rounded p-6 drop-shadow">
<div class="flex h-full flex-col items-start justify-between gap-12"> <div class="flex h-full flex-col items-start justify-between gap-12">
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
@ -126,7 +126,7 @@
</a> </a>
</div> </div>
</div> </div>
<div class="absolute bottom-0 right-0 origin-bottom-right sm:scale-75"> <div class="absolute bottom-0 right-0 origin-bottom-right scale-75 md:scale-100">
<img class="dark:hidden" alt="Low-fi desktop app" src="/assets/images/app-wf-light-2.svg" /> <img class="dark:hidden" alt="Low-fi desktop app" src="/assets/images/app-wf-light-2.svg" />
<img class="hidden dark:block" alt="Low-fi desktop app" src="/assets/images/app-wf-dark-2.svg" /> <img class="hidden dark:block" alt="Low-fi desktop app" src="/assets/images/app-wf-dark-2.svg" />
</div> </div>
@ -144,12 +144,12 @@
native multi-platform builds. Get started today for free. native multi-platform builds. Get started today for free.
</p> </p>
</div> </div>
<div class="grid grid-cols-3 gap-4 justify-self-end sm:grid-cols-2"> <div class="grid grid-cols-2 gap-4 justify-self-end md:grid-cols-3">
<a href="https://build.docker.com/" <a href="https://build.docker.com/"
class="cursor-pointer rounded bg-blue-light px-4 py-2 text-white transition duration-300 hover:bg-blue-light-400 dark:bg-blue-dark-400 dark:hover:bg-blue-dark">Dashboard</a> class="cursor-pointer rounded bg-blue-light px-4 py-2 text-white transition duration-300 hover:bg-blue-light-400 dark:bg-blue-dark-400 dark:hover:bg-blue-dark">Dashboard</a>
<a href="/build/cloud/" <a href="/build/cloud/"
class="cursor-pointer rounded bg-blue-light px-4 py-2 text-white transition duration-300 hover:bg-blue-light-400 dark:bg-blue-dark-400 dark:hover:bg-blue-dark">Docs</a> class="cursor-pointer rounded bg-blue-light px-4 py-2 text-white transition duration-300 hover:bg-blue-light-400 dark:bg-blue-dark-400 dark:hover:bg-blue-dark">Docs</a>
<div class="ml-auto sm:col-start-2"> <div class="ml-auto col-start-2 md:col-start-3">
{{ $dbcLogoWhite := resources.Get "images/build-cloud-white.svg" }} {{ $dbcLogoWhite := resources.Get "images/build-cloud-white.svg" }}
{{ $dbcLogoLight := resources.Get "images/build-cloud-light.svg" }} {{ $dbcLogoLight := resources.Get "images/build-cloud-light.svg" }}
<img class="hidden h-full w-full dark:block" alt="Docker Build Cloud logo" src="{{ $dbcLogoWhite.Permalink }}" /> <img class="hidden h-full w-full dark:block" alt="Docker Build Cloud logo" src="{{ $dbcLogoWhite.Permalink }}" />
@ -163,7 +163,7 @@
<div> <div>
<h2 class="mb-4 text-xl">Browse by section</h2> <h2 class="mb-4 text-xl">Browse by section</h2>
<div class="grid grid-cols-4 gap-4 sm:flex sm:flex-col lg:grid-cols-2 xl:grid-cols-3"> <div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
{{ range .Params.grid }} {{ range .Params.grid }}
<div> <div>
<div <div
@ -203,9 +203,9 @@
</div> </div>
<div <div
class="relative flex h-[334px] items-center justify-center overflow-hidden bg-gray-light-100 dark:bg-gray-dark-200 sm:h-full sm:py-8"> class="relative flex md:h-[334px] items-center justify-center overflow-hidden bg-gray-light-100 dark:bg-gray-dark-200 h-full py-8">
<div class="w-[1200px] px-4"> <div class="w-[1200px] px-4">
<div class="flex max-w-[66%] flex-col gap-8 sm:max-w-full"> <div class="flex md:max-w-[66%] flex-col gap-8 max-w-full">
<h2 class="text-2xl">Community resources</h2> <h2 class="text-2xl">Community resources</h2>
<p> <p>
Find fellow Docker enthusiasts, engage in insightful discussions, Find fellow Docker enthusiasts, engage in insightful discussions,
@ -213,7 +213,7 @@
offer a rich online experience for developers to create valuable offer a rich online experience for developers to create valuable
connections that challenge and inspire! connections that challenge and inspire!
</p> </p>
<div class="flex gap-4 sm:flex-col"> <div class="flex gap-4 flex-col md:flex-row">
<a href="https://forums.docker.com/" <a href="https://forums.docker.com/"
class="cursor-pointer rounded bg-white px-4 py-2 text-blue-light hover:bg-gray-light-100 dark:bg-gray-dark-400 dark:text-white dark:hover:bg-gray-dark-500"> class="cursor-pointer rounded bg-white px-4 py-2 text-blue-light hover:bg-gray-light-100 dark:bg-gray-dark-400 dark:text-white dark:hover:bg-gray-dark-500">
Visit Docker Forum Visit Docker Forum
@ -229,65 +229,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="absolute right-0 top-0 sm:hidden"> <div class="absolute right-0 top-0 hidden md:block">
<svg class="dark:hidden" width="555" height="334" viewBox="0 0 555 334" fill="none" {{- (resources.Get "images/home-abstract-faint.svg").Content | safe.HTML -}}
xmlns="http://www.w3.org/2000/svg">
<g style="mix-blend-mode: multiply">
<path d="M0 249.997L283.445 0H555V334H89.8843L0 249.997Z" fill="url(#paint0_linear_129_29139)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M80 84.003L363.445 334H554.5V0H169.884L80 84.003Z" fill="url(#paint1_linear_129_29139)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M279 334L555 104V182.33V254.174V334H279Z" fill="url(#paint2_linear_129_29139)" />
</g>
<defs>
<linearGradient id="paint0_linear_129_29139" x1="18.5" y1="61.5" x2="502" y2="240.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C0E0FA" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint1_linear_129_29139" x1="98.5" y1="272.5" x2="582" y2="93.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#F7ECFF" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint2_linear_129_29139" x1="282.381" y1="-33.7561" x2="1315.56" y2="352.19"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C6EAE1" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
</defs>
</svg>
<svg class="hidden dark:block" width="555" height="334" viewBox="0 0 555 334" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g style="mix-blend-mode: multiply">
<path d="M0 249.997L283.445 0H555V334H89.8843L0 249.997Z" fill="url(#paint0_linear_129_29443)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M80 84.003L363.445 334H554.5V0H169.884L80 84.003Z" fill="url(#paint1_linear_129_29443)" />
</g>
<g style="mix-blend-mode: multiply">
<path d="M279 334L555 104V182.33V254.174V334H279Z" fill="url(#paint2_linear_129_29443)" />
</g>
<defs>
<linearGradient id="paint0_linear_129_29443" x1="18.5" y1="61.5" x2="502" y2="240.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C0E0FA" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint1_linear_129_29443" x1="98.5" y1="272.5" x2="582" y2="93.5"
gradientUnits="userSpaceOnUse">
<stop stop-color="#F7ECFF" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
<linearGradient id="paint2_linear_129_29443" x1="282.381" y1="-33.7561" x2="1315.56" y2="352.19"
gradientUnits="userSpaceOnUse">
<stop stop-color="#C6EAE1" />
<stop offset="1" stop-color="#EFEFF2" />
</linearGradient>
</defs>
</svg>
</div> </div>
</div> </div>
</main> </main>

View File

@ -1,3 +1,5 @@
<aside class="space-y-4 lg:hidden w-[300px]"> <aside class="py-4 space-y-4">
{{ partial "toc-cli.html" . }} <div id="TableOfContents">
{{ partial "toc-cli.html" . }}
</div>
</aside> </aside>

View File

@ -1,6 +1,6 @@
<div class="flex justify-center py-20 px-4 bg-gray-light-200/50 dark:bg-gray-dark-300/50"> <div class="flex justify-center py-20 px-4 bg-gray-light-200/50 dark:bg-gray-dark-300/50">
<div class="flex w-[1200px] flex-col gap-10"> <div class="flex w-full max-w-[840px] flex-col gap-10">
<div class="flex sm:flex-col gap-4 items-center justify-evenly"> <div class="flex flex-col md:flex-row gap-4 items-center justify-evenly">
<a class="underline-offset-2 hover:underline" href="https://www.docker.com/">Product offerings</a> <a class="underline-offset-2 hover:underline" href="https://www.docker.com/">Product offerings</a>
<a class="underline-offset-2 hover:underline" href="https://www.docker.com/pricing/">Pricing</a> <a class="underline-offset-2 hover:underline" href="https://www.docker.com/pricing/">Pricing</a>
<a class="underline-offset-2 hover:underline" href="https://www.docker.com/company/">About us</a> <a class="underline-offset-2 hover:underline" href="https://www.docker.com/company/">About us</a>
@ -8,7 +8,7 @@
<a class="underline-offset-2 hover:underline" href="https://github.com/docker/docs/blob/main/CONTRIBUTING.md">Contribute</a> <a class="underline-offset-2 hover:underline" href="https://github.com/docker/docs/blob/main/CONTRIBUTING.md">Contribute</a>
</div> </div>
<hr class="text-divider-light dark:text-divider-dark" /> <hr class="text-divider-light dark:text-divider-dark" />
<div class="grid grid-cols-3 place-items-center gap-8 md:grid-cols-1"> <div class="grid lg:grid-cols-3 place-items-center gap-8 grid-cols-1">
<p class="text-sm"> <p class="text-sm">
Copyright © 2013-{{ time.Now.Year}} Docker Inc. All rights reserved. Copyright © 2013-{{ time.Now.Year}} Docker Inc. All rights reserved.
</p> </p>

View File

@ -1,16 +1,9 @@
<header class="sticky top-0 z-20 h-16 px-4 text-white bg-gradient-to-r from-accent-light to-blue-light-500 dark:from-accent-dark dark:to-blue-dark-100"> <header class="sticky top-0 z-20 h-16 px-4 text-white bg-gradient-to-r from-accent-light to-blue-light-500 dark:from-accent-dark dark:to-blue-dark-100">
<div class="mx-auto flex h-full max-w-[1400px] items-center justify-between"> <div class="mx-auto flex h-full max-w-[1400px] items-center justify-between">
<div class="flex h-full items-center gap-8 md:gap-2"> <div class="flex h-full items-center md:gap-8 gap-2">
{{ if not .IsHome }} {{ if not .IsHome }}
<button x-data @click="() => { <button x-data @click="$dispatch('togglesidebar')"
$store.showSidebar = ! $store.showSidebar; class="icon-svg block px-4 lg:hidden h-full" aria-label="Menu">
const sidebar = document.querySelector('#sidebar');
if ($store.showSidebar) {
sidebar.classList.replace('md:hidden', 'md:block');
} else {
sidebar.classList.replace('md:block', 'md:hidden');
}
}" class="icon-svg hidden px-4 md:block" aria-label="Menu">
{{ partialCached "icon" "menu" "menu" }} {{ partialCached "icon" "menu" "menu" }}
</button> </button>
{{ end }} {{ end }}

View File

@ -14,7 +14,7 @@
</div> </div>
{{- end }} {{- end }}
{{- with $toc }} {{- with $toc }}
<div class="text-lg pb-2 lg:pb-0">Table of contents</div> <div class="text-lg pb-0 xl:pb-2">{{ T "tableOfContents" }}</div>
<nav class="toc"> <nav class="toc">
{{ $root := (index page.Fragments.Headings 0).Headings }} {{ $root := (index page.Fragments.Headings 0).Headings }}
{{- template "walkHeadingFragments" $root }} {{- template "walkHeadingFragments" $root }}
@ -30,7 +30,7 @@
{{- range . }} {{- range . }}
{{- if and (ge .Level $min) (le .Level $max) }} {{- if and (ge .Level $min) (le .Level $max) }}
<li> <li>
<a class="lg:link" href="#{{ .ID }}">{{ .Title }}</a> <a class="link xl:no-underline" href="#{{ .ID }}">{{ .Title }}</a>
</li> </li>
{{- end }} {{- end }}
{{- with .Headings }} {{- with .Headings }}

View File

@ -6,7 +6,7 @@
{{ $firstSection := (index ($scratch.GetSortedMapValues "sections") 0).title }} {{ $firstSection := (index ($scratch.GetSortedMapValues "sections") 0).title }}
{{/* Render the top-nav in sidebar for small screens */}} {{/* Render the top-nav in sidebar for small screens */}}
<nav class="text-sm py-4 hidden gap-4 pl-4 md:flex flex-col justify-evenly"> <nav class="text-sm pb-4 gap-4 flex lg:hidden flex-col justify-evenly">
<div class="text-gray-light dark:text-gray-dark">Main sections</div> <div class="text-gray-light dark:text-gray-dark">Main sections</div>
{{ range site.Menus.main }} {{ range site.Menus.main }}
<div class="pl-2 underline-offset-8 decoration-2 hover:underline decoration-blue-light dark:decoration-blue-dark hover:opacity-75 <div class="pl-2 underline-offset-8 decoration-2 hover:underline decoration-blue-light dark:decoration-blue-dark hover:opacity-75
@ -22,9 +22,8 @@
{{ range $i, $e := ($scratch.GetSortedMapValues "sections") }} {{ range $i, $e := ($scratch.GetSortedMapValues "sections") }}
{{ $allSections = $allSections | append (index $e "title") }} {{ $allSections = $allSections | append (index $e "title") }}
{{ end }} {{ end }}
<hr> <nav id="sectiontree" class="text-sm flex flex-col">
<nav id="sectiontree" class="text-sm w-[300px] md:w-full flex flex-col"> <div class="block py-4 lg:hidden text-gray-light dark:text-gray-dark">This section</div>
<div class="hidden md:block p-4 text-gray-light dark:text-gray-dark">This section</div>
{{/* The current page is in the table of contents */}} {{/* The current page is in the table of contents */}}
<ul> <ul>
{{/* Walk the toc.yaml nodes under the current main section */}} {{/* Walk the toc.yaml nodes under the current main section */}}
@ -55,7 +54,7 @@
{{ partialCached "icon" "expand_less" "expand_less" }} {{ partialCached "icon" "expand_less" "expand_less" }}
</span> </span>
</button> </button>
<ul class="{{if not $expanded}}hidden {{end}}ml-3 md:ml-[21px]"> <ul class="{{if not $expanded}}hidden {{end}}ml-3">
{{ range .entry.section }} {{ range .entry.section }}
{{ template "tocRender" (dict "entry" . "ctx" $ctx "sections" $sections ) }} {{ template "tocRender" (dict "entry" . "ctx" $ctx "sections" $sections ) }}
{{ end }} {{ end }}

View File

@ -1,5 +1,5 @@
<div class="text-lg pb-2">{{ T "tableOfContents" }}</div> <div class="text-lg pb-2">{{ T "tableOfContents" }}</div>
<nav id="TableOfContents"> <nav class="toc">
<ul> <ul>
{{ range (.Scratch.Get "headings") }} {{ range (.Scratch.Get "headings") }}
{{/* add left padding depending on level (pl-2, pl-3, pl-4) */}} {{/* add left padding depending on level (pl-2, pl-3, pl-4) */}}

View File

@ -2,10 +2,10 @@
{{ $firstSection := (index ($scratch.GetSortedMapValues "sections") 0).title }} {{ $firstSection := (index ($scratch.GetSortedMapValues "sections") 0).title }}
<div> <div>
<nav> <nav>
<ul class="box-content flex mt-1 gap-4 md:hidden"> <ul class="mt-1 box-content hidden gap-4 lg:flex">
{{ range site.Menus.main }} {{ range site.Menus.main }}
<li {{- if or (eq $firstSection .Name) }} class="border-b-4" {{- end }}> <li {{- if or (eq $firstSection .Name) }} class="border-b-4" {{- end }}>
<a class="block py-1 px-2" href="{{ .URL }}">{{ .Name }}</a> <a class="block px-2 py-1" href="{{ .URL }}">{{ .Name }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View File

@ -1,5 +1,5 @@
{{ $cols := .Get "cols" | default 3 }} {{ $cols := .Get "cols" | default 3 }}
<div class="not-prose grid grid-cols-{{ $cols }} xl:grid-cols-{{ sub $cols 1 }} gap-4 sm:flex sm:flex-col"> <div class="not-prose grid grid-cols-1 md:grid-cols-{{ math.Max 2 (sub $cols 1) }} lg:grid-cols-{{ $cols }} gap-4">
{{ $items := index .Page.Params (.Get "items" | default "grid") }} {{ $items := index .Page.Params (.Get "items" | default "grid") }}
{{ range $items }} {{ range $items }}
{{ $opts := dict "title" .title "link" .link "description" .description "icon" .icon "image" .image }} {{ $opts := dict "title" .title "link" .link "description" .description "icon" .icon "image" .image }}

View File

@ -8,7 +8,7 @@
<body class="flex flex-col min-h-screen bg-background-light text-base dark:bg-background-dark dark:text-white"> <body class="flex flex-col min-h-screen bg-background-light text-base dark:bg-background-dark dark:text-white">
{{ partial "header.html" . }} {{ partial "header.html" . }}
<main class="flex justify-center"> <main class="flex justify-center">
<div class="w-[1200px] overflow-clip p-6 pt-0 md:w-lvw"> <div class="lg:w-[1200px] overflow-clip p-6 pt-0 w-lvw">
{{ block "main" . }} {{ block "main" . }}
{{ end }} {{ end }}
</div> </div>

View File

@ -3,7 +3,7 @@
<article class="DocSearch-content prose max-w-none dark:prose-invert"> <article class="DocSearch-content prose max-w-none dark:prose-invert">
<h1 class="scroll-mt-36">{{ .Title }}</h1> <h1 class="scroll-mt-36">{{ .Title }}</h1>
{{ .Content }} {{ .Content }}
<div class="grid grid-cols-3 gap-4 sm:flex sm:flex-col lg:grid-cols-2"> <div class="grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3">
{{ range site.Taxonomies.tags }} {{ range site.Taxonomies.tags }}
{{ partial "components/card.html" {{ partial "components/card.html"
(dict (dict

View File

@ -44,6 +44,11 @@ module.exports = {
}, },
}, },
}), }),
gridTemplateColumns: {
'main': 'minmax(300px, 1fr) minmax(840px, 1fr) 1fr',
'main-lg': '300px 1fr',
},
}, },
// theme values // theme values
@ -58,13 +63,6 @@ module.exports = {
"4xl": ["2.5rem", { letterSpacing: "-0.015em", fontWeight: 500 }], "4xl": ["2.5rem", { letterSpacing: "-0.015em", fontWeight: 500 }],
}, },
screens: {
sm: { max: "640px" },
md: { max: "1024px" },
lg: { max: "1280px" },
xl: { max: "1440px" },
},
colors: { colors: {
white: "#fff", white: "#fff",
black: "#000", black: "#000",