132 lines
5.3 KiB
HTML
132 lines
5.3 KiB
HTML
{{ define "main" }}
|
||
|
||
|
||
<style>body { height: auto !important; min-height: 100vh !important; }</style>
|
||
<link rel="stylesheet" href="/css/projects.css">
|
||
<link rel="stylesheet" href="/css/topics.css">
|
||
<link rel="stylesheet" href="/css/publications.css">
|
||
|
||
|
||
{{ $slug := .Slug }}
|
||
{{ $barColor := "#888" }}
|
||
{{ $areaLabel := "" }}
|
||
{{ if eq $slug "research-area-a" }}{{ $barColor = "#ef9052" }}{{ $areaLabel = "Area A" }}{{ end }}
|
||
{{ if eq $slug "research-area-b" }}{{ $barColor = "#0a8f37" }}{{ $areaLabel = "Area B" }}{{ end }}
|
||
{{ if eq $slug "research-area-c" }}{{ $barColor = "#dc1a17" }}{{ $areaLabel = "Area C" }}{{ end }}
|
||
|
||
<div class="topics-page">
|
||
|
||
{{/* ── Back + header ── */}}
|
||
<a class="project-back" href="/topics/">← All topics</a>
|
||
|
||
<div class="area-bar" style="margin-bottom:1.5rem">
|
||
<div style="flex:1;background:{{ $barColor }};border-radius:3px"></div>
|
||
</div>
|
||
|
||
{{/* ── Intro row ── */}}
|
||
<div class="projects-intro-row" style="margin-bottom:2.5rem">
|
||
<div class="projects-intro-text">
|
||
{{ with $areaLabel }}
|
||
<div class="area-card-label" style="color:{{ $barColor }};margin-bottom:0.25rem">{{ . }}</div>
|
||
{{ end }}
|
||
<h1 class="projects-title" style="margin-bottom:0.5rem">{{ .Title }}</h1>
|
||
{{ if .Content }}
|
||
<div class="topic-content">{{ .Content }}</div>
|
||
{{ end }}
|
||
</div>
|
||
{{ if $areaLabel }}
|
||
<div class="projects-intro-figure">
|
||
<img src="/Figure3.svg" alt="">
|
||
</div>
|
||
{{ end }}
|
||
</div>
|
||
|
||
{{/* ── Projects in this topic ── */}}
|
||
{{ $projects := where .Pages "Type" "projects" }}
|
||
{{ if gt (len $projects) 0 }}
|
||
<h2 class="topics-section-title">Projects in this area</h2>
|
||
<div class="projects-grid">
|
||
{{ range $projects }}
|
||
{{ $thumb := .Resources.GetMatch "*thumbnail*" }}
|
||
<article class="project-card">
|
||
<a class="project-card-top" href="{{ .Permalink }}">
|
||
{{ with $thumb }}
|
||
<img class="project-thumb" src="{{ (.Resize "320x").RelPermalink }}" alt="">
|
||
{{ end }}
|
||
<h4 class="project-title">{{ .Title }}</h4>
|
||
</a>
|
||
<div class="project-meta">
|
||
{{ range .GetTerms "contributors" }}
|
||
<a class="project-tag" href="{{ .Permalink }}">{{ .Title }}</a>
|
||
{{ end }}
|
||
{{ range .GetTerms "topics" }}
|
||
<a class="project-tag project-tag-topic" href="{{ .Permalink }}">{{ .Title }}</a>
|
||
{{ end }}
|
||
</div>
|
||
<p class="project-excerpt">{{ .Summary | truncate 120 }}</p>
|
||
<a class="project-arrow" href="{{ .Permalink }}" aria-label="View project">→</a>
|
||
</article>
|
||
{{ end }}
|
||
</div>
|
||
{{ end }}
|
||
|
||
{{/* ── Publications in this topic ── */}}
|
||
{{ $pubs := where .Pages "Type" "publications" }}
|
||
{{/* Fallback: Publications sind sprachneutral – hole sie aus der Default-Sprache wenn aktuelle Sprache leer ist */}}
|
||
{{ if eq (len $pubs) 0 }}
|
||
{{ with (index site.Sites 0).GetPage .Path }}
|
||
{{ $pubs = where .Pages "Type" "publications" }}
|
||
{{ end }}
|
||
{{ end }}
|
||
{{ if gt (len $pubs) 0 }}
|
||
<h2 class="topics-section-title" style="margin-top:3rem">Publications</h2>
|
||
<div class="pub-grid">
|
||
{{ range $pubs }}
|
||
{{ $topics := delimit (.Params.topics | default slice) " " }}
|
||
{{ $title := .Title }}
|
||
{{ $url := .Params.external_url }}
|
||
<article class="pub-card" data-topics="{{ $topics }}">
|
||
<div class="pub-card-inner">
|
||
<div class="pub-meta-top">
|
||
<span class="pub-date">{{ .Date.Format "Jan 2006" }}</span>
|
||
</div>
|
||
<p class="pub-title-text">
|
||
{{ with $url }}<a href="{{ . }}" target="_blank" rel="noopener">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}
|
||
</p>
|
||
<div class="pub-contributors">
|
||
{{ range .GetTerms "contributors" }}
|
||
<a class="project-tag" href="{{ .Permalink }}">{{ .Title }}</a>
|
||
{{ end }}
|
||
</div>
|
||
{{ with $url }}
|
||
<a class="pub-doi" href="{{ . }}" target="_blank" rel="noopener">→ DOI</a>
|
||
{{ end }}
|
||
</div>
|
||
</article>
|
||
{{ end }}
|
||
</div>
|
||
{{ end }}
|
||
|
||
{{/* ── Other pages (contributors etc.) ── */}}
|
||
{{ $others := where (where .Pages "Type" "ne" "projects") "Type" "ne" "publications" }}
|
||
{{ if gt (len $others) 0 }}
|
||
<h2 class="topics-section-title" style="margin-top:3rem">Contributors</h2>
|
||
<div class="contributors-grid">
|
||
{{ range $others }}
|
||
{{ $portrait := .Resources.GetMatch "*portrait*" }}
|
||
<a class="contributor-card" href="{{ .Permalink }}">
|
||
<div class="contributor-portrait">
|
||
{{ with $portrait }}
|
||
<img src="{{ (.Fill "300x300 Center").RelPermalink }}" alt="{{ $.Title }}">
|
||
{{ else }}
|
||
<div class="contributor-placeholder"><span>{{ substr .Title 0 1 }}</span></div>
|
||
{{ end }}
|
||
</div>
|
||
<div class="contributor-name">{{ .Title }}</div>
|
||
</a>
|
||
{{ end }}
|
||
</div>
|
||
{{ end }}
|
||
|
||
</div>
|
||
{{ end }} |