├── LICENSE
├── README.md
├── _config.yml
├── languages
├── default.yml
└── zh-CN.yml
├── layout
├── _partial
│ ├── archives.ejs
│ ├── article.ejs
│ ├── footer.ejs
│ ├── head.ejs
│ ├── header.ejs
│ ├── home.ejs
│ ├── page.ejs
│ ├── post.ejs
│ └── post
│ │ ├── category.ejs
│ │ ├── date.ejs
│ │ ├── nav.ejs
│ │ ├── tag.ejs
│ │ └── title.ejs
├── archive.ejs
├── category.ejs
├── index.ejs
├── layout.ejs
├── page.ejs
└── post.ejs
├── package.json
└── source
├── css
├── base.css
├── highlight.css
└── style.css
├── font
├── fontello.eot
├── fontello.svg
├── fontello.ttf
└── fontello.woff
├── images
├── bg_head.jpg
├── bg_head2.jpg
├── top_border.png
└── top_border2.png
└── js
├── css3-mediaqueries.js
├── duoshuo.js
├── html5.js
└── tools.js
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Garwi
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Simplecho
2 | ========
3 | Theme for [Hexo](http://hexo.io).
4 |
5 | Demo: http://garwih.github.io/hexo-theme-simplecho/
6 |
7 | ## Install
8 | 修改 Hexo 根目录下 _config.yml 里面的 `theme` 为 `simplecho`
9 |
10 | ~~~
11 | git clone https://github.com/Garwih/hexo-theme-simplecho.git themes/simplecho
12 | ~~~
13 |
14 | ## Update
15 |
16 | 进入 Hexo 根目录并执行
17 | ~~~
18 | cd themes/simplecho
19 | git pull
20 | ~~~
21 |
22 | ## Config
23 | #### 默认主题配置 `simplecho/_config.yml`
24 | ~~~ yaml
25 | # Header
26 | menu:
27 | Home: /
28 | Archives: /archives
29 | rss: /atom.xml
30 | favicon: /favicon.png
31 | subtitle_show: true
32 |
33 | # Main
34 | duoshuo_shortname:
35 | duoshuo_home: false
36 | disqus_home: false
37 |
38 | ~~~
39 |
40 | * menu - 顶部导航,Home 和 Archives 可修改为中文
41 | * subtitle_show - 首页 title 是否显示子标题,默认 true
42 | * duoshuo_shortname - 多说 ID
43 | * duoshuo_home - 是否在首页加载多说的 js 。如果首页需要显示评论数量,请选择 true (设置了多说 ID 之后才有效)
44 | * disqus_home - 是否在首页加载 Disqus 的 js。同上。
45 |
46 | #### Hexo 根目录下的 `_config.yml` ,修改部分如下
47 | ~~~ yaml
48 | archive: 1
49 | category: 1
50 | tag: 1
51 | ~~~
52 |
53 | 主题默认语言为英文,需要中文的请修改。
54 | ~~~ yaml
55 | language: zh-CN
56 | ~~~
57 |
58 | 如果使用 Disqus ,请填入你的 Disqus ID , 若设置了 Disqus ,则`多说`的设置无效。
59 | ~~~ yaml
60 | # Disqus
61 | disqus_shortname: Disqus ID
62 | ~~~
63 |
64 | ## Features
65 |
66 | ### Featured Image
67 | 插入文章特色图片,在文章顶部加入 image 及图片链接
68 | ~~~
69 | title: post title
70 | image: //example.com/example.jpg
71 | ---
72 | ~~~
73 |
74 | ### No Title Post
75 | 无标题,即 title 留空时,发表日期会作为标题
76 |
77 | ### Link Post
78 | ~~~ yaml
79 | title: Link Post
80 | link: http://www.google.com/
81 | ---
82 | ~~~
83 |
84 | ### Video
85 | 插入视频时,为了自适应页面大小,请将视频分享代码放在 `class="video"` 中,例如
86 | ~~~ html
87 |
视频分享代码
88 | ~~~
89 |
90 |
91 | ## Browser Support
92 |
93 | IE 8+, Opera, Chrome, Firefox, Safari
94 |
95 | ## License
96 | [MIT License](http://opensource.org/licenses/MIT)
97 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Header
2 | menu:
3 | Home: /
4 | Archives: /archives
5 | rss: /atom.xml
6 | favicon: /favicon.png
7 | subtitle_show: true
8 |
9 | # Main
10 | duoshuo_shortname:
11 | duoshuo_home: false
12 | disqus_home: false
--------------------------------------------------------------------------------
/languages/default.yml:
--------------------------------------------------------------------------------
1 | header:
2 | search: Search
3 | prev: Prev
4 | next: Next
5 | read_more: READ MORE
6 | comments: Comments
7 | comment:
8 | zero: "0 Comments"
9 | one: "1 Comment"
10 | other: "%d Comments"
11 | title:
12 | archives: Archives
13 | category: Category
14 | tag: Tag
15 | menu:
16 | home: Home
17 | archives: Archives
18 | about: About
19 | guestBook: GuestBook
--------------------------------------------------------------------------------
/languages/zh-CN.yml:
--------------------------------------------------------------------------------
1 | header:
2 | search: 搜索
3 | prev: 上一页
4 | next: 下一页
5 | read_more: 阅读全文
6 | comments: 评论
7 | comment:
8 | zero: "评论:0"
9 | one: "评论:1"
10 | other: "评论:%d"
11 | title:
12 | archives: 归档
13 | category: 分类
14 | tag: 标签
15 | menu:
16 | home: 主页
17 | archives: 归档
18 | about: 关于
19 | guestBook: 留言板
--------------------------------------------------------------------------------
/layout/_partial/archives.ejs:
--------------------------------------------------------------------------------
1 | <% if (pagination == 2){ %>
2 | <%
3 | var title = page.title;
4 |
5 | if (is_archive()){
6 | title = __('title.archives');
7 |
8 | if (is_month()){
9 | title += ': ' + page.year + '/' + page.month;
10 | } else if (is_year()){
11 | title += ': ' + page.year;
12 | }
13 | } else if (is_category()){
14 | title = __('title.category') + ': ' + page.category;
15 | } else if (is_tag()){
16 | title = __('title.tag') + ': ' + page.tag;
17 | }
18 | %>
19 | <%= title %>
20 | <% page.posts.each(function(post){ %>
21 | <%- partial('article', {post: post, index: true}) %>
22 | <% }) %>
23 | <% if (page.total > 1){ %>
24 |
32 | <% } %>
33 | <% } else { %>
34 |
35 | <%
36 | var title = page.title;
37 |
38 | if (is_archive()){
39 | title = __('title.archives');
40 |
41 | if (is_month()){
42 | title += ': ' + page.year + '/' + page.month;
43 | } else if (is_year()){
44 | title += ': ' + page.year;
45 | }
46 | } else if (is_category()){
47 | title = __('title.category') + ': ' + page.category;
48 | } else if (is_tag()){
49 | title = __('title.tag') + ': ' + page.tag;
50 | }
51 | %>
52 |
<%= title %>
53 | <% var last; %>
54 | <% page.posts.each(function(post){ %>
55 | <% var day = date(post.date, 'DD'), month = date(post.date, 'YYYY MMMM') %>
56 | <% if(!last){ %>
57 | <% last = month; %>
58 |
59 |
60 |
61 | - <%= day %>: <%= post.title %>
62 | <% } else if (last == month) { %>
63 | - <%= day %>: <%= post.title %>
64 | <% } else { %>
65 | <% last = month; %>
66 |
67 |
68 |
69 |
70 |
71 | - <%= day %>: <%= post.title %>
72 | <% } %>
73 | <% }) %>
74 |
75 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/article.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- partial('post/title') %>
4 | <%- partial('post/date', {date_format: null}) %>
5 |
6 | <% if (post.image){ %>
7 |
8 |
9 |
10 |
11 |
12 | <% } %>
13 |
14 | <% if (post.excerpt && index){ %>
15 | <%- post.excerpt %>
16 | <% } else { %>
17 | <%- post.content %>
18 | <% } %>
19 |
20 | <% if (post.excerpt || (post.comments && config.disqus_shortname) || (post.comments && theme.duoshuo_shortname) || (post.tags && post.tags.length) ){ %>
21 |
35 | <% } %>
36 |
--------------------------------------------------------------------------------
/layout/_partial/footer.ejs:
--------------------------------------------------------------------------------
1 |
6 | <% if (!is_archive()){ %>
7 | <% if (config.disqus_shortname){ %>
8 | <% if(is_post()) { %>
9 |
15 | <% } else if(theme.disqus_home) { %>
16 |
25 | <% } %>
26 | <% } %>
27 |
--------------------------------------------------------------------------------
/layout/_partial/head.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%
6 | var title = page.title;
7 |
8 | if (is_archive()){
9 | title = __('title.archives');
10 |
11 | if (is_month()){
12 | title += ': ' + page.year + '/' + page.month;
13 | } else if (is_year()){
14 | title += ': ' + page.year;
15 | }
16 | } else if (is_category()){
17 | title = __('title.category') + ': ' + page.category;
18 | } else if (is_tag()){
19 | title = __('title.tag') + ': ' + page.tag;
20 | }
21 | %>
22 | <% if (title){ %><%= title %> - <% } %><%= config.title %><% if (!title && config.subtitle && theme.subtitle_show){ %> - <%= config.subtitle %><% } %>
23 |
24 |
25 | <% if (page.keywords){ %>
26 |
27 | <% } else if (page.tags){ %>
28 | <%
29 | var keywords_content=[];
30 | page.tags.each(function(k){
31 | keywords_content.push(k.name);
32 | }) %>
33 |
34 | <% } %>
35 | <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
36 | <% if (theme.favicon){ %>
37 |
38 | <% } %>
39 | <% if (theme.rss){ %>
40 |
41 | <% } %>
42 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/layout/_partial/header.ejs:
--------------------------------------------------------------------------------
1 |
37 |
--------------------------------------------------------------------------------
/layout/_partial/home.ejs:
--------------------------------------------------------------------------------
1 | <% if (pagination == 2){ %>
2 | <% page.posts.each(function(post){ %>
3 | <%- partial('article', {post: post, index: true}) %>
4 | <% }) %>
5 | <% if (page.total > 1){ %>
6 |
14 | <% } %>
15 | <% } else { %>
16 | <% var last; %>
17 | <% page.posts.each(function(post, i){ %>
18 | <% var year = post.date.year(); %>
19 | <% if (last != year){ %>
20 | <% if (last != null){ %>
21 |
22 | <% } %>
23 | <% last = year; %>
24 |
25 |
28 |
29 | <% } %>
30 | <%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
31 | <% }) %>
32 | <% if (page.posts.length){ %>
33 |
34 | <% } %>
35 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/page.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- partial('post/title') %>
4 |
5 | <% if (post.images){ %>
6 |
7 |
8 |
9 |
10 |
11 | <% } %>
12 |
13 | <%- post.content %>
14 |
15 | <% if (post.tags && post.tags.length){ %>
16 |
19 | <% } %>
20 |
21 | <% if (!index && post.comments && config.disqus_shortname){ %>
22 |
27 | <% } else if (!index && post.comments && theme.duoshuo_shortname) { %>
28 |
33 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/post.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- partial('post/title') %>
4 | <%- partial('post/date', {date_format: null}) %>
5 |
6 | <% if (post.image){ %>
7 |
8 |
9 |
10 |
11 |
12 | <% } %>
13 |
14 | <%- post.content %>
15 |
16 | <% if ((post.tags && post.tags.length) || (post.categories && post.categories.length)){ %>
17 |
23 | <% } %>
24 |
25 | <% if (!index){ %>
26 | <%- partial('post/nav') %>
27 | <% } %>
28 | <% if (!index && post.comments && config.disqus_shortname){ %>
29 |
34 | <% } else if (!index && post.comments && theme.duoshuo_shortname) { %>
35 |
40 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/post/category.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.categories && post.categories.length){ %>
2 |
3 | <% post.categories.forEach(function(category){ %>
4 | - <%= category.name %>
5 | <% }) %>
6 |
7 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/post/date.ejs:
--------------------------------------------------------------------------------
1 | <% if(post.title) { %>
2 |
3 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/post/nav.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.prev || post.next){ %>
2 |
14 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/post/tag.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.tags && post.tags.length && is_post()){ %>
2 |
3 | <% post.tags.forEach(function(tag){ %>
4 | - #<%= tag.name %>
5 | <% }) %>
6 |
7 | <% } else if (post.tags && post.tags.length) { %>
8 |
9 | <% post.tags.forEach(function(tag){ %>
10 | - #<%= tag.name %>
11 | <% }) %>
12 |
13 | <% } %>
--------------------------------------------------------------------------------
/layout/_partial/post/title.ejs:
--------------------------------------------------------------------------------
1 | <% if(is_post()){ %>
2 | <% if (post.link){ %>
3 |
6 | <% } else if (post.title){ %>
7 | <% if (index){ %>
8 |
11 | <% } else { %>
12 | <%= post.title %>
13 | <% } %>
14 | <% } else { %>
15 | <% if (index){ %>
16 |
19 | <% } else { %>
20 |
21 | <% } %>
22 | <% } %>
23 | <% } else { %>
24 | <% if (post.link){ %>
25 |
28 | <% } else if (post.title){ %>
29 | <% if (index){ %>
30 |
33 | <% } else { %>
34 | <%= post.title %>
35 | <% } %>
36 | <% } else { %>
37 | <% if (index){ %>
38 |
41 | <% } else { %>
42 |
43 | <% } %>
44 | <% } %>
45 | <% } %>
--------------------------------------------------------------------------------
/layout/archive.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/archives', {pagination: config.archive, index: true}) %>
--------------------------------------------------------------------------------
/layout/category.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/archives', {pagination: config.category, index: true}) %>
--------------------------------------------------------------------------------
/layout/index.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/home', {pagination: 2, index: true}) %>
--------------------------------------------------------------------------------
/layout/layout.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/head') %>
2 |
3 | <%- partial('_partial/header') %>
4 |
5 | <%- partial('_partial/footer') %>
6 |
7 |
--------------------------------------------------------------------------------
/layout/page.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/page', {post: page, index: false}) %>
--------------------------------------------------------------------------------
/layout/post.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/post', {post: page, index: false}) %>
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Simplecho",
3 | "version": "0.1.2",
4 | "author": "Garwi"
5 | }
--------------------------------------------------------------------------------
/source/css/base.css:
--------------------------------------------------------------------------------
1 | /* alice.base 样式模块 */
2 |
3 | /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
4 | html {
5 | color:#000;background:#fff;
6 | -webkit-text-size-adjust: 100%;
7 | -ms-text-size-adjust: 100%;
8 | }
9 |
10 | /* 内外边距通常让各个浏览器样式的表现位置不同 */
11 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
12 | margin:0;padding:0;
13 | }
14 |
15 | /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
16 | article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
17 | display:block;
18 | }
19 |
20 | /* HTML5 媒体文件跟 img 保持一致 */
21 | audio,canvas,video {
22 | display: inline-block;*display: inline;*zoom: 1;
23 | }
24 |
25 | /* 要注意表单元素并不继承父级 font 的问题 */
26 | body,button,input,select,textarea {
27 | font:12px/1.5 tahoma,arial,"Hiragino Sans GB",\5b8b\4f53;
28 | }
29 | input,select,textarea {
30 | font-size:100%;
31 | }
32 |
33 | /* 去掉各Table cell 的边距并让其边重合 */
34 | table {
35 | border-collapse:collapse;border-spacing:0;
36 | }
37 |
38 | /* IE bug fixed: th 不继承 text-align*/
39 | th {
40 | text-align:inherit;
41 | }
42 |
43 | /* 去除默认边框 */
44 | fieldset,img {
45 | border:0;
46 | }
47 |
48 | /* ie6 7 8(q) bug 显示为行内表现 */
49 | iframe {
50 | display:block;
51 | }
52 |
53 | /* 去掉 firefox 下此元素的边框 */
54 | abbr,acronym {
55 | border:0;font-variant:normal;
56 | }
57 |
58 | /* 一致的 del 样式 */
59 | del {
60 | text-decoration:line-through;
61 | }
62 |
63 | address,caption,cite,code,dfn,em,th,var {
64 | font-style:normal;
65 | font-weight:500;
66 | }
67 |
68 | /* 去掉列表前的标识, li 会继承 */
69 | ol,ul {
70 | list-style:none;
71 | }
72 |
73 | /* 对齐是排版最重要的因素, 别让什么都居中 */
74 | caption,th {
75 | text-align:left;
76 | }
77 |
78 | /* 来自yahoo, 让标题都自定义, 适应多个系统应用 */
79 | h1,h2,h3,h4,h5,h6 {
80 | font-size:100%;
81 | font-weight:500;
82 | }
83 |
84 | q:before,q:after {
85 | content:'';
86 | }
87 |
88 | /* 统一上标和下标 */
89 | sub, sup {
90 | font-size: 75%; line-height: 0; position: relative; vertical-align: baseline;
91 | }
92 | sup { top: -0.5em; }
93 | sub { bottom: -0.25em; }
94 |
95 | /* 正常链接 未访问 */
96 | a:link {
97 | color: #08c;
98 | }
99 |
100 | /* 鼠标悬停 */
101 | a:hover {
102 | color: #08c;
103 | text-decoration: underline;
104 | }
105 |
106 | /* 默认不显示下划线,保持页面简洁 */
107 | ins,a {
108 | text-decoration:none;
109 | }
110 |
111 | /* 代码字体 */
112 | code,
113 | kbd,
114 | pre,
115 | samp {
116 | font-family: monospace, serif;
117 | font-size: 1em;
118 | }
119 |
120 | /* 清理浮动 */
121 | .clear:after {
122 | visibility:hidden;
123 | display:block;
124 | font-size:0;
125 | content:" ";
126 | clear:both;
127 | height:0;
128 | }
129 | .clear {
130 | zoom:1; /* for IE6 IE7 */
131 | }
132 |
133 | /* 隐藏, 通常用来与 JS 配合 */
134 | body .fn-hide {
135 | display:none;
136 | }
137 |
138 | /* 设置内联, 减少浮动带来的bug */
139 | .fl, .fr {
140 | display:inline;
141 | }
142 | .fl {
143 | float:left;
144 | }
145 | .fr {
146 | float:right;
147 | }
148 |
149 | /* 单行文字溢出时出现省略号,需设定宽度 */
150 | .fn-text-overflow {
151 | overflow: hidden;
152 | text-overflow: ellipsis;
153 | white-space: nowrap;
154 | }
155 |
156 | /* 简单的渐变 */
157 | .fn-linear {
158 | background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f1f1f1));
159 | background: -moz-linear-gradient(top, #fcfcfc, #f1f1f1);
160 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f1f1f1');
161 | background:-o-linear-gradient(top, #fcfcfc, #f1f1f1);
162 | background:-ms-linear-gradient(top, #fcfcfc, #f1f1f1);
163 | background: linear-gradient(to bottom, #fcfcfc, #f1f1f1);
164 | }
165 |
166 | /* 浅色的渐变 */
167 | .fn-linear-light {
168 | background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f9f9f9));
169 | background: -moz-linear-gradient(top, #fcfcfc, #f9f9f9);
170 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f9f9f9');
171 | background:-o-linear-gradient(top, #fcfcfc, #f9f9f9);
172 | background:-ms-linear-gradient(top, #fcfcfc, #f9f9f9);
173 | background: linear-gradient(to bottom, #fcfcfc, #f9f9f9);
174 | }
175 |
176 | /* 人民币符号 */
177 | .fn-rmb {
178 | font-family: arial;
179 | font-style: normal;
180 | padding-right: 4px;
181 | }
182 |
183 |
184 | /* chrome 下字体过小的问题 */
185 | .fn-webkit-adjust {
186 | -webkit-text-size-adjust: none;
187 | }
188 |
189 | /* 一致化 horizontal rule */
190 | hr{
191 | border:none;
192 | border-bottom:1px solid #cfcfcf;
193 | margin-bottom:10px;
194 | *color:pink; *filter:chroma(color=pink);
195 | height:10px;
196 | *margin:-7px 0 2px;
197 | }
198 |
199 | /* 底部印刷体、版本等标记 */
200 | small, .typo-small,
201 | /* 图片说明 */
202 | figcaption{
203 | font-size:0.9em;
204 | color:#888;
205 | }
206 |
207 | strong, b{font-weight:bold;color:#000;}
208 |
209 | /* Firefox 以外,元素没有下划线,需添加 */
210 | acronym, abbr{
211 | border-bottom:1px dotted;
212 | font-variant:normal;
213 | }
214 |
215 | /* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
216 | abbr{
217 | cursor:help;
218 | }
--------------------------------------------------------------------------------
/source/css/highlight.css:
--------------------------------------------------------------------------------
1 | .highlight {
2 | display: block;
3 | overflow-x: auto;
4 | padding: 0.5em;
5 | background: #002b36;
6 | color: #839496;
7 | -webkit-text-size-adjust: none;
8 | }
9 |
10 | .comment,
11 | .diff .header,
12 | .doctype,
13 | .pi,
14 | .lisp .string,
15 | .javadoc {
16 | color: #586e75;
17 | }
18 |
19 | /* Solarized Green */
20 | .keyword,
21 | .winutils,
22 | .method,
23 | .addition,
24 | .css .tag,
25 | .request,
26 | .status,
27 | .nginx .title {
28 | color: #859900;
29 | }
30 |
31 | /* Solarized Cyan */
32 | .number,
33 | .command,
34 | .string,
35 | .tag .value,
36 | .rules .value,
37 | .phpdoc,
38 | .dartdoc,
39 | .tex .formula,
40 | .regexp,
41 | .hexcolor,
42 | .link_url {
43 | color: #2aa198;
44 | }
45 |
46 | /* Solarized Blue */
47 | .title,
48 | .localvars,
49 | .chunk,
50 | .decorator,
51 | .built_in,
52 | .identifier,
53 | .vhdl .literal,
54 | .id,
55 | .css .function {
56 | color: #268bd2;
57 | }
58 |
59 | /* Solarized Yellow */
60 | .attribute,
61 | .variable,
62 | .lisp .body,
63 | .smalltalk .number,
64 | .constant,
65 | .class .title,
66 | .parent,
67 | .type,
68 | .link_reference {
69 | color: #b58900;
70 | }
71 |
72 | /* Solarized Orange */
73 | .preprocessor,
74 | .preprocessor .keyword,
75 | .pragma,
76 | .shebang,
77 | .symbol,
78 | .symbol .string,
79 | .diff .change,
80 | .special,
81 | .attr_selector,
82 | .subst,
83 | .cdata,
84 | .css .pseudo,
85 | .header {
86 | color: #cb4b16;
87 | }
88 |
89 | /* Solarized Red */
90 | .deletion,
91 | .important {
92 | color: #dc322f;
93 | }
94 |
95 | /* Solarized Violet */
96 | .link_label {
97 | color: #6c71c4;
98 | }
99 |
100 | .tex .formula {
101 | background: #073642;
102 | }
--------------------------------------------------------------------------------
/source/css/style.css:
--------------------------------------------------------------------------------
1 | /* alice.base 样式模块 */
2 |
3 | /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
4 | html {
5 | color:#000;background:#fff;
6 | -webkit-text-size-adjust: 100%;
7 | -ms-text-size-adjust: 100%;
8 | }
9 |
10 | /* 内外边距通常让各个浏览器样式的表现位置不同 */
11 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
12 | margin:0;padding:0;
13 | }
14 |
15 | /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
16 | article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
17 | display:block;
18 | }
19 |
20 | /* HTML5 媒体文件跟 img 保持一致 */
21 | audio,canvas,video {
22 | display: inline-block;*display: inline;*zoom: 1;
23 | }
24 |
25 | /* 要注意表单元素并不继承父级 font 的问题 */
26 | body,button,input,select,textarea {
27 | font:12px/1.5 tahoma,arial,"Hiragino Sans GB",\5b8b\4f53;
28 | }
29 | input,select,textarea {
30 | font-size:100%;
31 | }
32 |
33 | /* 去掉各Table cell 的边距并让其边重合 */
34 | table {
35 | border-collapse:collapse;border-spacing:0;
36 | }
37 |
38 | /* IE bug fixed: th 不继承 text-align*/
39 | th {
40 | text-align:inherit;
41 | }
42 |
43 | /* 去除默认边框 */
44 | fieldset,img {
45 | border:0;
46 | }
47 |
48 | /* ie6 7 8(q) bug 显示为行内表现 */
49 | iframe {
50 | display:block;
51 | }
52 |
53 | /* 去掉 firefox 下此元素的边框 */
54 | abbr,acronym {
55 | border:0;font-variant:normal;
56 | }
57 |
58 | /* 一致的 del 样式 */
59 | del {
60 | text-decoration:line-through;
61 | }
62 |
63 | address,caption,cite,code,dfn,em,th,var {
64 | font-style:normal;
65 | font-weight:500;
66 | }
67 |
68 | /* 去掉列表前的标识, li 会继承 */
69 | ol,ul {
70 | list-style:none;
71 | }
72 |
73 | /* 对齐是排版最重要的因素, 别让什么都居中 */
74 | caption,th {
75 | text-align:left;
76 | }
77 |
78 | /* 来自yahoo, 让标题都自定义, 适应多个系统应用 */
79 | h1,h2,h3,h4,h5,h6 {
80 | font-size:100%;
81 | font-weight:500;
82 | }
83 |
84 | q:before,q:after {
85 | content:'';
86 | }
87 |
88 | /* 统一上标和下标 */
89 | sub, sup {
90 | font-size: 75%; line-height: 0; position: relative; vertical-align: baseline;
91 | }
92 | sup { top: -0.5em; }
93 | sub { bottom: -0.25em; }
94 |
95 | /* 正常链接 未访问 */
96 | a:link {
97 | color: #08c;
98 | }
99 |
100 | /* 鼠标悬停 */
101 | a:hover {
102 | color: #08c;
103 | text-decoration: underline;
104 | }
105 |
106 | /* 默认不显示下划线,保持页面简洁 */
107 | ins,a {
108 | text-decoration:none;
109 | }
110 |
111 | /* 代码字体 */
112 | code,
113 | kbd,
114 | pre,
115 | samp {
116 | font-family: monospace, serif;
117 | font-size: 1em;
118 | }
119 |
120 | /* 清理浮动 */
121 | .clear:after {
122 | visibility:hidden;
123 | display:block;
124 | font-size:0;
125 | content:" ";
126 | clear:both;
127 | height:0;
128 | }
129 | .clear {
130 | zoom:1; /* for IE6 IE7 */
131 | }
132 |
133 | /* 隐藏, 通常用来与 JS 配合 */
134 | body .fn-hide {
135 | display:none;
136 | }
137 |
138 | /* 设置内联, 减少浮动带来的bug */
139 | .fl, .fr {
140 | display:inline;
141 | }
142 | .fl {
143 | float:left;
144 | }
145 | .fr {
146 | float:right;
147 | }
148 |
149 | /* 单行文字溢出时出现省略号,需设定宽度 */
150 | .fn-text-overflow {
151 | overflow: hidden;
152 | text-overflow: ellipsis;
153 | white-space: nowrap;
154 | }
155 |
156 | /* 简单的渐变 */
157 | .fn-linear {
158 | background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f1f1f1));
159 | background: -moz-linear-gradient(top, #fcfcfc, #f1f1f1);
160 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f1f1f1');
161 | background:-o-linear-gradient(top, #fcfcfc, #f1f1f1);
162 | background:-ms-linear-gradient(top, #fcfcfc, #f1f1f1);
163 | background: linear-gradient(to bottom, #fcfcfc, #f1f1f1);
164 | }
165 |
166 | /* 浅色的渐变 */
167 | .fn-linear-light {
168 | background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f9f9f9));
169 | background: -moz-linear-gradient(top, #fcfcfc, #f9f9f9);
170 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f9f9f9');
171 | background:-o-linear-gradient(top, #fcfcfc, #f9f9f9);
172 | background:-ms-linear-gradient(top, #fcfcfc, #f9f9f9);
173 | background: linear-gradient(to bottom, #fcfcfc, #f9f9f9);
174 | }
175 |
176 | /* 人民币符号 */
177 | .fn-rmb {
178 | font-family: arial;
179 | font-style: normal;
180 | padding-right: 4px;
181 | }
182 |
183 |
184 | /* chrome 下字体过小的问题 */
185 | .fn-webkit-adjust {
186 | -webkit-text-size-adjust: none;
187 | }
188 |
189 | /* 一致化 horizontal rule */
190 | hr{
191 | border:none;
192 | border-bottom:1px solid #cfcfcf;
193 | margin-bottom:10px;
194 | *color:pink; *filter:chroma(color=pink);
195 | height:10px;
196 | *margin:-7px 0 2px;
197 | }
198 |
199 | /* 底部印刷体、版本等标记 */
200 | small, .typo-small,
201 | /* 图片说明 */
202 | figcaption{
203 | font-size:0.9em;
204 | color:#888;
205 | }
206 |
207 | strong, b{font-weight:bold;color:#000;}
208 |
209 | /* Firefox 以外,元素没有下划线,需添加 */
210 | acronym, abbr{
211 | border-bottom:1px dotted;
212 | font-variant:normal;
213 | }
214 |
215 | /* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
216 | abbr{
217 | cursor:help;
218 | }
219 |
220 | html,body{
221 | height: 100%;
222 | color: #666;
223 | background-color: #f2f2f2;
224 | }
225 |
226 | #header,#main,#footer{
227 | font-family:Avenir, 'Helvetica Neue', 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;
228 | }
229 |
230 | #logo, .w, .page-nav{
231 | width: 1000px;
232 | margin: 0 auto;
233 | }
234 |
235 | @media (max-width:1024px){
236 | #logo, .w, .page-nav{
237 | width: 96%;
238 | margin: 0 auto;
239 | }
240 | }
241 |
242 | @media (max-width:768px){
243 | #nav #nav-search{
244 | display: none;
245 | }
246 | }
247 |
248 | .nav-warp{
249 | background: url(../images/top_border.png) repeat-x 0 bottom;
250 | background-color: #000;
251 | }
252 |
253 | #nav{
254 | position: relative;
255 | height: 40px;
256 | overflow: hidden;
257 | }
258 |
259 | #nav a{
260 | display: inline-block;
261 | height: 40px;
262 | line-height: 40px;
263 | font-size: 14px;
264 | padding: 0 20px;
265 | color: #999;
266 | }
267 |
268 |
269 | #nav-search{
270 | cursor: pointer;
271 | }
272 |
273 | #nav a:hover{
274 | color: #fff;
275 | text-decoration: none;
276 | }
277 |
278 | #nav .hide{
279 | opacity: 0;
280 | visibility: hidden;
281 | transition: all 2s;
282 | -webkit-transition: all 2s;
283 | }
284 |
285 | #nav .show{
286 | opacity: 100;
287 | transition: all 2s;
288 | -webkit-transition: all 2s;
289 | }
290 |
291 | #nav-search-input{
292 | position: absolute;
293 | right: 50px;
294 | top: 6px;
295 | }
296 |
297 | #nav .input-submit{
298 | display: none;
299 | }
300 |
301 | #nav-search-input .input-text{
302 | width: 200px;
303 | height: 18px;
304 | padding: 3px 5px;
305 | border: 1px solid #ccc;
306 | background-color: #f2f2f2;
307 | border-radius: 5px;
308 | -webkit-border-radius: 5px;
309 | -moz-border-radius: 5px;
310 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
311 | }
312 |
313 | #site-title{
314 | padding: 180px 0 0;
315 | font-size: 4.2em;
316 | }
317 |
318 | #site-description{
319 | font-size: 1.2em;
320 | font-weight: 200;
321 | color: #fff;
322 | }
323 |
324 | #logo{
325 | height: 500px;
326 | overflow: hidden;
327 | text-align: center;
328 | background: url(../images/bg_head2.jpg) no-repeat center center;
329 | background-size: 100%;
330 | }
331 |
332 | #logo a{
333 | color: #fff;
334 | text-decoration: none;
335 | }
336 |
337 | @media (max-width:1024px){
338 | #logo {
339 | height: 300px;
340 | }
341 |
342 | #site-title {
343 | padding-top: 100px;
344 | font-size: 3.2em;
345 | }
346 |
347 | #site-description{
348 | font-size: 1em;
349 | font-weight: 200;
350 | color: #fff;
351 | }
352 | }
353 |
354 | @media (max-width:768px) {
355 | #logo {
356 | height: auto;
357 | }
358 |
359 | #site-title {
360 | padding: 0;
361 | }
362 |
363 | .hg {
364 | padding: 4em 0;
365 | }
366 | }
367 |
368 | @media (max-width:360px) {
369 | .hg {
370 | padding: 2em 0;
371 | }
372 | }
373 |
374 | /* Main */
375 | #main{
376 | width: 1000px;
377 | margin: 20px auto 40px;
378 | }
379 |
380 | @media (max-width:1024px){
381 | #main{
382 | width: 96%;
383 | margin: 15px auto 20px;
384 | }
385 | }
386 |
387 | .post{
388 | background-color: #fff;
389 | overflow: hidden;
390 | box-shadow: 0 2px 3px #ddd;
391 | }
392 |
393 | .post-head,.post-content,.post-foot-warp{
394 | width: 850px;
395 | margin: 0 auto;
396 | }
397 |
398 | .post{
399 | margin-bottom: 30px;
400 | }
401 |
402 | @media (max-width:1024px){
403 | .post-head,.post-content,.post-foot-warp{
404 | width: 92%;
405 | margin: 0 4%;
406 | }
407 |
408 | .post{
409 | margin-bottom: 15px;
410 | }
411 | }
412 |
413 | .post-head{
414 | padding: 30px 0 20px;
415 | margin-bottom: 10px;
416 | }
417 |
418 | .post-title{
419 | font-size: 2.5em;
420 | font-weight: lighter;
421 | }
422 |
423 | .post-title > a{
424 | color: #666;
425 | }
426 |
427 | .post-title > a:hover{
428 | color: #999;
429 | text-decoration: none;
430 | }
431 |
432 | .post-time{
433 | color: #ccc;
434 | }
435 |
436 | .post-images{
437 | margin: 20px 0 30px;
438 | }
439 |
440 | .post-content{
441 | font-size: 14px;
442 | line-height: 1.8;
443 | margin-bottom: 50px;
444 | }
445 |
446 | .post-content p{
447 | word-wrap:break-word;
448 | }
449 |
450 | .post-content blockquote{
451 | border-left: 5px solid #ddd;
452 | background-color: #eee;
453 | color: #999;
454 | overflow: hidden;
455 | }
456 |
457 | .post-content blockquote p{
458 | margin: 1.2em 0;
459 | }
460 |
461 | .post-content blockquote{
462 | margin: 1.6em -75px;
463 | padding: 10px 70px;
464 | }
465 |
466 | .post-content .highlight {
467 | margin: 1.6em -75px;
468 | padding: 20px;
469 | }
470 |
471 | .post-content .highlight table td {
472 | color: #839496;
473 | }
474 |
475 | @media (max-width:1024px){
476 | .post-content blockquote{
477 | margin: 1.6em -4.4%;
478 | padding: 10px 4%;
479 | }
480 |
481 | .post-content .highlight {
482 | margin: 1.6em -4%;
483 | padding: 2%;
484 | }
485 | }
486 |
487 | .post-content .highlight table,
488 | .post-content .highlight pre{
489 | margin-bottom: 0;
490 | }
491 |
492 | .highlight {
493 | overflow: auto;
494 | background-color: #2d2d2d;
495 | color: #ccc;
496 | }
497 |
498 | .highlight .gutter {
499 | color: #666;
500 | }
501 |
502 | .post-content .highlight td,
503 | .post-content .highlight th {
504 | border: none;
505 | }
506 |
507 |
508 | .post-foot{
509 | padding: 25px 0;
510 | border-top: 1px solid #ddd;
511 | }
512 |
513 | @media (max-width: 768px){
514 | .post-foot{
515 | padding:0;
516 | border-top: 1px solid #ddd;
517 | }
518 | }
519 |
520 | .post-foot a{
521 | color: #999;
522 | }
523 |
524 | .post-foot a:hover{
525 | color: #666;
526 | }
527 |
528 | .post-tag{
529 | height: 40px;
530 | line-height: 20px;
531 | }
532 |
533 | .post-tag li,
534 | .post-category li{
535 | float: left;
536 | }
537 |
538 | .post-tag a,
539 | .post-category a{
540 | display: block;
541 | padding: 10px 8px 10px;
542 | }
543 |
544 | a.post-foot-link{
545 | height: 40px;
546 | line-height: 40px;
547 | color: #999;
548 | font-size: 1em;
549 | padding-left: 15px;
550 | }
551 |
552 | @media (max-width: 768px){
553 | a.post-foot-link{
554 | width: 100%;
555 | text-align: center;
556 | padding: 10px 0;
557 | }
558 |
559 | .post-category, .post-tag{
560 | padding: 10px 0;
561 | }
562 |
563 | .home-tag{
564 | display: none;
565 | }
566 | }
567 |
568 | .page-nav,
569 | #post-nav{
570 | text-align: center;
571 | }
572 |
573 | .page-nav a,
574 | a.post-nav-link-wrap{
575 | display: inline-block;
576 | padding: 5px 10px;
577 | font-size: 1.4em;
578 | font-weight: lighter;
579 | color: #999;
580 | }
581 |
582 | .page-nav a:hover,
583 | a.post-nav-link-wrap:hover{
584 | color: #666;
585 | text-decoration: none;
586 | }
587 |
588 | #comments{
589 | margin-top: 30px;
590 | }
591 |
592 | /* Archive */
593 | #archives{
594 | min-height: 264px;
595 | padding: 30px 75px;
596 | background-color: #fff;
597 | overflow: hidden;
598 | box-shadow: 0 2px 3px #ddd;
599 | }
600 |
601 | @media (max-width:1024px){
602 | #archives{
603 | width: 92%;
604 | padding: 30px 4%;
605 | margin-bottom: 2%;
606 | }
607 | }
608 |
609 | #archives h1{
610 | font-size: 2.5em;
611 | margin-bottom: 20px;
612 | }
613 |
614 | #archives .month{
615 | margin-bottom: 20px;
616 | }
617 |
618 | #archives .month-title{
619 | font-size: 1.8em;
620 | font-weight: lighter;
621 | }
622 |
623 | #archives .post-list{
624 | padding-left: 20px;
625 | }
626 |
627 | #archives .post-list li{
628 | padding: 5px 0;
629 | font-size: 1.2em;
630 | }
631 |
632 | #archives .post-list a{
633 | color: #999;
634 | }
635 |
636 | #archives .post-list a:hover{
637 | color: #333;
638 | text-decoration: none;
639 | }
640 |
641 | /* Footer */
642 |
643 | #footer{
644 | color: #999;
645 | line-height: 21px;
646 | background-color: #333;
647 | padding: 20px 0;
648 | }
649 |
650 | .foot-warp{
651 | width: 850px;
652 | margin: 0 auto;
653 | padding: 0 75px;
654 | }
655 |
656 | @media (max-width:1024px){
657 | .foot-warp{
658 | width: 96%;
659 | text-align: center;
660 | padding: 0;
661 | }
662 | }
663 |
664 | /* Icon Font */
665 | @font-face {
666 | font-family: 'fontello';
667 | src: url('../font/fontello.eot?18127066');
668 | src: url('../font/fontello.eot?18127066#iefix') format('embedded-opentype'),
669 | url('../font/fontello.woff?18127066') format('woff'),
670 | url('../font/fontello.ttf?18127066') format('truetype'),
671 | url('../font/fontello.svg?18127066#fontello') format('svg');
672 | font-weight: normal;
673 | font-style: normal;
674 | }
675 |
676 | [class^="icon-"]:before, [class*=" icon-"]:before {
677 | font-family: "fontello";
678 | font-style: normal;
679 | font-weight: normal;
680 |
681 | display: inline-block;
682 | text-decoration: inherit;
683 | width: 14px;
684 | margin-right: .2em;
685 | text-align: center;
686 | /* opacity: .8; */
687 |
688 | /* For safety - reset parent styles, that can break glyph codes*/
689 | font-variant: normal;
690 | text-transform: none;
691 |
692 | /* fix buttons height, for twitter bootstrap */
693 | line-height: 40px;
694 |
695 | /* Animation center compensation - margins should be symmetric */
696 | /* remove if not needed */
697 | margin-left: .2em;
698 |
699 | /* you can be more comfortable with increased icons size */
700 | font-size: 120%;
701 |
702 | /* Uncomment for 3D effect */
703 | /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
704 | }
705 |
706 | .icon-tag:before { content: '\e803'; float: left; color: #666;}
707 | .icon-category:before{ content: '\e802'; float: left; color: #666;}
708 | .icon-search:before{content: '\e801';}
709 | .icon-link:before{ content: '\e800'; color: #666; font-size: 0.9em; padding-left: 5px;}
710 |
711 | /* Typo */
712 |
713 | /* 提供 serif 版本的字体设置: iOS 下中文自动 fallback 到 sans-serif */
714 | .serif{ font-family:Palatino, Optima, Georgia, serif; }
715 |
716 | /* 保证块/段落之间的空白隔行 */
717 | .typo p, .typo pre, .typo ul, .typo ol, .typo dl, .typo form, .typo hr, .typo table,
718 | .typo-p, .typo-pre, .typo-ul, .typo-ol, .typo-dl, .typo-form, .typo-hr, .typo-table, blockquote{
719 | margin-bottom:1.8em;
720 | }
721 |
722 | h1, h2, h3, h4, h5, h6{
723 | font-family:'Helvetica Neue', 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;
724 | font-weight:200;
725 | color:#000;
726 | }
727 |
728 |
729 |
730 | .typo a{
731 | color: #258fb8;
732 | }
733 |
734 | .typo kbd{
735 | box-shadow: 0 1px 0px rgba(0,0,0,0.2), 0 0 0 2px #fff inset;
736 | }
737 |
738 | .typo code, .typo kbd{
739 | padding: 2px 6px;
740 | white-space: nowrap;
741 | color: #555;
742 | background: #eee;
743 | border-radius: 4px;
744 | font-size: 13px;
745 | }
746 |
747 | .typo code, .typo kbd, .typo pre, .typo samp{
748 | font-family: 'Source Code Pro', Consolas, 'Liberation Mono', Courier, 'PT Mono', "PingFang SC", "Microsoft YaHei", monospace, serif;
749 | }
750 |
751 | /* 标题应该更贴紧内容,并与其他块区分,margin 值要相应做优化 */
752 | .typo h1, .typo h2, .typo h3, .typo h4, .typo h5, .typo h6,
753 | .typo-h1, .typo-h2, .typo-h3, .typo-h4, .typo-h5, .typo-h6{
754 | margin-bottom:0.4em;
755 | margin-top: 1em;
756 | line-height:1.5;
757 | }
758 |
759 | .typo h1, .typo-h1{
760 | font-size:2em;
761 | }
762 |
763 | .typo h2, .typo-h2{
764 | font-size:1.8em;
765 | }
766 |
767 | .typo h3, .typo-h3{
768 | font-size:1.6em;
769 | }
770 |
771 | .typo h4, .typo-h4{
772 | font-size:1.4em;
773 | }
774 |
775 | .typo h5, .typo h6, .typo-h5, .typo-h6{
776 | font-size:1.2em;
777 | }
778 |
779 | /* 在文章中,应该还原 ul 和 ol 的样式 */
780 | .typo ul, .typo-ul{
781 | margin-left:1.3em;
782 | list-style:disc;
783 | }
784 |
785 | .typo ol, .typo-ol{
786 | list-style:decimal;
787 | margin-left:1.9em;
788 | }
789 |
790 | .typo li ul, .typo li ol, .typo-ul ul, .typo-ul ol, .typo-ol ul, .typo-ol ol{
791 | margin-top:0;
792 | margin-bottom:0;
793 | margin-left:2em;
794 | }
795 |
796 | .typo li ul, .typo-ul ul, .typo-ol ul{
797 | list-style:circle;
798 | }
799 |
800 | /* 同 ul/ol,在文章中应用 table 基本格式 */
801 | .typo table th, .typo table td, .typo-table th, .typo-table td .typo table caption{
802 | border:1px solid #ddd;
803 | padding:0.5em 1em;
804 | color:#666;
805 | }
806 |
807 | .typo table th, .typo-table th{
808 | background:#fbfbfb;
809 | }
810 |
811 | .typo table thead th, .typo-table thead th{
812 | background:#f1f1f1;
813 | }
814 |
815 | .typo table caption{
816 | border-bottom:none;
817 | }
818 |
819 | /* 去除 webkit 中 input 和 textarea 的默认样式 */
820 | .typo-input, .typo-textarea{
821 | -webkit-appearance:none;
822 | border-radius:0;
823 | }
824 |
825 | /* 高亮选中 */
826 | ::-moz-selection{
827 | background:#08c;
828 | color:#fff;
829 | }
830 |
831 | ::selection{
832 | background:#08c;
833 | color:#fff;
834 | }
835 |
836 | .typo-em, .typo em, .typo cite, legend, caption{
837 | font-weight:inherit;
838 | font-style: italic;
839 | }
840 |
841 | /* 着重号,只能在少量(少于100个字符)且全是全角字符的情况下使用 */
842 | .typo-em {
843 | position: relative;
844 | }
845 | .typo-em:after {
846 | position: absolute;
847 | top: 0.65em;
848 | left: 0;
849 | width: 100%;
850 | overflow: hidden;
851 | content: "・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・";
852 | }
853 |
854 | /* Responsive images */
855 | .typo img{ max-width: 100%; }
856 | .post-images img{ max-width: 100%; }
857 | .video {
858 | position: relative;
859 | padding-bottom: 56.25%;
860 | padding-top: 30px;
861 | height: 0;
862 | overflow: hidden;
863 | }
864 | .video iframe {
865 | position: absolute;
866 | top:0;
867 | left: 0;
868 | width: 100%;
869 | height: 100%;
870 | }
871 |
872 | .line{
873 | height: 25px;
874 | }
--------------------------------------------------------------------------------
/source/font/fontello.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/font/fontello.eot
--------------------------------------------------------------------------------
/source/font/fontello.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/source/font/fontello.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/font/fontello.ttf
--------------------------------------------------------------------------------
/source/font/fontello.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/font/fontello.woff
--------------------------------------------------------------------------------
/source/images/bg_head.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/images/bg_head.jpg
--------------------------------------------------------------------------------
/source/images/bg_head2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/images/bg_head2.jpg
--------------------------------------------------------------------------------
/source/images/top_border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/images/top_border.png
--------------------------------------------------------------------------------
/source/images/top_border2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garwih/hexo-theme-simplecho/cefea838102ea7cf53d291ef99391cab84a14323/source/images/top_border2.png
--------------------------------------------------------------------------------
/source/js/css3-mediaqueries.js:
--------------------------------------------------------------------------------
1 | if(typeof Object.create!=="function"){Object.create=function(e){function t(){}t.prototype=e;return new t}}var ua={toString:function(){return navigator.userAgent},test:function(e){return this.toString().toLowerCase().indexOf(e.toLowerCase())>-1}};ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];ua.webkit=ua.test("webkit");ua.gecko=ua.test("gecko")&&!ua.webkit;ua.opera=ua.test("opera");ua.ie=ua.test("msie")&&!ua.opera;ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";var domReady=function(){var e=[];var t=function(){if(!arguments.callee.done){arguments.callee.done=true;for(var t=0;t=200&&r.status<300||r.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof r.status==="undefined"){t(r.responseText)}else{n()}document.documentElement.style.cursor="";r=null}};r.send("")};var l=function(t){t=t.replace(e.REDUNDANT_COMPONENTS,"");t=t.replace(e.REDUNDANT_WHITESPACE,"$1");t=t.replace(e.WHITESPACE_IN_PARENTHESES,"($1)");t=t.replace(e.MORE_WHITESPACE," ");t=t.replace(e.FINAL_SEMICOLONS,"}");return t};var c={stylesheet:function(t){var n={};var r=[],i=[],s=[],o=[];var u=t.cssHelperText;var a=t.getAttribute("media");if(a){var f=a.toLowerCase().split(",")}else{var f=["all"]}for(var l=0;l-1&&a.href&&a.href.length!==0&&!a.disabled){r[r.length]=a}}if(r.length>0){var c=0;var d=function(){c++;if(c===r.length){i()}};var v=function(t){var n=t.href;f(n,function(r){r=l(r).replace(e.RELATIVE_URLS,"url("+n.substring(0,n.lastIndexOf("/"))+"/$1)");t.cssHelperText=r;d()},d)};for(u=0;u0){r.setAttribute("media",t.join(","))}document.getElementsByTagName("head")[0].appendChild(r);if(r.styleSheet){r.styleSheet.cssText=e}else{r.appendChild(document.createTextNode(e))}r.addedWithCssHelper=true;if(typeof n==="undefined"||n===true){cssHelper.parsed(function(t){var n=p(r,e);for(var i in n){if(n.hasOwnProperty(i)){g(i,n[i])}}a("newStyleParsed",r)})}else{r.parsingDisallowed=true}return r},removeStyle:function(e){return e.parentNode.removeChild(e)},parsed:function(e){if(n){s(e)}else{if(typeof t!=="undefined"){if(typeof e==="function"){e(t)}}else{s(e);d()}}},stylesheets:function(e){cssHelper.parsed(function(t){e(m.stylesheets||y("stylesheets"))})},mediaQueryLists:function(e){cssHelper.parsed(function(t){e(m.mediaQueryLists||y("mediaQueryLists"))})},rules:function(e){cssHelper.parsed(function(t){e(m.rules||y("rules"))})},selectors:function(e){cssHelper.parsed(function(t){e(m.selectors||y("selectors"))})},declarations:function(e){cssHelper.parsed(function(t){e(m.declarations||y("declarations"))})},properties:function(e){cssHelper.parsed(function(t){e(m.properties||y("properties"))})},broadcast:a,addListener:function(e,t){if(typeof t==="function"){if(!u[e]){u[e]={listeners:[]}}u[e].listeners[u[e].listeners.length]=t}},removeListener:function(e,t){if(typeof t==="function"&&u[e]){var n=u[e].listeners;for(var r=0;r=a||s&&l0}}else if("device-height"===e.substring(r-13,r)){c=screen.height;if(t!==null){if(u==="length"){return i&&c>=a||s&&c0}}else if("width"===e.substring(r-5,r)){l=document.documentElement.clientWidth||document.body.clientWidth;if(t!==null){if(u==="length"){return i&&l>=a||s&&l0}}else if("height"===e.substring(r-6,r)){c=document.documentElement.clientHeight||document.body.clientHeight;if(t!==null){if(u==="length"){return i&&c>=a||s&&c0}}else if("device-aspect-ratio"===e.substring(r-19,r)){return u==="aspect-ratio"&&screen.width*a[1]===screen.height*a[0]}else if("color-index"===e.substring(r-11,r)){var h=Math.pow(2,screen.colorDepth);if(t!==null){if(u==="absolute"){return i&&h>=a||s&&h0}}else if("color"===e.substring(r-5,r)){var p=screen.colorDepth;if(t!==null){if(u==="absolute"){return i&&p>=a||s&&p0}}else if("resolution"===e.substring(r-10,r)){var d;if(f==="dpcm"){d=o("1cm")}else{d=o("1in")}if(t!==null){if(u==="resolution"){return i&&d>=a||s&&d0}}else{return false}};var a=function(e){var t=e.getValid();var n=e.getExpressions();var r=n.length;if(r>0){for(var i=0;i0){u=false;for(var f=0;f0){l[c++]=","}l[c++]=h}}if(l.length>0){r[r.length]=cssHelper.addStyle("@media "+l.join("")+"{"+e.getCssText()+"}",t,false)}};var l=function(e,t){for(var n=0;n0}}var o=[],u=[];for(var f in i){if(i.hasOwnProperty(f)){o[o.length]=f;if(i[f]){u[u.length]=f}if(f==="all"){n=true}}}if(u.length>0){r[r.length]=cssHelper.addStyle(e.getCssText(),u,false)}var c=e.getMediaQueryLists();if(n){l(c)}else{l(c,o)}};var h=function(e){for(var t=0;td||Math.abs(s-t)>d){e=n;t=s;clearTimeout(r);r=setTimeout(function(){if(!i()){p()}else{cssHelper.broadcast("cssMediaQueriesTested")}},500)}};window.onresize=function(){var e=window.onresize||function(){};return function(){e();s()}}()};var m=document.documentElement;m.style.marginLeft="-32767px";setTimeout(function(){m.style.marginLeft=""},5e3);return function(){if(!i()){cssHelper.addListener("newStyleParsed",function(e){c(e.cssHelperParsed.stylesheet)});cssHelper.addListener("cssMediaQueriesTested",function(){if(ua.ie){m.style.width="1px"}setTimeout(function(){m.style.width="";m.style.marginLeft=""},0);cssHelper.removeListener("cssMediaQueriesTested",arguments.callee)});s();p()}else{m.style.marginLeft=""}v()}}());try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}
--------------------------------------------------------------------------------
/source/js/duoshuo.js:
--------------------------------------------------------------------------------
1 | //Mod
2 | (function(){
3 | 'use strict';
4 | var odiv = document.getElementsByTagName('*');
5 | var header, user;
6 | for(var i = 0; i' ){
12 | var mod = document.createElement('strong');
13 | var mod_text = document.createTextNode('Mod');
14 | mod.appendChild(mod_text);
15 | header.appendChild(mod);
16 | }
17 | }
18 | }
19 | }());
--------------------------------------------------------------------------------
/source/js/html5.js:
--------------------------------------------------------------------------------
1 | /*
2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3 | */
4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";
6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d -1 || navigator.userAgent.indexOf('iPhone') > -1 || navigator.userAgent.indexOf('iPhone') > -1) {
22 | location.href = url;
23 | } else {
24 | window.open(url, "_blank");
25 | }
26 | return false;
27 | } else {
28 | return false;
29 | }
30 | }
31 |
32 | (function tool(global, document) {
33 | function query(selector, element) {
34 | return (element || document).querySelector(selector);
35 | }
36 |
37 | function queryAll(selector, element) {
38 | return (element || document).querySelectorAll(selector);
39 | }
40 |
41 | global.$ = query;
42 | global.$$ = queryAll;
43 | })(this, document);
44 |
45 | (function loadComments() {
46 | var comment = $('#comments');
47 | var disqus_thread = $('#disqus_thread');
48 | var timer;
49 | var commentTop;
50 |
51 | function disqusScript() {
52 | var dsq = document.createElement('script');
53 | dsq.type = 'text/javascript';
54 | dsq.async = true;
55 | dsq.src = '//' + disqus_shortname + '.disqus.com/' + (typeof disqus_home !== 'undefined' ? 'count.js' : 'embed.js');
56 | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
57 | }
58 |
59 | function duoshuoScript() {
60 | var ds = document.createElement('script');
61 | ds.type = 'text/javascript';ds.async = true;
62 | ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
63 | ds.charset = 'UTF-8';
64 | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds);
65 | }
66 | if(typeof disqus_home !== 'undefined') {
67 | disqusScript();
68 | } else if(typeof disqus_shortname !== 'undefined') {
69 | timer = setInterval(function () {
70 | disqus_thread.innerHTML = '评论加载中...
注:如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理。';
71 | commentTop = comment.getBoundingClientRect().top;
72 | if(location.hash.indexOf('#disqus_thread') > -1 || Math.abs(commentTop) < 1000) {
73 | clearInterval(timer);
74 | disqusScript();
75 | }
76 | }, 400);
77 | } else if(typeof duoshuoQuery !== 'undefined') {
78 | timer = setInterval(function () {
79 | commentTop = comment.getBoundingClientRect().top;
80 | if(location.hash.indexOf('#comment') > -1 || Math.abs(commentTop) < 1000) {
81 | clearInterval(timer);
82 | duoshuoScript();
83 | }
84 | }, 400);
85 | }
86 | })(this, document);
--------------------------------------------------------------------------------