Permalink
Browse files

Add Theme 添加主题

At a new theme: Yilia
https://github.com/litten/hexo-theme-yilia
添加一个国人写的简约主题。
$ git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
_config.yml : theme: yilia
cd themes/yilia
git pull
  • Loading branch information...
MOxFIVE MOxFIVE
MOxFIVE authored and MOxFIVE committed Aug 18, 2015
1 parent ae34116 commit 1bece7a7d6fdce7a313d59f3792c32aa0ca53ddf
Showing with 6,898 additions and 0 deletions.
  1. +1 −0 _config.yml
  2. +139 −0 themes/Yilia/README.md
  3. +63 −0 themes/Yilia/_config.yml
  4. +26 −0 themes/Yilia/layout/_partial/after-footer.ejs
  5. +15 −0 themes/Yilia/layout/_partial/archive-post.ejs
  6. +43 −0 themes/Yilia/layout/_partial/archive.ejs
  7. +81 −0 themes/Yilia/layout/_partial/article.ejs
  8. +12 −0 themes/Yilia/layout/_partial/footer.ejs
  9. +14 −0 themes/Yilia/layout/_partial/google-analytics.ejs
  10. +32 −0 themes/Yilia/layout/_partial/head.ejs
  11. +32 −0 themes/Yilia/layout/_partial/header.ejs
  12. +111 −0 themes/Yilia/layout/_partial/left-col.ejs
  13. +19 −0 themes/Yilia/layout/_partial/mathjax.ejs
  14. +34 −0 themes/Yilia/layout/_partial/mobile-nav.ejs
  15. +10 −0 themes/Yilia/layout/_partial/post/category.ejs
  16. +3 −0 themes/Yilia/layout/_partial/post/date.ejs
  17. +18 −0 themes/Yilia/layout/_partial/post/duoshuo.ejs
  18. +22 −0 themes/Yilia/layout/_partial/post/nav.ejs
  19. +14 −0 themes/Yilia/layout/_partial/post/share.ejs
  20. +8 −0 themes/Yilia/layout/_partial/post/tag.ejs
  21. +15 −0 themes/Yilia/layout/_partial/post/title.ejs
  22. +1 −0 themes/Yilia/layout/archive.ejs
  23. +1 −0 themes/Yilia/layout/category.ejs
  24. +1 −0 themes/Yilia/layout/index.ejs
  25. +15 −0 themes/Yilia/layout/layout.ejs
  26. +1 −0 themes/Yilia/layout/page.ejs
  27. +1 −0 themes/Yilia/layout/post.ejs
  28. +1 −0 themes/Yilia/layout/tag.ejs
  29. +10 −0 themes/Yilia/package.json
  30. +63 −0 themes/Yilia/source/css/_extend.styl
  31. +140 −0 themes/Yilia/source/css/_partial/archive.styl
  32. +359 −0 themes/Yilia/source/css/_partial/article.styl
  33. +19 −0 themes/Yilia/source/css/_partial/footer.styl
  34. +165 −0 themes/Yilia/source/css/_partial/header.styl
  35. +147 −0 themes/Yilia/source/css/_partial/highlight.styl
  36. +94 −0 themes/Yilia/source/css/_partial/instagram.styl
  37. +307 −0 themes/Yilia/source/css/_partial/main.styl
  38. +72 −0 themes/Yilia/source/css/_partial/mobile-slider.styl
  39. +221 −0 themes/Yilia/source/css/_partial/mobile.styl
  40. +40 −0 themes/Yilia/source/css/_partial/page.styl
  41. +64 −0 themes/Yilia/source/css/_partial/scroll.styl
  42. +14 −0 themes/Yilia/source/css/_partial/share.styl
  43. +363 −0 themes/Yilia/source/css/_partial/tagcloud.styl
  44. +24 −0 themes/Yilia/source/css/_partial/wheelmenu.styl
  45. +38 −0 themes/Yilia/source/css/_util/grid.styl
  46. +31 −0 themes/Yilia/source/css/_util/mixin.styl
  47. +60 −0 themes/Yilia/source/css/_variables.styl
  48. BIN themes/Yilia/source/css/fonts/fontawesome-webfont.eot
  49. +175 −0 themes/Yilia/source/css/fonts/fontawesome-webfont.svg
  50. BIN themes/Yilia/source/css/fonts/fontawesome-webfont.svgz
  51. BIN themes/Yilia/source/css/fonts/fontawesome-webfont.ttf
  52. BIN themes/Yilia/source/css/fonts/fontawesome-webfont.woff
  53. +115 −0 themes/Yilia/source/css/style.styl
  54. BIN themes/Yilia/source/fancybox/blank.gif
  55. BIN themes/Yilia/source/fancybox/fancybox_loading.gif
  56. BIN themes/Yilia/source/fancybox/fancybox_loading@2x.gif
  57. BIN themes/Yilia/source/fancybox/fancybox_overlay.png
  58. BIN themes/Yilia/source/fancybox/fancybox_sprite.png
  59. BIN themes/Yilia/source/fancybox/fancybox_sprite@2x.png
  60. BIN themes/Yilia/source/fancybox/helpers/fancybox_buttons.png
  61. +97 −0 themes/Yilia/source/fancybox/helpers/jquery.fancybox-buttons.css
  62. +122 −0 themes/Yilia/source/fancybox/helpers/jquery.fancybox-buttons.js
  63. +199 −0 themes/Yilia/source/fancybox/helpers/jquery.fancybox-media.js
  64. +55 −0 themes/Yilia/source/fancybox/helpers/jquery.fancybox-thumbs.css
  65. +165 −0 themes/Yilia/source/fancybox/helpers/jquery.fancybox-thumbs.js
  66. +273 −0 themes/Yilia/source/fancybox/jquery.fancybox.css
  67. +2,018 −0 themes/Yilia/source/fancybox/jquery.fancybox.js
  68. +46 −0 themes/Yilia/source/fancybox/jquery.fancybox.pack.js
  69. BIN themes/Yilia/source/img/coderwall.png
  70. BIN themes/Yilia/source/img/delicious.png
  71. BIN themes/Yilia/source/img/douban.png
  72. BIN themes/Yilia/source/img/facebook.png
  73. BIN themes/Yilia/source/img/github.png
  74. BIN themes/Yilia/source/img/google.png
  75. BIN themes/Yilia/source/img/img-err.png
  76. BIN themes/Yilia/source/img/img-loading.png
  77. BIN themes/Yilia/source/img/linkedin.png
  78. BIN themes/Yilia/source/img/mail.png
  79. BIN themes/Yilia/source/img/pinboard.png
  80. BIN themes/Yilia/source/img/pinterest.png
  81. BIN themes/Yilia/source/img/rss.png
  82. BIN themes/Yilia/source/img/scrollbar_arrow.png
  83. BIN themes/Yilia/source/img/stackoverflow.png
  84. BIN themes/Yilia/source/img/twitter.png
  85. BIN themes/Yilia/source/img/weibo.png
  86. BIN themes/Yilia/source/img/zhihu.png
  87. +138 −0 themes/Yilia/source/js/instagram.js
  88. +167 −0 themes/Yilia/source/js/jquery.lazyload.js
  89. +110 −0 themes/Yilia/source/js/main.js
  90. +154 −0 themes/Yilia/source/js/mobile.js
  91. +100 −0 themes/Yilia/source/js/pc.js
