From 5d125622d45bb222583de8d19ae10b7f3caac69f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B9=90=E7=89=B9?=
Date: Thu, 31 Dec 2020 21:08:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=201.0.0(=E8=90=8C=E5=85=B8)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 59 ++++++++
_config.yml | 28 ++++
layout/_partial/article.ejs | 122 +++++++++++++++++
layout/_partial/copyright.ejs | 27 ++++
layout/_partial/footer.ejs | 16 +++
layout/_partial/head.ejs | 7 +
layout/_partial/header.ejs | 18 +++
layout/_partial/nav.ejs | 22 +++
layout/_partial/pagination.ejs | 10 ++
layout/_partial/reward.ejs | 61 +++++++++
layout/_partial/script.ejs | 1 +
layout/_partial/share.ejs | 13 ++
layout/archive.ejs | 0
layout/index.ejs | 4 +
layout/layout.ejs | 18 +++
layout/page.ejs | 1 +
layout/post.ejs | 1 +
layout/tag.ejs | 3 +
scripts/codeblock.js | 28 ++++
scripts/tag.js | 40 ++++++
scripts/wordcount.js | 39 ++++++
source/css/_highlight/codeFrame.styl | 71 ++++++++++
source/css/_highlight/diff.styl | 83 ++++++++++++
source/css/_highlight/theme.styl | 147 ++++++++++++++++++++
source/css/_partial/animation.styl | 64 +++++++++
source/css/_partial/else.styl | 28 ++++
source/css/_partial/footer.styl | 22 +++
source/css/_partial/header.styl | 38 ++++++
source/css/_partial/main.styl | 106 +++++++++++++++
source/css/_partial/nav.styl | 31 +++++
source/css/_partial/reward.styl | 103 ++++++++++++++
source/css/index.styl | 68 ++++++++++
source/css/media.styl | 72 ++++++++++
source/css/post.styl | 195 +++++++++++++++++++++++++++
source/js/main.js | 23 ++++
source/js/share.min.js | 1 +
36 files changed, 1570 insertions(+)
create mode 100644 README.md
create mode 100644 _config.yml
create mode 100644 layout/_partial/article.ejs
create mode 100644 layout/_partial/copyright.ejs
create mode 100644 layout/_partial/footer.ejs
create mode 100644 layout/_partial/head.ejs
create mode 100644 layout/_partial/header.ejs
create mode 100644 layout/_partial/nav.ejs
create mode 100644 layout/_partial/pagination.ejs
create mode 100644 layout/_partial/reward.ejs
create mode 100644 layout/_partial/script.ejs
create mode 100644 layout/_partial/share.ejs
create mode 100644 layout/archive.ejs
create mode 100644 layout/index.ejs
create mode 100644 layout/layout.ejs
create mode 100644 layout/page.ejs
create mode 100644 layout/post.ejs
create mode 100644 layout/tag.ejs
create mode 100644 scripts/codeblock.js
create mode 100644 scripts/tag.js
create mode 100644 scripts/wordcount.js
create mode 100644 source/css/_highlight/codeFrame.styl
create mode 100644 source/css/_highlight/diff.styl
create mode 100644 source/css/_highlight/theme.styl
create mode 100644 source/css/_partial/animation.styl
create mode 100644 source/css/_partial/else.styl
create mode 100644 source/css/_partial/footer.styl
create mode 100644 source/css/_partial/header.styl
create mode 100644 source/css/_partial/main.styl
create mode 100644 source/css/_partial/nav.styl
create mode 100644 source/css/_partial/reward.styl
create mode 100644 source/css/index.styl
create mode 100644 source/css/media.styl
create mode 100644 source/css/post.styl
create mode 100644 source/js/main.js
create mode 100644 source/js/share.min.js
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0ad6745
--- /dev/null
+++ b/README.md
@@ -0,0 +1,59 @@
+
+
+
+
+
+## hexo-theme-MengD
+一个崇尚简约优雅,以及极致的性能
+
+把注意力集中到内容上
+
+口号:禁止花里胡哨
+
+## 快速开始
+
+安装
+``` powershell
+git clone https://github.com/lete114/hexo-theme-MengD.git themes/MengD
+```
+
+打开根目录下的`_config.yml`修改`theme: MengD`
+
+## 配置
+
+``` yml
+# 导航栏菜单
+menu:
+ 首页: /
+ 标签: /tags
+ 关于我: /about
+
+## 个人信息配置
+title: Lete乐特's Blog
+author: Lete乐特
+mail: lete@lete114.top
+avatar: https://www.lete114.top/img/avatar.png
+description: 人生只有一次,大胆的生活!!
+
+## 信息图标
+social:
+ fab fa-github: https://github.com/lete114
+ fa fa-envelope: mailto:lete@lete114.top
+
+# 是否开启版权声明
+copytight: true
+
+# 页脚
+footer:
+ custom_text: 我相信我可以,但我一直在路上,所以我有无限的可能!!
+ since: 2020
+
+# 自动截取
+post_content:
+ line: 3 # 内容超过多少行后出现省略号(...)
+ length: 500 # 截取字数
+
+## 代码块样式
+highlight_theme: mac # default / darker / pale night / light / ocean / mac / mac light
+```
+
diff --git a/_config.yml b/_config.yml
new file mode 100644
index 0000000..3dcdf15
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1,28 @@
+menu:
+ 首页: /
+ 标签: /tags
+ 关于我: /about
+
+title: Lete乐特's Blog
+author: Lete乐特
+mail: lete@lete114.top
+avatar: https://www.lete114.top/img/avatar.png
+description: 人生只有一次,大胆的生活!!
+
+social:
+ fab fa-github: https://github.com/lete114
+ fa fa-envelope: mailto:lete@lete114.top
+
+copytight: true
+
+footer:
+ custom_text: 我相信我可以,但我一直在路上,所以我有无限的可能!!
+ since: 2020
+
+# 自动截取
+post_content:
+ line: 3 # 显示多少行后出现省略号(...)
+ length: 500 # 截取多少字
+
+## 代码块样式
+highlight_theme: mac # default / darker / pale night / light / ocean / mac / mac light
\ No newline at end of file
diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs
new file mode 100644
index 0000000..bac595c
--- /dev/null
+++ b/layout/_partial/article.ejs
@@ -0,0 +1,122 @@
+<% if(index){ %>
+
+
+
+
+ <%- strip_html(post.content.substring(0, theme.post_content.length)) %>
+
+
+
+
+<% }else{ %>
+ <%if(page.type==null || page.layout==null){%>
+
+
+
<%= page.title %>
+
+ <%if(page.type==null){%>
+
+
+
+
+ 发表于 <%- date(page.date, "YYYY-MM-DD") %> |
+
+
+ 更新于 <%- date(page.update, "YYYY-MM-DD") %>
+
+
+
+
+
+ 字数总计:
+ <%= wordcount(page.content) %> |
+
+ 阅读时长:
+ <%= min2read(page.content) %>分钟 |
+
+ 阅读量:
+
+
+
+
+ <%}%>
+
+ <%- page.content %>
+
+
+ <%- partial('copyright') %>
+
+
+
+
+ <% post.tags.forEach(function(tag, i){ %>
+ <%-tag.name%>
+ <%if(post.tags.length-1 > i){%>
+
+ <%} %>
+ <% }) %>
+
+
+
+ <%- partial('share') %>
+
+ <%- partial('reward') %>
+
+
+
+ <%}else if(page.type=="tags" || page.layout=="tags"){%>
+
+
<%= page.title %> - <%= site.tags.length %>
+
+ <%- partial('tag') %>
+
+ <%}else if(page.type=="archives" || page.layout=="archives"){%>
+ <%- partial('archive') %>
+
+ <%}else if(page.type!=null || page.layout!=null){%>
+
+
<%= page.title %>
+ <%= page.description %>
+
+
+ <%- page.content %>
+
+ <%}%>
+<% } %>
+
diff --git a/layout/_partial/copyright.ejs b/layout/_partial/copyright.ejs
new file mode 100644
index 0000000..5a9cfde
--- /dev/null
+++ b/layout/_partial/copyright.ejs
@@ -0,0 +1,27 @@
+
+<% if (theme.copytight && !index){ %>
+ <% if (post.copytight==null||post.copytight){ %>
+
+
+
+
+
版权声明:
+
本博客所有文章除特别声明外,均采用
+
+ CC BY-NC-SA 4.0 许可协议。转载请注明来自
+ <%- theme.title || config.title%>
+ !
+
+
+ <% } %>
+<% } %>
\ No newline at end of file
diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs
new file mode 100644
index 0000000..534578b
--- /dev/null
+++ b/layout/_partial/footer.ejs
@@ -0,0 +1,16 @@
+
\ No newline at end of file
diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs
new file mode 100644
index 0000000..ca7a318
--- /dev/null
+++ b/layout/_partial/head.ejs
@@ -0,0 +1,7 @@
+
+
+<%= theme.title || config.title %>
+
+
+
+<%- css('css/index') %>
\ No newline at end of file
diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs
new file mode 100644
index 0000000..2c17548
--- /dev/null
+++ b/layout/_partial/header.ejs
@@ -0,0 +1,18 @@
+
+
+
+
+
+
<%= theme.author || config.author %>
+
+
+
+
<%= theme.description || config.description %>
+
+ <% for (social in theme.social) { %>
+
+ <% } %>
+
+
+
+
\ No newline at end of file
diff --git a/layout/_partial/nav.ejs b/layout/_partial/nav.ejs
new file mode 100644
index 0000000..821caa3
--- /dev/null
+++ b/layout/_partial/nav.ejs
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
<%= theme.author || config.author %>
+
+
+
+
+ <% for (name in theme.menu) { %>
+ <%= name %>
+ <% } %>
+
+
+
+ <% for (name in theme.menu) { %>
+ <%= name %>
+ <% } %>
+
+
\ No newline at end of file
diff --git a/layout/_partial/pagination.ejs b/layout/_partial/pagination.ejs
new file mode 100644
index 0000000..4515c10
--- /dev/null
+++ b/layout/_partial/pagination.ejs
@@ -0,0 +1,10 @@
+<% if (page.total > 1){ %>
+
+<%}%>
\ No newline at end of file
diff --git a/layout/_partial/reward.ejs b/layout/_partial/reward.ejs
new file mode 100644
index 0000000..495344f
--- /dev/null
+++ b/layout/_partial/reward.ejs
@@ -0,0 +1,61 @@
+
+
+
\ No newline at end of file
diff --git a/layout/_partial/script.ejs b/layout/_partial/script.ejs
new file mode 100644
index 0000000..674bd5c
--- /dev/null
+++ b/layout/_partial/script.ejs
@@ -0,0 +1 @@
+<%- js('js/main') %>
\ No newline at end of file
diff --git a/layout/_partial/share.ejs b/layout/_partial/share.ejs
new file mode 100644
index 0000000..d6b9f52
--- /dev/null
+++ b/layout/_partial/share.ejs
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/layout/archive.ejs b/layout/archive.ejs
new file mode 100644
index 0000000..e69de29
diff --git a/layout/index.ejs b/layout/index.ejs
new file mode 100644
index 0000000..d822619
--- /dev/null
+++ b/layout/index.ejs
@@ -0,0 +1,4 @@
+<% page.posts.each(function(post, index){ %>
+ <%- partial('_partial/article', {index: true, post: post}) %>
+<% }) %>
+<%- partial('_partial/pagination') %>
diff --git a/layout/layout.ejs b/layout/layout.ejs
new file mode 100644
index 0000000..527bbc9
--- /dev/null
+++ b/layout/layout.ejs
@@ -0,0 +1,18 @@
+
+
+
+ <%- partial('_partial/head') %>
+
+
+
+
+ <%- partial('_partial/nav') %>
+ <%- partial('_partial/header') %>
+
+ <%- body %>
+
+
+ <%- partial('_partial/footer') %>
+ <%- partial('_partial/script') %>
+
+
\ No newline at end of file
diff --git a/layout/page.ejs b/layout/page.ejs
new file mode 100644
index 0000000..a434b3d
--- /dev/null
+++ b/layout/page.ejs
@@ -0,0 +1 @@
+<%- partial('_partial/article', {index: false, post: page}) %>
\ No newline at end of file
diff --git a/layout/post.ejs b/layout/post.ejs
new file mode 100644
index 0000000..a434b3d
--- /dev/null
+++ b/layout/post.ejs
@@ -0,0 +1 @@
+<%- partial('_partial/article', {index: false, post: page}) %>
\ No newline at end of file
diff --git a/layout/tag.ejs b/layout/tag.ejs
new file mode 100644
index 0000000..c8d508a
--- /dev/null
+++ b/layout/tag.ejs
@@ -0,0 +1,3 @@
+
+ <%- cloudTags({source: site.tags, minfontsize: 1.2, maxfontsize: 2.1, limit: 0, unit: 'em'}) %>
+
\ No newline at end of file
diff --git a/scripts/codeblock.js b/scripts/codeblock.js
new file mode 100644
index 0000000..5d088c6
--- /dev/null
+++ b/scripts/codeblock.js
@@ -0,0 +1,28 @@
+/**
+ * Created by Lete on 2020/12/31.
+ */
+var attributes = [
+ 'autocomplete="off"',
+ 'autocorrect="off"',
+ 'autocapitalize="off"',
+ 'spellcheck="false"',
+ 'contenteditable="false"'
+]
+
+var attributesStr = attributes.join(' ')
+
+hexo.extend.filter.register('after_post_render', function (data) {
+ while (/.*?<\/figure>/.test(data.content)) {
+ data.content = data.content.replace(/.*?<\/figure>/, function () {
+ var language = RegExp.$1 || 'code' || '' || null
+ var lastMatch = RegExp.lastMatch
+ if (language=='plain' || language=='' || language==null){
+ language='code';
+ }
+ lastMatch = lastMatch.replace(/' + lastMatch + ''
+ })
+ }
+ return data
+})
\ No newline at end of file
diff --git a/scripts/tag.js b/scripts/tag.js
new file mode 100644
index 0000000..176b232
--- /dev/null
+++ b/scripts/tag.js
@@ -0,0 +1,40 @@
+/**
+ * Butterfly
+ * @example
+ * page_description()
+ * cloudTags(source, minfontsize, maxfontsize, limit)
+ */
+
+'use strict'
+
+hexo.extend.helper.register('cloudTags', function (options = {}) {
+ const env = this
+ let source = options.source
+ const minfontsize = options.minfontsize
+ const maxfontsize = options.maxfontsize
+ const limit = options.limit
+ const unit = options.unit || 'px'
+
+ let result = ''
+ if (limit > 0) {
+ source = source.limit(limit)
+ }
+
+ const sizes = []
+ source.sort('length').forEach(tag => {
+ const { length } = tag
+ if (sizes.includes(length)) return
+ sizes.push(length)
+ })
+
+ const length = sizes.length - 1
+ source.forEach(tag => {
+ const ratio = length ? sizes.indexOf(tag.length) / length : 0
+ const size = minfontsize + ((maxfontsize - minfontsize) * ratio)
+ let style = `font-size: ${parseFloat(size.toFixed(2))}${unit};`
+ const color = 'rgb(' + Math.floor(Math.random() * 201) + ', ' + Math.floor(Math.random() * 201) + ', ' + Math.floor(Math.random() * 201) + ')' // 0,0,0 -> 200,200,200
+ style += ` color: ${color}`
+ result += `${tag.name} `
+ })
+ return result
+})
\ No newline at end of file
diff --git a/scripts/wordcount.js b/scripts/wordcount.js
new file mode 100644
index 0000000..552879c
--- /dev/null
+++ b/scripts/wordcount.js
@@ -0,0 +1,39 @@
+/**
+ * Created by Lete on 2020/9/4.
+ */
+var util = require('hexo-util');
+var stripHTML = util.stripHTML;
+
+var counter = function (content) {
+ content = stripHTML(content);
+ const cn = (content.match(/[\u4E00-\u9FA5]/g) || []).length;
+ const en = (content.replace(/[\u4E00-\u9FA5]/g, '').match(/[a-zA-Z0-9_\u0392-\u03c9\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|[\u00E4\u00C4\u00E5\u00C5\u00F6\u00D6]+|\w+/g) || []).length;
+ return [cn, en];
+};
+
+hexo.extend.helper.register('min2read', function (content, { cn = 300, en = 160 } = {}) {
+ var len = counter(content);
+ var readingTime = len[0] / cn + len[1] / en;
+ return readingTime < 1 ? '1' : parseInt(readingTime, 10);
+});
+
+hexo.extend.helper.register('wordcount', function (content) {
+ var len = counter(content);
+ var count = len[0] + len[1];
+ if (count < 1000) {
+ return count;
+ }
+ return Math.round(count / 100) / 10 + 'k';
+});
+
+hexo.extend.helper.register('totalcount', function (site) {
+ var count = 0;
+ site.posts.forEach(function (post) {
+ var len = counter(post.content);
+ count += len[0] + len[1];
+ });
+ if (count < 1000) {
+ return count;
+ }
+ return Math.round(count / 100) / 10 + 'k';
+});
\ No newline at end of file
diff --git a/source/css/_highlight/codeFrame.styl b/source/css/_highlight/codeFrame.styl
new file mode 100644
index 0000000..3653c1f
--- /dev/null
+++ b/source/css/_highlight/codeFrame.styl
@@ -0,0 +1,71 @@
+@require 'theme'
+
+/*代码框*/
+
+ .highlight-wrap .highlight
+ margin-top: 36px;
+ .highlight-wrap[data-rel]:hover
+ transition box-shadow 0.3s ease-in-out
+ box-shadow 0 0px 30px 0px rgba(0, 0, 0, 0.4)
+
+ figure.highlight .gutter pre
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ background-color: $highlight-background
+ color: $highlight-foreground
+ text-align: right;
+ font-family: consolas, Menlo, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
+
+ figure.highlight
+ overflow: auto;
+ padding: 0;
+ background: $highlight-background
+ color: #eff;
+ line-height: 1.6;
+ position: relative;
+ -webkit-box-shadow: 0 5px 10px 0 rgba(0,0,0,.4);
+ box-shadow: 0 5px 10px 0 rgba(0,0,0,.4);
+ -webkit-transform: translateZ(0);
+
+ .highlight-wrap[data-rel]
+ margin-top: 1.2rem;
+ margin-bottom: 1.2rem;
+ position relative
+ overflow hidden
+ border-radius 10px
+ box-shadow 0 0px 10px 0px rgba(0, 0, 0, 0.4)
+ &::before
+ content attr(data-rel)
+ height 38px
+ line-height 38px
+ background $highlight-wrap
+ color $highlight-foreground
+ font-size 16px
+ position absolute
+ top 0
+ left 0
+ width 100%
+ //font-family 'Source Sans Pro', sans-serif
+ font-weight bold
+ //if hexo-config('highlight_theme') != 'darker' && hexo-config('highlight_theme') != 'pale night'&& hexo-config('highlight_theme') != 'light'&& hexo-config('highlight_theme') != 'ocean' && hexo-config('highlight_theme') != 'default' && hexo-config('highlight_theme') != false
+ if hexo-config('highlight_theme') == mac || hexo-config('highlight_theme') == 'mac light'
+ padding 0px 80px
+ text-indent 15px
+ float left
+
+ //if hexo-config('highlight_theme') != 'darker'&& hexo-config('highlight_theme') != 'pale night' && hexo-config('highlight_theme') != 'light'&& hexo-config('highlight_theme') != 'ocean' && hexo-config('highlight_theme') != 'default' && hexo-config('highlight_theme') != false
+ if hexo-config('highlight_theme') == mac || hexo-config('highlight_theme') == 'mac light'
+ &::after
+ content ' '
+ position absolute
+ -webkit-border-radius 50%
+ border-radius 50%
+ background #fc625d
+ width 12px
+ height 12px
+ top 0
+ left 20px
+ margin-top 13px
+ -webkit-box-shadow 20px 0px #fdbc40, 40px 0px #35cd4b
+ box-shadow 20px 0px #fdbc40, 40px 0px #35cd4b
+ z-index 3
diff --git a/source/css/_highlight/diff.styl b/source/css/_highlight/diff.styl
new file mode 100644
index 0000000..7450fba
--- /dev/null
+++ b/source/css/_highlight/diff.styl
@@ -0,0 +1,83 @@
+@require 'theme'
+// For diff highlight
+figure.highlight
+ pre
+ color $highlight-foreground
+
+ table
+ &::-webkit-scrollbar-thumb
+ background: $highlight-scrollbar
+
+ pre .deletion
+ color: $highlight-deletion
+
+ pre .addition
+ color: $highlight-addition
+
+ pre .meta
+ color: $highlight-purple
+
+ pre
+ .comment
+ color: $highlight-comment
+
+ .variable,
+ .attribute,
+ .regexp,
+ .ruby .constant,
+ .xml .tag .title,
+ .xml .pi,
+ .xml .doctype,
+ .html .doctype,
+ .css .id,
+ .tag .name,
+ .css .class,
+ .css .pseudo
+ color: $highlight-red
+
+ .tag
+ color: $highlight-aqua
+
+ .number,
+ .preprocessor,
+ .literal,
+ .params,
+ .constant,
+ .command
+ color: $highlight-orange
+
+ .built_in
+ color: $highlight-yellow
+
+ .ruby .class .title,
+ .css .rules .attribute,
+ .string,
+ .value,
+ .inheritance,
+ .header,
+ .ruby .symbol,
+ .xml .cdata,
+ .special,
+ .number,
+ .formula
+ color: $highlight-green
+
+ .keyword,
+ .title,
+ .css .hexcolor
+ color: $highlight-aqua
+
+ .function,
+ .python .decorator,
+ .python .title,
+ .ruby .function .title,
+ .ruby .title .keyword,
+ .perl .sub,
+ .javascript .title,
+ .coffeescript .title
+ color: $highlight-blue
+
+ .tag .attr,
+ .javascript .function
+ color: $highlight-purple
+
diff --git a/source/css/_highlight/theme.styl b/source/css/_highlight/theme.styl
new file mode 100644
index 0000000..68a4ea5
--- /dev/null
+++ b/source/css/_highlight/theme.styl
@@ -0,0 +1,147 @@
+$highlight_theme = hexo-config('highlight_theme')
+
+if $highlight_theme == 'default'
+ $highlight-wrap = #222d32
+ $highlight-background = #263238
+ $highlight-current-line = #efefef
+ $highlight-selection = #80CBC420
+ $highlight-foreground = #EEFFFF
+ $highlight-comment = #546E7A
+ $highlight-red = #FF5370
+ $highlight-orange = #F78C6C
+ $highlight-yellow = #FFCB6B
+ $highlight-green = #C3E88D
+ $highlight-aqua = #89DDFF
+ $highlight-blue = #82AAFF
+ $highlight-purple = #C792EA
+ $highlight-deletion = #BF42BF
+ $highlight-addition = #105EDE
+ $highlight-gutter = {
+ color: alpha($highlight-foreground, .5),
+ bg-color: $highlight-background
+ }
+ $highlight-tools = {
+ color: alpha($highlight-foreground, .8),
+ bg-color: darken($highlight-background, 2)
+ }
+ $highlight-scrollbar = darken($highlight-background, 6)
+
+if $highlight_theme == 'darker' || ($highlight_theme == 'mac')
+ $highlight-wrap = #1c1c1c
+ $highlight-background = #212121
+ $highlight-current-line = #282a2e
+ $highlight-selection = #61616150
+ $highlight-foreground = #EEFFFF
+ $highlight-comment = #969896
+ $highlight-red = #FF5370
+ $highlight-orange = #F78C6C
+ $highlight-yellow = #FFCB6B
+ $highlight-green = #C3E88D
+ $highlight-aqua = #89DDFF
+ $highlight-blue = #82AAFF
+ $highlight-purple = #C792EA
+ $highlight-deletion = #BF42BF
+ $highlight-addition = #105EDE
+ $highlight-mac-border = rgba(0, 0, 0, .4)
+ $highlight-gutter = {
+ color: alpha($highlight-foreground, .5),
+ bg-color: $highlight-background
+ }
+ $highlight-tools = {
+ color: alpha($highlight-foreground, .8),
+ bg-color: darken($highlight-background, 2)
+ }
+ $highlight-scrollbar = darken($highlight-background, 6)
+
+if $highlight_theme == 'pale night'
+ $highlight-wrap = #252938
+ $highlight-background = #292D3E
+ $highlight-current-line = #393939
+ $highlight-selection = #717CB450
+ $highlight-foreground = #A6ACCD
+ $highlight-comment = #676E95
+ $highlight-red = #FF5370
+ $highlight-orange = #F78C6C
+ $highlight-yellow = #FFCB6B
+ $highlight-green = #C3E88D
+ $highlight-aqua = #89DDFF
+ $highlight-blue = #82AAFF
+ $highlight-purple = #C792EA
+ $highlight-deletion = #BF42BF
+ $highlight-addition = #105EDE
+ $highlight-gutter = {
+ color: alpha($highlight-foreground, .5),
+ bg-color: $highlight-background
+ }
+ $highlight-tools = {
+ color: $highlight-foreground,
+ bg-color: darken($highlight-background, 2)
+ }
+ $highlight-scrollbar = darken($highlight-background, 6)
+
+if $highlight_theme == 'ocean'
+ $highlight-wrap = #0b0d14
+ $highlight-background = #0F111A
+ $highlight-current-line = #000000
+ $highlight-selection = #717CB450
+ $highlight-foreground = #8F93A2
+ $highlight-comment = rgba(101, 115, 126, .8)
+ $highlight-red = #FF5370
+ $highlight-orange = #F78C6C
+ $highlight-yellow = #FFCB6B
+ $highlight-green = #C3E88D
+ $highlight-aqua = #89DDFF
+ $highlight-blue = #82AAFF
+ $highlight-purple = #C792EA
+ $highlight-deletion = #BF42BF
+ $highlight-addition = #105EDE
+ $highlight-gutter = {
+ color: alpha($highlight-foreground, .5),
+ bg-color: $highlight-background
+ }
+ $highlight-tools = {
+ color: $highlight-foreground,
+ bg-color: darken($highlight-background, 2)
+ }
+ $highlight-scrollbar = darken($highlight-background, 5)
+
+if $highlight_theme == 'light' || ($highlight_theme == 'mac light')
+ $highlight-wrap = #e6ebf1
+ $highlight-background = #F6F8FA
+ $highlight-current-line = #00346e
+ $highlight-selection = #80CBC440
+ $highlight-foreground = #90A4AE
+ $highlight-comment = rgba(149, 165, 166, .8)
+ $highlight-red = #E53935
+ $highlight-orange = #F76D47
+ $highlight-yellow = #FFB62C
+ $highlight-green = #91B859
+ $highlight-aqua = #39ADB5
+ $highlight-blue = #6182B8
+ $highlight-purple = #7C4DFF
+ $highlight-deletion = #BF42BF
+ $highlight-addition = #105EDE
+ $highlight-mac-border = rgba(144, 164, 174, .4)
+ $highlight-gutter = {
+ color: alpha($highlight-foreground, .5),
+ bg-color: $highlight-background
+ }
+ $highlight-tools = {
+ color: $highlight-foreground,
+ bg-color: darken($highlight-background, 5)
+ }
+ $highlight-scrollbar = darken($highlight-background, 8)
+
+if $highlight_theme == false
+ $highlight-wrap = #e6ebf1
+ $highlight-background = #F6F8FA
+ $highlight-foreground = #90A4AE
+ $highlight-selection = #80CBC440
+ $highlight-gutter = {
+ color: alpha($highlight-foreground, .5),
+ bg-color: $highlight-background
+ }
+ $highlight-tools = {
+ color: $highlight-foreground,
+ bg-color: darken($highlight-background, 5)
+ }
diff --git a/source/css/_partial/animation.styl b/source/css/_partial/animation.styl
new file mode 100644
index 0000000..a7ae223
--- /dev/null
+++ b/source/css/_partial/animation.styl
@@ -0,0 +1,64 @@
+@-moz-keyframes turn {
+ from {
+ -webkit-transform: rotate(0);
+ -moz-transform: rotate(0);
+ -o-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ }
+ to {
+ -webkit-transform: rotate(-360deg);
+ -moz-transform: rotate(-360deg);
+ -o-transform: rotate(-360deg);
+ -ms-transform: rotate(-360deg);
+ transform: rotate(-360deg);
+ }
+}
+@-webkit-keyframes turn {
+ from {
+ -webkit-transform: rotate(0);
+ -moz-transform: rotate(0);
+ -o-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ }
+ to {
+ -webkit-transform: rotate(-360deg);
+ -moz-transform: rotate(-360deg);
+ -o-transform: rotate(-360deg);
+ -ms-transform: rotate(-360deg);
+ transform: rotate(-360deg);
+ }
+}
+@-o-keyframes turn {
+ from {
+ -webkit-transform: rotate(0);
+ -moz-transform: rotate(0);
+ -o-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ }
+ to {
+ -webkit-transform: rotate(-360deg);
+ -moz-transform: rotate(-360deg);
+ -o-transform: rotate(-360deg);
+ -ms-transform: rotate(-360deg);
+ transform: rotate(-360deg);
+ }
+}
+@keyframes turn {
+ from {
+ -webkit-transform: rotate(0);
+ -moz-transform: rotate(0);
+ -o-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ }
+ to {
+ -webkit-transform: rotate(-360deg);
+ -moz-transform: rotate(-360deg);
+ -o-transform: rotate(-360deg);
+ -ms-transform: rotate(-360deg);
+ transform: rotate(-360deg);
+ }
+}
diff --git a/source/css/_partial/else.styl b/source/css/_partial/else.styl
new file mode 100644
index 0000000..beefa4c
--- /dev/null
+++ b/source/css/_partial/else.styl
@@ -0,0 +1,28 @@
+main.content .page-title
+ text-align: center
+main.content .tag-content
+ text-align: center
+ padding-bottom: 50px
+main.content .tag-content a
+ display: inline-block;
+ padding: 0 .4rem;
+
+main.content .page-title .page-description
+ font-size: 16px
+ padding: 0 15%;
+ display: block;
+
+main.content .categorie-content
+ padding 30px 0 50px 60px
+.category-list .category-list-count:before
+ content: '(';
+.category-list .category-list-count:after
+ content: ')';
+.category-list .category-list-link
+ padding-right: 10px;
+ line-height: 30px;
+.category-list .category-list-item
+ list-style none
+.category-list .category-list-item .category-list-child
+ padding-left: 20px;
+
diff --git a/source/css/_partial/footer.styl b/source/css/_partial/footer.styl
new file mode 100644
index 0000000..205f060
--- /dev/null
+++ b/source/css/_partial/footer.styl
@@ -0,0 +1,22 @@
+footer{
+ clear: both;
+ max-width: 780px;
+ text-align: center;
+ font-size: 15px;
+ line-height: 2em;
+ padding: 60px 0;
+ margin: 0 auto;
+}
+
+footer .copyright{
+ color: #666;
+}
+
+footer .fa-fan{
+ color: #00c4b6;
+ -webkit-animation: turn 1s linear infinite;
+ -moz-animation: turn 1s linear infinite;
+ -o-animation: turn 1s linear infinite;
+ -ms-animation: turn 1s linear infinite;
+ animation: turn 1s linear infinite;
+}
\ No newline at end of file
diff --git a/source/css/_partial/header.styl b/source/css/_partial/header.styl
new file mode 100644
index 0000000..6060b58
--- /dev/null
+++ b/source/css/_partial/header.styl
@@ -0,0 +1,38 @@
+/* 头信息 */
+header{
+ padding-bottom: 150px;
+ margin: 0 30px;
+ background-size: cover;
+}
+
+.author-info .avatar{
+ width: 100px;
+ height: 100px;
+ border-radius: 50%;
+}
+.author-info .author{
+ font-weight: 700;
+ font-size: 1.3rem;
+ color: #ff7242;
+ padding-top: 10px;
+}
+.author-info div{
+ float: left;
+ text-align: center;
+ width: 100px;
+}
+.card-content .description .social-icon a i{
+ color: black;
+ font-size: 16px;
+ margin-right: 10px;
+ margin-top: 10px;
+}
+.card-content .description .social-icon{
+ float: right;
+}
+.description{
+ margin: 5% 0;
+ font-size: 0.9rem;
+ color: #565654;
+ float: right;
+}
diff --git a/source/css/_partial/main.styl b/source/css/_partial/main.styl
new file mode 100644
index 0000000..b494910
--- /dev/null
+++ b/source/css/_partial/main.styl
@@ -0,0 +1,106 @@
+/* 内容文章 */
+
+main{
+ width: 720px;
+ height: auto;
+ margin: 0 auto;
+}
+
+main.content .post-title h2 a{
+ color: black;
+}
+
+main.content .post-item
+ margin: 50px 30px
+ border-bottom: 2px solid #f8f8f8;
+
+main.content .post-item .post-title{
+ padding-bottom: 16px;
+}
+
+main.content .post-item .post-description p{
+ line-height: 2em;
+ letter-spacing: 0.2px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+}
+
+main.content .post-item .post-footer{
+ padding: 20px 0 10px 0;
+ display inline-block
+}
+
+main.content .post-item .post-footer div{
+ color: #858585;
+ float: left;
+ font-size: 13px;
+ max-width: 100%;
+ height: 25px;
+ margin-right: 20px;
+}
+main.content .post-item .post-footer div .fa.fa-tag{
+ font-size: 11px;
+ margin-top: 3px;
+}
+
+main.content .post-item .post-footer .post-tag a{
+ color: #666666;
+}
+
+main.content .pagination{
+ padding: 30px 0 60px 0;
+ text-align: center;
+ color: #666666;
+ font-size: 14px;
+ width 100%
+ display: inline-block
+}
+
+main.content .pagination .page-number{
+ display: inline-block;
+ margin: 0 .2rem;
+ min-width: 1.2rem;
+ height: 1.2rem;
+ color: #00c4b6;
+ text-align: center;
+ line-height: 1.2rem;
+}
+main.content .pagination .page-number.current {
+ background: #00c4b6;
+ color: #fff;
+}
+
+main.content .pagination
+ .page-pre
+ width: 260px;
+ float: left;
+ line-height: 2em;
+ letter-spacing: 0.2px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 1;
+ -webkit-box-orient: vertical;
+ i
+ text-align: center
+ .page-next
+ width: 260px;
+ float: right ;
+ line-height: 2em;
+ letter-spacing: 0.2px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 1;
+ -webkit-box-orient: vertical;
+
+main.content .post-content
+ padding: 50px 20px
+
+
+
+
+
diff --git a/source/css/_partial/nav.styl b/source/css/_partial/nav.styl
new file mode 100644
index 0000000..68a127b
--- /dev/null
+++ b/source/css/_partial/nav.styl
@@ -0,0 +1,31 @@
+/* 导航栏 */
+nav{
+ height: 3rem;
+ margin: 0 30px;
+ padding: 20px 0;
+}
+#site_nav ul{
+ float: right;
+}
+#site_nav ul li{
+ position: relative;
+ list-style: none;
+ float: left;
+}
+#site_nav ul li a{
+ display: block;
+ white-space: nowrap;
+ padding: 10px;
+ font-size: 0.9rem;
+}
+
+.site_nav #openNav
+ padding-top: 10px
+ display: none
+
+#mobileNav
+ display: none;
+
+// .site_nav ul
+// width 350px
+// height 0
\ No newline at end of file
diff --git a/source/css/_partial/reward.styl b/source/css/_partial/reward.styl
new file mode 100644
index 0000000..bca96af
--- /dev/null
+++ b/source/css/_partial/reward.styl
@@ -0,0 +1,103 @@
+.post-reward .reward-button {
+ display: inline-block;
+ cursor: pointer;
+ -webkit-transition: all .4s;
+ -moz-transition: all .4s;
+ -o-transition: all .4s;
+ -ms-transition: all .4s;
+ transition: all .4s;
+}
+
+.post-reward {
+ position: relative;
+ margin-top: 4rem;
+ width: 100%;
+ text-align: center;
+ margin-top: 120px;
+}
+
+.post-reward .reward-button:hover .reward-main {
+ display: block;
+}
+
+.post-reward .reward-button .reward-main {
+ position: absolute;
+ bottom: 80px;
+ left: 0;
+ z-index: 100;
+ display: none;
+ padding: 0 0 15px;
+ width: 100%;
+}
+.post-reward .reward-button .reward-main .reward-all .reward-item .post-qr-code-desc {
+ padding-top: .4rem;
+ width: 130px;
+ color: #858585;
+}
+
+.reward-main {
+ -webkit-animation: donate_effcet .3s .1s ease both;
+ -moz-animation: donate_effcet .3s .1s ease both;
+ -o-animation: donate_effcet .3s .1s ease both;
+ -ms-animation: donate_effcet .3s .1s ease both;
+ animation: donate_effcet .3s .1s ease both;
+}
+
+.reward-all:after {
+ position: absolute;
+ right: 0;
+ bottom: 2px;
+ left: 0;
+ margin: 0 auto;
+ width: 0;
+ height: 0;
+ border-top: 13px solid #f5f5f5;
+ border-right: 13px solid transparent;
+ border-left: 13px solid transparent;
+ content: '';
+}
+
+.reward-all:before {
+ position: absolute;
+ bottom: -10px;
+ left: 0;
+ width: 100%;
+ height: 20px;
+ content: '';
+}
+
+.post-reward .reward-button .reward-main .reward-all {
+ display: inline-block;
+ margin: 0;
+ padding: 1rem .5rem;
+ border-radius: 4px;
+ background: #f5f5f5;
+}
+
+.reward-item {
+ display: inline-block;
+ padding: 0 8px;
+ list-style-type: none;
+ vertical-align: top;
+}
+
+.reward-item img {
+ width: 130px;
+ height: 130px;
+}
+.reward-button{
+ display: inline-block;
+ width: 56px;
+ height: 56px;
+ line-height: 56px;
+ font-size: 20px;
+ color: #fff;
+ background: #e58a8a;
+ border-radius: 50%;
+ transition: 0.4s ease-in-out;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
+}
+.reward-button:hover{
+
+ box-shadow: 0 6px 12px rgba(0,0,0,0.2), 0 4px 15px rgba(0,0,0,0.2);
+}
diff --git a/source/css/index.styl b/source/css/index.styl
new file mode 100644
index 0000000..10db491
--- /dev/null
+++ b/source/css/index.styl
@@ -0,0 +1,68 @@
+*{
+ margin: 0;
+}
+html{
+ overflow-x:hidden
+}
+
+body{
+ background-color: #eaeaea;
+ color: #333333;
+ font-size: 16px;
+ font-family: 'source-han-sans-simplified-c', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
+}
+body a{
+ text-decoration: none;
+ color: #00c4b6;
+}
+
+body .mask
+ width: 100%;
+ height: 100%;
+ position: fixed;
+ top: 0px;
+ z-index: 102;
+ background: rgba(0, 0, 0, 0.4);
+
+#body-wrap{
+ background-color: #fff;
+ width: 800px;
+ margin: 60px auto 0;
+ border-radius: 10px;
+}
+
+
+@import 'post';
+@import '_partial/else';
+@import "_partial/nav";
+@import "_partial/header";
+@import "_partial/main";
+@import "_partial/reward";
+@import "_partial/footer";
+@import "_partial/animation";
+@import '_highlight/codeFrame';
+@import '_highlight/theme';
+@import '_highlight/diff';
+@import 'media';
+
+/* 滚动条 */
+
+::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+}
+
+::-webkit-scrollbar-thumb {
+ background-color: #e58a8a !important;
+ background-image: -webkit-linear-gradient( 45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent)!important;
+ border-radius: 2em;
+}
+
+::-webkit-scrollbar-corner {
+ background-color: transparent;
+}
+
+::-moz-selection {
+ color: #fff;
+ background-color: #e58a8a;
+}
diff --git a/source/css/media.styl b/source/css/media.styl
new file mode 100644
index 0000000..ae6cfaa
--- /dev/null
+++ b/source/css/media.styl
@@ -0,0 +1,72 @@
+#openNav
+ display none
+
+@media screen and (max-width 800px)
+ body
+ background: #eaeaea
+ #body-wrap
+ width: 95%;
+ margin-top: 20px;
+ main.content
+ display: inline;
+
+@media screen and (max-width 600px)
+ #mobileNav
+ background: #f6f8fa
+ display: none;
+ position: fixed;
+ right: 0px;
+ top: 0px;
+ z-index: 103;
+ overflow: hidden auto;
+ width: 250px;
+ height: 100%;
+ #mobileNav li
+ display: block
+ float: none !important
+ text-align: center;
+ #openNav
+ display block
+ .site_nav #openNav
+ display: inline-block
+ .site_nav ul li
+ display: none
+ .author-info div
+ padding: 1.3rem 1.5rem 0;
+ float: none;
+ width auto
+ .author-info hr
+ border: 2px dashed #e58a8a;
+ margin: 2rem auto;
+ .site_nav #mobileNav li
+ line-height: 2
+ .card-content .description,.card-content .description .social-icon
+ float: none;
+ text-align: center;
+ header
+ padding-bottom 0
+ .card-content .author-info div
+ margin: 0 auto
+ float: none;
+ #site_nav ul
+ float: none;
+ padding-inline-start: unset;
+ main.content .pagination .page-pre
+ text-align: center;
+ width: 100%;
+ line-height: 40px;
+ main.content .pagination .page-next
+ text-align: center;
+ width: 100%;
+
+ article.post .post-tag
+ display: none
+ .social-share
+ text-align: center
+ float: none
+ .post-reward
+ margin-top: 60px;
+
+
+
+
\ No newline at end of file
diff --git a/source/css/post.styl b/source/css/post.styl
new file mode 100644
index 0000000..e03d445
--- /dev/null
+++ b/source/css/post.styl
@@ -0,0 +1,195 @@
+article.post .post-meta
+ text-align: center
+ margin-bottom: .5rem;
+ font-size: 90%;
+
+article.post .post-title,.post-meta
+ text-align: center
+ margin-bottom: .5rem;
+article.post .post-title .title:before
+ content: none
+.content .post-title h2:before
+ content: none
+
+article.post .post-content
+ padding-top: 50px;
+
+article.post .post-content h1:before,
+article.post .post-content h2:before,
+article.post .post-content h3:before,
+article.post .post-content h4:before,
+article.post .post-content h5:before,
+article.post .post-content h6:before
+ color: #00c4b6;
+ margin-right: 10px
+ display: inline-block;
+ content: '\f863';
+ -webkit-animation: turn 1s linear infinite;
+ -moz-animation: turn 1s linear infinite;
+ -o-animation: turn 1s linear infinite;
+ -ms-animation: turn 1s linear infinite;
+ animation: turn 1s linear infinite;
+ font-family: 'Font Awesome 5 Free';
+
+
+article.post .post-content h1,h2,h3,h4,h5,h6
+ margin-block-start: 0.83em;
+ margin-block-end: 0.83em;
+
+article.post .post-content h1
+ font-size: 1.5em;
+
+article.post .post-content h2
+ font-size: 1.3em;
+
+article.post .post-content h3
+ font-size: 1.1em;
+
+article.post .post-content h4
+ font-size: .9em;
+
+article.post .post-content h5
+ font-size: .7em;
+
+article.post .post-content h6
+ font-size: .5em;
+
+
+
+article.post .post-content figure.highlight td {
+ padding: 0;
+ border: none;
+ vertical-align: unset;
+}
+
+article.post .post-content figure.highlight .highlight-tools {
+ position: relative;
+ overflow: hidden;
+ width: 100%;
+ height: 1.5rem;
+ background: #1c1c1c;
+ color: rgba(238,255,255,.8);
+ font-size: 14px;
+}
+
+
+
+article.post .post-content figure.highlight .code pre {
+ padding-right: .5rem;
+ padding-left: .5rem;
+ width: 100%;
+ margin: 0;
+ padding: 8px 0;
+ border: none;
+}
+
+article.post .post-content figure.highlight .code .line {
+ line-height: 26px;
+}
+
+article.post .post-content p
+ line-height: 1.7em;
+ letter-spacing: 0.2px;
+ font-weight: 530;
+ margin: 0 0 .8rem;
+
+
+
+article.post .post-content code{
+ padding: .1rem .2rem;
+ background: rgba(27,31,35,.05);
+ color: #f47466;
+ border-radius: 5px;
+ margin: 0 6px;
+ word-wrap: break-word;
+ word-break: break-word;
+ overflow-wrap: break-word;
+}
+
+article.post .post-content img
+ margin: 0 auto .8rem;
+ display: block;
+ max-width: 100%;
+
+article.post .post-content .table-wrap {
+ overflow-x: scroll;
+ margin: 0 0 1rem;
+}
+article.post .post-content table {
+ display: table;
+ width: 100%;
+ border-spacing: 0;
+ border-collapse: collapse;
+ empty-cells: show;
+}
+article.post .post-content table thead {
+ background: rgba(153,169,191,0.1);
+}
+article.post .post-content table th,
+table td {
+ padding: 0.3rem 0.6rem;
+ border: 1px solid #eee;
+ vertical-align: middle;
+}
+
+article.post .post-tag
+ color: #858585;
+ float: left;
+ font-size: 16px;
+ max-width: 300px;
+ height: 25px;
+ margin-top: 6px
+ margin-right: 20px;
+
+.social-share
+ float: right
+
+.social-share .social-share-icon
+ font-size: 16px !important
+ width: 26px !important;
+ height: 26px !important;
+ line-height: 26px !important;
+
+
+/*版权框两边颜色*/
+.post-copyright
+ margin-bottom: 30px;
+ position relative;
+ padding 0.5rem 0.8rem;
+ -webkit-transition box-shadow 0.3s ease-in-out;
+ -moz-transition box-shadow 0.3s ease-in-out;
+ -o-transition box-shadow 0.3s ease-in-out;
+ -ms-transition box-shadow 0.3s ease-in-out;
+ transition box-shadow 0.3s ease-in-out;
+ box-shadow 0 0px 2px 0px rgba(0, 0, 0, 0.4);
+ border-radius 10px;
+ border-left 3px solid #e58a8a
+ border-right 3px solid #e58a8a
+ div
+ line-height: 28px
+ word-break:break-all
+
+/*版权右上角小圆圈*/
+.post-copyright .post-copyright-icon
+ :before
+ position absolute;
+ top 0.5rem;
+ right 0.5rem;
+ width 0.8rem;
+ height 0.8rem;
+ border-radius 50%;
+ background #e58a8a
+ content '';
+ :after
+ position absolute;
+ top 0.7rem;
+ right 0.7rem;
+ width 0.4rem;
+ height 0.4rem;
+ border-radius 50%;
+ content '';
+ background #fff
+
+.post-copyright .post-copyright-meta
+ color: #e58a8a;
+ font-weight: 700;
\ No newline at end of file
diff --git a/source/js/main.js b/source/js/main.js
new file mode 100644
index 0000000..e05f591
--- /dev/null
+++ b/source/js/main.js
@@ -0,0 +1,23 @@
+$('#openNav').click(function () {
+ if ($("#mobileNav").css("display") == "none") {
+ $("#mask").addClass("mask")
+ $("#mobileNav").css("display", "block")
+ } else {
+ $("#mobileNav").css("display", "none")
+ }
+})
+$('#mask').click(function () {
+ $("#mobileNav").css("display", "none")
+ $("#mask").removeClass("mask")
+})
+$(window).resize( function () { //当浏览器大小变化时
+ if(document.body.clientWidth > 600){
+ $("#mobileNav").css("display", "none")
+ $("#mask").removeClass("mask")
+ }
+});
+
+// 修复代码块显示bug
+$(".post-content ol li figure.highlight").css({"margin-bottom":"1.2rem","margin-top":"1.2rem"})
+$(".post-content ol li div.highlight-wrap figure.highlight").css({"margin-bottom":"0","margin-top":"36px"})
+
diff --git a/source/js/share.min.js b/source/js/share.min.js
new file mode 100644
index 0000000..5601915
--- /dev/null
+++ b/source/js/share.min.js
@@ -0,0 +1 @@
+var QRCode;!function(){function r(t){this.mode=o.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e>>18,i[1]=128|(258048&n)>>>12,i[2]=128|(4032&n)>>>6,i[3]=128|63&n):2048>>12,i[1]=128|(4032&n)>>>6,i[2]=128|63&n):128>>6,i[1]=128|63&n):i[0]=n,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function h(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}r.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=i}for(r=0;r<18;r++){i=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=i}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,i=v.getBCHTypeInfo(r),n=0;n<15;n++){var o=!t&&1==(i>>n&1);n<6?this.modules[n][8]=o:n<8?this.modules[n+1][8]=o:this.modules[this.moduleCount-15+n][8]=o}for(n=0;n<15;n++){o=!t&&1==(i>>n&1);n<8?this.modules[8][this.moduleCount-n-1]=o:n<9?this.modules[8][15-n-1+1]=o:this.modules[8][15-n-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,i=this.moduleCount-1,n=7,o=0,a=this.moduleCount-1;0>>n&1)),v.getMask(e,i,a-s)&&(h=!h),this.modules[i][a-s]=h,-1==--n&&(o++,n=7)}if((i+=r)<0||this.moduleCount<=i){i-=r,r=-r;break}}}},h.PAD0=236,h.PAD1=17,h.createData=function(t,e,r){for(var i=p.getRSBlocks(t,e),n=new m,o=0;o8*s)throw new Error("code length overflow. ("+n.getLengthInBits()+">"+8*s+")");for(n.getLengthInBits()+4<=8*s&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*s||(n.put(h.PAD0,8),n.getLengthInBits()>=8*s));)n.put(h.PAD1,8);return h.createBytes(n,i)},h.createBytes=function(t,e){for(var r=0,i=0,n=0,o=new Array(e.length),a=new Array(e.length),s=0;s>>=1;return e},getPatternPosition:function(t){return v.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case i:return(e+r)%2==0;case n:return e%2==0;case a:return r%3==0;case l:return(e+r)%3==0;case u:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case c:return e*r%2+e*r%3==0;case f:return(e*r%2+e*r%3)%2==0;case d:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new w([1],0),r=0;r>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var _=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function C(){var t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;var r=e.toString().match(/android ([0-9]\.[0-9])/i);r&&r[1]&&(t=parseFloat(r[1]))}return t}var e,y,E=((e=function(t,e){this._el=t,this._htOption=e}).prototype.draw=function(t){var e=this._htOption,r=this._el,i=t.getModuleCount();function n(t,e){var r=document.createElementNS("http://www.w3.org/2000/svg",t);for(var i in e)e.hasOwnProperty(i)&&r.setAttribute(i,e[i]);return r}Math.floor(e.width/i),Math.floor(e.height/i),this.clear();var o=n("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:e.colorLight});o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.appendChild(o),o.appendChild(n("rect",{fill:e.colorLight,width:"100%",height:"100%"})),o.appendChild(n("rect",{fill:e.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;a'],s=0;s");for(var h=0;h');a.push("")}a.push(""),r.innerHTML=a.join("");var l=r.childNodes[0],u=(e.width-l.offsetWidth)/2,c=(e.height-l.offsetHeight)/2;0寰俊閲岀偣鈥滃彂鐜扳€濓紝鎵竴涓� 浜岀淮鐮佷究鍙皢鏈枃鍒嗕韩鑷虫湅鍙嬪湀銆�
",wechatQrcodeSize:100,sites:["weibo","qq","wechat","douban","qzone","linkedin","facebook","twitter","google"],mobileSites:[],disabled:[],initialized:!1},p={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",qq:'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"',weibo:"https://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:",douban:"http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}",google:"https://plus.google.com/share?url={{URL}}"};function m(t){return(o.querySelectorAll||r.jQuery||r.Zepto||function(i){var n=[];return C(i.split(/\s*,\s*/),function(t){var e=t.match(/([#.])(\w+)/);if(null===e)throw Error("Supports only simple single #ID or .CLASS selector.");if(e[1]){var r=o.getElementById(e[2]);r&&n.push(r)}n=n.concat(w(i))}),n}).call(o,t)}function v(t){return(o.getElementsByName(t)[0]||0).content}function w(t,e,r){if(t.getElementsByClassName)return t.getElementsByClassName(e);var i=[],n=t.getElementsByTagName(r||"*");return e=" "+e+" ",C(n,function(t){0<=(" "+(t.className||"")+" ").indexOf(e)&&i.push(t)}),i}function _(t){var e=o.createElement("div");return e.innerHTML=t,e.childNodes}function C(t,e){var r=t.length;if(r===a){for(var i in t)if(t.hasOwnProperty(i)&&!1===e.call(t[i],t[i],i))break}else for(var n=0;n');if(!r.length)return!0;r[0].href=e,"wechat"===t?r[0].tabindex=-1:r[0].target="_blank",n.initialized||(o?i.insertBefore(r[0],i.firstChild):i.appendChild(r[0]))})}(t,r),function(t,e){var r=w(t,"icon-wechat","a");if(0===r.length)return;var i=_(''+e.wechatQrcodeTitle+'
'+e.wechatQrcodeHelper+"
"),n=w(i[0],"qrcode","div");new QRCode(n[0],{text:e.url,width:e.wechatQrcodeSize,height:e.wechatQrcodeSize}),r[0].appendChild(i[0])}(t,r),t.initialized=!0}(t,e)})},i=function(){socialShare(".social-share, .share-component")},s=o[n="addEventListener"]?"":"on",~o.readyState.indexOf("m")?i():"load DOMContentLoaded readystatechange".replace(/\w+/g,function(t,e){(e?o:r)[s?"attachEvent":n](s+t,function(){i&&(e<6||~o.readyState.indexOf("m"))&&(i(),i=0)},!1)})}(window,document);
\ No newline at end of file