first commit
This commit is contained in:
18
layout/_partial/post/albums.ejs
Normal file
18
layout/_partial/post/albums.ejs
Normal file
@@ -0,0 +1,18 @@
|
||||
<% if (post.albums && post.albums.length){ %>
|
||||
<div class="article-albums">
|
||||
<ul class="article-albums-photos" id="basicExample">
|
||||
<% post.albums.forEach(function(photo){ %>
|
||||
|
||||
<li class="article-albums-item" data-scroll-reveal>
|
||||
<a class="article-albums-img fancybox" data-fancybox="images" data-caption="<%- photo[1] %>" href="<%- url_for(photo[0]) %>" rel="gallery_<%= post._id %>" title="<%- photo[1] %>">
|
||||
<img class="lazy" data-original="<%- url_for(photo[0]) %>" itemprop="image" alt="<%- photo[1] %>">
|
||||
</a>
|
||||
<% if (photo && photo.length > 1){ %>
|
||||
<span class="article-albums-caption"> <%- photo[1] %> </span>
|
||||
<% } %>
|
||||
</li>
|
||||
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } %>
|
9
layout/_partial/post/busuanzi.ejs
Normal file
9
layout/_partial/post/busuanzi.ejs
Normal file
@@ -0,0 +1,9 @@
|
||||
<ul class="list-inline">
|
||||
<% if (is_home()) { %>
|
||||
<li>PV:<span id="busuanzi_value_site_pv"></span></li>
|
||||
<%} %>
|
||||
<li>UV:<span id="busuanzi_value_site_uv"></span></li>
|
||||
<% if (is_post()) { %>
|
||||
<li>PV:<span id="busuanzi_value_page_pv"></span></li>
|
||||
<%} %>
|
||||
</ul>
|
10
layout/_partial/post/category.ejs
Normal file
10
layout/_partial/post/category.ejs
Normal file
@@ -0,0 +1,10 @@
|
||||
<% if (post.categories && post.categories.length){ %>
|
||||
<div class="article-category">
|
||||
<%- list_categories(post.categories, {
|
||||
show_count: false,
|
||||
class: 'article-category',
|
||||
style: 'none',
|
||||
separator: ' / '
|
||||
}) %>
|
||||
</div>
|
||||
<% } %>
|
3
layout/_partial/post/date.ejs
Normal file
3
layout/_partial/post/date.ejs
Normal file
@@ -0,0 +1,3 @@
|
||||
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
|
||||
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
|
||||
</a>
|
15
layout/_partial/post/gallery.ejs
Normal file
15
layout/_partial/post/gallery.ejs
Normal file
@@ -0,0 +1,15 @@
|
||||
<% if (post.photos && post.photos.length){ %>
|
||||
<div class="article-gallery">
|
||||
<div class="article-gallery-photos">
|
||||
<% post.photos.forEach(function(photo, i){ %>
|
||||
<% if (index){ %>
|
||||
<a class="article-gallery-img" href="<%- url_for(post.path) %>" rel="gallery_<%= post._id %>">
|
||||
<img src="<%- url_for(photo) %>" itemprop="image">
|
||||
</a>
|
||||
<% } else { %>
|
||||
<img src="<%- url_for(photo) %>" itemprop="image">
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
21
layout/_partial/post/gitalk.ejs
Normal file
21
layout/_partial/post/gitalk.ejs
Normal file
@@ -0,0 +1,21 @@
|
||||
<% if (theme.gitalk.enable) { %>
|
||||
<div class="gitalk" id="gitalk-container"></div>
|
||||
<%- css('https://unpkg.com/gitalk/dist/gitalk.css') %>
|
||||
<%- js('https://unpkg.com/gitalk/dist/gitalk.min.js') %>
|
||||
<%- js('https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js') %>
|
||||
<script type="text/javascript">
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '<%- theme.gitalk.clientID %>',
|
||||
clientSecret: '<%- theme.gitalk.clientSecret %>',
|
||||
repo: '<%- theme.gitalk.repo %>',
|
||||
owner: '<%- theme.gitalk.owner %>',
|
||||
admin: ['<%- theme.gitalk.admin %>'],
|
||||
// id: location.pathname, // Ensure uniqueness and length less than 50
|
||||
id: md5(location.pathname),
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
pagerDirection: 'last'
|
||||
})
|
||||
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<% } %>
|
12
layout/_partial/post/justifiedGallery.ejs
Normal file
12
layout/_partial/post/justifiedGallery.ejs
Normal file
@@ -0,0 +1,12 @@
|
||||
<% if (post.albums && post.albums.length){ %>
|
||||
<div class="justified-gallery" id="gallery">
|
||||
<% post.albums.forEach(function(photo){ %>
|
||||
<div>
|
||||
<a class="fancybox" data-fancybox="images" data-caption="<%- photo[1] %>" href="<%- url_for(photo[0]) %>" rel="gallery_<%= post._id %>" title="<%- photo[1] %>">
|
||||
<img src="<%- url_for(photo[0]) %>" itemprop="image" alt="<%- photo[1] %>">
|
||||
</a>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
22
layout/_partial/post/nav.ejs
Normal file
22
layout/_partial/post/nav.ejs
Normal file
@@ -0,0 +1,22 @@
|
||||
<% if (post.prev || post.next){ %>
|
||||
<nav class="article-nav">
|
||||
<% if (post.prev){ %>
|
||||
<a href="<%- url_for(post.prev.path) %>" class="article-nav-link">
|
||||
<strong class="article-nav-caption"><%- theme.nav_text.post_prev %></strong>
|
||||
<div class="article-nav-title">
|
||||
<% if (post.prev.title){ %>
|
||||
<%= post.prev.title %>
|
||||
<% } else { %>
|
||||
(no title)
|
||||
<% } %>
|
||||
</div>
|
||||
</a>
|
||||
<% } %>
|
||||
<% if (post.next){ %>
|
||||
<a href="<%- url_for(post.next.path) %>" class="article-nav-link">
|
||||
<strong class="article-nav-caption"><%- theme.nav_text.post_next %></strong>
|
||||
<div class="article-nav-title"><%= post.next.title %></div>
|
||||
</a>
|
||||
<% } %>
|
||||
</nav>
|
||||
<% } %>
|
4
layout/_partial/post/search.ejs
Normal file
4
layout/_partial/post/search.ejs
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="local-search local-search-plugin">
|
||||
<input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
|
||||
<div id="local-search-result" class="local-search-result"></div>
|
||||
</div>
|
6
layout/_partial/post/tag.ejs
Normal file
6
layout/_partial/post/tag.ejs
Normal file
@@ -0,0 +1,6 @@
|
||||
<% if (post.tags && post.tags.length){ %>
|
||||
<%- list_tags(post.tags, {
|
||||
show_count: false,
|
||||
class: 'article-tag'
|
||||
}) %>
|
||||
<% } %>
|
17
layout/_partial/post/title.ejs
Normal file
17
layout/_partial/post/title.ejs
Normal file
@@ -0,0 +1,17 @@
|
||||
<% if (post.link){ %>
|
||||
<h2 itemprop="name">
|
||||
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" itemprop="url"
|
||||
><%= post.title %></a
|
||||
>
|
||||
</h2>
|
||||
<% } else if (post.title){ %> <% if (index){ %>
|
||||
<h2 itemprop="name">
|
||||
<a class="<%= class_name %>" href="<%- url_for(post.path) %>"
|
||||
><%= post.title %></a
|
||||
>
|
||||
</h2>
|
||||
<% } else { %>
|
||||
<h1 class="<%= class_name %> sea-center" style="border-left:0" itemprop="name">
|
||||
<%= post.title %>
|
||||
</h1>
|
||||
<% } %> <%- partial('topping') %> <% } %>
|
6
layout/_partial/post/tocbot.ejs
Normal file
6
layout/_partial/post/tocbot.ejs
Normal file
@@ -0,0 +1,6 @@
|
||||
<% if (post.toc != false && toc(page.content).length!==0){ %>
|
||||
<div class="tocbot"></div>
|
||||
<% } %>
|
||||
|
||||
|
||||
|
5
layout/_partial/post/topping.ejs
Normal file
5
layout/_partial/post/topping.ejs
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if (is_home() && post.top) { %>
|
||||
<div class="article-topping">
|
||||
<i class="ri-umbrella-line"></i>
|
||||
</div>
|
||||
<% } %>
|
51
layout/_partial/post/valine.ejs
Normal file
51
layout/_partial/post/valine.ejs
Normal file
@@ -0,0 +1,51 @@
|
||||
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
||||
<!-- valine评论 -->
|
||||
<div id="vcomments-box">
|
||||
<div id="vcomments">
|
||||
</div>
|
||||
</div>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src='//unpkg.com/valine@1.3.10/dist/Valine.min.js'></script>
|
||||
<script>
|
||||
new Valine({
|
||||
el: '#vcomments',
|
||||
notify: false,
|
||||
verify: false,
|
||||
app_id: '<%- theme.leancloud.app_id %>',
|
||||
app_key: '<%- theme.leancloud.app_key %>',
|
||||
path: window.location.pathname,
|
||||
avatar: '<%- theme.valine.avatar %>',
|
||||
placeholder: '<%- theme.valine.placeholder %>',
|
||||
recordIP: true
|
||||
});
|
||||
const infoEle = document.querySelector('#vcomments .info');
|
||||
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
|
||||
infoEle.childNodes.forEach(function (item) {
|
||||
item.parentNode.removeChild(item);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#vcomments-box {
|
||||
padding: 5px 30px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
#vcomments-box {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
#vcomments-box #vcomments {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.v .vlist .vcard .vh {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.v .vlist .vcard {
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
Reference in New Issue
Block a user