mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-04-28 03:42:44 +00:00
feat: support static site header
This commit is contained in:
parent
cea921ccc6
commit
9eab2e631d
@ -1,7 +1,9 @@
|
||||
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
|
||||
{{ if $featured_image }}
|
||||
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
|
||||
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
|
||||
{{/* <header class="cover bg-top" style="background-image: url('{{ $featured_image }}');"> */}}
|
||||
{{ $img := resources.Get .Site.Params.site_header_image }}
|
||||
<header class="cover bg-top" style="background-image: url('{{ $img.RelPermalink }}');">
|
||||
<div class="bg-black-60">
|
||||
{{ partial "site-navigation.html" . }}
|
||||
<div class="tc-l pv6 ph3 ph4-ns">
|
||||
@ -16,10 +18,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="search"></div>
|
||||
{{ else }}
|
||||
<header>
|
||||
<div class="{{ .Site.Params.background_color_class | default "bg-black" }}">
|
||||
<div class="{{ .Site.Params.background_color_class | default "bg-near-black" }}">
|
||||
{{ partial "site-navigation.html" . }}
|
||||
</div>
|
||||
</header>
|
||||
<div id="search"></div>
|
||||
{{ end }}
|
||||
|
@ -16,6 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="search"></div>
|
||||
{{ else }}
|
||||
<header>
|
||||
<div class="pb3-m pb6-l {{ .Site.Params.background_color_class | default "bg-black" }}">
|
||||
@ -31,5 +32,6 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="search"></div>
|
||||
</header>
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user