Add control over header image alignment

This commit is contained in:
Cyrill Raccaud 2024-10-11 23:01:46 +02:00 committed by GitHub
parent 33178c0d49
commit 5d7339037b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,7 @@
{{ $featured_image := partial "func/GetFeaturedImage.html" . }} {{ $featured_image := partial "func/GetFeaturedImage.html" . }}
{{ if $featured_image }} {{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} {{/* 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-{{ .Params.featured_image_alignment | default "top" }}" style="background-image: url('{{ $featured_image }}');">
<div class="bg-black-60"> <div class="bg-black-60">
{{ partial "site-navigation.html" . }} {{ partial "site-navigation.html" . }}
<div class="tc-l pv6 ph3 ph4-ns"> <div class="tc-l pv6 ph3 ph4-ns">