refactor: please refer to Hueman theme

This commit is contained in:
ppoffice 2016-02-03 00:19:44 +08:00
parent 3e929ba435
commit d30c6d5fbe
220 changed files with 6682 additions and 2243 deletions

View File

@ -1,7 +1,4 @@
# Logo
logo: css/images/logo.png # Empty this to unset logo and show site title in the same place
# Header
# Menus
menu:
Home: .
Archives: archives
@ -9,47 +6,67 @@ menu:
Tags: tags
About: about
# Content
excerpt_link: Read More
fancybox: true
# Customize
customize:
logo:
width: 40
height: 40
url: images/logo.png
profile:
enabled: true # Whether to show profile bar
avatar: css/images/avatar.png
gravatar: # Gravatar email address, if you enable Gravatar, your avatar config will be overriden
author: PPOffice
author_title: 'Web Developer & Designer'
location: 'Harbin, China'
follow: https://github.com/ppoffice/
highlight: androidstudio
sidebar: right # sidebar position, options: left, right
thumbnail: true # enable posts thumbnail, options: true, false
favicon: # path to favicon
social_links:
github: http://github.com/ppoffice/hexo-theme-icarus
twitter: /
facebook: /
dribbble: /
rss: /
# Profile
profile: true # Whether to show profile bar
gravatar: false # Whether to use gravatar with the email. If you do, put your email address in your site's `_config.yml`.
# Sidebar
sidebar: right # set to false if you don't want a sidebar
# Widgets
widgets:
- recent_posts
- category
- tag
- tagcloud
- archive
thumbnail: true
- recent_posts
- category
- archive
- tag
- tagcloud
- links
# Contacts
contacts:
github: http://github.com/ppoffice/hexo-theme-icarus
twitter: '#'
facebook: '#'
dribbble: '#'
rss: atom.xml
# Search
search:
swiftype: # enter swiftype install key here
baidu: false # you need to disable other search engines to use Baidu search, options: true, false
# Links
links:
Hexo: http://hexo.io
# Comment
comment:
disqus: hexo-theme-icarus # enter disqus shortname here
duoshuo: # enter duoshuo shortname here
youyan: # enter youyan uid here
# CDN
cdn: # You can choose "useso" instead of "google apis"(default).
# cdn: useso
# OR
# cdn:
# Share
share: default # options: jiathis, bdshare, addtoany, default
# Plugins
plugins:
fancybox: true # options: true, false
google_analytics: # enter the tracking ID for your Google Analytics
google_site_verification: # enter Google site verification code
baidu_analytics: # enter Baidu Analytics hash key
# Miscellaneous
google_site_verification:
google_analytics:
favicon: favicon.png
twitter:
google_plus:
fb_admins:
fb_app_id:
miscellaneous:
open_graph: # see http://ogp.me
fb_app_id:
fb_admins:
twitter_id:
google_plus:
links:
Hexo: http://hexo.io

View File

@ -1,87 +0,0 @@
# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Icarus
subtitle:
description: Hexo theme - Icarus
author: PPOffice
author_title: 'Web Developer & Designer'
avatar: css/images/avatar.png
location: 'Harbin, China'
follow: https://github.com/ppoffice/
email: # Your email (Used to show Gravatar).
language: en
timezone:
since: 2000 # The start year showing in your copyright section.
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://ppoffice.github.io/hexo-theme-icarus
root: /hexo-theme-icarus/
permalink: :year/:month/:day/:title/
permalink_defaults:
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
tab_replace:
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
# Pagination
## Set per_page to 0 to disable pagination
per_page: 6
pagination_dir: page
# Extensions
## Plugins: https://github.com/hexojs/hexo/wiki/Plugins
## Themes: https://github.com/hexojs/hexo/wiki/Themes
theme: icarus
# Disqus
# disqus_shortname: hexo-theme-icarus
# DuoShuo
# duoshuo_shortname: hexo-theme-icarus
# Swiftype
# swiftype_install_key: XXX_XXXXXXXXXXXXXXXX
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: git
repository: https://github.com/ppoffice/hexo-theme-icarus.git
branch: gh-pages

View File

@ -1,29 +1,30 @@
index:
home: 'home'
search: 'Search'
archive: 'archive'
category: 'category'
uncategorized: 'uncategorized'
tag: 'tag'
home: 'home'
search: 'Search'
archive: 'archive'
category: 'category'
uncategorized: 'uncategorized'
tag: 'tag'
nav:
next: 'Next'
prev: 'Prev'
older: 'Older'
newer: 'Newer'
next: 'Next'
prev: 'Prev'
older: 'Older'
newer: 'Newer'
widget:
recents: 'recents'
archives: 'archives'
categories: 'categories'
links: 'links'
tags: 'tags'
tag_cloud: 'tag cloud'
recents: 'recents'
archives: 'archives'
categories: 'categories'
links: 'links'
tags: 'tags'
tag_cloud: 'tag cloud'
article:
comments: 'Comments'
share: 'Share'
catalogue: 'Catalogue'
more: 'Read More'
comments: 'Comments'
share: 'Share'
catalogue: 'Catalogue'
profile:
follow: 'FOLLOW'
post: 'post'
tag: 'tag'
posts: 'posts'
tags: 'tags'
follow: 'FOLLOW'
post: 'post'
tag: 'tag'
posts: 'posts'
tags: 'tags'

View File

@ -1,30 +1,30 @@
#By SrWoOoW
#By SrWoOoW
index:
home: 'Inicio'
search: 'Buscar'
archive: 'Archivo'
category: 'Categoria'
uncategorized: 'Sin categoría'
tag: 'Etiqueta'
home: 'Inicio'
search: 'Buscar'
archive: 'Archivo'
category: 'Categoria'
uncategorized: 'Sin categoría'
tag: 'Etiqueta'
nav:
next: 'Siguiente '
prev: 'Anterior'
older: 'Más viejo'
newer: 'Más nuevo'
next: 'Siguiente '
prev: 'Anterior'
older: 'Más viejo'
newer: 'Más nuevo'
widget:
recents: 'Recientes'
archives: 'Archivos'
categories: 'Categorias'
links: 'Links'
tags: 'Etiquetas'
tag_cloud: 'Nube de etiquetas'
recents: 'Recientes'
archives: 'Archivos'
categories: 'Categorias'
links: 'Links'
tags: 'Etiquetas'
tag_cloud: 'Nube de etiquetas'
article:
comments: 'Comentarios'
share: 'Compartir'
catalogue: 'Catálogo'
comments: 'Comentarios'
share: 'Compartir'
catalogue: 'Catálogo'
profile:
follow: 'SEGUIR'
post: 'Entrada'
tag: 'Etiqueta'
posts: 'Entradas'
tags: 'Etiquetas'
follow: 'SEGUIR'
post: 'Entrada'
tag: 'Etiqueta'
posts: 'Entradas'
tags: 'Etiquetas'

View File

@ -1,29 +1,29 @@
index:
home: 'Racine'
search: 'Rechercher'
archive: 'Archive'
category: 'Catégorie'
uncategorized: 'Sans catégorie'
tag: 'Tag'
home: 'Racine'
search: 'Rechercher'
archive: 'Archive'
category: 'Catégorie'
uncategorized: 'Sans catégorie'
tag: 'Tag'
nav:
next: 'Suiv'
prev: 'Préc'
older: 'Plus ancien'
newer: 'Plus récent'
next: 'Suiv'
prev: 'Préc'
older: 'Plus ancien'
newer: 'Plus récent'
widget:
recents: 'Récents'
archives: 'Archives'
categories: 'Catégories'
links: 'Liens'
tags: 'Tags'
tag_cloud: 'Nuage de tags'
recents: 'Récents'
archives: 'Archives'
categories: 'Catégories'
links: 'Liens'
tags: 'Tags'
tag_cloud: 'Nuage de tags'
article:
comments: 'Commentaires'
share: 'Partager'
catalogue: 'Catalogue'
comments: 'Commentaires'
share: 'Partager'
catalogue: 'Catalogue'
profile:
follow: 'SUIVRE'
post: 'Article'
tag: 'Tag'
posts: 'Articles'
tags: 'Tags'
follow: 'SUIVRE'
post: 'Article'
tag: 'Tag'
posts: 'Articles'
tags: 'Tags'

