From 4aacafdae19f25a51ab672b4686c4eb195ae53f4 Mon Sep 17 00:00:00 2001 From: Jerry <16351105+jerryc127@users.noreply.github.com> Date: Sat, 22 Aug 2020 23:17:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=81=A9=E9=85=8Dhexo=205.1.0=20prismj?= =?UTF-8?q?s=20caption=20feat:=20code-font-size=20=E4=B9=9F=E6=9C=83?= =?UTF-8?q?=E5=BD=B1=E9=9F=BF=E8=A1=8C=E5=85=A7=E4=BB=A3=E7=A2=BC=E5=A1=8A?= =?UTF-8?q?=E5=AD=97=E9=AB=94=E5=A4=A7=E5=B0=8F=20#325=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=BE=A9aside=20recent=20post=E7=9A=84=20time=20=E5=9C=A8safar?= =?UTF-8?q?i=E6=B2=92=E6=9C=89=E9=A1=AF=E7=A4=BA=E7=9A=84bug=20fix:=20?= =?UTF-8?q?=E4=BF=AE=E5=BE=A9=20prismjs=20=E5=9C=A8=20tags-toggle=20?= =?UTF-8?q?=E5=A4=96=E6=8E=9B=E6=A8=99=E7=B0=BD=E8=A3=8F=EF=BC=8C=E4=BB=A3?= =?UTF-8?q?=E7=A2=BC=E5=A1=8A=E9=A1=AF=E7=A4=BA=E4=B8=80=E8=A1=8C=E7=9A=84?= =?UTF-8?q?bugs=20style:=20=E5=88=AA=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/widget/card_author.pug | 2 +- scripts/tags/hide.js | 2 +- source/css/_highlight/highlight.styl | 17 ++++++++++++++++- source/css/_highlight/highlight/index.styl | 15 --------------- source/css/_highlight/prismjs/index.styl | 9 ++++++++- source/css/_layout/aside.styl | 4 ++-- source/css/_layout/sidebar.styl | 10 +++++----- source/css/_tags/gallery.styl | 3 --- 8 files changed, 33 insertions(+), 29 deletions(-) diff --git a/layout/includes/widget/card_author.pug b/layout/includes/widget/card_author.pug index a5121f0..5b1c8e4 100644 --- a/layout/includes/widget/card_author.pug +++ b/layout/includes/widget/card_author.pug @@ -16,7 +16,7 @@ .length_num= site.posts.length if site.tags.length - .card-info-data-item.is-center + .card-info-data-item.is-center a(href=url_for(config.tag_dir) + '/') .headline= _p('aside.tags') .length_num= site.tags.length diff --git a/scripts/tags/hide.js b/scripts/tags/hide.js index 5decb7e..b57c776 100644 --- a/scripts/tags/hide.js +++ b/scripts/tags/hide.js @@ -63,7 +63,7 @@ function hideToggle (args, content) { group += '"' return `
` + ` } hexo.extend.tag.register('hideInline', hideInline) diff --git a/source/css/_highlight/highlight.styl b/source/css/_highlight/highlight.styl index 94d13af..d9bd0a4 100644 --- a/source/css/_highlight/highlight.styl +++ b/source/css/_highlight/highlight.styl @@ -49,6 +49,7 @@ blockquote #article-container pre, code + font-size: $code-font-size font-family: $code-font-family !important code @@ -62,7 +63,6 @@ blockquote pre @extend $code-block padding: 10px 20px - font-size: $code-font-size code padding: 0 @@ -79,6 +79,20 @@ blockquote padding: 8px 0 border: none + figcaption, + .caption + padding: .3rem 0 .1rem .7rem + font-size: $code-font-size + line-height: 1em + + a + float: right + padding-right: 10px + color: $highlight-foreground + + &:hover + border-bottom-color: $highlight-foreground + .highlight-tools position: relative display: flex @@ -88,6 +102,7 @@ blockquote height: 2.15em background: $highlight-tools.bg-color color: $highlight-tools.color + font-size: $code-font-size &.closed + table display: none diff --git a/source/css/_highlight/highlight/index.styl b/source/css/_highlight/highlight/index.styl index 3978700..4239174 100644 --- a/source/css/_highlight/highlight/index.styl +++ b/source/css/_highlight/highlight/index.styl @@ -26,20 +26,6 @@ if $highlight_theme != false padding: 0 border: none - figcaption - clearfix() - padding: .3rem 0 .1rem .7rem - font-size: 1em - line-height: 1em - - a - float: right - padding-right: 10px - color: $highlight-foreground - - &:hover - border-bottom-color: $highlight-foreground - .gutter pre padding-right: .5rem padding-left: .5rem @@ -51,4 +37,3 @@ if $highlight_theme != false padding-right: .5rem padding-left: .5rem width: 100% - diff --git a/source/css/_highlight/prismjs/index.styl b/source/css/_highlight/prismjs/index.styl index b3bf644..17e52df 100644 --- a/source/css/_highlight/prismjs/index.styl +++ b/source/css/_highlight/prismjs/index.styl @@ -10,4 +10,11 @@ if $highlight_theme != false background: $highlight-scrollbar &:not(.line-numbers) - padding: 10px 20px \ No newline at end of file + padding: 10px 20px + + .caption + margin-left: -3.8em + padding: .2rem .8rem !important + + a + padding: 0 !important diff --git a/source/css/_layout/aside.styl b/source/css/_layout/aside.styl index 6d01ad6..cf2b565 100644 --- a/source/css/_layout/aside.styl +++ b/source/css/_layout/aside.styl @@ -138,10 +138,10 @@ & > time color: $theme-meta-color - font-size: .85% + font-size: 85% & > .comment - font-size: .9% + font-size: 90% & > .title, & > .comment diff --git a/source/css/_layout/sidebar.styl b/source/css/_layout/sidebar.styl index b257128..2ddafd0 100644 --- a/source/css/_layout/sidebar.styl +++ b/source/css/_layout/sidebar.styl @@ -11,11 +11,6 @@ +maxWidth1024() display: none -.tocOpenPc - & > #toggle-sidebar - color: #99a9bf - transform: rotateZ(180deg) - #sidebar position: fixed top: 0 @@ -27,6 +22,11 @@ background: var(--sidebar-bg) opacity: .9 + &.tocOpenPc + & > #toggle-sidebar + color: #99a9bf + transform: rotateZ(180deg) + +maxWidth1024() right: -($mobile-sidebar-width) left: auto diff --git a/source/css/_tags/gallery.styl b/source/css/_tags/gallery.styl index bb76a4d..8395e74 100644 --- a/source/css/_tags/gallery.styl +++ b/source/css/_tags/gallery.styl @@ -99,9 +99,6 @@ figure.gallery-group img opacity: 0 - .img-alt - display: none - .fancybox width: auto text-align: inherit \ No newline at end of file