From f99e2049f287b60a46e06bf13ff86a2d1999b90d Mon Sep 17 00:00:00 2001 From: Dan Macpherson Date: Thu, 29 Feb 2024 14:40:00 +1000 Subject: [PATCH] Adding Author and Company field --- layouts/partials/authors.html | 4 ++++ layouts/partials/patterns-index.html | 18 ++++++++++++++++- static/images/logos/RHlogo.svg | 29 ++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/authors.html create mode 100644 static/images/logos/RHlogo.svg diff --git a/layouts/partials/authors.html b/layouts/partials/authors.html new file mode 100644 index 000000000..9b3b93690 --- /dev/null +++ b/layouts/partials/authors.html @@ -0,0 +1,4 @@ +{{ $authors := .Param "authors" | len }} +{{ range $index, $author := .Param "authors" }} + {{ if and (eq (add $index 1) $authors) (gt $authors 1) }} and {{ end }}{{ . }}{{ if and (gt $authors 2) (lt (add $index 1) $authors) }}, {{ end }} +{{ end }} diff --git a/layouts/partials/patterns-index.html b/layouts/partials/patterns-index.html index 0ff2740f9..8aa3c6baa 100644 --- a/layouts/partials/patterns-index.html +++ b/layouts/partials/patterns-index.html @@ -10,7 +10,7 @@
-
+

{{ .Title }}

@@ -25,6 +25,22 @@

{{ .Title }}

{{ end }}
+ {{ if (isset .Params "authors") }} +
+ Author{{if (gt .Params.authors 1)}}s{{ end }}: +
+
+ {{ partial "authors.html" . }} +
+ {{ end }} + {{ if (isset .Params "company") }} +
+ Company: +
+
+ {{ .Params.company }} +
+ {{ end }}
Validation status:
diff --git a/static/images/logos/RHlogo.svg b/static/images/logos/RHlogo.svg new file mode 100644 index 000000000..d0767abeb --- /dev/null +++ b/static/images/logos/RHlogo.svg @@ -0,0 +1,29 @@ + + + + +RedHat-Logo-A-Reverse + + + + \ No newline at end of file