mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-19 09:03:02 -04:00
✨ Add article thumb, cover and feature images
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
{{ define "main" }}
|
||||
{{- $images := .Resources.ByType "image" }}
|
||||
{{- $cover := $images.GetMatch "*cover*" }}
|
||||
{{- $feature := $images.GetMatch "*feature*" | default $cover }}
|
||||
<article>
|
||||
<header class="max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
@@ -10,6 +13,17 @@
|
||||
<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") }}
|
||||
</div>
|
||||
{{ with $feature }}
|
||||
<img
|
||||
class="mb-6 -mt-4 rounded-md"
|
||||
srcset="
|
||||
{{- (.Resize "330x").RelPermalink }} 330w,
|
||||
{{- (.Resize "660x").RelPermalink }} 660w,
|
||||
{{- (.Resize "1024x").RelPermalink }} 1024w,
|
||||
{{- (.Resize "1320x").RelPermalink }} 2x"
|
||||
src="{{ (.Resize "660x").RelPermalink }}"
|
||||
/>
|
||||
{{ end }}
|
||||
</header>
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
|
||||
|
||||
Reference in New Issue
Block a user