website/layouts/_default/list.html
2020-11-04 18:37:31 +01:00

37 lines
1.3 KiB
HTML

{{ define "stylesheet" }}{{ $scss := resources.Get "/_default/list.scss" }}{{ $style := $scss | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}" type="text/css" media="screen" rel="preload" />
{{ end }}
{{ define "main" }}
<main>
<div class="container">
<section class="section-articles">
{{ range .Pages }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
{{ if eq .Params.type "project" }}
<p class="" title="last change: {{ .Date.Format "2 Jan 2006" }}">
{{ with .Params.activetime }}<span class="date">{{ . }}</span>{{ end }}
{{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}
</p>
{{ end }}
{{ if ne .Params.type "project" }}
<p class="meta" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">
<span class="date">{{ .Date.Format "2 January 2006" }}</span>
{{ with .Params.author }}<span class="author">by {{ .Params.author }}</span>{{ end }}
</p>
{{ end }}
{{ with .Description }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.featured_image }}
<img src="{{ . | relURL }}" loading="lazy" alt="">
{{ end }}
</article>
</a>
{{ end }}
</section>
</div>
</main>
{{ end }}