www-from-model/layouts/persons/term.html
Stephan Heunis 8404e43236 Restructure layouts directory
This change from '_default/person.html' to 'persons/term.html' makes for a more
consistent and intuitive approach (IMO) to structuring layouts that involve
taxonomies and terms. If we have a taxonomy and we want to customize either the
taxonomy page or term page, we can create a new directory at 'layouts/taxonomy-name'
and then just add the customized pages 'taxonomy' or 'term' inside it.
2026-04-22 13:55:36 +02:00

108 lines
No EOL
3.7 KiB
HTML

{{ define "main" }}
<header>
{{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
{{ if and .Params.given_name .Params.family_name }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Params.given_name }}&nbsp;{{ .Params.family_name }}</h1>
{{ else }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
{{ end }}
</header>
<article class="prose max-w-full dark:prose-invert">
<!-- Portrait depiction and Graph -->
{{ $portraits := .Resources.Match "portrait.*" }}
{{ $hasPortrait := gt (len $portraits) 0 }}
<table class="not-prose w-full">
<tr>
{{ if $hasPortrait }}
<td width="30%" class="align-middle text-center">
{{ with index $portraits 0 }}
<img src="{{ .RelPermalink }}" alt="Portrait of {{ $.Params.given_name }} {{ $.Params.family_name }}">
{{ end }}
</td>
{{ end }}
<td class="align-middle text-center">
{{ if .Param "graphRootNodePID" | default false }}
<div class="prose max-w-full dark:prose-invert">
<script>
const limitGraphRootNodeId = '{{ .Param "graphRootNodePID" }}';
</script>
<script type="module" crossorigin src="/graph.js"></script>
<div class="relative">
{{ if .Param "graphDescription" | default false }}
<p>{{ .Param "graphDescription" }}</p>
{{ end }}
<div id="sigma-node-type-controls" class="absolute z-10 left-2 bottom-2" >
<div id="sigma-controls-list" ></div>
</div>
<div id="sigma-container" class="w-full h-[40vh] m-0 p-0 bg-neutral-100 dark:bg-neutral-600" ></div>
</div>
</div>
{{ end }}
</td>
</tr>
</table>
<!-- Description -->
{{ with .Params.description }}
<p>{{ . }}</p>
{{ end }}
<!-- Identifiers -->
{{ $links := dict
"Debian" "https://qa.debian.org/developer.php?login=%s"
"GitHub" "https://github.com/%s"
"LinkedIn" "https://www.linkedin.com/in/%s"
"ORCID" "https://orcid.org/%s"
"ResearchGate" "https://www.researchgate.net/profile/%s"
}}
{{ with .Params.identifiers }}
<ul>
{{ range . }}
{{ $notation := .notation }}
{{ $name := "" }}
{{ if reflect.IsMap .creator }}
{{ $name = index .creator "name" }}
{{ else }}
{{ $name = .creator }}
{{ end }}
<li>
{{ if and $name (isset $links $name) }}
<a href="{{ printf (index $links $name) $notation }}">
{{ $name }}: {{ $notation }}
</a>
{{ else }}
{{ $name }}: {{ $notation }}
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</article>
{{ if .Data.Pages }}
<br>
<section>
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }}
</h2>
<hr class="w-36 border-dotted border-neutral-400" />
{{ range .Pages }}
{{ partial "article-link.html" . }}
{{ end }}
{{ end }}
{{ else }}
{{ range (.Paginate .Pages).Pages }}
{{ partial "article-link.html" . }}
{{ end }}
{{ end }}
</section>
{{ partial "pagination.html" . }}
{{ else }}
<section class="prose mt-10 dark:prose-invert">
<p class="border-t py-8">
<em>{{ i18n "list.no_articles" | emojify }}</em>
</p>
</section>
{{ end }}
{{ end }}