View
@@ -64,6 +64,7 @@ pagination_dir: page
## Plugins: http://hexo.io/plugins/
## Themes: http://hexo.io/themes/
theme: Yilia
# https://github.com/litten/hexo-theme-yilia
# Deployment
## Docs: http://hexo.io/docs/deployment.html
View
@@ -0,0 +1,139 @@
hexo-theme-yilia
================
Yilia 是为 [hexo](https://github.com/tommy351/hexo) 2.4+制作的主题。
崇尚简约优雅,以及极致的性能。 你可以点击 [我的博客](http://litten.github.io/) 查看效果。
如遇到问题或有需求,可以:
* 提issue给我
* 在这篇文章下留言[Hexo主题Yilia](http://litten.github.io/2014/08/31/hexo-theme-yilia/)
* 移动端问题留言[Yilia在移动端适配的一些事](http://litten.github.io/2015/02/23/yilia-on-mobile/)
我都会看到并处理。
如果你想体验手机浏览效果,可以扫一下二维码:
![litten-qrcode](https://cloud.githubusercontent.com/assets/2024949/6349328/51a067fe-bc64-11e4-881c-f68050c50c28.png)
—————————————————————
关于主题:
1. 我喜欢简约。所以近期文章,搜索框都拿掉了
2. 接地气一点。所以用上了jiathis分享,友言评论,以及baidu的cdn
3. 追求移动端的体验
3. 让大家把注意力放到内容上。这是本主题设计初衷
4. 主题不支持IE6,7,8。以后也不会
##一、近期更新
2015.6.14 - 模块化加载
2015.2.21 - 移动侧重构&布局bug修改
2014.11.7 - 增加“友情链接”“关于我”
2014.10.22 - 优化fancybox展示
2014.10.16 - 增加表格样式
2014.9.19 - 云标签挂件
##二、使用
#### 安装
``` bash
$ git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
```
#### 配置
修改hexo根目录下的 `_config.yml``theme: yilia`
#### 更新
``` bash
cd themes/yilia
git pull
```
##三、外观
####**宽屏**
![宽屏](http://littendomo.sinaapp.com/yilia/yilia-pc1.png)
####**宽屏文字**
![宽屏文字](http://littendomo.sinaapp.com/yilia/yilia-pc2.png)
####**窄屏**
![窄屏](http://littendomo.sinaapp.com/yilia/yilia-pc3.png)
####**同步instagram**
![同步instagram](http://littendomo.sinaapp.com/yilia/yilia-pc4.png)
####**移动端**
![移动端](http://littendomo.sinaapp.com/yilia/yilia-mobile.png)
![移动端](http://littendomo.sinaapp.com/yilia/yilia-mobile2.png)
##四、配置
主题配置文件在主目录下的`_config.yml`
```
# Header
menu:
主页: /
所有文章: /archives
# 随笔: /tags/随笔
# SubNav
subnav:
github: "#"
weibo: "#"
rss: "#"
zhihu: "#"
#douban: "#"
#mail: "#"
#facebook: "#"
#google: "#"
#twitter: "#"
#linkedin: "#"
rss: /atom.xml
# Content
excerpt_link: more
fancybox: true
mathjax: true
# Miscellaneous
google_analytics: ''
favicon: /favicon.png
#你的头像url
avatar: ""
#是否开启分享
share: true
#是否开启多说评论,填写你在多说申请的项目名称 duoshuo: duoshuo-key
#若使用disqus,请在博客config文件中填写disqus_shortname,并关闭多说评论
duoshuo: true
#是否开启云标签
tagcloud: true
#是否开启友情链接
#不开启——
#friends: false
#开启——
friends:
奥巴马的博客: http://localhost:4000/
卡卡的美丽传说: http://localhost:4000/
本泽马的博客: http://localhost:4000/
吉格斯的博客: http://localhost:4000/
习大大大不同: http://localhost:4000/
托蒂的博客: http://localhost:4000/
#是否开启“关于我”。
#不开启——
#aboutme: false
#开启——
aboutme: 我是谁,我从哪里来,我到哪里去?我就是我,是颜色不一样的吃货…
```
##五、其他
[同步你的instagram图片](https://github.com/litten/hexo-theme-yilia/wiki/%E5%90%8C%E6%AD%A5%E4%BD%A0%E7%9A%84instagram%E5%9B%BE%E7%89%87)
View
@@ -0,0 +1,63 @@
# Header
menu:
主页: /
所有文章: /archives
# 随笔: /tags/随笔
# SubNav
subnav:
github: "#"
weibo: "#"
rss: "#"
zhihu: "#"
#douban: "#"
#mail: "#"
#facebook: "#"
#google: "#"
#twitter: "#"
#linkedin: "#"
rss: /atom.xml
# Content
excerpt_link: more
fancybox: true
mathjax: true
# 是否开启动画效果
animate: true
# 是否在新窗口打开链接
open_in_new: false
# Miscellaneous
google_analytics: ''
favicon: /favicon.png
#你的头像url
avatar:
#是否开启分享
share: true
#是否开启多说评论,填写你在多说申请的项目名称 duoshuo: duoshuo-key
#若使用disqus,请在博客config文件中填写disqus_shortname,并关闭多说评论
duoshuo: true
#是否开启云标签
tagcloud: true
#是否开启友情链接
#不开启——
#friends: false
#开启——
friends:
奥巴马的博客: http://localhost:4000/
卡卡的美丽传说: http://localhost:4000/
本泽马的博客: http://localhost:4000/
吉格斯的博客: http://localhost:4000/
习大大大不同: http://localhost:4000/
托蒂的博客: http://localhost:4000/
#是否开启“关于我”。
#不开启——
#aboutme: false
#开启——
aboutme: 我是谁,我从哪里来,我到哪里去?我就是我,是颜色不一样的吃货…
@@ -0,0 +1,26 @@
<% if (theme.fancybox){ %>
<%- css('fancybox/jquery.fancybox') %>
<% } %>
<script>
var yiliaConfig = {
fancybox: <%=theme.fancybox%>,
mathjax: <%=theme.mathjax%>,
animate: <%=theme.animate%>,
isHome: <%=is_home()%>,
isPost: <%=is_post()%>,
isArchive: <%=is_archive()%>,
isTag: <%=is_tag()%>,
isCategory: <%=is_category()%>,
open_in_new: <%=theme.open_in_new%>
}
</script>
<%- js('http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min') %>
<%- js('js/main') %>
<%- partial('google-analytics') %>
<% if (theme.mathjax){ %>
<%- partial('mathjax') %>
<% } %>
@@ -0,0 +1,15 @@
<article class="archive-article archive-type-<%= post.layout %>">
<div class="archive-article-inner">
<header class="archive-article-header">
<div class="article-meta">
<%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %>
</div>
<%- partial('post/title', {class_name: 'archive-article-title'}) %>
<div class="article-info info-on-right">
<%- partial('post/tag') %>
<%- partial('post/category') %>
</div>
<div class="clearfix"></div>
</header>
</div>
</article>
@@ -0,0 +1,43 @@
<% if (pagination == 2){ %>
<% page.posts.each(function(post){ %>
<%- partial('article', {post: post, index: true}) %>
<% }) %>
<% if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; Prev',
next_text: 'Next &raquo;'
}) %>
</nav>
<% } %>
<% } else { %>
<% var last; %>
<% page.posts.each(function(post, i){ %>
<% var year = post.date.year(); %>
<% if (last != year){ %>
<% if (last != null){ %>
</div></section>
<% } %>
<% last = year; %>
<section class="archives-wrap">
<div class="archive-year-wrap">
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><%= year %></a>
</div>
<div class="archives">
<% } %>
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
<% }) %>
<% if (page.posts.length){ %>
</div></section>
<% } %>
<% if (page.total > 1){ %>
<nav id="page-nav">
<%- paginator({
prev_text: '&laquo; Prev',
next_text: 'Next &raquo;'
}) %>
</nav>
<% } %>
<% } %>
@@ -0,0 +1,81 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<%if(post.noDate != "true"){%>
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
</div>
<%}%>
<div class="article-inner">
<% if (theme.fancybox){ %>
<input type="hidden" class="isFancy" />
<% } %>
<% if (post.link || post.title){ %>
<header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %>
</header>
<% if (!index){ %>
<div class="article-info article-info-post">
<%- partial('post/tag') %>
<%- partial('post/category') %>
<div class="clearfix"></div>
</div>
<% } %>
<% } %>
<div class="article-entry" itemprop="articleBody">
<% if (post.excerpt && index){ %>
<%- post.excerpt %>
<% } else { %>
<%- post.content %>
<% } %>
</div>
<% if (index){ %>
<div class="article-info article-info-index">
<%if(post.top){%>
<div class="article-pop-out tagcloud">
<a class="">置顶</a>
</div>
<% } %>
<%- partial('post/tag') %>
<%- partial('post/category') %>
<% if (post.excerpt && index){ %>
<p class="article-more-link">
<a <% if (!theme.excerpt_link){ %>class="hidden"<% } %> href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %> >></a>
</p>
<% } %>
<div class="clearfix"></div>
</div>
<% } %>
</div>
<% if (!index){ %>
<%- partial('post/nav') %>
<% } %>
</article>
<% if (!index && theme.share){ %>
<%- partial('post/share') %>
<% } %>
<% if (!index && theme.duoshuo && post.comments){ %>
<%- partial('post/duoshuo', {
key: post.slug,
title: post.title,
url: config.url+url_for(post.path)
}) %>
<% } %>
<% if (!index && post.comments && config.disqus_shortname){ %>
<section id="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '<%=config.disqus_shortname%>'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(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>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</section>
<% } %>
@@ -0,0 +1,12 @@
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %>
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
</div>
</div>
</div>
</footer>
Oops, something went wrong.

0 comments on commit 1bece7a

Please sign in to comment.