From 1df7acb3ce9df4011687b5a4326a26c7e6b5d825 Mon Sep 17 00:00:00 2001 From: XPoet Date: Tue, 28 May 2024 15:43:07 +0800 Subject: [PATCH] ui: optimize footer style (#326) --- layout/_partial/footer.ejs | 47 +++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 580b4990..407efee7 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -2,12 +2,26 @@ const { since: f_since, record: f_record, - site_deploy: f_site_deploy + site_deploy: f_site_deploy, + word_count: f_word_count } = theme?.footer || {} const { author: bi_author } = theme?.base_info || {} const { author: hexo_author } = config const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme?.website_count?.busuanzi_count || {} const web_master = bi_author || hexo_author + +const show_pv = bsz_enable === true && bsz_site_pv === true +const show_uv = bsz_enable === true && bsz_site_uv === true + +let f_temp_total_word = 0 +try { + f_temp_total_word = totalcount(site) +} catch { + f_temp_total_word = 0 +} +const show_word_count = f_word_count === true && f_temp_total_word !== 0 + +const has_count_info = show_pv || show_uv || show_word_count %>