43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
<%
|
|
function layoutDiv() {
|
|
var el = '';
|
|
var repo;
|
|
var branch = 'main';
|
|
if (page.repo) {
|
|
repo = page.repo
|
|
} else if (theme.wiki.tree[page.wiki]?.repo) {
|
|
const proj = theme.wiki.tree[page.wiki]
|
|
repo = proj.repo
|
|
if (proj.branch != undefined) {
|
|
branch = proj.branch
|
|
}
|
|
}
|
|
if (repo == undefined) {
|
|
return el;
|
|
}
|
|
item.api = theme.api_host.ghapi + '/repos/' + repo + '/issues?per_page=' + item.limit;
|
|
if (item.labels) {
|
|
item.api += '&labels=' + item.labels;
|
|
}
|
|
el += `<widget class="widget-wrapper${scrollreveal(' ')} timeline">`
|
|
if (item.title) {
|
|
el += '<div class="widget-header dis-select">';
|
|
el += '<span class="name">' + item.title + '</span>';
|
|
el += '</div>';
|
|
}
|
|
el += '<div class="widget-body fs14">';
|
|
el += '<div class="tag-plugin timeline stellar-timeline-api"';
|
|
['api', 'user'].forEach(key => {
|
|
if (item[key]) {
|
|
el += ' ' + key + '="' + item[key] + '"';
|
|
}
|
|
});
|
|
el += '>';
|
|
el += '</div>';
|
|
el += '</div>';
|
|
el += '</widget>';
|
|
return el;
|
|
}
|
|
%>
|
|
<%- layoutDiv() %>
|