Add badge and button shortcodes

This commit is contained in:
James Panther
2021-08-16 15:09:21 +10:00
parent 7ce10997ce
commit fe7d59a855
6 changed files with 18 additions and 9 deletions
+3 -7
View File
@@ -1,7 +1,7 @@
<article>
<h3 class="mt-6 text-xl font-semibold">
{{ if isset .Params "externalurl" }}
<a class="hover:underline" href="{{ .Params.externalurl }}" target="_blank" rel="external"
{{ if isset .Params "externalUrl" }}
<a class="hover:underline" href="{{ .Params.externalUrl }}" target="_blank" rel="external"
>{{ .Title }}</a
>
<span
@@ -14,11 +14,7 @@
<a class="hover:underline" href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}
<span
class="ml-1 px-1 py-[2px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
>
Draft
</span>
{{ partial "badge.html" "Draft" }}
{{ end }}
{{ if templates.Exists "partials/extend-article-link.html" }}
{{ partial "extend-article-link.html" . }}