Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
8788 committed Jan 21, 2019
1 parent 1d396b7 commit 0b89931
Show file tree
Hide file tree
Showing 19 changed files with 223 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@

![hexo-diy-strict](diy-strict.jpg)

diy-strict是基于[strict主题](https://github.com/unmric/hexo-theme-strict)修改而成,在strict基础上进行了如下修改:
![hexo-diy-strict-article](diy-strict-article.jpg)

hexo-diy-strict是基于[strict](https://github.com/unmric/hexo-theme-strict)主题修改而成,在strict基础上进行了如下修改:

### 2015.01.08更新
1. 文章页增加文章结构目录(catalog widget)
2. 增加返回顶部代码
3. 修复多说评论框不显示bug
4. 调整部分样式

### 2014.05.02更新
1. 增加了对IE7的兼容
2. 将布局改为两栏式
3. 增加了部分widget(about/categories/links)
4. 使用多说作为默认评论组件,hexo-diy-strict/_config.yml中填写多说的`short_name`
4. 使用多说作为默认评论组件,hexo-diy-strict/_config.yml中填写多说的`short_name`
5. 其它细节处的样式调整

## Installation

**Install**
```
$ npm install hexo-renderer-jade --save
$ git clone [email protected]:Bubblings/hexo-diy-strict.git themes/strict
$ git clone [email protected]:8788/hexo-diy-strict.git themes/hexo-diy-strict
```

**Enable**
Expand Down
7 changes: 3 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ excerpt_link: Read More
comment_link: 评论

# duoshuo评论
duoshuo_short_name:
duoshuo_short_name:

# cnzz统计id
cnzz_id:
cnzz_id:

# foot
themes_mata: ' ❤ Theme by <a href="http://riny.net" target="_blank">Bubblings</a> and <a href="http://unmric.com/" target="_blank">unmric</a>'
themes_mata: ' ❤ Theme by <a href="https://github.com/8788/hexo-diy-strict" target="_blank">8788</a> and <a href="http://unmric.com/" target="_blank">unmric</a>'
google_analytics:

# link
links:
'Bubblings blog': 'http://riny.net'
'测试': 'http://baidu.com'
Binary file added diy-strict-article.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions layout/_views/aside.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
include ../_widgets/about
include ../_widgets/categories
include ../_widgets/links
- if (page.layout == 'post')
include ../_widgets/categories
include ../_widgets/catalog
- else
include ../_widgets/about
include ../_widgets/categories
include ../_widgets/links
4 changes: 3 additions & 1 deletion layout/_views/foot.jade
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
div#back-top(title="返回顶部")
script(src="/js/script.js")
if theme.cnzz_id
<script src="http://v1.cnzz.com/stat.php?id=#{theme.cnzz_id}&web_id=#{theme.cnzz_id}" language="JavaScript"></script>
<script src="http://s11.cnzz.com/stat.php?show=pic1&id=#{theme.cnzz_id}&web_id=#{theme.cnzz_id}" language="JavaScript"></script>

block foot
2 changes: 1 addition & 1 deletion layout/_views/post.jade
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mixin post(post,index)
div.post__main
if post.img
a.post__image(href = config.root + post.path): img(src = post.img, alt = 'featured-image')
if post.excerpt && index == 'index'
if post.excerpt && index != 'post'
!= post.excerpt
else
!= post.content
Expand Down
4 changes: 4 additions & 0 deletions layout/_widgets/catalog.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.widget.fixed#fixed
.catalog
h2 目录结构
ul.catalog-list
4 changes: 3 additions & 1 deletion layout/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ block main

block head
title
= config.title
= config.title
meta(name="keywords", content="web前端,css,javascript,nodejs")
meta(name="description", content=config.title)
33 changes: 23 additions & 10 deletions layout/page.jade
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
include _views/post
extends _views/main
- if (page.layout == 'page')
include _views/post
extends _views/main

block main
+post(page, 'post')
if config.disqus_shortname && page.comments
div.comments
div.disqus_thread
block main
+post(page, 'post')
if theme.duoshuo_short_name && page.comments
div.comments
div.ds-thread(data-thread-key=page.dsThreadKey)
if theme.duoshuo_short_name

block head
title
= page.title + ' - ' + config.title
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
script.
var duoshuoQuery = {short_name:"#{theme.duoshuo_short_name}"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
document.getElementsByTagName('body')[0].appendChild(ds);
})();
<!-- 多说公共JS代码 end -->
block head
title
= page.title + ' - ' + config.title
7 changes: 4 additions & 3 deletions layout/post.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ extends _views/main

block main
+post(page, 'post')
if config.disqus_shortname && page.comments
if theme.duoshuo_short_name && page.comments
div.comments#comments
div.ds-thread
div.ds-thread(data-thread-key=page.path, data-url=page.permalink)
if theme.duoshuo_short_name

<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
Expand All @@ -22,4 +22,5 @@ block main

block head
title
= page.title + ' - ' + config.title
= page.title + ' - ' + config.title
meta(name="description", content=page.title)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Strict",
"name": "hexo-diy-strict",
"version": "0.1.1",
"description": "A clean, minimal and responsive theme for hexo",
"author": "unmric",
"author": "8788 && unmric",
"license": "MIT"
}
Binary file modified source/avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions source/css/_css/theme/main.styl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
a
color: #fff

img[src="http://icon.cnzz.com/img/pic1.gif"]
display: none

.site-nav__item
display: inline-block
*display: inline
Expand All @@ -25,7 +28,7 @@
color: #fff

.site-copy
font-size: 12px
font-size: 14px
color: #999

.page-menu__item
Expand All @@ -37,4 +40,18 @@
.page-menu__link
position: relative
font-size: 16px
color: #fff
color: #fff

