congo/layouts/partials/article-link.html

43 lines
1.5 KiB
HTML
Raw Normal View History

2021-08-11 05:28:33 +00:00
<article>
<h3 class="mt-6 text-xl font-semibold">
{{ with .Params.externalUrl }}
2021-08-20 07:02:08 +00:00
<a
class="decoration-primary-500 hover:underline hover:underline-offset-2 text-neutral-800 dark:text-neutral"
href="{{ . }}"
2021-08-20 07:02:08 +00:00
target="_blank"
rel="external"
>{{ $.Title | emojify }}</a
2021-08-11 05:28:33 +00:00
>
<span
class="absolute mt-0 ltr:ml-[0.1rem] rtl:mr-[0.1rem] text-xs cursor-default text-neutral-400 dark:text-neutral-500"
2021-08-17 06:48:08 +00:00
title="{{ i18n "list.externalurl_title" }}"
2021-08-11 05:28:33 +00:00
>
<span class="rtl:hidden">&#8599;</span>
<span class="ltr:hidden">&#8598;</span>
</span>
2021-08-11 05:28:33 +00:00
{{ else }}
<a
class="decoration-primary-500 hover:underline hover:underline-offset-2 text-neutral-800 dark:text-neutral"
href="{{ .RelPermalink }}"
>{{ .Title | emojify }}</a
>
2021-08-11 05:28:33 +00:00
{{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}
2022-01-11 05:17:49 +00:00
<div class="ltr:ml-2 rtl:mr-2">
2021-09-20 03:24:28 +00:00
{{ partial "badge.html" (i18n "article.draft" | 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
{{ 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" . }}
2021-08-11 05:28:33 +00:00
</div>
2021-10-19 06:04:42 +00:00
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
<div class="py-1 prose dark:prose-invert">
2021-10-19 06:04:42 +00:00
{{ .Summary | emojify }}
</div>
{{ end }}
2021-08-11 05:28:33 +00:00
</article>