fix: music

This commit is contained in:
shenyu 2020-02-27 19:47:53 +08:00
parent 836246b4e0
commit 196253f025
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ music:
enable: false enable: false
# 播放器尺寸类型(1小尺寸、2大尺寸) # 播放器尺寸类型(1小尺寸、2大尺寸)
type: 1 type: 1
id: 518895142 # 网易云分享的音乐ID(更换音乐请更改此配置项) id: 22707008 # 网易云分享的音乐ID(更换音乐请更改此配置项)
autoPlay: true # 是否开启自动播放 autoPlay: true # 是否开启自动播放
# 文章配置 # 文章配置
@ -125,7 +125,7 @@ gitalk:
owner: # GitHub ID owner: # GitHub ID
admin: # GitHub ID admin: # GitHub ID
# GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/) # GitHub Ribbons-封面右上角的forkme
github: github:
# (关闭请设置为false) # (关闭请设置为false)
url: https://github.com/Shen-Yu/hexo-theme-ayer url: https://github.com/Shen-Yu/hexo-theme-ayer

View File

@ -3,7 +3,7 @@
<% var defaultHeight = theme.music.type == 1 ? '32' : '66'; %> <% var defaultHeight = theme.music.type == 1 ? '32' : '66'; %>
<% var defaultIframeHeight = theme.music.type == 1 ? '52' : '86'; %> <% var defaultIframeHeight = theme.music.type == 1 ? '52' : '86'; %>
<iframe frameborder="no" border="1" marginwidth="0" marginheight="0" width="200" height="<%=defaultIframeHeight%>" <iframe frameborder="no" border="1" marginwidth="0" marginheight="0" width="200" height="<%=defaultIframeHeight%>"
src="//music.163.com/outchain/player?type=2&id=<%=theme.music.id||518895142%>&auto=<%=theme.music.autoPlay?1:0%>&height=<%=defaultHeight%>"></iframe> src="//music.163.com/outchain/player?type=2&id=<%=theme.music.id||22707008%>&auto=<%=theme.music.autoPlay?1:0%>&height=<%=defaultHeight%>"></iframe>
</div> </div>
<style> <style>