blog/themes/typing/layout/_partial/after-footer.ejs

88 lines
3.3 KiB
Plaintext

<% if (config.disqus_shortname && !is_home() && !is_archive()) { %>
<script>
var disqus_shortname = '<%= config.disqus_shortname %>';
<% if (page.permalink){ %>
var disqus_url = '<%= page.permalink %>';
<% } %>
(function(){
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<% } %>
<% if (theme.gitment.owner && theme.gitment.repo && theme.gitment.client.id && theme.gitment.client.secret && !is_home() && !is_archive()) { %>
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
<script>
var gitment = new Gitment({
owner: '<%= theme.gitment.owner %>',
repo: '<%= theme.gitment.repo %>',
oauth: {
client_id: '<%= theme.gitment.client.id %>',
client_secret: '<%= theme.gitment.client.secret %>'
}
})
gitment.render('gitment_container')
</script>
<% } %>
<% if (theme.utterances.enable && theme.utterances.repo){ %>
<script>
(function() {
var utterances = document.createElement('script');
var utterances_container = document.getElementById('utterances_container');
utterances.src='https://utteranc.es/client.js'
utterances.setAttribute('repo', '<%= theme.utterances.repo %>');
utterances.setAttribute('issue-term', 'title');
utterances.setAttribute('crossorigin', 'anonymous');
utterances.setAttribute('async', true);
if (utterances_container){
utterances_container.appendChild(utterances);
}
})();
</script>
<% } %>
<% if (theme.valine.enable && theme.valine.appId && theme.valine.appKey){ %>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script>
var GUEST_INFO = ['nick','mail','link'];
var guest_info = '<%= theme.valine.guest_info %>'.split(',').filter(function(item){
return GUEST_INFO.indexOf(item) > -1
});
var notify = '<%= theme.valine.notify %>' == true;
var verify = '<%= theme.valine.verify %>' == true;
var valine = new Valine();
valine.init({
el: '#valine_container',
notify: notify,
verify: verify,
appId: "<%= theme.valine.appId %>",
appKey: "<%= theme.valine.appKey %>",
placeholder: "<%= theme.valine.placeholder %>",
pageSize:'<%= theme.valine.pageSize %>',
avatar:'<%= theme.valine.avatar %>',
lang:'<%= theme.valine.lang %>'
})
</script>
<% } %>
<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.10/clipboard.min.js"></script>
<% if (theme.fancybox){ %>
<%- css('fancybox/jquery.fancybox') %>
<%- js('fancybox/jquery.fancybox.pack') %>
<% } %>
<%- js('js/typing') %>
<!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.min.js"></script><![endif]-->
<%- partial('baidu_tongji') %>
<%- partial('google-analytics') %>
<%- partial('gauges-analytics') %>