View File

@ -1,28 +1,28 @@
index:
home: 'home'
search: 'Cari'
archive: 'arsip'
category: 'kategori'
uncategorized: 'tanpa kategori'
tag: 'tag'
home: 'home'
search: 'Cari'
archive: 'arsip'
category: 'kategori'
uncategorized: 'tanpa kategori'
tag: 'tag'
nav:
next: 'Berikutnya'
prev: 'Sebelumnya'
older: 'Lebih Tua'
newer: 'Lebih baru'
next: 'Berikutnya'
prev: 'Sebelumnya'
older: 'Lebih Tua'
newer: 'Lebih baru'
widget:
recents: 'terbaru'
archives: 'arsip'
categories: 'kategori'
links: 'tautan'
tags: 'tag'
tag_cloud: 'awan tag'
recents: 'terbaru'
archives: 'arsip'
categories: 'kategori'
links: 'tautan'
tags: 'tag'
tag_cloud: 'awan tag'
article:
comments: 'Komentar'
share: 'Bagikan'
comments: 'Komentar'
share: 'Bagikan'
profile:
follow: 'IKUTI'
post: 'pos'
tag: 'tag'
posts: 'pos'
tags: 'tag'
follow: 'IKUTI'
post: 'pos'
tag: 'tag'
posts: 'pos'
tags: 'tag'

View File

@ -1,29 +1,29 @@
index:
home: 'ホーム'
search: '検索'
archive: 'アーカイブ'
category: 'カテゴリ'
uncategorized: '未分類'
tag: 'タグ'
home: 'ホーム'
search: '検索'
archive: 'アーカイブ'
category: 'カテゴリ'
uncategorized: '未分類'
tag: 'タグ'
nav:
next: '次'
prev: '前'
older: '古い記事'
newer: '新しい記事'
next: '次'
prev: '前'
older: '古い記事'
newer: '新しい記事'
widget:
recents: '最近の記事'
archives: 'アーカイブ'
categories: 'カテゴリ'
links: 'リンク'
tags: 'タグ'
tag_cloud: 'タグクラウド'
recents: '最近の記事'
archives: 'アーカイブ'
categories: 'カテゴリ'
links: 'リンク'
tags: 'タグ'
tag_cloud: 'タグクラウド'
article:
comments: 'コメント'
share: '共有'
catalogue: 'カタログ'
comments: 'コメント'
share: '共有'
catalogue: 'カタログ'
profile:
follow: 'フォローする'
post: '投稿'
tag: 'タグ'
posts: '投稿'
tags: 'タグ'
follow: 'フォローする'
post: '投稿'
tag: 'タグ'
posts: '投稿'
tags: 'タグ'

View File

@ -1,29 +1,29 @@
index:
home: 'Главная'
search: 'Поиск'
archive: 'архив'
category: 'категории'
uncategorized: 'без категории'
tag: 'тэг'
home: 'Главная'
search: 'Поиск'
archive: 'архив'
category: 'категории'
uncategorized: 'без категории'
tag: 'тэг'
nav:
next: 'Далее'
prev: 'Назад'
older: 'Старые'
newer: 'Новые'
next: 'Далее'
prev: 'Назад'
older: 'Старые'
newer: 'Новые'
widget:
recents: 'недавние'
archives: 'архивы'
categories: 'категории'
links: 'ссылки'
tags: 'тэги'
tag_cloud: 'облако тэгов'
recents: 'недавние'
archives: 'архивы'
categories: 'категории'
links: 'ссылки'
tags: 'тэги'
tag_cloud: 'облако тэгов'
article:
comments: 'Комментарии'
share: 'Поделиться'
catalogue: 'Каталог'
comments: 'Комментарии'
share: 'Поделиться'
catalogue: 'Каталог'
profile:
follow: 'Подписаться'
post: 'пост'
tag: 'тэг'
posts: 'посты'
tags: 'тэги'
follow: 'Подписаться'
post: 'пост'
tag: 'тэг'
posts: 'посты'
tags: 'тэги'

View File

@ -1,29 +1,30 @@
index:
home: '主页'
search: '搜索'
archive: '归档'
category: '分类'
uncategorized: '未分类'
tag: '标签'
home: '主页'
search: '搜索'
archive: '归档'
category: '分类'
uncategorized: '未分类'
tag: '标签'
nav:
next: '下一页'
prev: '上一页'
older: '下一篇'
newer: '上一篇'
next: '下一页'
prev: '上一页'
older: '下一篇'
newer: '上一篇'
widget:
recents: '最新文章'
archives: '归档'
categories: '分类'
links: '链接'
tags: '标签'
tag_cloud: '标签云'
recents: '最新文章'
archives: '归档'
categories: '分类'
links: '链接'
tags: '标签'
tag_cloud: '标签云'
article:
comments: '评论'
share: '分享到'
catalogue: '文章目录'
more: '查看更多'
comments: '评论'
share: '分享到'
catalogue: '文章目录'
profile:
follow: '关注我'
post: '文章'
tag: '标签'
posts: '文章'
tags: '标签'
follow: '关注我'
post: '文章'
tag: '标签'
posts: '文章'
tags: '标签'

View File

@ -1,29 +1,29 @@
index:
home: '主頁'
search: '搜尋'
archive: '歸檔'
category: '分類'
uncategorized: '未分類'
tag: '標籤'
home: '主頁'
search: '搜尋'
archive: '歸檔'
category: '分類'
uncategorized: '未分類'
tag: '標籤'
nav:
next: '下一頁'
prev: '上一頁'
older: '下一篇'
newer: '上一篇'
next: '下一頁'
prev: '上一頁'
older: '下一篇'
newer: '上一篇'
widget:
recents: '最新文章'
archives: '歸檔'
categories: '分類'
links: '連結'
tags: '標籤'
tag_cloud: '標籤雲'
recents: '最新文章'
archives: '歸檔'
categories: '分類'
links: '連結'
tags: '標籤'
tag_cloud: '標籤雲'
article:
comments: '評論'
share: '分享到'
catalogue: '文章目錄'
comments: '評論'
share: '分享到'
catalogue: '文章目錄'
profile:
follow: '關注我'
post: '文章'
tag: '標籤'
posts: '文章'
tags: '標籤'
follow: '關注我'
post: '文章'
tag: '標籤'
posts: '文章'
tags: '標籤'

View File

@ -1,45 +0,0 @@
<% if (config.disqus_shortname){ %>
<script>
var disqus_shortname = '<%= config.disqus_shortname %>';
(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 if (config.duoshuo_shortname){ %>
<script type="text/javascript">
var duoshuoQuery = {short_name:"<%= config.duoshuo_shortname %>"};
(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>
<% } %>
<% if (config.swiftype_install_key) { %>
<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','<%= config.swiftype_install_key %>','2.0.0');
</script>
<% } %>
<%- partial('cdn_after_footer') %>
<% if (theme.fancybox){ %>
<%- css('fancybox/jquery.fancybox') %>
<%- js('fancybox/jquery.fancybox.pack') %>
<% } %>
<%- js('js/script') %>

View File

@ -1,17 +0,0 @@
<article class="archive-article archive-type-<%= post.layout %>">
<div class="archive-article-inner">
<% if(theme.thumbnail == true) { %>
<div class="archive-article-thumbnail">
<%- partial('post/thumbnail.ejs', {post: post}) %>
</div>
<% } %>
<header class="archive-article-header">
<%- partial('post/title', {class_name: 'archive-article-title'}) %>
<% if(archive) { %>
<%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %>
<% } else { %>
<%- partial('post/date', {class_name: 'archive-article-date', date_format: 'YYYY MMM D'}) %>
<% } %>
</header>
</div>
</article>

View File

@ -1,82 +0,0 @@
<% switch (type) {
case 'archive':
var last;
page.posts.each(function(post, i){
var year = post.date.year();
if (last != year){
if (last != null){ %>
</div></section>
<% }
last = year; %>
<div class="archive-year-wrap">
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
</div>
<section class="archives-wrap">
<div class="archives">
<% } %>
<%- partial('archive-post', {post: post, archive: true}) %>
<% });
if (page.posts.length){ %>
</div></section>
<% }
if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
case 'category': %>
<section class="archives-wrap">
<div class="archive-category-wrap">
<span class="archive-category"><%= page.category %></span>
</div>
<div class="archives">
<% page.posts.each(function (post, i) { %>
<%- partial('archive-post', {post: post, archive: false}) %>
<% }); %>
</div></section>
<% if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
case 'tag': %>
<section class="archives-wrap">
<div class="archive-tag-wrap">
<span class="archive-tag">#<%= page.tag %></span>
</div>
<div class="archives">
<% page.posts.each(function (post, i) { %>
<%- partial('archive-post', {post: post, archive: false}) %>
<% }); %>
</div></section>
<% if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
default:
page.posts.each(function(post){ %>
<%- partial('article', {post: post, index: true}) %>
<% })
if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
} %>

View File

@ -1,61 +0,0 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<div class="article-inner">
<% if (post.banner){ %>
<%- partial('post/banner') %>
<% } %>
<%- partial('post/gallery') %>
<% if (post.link || post.title){ %>
<header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %>
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
</div>
</header>
<% } %>
<div class="article-entry" itemprop="articleBody">
<% if (post.excerpt && index){ %>
<%- post.excerpt %>
<% if (theme.excerpt_link){ %>
<p class="article-more-link">
<a href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %></a>
</p>
<% } %>
<% } else { %>
<% if (!index && post.toc){ %>
<div id="toc" class="toc-article">
<strong class="toc-title"><%= __('article.catalogue') %></strong>
<%- toc(post.content) %>
</div>
<% } %>
<%- post.content %>
<% } %>
</div>
<footer class="article-footer">
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('article.share') %></a>
<% if (post.comments && config.disqus_shortname){ %>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('article.comments') %></a>
<% } else if (post.comments && config.duoshuo_shortname){ %>
<a href="<%- post.permalink %>#ds-thread" class="article-comment-link"><%= __('article.comments') %></a>
<% } %>
<%- partial('post/tag') %>
</footer>
</div>
<% if (!index){ %>
<%- partial('post/nav') %>
<% } %>
</article>
<% if (!index && post.comments && config.disqus_shortname){ %>
<section id="comments">
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>
<% } else if (!index && post.comments && config.duoshuo_shortname){ %>
<section id="comments">
<div id="ds-thread" class="ds-thread" data-thread-key="<%- post.permalink %>" data-title="<%- post.title %>" data-url="<%- post.permalink %>">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by DuoShuo.</a></noscript>
</div>
</section>
<% } %>

View File

@ -1,7 +0,0 @@
<% if (theme.cdn == "useso"){ %>
<script src="//ajax.useso.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } else if (theme.cdn == "ustc") { %>
<script src="//ajax.lug.ustc.edu.cn/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } else { %>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } %>

View File

@ -1,10 +0,0 @@
<% if (theme.cdn == "useso"){ %>
<link href='//fonts.useso.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
<link href="//fonts.useso.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<% } else if (theme.cdn == "ustc") { %>
<link href='//fonts.lug.ustc.edu.cn/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
<link href="//fonts.lug.ustc.edu.cn/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<% } else { %>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<% } %>

View File

@ -1,11 +0,0 @@
<footer id="footer">
<% if (theme.sidebar === 'bottom'){ %>
<%- partial('_partial/sidebar') %>
<% } %>
<div class="outer">
<div id="footer-info" class="inner">
&copy; <% if (config.since && config.since != date(new Date(), 'YYYY')){ %><%= config.since %> - <% } %><%= date(new Date(), 'YYYY') %> <%= config.author || config.title %><br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. Theme by <a href="http://github.com/ppoffice">PPOffice</a>
</div>
</div>
</footer>

View File

@ -1,3 +0,0 @@
<% if (theme.google_site_verification){ %>
<meta name="google-site-verification" content="<%= theme.google_site_verification %>" />
<% } %>

View File

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<%
var title = page.title;
if (is_archive()){
title = 'Archives';
if (is_month()){
title += ': ' + page.year + '/' + page.month;
} else if (is_year()){
title += ': ' + page.year;
}
} else if (is_category()){
title = 'Category: ' + page.category;
} else if (is_tag()){
title = 'Tag: ' + page.tag;
}
%>
<title><% if (title){ %><%= title %> | <% } %><%= config.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
<% if (theme.rss){ %>
<link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">
<% } %>
<% if (theme.favicon){ %>
<link rel="icon" href="<%- theme.favicon %>">
<% } %>
<%- partial('cdn_head') %>
<%- css('css/style') %>
<%- css('font-awesome/css/font-awesome.min') %>
<%- partial('google-analytics') %>
<%- partial('google_site_verification') %>
<% if( theme.customstylesheet ){ %>
<%- css('css/'+theme.customstylesheet) %>
<% } %>
</head>

View File

@ -1,47 +0,0 @@
<header id="header">
<div id="header-main" class="header-inner">
<div class="outer">
<a href="<%- url_for() %>" id="logo"><%- (theme.logo? '<i class="logo" style="background-image: url(' + url_for(theme.logo) + ')"></i>':'') %><span class="site-title"><%= config.title %></span></a>
<nav id="main-nav">
<% for (var i in theme.menu){ %>
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
<% } %>
</nav>
<% if(theme.profile) { %>
<nav id="sub-nav">
<div class="profile" id="profile-nav">
<a id="profile-anchor" href="javascript:;"><img class="avatar" src="<%= ( theme.gravatar ? gravatar(config.email) : url_for(config.avatar)) %>"><i class="fa fa-caret-down"></i></a>
</div>
</nav>
<% } %>
<div id="search-form-wrap">
<% if (config.swiftype_install_key) { %>
<form class="search-form">
<input type="text" class="st-default-search-input search-form-input" placeholder="<%= __('index.search') %>">
<button type="submit" class="search-form-submit"></button>
</form>
<% } else { %>
<%- search_form({ button: ' ', text: __('index.search') }) %>
<% } %>
</div>
</div>
</div>
<div id="main-nav-mobile" class="header-sub header-inner">
<table class="menu outer">
<tr>
<% for (var i in theme.menu){ %>
<td><a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a></td>
<% } %>
<td>
<% if (config.swiftype_install_key) { %>
<div class="search-form">
<input type="text" class="st-default-search-input search-form-input" placeholder="<%= __('index.search') %>">
</div>
<% } else { %>
<%- search_form({ text: __('index.search') }) %>
<% } %>
</td>
</tr>
</table>
</div>
</header>

View File

@ -1,10 +0,0 @@
<% if (post.link){ %>
<a href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><img src="<%- post.banner %>" class="article-banner"></a>
<% } else if (post.title){ %>
<% if (index){ %>
<a href="<%- url_for(post.path) %>" itemprop="url"><img src="<%- post.banner %>" class="article-banner"></a>
<% } else { %>
<img src="<%- post.banner %>" class="article-banner">
<% } %>
<% } %>

View File

@ -1,11 +0,0 @@
<% if (post.categories && post.categories.length){ %>
<div class="article-category">
<i class="fa fa-folder"></i>
<%- list_categories(post.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '<i class="fa fa-angle-right"></i>'
}) %>
</div>
<% } %>

View File

@ -1,8 +0,0 @@
<% if (post.date && !post.hidedate){ %>
<div class="<%= class_name %>">
<i class="fa fa-calendar"></i>
<a href="<%- url_for(post.path) %>">
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
</a>
</div>
<% } %>

View File

@ -1,11 +0,0 @@
<% if (post.photos && post.photos.length){ %>
<div class="article-gallery">
<div class="article-gallery-photos">
<% post.photos.forEach(function(photo, i){ %>
<a class="article-gallery-img fancybox" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
<img src="<%- url_for(photo) %>" itemprop="image">
</a>
<% }) %>
</div>
</div>
<% } %>

View File

@ -1,22 +0,0 @@
<% 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"><%= __('nav.newer') %></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) %>" id="article-nav-older" class="article-nav-link-wrap">
<strong class="article-nav-caption"><%= __('nav.older') %></strong>
<div class="article-nav-title"><%= post.next.title %></div>
</a>
<% } %>
</nav>
<% } %>

View File

@ -1,6 +0,0 @@
<% if (post.tags && post.tags.length){ %>
<%- list_tags(post.tags, {
show_count: false,
class: 'article-tag'
}) %>
<% } %>

View File

@ -1,38 +0,0 @@
<a href="<%- url_for((post.link?post.link:post.path)) %>" class="thumbnail">
<%
var s = "";
if (post.thumbnail){
s = post.thumbnail;
}else if (post.banner){
s = post.banner;
}else if (post.photos && post.photos.length){
s = post.photos[0];
}else{
var img=/\<img\s.*?\s?src\s*=\s*['|"]?([^\s'"]+).*?\>/ig;
var result = post.content.match(img);
result = img.exec(post.content);
if(result != null) {
for(var i = result.length -1; i; --i){
s += result[i]+"\n";
}
}
}
if(s.length > 0){
if(config.post_asset_folder){
var pattern = /^[\\{0,1}\/{0,1}]([^\/^\\]+)/,
pattern_ = /([^\/^\\]+)/;
if((ret = pattern.exec(s)) != null) {
if(ret[0].length == s.length)
s = config.root + post.path + ret[1];
} else if ((ret = pattern_.exec(s)) != null) {
if(ret[0].length == s.length)
s = config.root + post.path + ret[1];
}
}
%>
<span style="background-image:url(<%- url_for(s) %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
<% } else { %>
<span class="thumbnail-image thumbnail-none"></span>
<% } %>
</a>

View File

@ -1,15 +0,0 @@
<% 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 (index){ %>
<h1 itemprop="name">
<a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
</h1>
<% } else { %>
<h1 class="<%= class_name %>" itemprop="name">
<%= post.title %>
</h1>
<% } %>
<% } %>

View File

@ -1,38 +0,0 @@
<aside id="profile">
<div class="inner profile-inner">
<div class="base-info profile-block">
<img id="avatar" src="<%= ( theme.gravatar ? gravatar(config.email) : url_for(config.avatar)) %>">
<h2 id="name"><%= config.author %></h2>
<h3 id="title"><%= config.author_title %></h3>
<span id="location"><i class="fa fa-map-marker"></i><%= config.location %></span>
<a id="follow" href="<%= config.follow %>"><%= __('profile.follow') %></a>
</div>
<div class="article-info profile-block">
<div class="article-info-block">
<%= site.posts.length %>
<span><%= (site.posts.length > 1 ? __('profile.posts') : __('profile.post')) %></span>
</div>
<div class="article-info-block">
<%= site.tags.length %>
<span><%= (site.tags.length > 1 ? __('profile.tags') : __('profile.tag')) %></span>
</div>
</div>
<% if(theme.contacts) { %>
<div class="contact-info profile-block">
<table class="contact-list">
<tr>
<% for(var i in theme.contacts) { %>
<td><a href="<%- url_for(theme.contacts[i]) %>" target="_blank" title="<%= i %>"><i class="fa fa-<%= i %>"></i></a></td>
<% } %>
</tr>
</table>
</div>
<% } %>
<% if(theme.about) { %>
<div class="article-info profile-block bio">
<h2>About</h2>
<p><%- theme.about %></p>
</div>
<% } %>
</div>
</aside>

View File

@ -1,6 +0,0 @@
<aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>
<% theme.widgets.forEach(function(widget){ %>
<%- partial('_widget/' + widget) %>
<% }) %>
<div id="toTop" class="fa fa-chevron-up"></div>
</aside>

View File

@ -1,8 +0,0 @@
<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.archives') %></h3>
<div class="widget">
<%- list_archives() %>
</div>
</div>
<% } %>

View File

@ -1,8 +0,0 @@
<% if (site.categories.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.categories') %></h3>
<div class="widget">
<%- list_categories() %>
</div>
</div>
<% } %>

View File

@ -1,14 +0,0 @@
<% if (site.posts.length){ %>
<div class="widget-wrap widget-list">
<h3 class="widget-title"><%= __('widget.links') %></h3>
<div class="widget">
<ul>
<% for (var i in theme.links){ %>
<li>
<a href="<%- theme.links[i] %>"><%= i %></a>
</li>
<% } %>
</ul>
</div>
</div>
<% } %>

View File

@ -1,23 +0,0 @@
<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.recents') %></h3>
<div class="widget">
<ul id="recent-post" class="<%= (theme.thumbnail?'':'no-thumbnail') %>">
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
<li>
<% if(theme.thumbnail == true) { %>
<div class="item-thumbnail">
<%- partial('../_partial/post/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="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>
<% } %>

View File

@ -1,8 +0,0 @@
<% if (site.tags.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.tags') %></h3>
<div class="widget">
<%- list_tags() %>
</div>
</div>
<% } %>

View File

@ -1,8 +0,0 @@
<% if (site.tags.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.tag_cloud') %></h3>
<div class="widget tagcloud">
<%- tagcloud() %>
</div>
</div>
<% } %>

View File

@ -1 +1 @@
<%- partial('_partial/archive', {type: 'archive', index: true}) %>
<%- partial('common/archive', {type: 'archive', index: true}) %>

View File

@ -1,10 +1,10 @@
<section class="layout-wrap">
<div class="layout-title">
<span><%= page.title %></span>
</div>
<div class="layout-wrap-inner list-categories">
<% if(site.categories.length) { %>
<%- list_categories(site.categories) %>
<% } %>
</div>
<div class="layout-title">
<span><%= page.title %></span>
</div>
<div class="layout-wrap-inner list-categories">
<% if(site.categories.length) { %>
<%- list_categories(site.categories) %>
<% } %>
</div>
</section>

View File

@ -1 +1 @@
<%- partial('_partial/archive', {type: 'category', index: true}) %>
<%- partial('common/archive', {type: 'category', index: true}) %>

19
layout/comment/disqus.ejs Normal file
View File

@ -0,0 +1,19 @@
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
<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>

View File

@ -0,0 +1,49 @@
<div class="ds-thread" data-thread-key="<%= post.layout %>-<%= post.slug %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div>
<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>
<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
layout/comment/index.ejs Normal file
View File

@ -0,0 +1,11 @@
<% 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') %>
<% } %>
</section>
<% } %>

