2019-11-04 13:09:44 +00:00
|
|
|
{{ define "main" }}
|
2019-12-08 14:29:02 +00:00
|
|
|
|
|
|
|
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
|
|
|
|
<script src="{{ $enquire.RelPermalink }}"></script>
|
|
|
|
|
2019-12-26 06:44:04 +00:00
|
|
|
<main class="{{ if or ($.Param "enableToc") ($.Param "toc") }}{{ if $.Param "hideToc" }}main{{ else }}main-main{{ end }}{{ else }}main{{ end }}">
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ if eq .Site.Params.enableBreadcrumb true }}
|
|
|
|
{{ partial "body/breadcrumb" . }}
|
|
|
|
{{ end }}
|
|
|
|
<div class="single">
|
2019-11-18 19:18:57 +00:00
|
|
|
<h2 class="single__title">{{ .Title }}</h2>
|
2019-11-04 13:09:44 +00:00
|
|
|
<div class="single__meta">
|
2019-12-05 13:57:05 +00:00
|
|
|
{{ partial "body/infos" . }}
|
2019-11-19 09:25:36 +00:00
|
|
|
{{ partial "body/tags" . }}
|
2019-11-14 03:31:02 +00:00
|
|
|
</div>
|
2019-11-04 13:09:44 +00:00
|
|
|
<article class="single__contents">
|
2020-01-07 07:30:51 +00:00
|
|
|
{{ partial "body/toc" . }}
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ .Content }}
|
|
|
|
</article>
|
2019-12-05 10:04:42 +00:00
|
|
|
{{ partial "body/donation" . }}
|
2019-11-20 06:55:05 +00:00
|
|
|
{{ partial "body/whoami" . }}
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ partial "body/related" . }}
|
|
|
|
{{ partial "pagination/pagination-single" . }}
|
2019-11-20 06:55:05 +00:00
|
|
|
{{ partial "comments/comments.html" . }}
|
2019-11-25 04:36:50 +00:00
|
|
|
{{ partial "body/photoswipe" . }}
|
2019-11-20 17:45:46 +00:00
|
|
|
|
|
|
|
<div class="hide">
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "search/site-search" . }}
|
2019-11-20 17:45:46 +00:00
|
|
|
</div>
|
2019-11-04 13:09:44 +00:00
|
|
|
</div>
|
|
|
|
</main>
|
2019-11-12 10:03:15 +00:00
|
|
|
|
|
|
|
{{ if $.Param "enableSidebar" }}
|
2019-12-26 06:44:04 +00:00
|
|
|
<aside class="{{ if or ($.Param "enableToc") ($.Param "toc") }}main-side{{ end }}">
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ partial "sidebar/sidebar-single" . }}
|
|
|
|
</aside>
|
|
|
|
{{ end }}
|
2019-12-08 14:29:02 +00:00
|
|
|
<script>
|
|
|
|
enquire.register("screen and (max-width: 769px)", {
|
|
|
|
match: function () {
|
|
|
|
if (document.getElementsByTagName('main')[0]) {
|
|
|
|
document.getElementsByTagName('main')[0].className = "main";
|
|
|
|
}
|
|
|
|
if (document.getElementsByTagName('aside')[0]) {
|
|
|
|
document.getElementsByTagName('aside')[0].className = "hide";
|
|
|
|
}
|
|
|
|
},
|
|
|
|
unmatch: function () {
|
|
|
|
if (document.getElementsByTagName('main')[0]) {
|
|
|
|
document.getElementsByTagName('main')[0].className = "main-main";
|
|
|
|
}
|
|
|
|
if (document.getElementsByTagName('aside')[0]) {
|
|
|
|
document.getElementsByTagName('aside')[0].className = "main-side";
|
|
|
|
}
|
|
|
|
document.getElementsByClassName('navbar__burger')[0].classList.remove('is-active');
|
|
|
|
document.getElementsByClassName('navbar__menu')[0].classList.remove('is-active');
|
|
|
|
document.getElementsByClassName('mobile-search')[0].classList.add('hide');
|
|
|
|
},
|
|
|
|
setup: function () { },
|
|
|
|
deferSetup: true,
|
|
|
|
destroy: function () { },
|
|
|
|
});
|
|
|
|
</script>
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "script/single-script" . }}
|
2019-11-19 09:25:36 +00:00
|
|
|
{{ end }}
|