2023-12-26 00:56:32 +00:00
|
|
|
<article class="mt-6 flex max-w-prose flex-row">
|
2022-11-08 22:30:26 +00:00
|
|
|
{{- $images := $.Resources.ByType "image" }}
|
2023-01-13 02:02:32 +00:00
|
|
|
{{- $thumbnail := $images.GetMatch (.Params.thumbnail | default "*thumb*") }}
|
|
|
|
{{- $feature := $images.GetMatch (.Params.feature | default "*feature*") | default $thumbnail }}
|
2022-11-08 22:30:26 +00:00
|
|
|
{{- with $feature }}
|
2023-04-05 00:50:15 +00:00
|
|
|
<div class="flex-none pe-4 sm:pe-6 ">
|
2022-11-08 22:30:26 +00:00
|
|
|
<a
|
|
|
|
href="{{ with $.Params.externalUrl }}
|
|
|
|
{{ . }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $.RelPermalink }}
|
|
|
|
{{ end }}"
|
2023-01-11 23:38:17 +00:00
|
|
|
aria-label="{{ $.Title | emojify }}"
|
2022-11-08 22:30:26 +00:00
|
|
|
>
|
|
|
|
<img
|
2023-01-13 02:02:32 +00:00
|
|
|
alt="{{ $.Params.featureAlt | default $.Params.thumbnailAlt | default "" }}"
|
2023-01-14 23:38:53 +00:00
|
|
|
{{ if eq .MediaType.SubType "svg" }}
|
|
|
|
class="w-24 max-w-[6rem] max-h-[4.5rem] rounded-md sm:max-h-[7.5rem] sm:w-40
|
|
|
|
sm:max-w-[10rem]" src="{{ .RelPermalink }}"
|
|
|
|
{{ else }}
|
|
|
|
class="w-24 rounded-md sm:w-40" srcset="
|
2023-04-05 00:50:15 +00:00
|
|
|
{{- (.Fill "160x120 smart").RelPermalink }}
|
|
|
|
160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x"
|
2023-12-26 00:22:55 +00:00
|
|
|
src="{{ (.Fill "160x120 smart").RelPermalink }}" width="160" height="120"
|
2023-01-14 23:38:53 +00:00
|
|
|
{{ end }}
|
2023-05-26 21:37:02 +00:00
|
|
|
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
2023-05-26 21:31:23 +00:00
|
|
|
loading="lazy"
|
|
|
|
{{ end }}
|
2022-11-08 22:30:26 +00:00
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{- end }}
|
|
|
|
<div>
|
|
|
|
<h3 class="flex items-center text-xl font-semibold">
|
|
|
|
{{ with .Params.externalUrl }}
|
|
|
|
<div>
|
|
|
|
<a
|
|
|
|
class="text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
|
|
|
|
href="{{ . }}"
|
|
|
|
target="_blank"
|
|
|
|
rel="external"
|
|
|
|
>{{ $.Title | emojify }}</a
|
|
|
|
>
|
|
|
|
<span
|
2023-12-26 00:56:32 +00:00
|
|
|
class="cursor-default align-top text-xs text-neutral-400 dark:text-neutral-500"
|
2022-11-08 22:30:26 +00:00
|
|
|
title="{{ i18n "list.externalurl_title" }}"
|
|
|
|
>
|
|
|
|
<span class="rtl:hidden">↗</span>
|
|
|
|
<span class="ltr:hidden">↖</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
2022-06-27 00:16:36 +00:00
|
|
|
<a
|
2022-08-18 04:59:46 +00:00
|
|
|
class="text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
|
2022-11-08 22:30:26 +00:00
|
|
|
href="{{ .RelPermalink }}"
|
|
|
|
>{{ .Title | emojify }}</a
|
2022-06-27 00:16:36 +00:00
|
|
|
>
|
2022-11-08 22:30:26 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ if and .Draft .Site.Params.article.showDraftLabel }}
|
2023-04-05 00:50:15 +00:00
|
|
|
<div class="ms-2">
|
2022-11-08 22:30:26 +00:00
|
|
|
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ if templates.Exists "partials/extend-article-link.html" }}
|
|
|
|
{{ partial "extend-article-link.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
</h3>
|
|
|
|
<div class="text-sm text-neutral-500 dark:text-neutral-400">
|
|
|
|
{{ partial "article-meta.html" . }}
|
|
|
|
</div>
|
|
|
|
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
|
2023-12-26 00:56:32 +00:00
|
|
|
<div class="prose py-1 dark:prose-invert">
|
2022-11-08 22:30:26 +00:00
|
|
|
{{ .Summary | emojify }}
|
2021-08-21 01:42:40 +00:00
|
|
|
</div>
|
2021-08-14 04:57:31 +00:00
|
|
|
{{ end }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</div>
|
|
|
|
</article>
|