hexo-theme-stellar/layout/_partial/plugins/comments/giscus/layout.ejs

23 lines
447 B
Plaintext
Raw Normal View History

2022-08-28 19:54:34 +08:00
<%
function layoutDiv() {
var el = '';
2022-11-14 00:28:48 +08:00
const cmt = page.cmt;
if (cmt && cmt.service && (cmt.service.length > 0)) {
const name = cmt.service;
const body = cmt[name];
el += '<div id="' + name + '"';
for (let key of Object.keys(body)) {
if (body[key] !== null) {
el += ' ' + key + '="' + body[key] + '"';
}
2022-08-28 19:54:34 +08:00
}
2022-11-14 00:28:48 +08:00
el += '></div>';
2022-08-28 19:54:34 +08:00
}
return el;
}
%>
2024-01-19 13:51:55 +08:00
<%- icon('default:loading') %>
2022-08-28 19:54:34 +08:00
<%- layoutDiv() %>