From 09d87e1da073257b0b441274a68487194c14a1bf Mon Sep 17 00:00:00 2001 From: Huy Tran Date: Fri, 27 Jul 2018 10:02:49 +1000 Subject: [PATCH] refactors layouts for single and list, header, footer --- layouts/_default/list.html | 2 +- layouts/_default/single.html | 6 +----- layouts/partials/footer/deferred-styles.html | 6 ------ .../partials/footer/load-deferred-styles.html | 18 ------------------ ...ighlight-css.html => styles-highlight.html} | 0 layouts/partials/header/styles.html | 2 +- layouts/partials/highlight-js.html | 2 +- layouts/partials/{ => page-list}/footer.html | 3 +-- .../{commenting => comment}/disqus.html | 0 .../{commenting => comment}/graphcomment.html | 0 layouts/partials/page-single/content.html | 1 + layouts/partials/page-single/footer.html | 6 ++++++ .../{commenting.html => post-comment.html} | 4 ++-- 13 files changed, 14 insertions(+), 36 deletions(-) delete mode 100644 layouts/partials/footer/deferred-styles.html delete mode 100644 layouts/partials/footer/load-deferred-styles.html rename layouts/partials/header/{highlight-css.html => styles-highlight.html} (100%) rename layouts/partials/{ => page-list}/footer.html (64%) rename layouts/partials/page-single/{commenting => comment}/disqus.html (100%) rename layouts/partials/page-single/{commenting => comment}/graphcomment.html (100%) create mode 100644 layouts/partials/page-single/footer.html rename layouts/partials/page-single/{commenting.html => post-comment.html} (53%) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 25cbdd5..53430a0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,5 +7,5 @@ {{- end -}} {{ define "footer" -}} - {{ partial "footer.html" . }} + {{ partial "page-list/footer.html" . }} {{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index eceb1d3..0f38911 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,10 +8,6 @@ {{- end -}} {{ define "footer" -}} -
- {{- partial "page-single/commenting.html" . -}} -
- {{- partial "highlight-js.html" . -}} - {{ partial "footer.html" . }} + {{ partial "page-single/footer.html" . }} {{ partial "page-single/variables-deinit.html" . }} {{- end -}} diff --git a/layouts/partials/footer/deferred-styles.html b/layouts/partials/footer/deferred-styles.html deleted file mode 100644 index f36b1d9..0000000 --- a/layouts/partials/footer/deferred-styles.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/layouts/partials/footer/load-deferred-styles.html b/layouts/partials/footer/load-deferred-styles.html deleted file mode 100644 index 27e949e..0000000 --- a/layouts/partials/footer/load-deferred-styles.html +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/layouts/partials/header/highlight-css.html b/layouts/partials/header/styles-highlight.html similarity index 100% rename from layouts/partials/header/highlight-css.html rename to layouts/partials/header/styles-highlight.html diff --git a/layouts/partials/header/styles.html b/layouts/partials/header/styles.html index 700acd5..66eef57 100644 --- a/layouts/partials/header/styles.html +++ b/layouts/partials/header/styles.html @@ -1,3 +1,3 @@ -{{ partial "header/highlight-css.html" . }} +{{ partial "header/styles-highlight.html" . }} diff --git a/layouts/partials/highlight-js.html b/layouts/partials/highlight-js.html index da63f30..8baa9e7 100644 --- a/layouts/partials/highlight-js.html +++ b/layouts/partials/highlight-js.html @@ -1,7 +1,7 @@ {{ if .Site.Params.highlightjs -}} {{ with .Site.Params.highlightjslanguages }} - + {{ end }}