feat: call to action banner

This commit is contained in:
Mirus
2024-07-30 14:37:30 +03:00
parent f7c9337b3f
commit 74f38a9b52
9 changed files with 76 additions and 3 deletions

View File

@@ -11,6 +11,23 @@
</head>
<body class="{{- ( or .Params.color $.Site.Params.ThemeColor ) -}}">
{{ if .Site.Params.Banner }}
{{ with .Site.Params.Banner }}
<div id="banner">
<span>
{{ if .url }}
<a href="{{ .url }}">{{ .text }}</a>
{{ else }}
{{ .text }}
{{ end }}
</span>
{{ if .dismissible }}
<button type="button">x</button>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default true) "container center" "container") }}
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default true) " headings--one-size" "" }}">