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:
* {% poetry [align:center] [title] [author:作者] [date:日期] [footer] %} * {% poetry [align:center] [title] [author:作者] [date:日期] [footer:footer] %}
* body * body
* {% endpoetry %} * {% endpoetry %}
* *
@ -13,7 +13,7 @@
hexo.extend.tag.register('poetry', function(args, content) { hexo.extend.tag.register('poetry', function(args, content) {
var el = ''; 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"'; el += '<div class="tag-plugin poetry"';
if (args.align) { if (args.align) {

View File

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

View File

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