mirror of https://github.com/jpanther/congo.git
✨ Add badge and button shortcodes
parent
7ce10997ce
commit
fe7d59a855
|
@ -3,7 +3,7 @@
|
|||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}
|
||||
{{ if not (in .Site.Params.sitemap.excludedKinds .Kind) }}
|
||||
{{ if and (.Param "xml" | default true) (not (isset .Params "externalurl")) }}
|
||||
{{ if and (.Param "xml" | default true) (not (isset .Params "externalUrl")) }}
|
||||
{{- if .Permalink -}}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
|
|
|
@ -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" . }}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<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"
|
||||
>
|
||||
{{ . }}
|
||||
</span>
|
|
@ -0,0 +1 @@
|
|||
{{ partial "badge.html" .Inner }}
|
|
@ -0,0 +1,7 @@
|
|||
<a
|
||||
class="px-4 py-2 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||
{{ with .Get "href" }}href="{{ . }}"{{ end }}
|
||||
{{ with .Get "target" }}target="{{ . }}"{{ end }}
|
||||
role="button"
|
||||
>{{ .Inner }}
|
||||
</a>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue