parent
41eee56056
commit
7bd612de61
21 changed files with 147 additions and 128 deletions
@ -0,0 +1,13 @@ |
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css"> |
||||
<div class="aplayer" |
||||
data-theme="<%- aplayer_theme %>" |
||||
<%if(aplayer_mini){%>data-mini=true <%}%> |
||||
<%if(aplayer_autoplay){%>data-autoplay=true <%}%> |
||||
data-mode="<%- aplayer_mode %>" |
||||
data-server="<%= aplayer_server %>" |
||||
data-type="<%= aplayer_type %>" |
||||
data-id="<%= aplayer_id %>" |
||||
data-volume="<%= aplayer_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> |
@ -1,24 +1,29 @@ |
||||
<% if(item.avatar) { %> |
||||
<div class='avatar'> |
||||
<img class='avatar' src='<%- url_for(item.avatar) %>'/> |
||||
</div> |
||||
<%} %> |
||||
<% if (item.title || item.body) { %> |
||||
<div class='text'> |
||||
<% if (item.title){ %> |
||||
<h2><%- item.title %></h2> |
||||
<section class='<%- item.widget %>'> |
||||
<div class='content <%= theme.style %>'> |
||||
<% if(item.avatar) { %> |
||||
<div class='avatar'> |
||||
<img class='avatar' src='<%- url_for(item.avatar) %>'/> |
||||
</div> |
||||
<%} %> |
||||
<% if (item.title || item.body) { %> |
||||
<div class='text'> |
||||
<% if (item.title){ %> |
||||
<h2><%- item.title %></h2> |
||||
<% } %> |
||||
<% if (item.body){ %> |
||||
<%- markdown(item.body) %> |
||||
<% } %> |
||||
</div> |
||||
<% } %> |
||||
<% if (item.body){ %> |
||||
<%- markdown(item.body) %> |
||||
<% if (item.social == true && config.social) { %> |
||||
<div class="social-wrapper"> |
||||
<% (config.social||[]).forEach(function(value){ %> |
||||
<% if (value.url && value.icon) { %> |
||||
<a href="<%- url_for(value.url) %>" class="social flat-btn" target="_blank" rel="external"><i class="social <%- value.icon %>" aria-hidden="true"></i></a> |
||||
<%}%> |
||||
<%})%> |
||||
</div> |
||||
<% } %> |
||||
</div> |
||||
<% } %> |
||||
<% if (item.social == true && config.social) { %> |
||||
<div class="social-wrapper"> |
||||
<% (config.social||[]).forEach(function(value){ %> |
||||
<% if (value.url && value.icon) { %> |
||||
<a href="<%- url_for(value.url) %>" class="social flat-btn" target="_blank" rel="external"><i class="social <%- value.icon %>" aria-hidden="true"></i></a> |
||||
<%}%> |
||||
<%})%> |
||||
</div> |
||||
<% } %> |
||||
|
||||
</section> |
||||
|
@ -1,7 +1,12 @@ |
||||
<% if (site.categories.length){ %> |
||||
<ul class="entry"> |
||||
<% site.categories.sort('name').each(function(category){ %> |
||||
<li><a class="flat-box" title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"><div class='name'><%- category.name %></div><div class='badge'>(共<%- category.posts.length %>篇)</div></a></li> |
||||
<% }) %> |
||||
</ul> |
||||
<section class='<%- item.widget %>'> |
||||
<%- partial('header', {item: item, defIcon: theme.widgets.category.icon, defTitle: theme.widgets.category.title}) %> |
||||
<div class='content <%= theme.style %>'> |
||||
<ul class="entry"> |
||||
<% site.categories.sort('name').each(function(category){ %> |
||||
<li><a class="flat-box" title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"><div class='name'><%- category.name %></div><div class='badge'>(共<%- category.posts.length %>篇)</div></a></li> |
||||
<% }) %> |
||||
</ul> |
||||
</div> |
||||
</section> |
||||
<% } %> |
||||
|
@ -0,0 +1,16 @@ |
||||
<% |
||||
let icon = item.icon ? item.icon : defIcon; |
||||
let title = item.title ? item.title : defTitle; |
||||
%> |
||||
<header class='<%= theme.style %>'> |
||||
<div><i class="<%- icon %> fa-fw" aria-hidden="true"></i> <%- title %></div> |
||||
<% if (item.widget == 'toc') { %> |
||||
<div class='wrapper'><a class="s-toc rightBtn" title="固定到顶部" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div> |
||||
<% } else if(item.more && item.more.url) { %> |
||||
<a class="rightBtn<%- item.more.animate ? ' ' + item.more.animate : '' %>" target="_blank" |
||||
rel="external nofollow noopener noreferrer" |
||||
href="<%- url_for(item.more.url) %>" |
||||
title="<%- item.more.url %>"> |
||||
<i class="<%- item.more.icon?item.more.icon:'fas fa-question-circle' %> fa-fw"></i></a> |
||||
<% } %> |
||||
</header> |
@ -1,19 +1,24 @@ |
||||
<ul class="entry"> |
||||
<% (item.rows||[]).forEach(function(row){ %> |
||||
<li><a class="flat-box" title="<%- row.url %>" href="<%= url_for(row.url) %>"> |
||||
<div class='name'> |
||||
<% if(row.img) { %> |
||||
<img src="<%- row.img %>"> |
||||
<% } else if(row.avatar) { %> |
||||
<img src="<%- row.avatar %>" id="round"> |
||||
<% } else { %> |
||||
<i class="<%= row.icon %>" aria-hidden="true"></i> |
||||
<% } %> |
||||
<%- row.name %> |
||||
</div> |
||||
<% if(row.desc) { %> |
||||
<div class='badge'>(<%- row.desc %>)</div> |
||||
<% } %> |
||||
</a></li> |
||||
<% }) %> |
||||
</ul> |
||||
<section class='<%- item.widget %>'> |
||||
<%- partial('header', {item: item, defIcon: '', defTitle: ''}) %> |
||||
<div class='content <%= theme.style %>'> |
||||
<ul class="entry"> |
||||
<% (item.rows||[]).forEach(function(row){ %> |
||||
<li><a class="flat-box" title="<%- row.url %>" href="<%= url_for(row.url) %>"> |
||||
<div class='name'> |
||||
<% if(row.img) { %> |
||||
<img src="<%- row.img %>"> |
||||
<% } else if(row.avatar) { %> |
||||
<img src="<%- row.avatar %>" id="round"> |
||||
<% } else { %> |
||||
<i class="<%= row.icon %>" aria-hidden="true"></i> |
||||
<% } %> |
||||
<%- row.name %> |
||||
</div> |
||||
<% if(row.desc) { %> |
||||
<div class='badge'>(<%- row.desc %>)</div> |
||||
<% } %> |
||||
</a></li> |
||||
<% }) %> |
||||
</ul> |
||||
</div> |
||||
</section> |
||||
|
@ -1 +1,6 @@ |
||||
<%- markdown(item.body) %> |
||||
<section class='<%- item.widget?item.widget:'plain' %>'> |
||||
<%- partial('header', {item: item, defIcon: '', defTitle: ''}) %> |
||||
<div class='content <%= theme.style %>'> |
||||
<%- markdown(item.body) %> |
||||
</div> |
||||
</section> |
||||
|
@ -1,7 +1,14 @@ |
||||
<%- tagcloud(site.tags, { |
||||
min_font: 14, |
||||
max_font: 24, |
||||
color: true, |
||||
start_color: '#999', |
||||
end_color: '#555', |
||||
}) %> |
||||
<% if (site.tags.length){ %> |
||||
<section class='<%- item.widget %>'> |
||||
<%- partial('header', {item: item, defIcon: theme.widgets.tagcloud.icon, defTitle: theme.widgets.tagcloud.title}) %> |
||||
<div class='content <%= theme.style %>'> |
||||
<%- tagcloud(site.tags, { |
||||
min_font: 14, |
||||
max_font: 24, |
||||
color: true, |
||||
start_color: '#999', |
||||
end_color: '#555', |
||||
}) %> |
||||
</div> |
||||
</section> |
||||
<% } %> |
||||
|
@ -1,5 +1,8 @@ |
||||
<% if(page.layout == 'post' && page.content && page.toc!==false && toc(page.content).length > 0){ %> |
||||
<div class='content <%= theme.style %>'> |
||||
<%- toc(page.content, {list_number: false}) %> |
||||
</div> |
||||
<section class='toc-wrapper'> |
||||
<%- partial('header', {item: item, defIcon: theme.widgets.toc.icon, defTitle: theme.widgets.toc.title}) %> |
||||
<div class='content <%= theme.style %>'> |
||||
<%- toc(page.content, {list_number: false}) %> |
||||
</div> |
||||
</section> |
||||
<% } %> |
||||
|
Loading…
Reference in new issue