Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
847 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Pure | ||
|
||
A responsive pure theme for [Hexo](http://hexo.io/). | ||
|
||
- Based on [Landscape](https://github.com/hexojs/hexo-theme-landscape/) | ||
- Powered by [Pure.css](http://purecss.io/) | ||
- [Preview](http://purecss.io/layouts/blog/) | ||
|
||
## Installation | ||
|
||
### Install | ||
|
||
``` bash | ||
git clone https://github.com/saintwinkle/hexo-theme-pure.git themes/pure | ||
``` | ||
|
||
I use `jade` instead of `ejs`, so don't forget to: | ||
``` | ||
npm install hexo-renderer-jade --save | ||
``` | ||
|
||
### Enable | ||
|
||
- Modify `theme` setting in `_config.yml` to `pure`. | ||
- Modify `pagination` settings for `archive`, `category` and `tag` in `_config.yml`. | ||
|
||
### Update | ||
|
||
``` bash | ||
cd themes/pure | ||
git pull | ||
``` | ||
|
||
## Configuration | ||
|
||
``` yml | ||
title: Pure # site title | ||
author: Twinkle # your name | ||
description: Creating a blog layout using Pure # description or subtitle | ||
email: # used for gravatar | ||
|
||
# if you copy an avatar file to ./source folder, | ||
# just uncomment the variable below, | ||
# and replace "avatar.png" to your image name. | ||
# better to use 48x48 pixels. | ||
#avatar: avatar.png | ||
|
||
# menu buttons in header | ||
menu: | ||
archives: /archives | ||
about: /about | ||
|
||
# comments system | ||
# disqus always goes first once configured | ||
disqus_shortname: | ||
duoshuo_shortname: | ||
|
||
# social links | ||
weibo: # id but not nickname, example: levicorpus / 1997375853 | ||
github: # username, example: saintwinkle | ||
gplus: # google+ id, don't forget symbol "+", example: +周一 | ||
twitter: # username, example: saintwinkle | ||
|
||
# google analytics, example: UA-12345678-1 | ||
google_analytics: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
title: emosher # site title | ||
author: Eric Mosher # your name | ||
description: Geek, coder/developer, musician, gamer. # description or subtitle | ||
email: emoshmosh@gmail.com # used for gravatar | ||
|
||
# if you copy an avatar file to ./source folder, | ||
# just uncomment the variable below, | ||
# and replace "avatar.png" to your image name. | ||
# better to use 48x48 pixels. | ||
#avatar: avatar.png | ||
|
||
# menu buttons in header | ||
menu: | ||
archives: /archives | ||
about: /about | ||
|
||
# comments system | ||
# disqus always goes first once configured | ||
disqus_shortname: | ||
duoshuo_shortname: | ||
|
||
# social links | ||
weibo: # id but not nickname, example: levicorpus / 1997375853 | ||
github: emosher # username, example: saintwinkle | ||
gplus: # google+ id, don't forget symbol "+", example: +周一 | ||
twitter: emoshmosh # username, example: saintwinkle | ||
|
||
# google analytics, example: UA-12345678-1 | ||
google_analytics: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
!=js('js/script') | ||
if theme.disqus_shortname | ||
script. | ||
var disqus_shortname = '#{theme.disqus_shortname}'; | ||
(function() { | ||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
})(); | ||
noscript. | ||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a> | ||
else if theme.duoshuo_shortname | ||
script. | ||
var duoshuoQuery = {short_name: '#{theme.duoshuo_shortname}'}; | ||
(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('head')[0] | ||
|| document.getElementsByTagName('body')[0]).appendChild(ds); | ||
})(); | ||
!=partial('ga') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
h2.archive-post-title | ||
!=partial('post/title') | ||
p.archive-post-meta | ||
!=partial('post/date', {date_format: 'MM-DD HH:mm'}) | ||
!=partial('post/category') | ||
!=partial('post/tag') | ||
if post.link | ||
a(href!=url_for(post.link) target="_blank") | ||
else | ||
a(href!=url_for(post.path)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
if pagination == 2 | ||
- page.posts.each(function (post) { | ||
!=partial('article', {post: post, index: true}) | ||
- }) | ||
else | ||
- var last | ||
- page.posts.each(function (post) { | ||
- var year = post.date.year() | ||
if last != year | ||
if last != null | ||
- last = year | ||
h1.archive-year | ||
a(href!=url_for('archives/' + year)) | ||
=year | ||
.archive-post | ||
!=partial('archive-post', {post: post}) | ||
- }) | ||
if page.total > 1 | ||
nav#page-nav | ||
!=paginator({prev_text: '« Prev', next_text: 'Next »'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.post | ||
.post-header | ||
!=partial('post/avatar') | ||
if post.link || post.title | ||
h2.post-title | ||
!=partial('post/title') | ||
p.post-meta | ||
!=partial('post/date', {date_format: 'YYYY-MM-DD HH:mm'}) | ||
!=partial('post/category') | ||
!=partial('post/tag') | ||
.post-content | ||
!=partial('post/gallery') | ||
if post.excerpt && index | ||
!=post.excerpt | ||
if theme.excerpt_link | ||
p.post-excerpt-link | ||
a(href!=url_for(post.path) + "#more") #{theme.excerpt_link} | ||
else | ||
!=post.content | ||
if !index | ||
!=partial('post/nav') | ||
if !index && post.comments | ||
if theme.disqus_shortname | ||
#disqus_thread | ||
else if theme.duoshuo_shortname | ||
.ds-thread(data-thread-key="#{post.layout}-#{post.slug}" data-title=post.title data-url=post.permalink) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.social-link | ||
a(href="http://weibo.com/" + (theme.weibo ? theme.weibo : "") target="_blank") | ||
i.icon-weibo | ||
a(href="https://github.com/" + (theme.github ? theme.github : "") target="_blank") | ||
i.icon-github | ||
a(href="https://plus.google.com/" + (theme.gplus ? theme.gplus : "") target="_blank") | ||
i.icon-gplus | ||
a(href="https://twitter.com/" + (theme.twitter ? theme.twitter : "") target="_blank") | ||
i.icon-twitter | ||
.copyright | ||
| © #{date(new Date(), 'YYYY')} #{theme.author}. | ||
| Powered by <a href="http://hexo.io" target="_blank">Hexo</a> | ||
| using <a href="https://github.com/saintwinkle/hexo-theme-pure" target="_blank">Pure</a> theme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if theme.google_analytics | ||
script. | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
ga('create', '#{theme.google_analytics}', 'auto'); | ||
ga('send', 'pageview'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
meta(charset="utf-8") | ||
meta(name="viewport" content="width=device-width, initial-scale=1.0") | ||
title #{theme.title} | ||
!=css(['css/pure-min.css', 'css/grids-responsive-min.css', 'css/style.css']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
h1.brand-title | ||
a(href!=url_for()) #{theme.title} | ||
h2.brand-tagline #{theme.description} | ||
nav.nav | ||
ul.nav-list | ||
each path, name in theme.menu | ||
li.nav-item | ||
a.pure-button(href!=url_for(path)) #{name} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if theme.avatar | ||
img.post-avatar(height="48" width="48" src!=url_for(theme.avatar)) | ||
else if theme.email | ||
img.post-avatar(height="48" width="48" src!=gravatar(theme.email, 48)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (post.categories && post.categories.length) | ||
span.post-categories | ||
i.icon-book | ||
- post.categories.each(function (category) { | ||
a.post-category(href!=url_for(category.path)) #{category.name} | ||
- }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
span.post-date | ||
i.icon-clock | ||
| #{date(post.date, date_format)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if post.photos && post.photos.length | ||
.post-gallery | ||
.post-gallery-photos | ||
- post.photos.forEach(function (photo) { | ||
a.post-gallery-img(href!=url_for(photo)) | ||
img(src!=url_for(photo)) | ||
- }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if post.prev || post.next | ||
nav#post-nav | ||
if post.prev | ||
a#post-nav-newer.post-nav-link-wrap(href!=url_for(post.prev.path)) | ||
strong.post-nav-caption Newer | ||
.post-nav-title | ||
if post.prev.title | ||
=post.prev.title | ||
else | ||
|(no title) | ||
if post.next | ||
a#post-nav-older.post-nav-link-wrap(href!=url_for(post.next.path)) | ||
strong.post-nav-caption Older | ||
.post-nav-title | ||
if post.next.title | ||
=post.next.title | ||
else | ||
|(no title) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (post.tags && post.tags.length) | ||
span.post-tags | ||
i.icon-tags | ||
- post.tags.each(function (tag) { | ||
a.post-tag(href!=url_for(tag.path)) #{tag.name} | ||
- }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if post.link | ||
a(href!=url_for(post.link) target="_blank") #{post.title} | ||
else | ||
if post.title | ||
if index | ||
a(href!=url_for(post.path)) #{post.title} | ||
else | ||
=post.title | ||
else | ||
a(href!=url_for(post.path)) (no title) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!=partial('_partial/archive', {pagination: config.archive, index: true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!=partial('_partial/archive', {pagination: config.category, index: true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!=partial('_partial/archive', {pagination: 2, index: true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
doctype html | ||
html | ||
head | ||
!=partial('_partial/head') | ||
body | ||
#layout.pure-g | ||
.sidebar.pure-u-1.pure-u-md-1-4 | ||
.header | ||
!=partial('_partial/header') | ||
.content.pure-u-1.pure-u-md-3-4 | ||
.posts | ||
!=body | ||
.footer | ||
!=partial('_partial/footer') | ||
!=partial('_partial/after-footer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!=partial('_partial/article', {post: page, index: false}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!=partial('_partial/article', {post: page, index: false}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!=partial('_partial/archive', {pagination: config.tag, index: true}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.