feat: call to action banner
This commit is contained in:
@@ -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" "" }}">
|
||||
|
||||
@@ -19,5 +19,12 @@
|
||||
|
||||
<script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script>
|
||||
|
||||
<!-- Banner JS if it enabled -->
|
||||
{{ if .Site.Params.Banner }}
|
||||
{{ $banner := resources.Get "js/banner.js" | js.Build | resources.Minify }}
|
||||
|
||||
<script type="text/javascript" src="{{ $banner.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- Extended footer section-->
|
||||
{{ partial "extended_footer.html" . }}
|
||||
|
||||
Reference in New Issue
Block a user