Skip to content

Commit 388b669

Browse files
committed
List: Updated list-main from documentation repo
1 parent 720ed00 commit 388b669

File tree

2 files changed

+91
-28
lines changed

2 files changed

+91
-28
lines changed

layouts/_default/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h1>{{ .Title }}</h1>
3434
{{- with .Params.banner -}}
3535
{{- if .enabled -}}
3636
<div class="banner banner-{{ .type }}">
37-
Some banner
37+
{{ partial .md . }}
3838
</div>
3939
{{- end -}}
4040
{{- end -}}

layouts/partials/list-main.html

Lines changed: 90 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,106 @@
11
<div class="list-page">
2-
<div class="col-md-12 col-xl-12 py-md-3 pl-md-5">
2+
{{ $PageTitle := .Title }}
3+
<div class="col-md-12 col-xl-12 py-md-3" style="margin-left: -1.75em;">
34
<div class="page-header list">
45
<h1 class="bd-title">
56
{{ .Title }}
67
</h1>
8+
{{ if .Description }}
9+
<p>
10+
{{ .Description | markdownify }}
11+
</p>
12+
{{ end}}
713
{{ if .Content }}
8-
<p class="bd-lead">
14+
<p>
915
{{ .Content | markdownify }}
1016
</p>
1117
{{ end }}
1218
</div>
1319
</div>
14-
{{ if lt .WordCount 1 }}
15-
<section class="col-md-12 col-xl-12 py-md-3 pl-md-5" id="section-content-list">
16-
20+
21+
{{- with .Params.banner -}}
22+
{{- if .enabled -}}
23+
<div class="banner banner-{{ .type }}">
24+
{{ partial .md . }}
25+
</div>
26+
{{- end -}}
27+
{{- end -}}
28+
29+
{{ if or (lt .WordCount 1) (eq $PageTitle "F5 NGINX One Console") (eq $PageTitle "F5 NGINX App Protect DoS") (eq $PageTitle "F5 NGINX Plus") }}
30+
<section>
1731
<div class="row">
18-
<div class="card-deck">
19-
{{ range .Pages.ByWeight }}
20-
<div class="col-md-5 card">
21-
<div class="card-body">
22-
<h3 class="card-title">
23-
<i class="fas fa-{{if eq .Kind "page"}}file-alt{{else}}book{{end}} fa-2x card-img-top"></i>
24-
<a href="{{ if .Params.url}}{{ .Params.url}}{{else}}{{ .Permalink }}{{end}}">{{ .Title }}</a>
25-
</h3>
32+
<div class="card-deck">
33+
{{ range .Pages.GroupBy "Section" }}
34+
{{ range .Pages.ByWeight }}
35+
<div class="col-md-5 card">
36+
<div class="card-body">
37+
<h3 class="card-title" style="display: flex; align-items: center; gap: 5px;">
38+
<i class="fas fa-{{if eq .Kind "page"}}file-alt{{else}}book{{end}} fa-lg card-img-top"></i>
39+
<a href="{{ if .Params.url}}{{ .Params.url}}{{else}}{{ .Permalink }}{{end}}">{{ .Title }}</a>
40+
</h3>
41+
{{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "How-to guides") }}
42+
<ul style="padding-top: 10px;">
43+
{{ range .Pages }}
44+
{{ if eq .Kind "section" }}
45+
{{ range .Pages }}
46+
<li><a href="{{ .Permalink }}"> {{ .Title }}</a></li>
47+
{{ end }}
48+
{{ end }}
49+
{{ end }}
50+
</ul>
51+
{{ end }}
52+
{{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "API")}}
53+
<ul style="padding-top: 10px;">
54+
{{ range .Pages }}
55+
<li><a href="{{ .Permalink }}"> {{ .Title }}</a></li>
56+
{{ end }}
57+
</ul>
58+
{{ end }}
59+
{{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "Changelog") }}
60+
{{ partial "changelog-date.html" . }}
61+
{{ end }}
62+
</div>
2663
</div>
27-
</div>
64+
{{ end }}
65+
{{ end }}
66+
</div>
67+
{{ if eq $PageTitle "F5 NGINX One Console" }}
68+
<h1 class="bd-title" style="margin-top: 15px;">Other Products</h1>
69+
{{ $nginxProducts := slice
70+
(dict "title" "NGINX Instance Manager" "url" "/nginx-instance-manager" "imgSrc" "NGINX-Instance-Manager-product-icon" "type" "local-console-option" "description" "Track and control NGINX Open Source and NGINX Plus instances.")
71+
(dict "title" "NGINX Ingress Controller" "url" "/nginx-ingress-controller" "imgSrc" "NGINX-Ingress-Controller-product-icon" "type" "kubernetes-solutions" "description" "Kubernetes traffic management with API gateway, identity, and observability features.")
72+
(dict "title" "NGINX Gateway Fabric" "url" "/nginx-gateway-fabric" "imgSrc" "NGINX-product-icon" "type" "kubernetes-solutions" "description" "Next generation Kubernetes connectivity using the Gateway API.")
73+
(dict "title" "NGINX App Protect WAF" "url" "/nginx-app-protect-waf" "imgSrc" "NGINX-App-Protect-WAF-product-icon" "type" "security" "description" "Lightweight, high-performance, advanced protection against Layer 7 attacks on your apps and APIs.")
74+
(dict "title" "NGINX App Protect DoS" "url" "/nginx-app-protect-dos" "imgSrc" "NGINX-App-Protect-DoS-product-icon" "type" "security" "description" "Defend, adapt, and mitigate against Layer 7 denial-of-service attacks on your apps and APIs.")
75+
(dict "title" "NGINX Plus" "url" "/nginx" "imgSrc" "NGINX-Plus-product-icon-RGB" "type" "modern-app-delivery" "description" "The all-in-one load balancer, reverse proxy, web server, content cache, and API gateway.")
76+
(dict "title" "NGINX Open Source" "url" "https://nginx.org/en/docs/" "imgSrc" "NGINX-product-icon" "type" "modern-app-delivery" "description" "The open source all-in-one load balancer, content cache, and web server")
77+
}}
78+
{{ $groupedProducts := dict
79+
"local-console-option" (where $nginxProducts "type" "local-console-option")
80+
"kubernetes-solutions" (where $nginxProducts "type" "kubernetes-solutions")
81+
"security" (where $nginxProducts "type" "security")
82+
"modern-app-delivery" (where $nginxProducts "type" "modern-app-delivery")
83+
}}
84+
{{ range $type, $products := $groupedProducts }}
85+
<div class="card-deck">
86+
<p style="margin-left: 15px; width: 100%; font-weight: bold;">{{ $type | humanize | title }}</p>
87+
{{ range $products }}
88+
<div class="card" style="margin-top: 0px; {{ if eq (len $products) 1 }}max-width: calc(50% - 30px);{{ else }}min-width: 40%;{{ end }}">
89+
<div class="card-body">
90+
<h3 class="card-title" style="display: flex; align-items: center;">
91+
<img class="card-img-top" src="{{ .Site.BaseURL }}/images/icons/{{ .imgSrc }}.png"/>
92+
<a href="{{ if eq .title "NGINX Open Source" }}{{ .url }}{{ else }}{{ .Site.BaseURL }}{{ .url }}{{ end }}">{{ .title }}</a>
93+
</h3>
94+
<p >
95+
{{ if .description }}{{ .description | markdownify }}{{ end }}
96+
</p>
97+
</div>
98+
</div>
99+
{{ end }}
100+
</div>
28101
{{ end }}
29-
</div>
30-
</div>
102+
{{ end }}
103+
</div>
31104
</section>
32-
{{ end }}
33-
</div>
34-
35-
36-
{{ if not .IsHome }}
37-
<div class="row justify-content-center">
38-
{{ partial "pagination.html" . }}
39-
</div>
40-
{{ end }}
41-
42-
105+
{{end}}
43106
</div>

0 commit comments

Comments
 (0)