refactor(layouts): move layout HTML to baseof.html

For better maintainability
This commit is contained in:
Jimmy Cai
2020-09-12 10:33:53 +02:00
parent cca10c7947
commit ed91cb7629
9 changed files with 122 additions and 168 deletions
+7 -15
View File
@@ -1,20 +1,12 @@
{{ define "body_class" }}2-column{{ end }}
{{ define "body-class" }}article-page keep-sidebar{{ end }}
{{ define "main" }}
<div class="container extended flex on-phone--column align-items--flex-start article-and-sidebar">
{{ partial "article/article.html" . }}
{{ partial "sidebar/left.html" . }}
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
{{ partial "comments/include" . }}
{{ end }}
<main class="main article-page do-not-overflow full-width">
{{ partial "article/article.html" . }}
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
{{ partial "comments/include" . }}
{{ end }}
{{ partialCached "footer/footer" . }}
</main>
</div>
{{ partial "article/components/photoswipe" . }}
{{ partialCached "footer/footer" . }}
{{ partial "article/components/photoswipe" . }}
{{ end }}