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 -}}
|
||||
|
||||
{{ define "footer" -}}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "page-list/footer.html" . }}
|
||||
{{- end }}
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
{{- end -}}
|
||||
|
||||
{{ define "footer" -}}
|
||||
<div class="container content">
|
||||
{{- partial "page-single/commenting.html" . -}}
|
||||
</div>
|
||||
{{- partial "highlight-js.html" . -}}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "page-single/footer.html" . }}
|
||||
{{ partial "page-single/variables-deinit.html" . }}
|
||||
{{- 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/print.min.css" media="print">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{ if .Site.Params.highlightjs -}}
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
{{ 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 }}
|
||||
<script type="text/javascript">
|
||||
hljs.configure({languages: []});
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{{ if (.Site.GoogleAnalytics) -}}
|
||||
{{ if .Site.GoogleAnalytics -}}
|
||||
<!-- Google Analytics -->
|
||||
{{- template "_internal/google_analytics_async.html" . -}}
|
||||
{{- end }}
|
||||
{{ partial "footer/font-awesome-js.html" . }}
|
||||
{{ partial "footer/deferred-styles.html" . }}
|
|
@ -13,4 +13,5 @@
|
|||
</div>
|
||||
{{ partial "page-single/post-meta-bottom.html" . }}
|
||||
{{ partial "page-single/post-related.html" . }}
|
||||
{{- partial "page-single/post-comment.html" . -}}
|
||||
</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 .Site.DisqusShortname -}}
|
||||
{{- partial "page-single/commenting/disqus.html" . -}}
|
||||
{{- partial "page-single/comment/disqus.html" . -}}
|
||||
{{- else if .Site.Params.GraphCommentId -}}
|
||||
{{- partial "page-single/commenting/graphcomment.html" . -}}
|
||||
{{- partial "page-single/comment/graphcomment.html" . -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
Loading…
Reference in a new issue