refactoring the footer
This commit is contained in:
parent
514e9a167f
commit
cf95cacd15
10 changed files with 193 additions and 153 deletions
|
@ -1,11 +1,11 @@
|
|||
{{ partial "head.html" . }}
|
||||
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
|
||||
{{ partial "sidebar.html" . }}
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content container">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
{{ block "main" . }}{{ end }}
|
||||
<div class="footer">
|
||||
{{ block "footer" . }}{{ end }}
|
||||
{{ block "footer" . }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
|
@ -10,10 +10,9 @@
|
|||
{{- end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
<!-- Footer -->
|
||||
<div>
|
||||
<!-- Footer -->
|
||||
{{ if .Site.GoogleAnalytics -}}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{- end}}
|
||||
</div>
|
||||
<script src="{{ .Site.BaseURL }}js/main.js"></script>
|
||||
{{- end }}
|
|
@ -4,8 +4,10 @@
|
|||
{{ if ne .Params.showpagemeta false }}
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<span class="text-left post-date meta">
|
||||
<!-- published date -->
|
||||
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}}
|
||||
{{ if ne .Params.showpdate false }}
|
||||
<!-- published date -->
|
||||
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}}
|
||||
{{ end }}
|
||||
<!-- categories -->
|
||||
{{ if isset .Params "categories" }}
|
||||
{{ $total := len .Params.categories }}
|
||||
|
@ -36,22 +38,26 @@
|
|||
{{- end }}
|
||||
|
||||
{{ define "footer" -}}
|
||||
{{ if .Site.Params.highlightjs }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
{{ range .Site.Params.highlightjslanguages }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
||||
{{ end }}
|
||||
<script type="text/javascript">
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
{{ end }}
|
||||
<!-- Google Analytics -->
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
<!-- Disqus-->
|
||||
{{ if .Site.DisqusShortname }}
|
||||
<h2>Comments</h2>
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.highlightjs }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
{{ range .Site.Params.highlightjslanguages }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
||||
{{ end }}
|
||||
<script type="text/javascript">
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
{{ end }}
|
||||
<!-- Google Analytics -->
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
<!-- Disqus-->
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ if ne .Params.showcomments false }}
|
||||
<h2>Comments</h2>
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- Other Scripts -->
|
||||
<script src="{{ .Site.BaseURL }}js/main.js"></script>
|
||||
{{- end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue