Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-lv committed Feb 11, 2019
0 parents commit e7db1ff
Show file tree
Hide file tree
Showing 69 changed files with 10,005 additions and 0 deletions.
105 changes: 105 additions & 0 deletions _config.yml
@@ -0,0 +1,105 @@

# html lang
# language: en

# main menu navigation
menu:
Home: /
Tags: /tags
Categories: /categories
Archives: /archives
About: /about
#menu:
# Home: /
# About: /about
# Contact: /contact
# Archives: /archives

# Miscelaneous
favicon: /favicon.ico

# avatar
avatar: /avatar.png

# 侧边栏
toc:
enable: true

# Footer Settings
# ---------------
since: 2017

links:
enable: true
data:
-
url: https://github.com/fan-lv
text: GitHub
-
url: mailto:15757856604@163.com
text: E-Mail
-
url: tencent://message/?uin=1019593584&Site=&Menu=yes
text: QQ


# busuanzi count for PV / UV in site
busuanzi:
# count values only if the other configs are false
enable: true
# custom uv span for the whole site
site_uv: true
site_uv_header: <i class="fas fa-user"></i>
site_uv_footer:
# custom pv span for the whole site
site_pv: true
site_pv_header: <i class="fas fa-eye"></i>
site_pv_footer:
# custom pv span for one page only
page_pv: true
page_pv_header: <i class="fas fa-file-o"></i>
page_pv_footer:

# stylesheets loaded in the <head>
stylesheets:
- /css/fan.css
- /css/thirdparty/jquery.mCustomScrollbar.min.css

# scripts loaded in the end of the body
scripts:
- /js/thirdparty/jquery-3.3.1.min.js
- /js/thirdparty/velocity.min.js
- /js/thirdparty/jquery.mCustomScrollbar.concat.min.js
- /js/fan.js
- /js/canvas_bg.js
- /js/utils.js
- /js/scroll.js
- /js/sidebar.js
- /js/copy.js

# post 配置
post_meta:
date_type: updated # created or updated
categories: true
tags: true

# recent-posts 中文章内容显示的字数
auto_excerpt:
enable: true
length: 200

# algolia 搜索
algolia_search:
enable: true
hits:
per_page: 10

# 本地搜索
local_search:
enable: false

# 复制代码
post_copyright:
enable: true
license: CC BY-NC-SA 4.0
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
85 changes: 85 additions & 0 deletions languages/zh-Hans.yml
@@ -0,0 +1,85 @@
copy:
success: 复制成功
error: 复制错误
noSupport: 浏览器不支持

algolia_search:
input_placeholder: 搜索文章
hits_empty: "找不到您查询的内容:${query}"
hits_stats: "找到 ${hits} 条结果,用时 ${time} 毫秒"

menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
search: 搜索
schedule: 日程表
sitemap: 站点地图
commonweal: 公益404

sidebar:
overview: 站点概览
toc: 文章目录
catalog: 目录
have_read: 您已阅读了

post:
created: 创建于
modified: 更新于
sticky: 置顶
posted: 发表于
in: 分类于
read_more: 阅读全文
untitled: 未命名
toc_empty: 此文章未包含目录
visitors: 热度
wordcount: 字数统计
min2read: 阅读时长
totalcount: Site words total count
copyright:
author: 本文作者
link: 本文链接
copyright_notice: 版权声明
copyright_content: '本博客所有文章除特别声明外,均采用 <a href="%s">%s</a> 许可协议。转载请注明来自 <a href="%s">%s</a>!'

page:
totally: 共有
tags: 标签
articles: 文章
categories: 分类

footer:
powered: "由 %s 强力驱动"
theme: 主题

counter:
tag_cloud:
zero: 暂无标签
one: 目前共计 1 个标签
other: "目前共计 %d 个标签"

categories:
zero: 暂无分类
one: 目前共计 1 个分类
other: "目前共计 %d 个分类"

archive_posts:
zero: 暂无日志。
one: 目前共计 1 篇日志。
other: "目前共计 %d 篇日志。"

state:
posts: 日志
pages: 页面
tags: 标签
categories: 分类

reward:
donate: 打赏
wechatpay: 微信支付
alipay: 支付宝
bitcoin: 比特币

gitmentbutton: 显示 Gitment 评论
75 changes: 75 additions & 0 deletions layout/archive.pug
@@ -0,0 +1,75 @@
extends includes/layout

block content
div#tag
h1.article-sort-item.title= _p('page.articles') + ' - ' + site.posts.length
- var year
- page.posts.each(function(article){
- var tempYear = date(article.date, 'YYYY')
if tempYear !== year
- year = tempYear
.article-sort-item.year= year
.article-sort-item
if article.link
time.article-time(datetime=date_xml(article.date))= date(article.date)
a.article-link(href=url_for(article.link) target="_blank")
= article.title || 'No Title'
else
time.article-time(datetime=date_xml(article.date))= date(article.date)
a.article-link(href=url_for(article.path))= article.title || 'No Title'
- })
include includes/pagination
// - var categoriesList = list_categories({ show_count: false })
// - var tagsList = list_tags({ show_count: false })
// - var archivesList = list_archives({ show_count: false })
//
// div.archive
// if !is_year()
//
// h1 Archives
//
// if theme.atom
// p The feed is available via&nbsp;
// a(href=theme.atom) atom
// span .
// br
//
// aside
// h2 Categories
// if categoriesList
// != categoriesList
// else
// p None.
// br
//
// aside
// h2 Tags
// if tagsList
// != tagsList
// else
// p None.
// br
//
// aside
// h2 Archives
// if archivesList
// != archivesList
// else
// p None.
// br
//
// else
//
// h1= page.month + '/' + page.year
//
// - page.posts.each(function(article){
// .archive-list-item
// if article.link
// a(href=url_for(article.link) target="_blank")= article.title || 'No Title'
// else
// a(href=url_for(article.path))= article.title || 'No Title'
// time(datetime=date_xml(article.date))= date(article.date)
// - })
// include includes/pagination
//div!= paginator()
35 changes: 35 additions & 0 deletions layout/category.pug
@@ -0,0 +1,35 @@
extends includes/layout

