diff --git a/README.md b/README.md index 7a7d077..ba42b32 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/layout/index.jade b/layout/index.jade index 5003c3f..59d8e2a 100644 --- a/layout/index.jade +++ b/layout/index.jade @@ -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) @@ -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 diff --git a/package.json b/package.json index 04f653b..826331f 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/source/_styles/article.less b/source/_styles/article.less index c90e147..f9e82f3 100644 --- a/source/_styles/article.less +++ b/source/_styles/article.less @@ -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; @@ -40,9 +38,7 @@ article { } .archive-pagination { - .border(); - margin-bottom: 20px; - padding: 15px 20px; + .article-widget(); text-align: center; .paginator {