hexo-theme-stellar/layout/_partial/main/article/references.ejs

24 lines
660 B
Plaintext
Raw Normal View History

2021-02-19 23:33:19 +08:00
<%
function layoutDiv() {
if (page.references && page.references.length > 0) {
let wrapper = '';
wrapper += '<div class="references-wrap">';
wrapper += '<section class="header">';
wrapper += '<span>' + __('meta.references') + '</span>';
wrapper += '</section>';
wrapper += '<section class="body"><ul>';
page.references.forEach((item, i) => {
wrapper += '<li class="post-title">';
wrapper += '<a href="' + item.url + '">';
wrapper += item.title;
wrapper += '</a>';
wrapper += '</li>';
});
wrapper += '</ul></section>';
wrapper += '</div>';
return wrapper;
}
}
%>
<%- layoutDiv(); %>