86 lines
2.3 KiB
HTML

{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
Updated <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ with .Params.links }}
<section>
<h2>Links</h2>
<ul>
{{ range . }}
<li><a href="{{ .url }}" target="_blank" rel="noopener">{{ .title }}</a></li>
{{ end }}
</ul>
</section>
{{ end }}
{{ with .Params.website }}
<p>
Website: <a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a>
</p>
{{ end }}
{{ with .Params.github }}
<p>
<a href="{{ . }}" target="_blank" rel="noopener">View on GitHub</a>
</p>
{{ end }}
<section>
<h2>At a Glance</h2>
<table id="taxonomies">
<thead>
<tr>
<th>Taxonomy</th>
<th>Terms</th>
</tr>
</thead>
<tbody>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
{{ with $taxonomy }}
<tr>
<th>{{ $taxonomyname | strings.FirstUpper }}</th>
<td>
{{ range $key, $value := $taxonomy }}
{{ partial "term-link.html" (dict "name" $key "taxonomy" $taxonomyname) }}
{{ end }}
</td>
</tr>
{{ end }}
{{ end }}
</tbody>
</table>
</section>
<section>
<h2>Description</h2>
{{ .Content }}
</section>
{{ with .Params.publications}}
<section>
<h2>Publications</h2>
<ul>
{{ range $citation, $pub := site.Data.publications }}
{{ range $pub }}
{{ if in $.Params.publications .key }}
<li>
{{ if .year }} <strong>{{ .year }}</strong>: {{ end }}
{{ if .title }} <em>{{ .title }}</em> {{ end }}
{{ if .author }} <br /> by {{ delimit .author " | " | html }} {{ end }}
{{ if .booktitle }} <br />Appears in <em>{{ .booktitle }}</em> {{ end }}
{{ if .journal }} <br />Appears in <em>{{ .journal }}</em> {{ end }}
{{ if .volume }} <strong>{{ .volume }}</strong> {{ end }}
{{ if .pages }} ({{ .pages }}) {{ end }}
{{ if .doi }} <br /><a href="https://doi.org/{{ . }}" target="_blank" rel="noopener">DOI: {{ .doi }}</a> {{ end }}
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</section>
{{ end }}
{{ end }}