msfjarvis.dev/themes/ezhil/layouts/_default/single.html

59 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper post">
{{ partial "head.html" . }}
<div class="post-header">
<h1 class="title">{{ .Title }}</h1>
<div class="meta">Posted at &mdash; {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
</div>
<div class="markdown">
{{ .Content }}
</div>
<div class="post-tags">
{{ if ne .Type "page" }}
{{ if gt .Params.categories 0 }}
<nav class="nav tags">
<ul class="flat">
{{ range .Params.categories }}
<li><a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
{{ end }}
</div>
{{- if and (isset .Site.Params "utterancesrepo") (and (not .Site.IsServer) (not .Site.BuildDrafts)) -}}
{{ partial "utterances.html" . }}
{{- end -}}
{{- $.Scratch.Set "isDisqus" true -}}
<!-- Disable if content type is excluded in config -->
{{- if and (isset .Params "type") (in .Site.Params.disableDisqusTypes .Params.type) -}}
{{- $.Scratch.Set "isDisqus" false -}}
{{- end -}}
<!-- Check if content has flag to enable/disable disqus explicitly -->
{{- if and (isset .Params "disqus") (eq .Params.disqus false) -}}
{{- $.Scratch.Set "isDisqus" false -}}
{{- else if and (isset .Params "disqus") (eq .Params.disqus true) -}}
{{- $.Scratch.Set "isDisqus" true -}}
{{- end -}}
<!-- Check if disqus short name is given -->
{{ if not .Site.DisqusShortname }}
{{- $.Scratch.Set "isDisqus" false -}}
{{ end }}
{{- if eq ($.Scratch.Get "isDisqus") true -}}
{{- partial "disqus.html" . -}}
{{- end -}}
</div>
{{ partial "footer.html" . }}
</body>
</html>