From 3223cab20efa62fc15f8dcca25cc18c20f70dc31 Mon Sep 17 00:00:00 2001 From: liuyib <1656081615@qq.com> Date: Sat, 14 Sep 2019 12:15:53 +0800 Subject: [PATCH] refactor: Modify the style of icon in footer --- layout/_partials/footer/footer.pug | 2 ++ .../css/_common/components/footer/index.styl | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/layout/_partials/footer/footer.pug b/layout/_partials/footer/footer.pug index 56a84c8..e00adc3 100644 --- a/layout/_partials/footer/footer.pug +++ b/layout/_partials/footer/footer.pug @@ -14,6 +14,8 @@ if footerCopyright || footerBeian span!= `© ${startYear}` + (startYear != endYear ? `-${endYear}` : "") if footer.icon.enable span(class=`${fa_prefix} fa-${footer.icon.name} footer-icon`) + else + span= " " span= footer.copyright.text || config.author + "." if footerCopyright && footerBeian span= " | " diff --git a/source/css/_common/components/footer/index.styl b/source/css/_common/components/footer/index.styl index c24bbeb..af22f17 100644 --- a/source/css/_common/components/footer/index.styl +++ b/source/css/_common/components/footer/index.styl @@ -1,3 +1,15 @@ +.footer { + &-icon { + margin: 0 .3rem; + font-size: 1em; + color: convert(hexo-config('footer.icon.color') || '#ff0000'); + + if (hexo-config('footer.icon.animation')) { + animation: footer-heart-beat 1.2s infinite; + } + } +} + .footer-inner { padding: 1rem; font-size: $font-size-footer; @@ -23,14 +35,4 @@ .separator { margin: 0 .5rem; } - - .footer-icon { - margin: 0 .2rem; - font-size: .9em; - color: convert(hexo-config('footer.icon.color') || '#ff0000'); - - if (hexo-config('footer.icon.animation')) { - animation: footer-heart-beat 1.2s infinite; - } - } } -- GitLab