Initial website
This commit is contained in:
9
themes/hueman/layout/plugin/baidu-analytics.ejs
Normal file
9
themes/hueman/layout/plugin/baidu-analytics.ejs
Normal file
@@ -0,0 +1,9 @@
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?<%= theme.plugins.baidu_analytics %>";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
10
themes/hueman/layout/plugin/google-analytics.ejs
Normal file
10
themes/hueman/layout/plugin/google-analytics.ejs
Normal file
@@ -0,0 +1,10 @@
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m) {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() {
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '<%= theme.plugins.google_analytics %>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
39
themes/hueman/layout/plugin/scripts.ejs
Normal file
39
themes/hueman/layout/plugin/scripts.ejs
Normal file
@@ -0,0 +1,39 @@
|
||||
<% if (typeof(isHead) !== 'undefined' && isHead) { %>
|
||||
<% if (theme.plugins.lightgallery) { %>
|
||||
<%- css('libs/lightgallery/css/lightgallery.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.justifiedgallery) { %>
|
||||
<%- css('libs/justified-gallery/justifiedGallery.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.google_analytics) { %>
|
||||
<%- partial('plugin/google-analytics') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.baidu_analytics) { %>
|
||||
<%- partial('plugin/baidu-analytics') %>
|
||||
<% } %>
|
||||
<% } else if (typeof(isFooter) !== 'undefined' && isFooter) { %>
|
||||
<% if (theme.plugins.statcounter && theme.plugins.statcounter.on) { %>
|
||||
<%- partial('plugin/statcounter') %>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<% if (theme.plugins.lightgallery) { %>
|
||||
<%- js('libs/lightgallery/js/lightgallery.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-thumbnail.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-pager.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-autoplay.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-fullscreen.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-zoom.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-hash.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-share.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-video.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.justifiedgallery) { %>
|
||||
<%- js('libs/justified-gallery/jquery.justifiedGallery.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.mathjax) { %>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
|
||||
</script>
|
||||
<%- js('https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML') %>
|
||||
<% } %>
|
||||
<% } %>
|
23
themes/hueman/layout/plugin/statcounter.ejs
Normal file
23
themes/hueman/layout/plugin/statcounter.ejs
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Default Statcounter code -->
|
||||
<% let sc = theme.plugins.statcounter; %>
|
||||
<script type="text/javascript">
|
||||
var sc_project=<%= sc.sc_project %>;
|
||||
var sc_invisible=<%= sc.sc_invisible %>;
|
||||
var sc_security="<%= sc.sc_security %>";
|
||||
</script>
|
||||
<script type="text/javascript" src="https://www.statcounter.com/counter/counter.js">
|
||||
</script>
|
||||
<noscript>
|
||||
<div class="statcounter">
|
||||
<a title="Web Analytics" href="http://statcounter.com/" target="_blank">
|
||||
<img class="statcounter"
|
||||
src="//c.statcounter.com/<%= sc.sc_project %>/0/<%=
|
||||
sc.sc_security %>/<%= sc.sc_invisible %>/"
|
||||
alt="Web Analytics">
|
||||
</a>
|
||||
</div>
|
||||
</noscript>
|
||||
<!-- End of Statcounter Code -->
|
||||
<% if (sc.public) { %>
|
||||
<a href="http://statcounter.com/p<%= sc.sc_project %>/?guest=1">View My Stats</a>
|
||||
<% } %>
|
Reference in New Issue
Block a user