2021-08-11 05:28:33 +00:00
|
|
|
{{ define "main" }}
|
2022-11-08 22:30:26 +00:00
|
|
|
{{- $images := .Resources.ByType "image" }}
|
2023-01-13 02:02:32 +00:00
|
|
|
{{- $cover := $images.GetMatch (.Params.cover | default "*cover*") }}
|
|
|
|
{{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $cover }}
|
2022-01-18 05:24:33 +00:00
|
|
|
<article>
|
|
|
|
<header class="max-w-prose">
|
2022-05-26 01:43:19 +00:00
|
|
|
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
2021-08-18 00:08:06 +00:00
|
|
|
{{ partial "breadcrumbs.html" . }}
|
|
|
|
{{ end }}
|
2021-12-21 02:22:45 +00:00
|
|
|
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
2021-08-20 07:02:08 +00:00
|
|
|
{{ .Title | emojify }}
|
|
|
|
</h1>
|
2023-12-26 00:56:32 +00:00
|
|
|
<div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400">
|
2021-08-21 01:42:40 +00:00
|
|
|
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</div>
|
2022-11-08 22:30:26 +00:00
|
|
|
{{ with $feature }}
|
2023-01-13 02:02:32 +00:00
|
|
|
<div class="prose">
|
2023-10-31 17:14:03 +00:00
|
|
|
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
|
|
|
|
{{ $class := "mb-6 -mt-4 rounded-md" }}
|
2023-11-26 13:47:26 +00:00
|
|
|
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }}
|
2023-01-13 02:02:32 +00:00
|
|
|
{{ with $.Params.coverCaption }}
|
2023-12-26 00:56:32 +00:00
|
|
|
<figcaption class="-mt-3 mb-6 text-center">{{ . | markdownify }}</figcaption>
|
2023-01-13 02:02:32 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-11-08 22:30:26 +00:00
|
|
|
{{ end }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</header>
|
2023-12-26 00:56:32 +00:00
|
|
|
<section class="prose mt-0 flex max-w-full flex-col dark:prose-invert lg:flex-row">
|
2022-01-18 05:24:33 +00:00
|
|
|
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
|
2023-04-05 00:50:15 +00:00
|
|
|
<div class="order-first px-0 lg:order-last lg:max-w-xs lg:ps-8">
|
|
|
|
<div class="toc pe-5 print:hidden lg:sticky lg:top-10">
|
2022-01-18 05:24:33 +00:00
|
|
|
{{ partial "toc.html" . }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2023-12-26 00:56:32 +00:00
|
|
|
<div class="min-h-0 min-w-0 max-w-prose grow">
|
2022-01-18 05:24:33 +00:00
|
|
|
{{ .Content | emojify }}
|
|
|
|
</div>
|
2021-08-11 05:28:33 +00:00
|
|
|
</section>
|
2023-12-26 00:56:32 +00:00
|
|
|
<footer class="max-w-prose pt-8 print:hidden">
|
2021-08-15 01:21:37 +00:00
|
|
|
{{ partial "author.html" . }}
|
2021-08-16 07:06:35 +00:00
|
|
|
{{ partial "sharing-links.html" . }}
|
2021-08-14 04:44:34 +00:00
|
|
|
{{ partial "article-pagination.html" . }}
|
2022-06-25 04:17:44 +00:00
|
|
|
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
|
|
|
|
{{ if templates.Exists "partials/comments.html" }}
|
|
|
|
<div class="pt-3">
|
|
|
|
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
|
|
|
|
<div class="pt-3">
|
|
|
|
{{ partial "comments.html" . }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
{{ warnf "[CONGO] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|