Skip to content

Commit

Permalink
修复生成静态文件时,每天切换 banner 不生效的问题.
Browse files Browse the repository at this point in the history
  • Loading branch information
blinkfox committed May 28, 2020
1 parent 3b5371e commit c55ea61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layout/_partial/bg-cover-content.ejs
Expand Up @@ -34,7 +34,8 @@
<% if (theme.banner.enable) { %>
<script>
// 每天切换 banner 图. Switch banner image every day.
$('.bg-cover').css('background-image', 'url(<%- theme.jsDelivr.url %><%- url_for('/medias/banner/' + new Date().getDay() + '.jpg') %>)');
var bannerUrl = "<%- theme.jsDelivr.url %><%- url_for('/medias/banner/') %>" + new Date().getDay() + '.jpg';
$('.bg-cover').css('background-image', 'url(' + bannerUrl + ')');
</script>
<% } else { %>
<script>
Expand Down

0 comments on commit c55ea61

Please sign in to comment.