diff --git a/assets/css/typography.css b/assets/css/typography.css index a0c6511e59..008e7af704 100644 --- a/assets/css/typography.css +++ b/assets/css/typography.css @@ -73,10 +73,5 @@ @apply text-lg; line-height: 1.75; } - table { - display: block; - overflow-x: auto; - max-width: 100%; - } } } diff --git a/hugo_stats.json b/hugo_stats.json index ff59b54840..6e834ec746 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -413,6 +413,7 @@ "outline-none", "overflow-clip", "overflow-hidden", + "overflow-x-auto", "overflow-x-hidden", "overflow-y-auto", "p-1", diff --git a/layouts/_default/_markup/render-table.html b/layouts/_default/_markup/render-table.html new file mode 100644 index 0000000000..1a32125cc1 --- /dev/null +++ b/layouts/_default/_markup/render-table.html @@ -0,0 +1,39 @@ +
+ + + {{- range .THead }} + + {{- range . }} + + {{- end }} + + {{- end }} + + + {{- range .TBody }} + + {{- range . }} + + {{- end }} + + {{- end }} + +
+ {{- .Text -}} +
+ {{- .Text -}} +
+
diff --git a/layouts/_default/cli.html b/layouts/_default/cli.html index 347cce4099..58c99c2c2c 100644 --- a/layouts/_default/cli.html +++ b/layouts/_default/cli.html @@ -11,38 +11,40 @@
{{ partial "breadcrumbs.html" . }}

{{ .Title }}

- - - {{ with $data.short }} - - - - {{ end }} - {{ with $data.usage }} - - - - - {{ end }} - {{ with $data.aliases }} - {{ $aliases := strings.Replace . (fmt.Printf "%s, " page.Title) "" }} - - - - - {{ end }} - -
Description{{ . }} -
Usage{{ . }}
- Aliases - {{ partialCached "tooltip.html" "An alias is a short or memorable alternative for a longer command." "cli-alias" }} - -
- {{ range (strings.Split $aliases ", ") }} - {{ . }} - {{ end }} -
-
+
+ + + {{ with $data.short }} + + + + {{ end }} + {{ with $data.usage }} + + + + + {{ end }} + {{ with $data.aliases }} + {{ $aliases := strings.Replace . (fmt.Printf "%s, " page.Title) "" }} + + + + + {{ end }} + +
Description{{ . }} +
Usage{{ . }}
+ Aliases + {{ partialCached "tooltip.html" "An alias is a short or memorable alternative for a longer command." "cli-alias" }} + +
+ {{ range (strings.Split $aliases ", ") }} + {{ . }} + {{ end }} +
+
+
{{ .Content }} {{ if $data.deprecated }} {{ markdownify ` @@ -96,62 +98,64 @@ can be removed entirely in a future release. {{ $heading := dict "level" 2 "text" "Options" }} {{ partialCached "heading.html" $heading "cli-options" }} {{ $.Scratch.Add "headings" $heading }} - - - - - - - - - - {{ range . }} +
+
OptionDefaultDescription
+ - {{ $short := .shorthand }} - {{ $long := .option }} - - {{ $skipDefault := `[],map[],false,0,0s,default,'',""` }} - - + + + - {{ end }} - -
- {{ with .details_url }} - - {{ with $short }}-{{ . }}, {{end}}--{{ $long }} - - {{ else }} - {{ with $short }}-{{ . }}, {{end}}--{{ $long }} - {{ end }} - - {{ with .default_value }} - {{ cond (in $skipDefault .) "" (printf "%s" . | safeHTML) }} - {{ end }} - - {{ with .min_api_version }} - {{ partialCached "components/badge.html" (dict "color" "blue" "content" (printf "API %s+" .)) "api" . }} - {{ end }} - {{ with .deprecated }} - {{ partialCached "components/badge.html" (dict "color" "red" "content" "Deprecated") "deprecated" }} - {{ end }} - {{ with .experimental }} - {{ partialCached "components/badge.html" (dict "color" "amber" "content" "experimental (daemon)") "exp" }} - {{ end }} - {{ with .experimentalcli }} - {{ partialCached "components/badge.html" (dict "color" "amber" "content" "experimental (CLI)") "exp-cli" }} - {{ end }} - {{ with .kubernetes }} - {{ partialCached "components/badge.html" (dict "color" "blue" "content" "Kubernetes") "k8s" }} - {{ end }} - {{ with .swarm }} - {{ partialCached "components/badge.html" (dict "color" "blue" "content" "Swarm") "swarm" }} - {{ end }} - {{ if .description }} - {{/* replace newlines in long desc with break tags */}} - {{ markdownify (strings.Replace .description "\n" "
") }} - {{ end }} -
OptionDefaultDescription
+ + + {{ range . }} + + {{ $short := .shorthand }} + {{ $long := .option }} + + {{ with .details_url }} + + {{ with $short }}-{{ . }}, {{end}}--{{ $long }} + + {{ else }} + {{ with $short }}-{{ . }}, {{end}}--{{ $long }} + {{ end }} + + {{ $skipDefault := `[],map[],false,0,0s,default,'',""` }} + + {{ with .default_value }} + {{ cond (in $skipDefault .) "" (printf "%s" . | safeHTML) }} + {{ end }} + + + {{ with .min_api_version }} + {{ partialCached "components/badge.html" (dict "color" "blue" "content" (printf "API %s+" .)) "api" . }} + {{ end }} + {{ with .deprecated }} + {{ partialCached "components/badge.html" (dict "color" "red" "content" "Deprecated") "deprecated" }} + {{ end }} + {{ with .experimental }} + {{ partialCached "components/badge.html" (dict "color" "amber" "content" "experimental (daemon)") "exp" }} + {{ end }} + {{ with .experimentalcli }} + {{ partialCached "components/badge.html" (dict "color" "amber" "content" "experimental (CLI)") "exp-cli" }} + {{ end }} + {{ with .kubernetes }} + {{ partialCached "components/badge.html" (dict "color" "blue" "content" "Kubernetes") "k8s" }} + {{ end }} + {{ with .swarm }} + {{ partialCached "components/badge.html" (dict "color" "blue" "content" "Swarm") "swarm" }} + {{ end }} + {{ if .description }} + {{/* replace newlines in long desc with break tags */}} + {{ markdownify (strings.Replace .description "\n" "
") }} + {{ end }} + + + {{ end }} + + + {{ end }} {{ end }} {{ with $data.examples }} diff --git a/tailwind.config.js b/tailwind.config.js index 9a9a847271..b02e5903a2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -39,7 +39,7 @@ module.exports = { "--tw-prose-invert-hr": theme("colors.divider.dark"), "--tw-prose-invert-captions": theme("colors.gray.dark.600"), "--tw-prose-invert-th-borders": theme("colors.gray.dark.200"), - "--tw-prose-invert-td-borders": theme("colors.gray.dark.200"), + "--tw-prose-invert-td-borders": theme("colors.gray.dark.300"), }, }, }),