chore(*): improve busuanzi counter & add mathjax inline math config
parent
7c359ba5ae
commit
d80f3e4f27
|
@ -65,9 +65,9 @@ module.exports = {
|
||||||
[doc]: 'Show the copy button in the highlighted code area',
|
[doc]: 'Show the copy button in the highlighted code area',
|
||||||
[defaultValue]: true
|
[defaultValue]: true
|
||||||
},
|
},
|
||||||
visit: {
|
busuanzi: {
|
||||||
[type]: 'boolean',
|
[type]: 'boolean',
|
||||||
[doc]: 'Show PV/UV of blog and PV of each article',
|
[doc]: 'BuSuanZi site/page view counter\nhttps://busuanzi.ibruce.info',
|
||||||
[defaultValue]: false
|
[defaultValue]: false
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -33,6 +33,8 @@ donate:
|
||||||
patreon: 'Patreon'
|
patreon: 'Patreon'
|
||||||
plugin:
|
plugin:
|
||||||
backtotop: 'Back to Top'
|
backtotop: 'Back to Top'
|
||||||
|
visit: '%s visits'
|
||||||
|
visitor: 'Visited by %s users'
|
||||||
search:
|
search:
|
||||||
search: 'Search'
|
search: 'Search'
|
||||||
hint: 'Type something...'
|
hint: 'Type something...'
|
||||||
|
|
|
@ -31,6 +31,8 @@ donate:
|
||||||
wechat: '微信'
|
wechat: '微信'
|
||||||
plugin:
|
plugin:
|
||||||
backtotop: '回到顶端'
|
backtotop: '回到顶端'
|
||||||
|
visit: '%s次访问'
|
||||||
|
visitor: '共%s个访客'
|
||||||
search:
|
search:
|
||||||
search: '搜索'
|
search: '搜索'
|
||||||
hint: '想要查找什么...'
|
hint: '想要查找什么...'
|
||||||
|
|
|
@ -28,6 +28,12 @@
|
||||||
<%= `${ time.locale(get_config('language', 'en')).humanize() } ${ __('article.read')} (${ __('article.about') } ${ words } ${ __('article.words') })` %>
|
<%= `${ time.locale(get_config('language', 'en')).humanize() } ${ __('article.read')} (${ __('article.about') } ${ words } ${ __('article.words') })` %>
|
||||||
</span>
|
</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if (!index && (has_config('plugins.busuanzi') ? get_config('plugins.busuanzi') : false)) { %>
|
||||||
|
<span class="level-item has-text-grey" id="busuanzi_container_page_pv">
|
||||||
|
<i class="far fa-eye"></i>
|
||||||
|
<%- _p('plugin.visit', '<span id="busuanzi_value_page_pv">0</span>') %>
|
||||||
|
</span>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
@ -41,17 +47,6 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%- index && post.excerpt ? post.excerpt : post.content %>
|
<%- index && post.excerpt ? post.excerpt : post.content %>
|
||||||
</div>
|
</div>
|
||||||
<% if (!index && (has_config('plugins.visit') ? get_config('plugins.visit') : false)) { %>
|
|
||||||
<div class="level is-size-7 has-text-grey">
|
|
||||||
<div class="level-left">
|
|
||||||
<i class="far fa-eye"></i>
|
|
||||||
<span> </span>
|
|
||||||
<span id="busuanzi_container_page_pv" style="display: inline;">
|
|
||||||
<span id="busuanzi_value_page_pv">0</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
<% if (!index && post.tags && post.tags.length) { %>
|
<% if (!index && post.tags && post.tags.length) { %>
|
||||||
<div class="level is-size-7 is-uppercase">
|
<div class="level is-size-7 is-uppercase">
|
||||||
<div class="level-start">
|
<div class="level-start">
|
||||||
|
|
|
@ -13,17 +13,13 @@
|
||||||
© <%= date(new Date(), 'YYYY') %> <%= get_config('author') || get_config('title') %>
|
© <%= date(new Date(), 'YYYY') %> <%= get_config('author') || get_config('title') %>
|
||||||
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> & <a
|
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> & <a
|
||||||
href="http://github.com/ppoffice/hexo-theme-icarus" target="_blank">Icarus</a>
|
href="http://github.com/ppoffice/hexo-theme-icarus" target="_blank">Icarus</a>
|
||||||
</p>
|
<% if (has_config('plugins.busuanzi') ? get_config('plugins.busuanzi') : false) { %>
|
||||||
<% if (has_config('plugins.visit') ? get_config('plugins.visit') : false) { %>
|
<br>
|
||||||
<p class="is-size-7">
|
<span id="busuanzi_container_site_uv">
|
||||||
<span id="busuanzi_container_site_uv">
|
<%- _p('plugin.visitor', '<span id="busuanzi_value_site_uv">0</span>') %>
|
||||||
UV:<span id="busuanzi_value_site_uv">0</span>,
|
</span>
|
||||||
</span>
|
|
||||||
<span id="busuanzi_container_site_pv">
|
|
||||||
PV:<span id="busuanzi_value_site_pv">0</span>
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-end">
|
<div class="level-end">
|
||||||
<% if (has_config('footer.links')) { %>
|
<% if (has_config('footer.links')) { %>
|
||||||
|
|
|
@ -3,9 +3,21 @@
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
'HTML-CSS': {matchFontHeight: false},
|
'HTML-CSS': {
|
||||||
SVG: {matchFontHeight: false},
|
matchFontHeight: false
|
||||||
CommonHTML: {matchFontHeight: false}
|
},
|
||||||
|
SVG: {
|
||||||
|
matchFontHeight: false
|
||||||
|
},
|
||||||
|
CommonHTML: {
|
||||||
|
matchFontHeight: false
|
||||||
|
},
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [
|
||||||
|
['$','$'],
|
||||||
|
['\\(','\\)']
|
||||||
|
]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue