This commit is contained in:
Jerry
2025-02-16 20:38:17 +08:00
Unverified
parent 1f3ea55890
commit f605e6dc89
210 changed files with 16126 additions and 16118 deletions

View File

@@ -1,21 +1,21 @@
/**
* Button
* {% btn url text icon option %}
* option: color outline center block larger
* color : default/blue/pink/red/purple/orange/green
*/
'use strict'
const urlFor = require('hexo-util').url_for.bind(hexo)
const btn = args => {
const [url = '', text = '', icon = '', option = ''] = args.join(' ').split(',').map(arg => arg.trim())
const iconHTML = icon ? `<i class="${icon}"></i>` : ''
const textHTML = text ? `<span>${text}</span>` : ''
return `<a class="btn-beautify ${option}" href="${urlFor(url)}" title="${text}">${iconHTML}${textHTML}</a>`
}
hexo.extend.tag.register('btn', btn, { ends: false })
/**
* Button
* {% btn url text icon option %}
* option: color outline center block larger
* color : default/blue/pink/red/purple/orange/green
*/
'use strict'
const urlFor = require('hexo-util').url_for.bind(hexo)
const btn = args => {
const [url = '', text = '', icon = '', option = ''] = args.join(' ').split(',').map(arg => arg.trim())
const iconHTML = icon ? `<i class="${icon}"></i>` : ''
const textHTML = text ? `<span>${text}</span>` : ''
return `<a class="btn-beautify ${option}" href="${urlFor(url)}" title="${text}">${iconHTML}${textHTML}</a>`
}
hexo.extend.tag.register('btn', btn, { ends: false })