<% if(is_home() || is_category() || is_archive() || is_tag() || page.layout == 'list') { var isPostList = true; } else { var isPostList = false; } var topMetas = (theme.meta && theme.meta.header) || []; if (isPostList) { topMetas = theme.layout.posts.meta || []; } else { topMetas = theme.layout.article.header || []; } if (post.meta && (post.meta.header !== undefined && post.meta.header !== null)) { if (post.meta.header.length) { topMetas = post.meta.header; } else { topMetas = []; } } var bottomMetas = (theme.meta && theme.meta.footer) || []; if (isPostList) { bottomMetas = []; } else { bottomMetas = theme.layout.article.footer || []; } if (post.meta && (post.meta.footer !== undefined && post.meta.footer !== null)) { if (post.meta.footer.length) { bottomMetas = post.meta.footer; } else { bottomMetas = []; } } %> <% if (position == 'header') { %>
<% if (post.music && post.music.enable != false) { %> <%- partial('../_third-party/aplayer', {aplayer_theme: '', aplayer_mini: true, aplayer_mode: 'circulation', aplayer_server: post.music.server, aplayer_type: post.music.type, aplayer_id: post.music.id, aplayer_volume: post.music.volume?post.music.volume:'0.7', aplayer_autoplay: post.music.autoplay?true:false }) %> <% } %> <% if(post.thumbnail && post.thumbnail.length){ %> <% } %>
<% if((topMetas).indexOf('title') > -1){ %> <%- partial('../_meta/' + 'title', {post: post, isPostList: isPostList}) %> <% } %>
<% (topMetas).forEach(function(meta){ %> <% if(meta != 'title'){ %> <%- partial('../_meta/' + meta, {post: post, isPostList: isPostList}) %> <% } %> <% }) %>
<% if ((topMetas).length > 0){ %>
<% } %>
<% } else if (position == 'footer') { %> <% } %>