From ef35f2b3b3186bf436c087e203896700219d0405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <22476705@qq.com> Date: Wed, 6 May 2020 10:26:56 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E5=BC=8F=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/tags/folding.js | 44 +++++ .../css/_common/scaffolding/tags/folding.styl | 170 ++++++++++++++++++ source/css/_common/scaffolding/tags/tags.styl | 1 + 3 files changed, 215 insertions(+) create mode 100644 scripts/tags/folding.js create mode 100644 source/css/_common/scaffolding/tags/folding.styl diff --git a/scripts/tags/folding.js b/scripts/tags/folding.js new file mode 100644 index 0000000000..8ee3a56d1d --- /dev/null +++ b/scripts/tags/folding.js @@ -0,0 +1,44 @@ +'use strict'; + +// Usage: +// {% folding 参数(可选), 标题 %} +// +// ![](https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg) +// +// {% endfolding %} +// 颜色: blue, cyan, green, yellow, red +// 状态: 状态填写 open 代表默认打开。 + +// 举例: +// {% folding cyan open, 查看默认打开的折叠框 %} +// +// 这是一个默认打开的折叠框。 +// +// {% endfolding %} +function postFolding(args, content) { + args = args.join(' ').split(','); + let style = '' + let title = '' + if (args.length > 1) { + style = args[0].trim() + title = args[1].trim() + } else if (args.length > 0) { + title = args[0].trim() + } + if (style != undefined) { + return ` ${hexo.render.renderSync({text: title, engine: 'markdown'}).split('\n').join('')} + + ${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')} + + `; + } else { + return ` ${hexo.render.renderSync({text: title, engine: 'markdown'}).split('\n').join('')} + + ${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')} + + `; + } + +} + +hexo.extend.tag.register('folding', postFolding, {ends: true}); diff --git a/source/css/_common/scaffolding/tags/folding.styl b/source/css/_common/scaffolding/tags/folding.styl new file mode 100644 index 0000000000..d93475ddb3 --- /dev/null +++ b/source/css/_common/scaffolding/tags/folding.styl @@ -0,0 +1,170 @@ +// gap +$gap = 16px // base gap +$gap-h2 = 48px +$gap-h3 = 32px +$gap-h4 = 16px +$gap-paragraph = 1rem // 区块间距 +$gap-row = .5rem // 行间距 +$gap-card = $gap +// border radius +$border-codeblock = 4px +// common +$color-card = white +$color-text = #555 +$color-block = #f6f6f6 +// font size +$fontsize-meta = .875rem // 14px +$fontsize-list = .9375rem // 15px +//color +$color-p = #555 +$color-md-blue = #e8f4fd +$color-md-blue1 = rgba(33,150,243,0.3) + +$color-mac-cyan = #e8fafe +$color-mac-cyan1 = rgba(27,205,252,0.3) +$color-mac-green = #ebf9ed +$color-mac-green1 =rgba(61,197,80,.3) +$color-mac-yellow = #fff8e9 +$color-mac-yellow1 = rgba(255,189,43,0.3) +$color-mac-red = #feefee +$color-mac-red1 = rgba(254,95,88,0.3) +// transition time +$time = 0.28s + +details + display: block + padding: $gap + margin: $gap-row 0 + border-radius: $border-codeblock + background: $color-card + font-size: $fontsize-list + transition: all $time ease + -moz-transition: all $time ease + -webkit-transition: all $time ease + -o-transition: all $time ease + + summary + cursor: url(/images/ayuda.cur),auto; + padding: $gap + outline:none; + margin: 0 - $gap + border-radius: $border-codeblock + color: alpha($color-p, .7) + font-size: $fontsize-meta + font-weight: bold + position: relative + line-height: normal + + + >p, h1, h2, h3, h4, h5, h6 + display: inline !important + border-bottom: none !important + cursor: url(/images/ayuda.cur),auto; + + &:hover + color: $color-p + + &:after + position: absolute + content: '+' + text-align: center + top: 50% + transform: translateY(-50%) + right: $gap + + border: 1px solid $color-block + + > summary + background: $color-block + + &[blue] + border-color: $color-md-blue + + > summary + background:$color-md-blue + + &[cyan] + border-color:$color-mac-cyan + + > summary + background:$color-mac-cyan + + &[green] + border-color:$color-mac-green + + > summary + background:$color-mac-green + + &[yellow] + border-color:$color-mac-yellow + + > summary + background:$color-mac-yellow + + &[red] + border-color:$color-mac-red + + > summary + background:$color-mac-red + +details[open] + border-color: alpha($color-p, .2) + + > summary + border-bottom: 1px solid alpha($color-p, .2) + border-bottom-left-radius: 0 + border-bottom-right-radius: 0 + + &[blue] + border-color: alpha($color-md-blue1, .3) + + > summary + border-bottom-color: alpha($color-md-blue1, .3) + + &[cyan] + border-color: alpha($color-mac-cyan1, .3) + + > summary + border-bottom-color: alpha($color-mac-cyan1, .3) + + &[green] + border-color: alpha($color-mac-green1, .3) + + > summary + border-bottom-color: alpha($color-mac-green1, .3) + + &[yellow] + border-color: alpha($color-mac-yellow1, .3) + + > summary + border-bottom-color: alpha($color-mac-yellow1, .3) + + &[red] + border-color: alpha($color-mac-red1, .3) + + > summary + border-bottom-color: alpha($color-mac-red1, .3) + + > summary + color: $color-p + margin-bottom: 0 + + &:hover + &:after + content: '-' + + > div.content + padding: $gap + margin: 0 - $gap + margin-top: 0 + + p > a:hover + text-decoration: underline + + > + p, .tabs, ul, ol, .highlight, .note, .fancybox, details + &:first-child + margin-top: 0 + + &:last-child + margin-bottom: 0 diff --git a/source/css/_common/scaffolding/tags/tags.styl b/source/css/_common/scaffolding/tags/tags.styl index 56cc2c9728..49a66001b4 100644 --- a/source/css/_common/scaffolding/tags/tags.styl +++ b/source/css/_common/scaffolding/tags/tags.styl @@ -2,6 +2,7 @@ @import 'group-pictures'; @import 'label'; @import 'tabs'; +@import 'folding'; @import 'note' if (hexo-config('note.style') != 'disabled'); From 7452b27f4cad5c460cea84b5052a2e5128ef68bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <22476705@qq.com> Date: Mon, 11 May 2020 13:55:24 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E5=BC=8F=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../css/_common/scaffolding/tags/folding.styl | 141 +++++++++--------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/source/css/_common/scaffolding/tags/folding.styl b/source/css/_common/scaffolding/tags/folding.styl index d93475ddb3..cb76030d99 100644 --- a/source/css/_common/scaffolding/tags/folding.styl +++ b/source/css/_common/scaffolding/tags/folding.styl @@ -1,56 +1,55 @@ // gap -$gap = 16px // base gap -$gap-h2 = 48px -$gap-h3 = 32px -$gap-h4 = 16px -$gap-paragraph = 1rem // 区块间距 -$gap-row = .5rem // 行间距 -$gap-card = $gap +$fd-fold-folding-gap = 16px // base gap +$fd-fold-folding-gap-h2 = 48px +$fd-fold-folding-gap-h3 = 32px +$fd-fold-folding-gap-h4 = 16px +$fd-fold-folding-gap-paragraph = 1rem // 区块间距 +$fd-fold-folding-gap-row = .5rem // 行间距 +$fd-fold-folding-gap-card = $fd-fold-folding-gap // border radius -$border-codeblock = 4px +$fd-fold-folding-border-codeblock = 4px // common -$color-card = white -$color-text = #555 -$color-block = #f6f6f6 +$fd-fold-folding-color-card = white +$fd-fold-folding-color-block = #f6f6f6 // font size -$fontsize-meta = .875rem // 14px -$fontsize-list = .9375rem // 15px +$fd-fold-folding-fontsize-meta = .875rem // 14px +$fd-fold-folding-fontsize-list = .9375rem // 15px //color -$color-p = #555 -$color-md-blue = #e8f4fd -$color-md-blue1 = rgba(33,150,243,0.3) - -$color-mac-cyan = #e8fafe -$color-mac-cyan1 = rgba(27,205,252,0.3) -$color-mac-green = #ebf9ed -$color-mac-green1 =rgba(61,197,80,.3) -$color-mac-yellow = #fff8e9 -$color-mac-yellow1 = rgba(255,189,43,0.3) -$color-mac-red = #feefee -$color-mac-red1 = rgba(254,95,88,0.3) +$fd-fold-folding-color-p = #555 +$fd-fold-folding-color-md-blue = #e8f4fd +$fd-fold-folding-color-md-blue1 = rgba(33,150,243,0.3) + +$fd-fold-folding-color-mac-cyan = #e8fafe +$fd-fold-folding-color-mac-cyan1 = rgba(27,205,252,0.3) +$fd-fold-folding-color-mac-green = #ebf9ed +$fd-fold-folding-color-mac-green1 =rgba(61,197,80,.3) +$fd-fold-folding-color-mac-yellow = #fff8e9 +$fd-fold-folding-color-mac-yellow1 = rgba(255,189,43,0.3) +$fd-fold-folding-color-mac-red = #feefee +$fd-fold-folding-color-mac-red1 = rgba(254,95,88,0.3) // transition time -$time = 0.28s +$fd-fold-folding-time = 0.28s details display: block - padding: $gap - margin: $gap-row 0 - border-radius: $border-codeblock - background: $color-card - font-size: $fontsize-list - transition: all $time ease - -moz-transition: all $time ease - -webkit-transition: all $time ease - -o-transition: all $time ease + padding: $fd-fold-folding-gap + margin: $fd-fold-folding-gap-row 0 + border-radius: $fd-fold-folding-border-codeblock + background: $fd-fold-folding-color-card + font-size: $fd-fold-folding-fontsize-list + transition: all $fd-fold-folding-time ease + -moz-transition: all $fd-fold-folding-time ease + -webkit-transition: all $fd-fold-folding-time ease + -o-transition: all $fd-fold-folding-time ease summary - cursor: url(/images/ayuda.cur),auto; - padding: $gap + cursor: pointer; + padding: $fd-fold-folding-gap outline:none; - margin: 0 - $gap - border-radius: $border-codeblock - color: alpha($color-p, .7) - font-size: $fontsize-meta + margin: 0 - $fd-fold-folding-gap + border-radius: $fd-fold-folding-border-codeblock + color: alpha($fd-fold-folding-color-p, .7) + font-size: $fd-fold-folding-fontsize-meta font-weight: bold position: relative line-height: normal @@ -59,10 +58,10 @@ details >p, h1, h2, h3, h4, h5, h6 display: inline !important border-bottom: none !important - cursor: url(/images/ayuda.cur),auto; + cursor: pointer; &:hover - color: $color-p + color: $fd-fold-folding-color-p &:after position: absolute @@ -70,83 +69,83 @@ details text-align: center top: 50% transform: translateY(-50%) - right: $gap + right: $fd-fold-folding-gap - border: 1px solid $color-block + border: 1px solid $fd-fold-folding-color-block > summary - background: $color-block + background: $fd-fold-folding-color-block &[blue] - border-color: $color-md-blue + border-color: $fd-fold-folding-color-md-blue > summary - background:$color-md-blue + background:$fd-fold-folding-color-md-blue &[cyan] - border-color:$color-mac-cyan + border-color:$fd-fold-folding-color-mac-cyan > summary - background:$color-mac-cyan + background:$fd-fold-folding-color-mac-cyan &[green] - border-color:$color-mac-green + border-color:$fd-fold-folding-color-mac-green > summary - background:$color-mac-green + background:$fd-fold-folding-color-mac-green &[yellow] - border-color:$color-mac-yellow + border-color:$fd-fold-folding-color-mac-yellow > summary - background:$color-mac-yellow + background:$fd-fold-folding-color-mac-yellow &[red] - border-color:$color-mac-red + border-color:$fd-fold-folding-color-mac-red > summary - background:$color-mac-red + background:$fd-fold-folding-color-mac-red details[open] - border-color: alpha($color-p, .2) + border-color: alpha($fd-fold-folding-color-p, .2) > summary - border-bottom: 1px solid alpha($color-p, .2) + border-bottom: 1px solid alpha($fd-fold-folding-color-p, .2) border-bottom-left-radius: 0 border-bottom-right-radius: 0 &[blue] - border-color: alpha($color-md-blue1, .3) + border-color: alpha($fd-fold-folding-color-md-blue1, .3) > summary - border-bottom-color: alpha($color-md-blue1, .3) + border-bottom-color: alpha($fd-fold-folding-color-md-blue1, .3) &[cyan] - border-color: alpha($color-mac-cyan1, .3) + border-color: alpha($fd-fold-folding-color-mac-cyan1, .3) > summary - border-bottom-color: alpha($color-mac-cyan1, .3) + border-bottom-color: alpha($fd-fold-folding-color-mac-cyan1, .3) &[green] - border-color: alpha($color-mac-green1, .3) + border-color: alpha($fd-fold-folding-color-mac-green1, .3) > summary - border-bottom-color: alpha($color-mac-green1, .3) + border-bottom-color: alpha($fd-fold-folding-color-mac-green1, .3) &[yellow] - border-color: alpha($color-mac-yellow1, .3) + border-color: alpha($fd-fold-folding-color-mac-yellow1, .3) > summary - border-bottom-color: alpha($color-mac-yellow1, .3) + border-bottom-color: alpha($fd-fold-folding-color-mac-yellow1, .3) &[red] - border-color: alpha($color-mac-red1, .3) + border-color: alpha($fd-fold-folding-color-mac-red1, .3) > summary - border-bottom-color: alpha($color-mac-red1, .3) + border-bottom-color: alpha($fd-fold-folding-color-mac-red1, .3) > summary - color: $color-p + color: $fd-fold-folding-color-p margin-bottom: 0 &:hover @@ -154,8 +153,8 @@ details[open] content: '-' > div.content - padding: $gap - margin: 0 - $gap + padding: $fd-fold-folding-gap + margin: 0 - $fd-fold-folding-gap margin-top: 0 p > a:hover From b9ae733f760db430d649d6d6d9078e9b9148c6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <22476705@qq.com> Date: Mon, 11 May 2020 16:15:51 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E5=BC=8F=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../css/_common/scaffolding/tags/folding.styl | 136 +++++++++--------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/source/css/_common/scaffolding/tags/folding.styl b/source/css/_common/scaffolding/tags/folding.styl index cb76030d99..d119a594e5 100644 --- a/source/css/_common/scaffolding/tags/folding.styl +++ b/source/css/_common/scaffolding/tags/folding.styl @@ -1,55 +1,55 @@ // gap -$fd-fold-folding-gap = 16px // base gap -$fd-fold-folding-gap-h2 = 48px -$fd-fold-folding-gap-h3 = 32px -$fd-fold-folding-gap-h4 = 16px -$fd-fold-folding-gap-paragraph = 1rem // 区块间距 -$fd-fold-folding-gap-row = .5rem // 行间距 -$fd-fold-folding-gap-card = $fd-fold-folding-gap +$fd-gap = 16px // base gap +$fd-gap-h2 = 48px +$fd-gap-h3 = 32px +$fd-gap-h4 = 16px +$fd-gap-paragraph = 1rem // 区块间距 +$fd-gap-row = .5rem // 行间距 +$fd-gap-card = $fd-gap // border radius -$fd-fold-folding-border-codeblock = 4px +$fd-border-codeblock = 4px // common -$fd-fold-folding-color-card = white -$fd-fold-folding-color-block = #f6f6f6 +$fd-color-card = white +$fd-color-block = #f6f6f6 // font size -$fd-fold-folding-fontsize-meta = .875rem // 14px -$fd-fold-folding-fontsize-list = .9375rem // 15px +$fd-fontsize-meta = .875rem // 14px +$fd-fontsize-list = .9375rem // 15px //color -$fd-fold-folding-color-p = #555 -$fd-fold-folding-color-md-blue = #e8f4fd -$fd-fold-folding-color-md-blue1 = rgba(33,150,243,0.3) - -$fd-fold-folding-color-mac-cyan = #e8fafe -$fd-fold-folding-color-mac-cyan1 = rgba(27,205,252,0.3) -$fd-fold-folding-color-mac-green = #ebf9ed -$fd-fold-folding-color-mac-green1 =rgba(61,197,80,.3) -$fd-fold-folding-color-mac-yellow = #fff8e9 -$fd-fold-folding-color-mac-yellow1 = rgba(255,189,43,0.3) -$fd-fold-folding-color-mac-red = #feefee -$fd-fold-folding-color-mac-red1 = rgba(254,95,88,0.3) +$fd-color-p = #555 +$fd-color-md-blue = #e8f4fd +$fd-color-md-blue1 = rgba(33,150,243,0.3) + +$fd-color-mac-cyan = #e8fafe +$fd-color-mac-cyan1 = rgba(27,205,252,0.3) +$fd-color-mac-green = #ebf9ed +$fd-color-mac-green1 =rgba(61,197,80,.3) +$fd-color-mac-yellow = #fff8e9 +$fd-color-mac-yellow1 = rgba(255,189,43,0.3) +$fd-color-mac-red = #feefee +$fd-color-mac-red1 = rgba(254,95,88,0.3) // transition time -$fd-fold-folding-time = 0.28s +$fd-time = 0.28s details display: block - padding: $fd-fold-folding-gap - margin: $fd-fold-folding-gap-row 0 - border-radius: $fd-fold-folding-border-codeblock - background: $fd-fold-folding-color-card - font-size: $fd-fold-folding-fontsize-list - transition: all $fd-fold-folding-time ease - -moz-transition: all $fd-fold-folding-time ease - -webkit-transition: all $fd-fold-folding-time ease - -o-transition: all $fd-fold-folding-time ease + padding: $fd-gap + margin: $fd-gap-row 0 + border-radius: $fd-border-codeblock + background: $fd-color-card + font-size: $fd-fontsize-list + transition: all $fd-time ease + -moz-transition: all $fd-time ease + -webkit-transition: all $fd-time ease + -o-transition: all $fd-time ease summary cursor: pointer; - padding: $fd-fold-folding-gap + padding: $fd-gap outline:none; - margin: 0 - $fd-fold-folding-gap - border-radius: $fd-fold-folding-border-codeblock - color: alpha($fd-fold-folding-color-p, .7) - font-size: $fd-fold-folding-fontsize-meta + margin: 0 - $fd-gap + border-radius: $fd-border-codeblock + color: alpha($fd-color-p, .7) + font-size: $fd-fontsize-meta font-weight: bold position: relative line-height: normal @@ -61,7 +61,7 @@ details cursor: pointer; &:hover - color: $fd-fold-folding-color-p + color: $fd-color-p &:after position: absolute @@ -69,83 +69,83 @@ details text-align: center top: 50% transform: translateY(-50%) - right: $fd-fold-folding-gap + right: $fd-gap - border: 1px solid $fd-fold-folding-color-block + border: 1px solid $fd-color-block > summary - background: $fd-fold-folding-color-block + background: $fd-color-block &[blue] - border-color: $fd-fold-folding-color-md-blue + border-color: $fd-color-md-blue > summary - background:$fd-fold-folding-color-md-blue + background:$fd-color-md-blue &[cyan] - border-color:$fd-fold-folding-color-mac-cyan + border-color:$fd-color-mac-cyan > summary - background:$fd-fold-folding-color-mac-cyan + background:$fd-color-mac-cyan &[green] - border-color:$fd-fold-folding-color-mac-green + border-color:$fd-color-mac-green > summary - background:$fd-fold-folding-color-mac-green + background:$fd-color-mac-green &[yellow] - border-color:$fd-fold-folding-color-mac-yellow + border-color:$fd-color-mac-yellow > summary - background:$fd-fold-folding-color-mac-yellow + background:$fd-color-mac-yellow &[red] - border-color:$fd-fold-folding-color-mac-red + border-color:$fd-color-mac-red > summary - background:$fd-fold-folding-color-mac-red + background:$fd-color-mac-red details[open] - border-color: alpha($fd-fold-folding-color-p, .2) + border-color: alpha($fd-color-p, .2) > summary - border-bottom: 1px solid alpha($fd-fold-folding-color-p, .2) + border-bottom: 1px solid alpha($fd-color-p, .2) border-bottom-left-radius: 0 border-bottom-right-radius: 0 &[blue] - border-color: alpha($fd-fold-folding-color-md-blue1, .3) + border-color: alpha($fd-color-md-blue1, .3) > summary - border-bottom-color: alpha($fd-fold-folding-color-md-blue1, .3) + border-bottom-color: alpha($fd-color-md-blue1, .3) &[cyan] - border-color: alpha($fd-fold-folding-color-mac-cyan1, .3) + border-color: alpha($fd-color-mac-cyan1, .3) > summary - border-bottom-color: alpha($fd-fold-folding-color-mac-cyan1, .3) + border-bottom-color: alpha($fd-color-mac-cyan1, .3) &[green] - border-color: alpha($fd-fold-folding-color-mac-green1, .3) + border-color: alpha($fd-color-mac-green1, .3) > summary - border-bottom-color: alpha($fd-fold-folding-color-mac-green1, .3) + border-bottom-color: alpha($fd-color-mac-green1, .3) &[yellow] - border-color: alpha($fd-fold-folding-color-mac-yellow1, .3) + border-color: alpha($fd-color-mac-yellow1, .3) > summary - border-bottom-color: alpha($fd-fold-folding-color-mac-yellow1, .3) + border-bottom-color: alpha($fd-color-mac-yellow1, .3) &[red] - border-color: alpha($fd-fold-folding-color-mac-red1, .3) + border-color: alpha($fd-color-mac-red1, .3) > summary - border-bottom-color: alpha($fd-fold-folding-color-mac-red1, .3) + border-bottom-color: alpha($fd-color-mac-red1, .3) > summary - color: $fd-fold-folding-color-p + color: $fd-color-p margin-bottom: 0 &:hover @@ -153,8 +153,8 @@ details[open] content: '-' > div.content - padding: $fd-fold-folding-gap - margin: 0 - $fd-fold-folding-gap + padding: $fd-gap + margin: 0 - $fd-gap margin-top: 0 p > a:hover From 81915501337f3dc861498584f212a3446ce9898f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <22476705@qq.com> Date: Tue, 12 May 2020 15:24:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E5=BC=8F=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_common/scaffolding/tags/folding.styl | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/css/_common/scaffolding/tags/folding.styl b/source/css/_common/scaffolding/tags/folding.styl index d119a594e5..99458a7411 100644 --- a/source/css/_common/scaffolding/tags/folding.styl +++ b/source/css/_common/scaffolding/tags/folding.styl @@ -1,8 +1,5 @@ // gap $fd-gap = 16px // base gap -$fd-gap-h2 = 48px -$fd-gap-h3 = 32px -$fd-gap-h4 = 16px $fd-gap-paragraph = 1rem // 区块间距 $fd-gap-row = .5rem // 行间距 $fd-gap-card = $fd-gap From ee3c5f8309cedf0851964cde0e91d127b2928ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <22476705@qq.com> Date: Tue, 12 May 2020 15:38:53 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E5=BC=8F=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/tags/folding.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/tags/folding.js b/scripts/tags/folding.js index 8ee3a56d1d..37ce6811c5 100644 --- a/scripts/tags/folding.js +++ b/scripts/tags/folding.js @@ -1,20 +1,20 @@ 'use strict'; -// Usage: -// {% folding 参数(可选), 标题 %} -// -// ![](https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg) -// -// {% endfolding %} -// 颜色: blue, cyan, green, yellow, red -// 状态: 状态填写 open 代表默认打开。 - -// 举例: -// {% folding cyan open, 查看默认打开的折叠框 %} -// -// 这是一个默认打开的折叠框。 -// -// {% endfolding %} +/** + * Usage: + * {% folding [args], title %} + * content + * {% endfolding %} + * + * args: + * - color: blue, cyan, green, yellow, red + * - status: open # means open by default + * + * example: + * {% folding cyan open, view the default folding box %} + * This is a folding box that opens by default + * {% endfolding %} + */ function postFolding(args, content) { args = args.join(' ').split(','); let style = '' From 45970cf205773be6869625565aa48ef507bcf591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <22476705@qq.com> Date: Tue, 12 May 2020 15:40:07 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E5=BC=8F=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/_common/scaffolding/tags/folding.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/css/_common/scaffolding/tags/folding.styl b/source/css/_common/scaffolding/tags/folding.styl index 99458a7411..d803a80072 100644 --- a/source/css/_common/scaffolding/tags/folding.styl +++ b/source/css/_common/scaffolding/tags/folding.styl @@ -1,7 +1,7 @@ // gap $fd-gap = 16px // base gap -$fd-gap-paragraph = 1rem // 区块间距 -$fd-gap-row = .5rem // 行间距 +$fd-gap-paragraph = 1rem // block spacing +$fd-gap-row = .5rem // line spacing $fd-gap-card = $fd-gap // border radius $fd-border-codeblock = 4px