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',
|
||||
[defaultValue]: true
|
||||
},
|
||||
visit: {
|
||||
busuanzi: {
|
||||
[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
|
||||
}
|
||||
};
|
|
@ -33,6 +33,8 @@ donate:
|
|||
patreon: 'Patreon'
|
||||
plugin:
|
||||
backtotop: 'Back to Top'
|
||||
visit: '%s visits'
|
||||
visitor: 'Visited by %s users'
|
||||
search:
|
||||
search: 'Search'
|
||||
hint: 'Type something...'
|
||||
|
|
|
@ -31,6 +31,8 @@ donate:
|
|||
wechat: '微信'
|
||||
plugin:
|
||||
backtotop: '回到顶端'
|
||||
visit: '%s次访问'
|
||||
visitor: '共%s个访客'
|
||||
search:
|
||||
search: '搜索'
|
||||
hint: '想要查找什么...'
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
<%= `${ time.locale(get_config('language', 'en')).humanize() } ${ __('article.read')} (${ __('article.about') } ${ words } ${ __('article.words') })` %>
|
||||
</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>
|
||||
<% } %>
|
||||
|
@ -41,17 +47,6 @@
|
|||
<div class="content">
|
||||
<%- index && post.excerpt ? post.excerpt : post.content %>
|
||||
</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) { %>
|
||||
<div class="level is-size-7 is-uppercase">
|
||||
<div class="level-start">
|
||||
|
|
|
@ -13,17 +13,13 @@
|
|||
© <%= date(new Date(), 'YYYY') %> <%= get_config('author') || get_config('title') %>
|
||||
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> & <a
|
||||
href="http://github.com/ppoffice/hexo-theme-icarus" target="_blank">Icarus</a>
|
||||
</p>
|
||||
<% if (has_config('plugins.visit') ? get_config('plugins.visit') : false) { %>
|
||||
<p class="is-size-7">
|
||||
<span id="busuanzi_container_site_uv">
|
||||
UV:<span id="busuanzi_value_site_uv">0</span>,
|
||||
</span>
|
||||
<span id="busuanzi_container_site_pv">
|
||||
PV:<span id="busuanzi_value_site_pv">0</span>
|
||||
</span>
|
||||
</p>
|
||||
<% if (has_config('plugins.busuanzi') ? get_config('plugins.busuanzi') : false) { %>
|
||||
<br>
|
||||
<span id="busuanzi_container_site_uv">
|
||||
<%- _p('plugin.visitor', '<span id="busuanzi_value_site_uv">0</span>') %>
|
||||
</span>
|
||||
<% } %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="level-end">
|
||||
<% if (has_config('footer.links')) { %>
|
||||
|
|
|
@ -3,9 +3,21 @@
|
|||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
MathJax.Hub.Config({
|
||||
'HTML-CSS': {matchFontHeight: false},
|
||||
SVG: {matchFontHeight: false},
|
||||
CommonHTML: {matchFontHeight: false}
|
||||
'HTML-CSS': {
|
||||
matchFontHeight: false
|
||||
},
|
||||
SVG: {
|
||||
matchFontHeight: false
|
||||
},
|
||||
CommonHTML: {
|
||||
matchFontHeight: false
|
||||
},
|
||||
tex2jax: {
|
||||
inlineMath: [
|
||||
['$','$'],
|
||||
['\\(','\\)']
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue