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.
|
|
|
<%
|
|
|
|
var needDisplay = false;
|
|
|
|
if (theme.widgets.music && theme.widgets.music.display) {
|
|
|
|
let display = theme.widgets.music.display;
|
|
|
|
if (page.layout == 'page') {
|
|
|
|
if (display.page != false) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else if (page.layout == 'post') {
|
|
|
|
if (display.post != false && (!page.music || page.music.enable == false)) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else if (page.layout == 'links') {
|
|
|
|
if (display.links != false) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (is_home()) {
|
|
|
|
if (display.home != false) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else if (is_tag()) {
|
|
|
|
if (display.tag != false) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else if (is_category()) {
|
|
|
|
if (display.category != false) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else if (is_archive()) {
|
|
|
|
if (display.archive != false) {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
needDisplay = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
|
|
|
|
<% if (needDisplay == true) { %>
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
|
|
|
|
<div class="aplayer" data-theme="<%= item.color %>"
|
|
|
|
data-mode="<%= item.mode %>"
|
|
|
|
data-server="<%= item.server %>"
|
|
|
|
data-type="<%= item.type %>"
|
|
|
|
data-id="<%= item.id %>"
|
|
|
|
data-volume="<%= item.volume %>">
|
|
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>
|
|
|
|
<% } %>
|