tw-runner
Version:
Run and manage Tower Website projects with this utility.
46 lines (40 loc) • 1.77 kB
HTML
<div class="box h-full flex flex-col justify-between text-center md:text-left gap-4 {{ .styles }}">
{{ if .page }}
<header class="text-xl sm:text-2xl {{.headingStyles}}">
{{ if not .noHeading }}<h2>{{ or .page.Params.description .page.Title }}</h2>{{ else }}<h2></h2>{{ end }}
</header>
<main class="font-extralight {{.contentStyles}}">
<p class="{{ .pStyles }}">{{ .content }}</p>
</main>
<footer class="w-full flex justify-between font-extralight {{.footerStyles}}">
{{/* Author Card & Publishing Info */}}
{{/* Social Sharing */}}
{{ if not .noShare }}
<button class="btn btn-base btn-rounded btn-sm">{{ partial "image/svg-resizeable.html" (dict "src" "images/symbols/share.svg" "class" "fill-white") }}</button>
{{ end }}
{{/* Read More */}}
<a href="{{ .page.Permalink }}" class="btn btn-base btn-sm {{ .ctaStyles }} grid place-content-center">{{ or .cta "See More" }}</a>
</footer>
{{ else }}
{{ if and .heading }}
<header class="{{.headingStyles}}">
{{ if not .noHeading }}<h2>{{ .heading }}</h2>{{ else }}<h2></h2>{{ end }}
</header>
{{ end }}
{{ if .content }}
<main class="font-extralight {{.contentStyles}}">
<p class="{{.pStyles}}">{{ .content }}</p>
</main>
{{ end }}
{{ if .cta }}
<footer class="w-full flex justify-between font-extralight {{.footerStyles}}">
{{/* Social Sharing */}}
{{ if not .noShare }}
<button class="btn btn-base btn-rounded btn-sm">{{ partial "image/svg-resizeable.html" (dict "src" "images/symbols/share.svg" "class" "fill-white") }}</button>
{{ end }}
{{/* Call to Action */}}
<a href="{{ .url }}" class="btn btn-base btn-sm {{.ctaStyles}} grid place-content-center">{{.cta}}</a>
</footer>
{{ end }}
{{ end }}
</div>