Add home page with short intro and highlights
This commit is contained in:
1 parent
2490e8bbb1
commit
adec6e712f
4 files changed
+84
No files matched your search
@@ -0,0 +1,50 @@
|
||||
{{ 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 →</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 →</a></p>
|
||||
</section>
|
||||
{{ end }}{{ end }}
|
||||
{{ end }}
|
||||
Reference in new issue
Block a user