Forked from https://github.com/emallson/hexo-theme-tufte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
555 B
21 lines
555 B
hexo.extend.tag.register('audio', function(args) {
|
|
const file = args[0];
|
|
const title = args[1];
|
|
const date = args[2];
|
|
const desc = args[3];
|
|
return `
|
|
<div>
|
|
<h3>${title}</h3>
|
|
<span style="display:block;margin:0.66em 0;">${date}</span>
|
|
<figure>
|
|
<figcaption>${desc}</figcaption>
|
|
<audio style="display:block;width:100%;border-radius:6px;"
|
|
preload="metadata"
|
|
controls
|
|
src="${file}"
|
|
>
|
|
Your browser does not support the <code>audio</code> element.
|
|
</audio>
|
|
</figure>
|
|
</div>`;
|
|
}, {ends: false});
|