2019-11-07 18:09:15 +00:00
|
|
|
{{ define "title" }}{{ .Site.Title }}{{ end }}
|
|
|
|
|
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-11-12 10:03:15 +00:00
|
|
|
<main class="{{ if $.Param "enableSidebar" }}main-main{{ else }}main{{ end }}">
|
2019-11-04 13:09:44 +00:00
|
|
|
<article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view">
|
|
|
|
<div class="content">
|
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<div class="summary__container">
|
2020-01-02 02:11:38 +00:00
|
|
|
{{ $filteredPages := .Site.RegularPages }}
|
|
|
|
{{ range .Site.Params.notAllowedTypesInHome }}
|
|
|
|
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
|
|
|
|
{{ end }}
|
|
|
|
{{ $paginator := .Paginate $filteredPages }}
|
2019-12-25 04:28:08 +00:00
|
|
|
{{ range $paginator.Pages }}
|
2020-01-02 02:11:38 +00:00
|
|
|
{{ .Render "summary" }}
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ end }}
|
2019-12-25 04:28:08 +00:00
|
|
|
</div> {{ partial "pagination/pagination" . }}
|
2019-11-04 13:09:44 +00:00
|
|
|
</main>
|
2019-11-12 10:03:15 +00:00
|
|
|
|
|
|
|
{{ if $.Param "enableSidebar" }}
|
|
|
|
<aside class="main-side">
|
|
|
|
{{ partial "sidebar/sidebar-home" . }}
|
|
|
|
</aside>
|
|
|
|
{{ end }}
|
2019-12-08 14:29:02 +00:00
|
|
|
<script>
|
2020-01-06 16:41:38 +00:00
|
|
|
enquire.register("screen and (max-width: 769px)", {
|
2019-12-08 14:29:02 +00:00
|
|
|
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";
|
|
|
|
}
|
2020-01-06 16:41:38 +00:00
|
|
|
if (document.getElementsByClassName('navbar__burger')[0]) {
|
|
|
|
document.getElementsByClassName('navbar__burger')[0].classList.remove('is-active');
|
|
|
|
}
|
|
|
|
if (document.getElementsByClassName('navbar__menu')[0]) {
|
|
|
|
document.getElementsByClassName('navbar__menu')[0].classList.remove('is-active');
|
|
|
|
}
|
|
|
|
if (document.getElementsByClassName('mobile-search')[0]) {
|
|
|
|
document.getElementsByClassName('mobile-search')[0].classList.add('hide');
|
|
|
|
}
|
2019-12-08 14:29:02 +00:00
|
|
|
},
|
|
|
|
setup: function () { },
|
|
|
|
deferSetup: true,
|
|
|
|
destroy: function () { },
|
|
|
|
});
|
|
|
|
</script>
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "script/home-script" . }}
|
|
|
|
{{ end }}
|