Zebra/themes/casper/layouts/page/single.html

177 lines
4.6 KiB
HTML
Raw Permalink Normal View History

2020-08-05 17:22:00 +02:00
{{ partial "header.html" . }}
{{if .Params.image}}
{{if or (eq (substr .Params.image 0 7) "http://") (eq (substr .Params.image 0 8) "https://")}}
<header class="main-header post-head" style="background-image: url({{.Params.image}})">
{{ else }}
<header class="main-header post-head" style="background-image: url({{.Params.image | relURL}})">
{{ end }}
<nav class="main-nav overlay clearfix">
{{else}}
<header class="main-header post-head no-cover">
<nav class="main-nav overlay clearfix">
{{end}}
{{ if .Site.Params.logo }}
<a class="blog-logo" href="{{.Site.BaseURL}}"><img src="{{ .Site.Params.logo | relURL }}" alt="Home" /></a>
{{end}}
{{ if .Site.Menus.main }}
<a class="menu-button" href="#"><span class="burger">&#9776;</span><span class="word">Menu</span></a>
{{else}}
{{ if .Site.Params.RSSLink}}
<a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}">&nbsp;&nbsp;Subscribe</a>
{{else}}
2022-12-08 15:42:09 +01:00
<a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}">&nbsp;&nbsp;Subscribe</a>
2020-08-05 17:22:00 +02:00
{{end}}
{{end}}
</nav>
{{if eq .Params.index true}}
<div class="vertical">
<div class="main-header-content inner">
<h1 class="page-title">{{.Title}}</h1>
<h2 class="page-description">
{{if .Params.description}}
{{.Params.description}}
{{end}}
</h2>
</div>
</div>
{{end}}
</header>
<main class="content" role="main">
<article class="post {{ .Section }}">
<header class="post-header">
<nav class="breadcrumb">
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)}}
<li><a href="{{.URL}}">{{.Name}}</a></li>
{{ range .Children }}
{{ if .HasChildren }}
{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)}}
<li><a href="{{.URL}}">{{.Name}}</a></li>
{{ range .Children }}
{{ if .HasChildren }}
{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)}}
<li><a href="{{.URL}}">{{.Name}}</a></li>
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
<!-- <li>{{.Title}}</li> -->
</nav>
<h1 class="post-title">{{.Title}}</h1>
<small>{{.Description}}</small>
<section class="post-meta">
{{ if eq .Section "post"}}
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ .Date.Format "Jan 2, 2006" }}
</time>
{{end}}
{{ range .Params.tags }}
<span class="post-tag small"><a href="{{$.Site.BaseURL}}/tags/{{ . | urlize }}/">#{{ . }}</a></span>
{{ end }}
</section>
</header>
<section class="post-content">
{{ .Content }}
{{if ne .Params.index true}}
{{if .Menus.main.HasChildren }}
<nav class="navchildren">
<ul>
<!-- Children contents -->
{{ range .Menus.main.Children }}
<li><a href="{{.URL}}" >{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
{{ end }}
{{if eq .Params.index true}}
<nav class="navpage">
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)}}
{{ range .Children }}
<ul>
<li><a href="{{.URL}}">{{.Name}}</a>
{{ if .HasChildren }}
<ul>
{{ range .Children }}
<li><a href="{{.URL}}">{{.Name}}</a>
{{ if .HasChildren }}
<ul>
{{ range .Children }}
<li><a href="{{.URL}}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</ul>
{{ end }}
</li>
</ul>
{{ end }}
{{end}}
{{end}}
</nav>
{{end}}
</section>
<footer class="post-footer">
{{if .Site.Params.logo}}
<figure class="author-image">
<a class="img" href="{{.Site.BaseURL}}" style="background-image: url({{.Site.Params.logo | relURL}})"><span class="hidden">{{.Site.Params.author}}'s Picture</span></a>
</figure>
{{end}}
{{ partial "author.html" . }}
{{ partial "share.html" . }}
{{ partial "disqus.html" . }}
</footer>
</article>
</main>
{{ partial "suggestions.html" . }}
{{ partial "footer.html" . }}