#back-top
display: none
cursor: pointer
position: fixed
right: 64px
bottom: 50px
width: 16px
height: 14px
padding: 11px 10px
background: #262A30 url(images/back-top.png) no-repeat center
background-size: 16px auto
&:hover
opacity: 0.7
41 changes: 24 additions & 17 deletions source/css/_css/theme/post.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
margin: 20px 60px

.post__time
font-size: 12px
font-size: 14px
color: #ccc

.post__title
margin-top: 5px
font-size: 20px
font-size: 1.45em
a
color: #666
&:hover
Expand All @@ -37,26 +37,29 @@
margin: 0.7em 0
text-indent: 0
code
border: 1px solid #DDD;
// border: 1px solid #DDD;
background-color: #F8F8F8;
border-radius: 3px;
padding: 0 3px
margin: 0 3px;
padding: 1px 3px
pre
display: block
padding: 0.8em 1em
margin: 0 0.1em
font-size: 13px
line-height: 1.4
font-size: 14px
line-height: 1.45
text-shadow: 0 1px 0 #fff
background-color: #F8F8F8;
border: 1px solid #DDD;
border-radius: 3px
overflow-x: auto
overflow-y: visible

code
margin: 0
padding: 0
border: 0
background: none

kbd
@extend .post__main pre
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset
Expand Down Expand Up @@ -87,16 +90,22 @@
table tr
border-bottom: none
h1
font-size:138.5%
font-size:1.45em
font-weight: normal
h2
font-size:123.1%
font-size:1.35em
border-bottom: 1px solid #ddd
padding-top: 15px
padding-bottom: 10px
h3
font-size:108%
font-size:1.25em
h4, h5, h6
font-size:1.1em
h1, h2, h3, h4, h5, h6, p
margin:1.3em 0
h1, h2, h3, h4, h5, h6, strong
font-weight:bold
font-family: "Segoe UI";
margin:1.25em 0
h1, h2, h3, h4, h5, h6
font-weight: bold
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Microsoft Yahei";
abbr, acronym
border-bottom:1px dotted #000
cursor:help
Expand Down Expand Up @@ -131,9 +140,7 @@
table thead
background: #eee
p
font-size: 14px
text-indent: 28px;
line-height: 24px
ol, ul, dl
margin: 15px 0
margin-left:2em
Expand Down Expand Up @@ -192,6 +199,7 @@
.keyword
.javascript .function
color: $highlight-purple
font-weight: bold

.post__foot
padding: 10px
Expand All @@ -201,7 +209,6 @@

.post__foot-link
padding: 10px
font-size: 12px
color: #999

.post__tag__item
Expand Down
35 changes: 34 additions & 1 deletion source/css/_css/theme/widgets.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.widget
background-color: #fff
margin-bottom: 20px
font-size: 14px
line-height: 1.6

.h
padding: 5px 10px
Expand All @@ -16,6 +16,38 @@
small
margin-left: 5px


.fixed
background: transparent

.catalog
margin-bottom: 20px
padding: 5px
border: 1px solid #ccc
background-color: #fff
h2
font-size: 15px
font-weight: bold
padding: 5px

ul
margin: 0
list-style-type:square
list-style-position: inside

.catalog-list
padding: 0 5px

li
margin-bottom: 2px
white-space: nowrap
overflow: hidden
text-overflow: ellipsis

.sub-title
margin-left: 20px


.about
.info
text-align: left
Expand Down Expand Up @@ -49,6 +81,7 @@
filter: grayscale(0)
filter: none
transition: none
opacity: 0.8

.weibo
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8x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EPwFQ4qkqbBGeckfQbGQ1WMYnPZW2EEDIQTzr9Z2rnx+XLoheEK6++wFIqTihqfNGvBPsV9EDFgN3AbhsFraNW4PcUSY2CuR7k58iLoieYN3DQLIU+Jdh+qYRcUOZdvZE7oDAaO9Q0xp2oRVo7IPcbgC0hpPF9tQaidWHkoH1rJgRUwE/rDY7gnV3Q7kbgAFsIVGAyz9W9IGEmqbU7/AGxSv0fz7NxvytpGWCf31EAZfI4m2gf1H8FV9e9I+TUwm+inufZ0A+CCciClOlTvcWlXUlXRSJvazTBVUWGO/VP3VKr7aXAUlDn9Vo+BjqSios9faseqbVCG92p3tlK6pfmN0y/0GLhlDDQ5VdQWrEDJlav+OXigfrnaJyrpgapAjcdAozHw1EmMS1JUrgV1UAJnYY1KcolOPdnJk2bVIleMrjb74BTKUKgwnKFdbdeYCb1J8Ax2KoMDlYN6ZXxUiqE91MdLZaPx+xQVtya564tCr1OKi1R/KvWk+sS8K+2BdmflmBbUOndSkcWjs8e5m79etDr5OluplgvTvsknYRRczkCxqU/j9ND8IWHMgpQiqQDWwnz1c1QuuuAVXIfjKnRe+SXAAO4NkZI1iOAIAAAAAElFTkSuQmCC") no-repeat 0 0;
Expand Down
4 changes: 2 additions & 2 deletions source/css/_variables.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// base
$base-background = #eee
$base-font-size = 14px
$base-font-size = 15px
$base-font-color = #666
$base-line-height = 175%
$base-line-height = 1.75
$base-font-family = 'Helvetica Neue', 'Microsoft Yahei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', Sans-serif
$base-code-font-family = 'Source Code Pro', Consolas, 'Liberation Mono', Courier, monospace, serif
$base-link-color = #258fb8
Expand Down
Binary file added source/css/images/back-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0b89931

Please sign in to comment.