30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
<%
|
|
function layoutDiv() {
|
|
var el = '';
|
|
el += '<div id="utterances"';
|
|
let utterances = Object.assign({}, theme.comments.utterances, page.utterances);
|
|
if (page.comment_id) {
|
|
utterances['issue-term'] = page.comment_id;
|
|
}
|
|
if (page.dark && utterances.theme.dark) {
|
|
utterances.theme = utterances.theme.dark;
|
|
} else if (utterances.theme.light) {
|
|
utterances.theme = utterances.theme.light;
|
|
}
|
|
if (utterances['issue-number']) {
|
|
utterances['issue-term'] = null;
|
|
}
|
|
for (let key of Object.keys(utterances)) {
|
|
if (utterances[key]) {
|
|
el += ' ' + key + '="' + utterances[key] + '"';
|
|
}
|
|
}
|
|
el += '></div>';
|
|
return el;
|
|
}
|
|
%>
|
|
|
|
<svg class="loading" style="vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2709"><path d="M832 512c0-176-144-320-320-320V128c211.2 0 384 172.8 384 384h-64zM192 512c0 176 144 320 320 320v64C300.8 896 128 723.2 128 512h64z" p-id="2710"></path></svg>
|
|
|
|
<%- layoutDiv() %>
|