mirror of https://github.com/docker/docs.git
Merge pull request #22719 from docker/published-update
publish updates from main
This commit is contained in:
commit
81d42c9847
|
@ -39,4 +39,9 @@
|
|||
],
|
||||
"description": "Insert a Hugo tabs block with two tabs and snippet stops for names and content",
|
||||
},
|
||||
"Insert a Button": {
|
||||
"prefix": ["button"],
|
||||
"body": ["{{< button url=\"$1\" text=\"$2\" >}}"],
|
||||
"description": "Insert a Hugo button",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# github.com/moby/moby v28.2.0+incompatible
|
||||
# github.com/moby/moby v28.2.1+incompatible
|
||||
# github.com/moby/buildkit v0.22.0
|
||||
# github.com/docker/buildx v0.24.0
|
||||
# github.com/docker/cli v28.2.0+incompatible
|
||||
# github.com/docker/cli v28.2.1+incompatible
|
||||
# github.com/docker/compose/v2 v2.36.2
|
||||
# github.com/docker/scout-cli v1.15.0
|
||||
|
|
|
@ -94,6 +94,9 @@
|
|||
@apply h-12 w-12 overflow-hidden;
|
||||
}
|
||||
}
|
||||
.button {
|
||||
@apply mt-1 inline-block rounded-sm bg-blue-500 p-1 px-3 text-blue-50 text-white hover:bg-blue-600 dark:bg-blue-500 hover:dark:bg-blue-400;
|
||||
}
|
||||
|
||||
.summary-bar {
|
||||
@apply my-1 mt-4 flex flex-col rounded-sm border-1 border-gray-100 bg-gray-50 p-4 dark:border-gray-800 dark:bg-gray-900;
|
||||
|
|
|
@ -104,3 +104,6 @@ input[type="search"]::-ms-clear {
|
|||
list-style-type: lower-roman;
|
||||
}
|
||||
}
|
||||
.navbar-group:first-of-type {
|
||||
margin-top: 0.2rem !important;
|
||||
}
|
||||
|
|
|
@ -118,9 +118,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
@utility navbar-entry-margin {
|
||||
@apply px-2 py-1;
|
||||
}
|
||||
|
||||
@utility navbar-group {
|
||||
@apply mt-5;
|
||||
}
|
||||
|
||||
@utility navbar-entry-background-current {
|
||||
@apply bg-gray-100 dark:bg-gray-900;
|
||||
}
|
||||
@utility navbar-group-font-title {
|
||||
font-size: var(--color-navbar-group-font-title-size);
|
||||
@apply font-semibold uppercase;
|
||||
@apply pb-1.5 font-semibold uppercase;
|
||||
color: var(--color-navbar-text);
|
||||
.dark & {
|
||||
color: var(--color-navbar-text-dark);
|
||||
|
@ -240,3 +251,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@utility chip {
|
||||
@apply border-divider-light dark:border-divider-dark inline-flex items-center gap-1 rounded-full border bg-gray-100 px-2 text-sm text-gray-800 select-none dark:bg-gray-700 dark:text-gray-200;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ This guide will walk you through the installation process, enabling you to exper
|
|||
> Commercial use of Docker Desktop in larger enterprises (more than 250
|
||||
> employees OR more than $10 million USD in annual revenue) requires a [paid subscription](https://www.docker.com/pricing/?_gl=1*1nyypal*_ga*MTYxMTUxMzkzOS4xNjgzNTM0MTcw*_ga_XJWPQMJYHQ*MTcxNjk4MzU4Mi4xMjE2LjEuMTcxNjk4MzkzNS4xNy4wLjA.).
|
||||
|
||||
<div class="not-prose">
|
||||
{{< card
|
||||
title="Docker Desktop for Mac"
|
||||
description="[Download (Apple Silicon)](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-arm64) | [Download (Intel)](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64) | [Install instructions](/desktop/setup/install/mac-install)"
|
||||
|
@ -40,7 +41,7 @@ This guide will walk you through the installation process, enabling you to exper
|
|||
title="Docker Desktop for Linux"
|
||||
description="[Install instructions](/desktop/setup/install/linux/)"
|
||||
icon="/icons/Linux.svg" >}}
|
||||
|
||||
</div>
|
||||
|
||||
Once it's installed, complete the setup process and you're all set to run a Docker container.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Docker and the broader community of Docker experts have put together many differ
|
|||
|
||||
## Docker Training
|
||||
|
||||
Expand your knowledge on all things Docker with [basic to advanced trainings from Docker experts](https://www.docker.com/resources/trainings/).
|
||||
Expand your knowledge on all things Docker with [basic to advanced trainings from Docker experts](https://www.docker.com/trainings/).
|
||||
|
||||
You can find recorded content at your own convenience, or register for a live session to participate in Q&A.
|
||||
|
||||
|
|
|
@ -40,19 +40,11 @@ Models are pulled from Docker Hub the first time they're used and stored locally
|
|||
4. Quit and reopen Docker Desktop to ensure the changes take effect.
|
||||
5. Open the **Settings** view in Docker Desktop.
|
||||
6. Navigate to **Features in development**.
|
||||
7. From the **Beta** tab, check the **Enable Docker Model Runner** setting.
|
||||
7. From the **Beta** tab, tick the **Enable Docker Model Runner** setting.
|
||||
8. If you are running on Windows with a supported NVIDIA GPU, you should also see and be able to tick the **Enable GPU-backed inference** setting.
|
||||
|
||||
You can now use the `docker model` command in the CLI and view and interact with your local models in the **Models** tab in the Docker Desktop Dashboard.
|
||||
|
||||
### Enable DMR in Docker Engine
|
||||
|
||||
1. Ensure you have installed [Docker Engine](/engine/install/).
|
||||
2. DMR is available as a package. To install it, run:
|
||||
|
||||
```console
|
||||
apt install docker-model-plugin
|
||||
```
|
||||
|
||||
## Available commands
|
||||
|
||||
### Model runner status
|
||||
|
|
|
@ -23,7 +23,7 @@ Additionally, with WSL 2, the time required to start a Docker daemon after a col
|
|||
|
||||
Before you turn on the Docker Desktop WSL 2 feature, ensure you have:
|
||||
|
||||
- At a minimum WSL version 1.1.3.0., but ideally the latest version of WSL to [avoid Docker Desktop not working as expected](best-practices.md).
|
||||
- At a minimum WSL version 2.1.5, but ideally the latest version of WSL to [avoid Docker Desktop not working as expected](best-practices.md).
|
||||
- Met the Docker Desktop for Windows' [system requirements](/manuals/desktop/setup/install/windows-install.md#system-requirements).
|
||||
- Installed the WSL 2 feature on Windows. For detailed instructions, refer to the [Microsoft documentation](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ aliases:
|
|||
- /desktop/wsl/best-practices/
|
||||
---
|
||||
|
||||
- Always use the latest version of WSL. At a minimum you must use WSL version 1.1.3.0., otherwise Docker Desktop may not work as expected. Testing, development, and documentation is based on the newest kernel versions. Older versions of WSL can cause:
|
||||
- Always use the latest version of WSL. At a minimum you must use WSL version 2.1.5, otherwise Docker Desktop may not work as expected. Testing, development, and documentation is based on the newest kernel versions. Older versions of WSL can cause:
|
||||
- Docker Desktop to hang periodically or when upgrading
|
||||
- Deployment via SCCM to fail
|
||||
- The `vmmem.exe` to consume all memory
|
||||
|
|
|
@ -23,6 +23,14 @@ For more information about:
|
|||
- Deprecated and removed features, see [Deprecated Engine Features](../deprecated.md).
|
||||
- Changes to the Engine API, see [Engine API version history](/reference/api/engine/version-history.md).
|
||||
|
||||
## 28.2.1
|
||||
|
||||
{{< release-date date="2025-05-29" >}}
|
||||
|
||||
## Packaging updates
|
||||
|
||||
- Fix packaging regression in [v28.2.0](https://github.com/moby/moby/releases/tag/v28.2.0) which broke creating the `docker` group/user on fresh installations. [docker-ce-packaging#1209](https://github.com/docker/docker-ce-packaging/issues/1209)
|
||||
|
||||
## 28.2.0
|
||||
|
||||
{{< release-date date="2025-05-28" >}}
|
||||
|
|
|
@ -73,21 +73,21 @@ To see the highest version of the API your Docker daemon and client support, use
|
|||
```console
|
||||
$ docker version
|
||||
Client: Docker Engine - Community
|
||||
Version: 28.2.0
|
||||
Version: 28.2.1
|
||||
API version: 1.50
|
||||
Go version: go1.24.3
|
||||
Git commit: 879ac3f
|
||||
Built: Wed May 28 13:30:50 2025
|
||||
Built: Wed May 28 19:24:55 2025
|
||||
OS/Arch: linux/arm64
|
||||
Context: default
|
||||
|
||||
Server: Docker Engine - Community
|
||||
Engine:
|
||||
Version: 28.2.0
|
||||
Version: 28.2.1
|
||||
API version: 1.50 (minimum version 1.24)
|
||||
Go version: go1.24.3
|
||||
Git commit: 0e2cc22
|
||||
Built: Wed May 28 13:30:50 2025
|
||||
Built: Wed May 28 19:24:55 2025
|
||||
OS/Arch: linux/arm64
|
||||
...
|
||||
```
|
||||
|
|
8
go.mod
8
go.mod
|
@ -4,18 +4,18 @@ go 1.24.0
|
|||
|
||||
require (
|
||||
github.com/docker/buildx v0.24.0 // indirect
|
||||
github.com/docker/cli v28.2.0+incompatible // indirect
|
||||
github.com/docker/cli v28.2.1+incompatible // indirect
|
||||
github.com/docker/compose/v2 v2.36.2 // indirect
|
||||
github.com/docker/scout-cli v1.15.0 // indirect
|
||||
github.com/moby/buildkit v0.22.0 // indirect
|
||||
github.com/moby/moby v28.2.0+incompatible // indirect
|
||||
github.com/moby/moby v28.2.1+incompatible // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/docker/buildx => github.com/docker/buildx v0.24.0
|
||||
github.com/docker/cli => github.com/docker/cli v28.2.0+incompatible
|
||||
github.com/docker/cli => github.com/docker/cli v28.2.1+incompatible
|
||||
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.36.2
|
||||
github.com/docker/scout-cli => github.com/docker/scout-cli v1.15.0
|
||||
github.com/moby/buildkit => github.com/moby/buildkit v0.22.0
|
||||
github.com/moby/moby => github.com/moby/moby v28.2.0+incompatible
|
||||
github.com/moby/moby => github.com/moby/moby v28.2.1+incompatible
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -172,6 +172,8 @@ github.com/docker/cli v28.1.0-rc.2+incompatible h1:BDhiR2nacubawpKAWFLqZmjGkARWP
|
|||
github.com/docker/cli v28.1.0-rc.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/cli v28.2.0+incompatible h1:Tnor4OXVIBBPlTegk65OAL+TVlG1pQxsrTw08X8w9ao=
|
||||
github.com/docker/cli v28.2.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/cli v28.2.1+incompatible h1:AYyTcuwvhl9dXdyCiXlOGXiIqSNYzTmaDNpxIISPGsM=
|
||||
github.com/docker/cli v28.2.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/compose-cli v1.0.35 h1:uZyEHLalfqBS2PiTpA1LAULyJmuQ+YtZg7nG4Xl3/Cc=
|
||||
github.com/docker/compose-cli v1.0.35/go.mod h1:mSXI4hFLpRU3EtI8NTo32bNwI0UXSr8jnq+/rYjGAUU=
|
||||
github.com/docker/compose/v2 v2.22.0 h1:3rRz4L7tPU75wRsV8JZh2/aTgerQvPa1cpzZN+tHqUY=
|
||||
|
@ -434,6 +436,8 @@ github.com/moby/moby v28.1.0-rc.2+incompatible h1:F9Ku4A7eCFvb9cYR/jk7sLC6U9+r2u
|
|||
github.com/moby/moby v28.1.0-rc.2+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
|
||||
github.com/moby/moby v28.2.0+incompatible h1:TtiT7qCEOZWnP0+GKsRUPUN3GPvSUt4/0oLOc2trQdk=
|
||||
github.com/moby/moby v28.2.0+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
|
||||
github.com/moby/moby v28.2.1+incompatible h1:UYmHExYP8S0uGKDozhYw7RJ+LpANL51g4fa3qT0Q2GA=
|
||||
github.com/moby/moby v28.2.1+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
|
||||
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
|
|
|
@ -135,10 +135,10 @@ params:
|
|||
# Latest version of the Docker Engine API
|
||||
latest_engine_api_version: "1.50"
|
||||
# Latest version of Docker Engine
|
||||
docker_ce_version: "28.2.0"
|
||||
docker_ce_version: "28.2.1"
|
||||
# Previous version of the Docker Engine
|
||||
# (Used to show e.g., "latest" and "latest"-1 in engine install examples
|
||||
docker_ce_version_prev: "28.1.1"
|
||||
docker_ce_version_prev: "28.1.0"
|
||||
# Latest Docker Compose version
|
||||
compose_version: "v2.36.2"
|
||||
# Latest BuildKit version
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
>
|
||||
<button
|
||||
@click="collapse = false"
|
||||
class="bg-blue flex items-center rounded-full px-2 text-sm text-white dark:bg-blue-400"
|
||||
class="bg-blue flex items-center rounded-full px-2 text-sm text-white dark:bg-blue-500"
|
||||
>
|
||||
<span>Show more</span>
|
||||
<span class="icon-svg"
|
||||
|
@ -53,7 +53,7 @@
|
|||
<button
|
||||
@click="collapse = true"
|
||||
x-show="!collapse"
|
||||
class="rounded-sm-b-lg bg-blue mx-auto mt-4 flex items-center px-2 text-sm text-white dark:bg-blue-800"
|
||||
class="bg-blue mx-auto mt-4 flex items-center rounded-full px-2 text-sm text-white dark:bg-blue-500"
|
||||
>
|
||||
<span>Hide</span>
|
||||
<span class="icon-svg"
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{{ $url := .Destination }}
|
||||
{{- if (strings.HasPrefix $url "http") -}}
|
||||
{{/* external link, add icon */}}
|
||||
<a
|
||||
class="link"
|
||||
href="{{ $url | safeURL }}"
|
||||
rel="noopener">
|
||||
{{- .Text | safeHTML -}}
|
||||
<span class="pl-1 icon-svg icon-sm">
|
||||
{{- partialCached "icon" "open_in_new" "open_in_new" -}}
|
||||
</span></a>
|
||||
<a class="link" href="{{ $url | safeURL }}" rel="noopener">
|
||||
{{ .Text | safeHTML }}
|
||||
<span class="pl-1 icon-svg icon-sm">
|
||||
{{ partialCached "icon" "open_in_new" "open_in_new" }}
|
||||
</span>
|
||||
</a>
|
||||
{{- else if (strings.HasPrefix $url "mailto:") -}}
|
||||
{{/* mailto link, render as normal link */}}
|
||||
<a class="link" href="{{ $url }}">{{ .Text | safeHTML }}</a>
|
||||
{{- else if (strings.HasPrefix $url "/") -}}
|
||||
{{ if (strings.HasSuffix (urls.Parse $url).Path ".md") }}
|
||||
{{/* abs path to markdown file, use ref */}}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
}
|
||||
})"
|
||||
class="bg-background-toc dark:bg-background-toc fixed top-0 z-40 hidden h-screen w-full flex-none overflow-x-hidden overflow-y-auto md:sticky md:top-16 md:z-auto md:block md:h-[calc(100vh-64px)] md:w-[300px]"
|
||||
class="bg-background-toc dark:bg-background-toc fixed top-0 z-40 hidden h-screen w-full flex-none overflow-x-hidden overflow-y-auto md:sticky md:top-16 md:z-auto md:block md:h-[calc(100vh-64px)] md:w-[320px]"
|
||||
:class="{ 'hidden': ! $store.showSidebar }"
|
||||
>
|
||||
<!-- Gray backdrop on small screens -->
|
||||
|
@ -40,7 +40,7 @@
|
|||
x-transition.opacity
|
||||
></div>
|
||||
<div
|
||||
class="bg-background-toc dark:bg-background-toc z-50 w-full p-4 md:block md:w-[300px]"
|
||||
class="bg-background-toc dark:bg-background-toc z-50 w-full p-3 md:block md:w-[300px]"
|
||||
>
|
||||
<!-- Collapse button for small screens -->
|
||||
<button class="my-4 md:hidden" @click="$store.showSidebar = false">
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
|
||||
{{- define "guide-metadata" }}
|
||||
<div
|
||||
class="flex items-center justify-between gap-8 text-sm text-gray-200 dark:text-gray-300"
|
||||
class="flex items-center justify-between gap-8 text-sm text-gray-400 dark:text-gray-300"
|
||||
>
|
||||
<div class="flex flex-wrap gap-2 md:flex-nowrap">
|
||||
{{- $langs := .GetTerms "languages" }}
|
||||
|
@ -261,9 +261,7 @@
|
|||
{{- end }}
|
||||
|
||||
{{- define "termchip" }}
|
||||
<span
|
||||
class="border-divider-light dark:border-divider-dark inline-flex min-w-0 items-center rounded-full border bg-gray-100 px-2 text-sm whitespace-nowrap text-gray-200 select-none dark:bg-gray-800 dark:text-gray-300"
|
||||
>
|
||||
<span class="chip">
|
||||
<span class="icon-svg icon-sm pb-0.5">
|
||||
{{ partialCached "icon" "tag" "tag" }}
|
||||
</span>
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "content-default.html" . }}
|
||||
<div class="prose dark:prose-invert max-w-4xl">
|
||||
<div class="md-dropdown ml-auto hidden lg:block">
|
||||
{{ partial "md-dropdown.html" . }}
|
||||
</div>
|
||||
{{ if (.Store.Get "multipage") }}
|
||||
{{- with .PrevInSection }}
|
||||
<div class="not-prose col-start-2 my-4">
|
||||
|
|
|
@ -293,19 +293,19 @@
|
|||
<div class="flex flex-col gap-4 md:flex-row">
|
||||
<a
|
||||
href="https://forums.docker.com/"
|
||||
class="cursor-pointer rounded-sm bg-white px-4 py-2 hover:bg-gray-50 dark:bg-gray-400 dark:text-white dark:hover:bg-gray-500"
|
||||
class="cursor-pointer rounded-sm bg-white px-4 py-2 hover:bg-gray-50 dark:bg-gray-500 dark:text-white dark:hover:bg-gray-600"
|
||||
>
|
||||
Visit Docker Forum
|
||||
</a>
|
||||
<a
|
||||
href="https://dockr.ly/comm-slack"
|
||||
class="cursor-pointer rounded-sm bg-white px-4 py-2 hover:bg-gray-50 dark:bg-gray-400 dark:text-white dark:hover:bg-gray-500"
|
||||
class="cursor-pointer rounded-sm bg-white px-4 py-2 hover:bg-gray-50 dark:bg-gray-500 dark:text-white dark:hover:bg-gray-600"
|
||||
>
|
||||
Join Docker Slack
|
||||
</a>
|
||||
<a
|
||||
href="https://www.docker.com/community/captains/"
|
||||
class="cursor-pointer rounded-sm bg-white px-4 py-2 hover:bg-gray-50 dark:bg-gray-400 dark:text-white dark:hover:bg-gray-500"
|
||||
class="cursor-pointer rounded-sm bg-white px-4 py-2 hover:bg-gray-50 dark:bg-gray-500 dark:text-white dark:hover:bg-gray-600"
|
||||
>
|
||||
Find your Docker Captain
|
||||
</a>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="not-prose">
|
||||
<div
|
||||
class="m-4 flex flex-col gap-4 bg-gray-200 p-6 sm:flex-row dark:bg-gray-300"
|
||||
class="mt-1.5 mb-1.5 flex flex-col gap-4 rounded-sm bg-gray-100 p-6 sm:flex-row dark:bg-gray-800"
|
||||
>
|
||||
<div class="flex flex-grow flex-col sm:items-center">
|
||||
<span><strong>Skill level</strong></span>
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
{{- if not .Page.Params.icon }}
|
||||
{{- errorf "[languages] language is missing an icon: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
|
||||
{{- end }}
|
||||
<span
|
||||
class="border-divider-light dark:border-divider-dark inline-flex items-center gap-1 rounded-full border bg-gray-100 px-2 text-sm text-gray-200 select-none dark:bg-gray-800 dark:text-gray-400"
|
||||
>
|
||||
<span class="chip">
|
||||
<img
|
||||
class="py-1"
|
||||
height="18"
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
class="bg-background-light dark:bg-background-dark absolute top-full right-0 z-50 w-screen max-w-xl rounded-sm px-6 py-4 shadow-lg"
|
||||
>
|
||||
<div id="search-bar-results">
|
||||
{{- $emptyState := `<div class="p-2 text-gray-200 dark:text-gray-500">Start typing to search… or try <button @click="open=false" class="open-kapa-widget link">Ask AI</button></div>` }}
|
||||
{{- $emptyState := `<div class="p-2 text-gray-500 dark:text-gray-400">Start typing to search… or try <button @click="open=false" class="open-kapa-widget link">Ask AI</button></div>` }}
|
||||
{{- $emptyState | safe.HTML }}
|
||||
<!-- results -->
|
||||
</div>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{{- end }}
|
||||
</div>
|
||||
{{- with ($root.Params.time) }}
|
||||
<div class="flex gap-2 text-gray-200 dark:text-gray-500">
|
||||
<div class="flex gap-2 text-gray-400 dark:text-gray-400">
|
||||
<span class="icon-svg"
|
||||
>{{ partialCached "icon" "schedule" "schedule" }}</span
|
||||
>
|
||||
|
|
|
@ -32,32 +32,36 @@
|
|||
{{- end }}
|
||||
{{- range .Params.sidebar.groups }}
|
||||
<!-- Main titles -->
|
||||
<li class="navbar-group-font-title mt-2 px-2 py-2 pt-5 pb-2">
|
||||
{{ . }}
|
||||
</li>
|
||||
{{- range where $pages "Params.sidebar.group" . }}
|
||||
{{- if .IsSection }}
|
||||
{{- template "renderList" . }}
|
||||
{{- else }}
|
||||
{{- template "renderSingle" . }}
|
||||
<div class="navbar-group">
|
||||
<li class="navbar-group-font-title">
|
||||
{{ . }}
|
||||
</li>
|
||||
{{- range where $pages "Params.sidebar.group" . }}
|
||||
{{- if .IsSection }}
|
||||
{{- template "renderList" . }}
|
||||
{{- else }}
|
||||
{{- template "renderSingle" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{/* Recursive template for sidebar items */}}
|
||||
{{ define "renderList" }}
|
||||
{{ $isCurrent := eq page . }}
|
||||
{{ $expanded := or $isCurrent (page.IsDescendant .) }}
|
||||
<li x-data="{ expanded: {{ $expanded }} }">
|
||||
<li class="" x-data="{ expanded: {{ $expanded }} }">
|
||||
<div
|
||||
class="justify-between{{ if $isCurrent }}
|
||||
bg-gray-100 dark:bg-gray-900
|
||||
{{ end }} flex w-full items-center rounded-sm px-4"
|
||||
class="{{ if $isCurrent }}
|
||||
navbar-entry-background-current
|
||||
{{ end }} flex w-full items-center justify-between rounded-sm"
|
||||
>
|
||||
<div class="w-full truncate py-1">
|
||||
<div class="navbar-entry-margin w-full truncate">
|
||||
{{- if .Permalink }}
|
||||
{{/* If the link is not empty, use it */}}
|
||||
<!-- Sections that have children and linking to a page -->
|
||||
<a
|
||||
{{ if $isCurrent }}
|
||||
aria-current="page" id="sidebar-current-page"
|
||||
|
@ -69,6 +73,7 @@
|
|||
</a>
|
||||
{{- else }}
|
||||
{{/* Otherwise, just expand the section */}}
|
||||
<!-- Sections that have children and do not link to a page -->
|
||||
<button
|
||||
@click="expanded = !expanded"
|
||||
class="hover:text-blue w-full text-left select-none hover:dark:text-blue-400"
|
||||
|
@ -77,9 +82,10 @@
|
|||
</button>
|
||||
{{- end }}
|
||||
</div>
|
||||
<!-- Expand group button -->
|
||||
<button
|
||||
@click="expanded = !expanded"
|
||||
class="rounded-sm hover:bg-gray-300 hover:dark:bg-gray-300"
|
||||
class="rounded-sm hover:bg-gray-200 hover:dark:bg-gray-800"
|
||||
>
|
||||
<span
|
||||
:class="{ 'hidden' : expanded }"
|
||||
|
@ -106,9 +112,9 @@
|
|||
|
||||
{{ define "renderSingle" }}
|
||||
{{- if .Params.sidebar.goto }}
|
||||
<li class="hover:text-blue px-4 hover:dark:text-blue-400">
|
||||
<li class="navbar-entry-margin hover:text-blue hover:dark:text-blue-400">
|
||||
<a
|
||||
class="block w-full truncate py-2"
|
||||
class="block w-full truncate"
|
||||
href="{{ .Params.sidebar.goto }}"
|
||||
title="{{ .LinkTitle }}"
|
||||
>
|
||||
|
@ -118,15 +124,15 @@
|
|||
{{- else }}
|
||||
{{ $isCurrent := eq page . }}
|
||||
<li
|
||||
class="hover:text-blue {{ if $isCurrent }}
|
||||
bg-gray-100 dark:bg-gray-900
|
||||
{{ end }} rounded-sm px-4 hover:dark:text-blue-400"
|
||||
class="navbar-entry-margin hover:text-blue {{ if $isCurrent }}
|
||||
navbar-entry-background-current
|
||||
{{ end }} rounded-sm hover:dark:text-blue-400"
|
||||
>
|
||||
<a
|
||||
{{ if $isCurrent }}
|
||||
aria-current="page" id="sidebar-current-page"
|
||||
{{ end }}
|
||||
class="block w-full truncate py-2"
|
||||
class="block w-full truncate"
|
||||
href="{{ .Permalink }}"
|
||||
title="{{ .LinkTitle }}"
|
||||
>
|
||||
|
@ -139,8 +145,8 @@
|
|||
{{ define "renderTitle" }}
|
||||
{{ .LinkTitle }}
|
||||
{{- with .Params.sidebar.badge }}
|
||||
<span
|
||||
>{{- partial "components/badge.html" (dict "color" .color "content" .text) }}</span
|
||||
>
|
||||
<span>
|
||||
{{- partial "components/badge.html" (dict "color" .color "content" .text) }}
|
||||
</span>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
{{- if eq .File nil }}
|
||||
{{- errorf "[tags] Undefined tag: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
|
||||
{{- end }}
|
||||
<a
|
||||
class="border-divider-light dark:border-divider-dark bg-gray-00 inline-flex items-center rounded-full border px-2 text-sm text-gray-800 select-none hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-200 hover:dark:bg-gray-700"
|
||||
href="{{ .Permalink }}"
|
||||
>
|
||||
<a class="chip" href="{{ .Permalink }}">
|
||||
<span class="icon-svg icon-sm pb-0.5">
|
||||
{{ partialCached "icon" "tag" "tag" }}
|
||||
</span>
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
{{- else -}}
|
||||
{{ $url = ref .Page $url }}
|
||||
{{- end -}}
|
||||
<div class="not-prose my-4">
|
||||
<a
|
||||
href="{{ $url }}"
|
||||
class="cursor-pointer rounded-sm bg-blue-500 px-4 py-2 text-white hover:bg-blue-400 dark:bg-blue-800 dark:hover:bg-blue-700"
|
||||
>{{ $text }}</a
|
||||
>
|
||||
<div class="button not-prose">
|
||||
<a href="{{ $url }}">{{ $text }}</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue