Initial website
This commit is contained in:
1
themes/hueman/layout/archive.ejs
Normal file
1
themes/hueman/layout/archive.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/archive') %>
|
1
themes/hueman/layout/author.ejs
Normal file
1
themes/hueman/layout/author.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/archive') %>
|
1
themes/hueman/layout/category.ejs
Normal file
1
themes/hueman/layout/category.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/archive') %>
|
43
themes/hueman/layout/comment/changyan.ejs
Normal file
43
themes/hueman/layout/comment/changyan.ejs
Normal file
@@ -0,0 +1,43 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
<script id="cy_cmt_num" src="https://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId=<%= theme.comment.changyan.appId %>"></script>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var appid = '<%= theme.comment.changyan.appId %>';
|
||||
var conf = '<%= theme.comment.changyan.appKey %>';
|
||||
var width = window.innerWidth || document.documentElement.clientWidth;
|
||||
if (width < 960) {
|
||||
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>');
|
||||
} else {
|
||||
var loadJs = function(d, a) {
|
||||
var c = document.getElementsByTagName("head")[0] || document.head || document.documentElement;
|
||||
var b = document.createElement("script");
|
||||
b.setAttribute("type", "text/javascript");
|
||||
b.setAttribute("charset", "UTF-8");
|
||||
b.setAttribute("src", d);
|
||||
if (typeof a === "function") {
|
||||
if (window.attachEvent) {
|
||||
b.onreadystatechange = function() {
|
||||
var e = b.readyState;
|
||||
if (e === "loaded" || e === "complete") {
|
||||
b.onreadystatechange = null;
|
||||
a()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
b.onload = a
|
||||
}
|
||||
}
|
||||
c.appendChild(b)
|
||||
};
|
||||
loadJs("https://changyan.sohu.com/upload/changyan.js", function() {
|
||||
window.changyan.api.config({
|
||||
appid: appid,
|
||||
conf: conf
|
||||
})
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<% } else { %>
|
||||
<div id="SOHUCS" sid="<%= page.permalink %>"></div>
|
||||
<% } %>
|
16
themes/hueman/layout/comment/counter.ejs
Normal file
16
themes/hueman/layout/comment/counter.ejs
Normal file
@@ -0,0 +1,16 @@
|
||||
<% if (post.comments) { %>
|
||||
<span class="comment-counter">
|
||||
<i class="fa fa-comments-o"></i>
|
||||
<% if (theme.comment.disqus) { %>
|
||||
<span class="disqus-comment-count" data-disqus-identifier="<%= post.disqusId || '' %>" data-disqus-url="<%= post.permalink %>">0</span>
|
||||
<% } else if (theme.comment.duoshuo) { %>
|
||||
<span class="ds-thread-count" data-thread-key="<%= post.path %>">0</span>
|
||||
<% } else if (theme.comment.isso) { %>
|
||||
<span><a href="<%= post.permalink %>#isso-thread"></a></span>
|
||||
<% } else if (theme.comment.facebook) { %>
|
||||
<span class="fb-comments-count" data-href="<%= post.permalink %>">0</span>
|
||||
<% } else if (theme.comment.changyan.on) { %>
|
||||
<span class="cy_cmt_count" id="sourceId::<%= post.permalink %>">0</span>
|
||||
<% } %>
|
||||
</span>
|
||||
<% } %>
|
22
themes/hueman/layout/comment/disqus.ejs
Normal file
22
themes/hueman/layout/comment/disqus.ejs
Normal file
@@ -0,0 +1,22 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
<script>
|
||||
var disqus_shortname = '<%= theme.comment.disqus %>';
|
||||
<% if (page.disqusId) { %>
|
||||
var disqus_identifier = '<%= page.disqusId || page.slug %>';
|
||||
<% } %>
|
||||
<% if (page.permalink) { %>
|
||||
var disqus_url = '<%= page.permalink %>';
|
||||
<% } %>
|
||||
(function() {
|
||||
var dsq = document.createElement('script');
|
||||
dsq.type = 'text/javascript';
|
||||
dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<% } else { %>
|
||||
<div id="disqus_thread">
|
||||
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
</div>
|
||||
<% } %>
|
52
themes/hueman/layout/comment/duoshuo.ejs
Normal file
52
themes/hueman/layout/comment/duoshuo.ejs
Normal file
@@ -0,0 +1,52 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
<script type="text/javascript">
|
||||
var duoshuoQuery = {short_name:'<%= theme.comment.duoshuo %>'};
|
||||
(function() {
|
||||
var ds = document.createElement('script');
|
||||
ds.type = 'text/javascript';ds.async = true;
|
||||
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
|
||||
ds.charset = 'UTF-8';
|
||||
(document.getElementsByTagName('head')[0]
|
||||
|| document.getElementsByTagName('body')[0]).appendChild(ds);
|
||||
})();
|
||||
</script>
|
||||
<% } else { %>
|
||||
<div class="ds-thread" data-thread-key="<%= post.path %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div>
|
||||
<style>
|
||||
#ds-thread #ds-reset .ds-textarea-wrapper {
|
||||
background: none;
|
||||
}
|
||||
#ds-reset .ds-avatar img {
|
||||
box-shadow: none;
|
||||
}
|
||||
#ds-reset .ds-gradient-bg {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
#ds-thread #ds-reset li.ds-tab a {
|
||||
border-radius: 3px;
|
||||
}
|
||||
#ds-thread #ds-reset .ds-post-button {
|
||||
color: white;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: #d32;
|
||||
text-shadow: none;
|
||||
font-weight: normal;
|
||||
font-family: 'Microsoft Yahei';
|
||||
}
|
||||
#ds-thread #ds-reset .ds-post-button:hover {
|
||||
color: white;
|
||||
background: #DE594C;
|
||||
}
|
||||
#ds-thread #ds-reset .ds-post-button:active {
|
||||
background: #d32;
|
||||
}
|
||||
#ds-smilies-tooltip ul.ds-smilies-tabs li a.ds-current {
|
||||
color: white;
|
||||
background: #d32;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
11
themes/hueman/layout/comment/facebook.ejs
Normal file
11
themes/hueman/layout/comment/facebook.ejs
Normal file
@@ -0,0 +1,11 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/<%= config.language ? config.language.split('-').join('_') : 'en' %>/sdk.js#xfbml=1&version=v2.8";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
<% } else { %>
|
||||
<div class="fb-comments" data-width="100%" data-href="<%= page.permalink %>" data-num-posts="5"></div>
|
||||
<% } %>
|
22
themes/hueman/layout/comment/index.ejs
Normal file
22
themes/hueman/layout/comment/index.ejs
Normal file
@@ -0,0 +1,22 @@
|
||||
<% if (post.comments) { %>
|
||||
<section id="comments">
|
||||
<% if (theme.comment.disqus) { %>
|
||||
<%- partial('comment/disqus') %>
|
||||
<% } else if (theme.comment.duoshuo) { %>
|
||||
<%- partial('comment/duoshuo') %>
|
||||
<% } else if (theme.comment.youyan) { %>
|
||||
<%- partial('comment/youyan') %>
|
||||
<% } else if (theme.comment.livere) { %>
|
||||
<%- partial('comment/livere') %>
|
||||
<% } else if (theme.comment.facebook) { %>
|
||||
<%- partial('comment/facebook') %>
|
||||
<% } else if (typeof(theme.comment.isso) === 'string'
|
||||
|| theme.comment.isso && theme.comment.isso.on) { %>
|
||||
<%- partial('comment/isso') %>
|
||||
<% } else if (theme.comment.changyan.on) { %>
|
||||
<%- partial('comment/changyan') %>
|
||||
<% } else if (theme.comment.valine.on) { %>
|
||||
<%- partial('comment/valine') %>
|
||||
<% } %>
|
||||
</section>
|
||||
<% } %>
|
29
themes/hueman/layout/comment/isso.ejs
Normal file
29
themes/hueman/layout/comment/isso.ejs
Normal file
@@ -0,0 +1,29 @@
|
||||
<%
|
||||
if (typeof(script) !== 'undefined' && script) {
|
||||
let isso = theme.comment.isso;
|
||||
let issoSite = (typeof(isso) === 'string' ? isso : isso.site);
|
||||
if (isso === issoSite) { //isso is a string
|
||||
//TODO: maybe something better error logging
|
||||
console.warn('WARN Specifying property "comment.isso" as a ' +
|
||||
'string is deprecated. Please consider using the object form. See ' +
|
||||
'the respective _config.yml.example file for an example.');
|
||||
}
|
||||
%>
|
||||
<script data-isso="//<%= issoSite %>"
|
||||
<%
|
||||
let props = ['css', 'lang', 'reply_to_self', 'require_author',
|
||||
'require_email', 'max_comments_top', 'max_comments_nested',
|
||||
'reveal_on_click', 'avatar', 'avatar_bg', 'avatar_fg', 'vote',
|
||||
'vote_levels'];
|
||||
for (var p of props) {
|
||||
if (theme.comment.isso[p]) { %>
|
||||
<%= 'data-isso-' + p.replace('_', '-') %> =
|
||||
"<%= theme.comment.isso[p] %>"
|
||||
<% } %>
|
||||
<% } %>
|
||||
src="//<%= issoSite %>/js/embed.min.js">
|
||||
</script>
|
||||
<% } else { %>
|
||||
<section id="isso-thread"></section>
|
||||
<% } %>
|
||||
|
22
themes/hueman/layout/comment/livere.ejs
Normal file
22
themes/hueman/layout/comment/livere.ejs
Normal file
@@ -0,0 +1,22 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
|
||||
<!-- 来必力City版安装代码 -->
|
||||
<script type="text/javascript">
|
||||
(function(d, s) {
|
||||
var j, e = d.getElementsByTagName(s)[0];
|
||||
|
||||
if (typeof LivereTower === 'function') { return; }
|
||||
|
||||
j = d.createElement(s);
|
||||
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
|
||||
j.async = true;
|
||||
|
||||
e.parentNode.insertBefore(j, e);
|
||||
})(document, 'script');
|
||||
</script>
|
||||
<noscript> 为正常使用来必力评论功能请激活JavaScript</noscript>
|
||||
<!-- City版安装代码已完成 -->
|
||||
|
||||
<% } else { %>
|
||||
<div id="lv-container" data-id="city" data-uid=<%= theme.comment.livere %>></div>
|
||||
<% } %>
|
18
themes/hueman/layout/comment/scripts.ejs
Normal file
18
themes/hueman/layout/comment/scripts.ejs
Normal file
@@ -0,0 +1,18 @@
|
||||
<% if (theme.comment.disqus) { %>
|
||||
<%- partial('comment/disqus', { script: true }) %>
|
||||
<% } else if (theme.comment.duoshuo) { %>
|
||||
<%- partial('comment/duoshuo', { script: true }) %>
|
||||
<% } else if (theme.comment.youyan) { %>
|
||||
<%- partial('comment/youyan', { script: true }) %>
|
||||
<% } else if (theme.comment.livere) { %>
|
||||
<%- partial('comment/livere', { script: true }) %>
|
||||
<% } else if (theme.comment.facebook) { %>
|
||||
<%- partial('comment/facebook', { script: true }) %>
|
||||
<% } else if (typeof(theme.comment.isso) === 'string'
|
||||
|| theme.comment.isso && theme.comment.isso.on) { %>
|
||||
<%- partial('comment/isso', { script: true }) %>
|
||||
<% } else if (theme.comment.changyan.on) { %>
|
||||
<%- partial('comment/changyan', { script: true }) %>
|
||||
<% } else if (theme.comment.valine.on) { %>
|
||||
<%- partial('comment/valine', { script: true }) %>
|
||||
<% } %>
|
19
themes/hueman/layout/comment/valine.ejs
Normal file
19
themes/hueman/layout/comment/valine.ejs
Normal file
@@ -0,0 +1,19 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
|
||||
<script>
|
||||
new Valine({
|
||||
el: '#valine-thread' ,
|
||||
notify:<%= theme.comment.valine.notify %>,
|
||||
verify:<%= theme.comment.valine.verify %>,
|
||||
app_id: '<%= theme.comment.valine.appId %>',
|
||||
app_key: '<%= theme.comment.valine.appKey %>',
|
||||
placeholder: '<%= theme.comment.valine.placeholder %>',
|
||||
pageSize: '<%= theme.comment.valine.pageSize %>',
|
||||
avatar: '<%= theme.comment.valine.avatar %>',
|
||||
avatar_cdn: '<%= theme.comment.valine.avatar_cdn %>'
|
||||
});
|
||||
</script>
|
||||
<% } else { %>
|
||||
<div id="valine-thread"></div>
|
||||
<% } %>
|
5
themes/hueman/layout/comment/youyan.ejs
Normal file
5
themes/hueman/layout/comment/youyan.ejs
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||
<script type="text/javascript" src="//v2.uyan.cc/code/uyan.js?uid=<%= theme.comment.youyan %>"></script>
|
||||
<% } else { %>
|
||||
<div id="uyan_frame"></div>
|
||||
<% } %>
|
32
themes/hueman/layout/common/archive.ejs
Normal file
32
themes/hueman/layout/common/archive.ejs
Normal file
@@ -0,0 +1,32 @@
|
||||
<% var last, postCount = 0; %>
|
||||
<% page.posts.each(function(post, i) { %>
|
||||
<% var year = post.date.year(); %>
|
||||
<% if (last != year) { %>
|
||||
<% if (last != null) { %>
|
||||
</div></section>
|
||||
<% } %>
|
||||
<% last = year; postCount = 0;%>
|
||||
<section class="archives-wrap">
|
||||
<div class="archive-year-wrap">
|
||||
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><i class="icon fa fa-calendar-o"></i><%= year %></a>
|
||||
</div>
|
||||
<div class="archives">
|
||||
<% } %>
|
||||
<% postCount++; %>
|
||||
<% if (postCount % 2 == 1) { %>
|
||||
<div class="article-row">
|
||||
<% } %>
|
||||
<%- partial('summary', { post: post }) %>
|
||||
<% if (postCount == page.posts.length || postCount % 2 == 0) { %>
|
||||
</div>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
<% if (page.posts.length) { %>
|
||||
</div></section>
|
||||
<% } %>
|
||||
<% if (page.total > 1) { %>
|
||||
<nav id="page-nav">
|
||||
<span class="pages"><%= _p('nav.current_page', page.current) %><%= _p('nav.total_page', page.total) %></span>
|
||||
<%- paginator({prev_text: '«', next_text: '»'}) %>
|
||||
</nav>
|
||||
<% } %>
|
24
themes/hueman/layout/common/article.ejs
Normal file
24
themes/hueman/layout/common/article.ejs
Normal file
@@ -0,0 +1,24 @@
|
||||
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-single article-type-<%= post.layout %><%= (post.direction && post.direction.toLowerCase() === 'rtl' ? ' rtl' : '') %>" itemscope itemprop="blogPost">
|
||||
<div class="article-inner">
|
||||
<% if (post.link || post.title) { %>
|
||||
<header class="article-header">
|
||||
<%- partial('post/title', { class_name: 'article-title' }) %>
|
||||
</header>
|
||||
<% } %>
|
||||
<% if (post.layout != 'page') { %>
|
||||
<div class="article-meta">
|
||||
<%- partial('post/date', { class_name: 'article-date', date_format: null }) %>
|
||||
<%- partial('post/author') %>
|
||||
<%- partial('post/tag') %>
|
||||
</div>
|
||||
<% } %>
|
||||
<%- partial('post/gallery') %>
|
||||
<div class="article-entry" itemprop="articleBody">
|
||||
<%- post.content %>
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<%- partial('share/index', { post: post }) %>
|
||||
</footer>
|
||||
</div>
|
||||
</article>
|
||||
<%- partial('comment/index') %>
|
39
themes/hueman/layout/common/content-title.ejs
Normal file
39
themes/hueman/layout/common/content-title.ejs
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="main-body-header">
|
||||
<h1 class="header">
|
||||
<%
|
||||
var title = page.title;
|
||||
if (page.archive) {
|
||||
title = __('index.archive');
|
||||
if (page.month) {
|
||||
title += ': ' + page.year + '/' + page.month;
|
||||
} else if (page.year) {
|
||||
title += ': ' + page.year;
|
||||
}
|
||||
title = '<i class="icon fa fa-archive"></i>' + title;
|
||||
} else if (page.author && !is_post()) {
|
||||
title = page.author.name;
|
||||
if (page.author.about) {
|
||||
title += ' - ' + page.author.about;
|
||||
}
|
||||
} else if (page.category) {
|
||||
title = '<i class="icon fa fa-folder-open"></i>' + __('index.category') + ': <em class="page-title-link">' + page.category + '</em>';
|
||||
} else if (page.tag) {
|
||||
title = '<i class="icon fa fa-tag"></i>' + __('index.tag') + ': <em>' + page.tag + '</em>';
|
||||
} else if (is_post()) {
|
||||
title = list_categories(page.categories, {show_count: false, style: 'none', class: 'page-title', separator: '<i class="icon fa fa-angle-right"></i>'});
|
||||
if (title == "") {
|
||||
title = __('index.uncategorized');
|
||||
}
|
||||
} else if (is_home()) {
|
||||
title = '<em class="page-title-link" data-url="home">' + __('index.home') + '</em>';
|
||||
} else if (page.subtitle) {
|
||||
title = '<em class="page-title-link" data-url="' + url_for(page.path) + '">' + page.subtitle + '</em>';
|
||||
} else if (page.title) {
|
||||
title = '<em class="page-title-link" data-url="' + url_for(page.path) + '">' + page.title + '</em>';
|
||||
} else {
|
||||
title = config.title;
|
||||
}
|
||||
%>
|
||||
<%- title %>
|
||||
</h1>
|
||||
</div>
|
17
themes/hueman/layout/common/footer.ejs
Normal file
17
themes/hueman/layout/common/footer.ejs
Normal file
@@ -0,0 +1,17 @@
|
||||
<footer id="footer">
|
||||
<div class="container">
|
||||
<div class="container-inner">
|
||||
<a id="back-to-top" href="javascript:;"><i class="icon fa fa-angle-up"></i></a>
|
||||
<div class="credit">
|
||||
<h1 class="logo-wrap">
|
||||
<a href="<%- url_for() %>" class="logo"></a>
|
||||
</h1>
|
||||
<p>© <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %></p>
|
||||
<p>Powered by <a href="//hexo.io/" target="_blank">Hexo</a>. Theme by <a href="//github.com/ppoffice" target="_blank">PPOffice</a></p>
|
||||
</div>
|
||||
<div class="footer-plugins">
|
||||
<%- partial('plugin/scripts', { isFooter: true }) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
60
themes/hueman/layout/common/head.ejs
Normal file
60
themes/hueman/layout/common/head.ejs
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<%- partial('pwa/index') %>
|
||||
<%
|
||||
var title = page.title;
|
||||
if (is_archive()) {
|
||||
title = __('index.archive');
|
||||
if (is_month()) {
|
||||
title += ': ' + page.year + '/' + page.month;
|
||||
} else if (is_year()) {
|
||||
title += ': ' + page.year;
|
||||
}
|
||||
} else if (is_category()) {
|
||||
title = __('index.category') + ': ' + page.category;
|
||||
} else if (is_tag()) {
|
||||
title = __('index.tag') + ': ' + page.tag;
|
||||
}
|
||||
%>
|
||||
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
|
||||
<% if (theme.plugins.bing_site_verification) { %>
|
||||
<meta name="msvalidate.01" content="<%- theme.plugins.bing_site_verification %>" />
|
||||
<% } %>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<% if (page.tags) {
|
||||
var keywords = [];
|
||||
for (var i in page.tags.data) {
|
||||
keywords.push(page.tags.data[i].name);
|
||||
}
|
||||
%>
|
||||
<meta name="keywords" content="<%= keywords.join(',') %>" />
|
||||
<% } %>
|
||||
<%- open_graph({
|
||||
image: thumbnail(page),
|
||||
fb_app_id: theme.miscellaneous.open_graph.fb_app_id,
|
||||
fb_admins: theme.miscellaneous.open_graph.fb_admins,
|
||||
twitter_id: theme.miscellaneous.open_graph.twitter_id,
|
||||
google_plus: theme.miscellaneous.open_graph.google_plus,
|
||||
}) %>
|
||||
<%- meta(page) %>
|
||||
|
||||
<% if (theme.customize && theme.customize.social_links && theme.customize.social_links.rss) { %>
|
||||
<link rel="alternate" href="<%- theme.customize.social_links.rss %>" title="<%= config.title %>" type="application/atom+xml" />
|
||||
<% } %>
|
||||
|
||||
<% if (theme.customize.favicon) { %>
|
||||
<link rel="icon" href="<%- url_for(theme.customize.favicon) %>" />
|
||||
<% } %>
|
||||
|
||||
<%- css('libs/font-awesome/css/font-awesome.min') %>
|
||||
<%- css('libs/titillium-web/styles') %>
|
||||
<%- css('libs/source-code-pro/styles') %>
|
||||
|
||||
<%- css('css/style') %>
|
||||
|
||||
<%- js('libs/jquery/3.3.1/jquery.min') %>
|
||||
<%- partial('plugin/scripts', { isHead: true }) %>
|
||||
</head>
|
41
themes/hueman/layout/common/header.ejs
Normal file
41
themes/hueman/layout/common/header.ejs
Normal file
@@ -0,0 +1,41 @@
|
||||
<header id="header">
|
||||
<div id="header-outer" class="outer">
|
||||
<div class="container">
|
||||
<div class="container-inner">
|
||||
<div id="header-title">
|
||||
<h1 class="logo-wrap">
|
||||
<a href="<%- url_for() %>" class="logo"></a>
|
||||
</h1>
|
||||
<% if (theme.subtitle) { %>
|
||||
<h2 class="subtitle-wrap">
|
||||
<p class="subtitle"><%= theme.subtitle %></p>
|
||||
</h2>
|
||||
<% } %>
|
||||
</div>
|
||||
<div id="header-inner" class="nav-container">
|
||||
<a id="main-nav-toggle" class="nav-icon fa fa-bars"></a>
|
||||
<div class="nav-container-inner">
|
||||
<ul id="main-nav">
|
||||
<% for (var i in theme.menu) {
|
||||
if (i == 'Categories') { %>
|
||||
<%- list_categories({
|
||||
depth: 2,
|
||||
style: 'list',
|
||||
class: 'main-nav',
|
||||
show_count: false,
|
||||
}) %>
|
||||
<% } else { %>
|
||||
<li class="main-nav-list-item" >
|
||||
<a class="main-nav-list-link" href="<%- url_for(theme.menu[i]) %>"><%= __('index.' + i.toLowerCase()) %></a>
|
||||
</li>
|
||||
<% }} %>
|
||||
</ul>
|
||||
<nav id="sub-nav">
|
||||
<%- partial('search/index') %>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
5
themes/hueman/layout/common/post/author.ejs
Normal file
5
themes/hueman/layout/common/post/author.ejs
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if (post.authorId) { %>
|
||||
<div class="article-author">
|
||||
<a href="<%- config.root %><%- 'author/' + post.authorId %>"><%= post.author.name %></a>
|
||||
</div>
|
||||
<% } %>
|
7
themes/hueman/layout/common/post/date.ejs
Normal file
7
themes/hueman/layout/common/post/date.ejs
Normal file
@@ -0,0 +1,7 @@
|
||||
<% if (post.date) { %>
|
||||
<div class="<%= class_name %>">
|
||||
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
|
||||
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
9
themes/hueman/layout/common/post/gallery.ejs
Normal file
9
themes/hueman/layout/common/post/gallery.ejs
Normal file
@@ -0,0 +1,9 @@
|
||||
<% if (post.photos && post.photos.length) { %>
|
||||
<div class="article-gallery">
|
||||
<% post.photos.forEach(function(photo, i) { %>
|
||||
<a class="gallery-item" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
|
||||
<img src="<%- url_for(photo) %>" itemprop="image" />
|
||||
</a>
|
||||
<% }) %>
|
||||
</div>
|
||||
<% } %>
|
24
themes/hueman/layout/common/post/nav.ejs
Normal file
24
themes/hueman/layout/common/post/nav.ejs
Normal file
@@ -0,0 +1,24 @@
|
||||
<% if (post.prev || post.next) { %>
|
||||
<nav id="article-nav">
|
||||
<% if (post.prev) { %>
|
||||
<a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
|
||||
<strong class="article-nav-caption"><%= __('sidebar.newer') %></strong>
|
||||
<p class="article-nav-title">
|
||||
<% if (post.prev.title) { %>
|
||||
<%= post.prev.title %>
|
||||
<% } else { %>
|
||||
(no title)
|
||||
<% } %>
|
||||
</p>
|
||||
<i class="icon fa fa-chevron-right" id="icon-chevron-right"></i>
|
||||
</a>
|
||||
<% } %>
|
||||
<% if (post.next) { %>
|
||||
<a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
|
||||
<strong class="article-nav-caption"><%= __('sidebar.older') %></strong>
|
||||
<p class="article-nav-title"><%= post.next.title %></p>
|
||||
<i class="icon fa fa-chevron-left" id="icon-chevron-left"></i>
|
||||
</a>
|
||||
<% } %>
|
||||
</nav>
|
||||
<% } %>
|
6
themes/hueman/layout/common/post/tag.ejs
Normal file
6
themes/hueman/layout/common/post/tag.ejs
Normal file
@@ -0,0 +1,6 @@
|
||||
<% if (post.tags && post.tags.length) { %>
|
||||
<div class="article-tag">
|
||||
<i class="fa fa-tag"></i>
|
||||
<%- list_tags(post.tags, { show_count: false, style: 'link' }) %>
|
||||
</div>
|
||||
<% } %>
|
15
themes/hueman/layout/common/post/title.ejs
Normal file
15
themes/hueman/layout/common/post/title.ejs
Normal file
@@ -0,0 +1,15 @@
|
||||
<% if (post.link) { %>
|
||||
<h1 itemprop="name">
|
||||
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
|
||||
</h1>
|
||||
<% } else if (post.title) { %>
|
||||
<% if (typeof(linkable) !== 'undefined' && linkable) { %>
|
||||
<h1 class="<%= class_name %>" itemprop="name">
|
||||
<a href="<%- url_for(post.path) %>"><%= post.title %></a>
|
||||
</h1>
|
||||
<% } else { %>
|
||||
<h1 class="<%= class_name %>" itemprop="name">
|
||||
<%= post.title %>
|
||||
</h1>
|
||||
<% } %>
|
||||
<% } %>
|
5
themes/hueman/layout/common/scripts.ejs
Normal file
5
themes/hueman/layout/common/scripts.ejs
Normal file
@@ -0,0 +1,5 @@
|
||||
<%- partial('comment/scripts') %>
|
||||
<%- partial('plugin/scripts') %>
|
||||
|
||||
<!-- Custom Scripts -->
|
||||
<%- js('js/main') %>
|
27
themes/hueman/layout/common/sidebar.ejs
Normal file
27
themes/hueman/layout/common/sidebar.ejs
Normal file
@@ -0,0 +1,27 @@
|
||||
<aside id="sidebar">
|
||||
<a class="sidebar-toggle" title="Expand Sidebar"><i class="toggle icon"></i></a>
|
||||
<div class="sidebar-top">
|
||||
<p><%= __('sidebar.follow') %>:</p>
|
||||
<ul class="social-links">
|
||||
<% for (var i in theme.customize.social_links) { %>
|
||||
<% if (theme.customize.social_links[i]) { %>
|
||||
<li>
|
||||
<a class="social-tooltip" title="<%= i %>" href="<%- url_for(theme.customize.social_links[i]) %>" target="_blank" rel="noopener">
|
||||
<i class="icon fa fa-<%= i %>"></i>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
<% if (is_post()) { %>
|
||||
<%- partial('post/nav', {post: page}) %>
|
||||
<% } %>
|
||||
<div class="widgets-container">
|
||||
<% if (theme.widgets) { %>
|
||||
<% theme.widgets.forEach(function(widget) { %>
|
||||
<%- partial('widget/' + widget, {post: page}) %>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
</aside>
|
23
themes/hueman/layout/common/summary.ejs
Normal file
23
themes/hueman/layout/common/summary.ejs
Normal file
@@ -0,0 +1,23 @@
|
||||
<article class="article article-summary<%= (post.direction && post.direction.toLowerCase() === 'rtl' ? ' rtl' : '') %>">
|
||||
<div class="article-summary-inner">
|
||||
<% if (theme.customize.thumbnail === true) { %>
|
||||
<%- partial('common/thumbnail', { counter: true }) %>
|
||||
<% } %>
|
||||
<div class="article-meta">
|
||||
<div class="category">
|
||||
<%- list_categories(post.categories, {
|
||||
depth:2,
|
||||
style: 'none',
|
||||
show_count: false,
|
||||
class: 'article-category',
|
||||
separator: '<i class="icon fa fa-angle-right"></i>',
|
||||
}) %>
|
||||
</div>
|
||||
<div class="date"><time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date) %></time></div>
|
||||
</div>
|
||||
<%- partial('post/title', { class_name: 'article-title', linkable: true }) %>
|
||||
<p class="article-excerpt">
|
||||
<%- excerpt(post) %>
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
11
themes/hueman/layout/common/thumbnail.ejs
Normal file
11
themes/hueman/layout/common/thumbnail.ejs
Normal file
@@ -0,0 +1,11 @@
|
||||
<a href="<%- url_for(post.link ? post.link : post.path) %>" class="thumbnail">
|
||||
<% var thumbnailUrl = thumbnail(post) %>
|
||||
<% if (thumbnailUrl) { %>
|
||||
<span style="background-image:url(<%- thumbnailUrl %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
|
||||
<% } else { %>
|
||||
<span class="thumbnail-image thumbnail-none"></span>
|
||||
<% } %>
|
||||
<% if (typeof(counter) !== 'undefined' && counter) { %>
|
||||
<%- partial('comment/counter') %>
|
||||
<% } %>
|
||||
</a>
|
1
themes/hueman/layout/index.ejs
Normal file
1
themes/hueman/layout/index.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/archive') %>
|
22
themes/hueman/layout/layout.ejs
Normal file
22
themes/hueman/layout/layout.ejs
Normal file
@@ -0,0 +1,22 @@
|
||||
<%- partial('common/head') %>
|
||||
<body>
|
||||
<div id="wrap">
|
||||
<%- partial('common/header', null, {cache: !config.relative_link}) %>
|
||||
<div class="container">
|
||||
<div class="main-body container-inner">
|
||||
<div class="main-body-inner">
|
||||
<section id="main">
|
||||
<%- partial('common/content-title') %>
|
||||
<div class="main-body-content">
|
||||
<%- body %>
|
||||
</div>
|
||||
</section>
|
||||
<%- partial('common/sidebar') %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%- partial('common/footer', null, {cache: !config.relative_link}) %>
|
||||
<%- partial('common/scripts') %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1
themes/hueman/layout/page.ejs
Normal file
1
themes/hueman/layout/page.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/article', { post: page }) %>
|
9
themes/hueman/layout/plugin/baidu-analytics.ejs
Normal file
9
themes/hueman/layout/plugin/baidu-analytics.ejs
Normal file
@@ -0,0 +1,9 @@
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?<%= theme.plugins.baidu_analytics %>";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
10
themes/hueman/layout/plugin/google-analytics.ejs
Normal file
10
themes/hueman/layout/plugin/google-analytics.ejs
Normal file
@@ -0,0 +1,10 @@
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m) {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() {
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '<%= theme.plugins.google_analytics %>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
39
themes/hueman/layout/plugin/scripts.ejs
Normal file
39
themes/hueman/layout/plugin/scripts.ejs
Normal file
@@ -0,0 +1,39 @@
|
||||
<% if (typeof(isHead) !== 'undefined' && isHead) { %>
|
||||
<% if (theme.plugins.lightgallery) { %>
|
||||
<%- css('libs/lightgallery/css/lightgallery.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.justifiedgallery) { %>
|
||||
<%- css('libs/justified-gallery/justifiedGallery.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.google_analytics) { %>
|
||||
<%- partial('plugin/google-analytics') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.baidu_analytics) { %>
|
||||
<%- partial('plugin/baidu-analytics') %>
|
||||
<% } %>
|
||||
<% } else if (typeof(isFooter) !== 'undefined' && isFooter) { %>
|
||||
<% if (theme.plugins.statcounter && theme.plugins.statcounter.on) { %>
|
||||
<%- partial('plugin/statcounter') %>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<% if (theme.plugins.lightgallery) { %>
|
||||
<%- js('libs/lightgallery/js/lightgallery.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-thumbnail.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-pager.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-autoplay.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-fullscreen.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-zoom.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-hash.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-share.min') %>
|
||||
<%- js('libs/lightgallery/js/lg-video.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.justifiedgallery) { %>
|
||||
<%- js('libs/justified-gallery/jquery.justifiedGallery.min') %>
|
||||
<% } %>
|
||||
<% if (theme.plugins.mathjax) { %>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
|
||||
</script>
|
||||
<%- js('https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML') %>
|
||||
<% } %>
|
||||
<% } %>
|
23
themes/hueman/layout/plugin/statcounter.ejs
Normal file
23
themes/hueman/layout/plugin/statcounter.ejs
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Default Statcounter code -->
|
||||
<% let sc = theme.plugins.statcounter; %>
|
||||
<script type="text/javascript">
|
||||
var sc_project=<%= sc.sc_project %>;
|
||||
var sc_invisible=<%= sc.sc_invisible %>;
|
||||
var sc_security="<%= sc.sc_security %>";
|
||||
</script>
|
||||
<script type="text/javascript" src="https://www.statcounter.com/counter/counter.js">
|
||||
</script>
|
||||
<noscript>
|
||||
<div class="statcounter">
|
||||
<a title="Web Analytics" href="http://statcounter.com/" target="_blank">
|
||||
<img class="statcounter"
|
||||
src="//c.statcounter.com/<%= sc.sc_project %>/0/<%=
|
||||
sc.sc_security %>/<%= sc.sc_invisible %>/"
|
||||
alt="Web Analytics">
|
||||
</a>
|
||||
</div>
|
||||
</noscript>
|
||||
<!-- End of Statcounter Code -->
|
||||
<% if (sc.public) { %>
|
||||
<a href="http://statcounter.com/p<%= sc.sc_project %>/?guest=1">View My Stats</a>
|
||||
<% } %>
|
1
themes/hueman/layout/post.ejs
Normal file
1
themes/hueman/layout/post.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/article', { post: page }) %>
|
20
themes/hueman/layout/pwa/index.ejs
Normal file
20
themes/hueman/layout/pwa/index.ejs
Normal file
@@ -0,0 +1,20 @@
|
||||
<% if (config.pwa) { %>
|
||||
<%
|
||||
var icon = config.pwa.manifest.body.icons.find(icon => icon.sizes === '152x152');
|
||||
%>
|
||||
<% if (icon) { %>
|
||||
<link rel="icon" href="/<%= icon.src %>" />
|
||||
<link rel="apple-touch-icon" href="/<%= icon.src %>" />
|
||||
|
||||
<meta name="msapplication-TileImage" content="/<%= icon.src %>" />
|
||||
<% } %>
|
||||
|
||||
<meta name="msapplication-TileColor" content="<%= theme.customize.theme_color %>" />
|
||||
|
||||
<meta name="theme-color" content="<%= theme.customize.theme_color %>" />
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<meta name="apple-mobile-web-app-title" content="<%= config.pwa.manifest.body.name %>" />
|
||||
|
||||
<% } %>
|
12
themes/hueman/layout/search/baidu.ejs
Normal file
12
themes/hueman/layout/search/baidu.ejs
Normal file
@@ -0,0 +1,12 @@
|
||||
<form class="search-form" method="GET" action="https://www.baidu.com/s?">
|
||||
<input name="wd" type="text" class="search-form-input" placeholder="<%= __('index.search') %>" />
|
||||
</form>
|
||||
<script>
|
||||
(function ($) {
|
||||
$('.search-form').on('submit', function (e) {
|
||||
var keyword = $('.search-form-input[name="wd"]').val();
|
||||
window.location = 'https://www.baidu.com/s?wd=site:<%= config.url.replace(/http(s)*:\/\//, "") %> ' + keyword;
|
||||
return false;
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
18
themes/hueman/layout/search/index.ejs
Normal file
18
themes/hueman/layout/search/index.ejs
Normal file
@@ -0,0 +1,18 @@
|
||||
<div id="search-form-wrap">
|
||||
<% if (theme.search.insight) { %>
|
||||
<form class="search-form">
|
||||
<input type="text" class="ins-search-input search-form-input" placeholder="<%= __('index.search') %>" />
|
||||
<button type="submit" class="search-form-submit"></button>
|
||||
</form>
|
||||
<%- partial('search/insight') %>
|
||||
<% } else if (theme.search.swiftype) { %>
|
||||
<div class="search-form">
|
||||
<input type="text" class="st-default-search-input search-form-input" placeholder="<%= __('index.search') %>" />
|
||||
</div>
|
||||
<%- partial('search/swiftype') %>
|
||||
<% } else if (theme.search.baidu) { %>
|
||||
<%- partial('search/baidu') %>
|
||||
<% } else { %>
|
||||
<%- search_form({text: __('index.search')}) %>
|
||||
<% } %>
|
||||
</div>
|
29
themes/hueman/layout/search/insight.ejs
Normal file
29
themes/hueman/layout/search/insight.ejs
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="ins-search">
|
||||
<div class="ins-search-mask"></div>
|
||||
<div class="ins-search-container">
|
||||
<div class="ins-input-wrapper">
|
||||
<input type="text" class="ins-search-input" placeholder="<%= __('insight.hint') %>" />
|
||||
<span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
|
||||
</div>
|
||||
<div class="ins-section-wrapper">
|
||||
<div class="ins-section-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function (window) {
|
||||
var INSIGHT_CONFIG = {
|
||||
TRANSLATION: {
|
||||
POSTS: '<%= __("insight.posts") %>',
|
||||
PAGES: '<%= __("insight.pages") %>',
|
||||
CATEGORIES: '<%= __("insight.categories") %>',
|
||||
TAGS: '<%= __("insight.tags") %>',
|
||||
UNTITLED: '<%= __("insight.untitled") %>',
|
||||
},
|
||||
ROOT_URL: '<%= config.root %>',
|
||||
CONTENT_URL: '<%- url_for("/content.json")%>',
|
||||
};
|
||||
window.INSIGHT_CONFIG = INSIGHT_CONFIG;
|
||||
})(window);
|
||||
</script>
|
||||
<%- js('js/insight') %>
|
26
themes/hueman/layout/search/swiftype.ejs
Normal file
26
themes/hueman/layout/search/swiftype.ejs
Normal file
@@ -0,0 +1,26 @@
|
||||
<script type="text/javascript">
|
||||
(function(w,d,t,u,n,s,e) {w['SwiftypeObject']=n;w[n]=w[n]||function() {
|
||||
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
|
||||
e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
|
||||
})(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');
|
||||
|
||||
_st('install','<%= theme.search.swiftype %>','2.0.0');
|
||||
</script>
|
||||
<style>
|
||||
.st-ui-injected-overlay-container,
|
||||
.st-ui-injected-overlay-container *:not(select) {
|
||||
font-family: inherit !important;
|
||||
}
|
||||
section.st-ui-content.st-search-results a.st-ui-result .st-ui-type-heading {
|
||||
color: <%= theme.customize.theme_color %> !important;
|
||||
}
|
||||
.st-ui-injected-overlay-container .st-ui-header input[type="text"]:focus {
|
||||
border-bottom: 2px solid <%= theme.customize.theme_color %>;
|
||||
}
|
||||
.st-ui-injected-overlay-container .st-ui-footer a.st-ui-pagination-link {
|
||||
color: <%= theme.customize.theme_color %>;
|
||||
}
|
||||
.st-ui-injected-overlay-container .st-ui-footer a.st-ui-pagination-link span.st-ui-arrow {
|
||||
border-color: <%= theme.customize.theme_color %>;
|
||||
}
|
||||
</style>
|
52
themes/hueman/layout/share/addtoany.ejs
Normal file
52
themes/hueman/layout/share/addtoany.ejs
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="a2a_kit a2a_default_style">
|
||||
<a class="a2a_dd" href="https://www.addtoany.com/share">Share</a>
|
||||
<span class="a2a_divider"></span>
|
||||
<a class="a2a_button_facebook"></a>
|
||||
<a class="a2a_button_twitter"></a>
|
||||
<a class="a2a_button_google_plus"></a>
|
||||
<a class="a2a_button_pinterest"></a>
|
||||
<a class="a2a_button_tumblr"></a>
|
||||
</div>
|
||||
<script type="text/javascript" src="//static.addtoany.com/menu/page.js"></script>
|
||||
<style>
|
||||
.a2a_menu {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.a2a_menu a {
|
||||
margin: 2px 0;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
border-radius: 4px;
|
||||
color: inherit !important;
|
||||
font-family: 'Microsoft Yahei';
|
||||
}
|
||||
#a2apage_dropdown {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.a2a_mini_services {
|
||||
padding: 10px;
|
||||
}
|
||||
a.a2a_i,
|
||||
i.a2a_i {
|
||||
width: 122px;
|
||||
line-height: 16px;
|
||||
}
|
||||
a.a2a_i .a2a_svg,
|
||||
a.a2a_more .a2a_svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
vertical-align: top;
|
||||
background-size: 16px;
|
||||
}
|
||||
a.a2a_i {
|
||||
border: none !important;
|
||||
}
|
||||
a.a2a_menu_show_more_less {
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
line-height: 16px;
|
||||
}
|
||||
.a2a_mini_services:after{content:".";display:block;height:0;clear:both;visibility:hidden}
|
||||
.a2a_mini_services{*+height:1%;}
|
||||
</style>
|
34
themes/hueman/layout/share/bdshare.ejs
Normal file
34
themes/hueman/layout/share/bdshare.ejs
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="bdsharebuttonbox">
|
||||
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
|
||||
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
|
||||
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
|
||||
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
|
||||
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
|
||||
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
|
||||
</div>
|
||||
<script>
|
||||
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
|
||||
</script>
|
||||
<style>
|
||||
.bdshare_popup_box {
|
||||
border-radius: 4px;
|
||||
border: #e1e1e1 solid 1px;
|
||||
}
|
||||
.bdshare-button-style0-16 a,
|
||||
.bdshare-button-style0-16 .bds_more {
|
||||
padding-left: 20px;
|
||||
margin: 6px 10px 6px 0;
|
||||
}
|
||||
.bdshare_dialog_list a,
|
||||
.bdshare_popup_list a,
|
||||
.bdshare_popup_bottom a {
|
||||
font-family: 'Microsoft Yahei';
|
||||
}
|
||||
.bdshare_popup_top {
|
||||
display: none;
|
||||
}
|
||||
.bdshare_popup_bottom {
|
||||
height: auto;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
59
themes/hueman/layout/share/default.ejs
Normal file
59
themes/hueman/layout/share/default.ejs
Normal file
@@ -0,0 +1,59 @@
|
||||
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><i class="fa fa-share"></i><%=__('article.share')%></a>
|
||||
<script>
|
||||
(function ($) {
|
||||
$('body').on('click', function() {
|
||||
$('.article-share-box.on').removeClass('on');
|
||||
}).on('click', '.article-share-link', function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var $this = $(this),
|
||||
url = $this.attr('data-url'),
|
||||
encodedUrl = encodeURIComponent(url),
|
||||
id = 'article-share-box-' + $this.attr('data-id'),
|
||||
offset = $this.offset(),
|
||||
box;
|
||||
|
||||
if ($('#' + id).length) {
|
||||
box = $('#' + id);
|
||||
|
||||
if (box.hasClass('on')){
|
||||
box.removeClass('on');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
var html = [
|
||||
'<div id="' + id + '" class="article-share-box">',
|
||||
'<input class="article-share-input" value="' + url + '">',
|
||||
'<div class="article-share-links">',
|
||||
'<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
|
||||
'<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
|
||||
'<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="article-share-pinterest" target="_blank" title="Pinterest"></a>',
|
||||
'<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="article-share-google" target="_blank" title="Google+"></a>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
box = $(html);
|
||||
|
||||
$('body').append(box);
|
||||
}
|
||||
|
||||
$('.article-share-box.on').hide();
|
||||
|
||||
box.css({
|
||||
top: offset.top + 25,
|
||||
left: offset.left
|
||||
}).addClass('on');
|
||||
|
||||
}).on('click', '.article-share-box', function (e) {
|
||||
e.stopPropagation();
|
||||
}).on('click', '.article-share-box-input', function () {
|
||||
$(this).select();
|
||||
}).on('click', '.article-share-box-link', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
12
themes/hueman/layout/share/index.ejs
Normal file
12
themes/hueman/layout/share/index.ejs
Normal file
@@ -0,0 +1,12 @@
|
||||
<% if (theme.share === 'jiathis') { %>
|
||||
<%- partial('jiathis') %>
|
||||
<% } %>
|
||||
<% if (theme.share === 'bdshare') { %>
|
||||
<%- partial('bdshare') %>
|
||||
<% } %>
|
||||
<% if (theme.share === 'addtoany') { %>
|
||||
<%- partial('addtoany') %>
|
||||
<% } %>
|
||||
<% if (!theme.share || theme.share === 'default') { %>
|
||||
<%- partial('default', { post: post }) %>
|
||||
<% } %>
|
50
themes/hueman/layout/share/jiathis.ejs
Normal file
50
themes/hueman/layout/share/jiathis.ejs
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="jiathis_style">
|
||||
<span class="jiathis_txt">分享到:</span>
|
||||
<a class="jiathis_button_qzone">QQ空间</a>
|
||||
<a class="jiathis_button_tsina">新浪微博</a>
|
||||
<a class="jiathis_button_tqq">腾讯微博</a>
|
||||
<a class="jiathis_button_weixin">微信</a>
|
||||
<a href="//www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
|
||||
<a class="jiathis_counter_style"></a>
|
||||
</div>
|
||||
<script type="text/javascript" src="//v3.jiathis.com/code/jia.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.jiathis_style div:first-child:not(.jiadiv_01) {
|
||||
width: auto !important;
|
||||
border: none !important;
|
||||
}
|
||||
.jiathis_style .jiadiv_01 {
|
||||
margin: 10px 0;
|
||||
border-radius: 4px;
|
||||
border: #e1e1e1 solid 1px;
|
||||
}
|
||||
.jiathis_style .jiadiv_01 div:first-child {
|
||||
display: none;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 {
|
||||
padding: 7px 0 !important;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 .jiatitle {
|
||||
width: 85px;
|
||||
border: none;
|
||||
height: auto;
|
||||
margin: 3px 10px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 .jiatitle:hover {
|
||||
border: none;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 .jiatitle:nth-child(even) {
|
||||
margin-left: 0;
|
||||
}
|
||||
.jiathis_style .jtico:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.jiathis_style .ckepopBottom,
|
||||
.jiathis_style .centerBottom {
|
||||
width: auto !important;
|
||||
padding: 5px;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
</style>
|
1
themes/hueman/layout/tag.ejs
Normal file
1
themes/hueman/layout/tag.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<%- partial('common/archive') %>
|
8
themes/hueman/layout/widget/archive.ejs
Normal file
8
themes/hueman/layout/widget/archive.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<% if (site.posts.length) { %>
|
||||
<div class="widget-wrap widget-list">
|
||||
<h3 class="widget-title"><%= __('sidebar.archives') %></h3>
|
||||
<div class="widget">
|
||||
<%- list_archives() %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
10
themes/hueman/layout/widget/catalog.ejs
Normal file
10
themes/hueman/layout/widget/catalog.ejs
Normal file
@@ -0,0 +1,10 @@
|
||||
<% if (typeof(post) != 'undefined' && post.toc) { %>
|
||||
<div class="widget-wrap widget-list">
|
||||
<h3 class="widget-title"><%= __('sidebar.catalogue') %></h3>
|
||||
<div class="widget">
|
||||
<div id="toc" class="toc-article">
|
||||
<%- toc(post.content) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
8
themes/hueman/layout/widget/category.ejs
Normal file
8
themes/hueman/layout/widget/category.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<% if (site.categories.length) { %>
|
||||
<div class="widget-wrap widget-list">
|
||||
<h3 class="widget-title"><%= __('sidebar.categories') %></h3>
|
||||
<div class="widget">
|
||||
<%- list_categories() %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
14
themes/hueman/layout/widget/links.ejs
Normal file
14
themes/hueman/layout/widget/links.ejs
Normal file
@@ -0,0 +1,14 @@
|
||||
<% if (site.posts.length) { %>
|
||||
<div class="widget-wrap widget-list">
|
||||
<h3 class="widget-title"><%= __('sidebar.links') %></h3>
|
||||
<div class="widget">
|
||||
<ul>
|
||||
<% for (var i in theme.miscellaneous.links) { %>
|
||||
<li>
|
||||
<a href="<%- theme.miscellaneous.links[i] %>"><%= i %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
23
themes/hueman/layout/widget/recent_posts.ejs
Normal file
23
themes/hueman/layout/widget/recent_posts.ejs
Normal file
@@ -0,0 +1,23 @@
|
||||
<% if (site.posts.length) { %>
|
||||
<div class="widget-wrap">
|
||||
<h3 class="widget-title"><%= __('sidebar.recents') %></h3>
|
||||
<div class="widget">
|
||||
<ul id="recent-post" class="<%= (theme.customize.thumbnail?'':'no-thumbnail') %>">
|
||||
<% site.posts.sort('date', -1).limit(5).each(function(post) { %>
|
||||
<li>
|
||||
<% if (theme.customize.thumbnail === true) { %>
|
||||
<div class="item-thumbnail">
|
||||
<%- partial('common/thumbnail.ejs', {post: post}) %>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="item-inner">
|
||||
<p class="item-category"><%- list_categories(post.categories, {show_count: false, depth:2, class: 'article-category', style: 'none', separator: '<i class="icon fa fa-angle-right"></i>'}) %></p>
|
||||
<p class="item-title"><a href="<%- url_for((post.link?post.link:post.path)) %>" class="title"><%= post.title %></a></p>
|
||||
<p class="item-date"><time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date) %></time></p>
|
||||
</div>
|
||||
</li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
25
themes/hueman/layout/widget/sticky_posts.ejs
Normal file
25
themes/hueman/layout/widget/sticky_posts.ejs
Normal file
@@ -0,0 +1,25 @@
|
||||
<% if (site.posts.length) { %>
|
||||
<div class="widget-wrap">
|
||||
<h3 class="widget-title"><%= __('sidebar.sticky') %></h3>
|
||||
<div class="widget">
|
||||
<ul id="recent-post" class="<%= (theme.customize.thumbnail?'':'no-thumbnail') %>">
|
||||
<% site.posts.filter(function(post) { return post.sticky; }).sort('sticky', -1).limit(5).each(function(post) { %>
|
||||
<% if (!post.hidden) { %>
|
||||
<li>
|
||||
<% if (theme.customize.thumbnail === true) { %>
|
||||
<div class="item-thumbnail">
|
||||
<%- partial('common/thumbnail.ejs', {post: post}) %>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="item-inner">
|
||||
<p class="item-category"><%- list_categories(post.categories, {show_count: false, depth:2, class: 'article-category', style: 'none', separator: '<i class="icon fa fa-angle-right"></i>'}) %></p>
|
||||
<p class="item-title"><a href="<%- url_for((post.link?post.link:post.path)) %>" class="title"><%= post.title %></a></p>
|
||||
<p class="item-date"><time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date) %></time></p>
|
||||
</div>
|
||||
</li>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
8
themes/hueman/layout/widget/tag.ejs
Normal file
8
themes/hueman/layout/widget/tag.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<% if (site.tags.length) { %>
|
||||
<div class="widget-wrap widget-list">
|
||||
<h3 class="widget-title"><%= __('sidebar.tags') %></h3>
|
||||
<div class="widget">
|
||||
<%- list_tags() %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
8
themes/hueman/layout/widget/tagcloud.ejs
Normal file
8
themes/hueman/layout/widget/tagcloud.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<% if (site.tags.length) { %>
|
||||
<div class="widget-wrap widget-float">
|
||||
<h3 class="widget-title"><%= __('sidebar.tag_cloud') %></h3>
|
||||
<div class="widget tagcloud">
|
||||
<%- tagcloud() %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
Reference in New Issue
Block a user