Files
hugo/layouts/index.html
T

51 lines
2.0 KiB
HTML

{{ define "title" }}{{ .Site.Title }}{{ end }}
{{ define "content" }}
{{ partial "home/styles.html" . }}
<section class="home-hero">
<img class="home-photo" src="{{ "img/thomas.jpg" | relURL }}" alt="Thomas Dehaeze" width="130" height="130">
<div>
<h1>{{ .Title }}</h1>
{{ .Content }}
</div>
</section>
<section class="home-section">
<h2>On this site</h2>
<ul class="home-site-list">
<li><a href="{{ "research/" | relURL }}">Publications</a><span>Published work: journal articles, lectures and conference publications.</span></li>
<li><a href="{{ "projects/" | relURL }}">Projects</a><span>Side projects and software tools.</span></li>
<li><a href="{{ "notes/" | relURL }}">Notes</a><span>Technical notes on control, mechatronics and instrumentation</span></li>
</ul>
</section>
<section class="home-section">
<h2>Latest publications</h2>
{{- $pubs := where hugo.Data.publications.publications "type" "ne" "lecture" -}}
<ul class="home-latest">
{{- range first 3 (sort $pubs "year" "desc") -}}
{{- $pub := . -}}
{{- $page := false -}}
{{- with .page }}{{ $page = site.GetPage (printf "/research/%s" .) }}{{ end }}
<li>
{{- with $page }}<a href="{{ .RelPermalink }}">{{ $pub.title }}</a>{{ else }}<strong>{{ $pub.title }}</strong>{{ end -}}
<span class="meta">{{ with .venue }}{{ . }}, {{ end }}{{ .year }}</span>
</li>
{{- end -}}
</ul>
<p class="home-more"><a href="{{ "research/" | relURL }}">All publications &rarr;</a></p>
</section>
{{- with site.GetPage "/projects" }}{{ with .Pages }}
<section class="home-section">
<h2>Projects</h2>
<ul class="home-latest">
{{- range first 3 . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ with or .Description .Summary }}<span class="meta">{{ . | plainify | truncate 140 }}</span>{{ end }}</li>
{{- end }}
</ul>
<p class="home-more"><a href="{{ "projects/" | relURL }}">All projects &rarr;</a></p>
</section>
{{ end }}{{ end }}
{{ end }}