Skip to content

Commit

Permalink
Rename archive-title to article-widget; update installation guide
Browse files Browse the repository at this point in the history
  • Loading branch information
jysperm committed Nov 10, 2016
1 parent 68991c6 commit ab37b24
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

## 安装

npm install hexo-theme-simpleblock hexo-renderer-jade --save
mv node_modules/hexo-theme-simpleblock themes/simpleblock
cnpm install hexo-renderer-jade marked jade --save; cnpm install hexo-theme-simpleblock
cp -r node_modules/hexo-theme-simpleblock themes/simpleblock/; rm -r node_modules/hexo-theme-simpleblock

然后修改 Hexo 的 `_config.yml` 中的 `theme``simpleblock`.

Expand Down
12 changes: 6 additions & 6 deletions layout/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mixin article(post)
else
small.right
a(target='_blank', href=sourceOfPost(post, theme.source_url)) 查看源代码
h2= post.title
h1= post.title

.article-meta.clearfix
time.left= post.date.format(config.date_format)
Expand All @@ -47,24 +47,24 @@ mixin article(post)

if !page.posts && post.appends
for append in formatArray(post.appends)
.archive-title
.article-widget
+widget-inter(append)

block body
for banner in formatArray(theme.banners)
.archive-title
.article-widget
+widget-inter(banner)

if is_tag()
.archive-title
.article-widget
strong 标签 ##{page.tag}

if page.category
.archive-title
.article-widget
strong 分类 ##{page.category}

if page.year && page.month
.archive-title
.article-widget
strong 归档 #{page.year}#{page.month}

if page.posts
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-simpleblock",
"version": "0.2.0",
"version": "0.2.1",
"description": "A simple theme for Hexo.",
"homepage": "https://jysperm.me",
"license": "MIT",
Expand All @@ -15,10 +15,6 @@
"url": "https://jysperm.me"
}
],
"dependencies": {
"jade": "1.11.0",
"marked": "0.3.3"
},
"devDependencies": {
"bower": "1.4.1",
"gulp": "3.8.10",
Expand Down
10 changes: 3 additions & 7 deletions source/_styles/article.less
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
.archive-title {
.article-widget {
.border();
margin-bottom: 20px;
padding: 15px 20px;
}

article {
.border();
margin-bottom: 20px;
padding: 15px 20px;
.article-widget();

header {
margin-bottom: 20px;
Expand Down Expand Up @@ -40,9 +38,7 @@ article {
}

.archive-pagination {
.border();
margin-bottom: 20px;
padding: 15px 20px;
.article-widget();
text-align: center;

.paginator {
Expand Down

0 comments on commit ab37b24

Please sign in to comment.