hexo-theme-stellar/layout/_partial/widgets/timeline.ejs

28 lines
720 B
Plaintext
Raw Normal View History

2022-10-23 18:27:14 +08:00
<%
function layoutDiv() {
var el = '';
if (item.api == undefined) {
return el;
}
2024-01-19 01:05:44 +08:00
el += `<widget class="widget-wrapper${scrollreveal(' ')} timeline">`
2022-10-23 18:27:14 +08:00
if (item.title) {
2024-01-17 22:57:52 +08:00
el += '<div class="widget-header dis-select">';
2022-10-23 18:27:14 +08:00
el += '<span class="name">' + item.title + '</span>';
el += '</div>';
}
el += '<div class="widget-body fs14">';
2024-02-18 12:33:28 +08:00
el += `<div class="tag-plugin timeline ds-${(item.type || 'timeline')}"`;
2022-10-30 21:23:26 +08:00
['api', 'user', 'hide', 'limit'].forEach(key => {
2022-10-23 18:27:14 +08:00
if (item[key]) {
el += ' ' + key + '="' + item[key] + '"';
}
});
el += '>';
el += '</div>';
el += '</div>';
2022-11-23 21:54:21 +08:00
el += '</widget>';
2022-10-23 18:27:14 +08:00
return el;
}
%>
<%- layoutDiv() %>