[opt] ablock -> box

This commit is contained in:
xaoxuu 2023-12-22 10:29:45 +08:00
parent 29bd21d164
commit 9e1fca5c12
5 changed files with 15 additions and 12 deletions

View File

@ -215,7 +215,7 @@ footer:
######## Tag Plugins ########
tag_plugins:
# {% ablock %} / {% note %}
# {% box %} / {% note %}
note:
default_color: '' # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error
border: true # true / false
@ -393,7 +393,7 @@ plugins:
style:
darkmode: auto # auto / always / false
smooth_scroll: true # true / false
smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位
font-size:
root: 16px
body: .9375rem # 15px

View File

@ -4,7 +4,7 @@
// container
hexo.extend.tag.register('tabs', require('./lib/tabs')(hexo), true)
hexo.extend.tag.register('ablock', require('./lib/ablock')(hexo), true)
hexo.extend.tag.register('box', require('./lib/box')(hexo), true)
hexo.extend.tag.register('about', require('./lib/about')(hexo), true)
hexo.extend.tag.register('folding', require('./lib/folding')(hexo), true)
hexo.extend.tag.register('folders', require('./lib/folders')(hexo), true)

View File

@ -1,10 +1,10 @@
/**
* ablock.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
* box.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
* 格式与官方标签插件一致使用空格分隔中括号内的是可选参数中括号不需要写出来
*
* {% ablock [color:color] [child:codeblock/tabs] title %}
* {% box [color:color] [child:codeblock/tabs] title %}
* body
* {% endablock %}
* {% endbox %}
*/
'use strict';

View File

@ -78,6 +78,7 @@ p>code:not([class]),li>code:not([class])
.gist-file
border: 1px solid var(--block-border)
border-radius: $border-block
overflow: hidden
.gist-data
border-bottom: 1px solid var(--block-border)
.highlight

View File

@ -12,15 +12,16 @@
position: relative
&:hover
.image-meta
opacity: 1
background: rgba(black, 0.5)
.image-caption
color: white
img
object-fit: cover
height: 100%
max-height: 100%
overflow: hidden
display: block
.image-meta
position: absolute
opacity: 0
z-index: 1
margin: 4px
top: 0
@ -28,17 +29,18 @@
right: 0
bottom: 0
pointer-events: none
background: rgba(black, 0.5)
background: transparent
border-radius: 8px
trans1(opacity)
trans1(background)
display: flex
flex-direction: column
justify-content: flex-end
.image-caption
display: block
font-size: $fs-13
color: white
color: transparent
line-height: 1.2
margin: 4px
trans1(color)
&:empty
display: none