25 lines
823 B
HTML
25 lines
823 B
HTML
{{ 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 }}
|