@@ -84,6 +84,7 @@
{{ end }}
{{ end }}
+ {{ partial "banner" .}}
diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html
new file mode 100644
index 0000000..62f9f71
--- /dev/null
+++ b/layouts/partials/banner.html
@@ -0,0 +1,22 @@
+{{- with .Params.banner -}}
+ {{- if .enabled -}}
+
+ {{- $currentDate := now | dateFormat "2006-01-02" -}}
+ {{- $startDate := index . "start-date" | default "0001-01-01" -}}
+ {{- $endDate := index . "end-date" | default "9999-12-31" -}}
+
+
+ {{- if and (ge $currentDate $startDate) (le $currentDate $endDate) -}}
+ {{- if isset . "md" -}}
+
+ {{- $bannerPage := readFile .md -}}
+
{{ .Title }}
{{ $content | safeHTML }} {{ if eq .Page.Draft true }}{{ partial "draft-badge.html" . }}{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index badaade..6164c75 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,6 +31,8 @@{{ .Title }}
{{ .Content }} + {{ partial "banner" . }} + {{ if (lt .WordCount 1) }} {{ range .Pages.ByWeight }}
diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html
new file mode 100644
index 0000000..62f9f71
--- /dev/null
+++ b/layouts/partials/banner.html
@@ -0,0 +1,22 @@
+{{- with .Params.banner -}}
+ {{- if .enabled -}}
+
+ {{- $currentDate := now | dateFormat "2006-01-02" -}}
+ {{- $startDate := index . "start-date" | default "0001-01-01" -}}
+ {{- $endDate := index . "end-date" | default "9999-12-31" -}}
+
+
+ {{- if and (ge $currentDate $startDate) (le $currentDate $endDate) -}}
+ {{- if isset . "md" -}}
+
+ {{- $bannerPage := readFile .md -}}
+
+ {{ $bannerPage | markdownify }}
+
+ {{- else -}}
+
+ {{ errorf "Required front matter parameter 'md' is missing or empty for banner." }}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/layouts/partials/list-main.html b/layouts/partials/list-main.html
index 07d56dc..84777ad 100644
--- a/layouts/partials/list-main.html
+++ b/layouts/partials/list-main.html
@@ -1,43 +1,100 @@
-
+ {{ $PageTitle := .Title }}
+
{{ .Title }}
+ {{ if .Description }}
+
+ {{ .Description | markdownify }}
+
+ {{ end}}
{{ if .Content }}
-
+
{{ .Content | markdownify }}
{{ end }}
+
+ {{ partial "banner" .}}
- {{ if lt .WordCount 1 }}
-
-
+
+ {{ if or (lt .WordCount 1) (eq $PageTitle "F5 NGINX One Console") (eq $PageTitle "F5 NGINX App Protect DoS") (eq $PageTitle "F5 NGINX Plus") }}
+
-
- {{ range .Pages.ByWeight }}
-
-
-
-
- {{ .Title }}
-
+
+ {{ range .Pages.GroupBy "Section" }}
+ {{ range .Pages.ByWeight }}
+
+
+
+
+ {{ .Title }}
+
+ {{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "How-to guides") }}
+
+ {{ range .Pages }}
+ {{ if eq .Kind "section" }}
+ {{ range .Pages }}
+ - {{ .Title }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+
+ {{ end }}
+ {{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "API")}}
+
+ {{ range .Pages }}
+ - {{ .Title }}
+ {{ end }}
+
+ {{ end }}
+ {{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "Changelog") }}
+ {{ partial "changelog-date.html" . }}
+ {{ end }}
+
-
+ {{ end }}
+ {{ end }}
+
+ {{ if eq $PageTitle "F5 NGINX One Console" }}
+ Other Products
+ {{ $nginxProducts := slice
+ (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.")
+ (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.")
+ (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.")
+ (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.")
+ (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.")
+ (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.")
+ (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")
+ }}
+ {{ $groupedProducts := dict
+ "local-console-option" (where $nginxProducts "type" "local-console-option")
+ "kubernetes-solutions" (where $nginxProducts "type" "kubernetes-solutions")
+ "security" (where $nginxProducts "type" "security")
+ "modern-app-delivery" (where $nginxProducts "type" "modern-app-delivery")
+ }}
+ {{ range $type, $products := $groupedProducts }}
+
+ {{ $type | humanize | title }}
+ {{ range $products }}
+
+
+
+
+ {{ .title }}
+
+
+ {{ if .description }}{{ .description | markdownify }}{{ end }}
+
+
+
+ {{ end }}
+
{{ end }}
-
-
+ {{ end }}
+
- {{ end }}
-
-
-
- {{ if not .IsHome }}
-
- {{ partial "pagination.html" . }}
-
- {{ end }}
-
-
+ {{end}}
\ No newline at end of file
diff --git a/layouts/shortcodes/banner.html b/layouts/shortcodes/banner.html
new file mode 100644
index 0000000..5240248
--- /dev/null
+++ b/layouts/shortcodes/banner.html
@@ -0,0 +1,9 @@
+{{- $type := .Get 0 | default (.Get "type") | default "" -}}
+{{- $title := .Get 1 | default (.Get "title") | default "" -}}
+{{ partial "callout.html" (dict
+ "class" $type
+ "title" $title
+ "icon" "fa-solid fa-triangle-exclamation"
+ "inline" true
+ "content" .Inner
+) }}
\ No newline at end of file
+ {{ $PageTitle := .Title }}
+
- {{ if lt .WordCount 1 }}
-
-
+
+ {{ if or (lt .WordCount 1) (eq $PageTitle "F5 NGINX One Console") (eq $PageTitle "F5 NGINX App Protect DoS") (eq $PageTitle "F5 NGINX Plus") }}
+
- {{ end }}
-
-
-
- {{ if not .IsHome }}
- {{ .Title }}
+ {{ if .Description }} ++ {{ .Description | markdownify }} +
+ {{ end}} {{ if .Content }} -+
{{ .Content | markdownify }}
{{ end }} + + {{ partial "banner" .}}
-
- {{ range .Pages.ByWeight }}
-
+ {{ end }}
+
-
-
-
+ {{ if eq $PageTitle "F5 NGINX One Console" }}
+ - - {{ .Title }} -
+
+ {{ range .Pages.GroupBy "Section" }}
+ {{ range .Pages.ByWeight }}
+
+ {{ end }}
+ {{ end }}
+
+
-
+
+ + {{ .Title }} +
+ {{ if and (eq $PageTitle "F5 NGINX One Console") (eq .Title "How-to guides") }} +-
+ {{ range .Pages }}
+ {{ if eq .Kind "section" }}
+ {{ range .Pages }}
+
- {{ .Title }} + {{ end }} + {{ end }} + {{ end }} +
-
+ {{ range .Pages }}
+
- {{ .Title }} + {{ end }} +
Other Products
+ {{ $nginxProducts := slice + (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.") + (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.") + (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.") + (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.") + (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.") + (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.") + (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") + }} + {{ $groupedProducts := dict + "local-console-option" (where $nginxProducts "type" "local-console-option") + "kubernetes-solutions" (where $nginxProducts "type" "kubernetes-solutions") + "security" (where $nginxProducts "type" "security") + "modern-app-delivery" (where $nginxProducts "type" "modern-app-delivery") + }} + {{ range $type, $products := $groupedProducts }} +
+
{{ end }}
- {{ $type | humanize | title }}
+ {{ range $products }} +
+
+ {{ end }}
+
+
+
+
+
+
+ {{ .title }}
+
+ + {{ if .description }}{{ .description | markdownify }}{{ end }} +
+
- {{ partial "pagination.html" . }}
-
- {{ end }}
-
-
+ {{end}}