Add first article

This commit is contained in:
2026-09-27 19:09:58 +02:00
parent 0fe100bcbf
commit b951edb87c
62 changed files with 2574 additions and 29 deletions
+65
View File
@@ -0,0 +1,65 @@
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
{{ define "content" }}
{{ partial "research/styles.html" . }}
{{- $segments := split (strings.TrimPrefix "/" (strings.TrimSuffix "/" .RelPermalink)) "/" -}}
{{- $depth := len $segments -}}
{{- if eq $depth 1 -}}
{{/* Research root: data-driven publication list, no visible title or intro. */}}
{{- $pubs := hugo.Data.publications.publications -}}
{{- $groups := slice
(dict "type" "phdthesis" "label" "PhD Theses" "prefix" "T")
(dict "type" "journal" "label" "Journal Articles" "prefix" "J")
(dict "type" "conference" "label" "Conference Publications" "prefix" "C")
-}}
{{- range $groups -}}
{{- $group := . -}}
{{- $filtered := where $pubs "type" $group.type -}}
{{- $grouped := sort $filtered "year" "desc" -}}
{{- with $grouped -}}
<section class="pub-section">
<h2>{{ $group.label }}</h2>
<div class="pub-list">
{{- $count := len . -}}
{{- range $i, $pub := . -}}
{{- $num := sub $count $i -}}
{{- $prefix := printf "%s%d" $group.prefix $num -}}
{{ partial "research/publication-entry.html" (dict "pub" $pub "prefix" $prefix) }}
{{- end -}}
</div>
</section>
{{- end -}}
{{- end -}}
{{- else if eq $depth 2 -}}
{{/* Paper landing page. */}}
{{ partial "research/paper-body.html" . }}
{{- else -}}
{{/* Nested notebook section (e.g. tikz/_index.md). */}}
<article class="post research-notebook">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<div class="post-meta" style="text-align:center;">
<a href="{{ .Parent.RelPermalink }}">← Back to paper</a>
</div>
</header>
{{ partial "research/toc.html" . }}
<div class="post-content">
{{ .Content }}
{{- if .Pages }}
<hr>
<h2>Pages</h2>
<ul>
{{- range .Pages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end }}
</ul>
{{- end }}
</div>
</article>
{{- end -}}
{{ end }}