Link to dedicated page from site head (#158)

- dedicated pages can be linked from landing area
- briefer version of that page can be included on the singe-page content
This commit is contained in:
spi 2023-10-14 15:23:18 +02:00 committed by GitHub
parent 0f957c9bff
commit 5b4c79e689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 1 deletions

View file

@ -2,7 +2,7 @@
{{ $headless := .Site.GetPage "/homepage" }}
{{ $sections := $headless.Resources.ByType "page" }}
{{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }}
{{ $content := where $sections "Params.external" "==" nil }}
{{ $content := where (where $sections "Params.external" "==" nil) "Params.detailed_page_homepage_content" "ne" false }}
<!-- Welcome screen that scrolls out of view -->
{{ if not .Params.header_use_video }}
@ -34,6 +34,8 @@
{{ if isset .Params "external" }}
<a class='btn site-menu' href='{{ .Params.external }}'>{{ $button_title }}&nbsp;<icon class="fa fa-external-link"></icon></a>
{{ else if isset .Params "detailed_page_path" }}
<a class='btn site-menu' href='{{ .Params.detailed_page_path }}'>{{ $button_title }}</a>
{{ else }}
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
<a class='btn site-menu' data-title-anchor='{{ anchorize $fnav_title }}' href='#{{ anchorize $fnav_title }}'>{{ $button_title }}</a>