2020-06-01 22:01:30 +01:00
|
|
|
{{ if and .Params.image (not .Params.hide_header_image) }}
|
2018-01-04 10:50:34 +00:00
|
|
|
{{ .Scratch.Set "image" .Params.image }}
|
|
|
|
{{ if hasPrefix .Params.image "resource:" }}
|
2018-01-24 19:55:48 +00:00
|
|
|
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
2021-12-26 22:46:12 +00:00
|
|
|
{{ .Scratch.Set "image" ($resource.Resize "2000x webp").RelPermalink }}
|
2020-09-12 15:46:23 +01:00
|
|
|
{{ else if hasPrefix .Params.image "unsplash:" }}
|
|
|
|
{{ $unsplash_id := replace .Params.image "unsplash:" "" }}
|
|
|
|
{{ $query := querify "client_id" (getenv "UNSPLASH_ACCESS_KEY") }}
|
|
|
|
{{ $unsplash_data := (getJSON "https://api.unsplash.com/photos/" $unsplash_id "?" $query )}}
|
2021-12-27 10:50:35 +00:00
|
|
|
{{ .Scratch.Set "image" $unsplash_data.urls.regular }}
|
2018-01-04 10:50:34 +00:00
|
|
|
{{ end }}
|
2020-06-01 22:01:30 +01:00
|
|
|
|
2021-12-27 11:06:06 +00:00
|
|
|
<img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' alt="" decoding="async" referrerpolicy="no-referrer" />
|
2020-06-01 22:01:30 +01:00
|
|
|
{{ end }}
|
|
|
|
|
2017-12-27 18:40:47 +00:00
|
|
|
{{ partial "breadcrumbs/index.html" . }}
|
2020-06-01 22:01:30 +01:00
|
|
|
|
2019-01-24 21:47:31 +00:00
|
|
|
<h1 class="display-4">{{ .Title }}</h1>
|
2020-04-05 19:33:30 +01:00
|
|
|
{{ if .Params.subtitle }}
|
2021-12-27 11:06:22 +00:00
|
|
|
<h2 class="my-3 h5">{{ markdownify .Params.subtitle | emojify }}</h2>
|
2020-04-05 19:33:30 +01:00
|
|
|
{{ end }}
|
2020-08-05 17:39:15 +01:00
|
|
|
{{ if .IsPage }}
|
2019-01-24 21:47:31 +00:00
|
|
|
<p>{{ partial "content-details.html" . }}</p>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Content }}
|
|
|
|
<hr />
|
|
|
|
<div class="content mt-3">
|
|
|
|
{{ if .TableOfContents }}
|
2020-07-28 08:55:09 +01:00
|
|
|
<div class="float-lg-right ml-lg-3 mb-3 p-3">
|
2019-01-24 21:47:31 +00:00
|
|
|
{{ .TableOfContents }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
2021-12-12 18:58:05 +00:00
|
|
|
|
|
|
|
<div class="modal fade" tabindex="-1" id="lightbox-modal" aria-hidden="true">
|
|
|
|
<div class="modal-dialog modal-dialog-centered modal-xl">
|
|
|
|
<div class="modal-content">
|
|
|
|
<!-- Image tag will be added here -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-01-24 21:47:31 +00:00
|
|
|
{{ end }}
|