50 lines
2.1 KiB
HTML
50 lines
2.1 KiB
HTML
{{ define "stylesheet" }}{{ $scss := resources.Get "scss/_default/single.scss" }}{{ $style := $scss | resources.ToCSS }}
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}" type="text/css" media="screen" />
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main>
|
|
<div class="container">
|
|
<section class="section-article">
|
|
<article>
|
|
<p class="meta">
|
|
{{ if eq .Params.type "project" }}<span title="{{ .Date.Format "2 Jan 2006" }}">latest update: {{ .Date.Format "2. January 2006" }}</span>{{ end }}
|
|
{{ if ne .Params.type "project" }}<span title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">{{ .Date.Format "2. January 2006" }}</span>{{ end }}
|
|
<span>{{ with .Params.author }}by {{ end }}{{ .Params.author }}</span>
|
|
</p>
|
|
<h1 class="title">{{ .Title }}</h1>
|
|
{{ with .Params.featured_image }}
|
|
<img src="{{ . | relURL }}">
|
|
{{ end }}
|
|
{{ .Content }}
|
|
<aside class="meta">
|
|
{{ with .Params.topics }}
|
|
<ul class="topics">
|
|
{{ range . }}
|
|
<li><a href="{{ "topics" | relURL}}/{{ . | urlize }}">{{ . }}</a> </li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
{{ with .Params.tags }}
|
|
<ul class="tags">
|
|
{{ range . }}
|
|
<li> <a href="{{ "tags" | relURL }}/{{ . | urlize }}">{{ . }}</a> </li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</aside>
|
|
</article>
|
|
</section>
|
|
<section class="section-articles">
|
|
<article class="next-article">
|
|
{{ with .NextInSection }}<span>{{ if eq .Params.type "project" }}next project{{ end }}{{ if ne .Params.type "project" }}next article{{ end }}</span>
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}
|
|
</article>
|
|
<article class="previous-article">
|
|
{{ with .PrevInSection }}<span>{{ if eq .Params.type "project" }}previous project{{ end }}{{ if ne .Params.type "project" }}previous article{{ end }}</span>
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}
|
|
</article>
|
|
</section>
|
|
</div>
|
|
</main>
|
|
{{ end }}
|