diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css index 9de321e1..df120970 100644 --- a/assets/css/v2/style.css +++ b/assets/css/v2/style.css @@ -1497,6 +1497,11 @@ table { } } +.md-table-scroll-x { + overflow-x: auto; + width: 100%; +} + .narrow table { min-width: 100%; margin: var(--table-top-bottom-spacing) 0; @@ -1976,3 +1981,20 @@ hr { visibility: hidden; } } + +.not-found-container { + display: flex; + flex-direction: column; + margin-top: 10vh; + + .info-header { + font-size: var(--font-step-2); + } + + .info-desc { + display: flex; + flex-direction: column; + gap: var(--space-3xs); + font-size: var(--font-step--1); + } +} diff --git a/exampleSite/content/test-product/tables/examples/config-sharing.md b/exampleSite/content/test-product/tables/examples/config-sharing.md index bcc7ef0d..867e0b49 100644 --- a/exampleSite/content/test-product/tables/examples/config-sharing.md +++ b/exampleSite/content/test-product/tables/examples/config-sharing.md @@ -18,7 +18,7 @@ EXCLUDE="default.conf" Use a space or newline character to separate the items in each list: -{{}} +{{}} | Parameter | Description | | ------------------------ | -------------------------------------------------------------------------------------| @@ -26,11 +26,11 @@ Use a space or newline character to separate the items in each list: | `CONFPATHS` | List of files and directories to distribute from the primary to the peers. | | `EXCLUDE` | (Optional) List of configuration files on the primary not to distribute to the peers.| -{{}} +{{
}} ### Advanced Parameters -{{}} +{{}} | Parameter | Description | Default | | ------------------------ | ---------------------------------------------------------------------------------------|-------------------------| @@ -42,4 +42,4 @@ Use a space or newline character to separate the items in each list: | `RSYNC` | Location of the `rsync` binary | **/usr/bin/rsync** | | `SSH` | Location of the `ssh` binary | **/usr/bin/ssh** | -{{}} \ No newline at end of file +{{
}} \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index b0385116..4fdced6e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,25 +1,15 @@ {{ define "main"}} -
-

-

Page not found

- -
-
-
-
-
- -
-

Uh oh! We couldn't find the page you were looking for.

-

Return to the NGINX Docs Home page.

-
+
+
+

+ HTTP 404 - Page not found +

+
+

Uh oh! We couldn't find the page/path you were looking for.

+ Return to the {{ .Site.Title }} homepage. +
-
-
- - - {{ end }} diff --git a/layouts/partials/table.html b/layouts/partials/table.html new file mode 100644 index 00000000..a6aea673 --- /dev/null +++ b/layouts/partials/table.html @@ -0,0 +1,7 @@ +{{ if and (not (eq .variant "narrow")) (not (eq .variant "wide")) }} + {{ errorf "Invalid variant supplied to shortcode: Received %s. Wanted: 'narrow', 'wide'" .variant }} +{{ end }} + +
+ {{ .content | markdownify}} +
\ No newline at end of file diff --git a/layouts/shortcodes/bootstrap-table.html b/layouts/shortcodes/bootstrap-table.html index 22e3d732..c52d409a 100644 --- a/layouts/shortcodes/bootstrap-table.html +++ b/layouts/shortcodes/bootstrap-table.html @@ -1,20 +1,8 @@ -{{ $htmlTable := .Inner | markdownify }} -{{ $class := .Get 0 }} -{{ $oldTable := "
" }} -{{ $newTable := printf "
" $class "table-v1" }} -{{ $oldP := "

" }} -{{ $newP := printf "

" "table-v1"}} -{{ $htmlTable := replace $htmlTable $oldTable $newTable }} -{{ $htmlTable := replace $htmlTable $oldP $newP }} -{{ $htmlTable | safeHTML }} +{{ $defaultVariant := "narrow" }} - -{{ $narrowOption := "narrow" }} -{{ $wideOption := "wide" }} -{{ if and (not (strings.Contains $class $narrowOption)) (not (strings.Contains $class $wideOption)) }} - {{ $class = printf "%s %s" $class $narrowOption }} -{{ end }} +{{ partial "table.html" (dict + "variant" $defaultVariant + "content" .Inner +)}} -

- {{ .Inner | markdownify }} -
\ No newline at end of file +{{ warnf "'' is being deprecated. Use the '
' shortcode instead." }} \ No newline at end of file diff --git a/layouts/shortcodes/table.html b/layouts/shortcodes/table.html index cf26b2fc..f35f93f1 100644 --- a/layouts/shortcodes/table.html +++ b/layouts/shortcodes/table.html @@ -1,17 +1,9 @@ -{{/* Use this shortcode to wrap big tables that you want to have scrollbars when being shown in smaller screens */}} - -
-{{.Inner}} -
\ No newline at end of file + + + +{{ $variant := default "narrow" (.Get "variant") }} + +{{ partial "table.html" (dict + "variant" $variant + "content" .Inner +)}} \ No newline at end of file