2020-07-06 18:55:32 +00:00
|
|
|
{{ define "main" }}
|
2021-12-30 14:55:55 +00:00
|
|
|
<article class="gblog-post">
|
|
|
|
<header class="gblog-post__header">
|
|
|
|
{{ $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }}
|
|
|
|
{{ with $source }}
|
|
|
|
<div class="gblog-post__feature">
|
|
|
|
<picture>
|
|
|
|
{{ $featured := .Fill (printf "910x280 %s" (default "Smart" .Params.anchor)) }}
|
|
|
|
<source srcset="{{ $featured.Permalink }}" />
|
2022-02-05 19:02:17 +00:00
|
|
|
<img
|
|
|
|
src="{{ $featured.Permalink }}"
|
|
|
|
alt="{{ default (partial "utils/title" $) .Params.description }}"
|
|
|
|
/>
|
2021-12-30 14:55:55 +00:00
|
|
|
</picture>
|
|
|
|
{{ with $source.Params.credits }}
|
|
|
|
<span>Credits: {{ . | $.Page.RenderString | safeHTML }}</span>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2020-07-26 12:47:12 +00:00
|
|
|
|
2020-07-06 18:55:32 +00:00
|
|
|
|
2022-02-05 19:02:17 +00:00
|
|
|
<h1 class="gblog-post__title">{{ partial "utils/title" . }}</h1>
|
2021-11-20 13:36:26 +00:00
|
|
|
|
2023-06-22 08:52:32 +00:00
|
|
|
{{ if or (eq .Type (default "posts" .Site.Params.geekblogContentSection)) (eq .Type "post") }}
|
2022-01-29 13:38:08 +00:00
|
|
|
<div class="flex flex-wrap align-center gblog-post__meta gblog-post__meta--head">
|
|
|
|
{{ partial "metadata.html" . }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</header>
|
2021-12-30 14:55:55 +00:00
|
|
|
<section class="gblog-markdown">
|
2022-02-06 22:57:32 +00:00
|
|
|
{{ partial "utils/content" . }}
|
2021-12-30 14:55:55 +00:00
|
|
|
</section>
|
|
|
|
</article>
|
2020-07-06 18:55:32 +00:00
|
|
|
{{ end }}
|