initial
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<!-- 这里放网站js脚本 -->
|
||||
<%- js('js/main') %>
|
||||
@@ -0,0 +1,56 @@
|
||||
<!-- 文章 -->
|
||||
<article class="post">
|
||||
<header>
|
||||
<!-- 标签这有且只能显示一个 -->
|
||||
<% if (post.categories && post.categories.length) { %>
|
||||
<%-
|
||||
list_categories(post.categories, {
|
||||
show_count: false,
|
||||
class: 'cat',
|
||||
style: 'none',
|
||||
separator: '|'
|
||||
}).split('|')[0]
|
||||
%>
|
||||
<% } else { %>
|
||||
<a href="javascript: void(0);" class="cat">未分类</a>
|
||||
<% } %>
|
||||
<!-- 文章标题 -->
|
||||
<%- partial('post/title', { class_name: 'post-title' }) %>
|
||||
</header>
|
||||
<p class="post-meta">
|
||||
<%- post.author || 'Jelon' %> 发表于
|
||||
<%- partial('post/date', { date_format: 'YYYY-MM-DD' }) %>
|
||||
|
||||
<span class="post-tags">
|
||||
标签:
|
||||
<%- partial('post/tag') %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="post-content">
|
||||
<div class="post-excerpt">
|
||||
<% if (index == true) { %>
|
||||
<%- post.blogexcerpt || post.excerpt || post.content %>
|
||||
<% } %>
|
||||
<p class="more">
|
||||
<a href="<%- url_for(post.permalink) %>">阅读全文</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="post-thumbnail" data-img="<%- post.photos[0] %>">
|
||||
<a href="<%= post.permalink %>" title="<%= post.title %>">
|
||||
<% if (post.thumbnail) { %>
|
||||
<!--
|
||||
<%- image_tag(post.thumbnail, { class: "thumbnail" }) %>
|
||||
-->
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%= post.thumbnail %>" alt="<%= post.title %>" >
|
||||
<% } else if (post.photos.length) { %>
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%= url_for(post.photos[0]) %>" alt="<%= post.title %>" >
|
||||
<% } else if (theme.CDN) { %>
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%- url_for(theme.CDN + 'thumbnail/' + date(post.date, 'YYYY-MM-DD').charAt(date(post.date, 'YYYY-MM-DD').length - 1) + '.jpg') %>" alt="默认配图" >
|
||||
<% } else { %>
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%- url_for('img/thumbnail/' + date(post.date, 'YYYY-MM-DD').charAt(date(post.date, 'YYYY-MM-DD').length - 1) + '.jpg') %>" alt="默认配图" >
|
||||
<% } %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,27 @@
|
||||
<% if (index == true) { %>
|
||||
<h3 class="widget-hd">
|
||||
<strong>
|
||||
<% if (pagination == 2) { %>
|
||||
最近动态
|
||||
<% } else if (pagination == 3) { %>
|
||||
文章归档
|
||||
<% } else if (pagination == 4) { %>
|
||||
`<%- page.category %>`分类下的文章
|
||||
<% } else if (pagination == 5) { %>
|
||||
`<%- page.tag %>`标签下的文章
|
||||
<% } %>
|
||||
</strong>
|
||||
</h3>
|
||||
<% page.posts.each(function(post) { %>
|
||||
<%- partial('archive-post', { post: post }) %>
|
||||
<% }) %>
|
||||
|
||||
<% if (page.total >= 1){ %>
|
||||
<nav class="page-navigator">
|
||||
<%- paginator({
|
||||
prev_text: '前一页',
|
||||
next_text: '后一页'
|
||||
}) %>
|
||||
</nav>
|
||||
<% } %>
|
||||
<% } %>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!-- 文章 -->
|
||||
<article class="post article">
|
||||
<header class="text-center">
|
||||
<h3 class="post-title"><span><%= post.title %></span></h3>
|
||||
</header>
|
||||
<p class="post-meta text-center">
|
||||
<%- post.author || 'Jelon' %> 发表于
|
||||
<%- partial('post/date', { date_format: 'YYYY-MM-DD' }) %>
|
||||
</p>
|
||||
<div class="post-content">
|
||||
<%- post.content %>
|
||||
</div>
|
||||
<p class="post-meta">
|
||||
<span class="post-cat">分类:
|
||||
<%-
|
||||
list_categories(post.categories, {
|
||||
show_count: false,
|
||||
class: 'cat',
|
||||
style: 'none',
|
||||
separator: '|'
|
||||
})
|
||||
%>
|
||||
</span>
|
||||
<span class="post-tags">
|
||||
标签:
|
||||
<%- partial('post/tag') %>
|
||||
</span>
|
||||
</p>
|
||||
</article>
|
||||
<!-- 分享按钮 -->
|
||||
<%- partial('post/share') %>
|
||||
|
||||
<%- partial('post/nav', { post: post }) %>
|
||||
<!-- 文章评论 -->
|
||||
<%- partial('post/comment') %>
|
||||
@@ -0,0 +1,11 @@
|
||||
<% if (theme.baidu_analytics) { %>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?fd459238242776d173cdc64918fb32f2";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
@@ -0,0 +1,11 @@
|
||||
<footer class="footer">
|
||||
©
|
||||
<% if (new Date().getFullYear() == 2016) { %>
|
||||
<%- new Date().getFullYear() %>
|
||||
<% } else { %>
|
||||
2016-<%- new Date().getFullYear() %>
|
||||
<% } %>
|
||||
|
||||
<a href="<%- url_for() %>">Power By Hexo</a>
|
||||
</footer>
|
||||
<div class="back-to-top" id="JELON__backToTop" title="返回顶部">返回顶部</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" >
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11,IE=10,IE=9,IE=8" >
|
||||
<meta name="baidu-site-verification" content="dIcXMeY8Ya" />
|
||||
<%
|
||||
var title = page.title;
|
||||
|
||||
if (is_archive()) {
|
||||
title = '文章归档';
|
||||
if (is_month()){
|
||||
title += ': ' + page.year + '/' + page.month;
|
||||
} else if (is_year()) {
|
||||
title += ': ' + page.year;
|
||||
}
|
||||
} else if (is_category()) {
|
||||
title = '`' + page.category + '`分类下的文章';
|
||||
} else if (is_tag()) {
|
||||
title = '`' + page.tag + '`标签下的文章';
|
||||
}
|
||||
%>
|
||||
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" >
|
||||
<meta name="keywords" content="<%- theme.SEO.keywords %>" >
|
||||
<meta name="description" content="<%- theme.SEO.description %>" >
|
||||
|
||||
<% if (theme.rss) { %>
|
||||
<link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml" >
|
||||
<% } %>
|
||||
<% if (config.favicon) { %>
|
||||
<link rel="shortcut icon" href="<%- url_for(config.favicon) %>" >
|
||||
<% } else { %>
|
||||
<link rel="shortcut icon" href="<%- url_for(theme.favicon) %>" >
|
||||
<% } %>
|
||||
<%- css('css/style') %>
|
||||
<!--[if lt IE 9]>
|
||||
<%- js('js/html5') %>
|
||||
<![endif]-->
|
||||
<%- partial('baidu-analytics') %>
|
||||
</head>
|
||||
@@ -0,0 +1,52 @@
|
||||
<header class="header">
|
||||
<section class="container header-main">
|
||||
<div class="logo">
|
||||
<a href="<%- url_for() %>">
|
||||
<div class="cover">
|
||||
<span class="name"><%= config.title %></span>
|
||||
<span class="description"><%= config.subtitle %></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="dropnav icon-paragraph-justify" id="JELON__btnDropNav"></div>
|
||||
<ul class="menu hidden" id="JELON__menu">
|
||||
<% for (var i in theme.menu) { %>
|
||||
<li rel="<%= url_for(path) %>" class="item <%= url_for(theme.menu[i].link) == url_for(path).substring(0, url_for(path).lastIndexOf('/') + 1) ? 'current' : '' %>">
|
||||
<a href="<%= url_for(theme.menu[i].link) %>" title="<%= theme.menu[i].name %>" class="<%= theme.menu[i].icon %>"> <%= theme.menu[i].name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<div class="profile clearfix">
|
||||
<div class="feeds fl">
|
||||
<% if (theme.head_links.enable) { %>
|
||||
<%
|
||||
var supList = theme.head_links.list.sup,
|
||||
subList = theme.head_links.list.sub;
|
||||
%>
|
||||
<p class="links">
|
||||
<% for (var i in supList) { %>
|
||||
<a href="<%= supList[i]['link'] %>" target="_blank"><%= supList[i]['name'] %></a>
|
||||
<% if (i != 'last') { %>|<% } %>
|
||||
<% } %>
|
||||
</p>
|
||||
<p class="sns">
|
||||
<% for (var j in subList) { %>
|
||||
<a href="<%= subList[j]['link'] %>" class="<%= j %>" target="_blank"><b>■</b> <%= subList[j]['name'] %></a>
|
||||
<% } %>
|
||||
<a href="javascript: void(0);" class="wechat">
|
||||
<b>■</b>
|
||||
公众号
|
||||
<span class="popover">
|
||||
<img src="<%= url_for('img/wechat_mp.jpg') %>" width="120" height="120" alt="我的微信订阅号">
|
||||
<i class="arrow"></i>
|
||||
</span>
|
||||
</a>
|
||||
</p>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="avatar fr">
|
||||
<img src="<%- theme.avatar %>" alt="avatar" title="Jelon" >
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</header>
|
||||
@@ -0,0 +1,4 @@
|
||||
<!-- 文档分类 -->
|
||||
<% if (post.categories && post.categories.length) { %>
|
||||
|
||||
<% } %>
|
||||
@@ -0,0 +1,77 @@
|
||||
<% if (theme.comment.enable) { %>
|
||||
<%- js('js/comment') %>
|
||||
<div id="comments" class="comment">
|
||||
<!--
|
||||
<div class="sign-bar">
|
||||
GitHub 已登录!
|
||||
<span class="sign-link">登出</span>
|
||||
</div>
|
||||
<section class="box">
|
||||
<div class="com-avatar"><img src="/img/jelon.jpg" alt="avatar"></div>
|
||||
<div class="com-text">
|
||||
<div class="main">
|
||||
<textarea class="text-area-edited show" placeholder="欢迎评论!"></textarea>
|
||||
<div class="text-area-preview"></div>
|
||||
</div>
|
||||
<div class="switch">
|
||||
<div class="switch-item on">编辑</div>
|
||||
<div class="switch-item">预览</div>
|
||||
</div>
|
||||
<div class="button">提交</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tips">注:评论支持 markdown 语法!</section>
|
||||
<section class="list-wrap">
|
||||
<ul class="list">
|
||||
<li>
|
||||
<div class="user-avatar">
|
||||
<a href="/">
|
||||
<img src="/img/jelon.jpg" alt="user-avatar">
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-comment">
|
||||
<div class="user-comment-header">
|
||||
<span class="post-name">张德龙</span>
|
||||
<span class="post-time">2017年12月12日</span>
|
||||
<span class="like liked">已赞</span>
|
||||
<span class="like-num">2</span>
|
||||
</div>
|
||||
<div class="user-comment-body">333333</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="user-avatar">
|
||||
<a href="/">
|
||||
<img src="/img/jelon.jpg" alt="user-avatar">
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-comment">
|
||||
<div class="user-comment-header">
|
||||
<span class="post-name">刘德华</span>
|
||||
<span class="post-time">2017年12月12日</span>
|
||||
<span class="like">点赞</span>
|
||||
<span class="like-num">2</span>
|
||||
</div>
|
||||
<div class="user-comment-body">vvvvv</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="page-nav">
|
||||
<a href="javascript: void(0);" class="item">1</a>
|
||||
<a href="javascript: void(0);" class="item">2</a>
|
||||
<a href="javascript: void(0);" class="item current">3</a>
|
||||
</div>
|
||||
</section>
|
||||
-->
|
||||
</div>
|
||||
<script>
|
||||
JELON.Comment({
|
||||
container: 'comments',
|
||||
label: '<%- post.slug %>' || '<%- post.path %>',
|
||||
owner: '<%- theme.comment.owner %>',
|
||||
repo: '<%- theme.comment.repo %>',
|
||||
clientId: '<%- theme.comment.client_id %>',
|
||||
clientSecret: '<%- theme.comment.client_secret %>'
|
||||
});
|
||||
</script>
|
||||
<% } %>
|
||||
@@ -0,0 +1 @@
|
||||
<time datetime="<%= date_xml(post.date) %>"><%= date(post.date, date_format) %></time>
|
||||
@@ -0,0 +1,4 @@
|
||||
<% if (post.photos && post.photos.length) { %>
|
||||
<!-- 相册 -->
|
||||
|
||||
<% } %>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!-- 上一篇/下一篇 -->
|
||||
<% if (post.prev || post.next) { %>
|
||||
<div class="article-nav clearfix">
|
||||
<% if (post.prev) { %>
|
||||
<span class="prev fl">
|
||||
上一篇<br >
|
||||
<a href="<%- url_for(post.prev.path) %>">
|
||||
<% if (post.prev.title) { %>
|
||||
<%= post.prev.title %>
|
||||
<% } else { %>
|
||||
无标题
|
||||
<% } %>
|
||||
</a>
|
||||
</span>
|
||||
<% } else { %>
|
||||
<span class="prev fl">
|
||||
上一篇<br >
|
||||
<a href="javascript: void(0);">没有上一篇了</a>
|
||||
</span>
|
||||
<% } %>
|
||||
|
||||
<% if (post.next) { %>
|
||||
<span class="next fr">
|
||||
下一篇<br >
|
||||
<a href="<%- url_for(post.next.path) %>">
|
||||
<% if (post.next.title) { %>
|
||||
<%= post.next.title %>
|
||||
<% } else { %>
|
||||
无标题
|
||||
<% } %>
|
||||
</a>
|
||||
</span>
|
||||
<% } else { %>
|
||||
<span class="next fr">
|
||||
下一篇<br >
|
||||
<a href="javascript: void(0);">没有下一篇了</a>
|
||||
</span>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,12 @@
|
||||
<% if (theme.share) { %>
|
||||
<div class="article-share clearfix text-center">
|
||||
<div class="share-area">
|
||||
<span class="share-txt">分享到:</span>
|
||||
<a href="javascript: window.open('http://service.weibo.com/share/share.php?url=' + encodeURIComponent(location.href) + '&title=' + document.title + '&language=zh_cn');" class="share-icon weibo"></a>
|
||||
<a href="javascript: alert('请复制链接到微信并发送');" class="share-icon wechat"></a>
|
||||
<a href="javascript: window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(location.href) + '&title=' + document.title);" class="share-icon qqzone"></a>
|
||||
<a href="javascript: window.open('http://connect.qq.com/widget/shareqq/index.html?url=' + encodeURIComponent(location.href) + '&desc=Jelon个人博客&title=' + document.title + '&callback=' + encodeURIComponent(location.href));" class="share-icon qq"></a>
|
||||
<a href="javascript: window.open('http://shuo.douban.com/!service/share?href=' + encodeURIComponent(location.href) + '&name=' + document.title + '&text=' + document.title);" class="share-icon douban"></a>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,5 @@
|
||||
<% if (post.tags && post.tags.length) { %>
|
||||
<% post.tags.forEach(function(tag, i) { %>
|
||||
<%- link_to(tag.path, tag.name) %><% if (i != post.tags.length - 1) { %> / <% } %>
|
||||
<% }); %>
|
||||
<% } %>
|
||||
@@ -0,0 +1,13 @@
|
||||
<% if (post.link) { %>
|
||||
<h3 class="<%= class_name || 'post-title' %>">
|
||||
<a href="<%= url_for(post.link) %>">
|
||||
<%= post.title || post.link %>
|
||||
</a>
|
||||
</h3>
|
||||
<% } else if (post.title) { %>
|
||||
<h3 class="<%= class_name || 'post-title' %>">
|
||||
<a href="<%= url_for(post.permalink) %>">
|
||||
<%= post.title %>
|
||||
</a>
|
||||
</h3>
|
||||
<% } %>
|
||||
@@ -0,0 +1,31 @@
|
||||
<!-- 侧栏部分 -->
|
||||
<aside class="sidebar">
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>文章分类</strong></h3>
|
||||
<%- partial('_widget/categorys') %>
|
||||
</section>
|
||||
|
||||
<% if (theme.tagcloud) { %>
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>热门标签</strong></h3>
|
||||
<%- partial('_widget/tags') %>
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.weibo_show.enable) { %>
|
||||
<!-- 我的微博 -->
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>我的微博</strong></h3>
|
||||
<%- partial('_widget/weibo') %>
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.friends.enable && theme.friends['list']) { %>
|
||||
<!-- 友情链接 -->
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>友情链接</strong></h3>
|
||||
<%- partial('_widget/friend_links') %>
|
||||
</section>
|
||||
<% } %>
|
||||
</aside>
|
||||
<!-- / 侧栏部分 -->
|
||||
Reference in New Issue
Block a user