View File

@ -0,0 +1,2 @@
<div id="uyan_frame"></div>
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=<%= theme.comment.youyan %>"></script>

View File

@ -0,0 +1,17 @@
<article class="archive-article archive-type-<%= post.layout %>">
<div class="archive-article-inner">
<% if(theme.customize.thumbnail == true) { %>
<div class="archive-article-thumbnail">
<%- partial('thumbnail.ejs', {post: post}) %>
</div>
<% } %>
<header class="archive-article-header">
<%- partial('post/title', {class_name: 'archive-article-title'}) %>
<% if(archive) { %>
<%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %>
<% } else { %>
<%- partial('post/date', {class_name: 'archive-article-date', date_format: 'YYYY MMM D'}) %>
<% } %>
</header>
</div>
</article>

82
layout/common/archive.ejs Normal file
View File

@ -0,0 +1,82 @@
<% switch (type) {
case 'archive':
var last;
page.posts.each(function(post, i) {
var year = post.date.year();
if (last != year) {
if (last != null) { %>
</div></section>
<% }
last = year; %>
<div class="archive-year-wrap">
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
</div>
<section class="archives-wrap">
<div class="archives">
<% } %>
<%- partial('archive-post', {post: post, archive: true}) %>
<% });
if (page.posts.length) { %>
</div></section>
<% }
if (page.total > 1) { %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
case 'category': %>
<section class="archives-wrap">
<div class="archive-category-wrap">
<span class="archive-category"><%= page.category %></span>
</div>
<div class="archives">
<% page.posts.each(function (post, i) { %>
<%- partial('archive-post', {post: post, archive: false}) %>
<% }); %>
</div></section>
<% if (page.total > 1) { %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
case 'tag': %>
<section class="archives-wrap">
<div class="archive-tag-wrap">
<span class="archive-tag">#<%= page.tag %></span>
</div>
<div class="archives">
<% page.posts.each(function (post, i) { %>
<%- partial('archive-post', {post: post, archive: false}) %>
<% }); %>
</div></section>
<% if (page.total > 1) { %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
default:
page.posts.each(function(post) { %>
<%- partial('article', {post: post, index: true}) %>
<% })
if (page.total > 1) { %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; ' + __('nav.prev'),
next_text: __('nav.next') + ' &raquo;'
}) %>
</nav>
<% }
break;
} %>

49
layout/common/article.ejs Normal file
View File

@ -0,0 +1,49 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<div class="article-inner">
<% if (post.banner) { %>
<%- partial('post/banner') %>
<% } %>
<%- partial('post/gallery') %>
<% if (post.link || post.title) { %>
<header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %>
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
<%- partial('post/tag') %>
</div>
</header>
<% } %>
<div class="article-entry" itemprop="articleBody">
<% if (index) { %>
<%- excerpt(post) %>
<p class="article-more-link">
<a href="<%- url_for(post.path) %>#more"><%= __('article.more') %></a>
</p>
<% } else { %>
<% if (!index && post.toc) { %>
<div id="toc" class="toc-article">
<strong class="toc-title"><%= __('article.catalogue') %></strong>
<%- toc(post.content) %>
</div>
<% } %>
<%- post.content %>
<% } %>
</div>
<footer class="article-footer">
<%- partial('share/index', { post: post }) %>
<% if (post.comments && config.disqus_shortname) { %>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('article.comments') %></a>
<% } else if (post.comments && config.duoshuo_shortname) { %>
<a href="<%- post.permalink %>#ds-thread" class="article-comment-link"><%= __('article.comments') %></a>
<% } %>
</footer>
</div>
<% if (!index) { %>
<%- partial('post/nav') %>
<% } %>
</article>
<% if (!index) { %>
<%- partial('comment/index') %>
<% } %>

8
layout/common/footer.ejs Normal file
View File

@ -0,0 +1,8 @@
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %><br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. Theme by <a href="http://github.com/ppoffice">PPOffice</a>
</div>
</div>
</footer>

46
layout/common/head.ejs Normal file
View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<%
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>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<%- 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,
}) %>
<% if (theme.rss) { %>
<link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml" />
<% } %>
<% if (theme.customize.favicon) { %>
<link rel="icon" href="<%- url_for(theme.customize.favicon) %>" />
<% } %>
<%- css('vendor/font-awesome/css/font-awesome.min') %>
<%- css('vendor/open-sans/styles') %>
<%- css('vendor/source-code-pro/styles') %>
<%- css('css/style') %>
<%- js('vendor/jquery/2.1.3/jquery.min') %>
<%- partial('plugin/scripts', { isHead: true }) %>
</head>

