From 90d0a5f966e08dada0d19d15bbbe7359209478e5 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 18 Aug 2020 01:16:46 +0800 Subject: [PATCH] Optimize figcaption style --- _config.yml | 12 ++++++------ .../css/_common/scaffolding/highlight/copy-code.styl | 2 +- .../css/_common/scaffolding/highlight/highlight.styl | 10 +++++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/_config.yml b/_config.yml index 900c6fd..fd33ee5 100644 --- a/_config.yml +++ b/_config.yml @@ -342,7 +342,7 @@ mobile_layout_economy: false # Android Chrome header panel color ($brand-bg / $headband-bg => $black-deep). android_chrome_color: "#222" -# Custom Logo (Do not support scheme Mist) +# Custom Logo (Warning: Do not support scheme Mist) custom_logo: #/uploads/custom-logo.jpg codeblock: @@ -483,10 +483,12 @@ baidu_push: false # Third Party Plugins & Services Settings # See: https://theme-next.js.org/docs/third-party-services/ # More plugins: https://github.com/next-theme/awesome-next -# You may need to install dependencies or set CDN URLs in `vendors` +# You may need to install the corresponding dependency packages # --------------------------------------------------------------- # Math Formulas Render Support +# Warning: Please install / uninstall the relevant renderer according to the documentation. +# See: https://theme-next.js.org/docs/third-party-services/math-equations # Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax math: # Default (true) will load mathjax / katex script on demand. @@ -494,11 +496,9 @@ math: # If you set it to false, it will load mathjax / katex srcipt EVERY PAGE. per_page: true - # hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support. mathjax: enable: false - # hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support. katex: enable: false # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex @@ -513,7 +513,7 @@ pjax: false fancybox: false # A JavaScript library for zooming images like Medium. -# Do not enable both `fancybox` and `mediumzoom`. +# Warning: Do not enable both `fancybox` and `mediumzoom`. # For more information: https://github.com/francoischalifour/medium-zoom mediumzoom: false @@ -681,7 +681,7 @@ cnzz_siteid: # Show number of visitors of each article. # You can visit https://leancloud.cn to get AppID and AppKey. # AppID and AppKey are recommended to be the same as valine's for counter compatibility. -# Do not enable both `valine.visitor` and `leancloud_visitors`. +# Warning: Do not enable both `valine.visitor` and `leancloud_visitors`. leancloud_visitors: enable: false app_id: # diff --git a/source/css/_common/scaffolding/highlight/copy-code.styl b/source/css/_common/scaffolding/highlight/copy-code.styl index d26a481..1b0651e 100644 --- a/source/css/_common/scaffolding/highlight/copy-code.styl +++ b/source/css/_common/scaffolding/highlight/copy-code.styl @@ -34,7 +34,7 @@ } if (hexo-config('codeblock.copy_button.style') == 'mac') { - .highlight { + figure.highlight { border-radius: 5px; box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4); padding-top: 30px; diff --git a/source/css/_common/scaffolding/highlight/highlight.styl b/source/css/_common/scaffolding/highlight/highlight.styl index a6b5f9a..006ab60 100644 --- a/source/css/_common/scaffolding/highlight/highlight.styl +++ b/source/css/_common/scaffolding/highlight/highlight.styl @@ -48,7 +48,9 @@ kbd { white-space: nowrap; } -.highlight { +// `highlight.line_number: false` && `highlight.wrap: false` +// in Hexo config generates code.highlight elements +figure.highlight { @extend $code-block; position: relative; @@ -105,6 +107,12 @@ kbd { } } +// See https://github.com/hexojs/hexo-util/pull/229 +pre .caption, pre figcaption { + @extend figure.highlight figcaption; + margin-bottom: 10px; +} + .gist table { width: auto;