parent
02f9c9796f
commit
9924653eff
3 changed files with 0 additions and 67 deletions
@ -1,27 +0,0 @@ |
|||||||
const url_for = require('hexo-util').url_for.bind(hexo); |
|
||||||
|
|
||||||
function gallery(args, content) { |
|
||||||
return `<div class="justified-gallery">${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
|
|
||||||
</div>`; |
|
||||||
} |
|
||||||
|
|
||||||
function galleryGroup(args){ |
|
||||||
const name = args[0] |
|
||||||
const desrc = args[1] |
|
||||||
const url = url_for(args[2]) |
|
||||||
const img = url_for(args[3]) |
|
||||||
|
|
||||||
return ` |
|
||||||
<figure class="gallery-group"> |
|
||||||
<img class="gallery-group-img" src='${img}'> |
|
||||||
<figcaption> |
|
||||||
<div class="gallery-group-name">${name}</div> |
|
||||||
<p>${desrc}</p> |
|
||||||
<a href='${url}'></a> |
|
||||||
</figcaption> |
|
||||||
</figure> |
|
||||||
` |
|
||||||
} |
|
||||||
|
|
||||||
hexo.extend.tag.register('gallery', gallery, {ends: true}); |
|
||||||
hexo.extend.tag.register('galleryGroup', galleryGroup); |
|
@ -1,33 +0,0 @@ |
|||||||
|
|
||||||
/** |
|
||||||
* {% hideInline content,display,bg,color %} |
|
||||||
* content不能包含當引號,可用 ' |
|
||||||
*/ |
|
||||||
function hideInline(args) { |
|
||||||
args = args.join(' ').split(',') |
|
||||||
let content = args[0].trim() |
|
||||||
let display = args[1] || 'Click' |
|
||||||
let bg = args[2] ==='' || typeof args[2] ==='undefined' ? '' : `background-color:${args[2]}` |
|
||||||
let color = args[3] || '#fff' |
|
||||||
return `<span class="hide-inline"><a class="hide-button button--primary button--animated" style="color:${color};${bg}">${display} |
|
||||||
</a><span class="hide-content">${content}</span></span>` |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* {% hideBlock display,bg,color %} |
|
||||||
* content |
|
||||||
* {% endhideBlock %} |
|
||||||
*/ |
|
||||||
function hideBlock(args,content) { |
|
||||||
args = args.join(' ').split(',') |
|
||||||
let display = args[0] || 'Click' |
|
||||||
let bg = args[1] ==='' || typeof args[2] ==='undefined' ? '' : `background-color:${args[2]}` |
|
||||||
let color = args[2] || '#fff' |
|
||||||
|
|
||||||
return `<div class="hide-block"><a class="hide-button button--primary button--animated" style="color:${color};${bg}">${display} |
|
||||||
</a><span class="hide-content">${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}</span></div>` |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
hexo.extend.tag.register('hideInline', hideInline); |
|
||||||
hexo.extend.tag.register('hideBlock', hideBlock, {ends: true}); |
|
@ -1,7 +0,0 @@ |
|||||||
function mermaid(args, content) { |
|
||||||
return `<div class="mermaid">
|
|
||||||
${content} |
|
||||||
</div>`; |
|
||||||
} |
|
||||||
|
|
||||||
hexo.extend.tag.register('mermaid', mermaid, {ends: true}); |
|
Loading…
Reference in new issue