refactor: change default article layout
Post layout become exclusive for `post` section (with toolbar) Page layout become the default layout (without toolbar)
This commit is contained in:
parent
294f445e0a
commit
45e7e07a86
@ -1,21 +1,12 @@
|
|||||||
{{ define "container-class" }}article-page with-toolbar{{ end }}
|
{{ define "body-class" }}article-page keep-sidebar{{ end }}
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div id="article-toolbar">
|
|
||||||
<a href="{{ .Site.BaseURL }}" class="back-home">
|
|
||||||
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
|
||||||
<span>Back</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial "article/article.html" . }}
|
{{ partial "article/article.html" . }}
|
||||||
|
|
||||||
{{ partial "article/components/related-contents" . }}
|
|
||||||
|
|
||||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
||||||
{{ partial "comments/include" . }}
|
{{ partial "comments/include" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partialCached "footer/footer" . }}
|
{{ partialCached "footer/footer" . }}
|
||||||
|
|
||||||
{{- partial "article/components/photoswipe.html" . -}}
|
{{ partial "article/components/photoswipe" . }}
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,12 +0,0 @@
|
|||||||
{{ define "body-class" }}article-page keep-sidebar{{ end }}
|
|
||||||
{{ define "main" }}
|
|
||||||
{{ partial "article/article.html" . }}
|
|
||||||
|
|
||||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
|
||||||
{{ partial "comments/include" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partialCached "footer/footer" . }}
|
|
||||||
|
|
||||||
{{ partial "article/components/photoswipe" . }}
|
|
||||||
{{ end }}
|
|
21
layouts/post/single.html
Normal file
21
layouts/post/single.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{{ define "container-class" }}article-page with-toolbar{{ end }}
|
||||||
|
{{ define "main" }}
|
||||||
|
<div id="article-toolbar">
|
||||||
|
<a href="{{ .Site.BaseURL }}" class="back-home">
|
||||||
|
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
||||||
|
<span>Back</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ partial "article/article.html" . }}
|
||||||
|
|
||||||
|
{{ partial "article/components/related-contents" . }}
|
||||||
|
|
||||||
|
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
||||||
|
{{ partial "comments/include" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partialCached "footer/footer" . }}
|
||||||
|
|
||||||
|
{{- partial "article/components/photoswipe.html" . -}}
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user