block content

#category
h1.article-sort-item.title= _p('page.categories') + ' - ' + page.category
- var year
- page.posts.each(function(article){
- var tempYear = date(article.date, 'YYYY')
if tempYear !== year
- year = tempYear
.article-sort-item.year= year
.article-sort-item
if article.link
time.article-time(datetime=date_xml(article.date))= date(article.date)
a.article-link(href=url_for(article.link) target="_blank")
= article.title || 'No Title'
else
time.article-time(datetime=date_xml(article.date))= date(article.date)
a.article-link(href=url_for(article.path))= article.title || 'No Title'
- })
//#category
// h1= page.category
// - page.posts.each(function(article){
// .category-item
// if article.link
// a(href=url_for(article.link) target="_blank")
// = article.title || 'No Title'
// else
// a(href=url_for(article.path))= article.title || 'No Title'
// time(datetime=date_xml(article.date))= date(article.date)
// - })
include includes/pagination
//div!= paginator()
2 changes: 2 additions & 0 deletions layout/includes/additional-js.pug
@@ -0,0 +1,2 @@
if (theme.algolia_search.enable)
script(src=url_for('/js/search/algolia.js'))
40 changes: 40 additions & 0 deletions layout/includes/config.pug
@@ -0,0 +1,40 @@
-
var algolia = 'undefined';
var env = process.env;
if (theme.algolia_search.enable) {
algolia = JSON.stringify({
appId: env.ALGOLIA_APP_ID || config.algolia.appId || config.algolia.applicationID,
apiKey: env.ALGOLIA_API_KEY || config.algolia.apiKey,
indexName: env.ALGOLIA_INDEX_NAME || config.algolia.indexName,
hits: theme.algolia_search.hits,
// search languages
languages: {
input_placeholder: _p("algolia_search.input_placeholder"),
hits_empty: _p("algolia_search.hits_empty"),
hits_stats: _p("algolia_search.hits_stats")
}
})
}
var localSearch = 'undefined';
if (theme.local_search && theme.local_search.enable) {
localSearch = JSON.stringify({
path: config.search.path,
languages: {
// search languages
hits_empty: _p("local_search.hits_empty")
}
})
}
script.
window.GLOBAL_CONFIG = {
root: '!{config.root}',
algolia: !{algolia},
localSearch: !{localSearch},
copy: {
success: '!{_p("copy.success")}',
error: '!{_p("copy.error")}',
noSupport: '!{_p("copy.noSupport")}'
}
}
29 changes: 29 additions & 0 deletions layout/includes/count/busuanzi.pug
@@ -0,0 +1,29 @@
.busuanzi
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")
if(!is_post())
if(theme.busuanzi.site_uv)
span#busuanzi_container_site_uv!= theme.busuanzi.site_uv_header
span#busuanzi_value_site_uv
span!=theme.busuanzi.site_uv_footer
if(theme.busuanzi.site_pv)
if(theme.busuanzi.site_pv)
span.footer-separator |
span#busuanzi_container_site_pv!= theme.busuanzi.site_pv_header
span#busuanzi_value_site_pv
span!=theme.busuanzi.site_pv_footer
else
if(theme.busuanzi.page_pv)
span#busuanzi_container_page_pv!= theme.busuanzi.page_pv_header
span#busuanzi_value_page_pv
span!=theme.busuanzi.page_pv_footer
else
if(theme.busuanzi.site_uv)
span#busuanzi_container_site_uv!= theme.busuanzi.site_uv_header
span#busuanzi_value_site_uv
span!=theme.busuanzi.site_uv_footer
if(theme.busuanzi.site_pv)
if(theme.busuanzi.site_pv)
span.footer-separator |
span#busuanzi_container_site_pv!= theme.busuanzi.site_pv_header
span#busuanzi_value_site_pv
span!=theme.busuanzi.site_pv_footer
12 changes: 12 additions & 0 deletions layout/includes/footer.pug
@@ -0,0 +1,12 @@
#footer
#side-button.button-hover
i.fas.fa-arrow-right
.right-content
if theme.busuanzi.enable
include ./count/busuanzi
- var now = new Date()
- var nowYear = now.getFullYear()
if theme.since && theme.since != nowYear
.copyright!= `&copy;${theme.since}${nowYear} By ${config.author}`
else
.copyright!= `&copy;${nowYear} By ${config.author}`

0 comments on commit e7db1ff

Please sign in to comment.