Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
135 lines (127 sloc) 4.65 KB
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-1 col-md-10 col-md-offset-1">
<!-- SNS Link -->
{{ if .Site.Params.social.infooter }}
{{ partial "social.html" . }}
{{ end }}
<!-- Copy right -->
<p class="copyright text-muted">
Copyright &copy; {{ .Site.Title }}&sbquo; {{ if ne (.Date.Format "2006") (now.Format "2006") }} {{(.Date.Format "2006 - ") }} {{ end }} {{ now.Format "2006" }}
<br>
{{ if .Site.Params.showOrigin }}
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a>
|
<iframe style="margin-left: 2px; margin-bottom:-5px;" frameborder="0" scrolling="0" width="100px"
height="20px" src="https://ghbtns.com/github-btn.html?user=zhaohuabing&repo=hugo-theme-cleanwhite&type=star&count=true">
</iframe>
{{ end }}
</p>
</div>
</div>
</div>
</footer>
<!-- async load function -->
<script>
function async(u, c) {
var d = document, t = 'script',
o = d.createElement(t),
s = d.getElementsByTagName(t)[0];
o.src = u;
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
s.parentNode.insertBefore(o, s);
}
</script>
<!--
Because of the native support for backtick-style fenced code blocks
right within the Markdown is landed in Github Pages,
From V1.6, There is no need for Highlight.js,
so Huxblog drops it officially.
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
-->
<!--
<script>
async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
hljs.initHighlightingOnLoad();
})
</script>
<link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
-->
<!--fastClick.js -->
<script>
async("https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.js", function () {
var $nav = document.querySelector("nav");
if ($nav) FastClick.attach($nav);
})
</script>
<!-- Baidu Tongji -->
{{ if .Site.Params.ba_track_id }}
<script>
// dynamic User by Hux
var _baId = '{{ .Site.Params.ba_track_id }}';
// Originial
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?" + _baId;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{{ end }}
{{ if .Site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
<!--Privacy Announcement https://cookieconsent.insites.com/download/# -->
<script>
var options = {
"cookie": {
"domain": "{{ .Site.BaseURL }}",
"expiryDays": 7,
},
"palette": {
"popup": {
"background": "#4d4d4d",
"text": "#ffffff",
},
"button": {
"background": "transparent",
"text": "#ffffff",
}
},
"theme": "edgeless",
"content": {
"dismiss": "OK",
"message": "This site uses cookies to ensure you get the best experience.",
"link": "Learn more",
"target": '_blank',
},
};
var instance = new cookieconsent.Popup(options);
document.body.appendChild(instance.element);
</script>
<!-- Thanks to https://medium.com/@filipvitas/lazy-load-images-with-zero-javascript-2c5bcb691274 -->
{{ if .Params.postWithImg }}
<script>
let lazyImages = [...document.querySelectorAll('.img-lazyload')]
let inAdvance = 20
function lazyLoad() {
lazyImages.forEach(image => {
if ((image.offsetTop < window.innerHeight + window.pageYOffset + inAdvance) && ! image.classList.contains('img-lazyload-loaded') ) {
image.src = image.dataset.src
image.onload = () => {
image.classList.add('img-lazyload-loaded');
image.style.height="";
}
}
})
// if all loaded removeEventListener
}
lazyLoad()
window.addEventListener('scroll', _.throttle(lazyLoad, 8))
window.addEventListener('resize', _.throttle(lazyLoad, 8))
</script>
{{end}}
You can’t perform that action at this time.