forked from q04/www.trr379.de
We expect the front matter to contain the license as a display label only, and do a very simple presentation. This could be improved in various ways, but seems good enough for the first attempt. Maybe it also provides a little "nudge" for using CC licenses.
50 lines
1.7 KiB
HTML
50 lines
1.7 KiB
HTML
{{ define "main" }}
|
|
<article class="max-w-full">
|
|
<header>
|
|
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
|
{{ partial "breadcrumbs.html" . }}
|
|
{{ end }}
|
|
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
|
{{ .Title | emojify }}
|
|
</h1>
|
|
{{ with .GetTerms "contributors" }}
|
|
{{ range . }}
|
|
<span class="ms-1 rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|
</span>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ with .Params.licenses }}
|
|
{{ range . }}
|
|
<span class="ms-1 rounded-md border border-secondary-400 px-1 py-[1px] text-xs font-normal text-secondary-700 dark:border-secondary-600 dark:text-secondary-400">
|
|
{{ . }}
|
|
</span>
|
|
{{ end }}
|
|
{{ end }}
|
|
</header>
|
|
<section class="prose mt-6 max-w-full dark:prose-invert">
|
|
{{ .Content | emojify }}
|
|
</section>
|
|
<section class="prose mt-3 max-w-full dark:prose-invert">
|
|
{{ with .GetTerms "projects" }}
|
|
<h2 class="mt-3 text-lg font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">Contributing projects</h2>
|
|
<ul>
|
|
{{ range . }}
|
|
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
{{ with .GetTerms "topics" }}
|
|
<h2 class="mt-3 text-lg font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">Topics</h2>
|
|
<ul>
|
|
{{ range . }}
|
|
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</section>
|
|
<footer class="pt-8">
|
|
{{ partial "sharing-links.html" . }}
|
|
</footer>
|
|
</article>
|
|
{{ end }}
|