Both templates referenced their illustration as a bare relative path
("projects.png", "topics.png"). The browser resolves that against the
current URL, so on /de/projects/ and /de/topics/ it pointed at a file that
Hugo never publishes there — the images live in the English section
bundles. Resolving them via .Resources.GetMatch yields the correct path in
every language, and the surrounding `with` drops the <img> entirely if the
file is ever renamed instead of leaving a broken image.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
75 lines
3.7 KiB
HTML
75 lines
3.7 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">
|
||
|
||
<div class="topics-page">
|
||
|
||
<h1 class="projects-title">Research Topics</h1>
|
||
<p class="projects-subtitle">Neuropsychobiology of Aggression</p>
|
||
<div class="area-bar" style="margin-bottom:2rem">
|
||
<div class="area-bar-a" style="flex:8"></div>
|
||
<div class="area-bar-b" style="flex:5"></div>
|
||
<div class="area-bar-c" style="flex:7"></div>
|
||
<div class="area-bar-q" style="flex:3"></div>
|
||
</div>
|
||
|
||
{{/* ── Intro + figure ── */}}
|
||
<div class="projects-intro-row" style="margin-bottom:2rem">
|
||
<div class="projects-intro-text">
|
||
<h2 class="projects-areas-title">Research Topics</h2>
|
||
<p>TRR379 is a collaborative research effort spanning a broad range of topics centered on aggression in mental disorders (AMD) — a prevalent symptom with significant clinical challenges and societal implications.
|
||
The biological basis of AMD remains poorly understood, largely due to the heterogeneity of both aggression and psychiatric disorders. This complexity hinders progress in prevention and intervention. TRR379 brings together leading German clinical and experimental neuroscience sites to address this gap through a comprehensive, multimodal approach.
|
||
Below is an overview of the research fields covered within this consortium.</p>
|
||
</div>
|
||
<div class="projects-intro-figure">
|
||
{{/* Resolve via the page bundle, not as a bare relative path:
|
||
the image lives in the English section bundle, so "topics.png"
|
||
would 404 on /de/topics/. GetMatch returns /topics/topics.png
|
||
in every language. */}}
|
||
{{ with .Resources.GetMatch "topics.png" }}
|
||
<img src="{{ .RelPermalink }}" alt="">
|
||
{{ end }}
|
||
</div>
|
||
</div>
|
||
|
||
{{/* ── Research Areas – large cards ── */}}
|
||
<h2 class="topics-section-title">Research Areas</h2>
|
||
<div class="area-cards">
|
||
{{ range where .Pages "Slug" "in" (slice "research-area-a" "research-area-b" "research-area-c") }}
|
||
{{ $color := "#888" }}
|
||
{{ $slug := .Slug }}
|
||
{{ if eq $slug "research-area-a" }}{{ $color = "#ef9052" }}{{ end }}
|
||
{{ if eq $slug "research-area-b" }}{{ $color = "#0a8f37" }}{{ end }}
|
||
{{ if eq $slug "research-area-c" }}{{ $color = "#dc1a17" }}{{ end }}
|
||
<a class="area-card" href="{{ .Permalink }}" style="border-top: 5px solid {{ $color }}">
|
||
<div class="area-card-label" style="color:{{ $color }}">
|
||
{{ if eq $slug "research-area-a" }}Area A{{ end }}
|
||
{{ if eq $slug "research-area-b" }}Area B{{ end }}
|
||
{{ if eq $slug "research-area-c" }}Area C{{ end }}
|
||
</div>
|
||
<h3 class="area-card-title">{{ .Title }}</h3>
|
||
<p class="area-card-desc">{{ .Summary | truncate 120 }}</p>
|
||
<span class="area-card-arrow" style="color:{{ $color }}">→</span>
|
||
</a>
|
||
{{ end }}
|
||
</div>
|
||
|
||
{{/* ── All other topics ── */}}
|
||
<h2 class="topics-section-title" style="margin-top:3rem">All Topics</h2>
|
||
<div class="topics-grid">
|
||
{{ range sort .Pages "Title" }}
|
||
{{ if not (in (slice "research-area-a" "research-area-b" "research-area-c") .Slug) }}
|
||
<a class="topic-card" href="{{ .Permalink }}">
|
||
<span class="topic-card-title">{{ .Title }}</span>
|
||
<span class="topic-card-count">{{ len .Pages }} projects</span>
|
||
</a>
|
||
{{ end }}
|
||
{{ end }}
|
||
</div>
|
||
|
||
</div>
|
||
{{ end }}
|