refactors layouts for single and list, header, footer
This commit is contained in:
parent
e980cbedc8
commit
09d87e1da0
13 changed files with 14 additions and 36 deletions
|
@ -7,5 +7,5 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ define "footer" -}}
|
{{ define "footer" -}}
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "page-list/footer.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ define "footer" -}}
|
{{ define "footer" -}}
|
||||||
<div class="container content">
|
{{ partial "page-single/footer.html" . }}
|
||||||
{{- partial "page-single/commenting.html" . -}}
|
|
||||||
</div>
|
|
||||||
{{- partial "highlight-js.html" . -}}
|
|
||||||
{{ partial "footer.html" . }}
|
|
||||||
{{ partial "page-single/variables-deinit.html" . }}
|
{{ partial "page-single/variables-deinit.html" . }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<noscript id="deferred-styles">
|
|
||||||
<!-- // styles to be deferred:
|
|
||||||
// https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/styles.css" />
|
|
||||||
-->
|
|
||||||
</noscript>
|
|
|
@ -1,18 +0,0 @@
|
||||||
<script>
|
|
||||||
var loadDeferredStyles = function () {
|
|
||||||
var addStylesNode = document.getElementById("deferred-styles");
|
|
||||||
if (addStylesNode) {
|
|
||||||
var replacement = document.createElement("div");
|
|
||||||
replacement.innerHTML = addStylesNode.textContent;
|
|
||||||
document.body.appendChild(replacement);
|
|
||||||
addStylesNode.parentElement.removeChild(addStylesNode);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
|
|
||||||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
|
|
||||||
if (raf) raf(function () {
|
|
||||||
window.setTimeout(loadDeferredStyles, 0);
|
|
||||||
});
|
|
||||||
else
|
|
||||||
window.addEventListener('load', loadDeferredStyles);
|
|
||||||
</script>
|
|
|
@ -1,3 +1,3 @@
|
||||||
{{ partial "header/highlight-css.html" . }}
|
{{ partial "header/styles-highlight.html" . }}
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/hyde-hyde.css">
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/hyde-hyde.css">
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/print.min.css" media="print">
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/print.min.css" media="print">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ if .Site.Params.highlightjs -}}
|
{{ if .Site.Params.highlightjs -}}
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||||
{{ with .Site.Params.highlightjslanguages }}
|
{{ with .Site.Params.highlightjslanguages }}
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
hljs.configure({languages: []});
|
hljs.configure({languages: []});
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{{ if (.Site.GoogleAnalytics) -}}
|
{{ if .Site.GoogleAnalytics -}}
|
||||||
<!-- Google Analytics -->
|
<!-- Google Analytics -->
|
||||||
{{- template "_internal/google_analytics_async.html" . -}}
|
{{- template "_internal/google_analytics_async.html" . -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ partial "footer/font-awesome-js.html" . }}
|
{{ partial "footer/font-awesome-js.html" . }}
|
||||||
{{ partial "footer/deferred-styles.html" . }}
|
|
|
@ -13,4 +13,5 @@
|
||||||
</div>
|
</div>
|
||||||
{{ partial "page-single/post-meta-bottom.html" . }}
|
{{ partial "page-single/post-meta-bottom.html" . }}
|
||||||
{{ partial "page-single/post-related.html" . }}
|
{{ partial "page-single/post-related.html" . }}
|
||||||
|
{{- partial "page-single/post-comment.html" . -}}
|
||||||
</article>
|
</article>
|
||||||
|
|
6
layouts/partials/page-single/footer.html
Normal file
6
layouts/partials/page-single/footer.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{{ if .Site.GoogleAnalytics -}}
|
||||||
|
<!-- Google Analytics -->
|
||||||
|
{{- template "_internal/google_analytics_async.html" . -}}
|
||||||
|
{{- end }}
|
||||||
|
{{ partial "footer/font-awesome-js.html" . }}
|
||||||
|
{{ partial "highlight-js.html" . }}
|
|
@ -1,7 +1,7 @@
|
||||||
{{- if ne .Params.showcomments false -}}
|
{{- if ne .Params.showcomments false -}}
|
||||||
{{ if .Site.DisqusShortname -}}
|
{{ if .Site.DisqusShortname -}}
|
||||||
{{- partial "page-single/commenting/disqus.html" . -}}
|
{{- partial "page-single/comment/disqus.html" . -}}
|
||||||
{{- else if .Site.Params.GraphCommentId -}}
|
{{- else if .Site.Params.GraphCommentId -}}
|
||||||
{{- partial "page-single/commenting/graphcomment.html" . -}}
|
{{- partial "page-single/comment/graphcomment.html" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue