From 44684d2f3ee00ec2cb4c99d0262efc9c273fc243 Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Wed, 17 May 2023 10:43:38 +0200 Subject: [PATCH 1/2] Adds a navbar placeholder for a call to action --- layouts/partials/navbar-cta.html | 6 ++++++ layouts/partials/navbar.html | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 layouts/partials/navbar-cta.html diff --git a/layouts/partials/navbar-cta.html b/layouts/partials/navbar-cta.html new file mode 100644 index 0000000000..4ef8493e1d --- /dev/null +++ b/layouts/partials/navbar-cta.html @@ -0,0 +1,6 @@ +{{/* Placeholder file to override. Used to add a call to action (like a colored Sign Up button) to the right side of the navigation bar if the navbar_cta parameter is set in the config file. */}} + \ No newline at end of file diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 3b04821b76..0bbed82161 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -57,6 +57,11 @@ {{ partial "navbar-lang-selector.html" . -}} {{ end -}} + {{ if .Site.Params.navbar_cta }} + + {{ end }}
From fae96c2ce73e352846bf0c6304edd28aa1c0a13f Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Wed, 17 May 2023 11:14:42 +0200 Subject: [PATCH 2/2] Adds documentation --- .../en/docs/adding-content/lookandfeel.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/userguide/content/en/docs/adding-content/lookandfeel.md b/userguide/content/en/docs/adding-content/lookandfeel.md index 9e46c4a9c9..39f13d353a 100644 --- a/userguide/content/en/docs/adding-content/lookandfeel.md +++ b/userguide/content/en/docs/adding-content/lookandfeel.md @@ -244,6 +244,33 @@ of the following: [wordmark]: https://en.wikipedia.org/wiki/Wordmark [your logo]: /docs/adding-content/iconsimages/#add-your-logo +### Adding a call-to-action + +You can include a call-to-action, like a sign-up or download button to the right side of the navbar. + +1. In your Hugo configuration file, set the `navbar_cta` parameter to true. + + {{< tabpane persistLang=false >}} + {{< tab header="Configuration file:" disabled=true />}} + {{< tab header="hugo.toml" lang="toml" >}} + [params] + navbar_cta = true + {{< /tab >}} + {{< tab header="hugo.yaml" lang="yaml" >}} + params: + navbar_cta: true + {{< /tab >}} + {{< tab header="hugo.json" lang="json" >}} + { + "params": { + "navbar_cta": true + } + } + {{< /tab >}} + {{< /tabpane >}} + +1. Add the `layouts/partials/navbar-cta.html` file to your project and customize it as needed. + ## Tables Docsy applies the following styles to all tables, through the class `.td-table`: