File tree Expand file tree Collapse file tree 6 files changed +57
-58
lines changed
exampleSite/content/test-product/tables/examples Expand file tree Collapse file tree 6 files changed +57
-58
lines changed Original file line number Diff line number Diff line change @@ -1497,6 +1497,11 @@ table {
14971497 }
14981498}
14991499
1500+ .md-table-scroll-x {
1501+ overflow-x : auto;
1502+ width : 100% ;
1503+ }
1504+
15001505.narrow table {
15011506 min-width : 100% ;
15021507 margin : var (--table-top-bottom-spacing ) 0 ;
@@ -1976,3 +1981,20 @@ hr {
19761981 visibility : hidden;
19771982 }
19781983}
1984+
1985+ .not-found-container {
1986+ display : flex;
1987+ flex-direction : column;
1988+ margin-top : 10vh ;
1989+
1990+ .info-header {
1991+ font-size : var (--font-step-2 );
1992+ }
1993+
1994+ .info-desc {
1995+ display : flex;
1996+ flex-direction : column;
1997+ gap : var (--space-3xs );
1998+ font-size : var (--font-step--1 );
1999+ }
2000+ }
Original file line number Diff line number Diff line change @@ -18,19 +18,19 @@ EXCLUDE="default.conf"
1818Use a space or newline character to separate the items in each list:
1919
2020
21- {{<bootstrap- table "table table-striped table-bordered ">}}
21+ {{<table variant = " narrow " >}}
2222
2323| Parameter | Description |
2424| ------------------------ | -------------------------------------------------------------------------------------|
2525| ` NODES ` | List of peers that receive the configuration from the primary. |
2626| ` CONFPATHS ` | List of files and directories to distribute from the primary to the peers. |
2727| ` EXCLUDE ` | (Optional) List of configuration files on the primary not to distribute to the peers.|
2828
29- {{</bootstrap- table >}}
29+ {{</table >}}
3030
3131### Advanced Parameters
3232
33- {{<bootstrap- table "table table-striped table-bordered ">}}
33+ {{<table variant = " wide " >}}
3434
3535| Parameter | Description | Default |
3636| ------------------------ | ---------------------------------------------------------------------------------------| -------------------------|
@@ -42,4 +42,4 @@ Use a space or newline character to separate the items in each list:
4242| ` RSYNC ` | Location of the ` rsync ` binary | ** /usr/bin/rsync** |
4343| ` SSH ` | Location of the ` ssh ` binary | ** /usr/bin/ssh** |
4444
45- {{</bootstrap- table >}}
45+ {{</table >}}
Original file line number Diff line number Diff line change 11{{ define "main"}}
22
3- < div class ="container hero ">
4- < h1 > < i class ="far fa-frown "> </ i > </ h1 >
5- < h1 > Page not found</ h1 >
6-
7- < div class ="row no-gutters ">
8- < div class ="card list-card col-md-4 ">
9- < div class ="col-md-4 ">
10- </ div >
11- < div class ="card-body ">
12-
13- < div class ="card-text ">
14- < p > Uh oh! We couldn't find the page you were looking for.</ p >
15- < p > < a class ="button button-solid " href ="{{ "/" | absURL }}"> Return to the NGINX Docs Home page.</ a > </ p >
16- </ div >
3+ < div class ="content ">
4+ < div class ="not-found-container ">
5+ < h1 class ="info-header ">
6+ HTTP 404 - Page not found
7+ </ h1 >
8+ < div class ="info-desc ">
9+ < p > Uh oh! We couldn't find the page/path you were looking for.</ p >
10+ < a href ="{{ .Site.BaseURL | relLangURL }} " aria-label ="Return home "> Return to the {{ .Site.Title }} homepage.</ a >
11+ </ div >
1712 </ div >
18- </ div >
19- </ div >
2013</ div >
2114
22-
23-
24-
2515{{ end }}
Original file line number Diff line number Diff line change 1+ {{ if and (not (eq .variant "narrow")) (not (eq .variant "wide")) }}
2+ {{ errorf "Invalid variant supplied to < table > shortcode: Received %s. Wanted: 'narrow', 'wide'" .variant }}
3+ {{ end }}
4+
5+ < div class ="md-table-scroll-x {{ .variant }} ">
6+ {{ .content | markdownify}}
7+ </ div >
Original file line number Diff line number Diff line change 1- {{ $htmlTable := .Inner | markdownify }}
2- {{ $class := .Get 0 }}
3- {{ $oldTable := "< table > " }}
4- {{ $newTable := printf "< table class =\ "%s %s\"> " $class "table-v1" }}
5- {{ $oldP := "< p > " }}
6- {{ $newP := printf "< p class =\ "%s\"> " "table-v1"}}
7- {{ $htmlTable := replace $htmlTable $oldTable $newTable }}
8- {{ $htmlTable := replace $htmlTable $oldP $newP }}
9- {{ $htmlTable | safeHTML }}
1+ {{ $defaultVariant := "narrow" }}
102
11- <!-- Add default option for table of "narrow" if one is not provided -->
12- {{ $narrowOption := "narrow" }}
13- {{ $wideOption := "wide" }}
14- {{ if and (not (strings.Contains $class $narrowOption)) (not (strings.Contains $class $wideOption)) }}
15- {{ $class = printf "%s %s" $class $narrowOption }}
16- {{ end }}
3+ {{ partial "table.html" (dict
4+ "variant" $defaultVariant
5+ "content" .Inner
6+ )}}
177
18- < div class ="table-v2 {{ $class }} ">
19- {{ .Inner | markdownify }}
20- </ div >
8+ {{ warnf "'< bootstrap-table > </ bootstrap-table > ' is being deprecated. Use the '< table > ' shortcode instead." }}
Original file line number Diff line number Diff line change 1- {{/* Use this shortcode to wrap big tables that you want to have scrollbars when being shown in smaller screens */}}
2- < style >
3- table , th , td {
4- border : 1px solid # CCC ;
5- border-collapse : collapse;
6- list-style-position : inside;
7- }
8- th , td {
9- padding : 5px ;
10- }
11- th {
12- text-align : center;
13- }
14- </ style >
15- < div class ="override-table ">
16- {{.Inner}}
17- </ div >
1+ <!-- Use this shortcode to allow tables to be scrollable across the x-axis -->
2+ <!-- Params: variant=['narrow' | 'wide'] (defaults to "narrow") -->
3+
4+ {{ $variant := default "narrow" (.Get "variant") }}
5+
6+ {{ partial "table.html" (dict
7+ "variant" $variant
8+ "content" .Inner
9+ )}}
You can’t perform that action at this time.
0 commit comments