link
This commit is contained in:
parent
07fa734341
commit
d6075f27bd
|
@ -102,9 +102,6 @@ tag_plugins:
|
|||
# {% checkbox %}
|
||||
checkbox:
|
||||
interactive: false # enable interactive for user
|
||||
# {% link url title [img:src] [description] %}
|
||||
link:
|
||||
default_img: https://7.dusays.com/2021/02/20/8f277b4ee0ecd.svg
|
||||
|
||||
|
||||
######## JS Plugins ########
|
||||
|
|
|
@ -24,7 +24,12 @@ hexo.extend.tag.register('link', function(args) {
|
|||
|
||||
// right
|
||||
el += '<div class="right">';
|
||||
el += '<img src="' + (args.img || hexo.theme.config.tag_plugins.link.default_img) + '"/>';
|
||||
if (hexo.theme.config.plugins.lazyload && hexo.theme.config.plugins.lazyload.enable) {
|
||||
el += '<div class="lazy img" data-bg="' + (args.img || hexo.theme.config.default.link) + '"></div>';
|
||||
} else {
|
||||
el += '<div class="lazy img" style="background-image:url("' + (args.img || hexo.theme.config.default.link) + '")"></div>';
|
||||
}
|
||||
|
||||
el += '</div>';
|
||||
|
||||
// end
|
||||
|
|
|
@ -135,3 +135,9 @@ a[onclick]:hover
|
|||
input
|
||||
background: none
|
||||
border: none
|
||||
|
||||
div.lazy.img
|
||||
width: 100%
|
||||
height: 100%
|
||||
background-position: center
|
||||
background-size: cover
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
margin: 0.75rem
|
||||
overflow: hidden
|
||||
flex-shrink: 0
|
||||
img
|
||||
width: 100%
|
||||
height: 100%
|
||||
object-fit: cover
|
||||
div.left
|
||||
overflow: hidden
|
||||
margin-left: 16px
|
||||
|
|
Loading…
Reference in New Issue