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

19 lines
509 B
HTML
Raw Normal View History

2024-11-20 17:36:54 +00:00
{{ $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>
2024-11-20 21:52:35 +00:00
<div class="motto" title="{{ $cardImageDescription }}">
2024-11-20 17:36:54 +00:00
<div class="motto-inside">
<h1 id="motto">
2023-07-01 22:35:01 +00:00
{{ default .Title (safeHTML (.Param "motto")) }}
</h1>
</div>
</div>