This commit is contained in:
xaoxuu 2022-01-13 18:27:20 +08:00
parent fa03c8ad96
commit 278eed0ee5
3 changed files with 30 additions and 8 deletions

View File

@ -3,7 +3,7 @@
* 格式与官方标签插件一致使用空格分隔中括号内的是可选参数中括号不需要写出来
*
* poetry:
* {% poetry [align:center] [title] [author:作者] [date:日期] [footer] %}
* {% poetry [align:center] [title] [author:作者] [date:日期] [footer:footer] %}
* body
* {% endpoetry %}
*
@ -13,7 +13,7 @@
hexo.extend.tag.register('poetry', function(args, content) {
var el = '';
args = hexo.args.map(args, ['author', 'date', 'align'], ['title', 'footer']);
args = hexo.args.map(args, ['author', 'date', 'align', 'footer'], ['title']);
el += '<div class="tag-plugin poetry"';
if (args.align) {

View File

@ -28,7 +28,9 @@ article.md.content
h1,h2,h3,h4,h5,h6
text-align: center
>h2:not([class])
align-self: center
border-bottom-style: dashed
border-bottom-color: $color-highlight
>:first-child
margin-top: 1rem
h1:not(:first-child)
@ -61,7 +63,7 @@ article.md.content
p,>ul:not(:last-child),>ol:not(:last-child)
margin-top: 'calc(%s - 4px)' % var(--gap-p)
margin-bottom: 'calc(%s - 4px)' % var(--gap-p)
.tag-plugin
.tag-plugin,iframe
margin-top: var(--gap-p)
margin-bottom: var(--gap-p)
p,.tag-plugin
@ -110,6 +112,10 @@ article.md pre
-webkit-font-smoothing: auto
-moz-osx-font-smoothing: auto
article.md
.center
align-self: center
// div
article.md>div
margin: var(--gap-p) 0

View File

@ -1,11 +1,12 @@
.md .tag-plugin.quot
text-align: center
font-weight: 700
position: relative
align-items: center
.md .tag-plugin.quot:not(span)
display: flex
align-self: center
align-items: center
border-bottom: none
font-weight: 700
&:first-child
margin-top: 1.5rem
a.headerlink:before
@ -17,7 +18,7 @@
// override
article.md.content
.quot
.quot:not(span)
color: var(--text-p0)
h1.quot
font-size: $fs-h1
@ -31,7 +32,7 @@ article.md.content
font-size: $fs-h4
// type=text
.md .tag-plugin.quot[type=text]
.md .tag-plugin.quot[type=text]:not(span)
&:before,&:after
content: ""
position: absolute
@ -54,7 +55,7 @@ article.md.content h1.quot[type=text]
border-width: 8px
// type=icon
.md .tag-plugin.quot[type=icon]
.md .tag-plugin.quot[type=icon]:not(span)
.icon
height: 1.5em
display: inline-block
@ -64,3 +65,18 @@ article.md.content h1.quot[type=text]
margin-right: .5rem
&.suffix
margin-left: .5rem
// inline quot
.md span.tag-plugin.quot
font-weight: 500
&:before,&:after
color: $color-highlight
font-weight: 900
&:before
content: ""
margin-left: -0.125em
margin-right: 0.125em
&:after
content: ""
margin-left: 0.125em
margin-right: -0.125em