38
layout/common/header.ejs Normal file
View File

@ -0,0 +1,38 @@
<header id="header">
<div id="header-main" class="header-inner">
<div class="outer">
<a href="<%- url_for() %>" id="logo">
<%- (theme.customize.logo ? '<i class="logo"></i>':'') %>
<span class="site-title"><%= config.title %></span>
</a>
<nav id="main-nav">
<% for (var i in theme.menu) { %>
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
<% } %>
</nav>
<% if(theme.customize.profile) { %>
<nav id="sub-nav">
<div class="profile" id="profile-nav">
<a id="profile-anchor" href="javascript:;">
<img class="avatar" src="<%= ( theme.gravatar ? gravatar(config.email) : url_for(config.avatar)) %>" />
<i class="fa fa-caret-down"></i>
</a>
</div>
</nav>
<% } %>
<%- partial('search/index') %>
</div>
</div>
<div id="main-nav-mobile" class="header-sub header-inner">
<table class="menu outer">
<tr>
<% for (var i in theme.menu) { %>
<td><a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a></td>
<% } %>
<td>
<%- partial('search/index-mobile') %>
</td>
</tr>
</table>
</div>
</header>

View File

@ -0,0 +1,14 @@
<% if (post.link) { %>
<a href="<%- url_for(post.link) %>" target="_blank" itemprop="url">
<img src="<%- post.banner %>" class="article-banner" />
</a>
<% } else if (post.title) { %>
<% if (index) { %>
<a href="<%- url_for(post.path) %>" itemprop="url">
<img src="<%- post.banner %>" class="article-banner" />
</a>
<% } else { %>
<img src="<%- post.banner %>" class="article-banner" />
<% } %>
<% } %>

View File

@ -0,0 +1,11 @@
<% if (post.categories && post.categories.length) { %>
<div class="article-category">
<i class="fa fa-folder"></i>
<%- list_categories(post.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '<i class="fa fa-angle-right"></i>'
}) %>
</div>
<% } %>

View File

@ -0,0 +1,8 @@
<% if (post.date && !post.hidedate) { %>
<div class="<%= class_name %>">
<i class="fa fa-calendar"></i>
<a href="<%- url_for(post.path) %>">
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
</a>
</div>
<% } %>

View File

@ -0,0 +1,11 @@
<% if (post.photos && post.photos.length) { %>
<div class="article-gallery">
<div class="article-gallery-photos">
<% post.photos.forEach(function(photo, i) { %>
<a class="article-gallery-img fancybox" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
<img src="<%- url_for(photo) %>" itemprop="image">
</a>
<% }) %>
</div>
</div>
<% } %>

View File

@ -0,0 +1,22 @@
<% 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"><%= __('nav.newer') %></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) %>" id="article-nav-older" class="article-nav-link-wrap">
<strong class="article-nav-caption"><%= __('nav.older') %></strong>
<div class="article-nav-title"><%= post.next.title %></div>
</a>
<% } %>
</nav>
<% } %>

View File

@ -0,0 +1,6 @@
<% if (post.tags && post.tags.length) { %>
<%- list_tags(post.tags, {
show_count: false,
class: 'article-tag'
}) %>
<% } %>

View 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 (index) { %>
<h1 itemprop="name">
<a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
</h1>
<% } else { %>
<h1 class="<%= class_name %>" itemprop="name">
<%= post.title %>
</h1>
<% } %>
<% } %>

