hugo-coder-fork/layouts/posts/single.html

60 lines
2.1 KiB
HTML

{{ define "title" }}
{{ .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
<section class="container post">
<article>
<header>
<div class="post-title">
<h1 class="title">{{ .Title }}</h1>
</div>
<div class="post-meta">
<div class="meta-tag posted-on">
<span class="icon svg-icon">{{ partial "svg/calendar.svg" }}</span>
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}
</time>
</div>
<div class="meta-tag reading-time">
<span class="icon svg-icon">{{ partial "svg/clock.svg" }}</span>
{{ i18n "reading_time" .ReadingTime }}
</div>
<div class="taxonomy">
{{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }}
{{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }}
</div>
</div>
</header>
<div>
{{ if .Params.featured_image }}
<img class="featured-image" src='{{ .Params.featured_image }}' alt="Featured image"/>
{{ end }}
{{ .Content }}
</div>
<footer>
{{ partial "posts/series.html" . }}
{{ partial "posts/disqus.html" . }}
{{ partial "posts/commento.html" . }}
{{ partial "posts/utteranc.html" . }}
</footer>
</article>
{{ partial "posts/math.html" . }}
</section>
{{ if .Site.Params.talkyardServerUrl }}
<section class="comment-section">
<h2>Comments</h2>
<script>talkyardServerUrl='{{ .Site.Params.talkyardServerUrl }}';</script>
<script async defer src="{{ .Site.Params.talkyardScriptUrl }}"></script>
<div class="talkyard-comments" data-discussion-id="{{ .Params.discussionId }}" style="margin-top: 45px;">
<noscript>Please enable Javascript to view comments.</noscript>
<p style="margin-top: 25px; opacity: 0.9; font-size: 96%">Comments powered by
<a href="https://www.talkyard.io">Talkyard</a>.</p>
</div>
</section>
{{ end }}
{{ end }}