mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:10:53 +08:00
first commit
This commit is contained in:
16
scripts/gallery-tag.js
Normal file
16
scripts/gallery-tag.js
Normal file
@@ -0,0 +1,16 @@
|
||||
hexo.extend.tag.register('gallery', args => {
|
||||
const url = args[0]
|
||||
const title = args[1] || 'No title'
|
||||
return `
|
||||
<div
|
||||
class="gallery-item"
|
||||
style="background-image: url('${url}')"
|
||||
data-title="${title}"
|
||||
data-url="${url}"
|
||||
>
|
||||
<div class="gallery-item__title">
|
||||
${title}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
Reference in New Issue
Block a user