33
layout/common/profile.ejs Normal file
View File

@ -0,0 +1,33 @@
<% var profile = theme.customize.profile; %>
<aside id="profile">
<div class="inner profile-inner">
<div class="base-info profile-block">
<img id="avatar" src="<%= ( profile.gravatar ? gravatar(profile.gravatar) : url_for(profile.avatar)) %>" />
<h2 id="name"><%= profile.author %></h2>
<h3 id="title"><%= profile.author_title %></h3>
<span id="location"><i class="fa fa-map-marker"></i><%= profile.location %></span>
<a id="follow" href="<%= profile.follow %>"><%= __('profile.follow') %></a>
</div>
<div class="article-info profile-block">
<div class="article-info-block">
<%= site.posts.length %>
<span><%= (site.posts.length > 1 ? __('profile.posts') : __('profile.post')) %></span>
</div>
<div class="article-info-block">
<%= site.tags.length %>
<span><%= (site.tags.length > 1 ? __('profile.tags') : __('profile.tag')) %></span>
</div>
</div>
<% if(theme.customize.social_links) { %>
<div class="profile-block social-links">
<table>
<tr>
<% for(var i in theme.customize.social_links) { %>
<td><a href="<%- url_for(theme.customize.social_links[i]) %>" target="_blank" title="<%= i %>"><i class="fa fa-<%= i %>"></i></a></td>
<% } %>
</tr>
</table>
</div>
<% } %>
</div>
</aside>

View File

@ -0,0 +1,4 @@
<%- partial('plugin/scripts') %>
<!-- Custom Scripts -->
<%- js('js/main') %>

View File

@ -0,0 +1,6 @@
<aside id="sidebar">
<% theme.widgets.forEach(function(widget) { %>
<%- partial('widget/' + widget) %>
<% }) %>
<div id="toTop" class="fa fa-chevron-up"></div>
</aside>

View File

@ -0,0 +1,8 @@
<a href="<%- url_for((post.link ? post.link : post.path)) %>" class="thumbnail">
<% var thumbnailUrl = thumbnail(post) %>
<% if (thumbnailUrl) { %>
<span style="background-image:url(<%- url_for(thumbnailUrl) %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
<% } else { %>
<span class="thumbnail-image thumbnail-none"></span>
<% } %>
</a>

View File

@ -1 +1 @@
<%- partial('_partial/archive', {type: '', index: true}) %>
<%- partial('common/archive', {type: '', index: true}) %>

View File

@ -1,18 +1,18 @@
<%- partial('_partial/head') %>
<%- partial('common/head') %>
<body>
<div id="container">
<%- partial('_partial/header') %>
<div class="outer">
<% if (theme.profile){ %>
<%- partial('_partial/profile', null, {cache: !config.relative_link}) %>
<% } %>
<section id="main"><%- body %></section>
<% if (theme.sidebar){ %>
<%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
<% } %>
<div id="container">
<%- partial('common/header') %>
<div class="outer">
<% if (theme.customize.profile.enabled) { %>
<%- partial('common/profile', null, {cache: !config.relative_link}) %>
<% } %>
<section id="main"><%- body %></section>
<% if (theme.customize.sidebar) { %>
<%- partial('common/sidebar', null, {cache: !config.relative_link}) %>
<% } %>
</div>
<%- partial('common/footer', null, {cache: !config.relative_link}) %>
<%- partial('common/scripts') %>
</div>
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
<%- partial('_partial/after-footer') %>
</div>
</body>
</html>

View File

@ -1 +1 @@
<%- partial('_partial/article', {post: page, index: false}) %>
<%- partial('common/article', {post: page, index: false}) %>

View 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>

View File

