pages/layouts/partials/scrolling-image-header.html

22 lines
568 B
HTML

{{ $imgsrc := print "images/" (.Param "cardImage") ".jpg" }}
{{ $mainimg := resources.Get $imgsrc }}
{{ $cardImageDescription := .Param "cardImageDescription" }}
{{ $croppedImage := $mainimg.Fill "6000x2000 center" }}
<style>
.motto::before {
background-image: url('{{ $croppedImage.RelPermalink }}');
}
</style>
<div class="motto">
<div class="motto-inside">
<h1 id="motto">
{{ default .Title (safeHTML (.Param "motto")) }}
</h1>
</div>
</div>
<div
class="img-src"
style="background-image: url('{{ $mainimg.RelPermalink }}');"
></div>