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
+11
View File
@@ -0,0 +1,11 @@
{{- $links := . -}}
{{- $class := "" -}}
{{- if reflect.IsMap . -}}
{{- $links = .links -}}
{{- $class = .class -}}
{{- end -}}
{{- with $links -}}
<div class="post-meta pub-links{{ with $class }} {{ . }}{{ end }}" style="margin-top:0.35em;">
{{ delimit . " <span class=\"more-meta\">·</span> " | safeHTML }}
</div>
{{- end -}}
+24
View File
@@ -0,0 +1,24 @@
<article class="post research-paper">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
{{- $author := or .Params.author .Params.authors -}}
{{- with $author }}
<div class="post-meta" style="text-align:center;">
{{- if reflect.IsSlice . -}}
{{ delimit . ", " }}
{{- else -}}
{{ . }}
{{- end -}}
</div>
{{- end }}
<div class="post-meta" style="text-align:center;">
{{- with .Params.venue }}<span class="post-time">{{ . }}</span>{{ end -}}
{{- with .Params.year }}<span class="more-meta">{{ . }}</span>{{ end -}}
{{- with or .Params.pubtype .Params.type }}<span class="more-meta">{{ . }}</span>{{ end -}}
</div>
{{ partial "research/paper-links.html" . }}
</header>
<div class="post-content">
{{ .Content }}
</div>
</article>
@@ -0,0 +1,47 @@
{{- $links := slice -}}
{{- $page := . -}}
{{- $pdf := .Params.pdf -}}
{{- if not $pdf }}
{{- with .Resources.Match "paper/*.pdf" }}
{{- range first 1 . }}
{{- $pdf = .RelPermalink -}}
{{- end }}
{{- end }}
{{- end -}}
{{- with $pdf }}{{ $links = $links | append (printf "<a href=\"%s\">PDF</a>" .) }}{{ end -}}
{{- $poster := .Params.poster -}}
{{- if not $poster }}
{{- with .Resources.Match "poster/*.pdf" }}
{{- range first 1 . }}
{{- $poster = .RelPermalink -}}
{{- end }}
{{- end }}
{{- end -}}
{{- with $poster }}{{ $links = $links | append (printf "<a href=\"%s\">Poster</a>" .) }}{{ end -}}
{{- $talk := .Params.talk -}}
{{- if not $talk }}
{{- with .Resources.Match "talk/*.pdf" }}
{{- range first 1 . }}
{{- $talk = .RelPermalink -}}
{{- end }}
{{- end }}
{{- end -}}
{{- with $talk }}{{ $links = $links | append (printf "<a href=\"%s\">Slides</a>" .) }}{{ end -}}
{{- with .Params.video }}{{ $links = $links | append (printf "<a href=\"%s\">Video</a>" .) }}{{ end -}}
{{- with .Params.code }}{{ $links = $links | append (printf "<a href=\"%s\">Code</a>" .) }}{{ end -}}
{{- with .Params.doi }}{{ $links = $links | append (printf "<a href=\"https://doi.org/%s\">DOI</a>" .) }}{{ end -}}
{{- $matlab := .GetPage "matlab" -}}
{{- with $matlab }}{{ $links = $links | append (printf "<a href=\"%s\">Matlab</a>" .RelPermalink) }}{{ end -}}
{{- $python := .GetPage "python" -}}
{{- with $python }}{{ $links = $links | append (printf "<a href=\"%s\">Python</a>" .RelPermalink) }}{{ end -}}
{{- $tikz := .GetPage "tikz" -}}
{{- with $tikz }}{{ $links = $links | append (printf "<a href=\"%s\">TikZ Figures</a>" .RelPermalink) }}{{ end -}}
{{ partial "research/link-row.html" (dict "links" $links "class" "pub-links-centered") }}
@@ -0,0 +1,75 @@
{{- $p := .pub -}}
{{- $prefix := .prefix -}}
{{- $page := false -}}
{{- with $p.page -}}
{{- $page = site.GetPage (printf "/research/%s" .) -}}
{{- end -}}
{{- $links := slice -}}
{{- with $page }}{{ $links = $links | append (printf "<a href=\"%s\">Page</a>" .RelPermalink) }}{{ end -}}
{{- $pdf := "" -}}
{{- if $page }}
{{- with $page.Resources.Match "paper/*.pdf" }}
{{- range first 1 . }}
{{- $pdf = .RelPermalink -}}
{{- end }}
{{- end }}
{{- end -}}
{{- if not $pdf }}{{ $pdf = $p.pdf }}{{ end -}}
{{- with $pdf }}{{ $links = $links | append (printf "<a href=\"%s\">PDF</a>" .) }}{{ end -}}
{{- $poster := "" -}}
{{- if $page }}
{{- with $page.Resources.Match "poster/*.pdf" }}
{{- range first 1 . }}
{{- $poster = .RelPermalink -}}
{{- end }}
{{- end }}
{{- end -}}
{{- if not $poster }}{{ $poster = $p.poster }}{{ end -}}
{{- with $poster }}{{ $links = $links | append (printf "<a href=\"%s\">Poster</a>" .) }}{{ end -}}
{{- $slides := "" -}}
{{- if $page }}
{{- with $page.Resources.Match "talk/*.pdf" }}
{{- range first 1 . }}
{{- $slides = .RelPermalink -}}
{{- end }}
{{- end }}
{{- end -}}
{{- if not $slides }}{{ $slides = $p.slides }}{{ end -}}
{{- with $slides }}{{ $links = $links | append (printf "<a href=\"%s\">Slides</a>" .) }}{{ end -}}
{{- with $p.code }}{{ $links = $links | append (printf "<a href=\"%s\">Code</a>" .) }}{{ end -}}
{{- with $p.video }}{{ $links = $links | append (printf "<a href=\"%s\">Video</a>" .) }}{{ end -}}
{{- with $p.doi }}{{ $links = $links | append (printf "<a href=\"https://doi.org/%s\">DOI</a>" .) }}{{ end -}}
<div class="pub-item">
<div class="pub-header">
<span class="pub-prefix">[{{ $prefix }}]</span>
{{- with $page -}}
<a href="{{ .RelPermalink }}" class="pub-title">{{ $p.title }}</a>
{{- else -}}
<strong class="pub-title">{{ $p.title }}</strong>
{{- end -}}
{{- with $p.note }}<span class="pub-note">{{ . }}</span>{{ end }}
</div>
<div class="pub-meta">
{{- range $i, $a := $p.authors -}}
{{- if $i }}, {{ end -}}
{{- if eq $a "T. Dehaeze" -}}<strong>{{ $a }}</strong>{{ else }}{{ $a }}{{ end -}}
{{- end -}}.
{{- $vol := $p.volume -}}
{{- $num := $p.number -}}
{{- $pages := $p.pages -}}
{{- $year := $p.year -}}
{{- $hasDetail := or $vol $num $pages -}}
{{- with $p.venue }} <em>{{ . }}</em>{{ end -}}
{{- if and $p.venue $hasDetail }},{{ end -}}
{{- if and $vol $num }} {{ $vol }}({{ $num }}){{ else if $vol }} {{ $vol }}{{ end -}}
{{- if $pages }}{{ if or $vol $num }}:{{ else if $p.venue }} {{ end }}{{ $pages }}{{ end -}}
{{- if $year }}{{ if $hasDetail }},{{ end }} {{ $year }}{{ end -}}.
</div>
{{ partial "research/link-row.html" $links }}
</div>
+1
View File
@@ -0,0 +1 @@
<link rel="stylesheet" href="{{ "css/research.css" | relURL }}">
+8
View File
@@ -0,0 +1,8 @@
{{- if and .Site.Params.toc (ne .Params.toc false) -}}
<div class="post-toc" id="post-toc">
<h2 class="post-toc-title">{{ T "toc" }}</h2>
<div class="post-toc-content always-active">
{{ .TableOfContents }}
</div>
</div>
{{- end -}}
+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 }}
+24
View File
@@ -0,0 +1,24 @@
{{ define "content" }}
{{ partial "research/styles.html" . }}
{{- $parentSegments := split (strings.TrimPrefix "/" (strings.TrimSuffix "/" .Parent.RelPermalink)) "/" -}}
{{- $parentDepth := len $parentSegments -}}
{{- $backTarget := .Parent -}}
{{- $backText := "← Back to paper" -}}
{{- if eq $parentDepth 1 -}}
{{- $backText = "← Back to research" -}}
{{- else if gt $parentDepth 2 -}}
{{- $backTarget = .Parent.Parent -}}
{{- end -}}
<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="{{ $backTarget.RelPermalink }}">{{ $backText }}</a>
</div>
</header>
{{ partial "research/toc.html" . }}
<div class="post-content">
{{ .Content }}
</div>
</article>
{{ end }}