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 {
1497
1497
}
1498
1498
}
1499
1499
1500
+ .md-table-scroll-x {
1501
+ overflow-x : auto;
1502
+ width : 100% ;
1503
+ }
1504
+
1500
1505
.narrow table {
1501
1506
min-width : 100% ;
1502
1507
margin : var (--table-top-bottom-spacing ) 0 ;
@@ -1976,3 +1981,20 @@ hr {
1976
1981
visibility : hidden;
1977
1982
}
1978
1983
}
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"
18
18
Use a space or newline character to separate the items in each list:
19
19
20
20
21
- {{<bootstrap- table "table table-striped table-bordered ">}}
21
+ {{<table variant = " narrow " >}}
22
22
23
23
| Parameter | Description |
24
24
| ------------------------ | -------------------------------------------------------------------------------------|
25
25
| ` NODES ` | List of peers that receive the configuration from the primary. |
26
26
| ` CONFPATHS ` | List of files and directories to distribute from the primary to the peers. |
27
27
| ` EXCLUDE ` | (Optional) List of configuration files on the primary not to distribute to the peers.|
28
28
29
- {{</bootstrap- table >}}
29
+ {{</table >}}
30
30
31
31
### Advanced Parameters
32
32
33
- {{<bootstrap- table "table table-striped table-bordered ">}}
33
+ {{<table variant = " wide " >}}
34
34
35
35
| Parameter | Description | Default |
36
36
| ------------------------ | ---------------------------------------------------------------------------------------| -------------------------|
@@ -42,4 +42,4 @@ Use a space or newline character to separate the items in each list:
42
42
| ` RSYNC ` | Location of the ` rsync ` binary | ** /usr/bin/rsync** |
43
43
| ` SSH ` | Location of the ` ssh ` binary | ** /usr/bin/ssh** |
44
44
45
- {{</bootstrap- table >}}
45
+ {{</table >}}
Original file line number Diff line number Diff line change 1
1
{{ define "main"}}
2
2
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 >
17
12
</ div >
18
- </ div >
19
- </ div >
20
13
</ div >
21
14
22
-
23
-
24
-
25
15
{{ 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" }}
10
2
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
+ )}}
17
7
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