new: add details custom block from @vue\theme-default since v1.3.0
This commit is contained in:
parent
8ffb1edc96
commit
08344fe8b5
|
|
@ -98,7 +98,11 @@ module.exports = (options, ctx) => {
|
|||
'/zh/': '警告'
|
||||
}
|
||||
}],
|
||||
|
||||
['container', {
|
||||
type: 'details',
|
||||
before: info => `<details class="custom-block details">${info ? `<summary>${info}</summary>` : ''}\n`,
|
||||
after: () => '</details>\n'
|
||||
}],
|
||||
// 卡片列表
|
||||
[
|
||||
'container',
|
||||
|
|
|
|||
|
|
@ -29,6 +29,22 @@
|
|||
color darken(red, 40%)
|
||||
a
|
||||
color var(--textColor)
|
||||
&.details
|
||||
display block
|
||||
position relative
|
||||
border-radius 2px
|
||||
margin 1.6em 0
|
||||
padding 1.6em
|
||||
background-color #eee
|
||||
h4
|
||||
margin-top 0
|
||||
figure, p
|
||||
&:last-child
|
||||
margin-bottom 0
|
||||
padding-bottom 0
|
||||
summary
|
||||
outline none
|
||||
cursor pointer
|
||||
|
||||
// 深色模式适配
|
||||
.theme-mode-dark
|
||||
|
|
@ -39,6 +55,7 @@
|
|||
.custom-block-title
|
||||
color darken(#ffe564, 15%)
|
||||
&.tip
|
||||
&.details
|
||||
background-color rgba(243, 245, 247, .2)
|
||||
color darken(#42b983, 0%)
|
||||
&.danger
|
||||
|
|
|
|||
Loading…
Reference in New Issue