template installiert
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Locale }}" dir="{{ or .Site.Language.Direction "ltr" }}">
|
||||
{{ partial "head.html" . }}
|
||||
<body class="single-body">
|
||||
<a class="skip-link" href="#main-content">Skip to content</a>
|
||||
{{ partial "nav-bar.html" . }}
|
||||
<main id="main-content" class="content side-text-padding" tabindex="-1">
|
||||
<article class="post">
|
||||
<header class="post-header">
|
||||
{{ if or (isset .Params "date") (isset .Params "categories") -}}
|
||||
<div class="post-meta">
|
||||
{{ if isset .Params "date" }}<p><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
|
||||
{{ if isset .Params "categories" }}<p>{{ range $index, $category := .Params.categories }}{{ if $index }}, {{ end }}{{ with $.Site.GetPage (printf "/categories/%s" ($category | urlize)) }}<a href="{{ .RelPermalink }}">{{ $category }}</a>{{ else }}{{ $category }}{{ end }}{{ end }}</p>{{ end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
<h1 class="post-title">{{ .Title | markdownify }}</h1>
|
||||
</header>
|
||||
{{ with .Resources.GetMatch "featuredImage" -}}
|
||||
<figure class="post-figure">
|
||||
{{ partial "responsive-image.html" (dict
|
||||
"image" .
|
||||
"alt" .Params.description
|
||||
"widths" (slice 711 1422 2133)
|
||||
"sizes" "(min-width: 711px) 711px, 100vw"
|
||||
"loading" "eager"
|
||||
) }}
|
||||
{{ with .Params.attribution -}}
|
||||
<figcaption>Image by {{ with .link }}<a href="{{ . }}" target="_blank" rel="noreferrer noopener">{{ end }}{{ .name }}{{ with .link }}</a>{{ end }}</figcaption>
|
||||
{{- end }}
|
||||
</figure>
|
||||
{{- end }}
|
||||
{{ if .Params.toc -}}
|
||||
<h2>Contents</h2>
|
||||
{{ .TableOfContents }}
|
||||
{{- end }}
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ partial "disqus.html" . }}
|
||||
</main>
|
||||
{{ with .PrevInSection -}}
|
||||
<nav class="end-nav side-padding" aria-label="Article navigation">
|
||||
{{ .Render "li-next" }}
|
||||
</nav>
|
||||
{{- end }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "scripts.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user