24 lines
602 B
Plaintext
24 lines
602 B
Plaintext
<%
|
|
function layoutDiv() {
|
|
if (!item.content?.length && !item.src?.length) return ''
|
|
var el = '';
|
|
el += '<widget class="widget-wrapper markdown">';
|
|
if (item.title?.length > 0) {
|
|
el += '<div class="widget-header cap dis-select">';
|
|
el += '<span class="name">' + item.title + '</span>';
|
|
el += '</div>';
|
|
}
|
|
el += '<div class="widget-body fs14">';
|
|
if (item.content) {
|
|
el += markdown(item.content);
|
|
}
|
|
if (item.src) {
|
|
el += `<div class="stellar-marked-api md-marked" src="${item.src}"></div>`
|
|
}
|
|
el += '</div>';
|
|
el += '</widget>';
|
|
return el;
|
|
}
|
|
%>
|
|
<%- layoutDiv() %>
|