@ -1,14 +1,10 @@
<% if (theme.google_analytics){ %>
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(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.google_analytics %>', 'auto');
ga('create', '<%= theme.plugins.google_analytics %>', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<% } %>
</script>

18
layout/plugin/scripts.ejs Normal file
View File

@ -0,0 +1,18 @@
<% if (typeof(isHead) !== 'undefined' && isHead) { %>
<% if (theme.plugins.fancybox) { %>
<%- css('vendor/fancybox/jquery.fancybox') %>
<% } %>
<% if (theme.plugins.google_analytics) { %>
<%- partial('plugin/google-analytics') %>
<% } %>
<% if (theme.plugins.google_site_verification) { %>
<meta name="google-site-verification" content="<%= theme.plugins.google_site_verification %>" />
<% } %>
<% if (theme.plugins.baidu_analytics) { %>
<%- partial('plugin/baidu-analytics') %>
<% } %>
<% } else { %>
<% if (theme.plugins.fancybox) { %>
<%- js('vendor/fancybox/jquery.fancybox.pack') %>
<% } %>
<% } %>

View File

@ -1 +1 @@
<%- partial('_partial/article', {post: page, index: false}) %>
<%- partial('common/article', {post: page, index: false}) %>

13
layout/search/baidu.ejs Normal file
View File

@ -0,0 +1,13 @@
<form class="search-form" method="GET" action="https://www.baidu.com/s?">
<input name="wd" type="text" class="search-form-input" placeholder="<%= __('index.search') %>" />
<button type="submit" class="search-form-submit"></button>
</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>

View File

@ -0,0 +1,9 @@
<% if (theme.search.swiftype) { %>
<div class="search-form">
<input type="text" class="st-default-search-input search-form-input" placeholder="<%= __('index.search') %>" />
</div>
<% } else if (theme.search.baidu) { %>
<%- partial('search/baidu') %>
<% } else { %>
<%- search_form({text: __('index.search')}) %>
<% } %>

13
layout/search/index.ejs Normal file
View File

@ -0,0 +1,13 @@
<div id="search-form-wrap">
<% if (theme.search.swiftype) { %>
<form class="search-form">
<input type="text" class="st-default-search-input search-form-input" placeholder="<%= __('index.search') %>" />
<button type="submit" class="search-form-submit"></button>
</form>
<%- partial('search/swiftype') %>
<% } else if (theme.search.baidu) { %>
<%- partial('search/baidu') %>
<% } else { %>
<%- search_form({ button: ' ', text: __('index.search') }) %>
<% } %>
</div>

View 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
layout/share/addtoany.ejs Normal file
View 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
layout/share/bdshare.ejs Normal file
View 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='http://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>

65
layout/share/default.ejs Normal file
View File

@ -0,0 +1,65 @@
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><i class="fa fa-share"></i><%=__('article.share')%></a>
<script>
(function ($) {
// Prevent duplicate binding
if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
__SHARE_BUTTON_BINDED__ = true;
} else {
return;
}
$('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="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
'<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
'<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
'<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google 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>

14
layout/share/index.ejs Normal file
View File

@ -0,0 +1,14 @@
<div class="share-container">
<% if (theme.share === 'jiathis') { %>
<%- partial('jiathis') %>
<% } %>
<% if (theme.share === 'bdshare') { %>
<%- partial('bdshare') %>
<% } %>
<% if (theme.share === 'addtoany') { %>
<%- partial('addtoany') %>
<% } %>
</div>
<% if (!theme.share || theme.share === 'default') { %>
<%- partial('default', { post: post }) %>
<% } %>

50
layout/share/jiathis.ejs Normal file
View 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="http://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="http://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>

View File

@ -1 +1 @@
<%- partial('_partial/archive', {type: 'tag', index: true}) %>
<%- partial('common/archive', {type: 'tag', index: true}) %>

View File

@ -1,10 +1,10 @@
<section class="layout-wrap">
<div class="layout-title">
<span><%= page.title %></span>
</div>
<div class="layout-wrap-inner tag-cloud">
<% if(site.tags.length) { %>
<%- tagcloud({min_font: 14, max_font: 28}) %>
<% } %>
</div>
<div class="layout-title">
<span><%= page.title %></span>
</div>
<div class="layout-wrap-inner tag-cloud">
<% if(site.tags.length) { %>
<%- tagcloud({min_font: 14, max_font: 28}) %>
<% } %>
</div>
</section>

View File

@ -0,0 +1,8 @@
<% if (site.posts.length) { %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.archives') %></h3>
<div class="widget">
<%- list_archives() %>
</div>
</div>
<% } %>

View File

@ -0,0 +1,8 @@
<% if (site.categories.length) { %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.categories') %></h3>
<div class="widget">
<%- list_categories() %>
</div>
</div>
<% } %>

14
layout/widget/links.ejs Normal file
View File

@ -0,0 +1,14 @@
<% if (site.posts.length) { %>
<div class="widget-wrap widget-list">
<h3 class="widget-title"><%= __('widget.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>
<% } %>

View File

@ -0,0 +1,23 @@
<% if (site.posts.length) { %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.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="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
layout/widget/tag.ejs Normal file
View File

@ -0,0 +1,8 @@
<% if (site.tags.length) { %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.tags') %></h3>
<div class="widget">
<%- list_tags() %>
</div>
</div>
<% } %>

View File

@ -0,0 +1,8 @@
<% if (site.tags.length) { %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('widget.tag_cloud') %></h3>
<div class="widget tagcloud">
<%- tagcloud() %>
</div>
</div>
<% } %>

15
scripts/excerpt.js Normal file
View File

@ -0,0 +1,15 @@
/**
* Excerpt Helper
* @description Get the excerpt from a post
* @example
* <%- excerpt(post) %>
*/
hexo.extend.helper.register('excerpt', function (post) {
var excerpt;
if (post.excerpt) {
excerpt = post.excerpt.replace(/\<[^\>]+\>/g, '');
} else {
excerpt = post.content.replace(/\<[^\>]+\>/g, '').substring(0, 200);
}
return excerpt;
});

View File

@ -8,17 +8,17 @@ var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:ww
*/
hexo.extend.tag.register('fancybox', function(args){
var original = args.shift(),
thumbnail = '';
var original = args.shift(),
thumbnail = '';
if (args.length && rUrl.test(args[0])){
thumbnail = args.shift();
}
if (args.length && rUrl.test(args[0])){
thumbnail = args.shift();
}
var title = args.join(' ');
var title = args.join(' ');
return '<a class="fancybox" href="' + original + '" title="' + title + '">' +
'<img src="' + (thumbnail || original) + '" alt="' + title + '">'
'</a>' +
(title ? '<span class="caption">' + title + '</span>' : '');
return '<a class="fancybox" href="' + original + '" title="' + title + '">' +
'<img src="' + (thumbnail || original) + '" alt="' + title + '">'
'</a>' +
(title ? '<span class="caption">' + title + '</span>' : '');
});

30
scripts/thumbnail.js Normal file
View File

@ -0,0 +1,30 @@
/**
* Thumbnail Helper
* @description Get the thumbnail url from a post
* @example
* <%- thumbnail(post) %>
*/
hexo.extend.helper.register('thumbnail', function (post) {
var url = post.thumbnail || post.banner || '';
if (!url) {
var imgPattern = /\<img\s.*?\s?src\s*=\s*['|"]?([^\s'"]+).*?\>/ig;
var result = imgPattern.exec(post.content);
if (result && result.length > 1) {
url = result[1];
}
if(url.length > 0) {
var pattern = /^[\\{0,1}\/{0,1}]([^\/^\\]+)/,
pattern_ = /([^\/^\\]+)/;
if ((ret = pattern.exec(url)) != null) {
if(ret[0].length == url.length) {
url = post.path + ret[1];
}
} else if ((ret = pattern_.exec(url)) != null) {
if(ret[0].length == url.length) {
url = post.path + ret[1];
}
}
}
}
return url;
});

View File

@ -1,65 +1,65 @@
$link-dark
&,
&:visited
color: color-default
transition: 0.2s ease
&:hover,
&:visited:hover
color: color-link
&,
&:visited
color: color-default
transition: 0.2s ease
&:hover,
&:visited:hover
color: color-link
$block-caption
text-decoration: none
text-transform: uppercase
color: color-grey
line-height: 1em
text-decoration: none
text-transform: uppercase
color: color-grey
line-height: 1em
$block
background: #fff
box-shadow: 0 1px 2px rgba(0,0,0,0.05)
background: #fff
box-shadow: 0 1px 2px rgba(0,0,0,0.05)
$base-style
h1
font-size: 2em
h2
font-size: 1.5em
h3
font-size: 1.3em
h4
font-size: 1.2em
h5
font-size: 1em
h6
font-size: 1em
color: color-grey
hr
border: 1px dashed color-border
strong
font-weight: bold
em, cite
font-style: italic
sup, sub
font-size: 0.75em
line-height: 0
position: relative
vertical-align: baseline
sup
top: -0.5em
sub
bottom: -0.2em
small
font-size: 0.85em
acronym, abbr
border-bottom: 1px dotted
ul, ol, dl
margin: 0 20px
line-height: line-height
ul, ol
h1
font-size: 2em
h2
font-size: 1.5em
h3
font-size: 1.3em
h4
font-size: 1.2em
h5
font-size: 1em
h6
font-size: 1em
color: color-grey
hr
border: 1px dashed color-border
strong
font-weight: bold
em, cite
font-style: italic
sup, sub
font-size: 0.75em
line-height: 0
position: relative
vertical-align: baseline
sup
top: -0.5em
sub
bottom: -0.2em
small
font-size: 0.85em
acronym, abbr
border-bottom: 1px dotted
ul, ol, dl
margin: 0 20px
line-height: line-height
ul, ol
margin-top: 0
margin-bottom: 0
ul
list-style: disc
ol
list-style: decimal
dt
font-weight: bold
ul, ol
margin-top: 0
margin-bottom: 0
ul
list-style: disc
ol
list-style: decimal
dt
font-weight: bold

View File

@ -0,0 +1,89 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
*
* #ade5fc
* #a2fca2
* #c6b4f0
* #d36363
* #fcc28c
* #fc9b9b
* #ffa
* #fff
* #333
* #62c8f3
* #888
*
*/
.highlight
color: white
background: #333
.code
.name,
.strong
font-weight: bold
.code,
.emphasis
font-style: italic
.tag
color: #62c8f3
.variable,
.template-variable,
.selector-id,
.selector-class
color: #ade5fc
.string,
.bullet
color: #a2fca2
.type,
.title,
.section,
.attribute,
.quote,
.built_in,
.builtin-name
color: #ffa
.number,
.symbol,
.bullet
color: #d36363
.keyword,
.selector-tag,
.literal
color: #fcc28c
.comment,
.deletion,
.code
color: #888
.regexp,
.link
color: #c6b4f0
.meta
color: #fc9b9b
.deletion
background-color: #fc9b9b
color: #333
.addition
background-color: #a2fca2
color: #333
.highlight a
color: inherit
.highlight a:focus,
.highlight a:hover
color: inherit
text-decoration: underline

View File

@ -0,0 +1,52 @@
/*
Date: 24 Fev 2015
Author: Pedro Oliveira <kanytu@gmail . com>
*/
.highlight
color: #a9b7c6
background: #282b2e
.code
.number,
.literal,
.symbol,
.bullet
color: #6897BB
.keyword,
.selector-tag,
.deletion
color: #cc7832
.variable,
.template-variable,
.link
color: #629755
.comment,
.quote
color: #808080
.meta
color: #bbb529
.string,
.attribute,
.addition
color: #6A8759
.section,
.title,
.type
color: #ffc66d
.name,
.selector-id,
.selector-class
color: #e8bf6a
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,71 @@
/*
Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>
*/
.highlight
color: #434f54
background: #FFFFFF
.code
.subst
color: #434f54
.keyword,
.attribute,
.selector-tag,
.doctag,
.name
color: #00979D
.built_in,
.literal,
.bullet,
.code,
.addition
color: #D35400
.regexp,
.symbol,
.variable,
.template-variable,
.link,
.selector-attr,
.selector-pseudo
color: #00979D
.type,
.string,
.selector-id,
.selector-class,
.quote,
.template-tag,
.deletion
color: #005C5F
.title,
.section
color: #880000
font-weight: bold
.comment
color: rgba(149,165,166,.8)
.meta-keyword
color: #728E00
.meta
color: #728E00
color: #434f54
.emphasis
font-style: italic
.strong
font-weight: bold
.function
color: #728E00
.number
color: #8A7B52

View File

@ -0,0 +1,59 @@
/*
Date: 17.V.2011
Author: pumbur <pumbur@pumbur.net>
*/
.highlight
color: #aaa
background: #222
.code
.subst
color: #aaa
.section
color: #fff
.comment,
.quote,
.meta
color: #444
.string,
.symbol,
.bullet,
.regexp
color: #ffcc33
.number,
.addition
color: #00cc66
.built_in,
.builtin-name,
.literal,
.type,
.template-variable,
.attribute,
.link
color: #32aaee
.keyword,
.selector-tag,
.name,
.selector-id,
.selector-class
color: #6644aa
.title,
.variable,
.deletion,
.template-tag
color: #bb1166
.section,
.doctag,
.strong
font-weight: bold
.emphasis
font-style: italic

View File

@ -0,0 +1,37 @@
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/
.highlight
color: black
background: white
.code
.string,
.variable,
.template-variable,
.symbol,
.bullet,
.section,
.addition,
.attribute,
.link
color: #888
.comment,
.quote,
.meta,
.deletion
color: #ccc
.keyword,
.selector-tag,
.section,
.name,
.type,
.strong
font-weight: bold
.emphasis
font-style: italic

View File

@ -0,0 +1,68 @@
/* Base16 Atelier Cave Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #8b8792
background: #19171c
.code
/* Atelier-Cave Comment */
.comment,
.quote
color: #7e7887
/* Atelier-Cave Red */
.variable,
.template-variable,
.attribute,
.regexp,
.link,
.tag,
.name,
.selector-id,
.selector-class
color: #be4678
/* Atelier-Cave Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #aa573c
/* Atelier-Cave Green */
.string,
.symbol,
.bullet
color: #2a9292
/* Atelier-Cave Blue */
.title,
.section
color: #576ddb
/* Atelier-Cave Purple */
.keyword,
.selector-tag
color: #955ae7
.deletion,
.addition
color: #19171c
display: inline-block
width: 100%
.deletion
background-color: #be4678
.addition
background-color: #2a9292
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,70 @@
/* Base16 Atelier Cave Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #585260
background: #efecf4
.code
/* Atelier-Cave Comment */
.comment,
.quote
color: #655f6d
/* Atelier-Cave Red */
.variable,
.template-variable,
.attribute,
.tag,
.name,
.regexp,
.link,
.name,
.name,
.selector-id,
.selector-class
color: #be4678
/* Atelier-Cave Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #aa573c
/* Atelier-Cave Green */
.string,
.symbol,
.bullet
color: #2a9292
/* Atelier-Cave Blue */
.title,
.section
color: #576ddb
/* Atelier-Cave Purple */
.keyword,
.selector-tag
color: #955ae7
.deletion,
.addition
color: #19171c
display: inline-block
width: 100%
.deletion
background-color: #be4678
.addition
background-color: #2a9292
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,57 @@
/* Base16 Atelier Dune Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #a6a28c
background: #20201d
.code
/* Atelier-Dune Comment */
.comment,
.quote
color: #999580
/* Atelier-Dune Red */
.variable,
.template-variable,
.attribute,
.tag,
.name,
.regexp,
.link,
.name,
.selector-id,
.selector-class
color: #d73737
/* Atelier-Dune Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #b65611
/* Atelier-Dune Green */
.string,
.symbol,
.bullet
color: #60ac39
/* Atelier-Dune Blue */
.title,
.section
color: #6684e1
/* Atelier-Dune Purple */
.keyword,
.selector-tag
color: #b854d4
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,64 @@
/* Base16 Atelier Dune Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #6e6b5e
background: #fefbec
.code
/* Atelier-Dune Comment */
.comment,
.quote
color: #7d7a68
/* Atelier-Dune Red */
.variable,
.template-variable,
.attribute,
.tag,
.name,
.regexp,
.link,
.name,
.selector-id,
.selector-class
color: #d73737
/* Atelier-Dune Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #b65611
/* Atelier-Dune Green */
.string,
.symbol,
.bullet
color: #60ac39
/* Atelier-Dune Blue */
.title,
.section
color: #6684e1
/* Atelier-Dune Purple */
.keyword,
.selector-tag
color: #b854d4
.highlight
display: block
overflow-x: auto
background: #fefbec
color: #6e6b5e
padding: 0.5em
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Estuary Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #929181
background: #22221b
.code
/* Atelier-Estuary Comment */
.comment,
.quote
color: #878573
/* Atelier-Estuary Red */
.variable,
.template-variable,
.attribute,
.tag,
.name,
.regexp,
.link,
.name,
.selector-id,
.selector-class
color: #ba6236
/* Atelier-Estuary Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #ae7313
/* Atelier-Estuary Green */
.string,
.symbol,
.bullet
color: #7d9726
/* Atelier-Estuary Blue */
.title,
.section
color: #36a166
/* Atelier-Estuary Purple */
.keyword,
.selector-tag
color: #5f9182
.deletion,
.addition
color: #22221b
display: inline-block
width: 100%
.deletion
background-color: #ba6236
.addition
background-color: #7d9726
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Estuary Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #5f5e4e
background: #f4f3ec
.code
/* Atelier-Estuary Comment */
.comment,
.quote
color: #6c6b5a
/* Atelier-Estuary Red */
.variable,
.template-variable,
.attribute,
.tag,
.name,
.regexp,
.link,
.name,
.selector-id,
.selector-class
color: #ba6236
/* Atelier-Estuary Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #ae7313
/* Atelier-Estuary Green */
.string,
.symbol,
.bullet
color: #7d9726
/* Atelier-Estuary Blue */
.title,
.section
color: #36a166
/* Atelier-Estuary Purple */
.keyword,
.selector-tag
color: #5f9182
.deletion,
.addition
color: #22221b
display: inline-block
width: 100%
.deletion
background-color: #ba6236
.addition
background-color: #7d9726
.emphasis
font-style: italic
.strong
font-weight: bold

View File

@ -0,0 +1,57 @@
/* Base16 Atelier Forest Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
.highlight
color: #a8a19f
background: #1b1918
.code
/* Atelier-Forest Comment */
.comment,
.quote
color: #9c9491
/* Atelier-Forest Red */
.variable,
.template-variable,
.attribute,
.tag,
.name,
.regexp,
.link,
.name,
.selector-id,
.selector-class
color: #f22c40
/* Atelier-Forest Orange */
.number,
.meta,
.built_in,
.builtin-name,
.literal,
.type,
.params
color: #df5320
/* Atelier-Forest Green */
.string,
.symbol,
.bullet
color: #7b9726
/* Atelier-Forest Blue */
.title,
.section
color: #407ee7
/* Atelier-Forest Purple */
.keyword,
.selector-tag
color: #6666ea
.emphasis
font-style: italic
.strong
font-weight: bold

Some files were not shown because too many files have changed in this diff Show More