diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 632ec60..25cbdd5 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ {{- end -}} {{ define "content" -}} - {{ partial "page-list.html" . }} + {{ partial "page-list/content.html" . }} {{- end -}} {{ define "footer" -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cc4f463..eceb1d3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,17 +1,17 @@ {{ define "header" -}} - {{ partial "page-variables-init.html" . }} + {{ partial "page-single/variables-init.html" . }} {{ partial "header.html" . }} {{- end -}} {{ define "content" -}} - {{ partial "page-single.html" . }} + {{ partial "page-single/content.html" . }} {{- end -}} {{ define "footer" -}}
- {{- partial "highlight-js.html" . -}} - {{- partial "commenting.html" . -}} + {{- partial "page-single/commenting.html" . -}}
+ {{- partial "highlight-js.html" . -}} {{ partial "footer.html" . }} - {{ partial "page-variables-deinit.html" . }} + {{ partial "page-single/variables-deinit.html" . }} {{- end -}} diff --git a/layouts/partials/commenting/disqus.html b/layouts/partials/commenting/disqus.html deleted file mode 100644 index 437a303..0000000 --- a/layouts/partials/commenting/disqus.html +++ /dev/null @@ -1,25 +0,0 @@ -
- - - -comments powered by Disqus diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c9a9c04..15b942b 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,6 @@ -{{ partial "footer/font-awesome-js.html" . }} {{ if (.Site.GoogleAnalytics) -}} - {{ "" | safeHTML }} - {{ template "_internal/google_analytics_async.html" . }} + + {{- template "_internal/google_analytics_async.html" . -}} {{- end }} +{{ partial "footer/font-awesome-js.html" . }} +{{ partial "footer/deferred-styles.html" . }} diff --git a/layouts/partials/footer/deferred-styles.html b/layouts/partials/footer/deferred-styles.html new file mode 100644 index 0000000..f36b1d9 --- /dev/null +++ b/layouts/partials/footer/deferred-styles.html @@ -0,0 +1,6 @@ + diff --git a/layouts/partials/footer/font-awesome-js.html b/layouts/partials/footer/font-awesome-js.html index 0d0c9d0..54f0e72 100644 --- a/layouts/partials/footer/font-awesome-js.html +++ b/layouts/partials/footer/font-awesome-js.html @@ -1 +1,4 @@ - + diff --git a/layouts/partials/footer/load-deferred-styles.html b/layouts/partials/footer/load-deferred-styles.html new file mode 100644 index 0000000..27e949e --- /dev/null +++ b/layouts/partials/footer/load-deferred-styles.html @@ -0,0 +1,18 @@ + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 03aaa35..c9e6476 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,9 +1,7 @@ {{ partial "header/meta.html" . }} - {{ partial "header/highlight-css.html" . }} - - + {{ partial "header/styles.html" . }} {{ ` " | safeHTML }} + {{- end -}} {{ if .Site.Params.PygmentsUseClasses -}} diff --git a/layouts/partials/header/styles.html b/layouts/partials/header/styles.html new file mode 100644 index 0000000..700acd5 --- /dev/null +++ b/layouts/partials/header/styles.html @@ -0,0 +1,3 @@ +{{ partial "header/highlight-css.html" . }} + + diff --git a/layouts/partials/page-list.html b/layouts/partials/page-list/content.html similarity index 100% rename from layouts/partials/page-list.html rename to layouts/partials/page-list/content.html diff --git a/layouts/partials/commenting.html b/layouts/partials/page-single/commenting.html similarity index 53% rename from layouts/partials/commenting.html rename to layouts/partials/page-single/commenting.html index e829626..64bcf29 100644 --- a/layouts/partials/commenting.html +++ b/layouts/partials/page-single/commenting.html @@ -1,7 +1,7 @@ {{- if ne .Params.showcomments false -}} {{ if .Site.DisqusShortname -}} - {{- partial "commenting/disqus.html" . -}} + {{- partial "page-single/commenting/disqus.html" . -}} {{- else if .Site.Params.GraphCommentId -}} - {{- partial "commenting/graphcomment.html" . -}} + {{- partial "page-single/commenting/graphcomment.html" . -}} {{- end -}} {{- end }} diff --git a/layouts/partials/page-single/commenting/disqus.html b/layouts/partials/page-single/commenting/disqus.html new file mode 100644 index 0000000..5bb46a2 --- /dev/null +++ b/layouts/partials/page-single/commenting/disqus.html @@ -0,0 +1,29 @@ +
+ + + +comments powered by + Disqus + diff --git a/layouts/partials/commenting/graphcomment.html b/layouts/partials/page-single/commenting/graphcomment.html similarity index 100% rename from layouts/partials/commenting/graphcomment.html rename to layouts/partials/page-single/commenting/graphcomment.html diff --git a/layouts/partials/page-single.html b/layouts/partials/page-single/content.html similarity index 58% rename from layouts/partials/page-single.html rename to layouts/partials/page-single/content.html index 8db6299..4645a30 100644 --- a/layouts/partials/page-single.html +++ b/layouts/partials/page-single/content.html @@ -6,11 +6,11 @@ {{.}} {{ end }} - {{ partial "post-meta-top.html" . }} + {{ partial "page-single/post-meta-top.html" . }}
{{ .Content }}
- {{ partial "post-meta-bottom.html" . }} - {{ partial "post-related.html" . }} + {{ partial "page-single/post-meta-bottom.html" . }} + {{ partial "page-single/post-related.html" . }} diff --git a/layouts/partials/post-meta-bottom.html b/layouts/partials/page-single/post-meta-bottom.html similarity index 100% rename from layouts/partials/post-meta-bottom.html rename to layouts/partials/page-single/post-meta-bottom.html diff --git a/layouts/partials/post-meta-top.html b/layouts/partials/page-single/post-meta-top.html similarity index 100% rename from layouts/partials/post-meta-top.html rename to layouts/partials/page-single/post-meta-top.html diff --git a/layouts/partials/post-related.html b/layouts/partials/page-single/post-related.html similarity index 61% rename from layouts/partials/post-related.html rename to layouts/partials/page-single/post-related.html index 8e27368..7f25ce0 100644 --- a/layouts/partials/post-related.html +++ b/layouts/partials/page-single/post-related.html @@ -1,10 +1,10 @@ +{{ $related := .Site.RegularPages.Related . | first 5 }} +{{ with $related -}}
- {{ $related := .Site.RegularPages.Related . | first 5 }} - {{ with $related }}

Related Articles

- {{ end }} -
\ No newline at end of file + +{{- end }} diff --git a/layouts/partials/page-variables-deinit.html b/layouts/partials/page-single/variables-deinit.html similarity index 100% rename from layouts/partials/page-variables-deinit.html rename to layouts/partials/page-single/variables-deinit.html diff --git a/layouts/partials/page-variables-init.html b/layouts/partials/page-single/variables-init.html similarity index 100% rename from layouts/partials/page-variables-init.html rename to layouts/partials/page-single/variables-init.html diff --git a/layouts/shortcodes/fig.html b/layouts/shortcodes/fig.html index 314bc45..0746971 100644 --- a/layouts/shortcodes/fig.html +++ b/layouts/shortcodes/fig.html @@ -1,22 +1,21 @@ {{ $fig := newScratch }} {{ if .Get "caption" }} - {{ $fig.Set "caption" (.Get "caption") }} + {{ $fig.Set "caption" (.Get "caption") }} {{ else if .Get "alt" }} - {{ $fig.Set "caption" (.Get "alt") }} + {{ $fig.Set "caption" (.Get "alt") }} {{ end }}
- {{ with .Get "link"}}{{ end }} - - {{ with .Get "link"}}{{ end }} - {{ with ($fig.Get "caption") }} + {{ with .Get "link"}}{{ end }} + + {{ with .Get "link"}}{{ end }} + {{ with ($fig.Get "caption") }}
- Figure {{ $.Page.Scratch.Get "fig" }}. {{ . }} + Figure {{ $.Page.Scratch.Get "fig" }}. {{ . }}
- {{ end }} + {{ end }}
{{ .Page.Scratch.Add "fig" 1 }} -{{ $fig.Delete "caption"}} \ No newline at end of file +{{ $fig.Delete "caption"}}