This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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
17 changed files
with
265 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,2 +1,22 @@ | ||
# hexo-theme-mbxo | ||
A hexo moblie theme base on mobi.css | ||
|
||
A hexo mobile theme base on mobi.css | ||
|
||
[Demo](https://alleysakura.github.io/hexo-theme-mbxo) | ||
|
||
# Install | ||
--- | ||
``` | ||
npm install --save hexo-renderer-jade hexo-generator-feed hexo-generator-sitemap hexo-browsersync | ||
git clone https://github.com/pinggod/hexo-theme-mbxo.git themes/mbxo | ||
``` | ||
|
||
# Tips | ||
--- | ||
If you dislike the font color.You can fix the font color in `themes/mbxo/source/mobi.min.css` the`a{color:#00bcd4;`. | ||
|
||
If you want directed to the mobile version.You can try device.js [https://github.com/matthewhudson/device.js](https://github.com/matthewhudson/device.js) | ||
|
||
# License | ||
--- | ||
MIT |
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 @@ | ||
menu: | ||
Home: / | ||
Links: /Links | ||
GitHub: https://github.com/ | ||
About: /About | ||
Rss: /atom.xml | ||
|
||
favicon: /favicon.icon | ||
logo: /favicon.icon | ||
|
||
# Comment | ||
disqus: | ||
duoshuo: | ||
|
||
# Analytics | ||
# google-analytics: | ||
ga: | ||
|
||
# Copyright Infomation | ||
startyear: 2016 |
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 @@ | ||
var gulp = require('gulp'); | ||
var autoprefixer = require('gulp-autoprefixer'); | ||
|
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,5 @@ | ||
prev: 上一页 | ||
next: 下一页 | ||
prev_post: 上一篇 | ||
next_post: 下一篇 | ||
more: 更多 |
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,12 @@ | ||
extends partial/layout | ||
|
||
block container | ||
include mixins/post | ||
+postList() | ||
|
||
block pagination | ||
include mixins/paginator | ||
+home() | ||
|
||
block copyright | ||
include partial/copyright |
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,12 @@ | ||
extends partial/layout | ||
|
||
block container | ||
include mixins/post | ||
+posts() | ||
|
||
block pagination | ||
include mixins/paginator | ||
+home() | ||
|
||
block copyright | ||
include partial/copyright |
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 @@ | ||
mixin home() | ||
- var prev = page.prev_link | ||
- var next = page.next_link | ||
hr | ||
.flex-center.top-gap | ||
if page.prev | ||
.unit.site-box | ||
a(href=url_for(prev))!= __('prev') | ||
if page.next | ||
.unit.site-box | ||
a(href=url_for(next))!= __('next') | ||
|
||
mixin post() | ||
- var prev = page.prev ? page.prev.path : false; | ||
- var next = page.next ? page.next.path : false; | ||
hr | ||
.flex-center.top-gap | ||
if prev | ||
.unit.site-box | ||
a(href=url_for(prev))!= __('prev_post') | ||
if next | ||
.unit.site-box | ||
a(href=url_for(next))!= __('next_post') |
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,44 @@ | ||
mixin postInfo(item) | ||
h5 | ||
!= full_date(item.date, 'll') | ||
if item.from && (is_home() || is_post()) | ||
a(href=item.from target="_blank" title=item.from) 翻译 · 原文地址 | ||
|
||
//- Index Page | ||
mixin posts() | ||
- page.posts.each(function (item) { | ||
h3 | ||
a(href= url_for(item.path)) | ||
!= item.title | ||
div | ||
- }) | ||
|
||
//- Archive Page | ||
mixin postList() | ||
.archive | ||
- var year = 0; | ||
- var change = false; | ||
- page.posts.each(function (item) { | ||
- var itemYear = date(item.date, 'YYYY') - 0; | ||
- change = year !== itemYear; | ||
- year = change ? itemYear : year; | ||
if change | ||
h6.archive-year!= year | ||
hr | ||
div | ||
h2 | ||
a(href= url_for(item.path)) | ||
!= item.title | ||
+postInfo(item) | ||
br | ||
- }) | ||
|
||
//- Post Page | ||
mixin post(item) | ||
.post | ||
article | ||
h1 | ||
!= item.title | ||
+postInfo(item) | ||
div | ||
!= item.content |
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,27 @@ | ||
if theme.duoshuo | ||
.ds-thread(data-thread-key=page.path, data-title=page.title, data-url=page.permalink, data-author-key='1') | ||
script. | ||
var duoshuoQuery = {short_name:"#{theme.duoshuo}"}; | ||
(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); | ||
})(); | ||
|
||
|
||
if theme.disqus | ||
#disqus_thread | ||
script. | ||
var disqus_shortname = '#{theme.disqus}'; | ||
var disqus_identifier = '#{page.path}'; | ||
var disqus_title = '#{page.title}'; | ||
var disqus_url = '#{config.url}/#{page.path}'; | ||
(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); | ||
})(); | ||
script(id='dsq-count-scr' src='//#{theme.disqus}.disqus.com/count.js' async) |
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,9 @@ | ||
br | ||
hr | ||
.copyright | ||
- var hexoURL = "https://hexo.io/"; | ||
- var mobiURL = "http://getmobicss.com/"; | ||
- var currentDate = new Date(); | ||
- var year = currentDate.getFullYear(); | ||
- year = year == theme.startyear ? year : theme.startyear + ' - ' + year; | ||
p © #{year} Base on #[a(href=hexoURL, target="_blank") Hexo] and #[a(href=mobiURL, target="_blank") Mobi.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,16 @@ | ||
meta(charset="utf-8") | ||
meta(name="X-UA-Compatible", content="IE=edge") | ||
|
||
title | ||
block site_title | ||
= config.title | ||
block description | ||
meta(name="description", content= config.description ? config.description : 'A Blog Powered By Hexo') | ||
|
||
meta(name="viewport", content="width=device-width, initial-scale=1") | ||
meta(name="theme-color" content="#00bcd4") | ||
link(rel="short icon", href=url_for(theme.favicon)) | ||
link(rel="stylesheet", href=url_for("mobi.min.css")) | ||
|
||
- var xml = config.url + '/atom.xml' | ||
link(rel="search", type="application/opensearchdescription+xml", href=xml, title=config.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,16 @@ | ||
doctype | ||
html(lang=config.language) | ||
head | ||
include head | ||
body | ||
br | ||
.flex-center | ||
.container | ||
header.theme-header | ||
include nav | ||
article | ||
block container | ||
footer | ||
block pagination | ||
block copyright | ||
include scripts |
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 @@ | ||
.flex-left.top-gap | ||
each value, key in theme.menu | ||
.unit.site-box | ||
- var re = /^(http|https):\/\/*/gi; | ||
- var tar = re.test(value) ? "_blank" : "_self" | ||
a(class={active: is_home() && value === "/"} href=value target=tar) | ||
!= key.toUpperCase() | ||
hr |
Empty file.
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 @@ | ||
extends partial/layout | ||
|
||
block site_title | ||
!= page.title + " · " + config.title | ||
|
||
block description | ||
- var desc = page.desc || page.title + ' - ' + config.author; | ||
meta(name="description", content=desc) | ||
|
||
block container | ||
include mixins/post | ||
+post(page) | ||
|
||
block pagination | ||
include mixins/paginator | ||
+post() | ||
include partial/comment | ||
|
||
block copyright | ||
include partial/copyright |
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,27 @@ | ||
{ | ||
"name": "hexo-theme-mbxo", | ||
"version": "1.0.0", | ||
"description": "A hexo mobile theme base on mobi.css", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Alleysakura/hexo-theme-mbxo" | ||
}, | ||
"keywords": [ | ||
"hexo", | ||
"theme", | ||
"mbxo" | ||
], | ||
"author": "SakaraHiroya", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Alleysakura/hexo-theme-mbxo/issues" | ||
}, | ||
"homepage": "https://github.com/Alleysakura/hexo-theme-mbxo", | ||
"devDependencies": { | ||
"gulp": "^3.9.0", | ||
"gulp-autoprefixer": "^3.0.2", | ||
"gulp-sass": "^2.0.4", | ||
"gulp-sourcemaps": "^1.6.0" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.