[Feature]: add visitor style

pull/1351/head
seel.xu 2025-03-08 23:53:44 +08:00
parent ae42726149
commit 57fc19f525
2 changed files with 3 additions and 8 deletions

View File

@ -49,8 +49,8 @@ donate:
buymeacoffee: 'Buy me a coffee'
plugin:
backtotop: 'Back to top'
visit_count: '%s visits'
visitor_count: 'Visited by %s users'
visit_count: ' Site PV: %s&nbsp'
visitor_count: 'Site UV: %s&nbsp'
cookie_consent:
message: This website uses cookies to improve your experience.
dismiss: Got it!

View File

@ -31,13 +31,8 @@ class Footer extends Component {
<div class="container">
<div class="level">
<div class="level-start">
<a class="footer-logo is-block mb-2" href={siteUrl}>
{footerLogo}
</a>
<p class="is-size-7">
<span dangerouslySetInnerHTML={{ __html: `&copy; ${siteYear} ${author || siteTitle}` }}></span>
&nbsp;&nbsp;Powered by <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>&nbsp;&&nbsp;
<a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a>
{showVisitorCounter ? <br /> : null}
{showVisitorCounter ? <span id="busuanzi_container_site_uv"
dangerouslySetInnerHTML={{ __html: visitorCounterTitle }}></span> : null}
@ -88,6 +83,6 @@ module.exports = cacheComponent(Footer, 'common.footer', props => {
links,
copyright: footer?.copyright ?? '',
showVisitorCounter: plugins && plugins.busuanzi === true,
visitorCounterTitle: _p('plugin.visitor_count', '<span id="busuanzi_value_site_uv">0</span>')
visitorCounterTitle: _p('plugin.visitor_count', '<span id="busuanzi_value_site_uv">0</span>') + _p('plugin.visit_count', '<span id="busuanzi_value_site_pv">0</span>')
};
});