feat: advertisement

This commit is contained in:
沈宇
2020-12-31 16:10:38 +08:00
parent bb87ce34fc
commit 240304719d
10 changed files with 88 additions and 28 deletions

9
layout/_partial/ads.ejs Normal file
View File

@@ -0,0 +1,9 @@
<ul class="ads">
<% for (var i in theme.ads){ %>
<li>
<a href="<%= theme.ads[i].url %>">
<img src="<%= theme.ads[i].img %>" width="<%= theme.ads[i].width %>" alt="<%=theme.ads[i].title %>">
</a>
</li>
<% } %>
</ul>

View File

@@ -1,4 +1,7 @@
<section class="outer">
<% if (theme.ads && theme.ads.length != 0){ %>
<%- partial('ads') %>
<% } %>
<% if (theme.broadcast.enable && pagination == 2){ %>
<%- partial('_partial/broadcast') %>
<% } %>