You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
925 B

5 years ago
<aside class='l_side'>
4 years ago
<% if (page.sidebar) { %>
<% page.sidebar.forEach(function(widget_id){ %>
<% theme.widget.forEach(function(widget){ %>
<% if (widget.id == widget_id){ %>
<%- partial('../_widget/' + widget.class, {item: widget}) %>
<% } %>
<% }) %>
<% }) %>
<% } else { %>
5 years ago
<%
4 years ago
var ids = [];
if(is_home() || is_category() || is_archive() || is_tag() || page.layout == 'list') {
var isPostList = true;
} else {
var isPostList = false;
}
if (isPostList) {
4 years ago
ids = theme.layout.on_list.sidebar;
4 years ago
} else {
4 years ago
ids = theme.layout.on_page.sidebar;
4 years ago
}
5 years ago
%>
4 years ago
<% ids.forEach(function(widget_id){ %>
<% theme.widget.forEach(function(widget){ %>
<% if (widget.id == widget_id){ %>
<%- partial('../_widget/' + widget.class, {item: widget}) %>
<% } %>
5 years ago
<% }) %>
4 years ago
<% }) %>
5 years ago
<% } %>
</aside>