mirror of https://github.com/jpanther/congo.git
Compare commits
1 Commits
e89147e233
...
2b0b7b6566
Author | SHA1 | Date |
---|---|---|
stereobooster | 2b0b7b6566 |
|
@ -1,7 +1,8 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{- $images := .Resources.ByType "image" }}
|
{{- $images := .Resources.ByType "image" }}
|
||||||
{{- $cover := $images.GetMatch (.Params.cover | default "*cover*") }}
|
{{- $cover := $images.GetMatch (.Params.cover | default "*cover*") }}
|
||||||
{{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $cover }}
|
{{- $feature := (.Params.feature | default "*feature*") | default $cover }}
|
||||||
|
{{- $featureImg := $images.GetMatch $feature }}
|
||||||
<article>
|
<article>
|
||||||
<header class="max-w-prose">
|
<header class="max-w-prose">
|
||||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||||
|
@ -13,10 +14,10 @@
|
||||||
<div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
<div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||||
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
|
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
|
||||||
</div>
|
</div>
|
||||||
{{ if $feature }}
|
{{ if $featureImg }}
|
||||||
<div class="prose">
|
<div class="prose">
|
||||||
{{ $alt := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
|
{{ $alt := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
|
||||||
{{ partial "picture.html" (dict "context" . "resource" $feature "alt" $alt "class" "mb-6 -mt-4 rounded-md") }}
|
{{ partial "picture.html" (dict "context" . "src" $feature "alt" $alt "class" "mb-6 -mt-4 rounded-md") }}
|
||||||
{{ with $.Params.coverCaption }}
|
{{ with $.Params.coverCaption }}
|
||||||
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
|
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -16,9 +16,7 @@
|
||||||
/>
|
/>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $resource := "" }}
|
{{ $resource := "" }}
|
||||||
{{ if .resource }}
|
{{ if .context.Page.Resources.GetMatch ($url.String) }}
|
||||||
{{ $resource = .resource }}
|
|
||||||
{{ else if .context.Page.Resources.GetMatch ($url.String) }}
|
|
||||||
{{ $resource = .context.Page.Resources.GetMatch ($url.String) }}
|
{{ $resource = .context.Page.Resources.GetMatch ($url.String) }}
|
||||||
{{ else if resources.GetMatch ($url.String) }}
|
{{ else if resources.GetMatch ($url.String) }}
|
||||||
{{ $resource = resources.Get ($url.String) }}
|
{{ $resource = resources.Get ($url.String) }}
|
||||||
|
|
Loading…
Reference in New Issue