Ver código fonte

first blood!

ppoffice 10 anos atrás
commit
b0d3d3fe90
77 arquivos alterados com 5472 adições e 0 exclusões
  1. 46 0
      Gruntfile.js
  2. 7 0
      LICENSE
  3. 2 0
      README.md
  4. 34 0
      _config.yml
  5. 34 0
      _config.yml.example
  6. 24 0
      layout/_partial/after-footer.ejs
  7. 8 0
      layout/_partial/archive-post.ejs
  8. 33 0
      layout/_partial/archive.ejs
  9. 44 0
      layout/_partial/article.ejs
  10. 11 0
      layout/_partial/footer.ejs
  11. 14 0
      layout/_partial/google-analytics.ejs
  12. 36 0
      layout/_partial/head.ejs
  13. 22 0
      layout/_partial/header.ejs
  14. 5 0
      layout/_partial/mobile-nav.ejs
  15. 10 0
      layout/_partial/post/category.ejs
  16. 3 0
      layout/_partial/post/date.ejs
  17. 11 0
      layout/_partial/post/gallery.ejs
  18. 22 0
      layout/_partial/post/nav.ejs
  19. 6 0
      layout/_partial/post/tag.ejs
  20. 29 0
      layout/_partial/post/thumbnail.ejs
  21. 15 0
      layout/_partial/post/title.ejs
  22. 30 0
      layout/_partial/profile.ejs
  23. 5 0
      layout/_partial/sidebar.ejs
  24. 8 0
      layout/_widget/archive.ejs
  25. 8 0
      layout/_widget/category.ejs
  26. 21 0
      layout/_widget/recent_posts.ejs
  27. 8 0
      layout/_widget/tag.ejs
  28. 8 0
      layout/_widget/tagcloud.ejs
  29. 1 0
      layout/archive.ejs
  30. 1 0
      layout/category.ejs
  31. 1 0
      layout/index.ejs
  32. 16 0
      layout/layout.ejs
  33. 1 0
      layout/page.ejs
  34. 1 0
      layout/post.ejs
  35. 1 0
      layout/tag.ejs
  36. 12 0
      package.json
  37. 24 0
      scripts/fancybox.js
  38. 59 0
      source/css/_extend.styl
  39. 80 0
      source/css/_partial/archive.styl
  40. 345 0
      source/css/_partial/article.styl
  41. 9 0
      source/css/_partial/comment.styl
  42. 17 0
      source/css/_partial/footer.styl
  43. 130 0
      source/css/_partial/header.styl
  44. 156 0
      source/css/_partial/highlight.styl
  45. 19 0
      source/css/_partial/mobile.styl
  46. 98 0
      source/css/_partial/profile.styl
  47. 130 0
      source/css/_partial/sidebar.styl
  48. 38 0
      source/css/_util/grid.styl
  49. 31 0
      source/css/_util/mixin.styl
  50. 63 0
      source/css/_variables.styl
  51. BIN
      source/css/images/avatar.png
  52. 8 0
      source/css/images/logo.svg
  53. BIN
      source/css/images/thumb-default-small.png
  54. 79 0
      source/css/style.styl
  55. BIN
      source/fancybox/blank.gif
  56. BIN
      source/fancybox/fancybox_loading.gif
  57. BIN
      source/fancybox/fancybox_loading@2x.gif
  58. BIN
      source/fancybox/fancybox_overlay.png
  59. BIN
      source/fancybox/fancybox_sprite.png
  60. BIN
      source/fancybox/fancybox_sprite@2x.png
  61. BIN
      source/fancybox/helpers/fancybox_buttons.png
  62. 97 0
      source/fancybox/helpers/jquery.fancybox-buttons.css
  63. 122 0
      source/fancybox/helpers/jquery.fancybox-buttons.js
  64. 199 0
      source/fancybox/helpers/jquery.fancybox-media.js
  65. 55 0
      source/fancybox/helpers/jquery.fancybox-thumbs.css
  66. 165 0
      source/fancybox/helpers/jquery.fancybox-thumbs.js
  67. 273 0
      source/fancybox/jquery.fancybox.css
  68. 2017 0
      source/fancybox/jquery.fancybox.js
  69. 46 0
      source/fancybox/jquery.fancybox.pack.js
  70. 4 0
      source/font-awesome/css/font-awesome.min.css
  71. BIN
      source/font-awesome/fonts/FontAwesome.otf
  72. BIN
      source/font-awesome/fonts/fontawesome-webfont.eot
  73. 565 0
      source/font-awesome/fonts/fontawesome-webfont.svg
  74. BIN
      source/font-awesome/fonts/fontawesome-webfont.ttf
  75. BIN
      source/font-awesome/fonts/fontawesome-webfont.woff
  76. BIN
      source/font-awesome/fonts/fontawesome-webfont.woff2
  77. 105 0
      source/js/script.js

+ 46 - 0
Gruntfile.js

@@ -0,0 +1,46 @@
+module.exports = function(grunt){
+  grunt.initConfig({
+    gitclone: {
+      fontawesome: {
+        options: {
+          repository: 'https://github.com/FortAwesome/Font-Awesome.git',
+          directory: 'tmp/fontawesome'
+        },
+      },
+      fancybox: {
+        options: {
+          repository: 'https://github.com/fancyapps/fancyBox.git',
+          directory: 'tmp/fancybox'
+        }
+      }
+    },
+    copy: {
+      fontawesome: {
+        expand: true,
+        cwd: 'tmp/fontawesome/fonts/',
+        src: ['**'],
+        dest: 'source/css/fonts/'
+      },
+      fancybox: {
+        expand: true,
+        cwd: 'tmp/fancybox/source/',
+        src: ['**'],
+        dest: 'source/fancybox/'
+      }
+    },
+    _clean: {
+      tmp: ['tmp'],
+      fontawesome: ['source/css/fonts'],
+      fancybox: ['source/fancybox']
+    }
+  });
+
+  require('load-grunt-tasks')(grunt);
+
+  grunt.renameTask('clean', '_clean');
+
+  grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']);
+  grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']);
+  grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']);
+  grunt.registerTask('clean', ['_clean']);
+};

+ 7 - 0
LICENSE

@@ -0,0 +1,7 @@
+Copyright (c) 2013 Tommy Chen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+# Icarus
+## Under development!

+ 34 - 0
_config.yml

@@ -0,0 +1,34 @@
+# Header
+menu:
+  Home: /
+  Archives: /archives
+  About: /about
+
+# Content
+excerpt_link: Read More
+fancybox: true
+
+# Sidebar
+sidebar: right
+widgets:
+- recent_posts
+- category
+- tag
+- tagcloud
+- archive
+
+# contacts
+contacts:
+  github: http://github.com/ppoffice
+  twitter: '#'
+  facebook: '#'
+  dribbble: '#'
+  rss: /atom.xml
+
+# Miscellaneous
+google_analytics:
+favicon: /favicon.png
+twitter:
+google_plus:
+fb_admins:
+fb_app_id:

+ 34 - 0
_config.yml.example

@@ -0,0 +1,34 @@
+# Header
+menu:
+  Home: /
+  Archives: /archives
+  About: /about
+
+# Content
+excerpt_link: Read More
+fancybox: true
+
+# Sidebar
+sidebar: right
+widgets:
+- recent_posts
+- category
+- tag
+- tagcloud
+- archive
+
+# contacts
+contacts:
+  github: http://github.com/ppoffice
+  twitter: '#'
+  facebook: '#'
+  dribbble: '#'
+  rss: /atom.xml
+
+# Miscellaneous
+google_analytics:
+favicon: /favicon.png
+twitter:
+google_plus:
+fb_admins:
+fb_app_id:

+ 24 - 0
layout/_partial/after-footer.ejs

@@ -0,0 +1,24 @@
+<% if (config.disqus_shortname){ %>
+<script>
+  var disqus_shortname = '<%= config.disqus_shortname %>';
+  <% if (page.permalink){ %>
+  var disqus_url = '<%= page.permalink %>';
+  <% } %>
+  (function(){
+    var dsq = document.createElement('script');
+    dsq.type = 'text/javascript';
+    dsq.async = true;
+    dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
+    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+  })();
+</script>
+<% } %>
+
+<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
+
+<% if (theme.fancybox){ %>
+  <%- css('fancybox/jquery.fancybox') %>
+  <%- js('fancybox/jquery.fancybox.pack') %>
+<% } %>
+
+<%- js('js/script') %>

+ 8 - 0
layout/_partial/archive-post.ejs

@@ -0,0 +1,8 @@
+<article class="archive-article archive-type-<%= post.layout %>">
+  <div class="archive-article-inner">
+    <header class="archive-article-header">
+      <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %>
+      <%- partial('post/title', {class_name: 'archive-article-title'}) %>
+    </header>
+  </div>
+</article>

+ 33 - 0
layout/_partial/archive.ejs

@@ -0,0 +1,33 @@
+<% 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>
+  <% } %>
+<% } %>

+ 44 - 0
layout/_partial/article.ejs

@@ -0,0 +1,44 @@
+<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
+  <div class="article-inner">
+    <%- partial('post/gallery') %>
+    <% if (post.link || post.title){ %>
+      <header class="article-header">
+        <%- partial('post/title', {class_name: 'article-title'}) %>
+        <div class="article-meta">
+          <%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
+          <%- partial('post/category') %>
+        </div>
+      </header>
+    <% } %>
+    <div class="article-entry" itemprop="articleBody">
+      <% if (post.excerpt && index){ %>
+        <%- post.excerpt %>
+        <% if (theme.excerpt_link){ %>
+          <p class="article-more-link">
+            <a href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %></a>
+          </p>
+        <% } %>
+      <% } else { %>
+        <%- post.content %>
+      <% } %>
+    </div>
+    <footer class="article-footer">
+      <a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link">Share</a>
+      <% if (post.comments && config.disqus_shortname){ %>
+        <a href="<%- post.permalink %>#disqus_thread" class="article-comment-link">Comments</a>
+      <% } %>
+      <%- partial('post/tag') %>
+    </footer>
+  </div>
+  <% if (!index){ %>
+    <%- partial('post/nav') %>
+  <% } %>
+</article>
+
+<% if (!index && post.comments && config.disqus_shortname){ %>
+<section id="comments">
+  <div id="disqus_thread">
+    <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+  </div>
+</section>
+<% } %>

+ 11 - 0
layout/_partial/footer.ejs

@@ -0,0 +1,11 @@
+<footer id="footer">
+  <% if (theme.sidebar === 'bottom'){ %>
+    <%- partial('_partial/sidebar') %>
+  <% } %>
+  <div class="outer">
+    <div id="footer-info" class="inner">
+      &copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %><br>
+      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. Theme by <a href="http://github.com/ppoffice">PPOffice</a>
+    </div>
+  </div>
+</footer>

+ 14 - 0
layout/_partial/google-analytics.ejs

@@ -0,0 +1,14 @@
+<% if (theme.google_analytics){ %>
+<!-- Google Analytics -->
+<script type="text/javascript">
+(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');
+
+</script>
+<!-- End Google Analytics -->
+<% } %>

+ 36 - 0
layout/_partial/head.ejs

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <%
+  var title = page.title;
+
+  if (is_archive()){
+    title = 'Archives';
+
+    if (is_month()){
+      title += ': ' + page.year + '/' + page.month;
+    } else if (is_year()){
+      title += ': ' + page.year;
+    }
+  } else if (is_category()){
+    title = 'Category: ' + page.category;
+  } else if (is_tag()){
+    title = 'Tag: ' + page.tag;
+  }
+  %>
+  <title><% if (title){ %><%= title %> | <% } %><%= config.title %></title>
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+  <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
+  <% if (theme.rss){ %>
+    <link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">
+  <% } %>
+  <% if (theme.favicon){ %>
+    <link rel="icon" href="<%- theme.favicon %>">
+  <% } %>
+  <link href='//fonts.useso.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
+  <link href="//fonts.useso.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
+  <%- css('css/style') %>
+  <%- css('font-awesome/css/font-awesome.min') %>
+  <%- partial('google-analytics') %>
+</head>

+ 22 - 0
layout/_partial/header.ejs

@@ -0,0 +1,22 @@
+<header id="header">
+  <div id="header-main" class="header-inner">
+    <div class="outer">
+      <a href="<%- url_for() %>" id="logo"><i class="logo"></i><span class="site-title"><%= config.title %></span></a>
+      <div id="search-form-wrap">
+        <%- search_form({button: ' '}) %>
+      </div>
+      <nav id="main-nav">
+        <% for (var i in theme.menu){ %>
+          <a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
+        <% } %>
+      </nav>
+    </div>
+  </div>
+  <% if(page.category || page.archive) { %>
+  <div id="header-sub" class="header-inner">
+    <div class="outer">
+      <%- list_categories({depth: 1}) %>
+    </div>
+  </div>
+  <% } %>
+</header>

+ 5 - 0
layout/_partial/mobile-nav.ejs

@@ -0,0 +1,5 @@
+<nav id="mobile-nav">
+  <% for (var i in theme.menu){ %>
+    <a href="<%- url_for(theme.menu[i]) %>" class="mobile-nav-link"><%= i %></a>
+  <% } %>
+</nav>

+ 10 - 0
layout/_partial/post/category.ejs

@@ -0,0 +1,10 @@
+<% if (post.categories && post.categories.length){ %>
+  <div class="article-category">
+    <%- list_categories(post.categories, {
+      show_count: false,
+      class: 'article-category',
+      style: 'none',
+      separator: '►'
+    }) %>
+  </div>
+<% } %>

+ 3 - 0
layout/_partial/post/date.ejs

@@ -0,0 +1,3 @@
+<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
+  <time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
+</a>

+ 11 - 0
layout/_partial/post/gallery.ejs

@@ -0,0 +1,11 @@
+<% if (post.photos && post.photos.length){ %>
+<div class="article-gallery">
+  <div class="article-gallery-photos">
+    <% post.photos.forEach(function(photo, i){ %>
+      <a class="article-gallery-img fancybox" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
+        <img src="<%- url_for(photo) %>" itemprop="image">
+      </a>
+    <% }) %>
+  </div>
+</div>
+<% } %>

+ 22 - 0
layout/_partial/post/nav.ejs

@@ -0,0 +1,22 @@
+<% if (post.prev || post.next){ %>
+<nav id="article-nav">
+  <% if (post.prev){ %>
+    <a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
+      <strong class="article-nav-caption">Newer</strong>
+      <div class="article-nav-title">
+        <% if (post.prev.title){ %>
+          <%= post.prev.title %>
+        <% } else { %>
+          (no title)
+        <% } %>
+      </div>
+    </a>
+  <% } %>
+  <% if (post.next){ %>
+    <a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
+      <strong class="article-nav-caption">Older</strong>
+      <div class="article-nav-title"><%= post.next.title %></div>
+    </a>
+  <% } %>
+</nav>
+<% } %>

+ 6 - 0
layout/_partial/post/tag.ejs

@@ -0,0 +1,6 @@
+<% if (post.tags && post.tags.length){ %>
+  <%- list_tags(post.tags, {
+    show_count: false,
+    class: 'article-tag'
+  }) %>
+<% } %>

+ 29 - 0
layout/_partial/post/thumbnail.ejs

@@ -0,0 +1,29 @@
+<a href="<%- url_for((post.link?post.link:post.path)) %>" class="thumbnail">
+  <%
+    var img=/\<img\s.*?\s?src\s*=\s*['|"]?([^\s'"]+).*?\>/ig;
+    var result = post.content.match(img);
+    var s = "";
+    result = img.exec(post.content);
+    if(result != null) {
+      for(var i = result.length -1; i; --i){
+          s += result[i]+"\n";
+      }
+    }
+    if(s.length > 0){
+      if(config.post_asset_folder){
+        var pattern = /^[\\{0,1}\/{0,1}]([^\/^\\]+)/,
+            pattern_ = /([^\/^\\]+)/;
+        if((ret = pattern.exec(s)) != null) {
+          if(ret[0].length == s.length)
+            s = config.root + post.path + ret[1];
+        } else if ((ret = pattern_.exec(s)) != null) {
+          if(ret[0].length == s.length)
+            s = config.root + post.path + ret[1];
+        }
+      }
+     %>
+    <span style="background-image:url(<%- url_for(s) %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
+  <% } else { %>
+    <span class="thumbnail-image thumbnail-none"></span>
+  <% } %>
+</a>

+ 15 - 0
layout/_partial/post/title.ejs

@@ -0,0 +1,15 @@
+<% if (post.link){ %>
+  <h1 itemprop="name">
+    <a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
+  </h1>
+<% } else if (post.title){ %>
+  <% if (index){ %>
+    <h1 itemprop="name">
+      <a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
+    </h1>
+  <% } else { %>
+    <h1 class="<%= class_name %>" itemprop="name">
+      <%= post.title %>
+    </h1>
+  <% } %>
+<% } %>

+ 30 - 0
layout/_partial/profile.ejs

@@ -0,0 +1,30 @@
+<aside id="profile">
+  <div class="inner profile-inner">
+  	<div class="base-info profile-block">
+		  <img id="avatar" src="<%- url_for(config.avatar) %>">
+      <h2 id="name"><%= config.author %></h2>
+      <h3 id="title"><%= config.author_title %></h3>
+      <span id="location"><i class="fa fa-map-marker"></i><%= config.location %></span>
+      <a id="follow" href="http://github.com/ppoffice">FOLLOW</a>
+  	</div>
+    <div class="article-info profile-block">
+      <div class="article-info-block">
+        <%= site.posts.length %>
+        <span>post<%= (site.posts.length > 1?'s':'') %></span>
+      </div>
+      <div class="article-info-block">
+        <%= site.tags.length %>
+        <span>tag<%= (site.tags.length > 1?'s':'') %></span>
+      </div>
+    </div>
+    <div class="contact-info profile-block">
+      <table class="contact-list">
+        <tr>
+        <% for(var i in theme.contacts) { %>
+          <td><a href="<%- url_for(theme.contacts[i]) %>" title="<%= i %>"><i class="fa fa-<%= i %>"></i></a></td>
+        <% } %>
+        </tr>
+      </table>
+    </div>
+  </div>
+</aside>

+ 5 - 0
layout/_partial/sidebar.ejs

@@ -0,0 +1,5 @@
+<aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>
+  <% theme.widgets.forEach(function(widget){ %>
+    <%- partial('_widget/' + widget) %>
+  <% }) %>
+</aside>

+ 8 - 0
layout/_widget/archive.ejs

@@ -0,0 +1,8 @@
+<% if (site.posts.length){ %>
+  <div class="widget-wrap">
+    <h3 class="widget-title">Archives</h3>
+    <div class="widget">
+      <%- list_archives() %>
+    </div>
+  </div>
+<% } %>

+ 8 - 0
layout/_widget/category.ejs

@@ -0,0 +1,8 @@
+<% if (site.categories.length){ %>
+  <div class="widget-wrap">
+    <h3 class="widget-title">Categories</h3>
+    <div class="widget">
+      <%- list_categories() %>
+    </div>
+  </div>
+<% } %>

+ 21 - 0
layout/_widget/recent_posts.ejs

@@ -0,0 +1,21 @@
+<% if (site.posts.length){ %>
+  <div class="widget-wrap">
+    <h3 class="widget-title"><%= __('sidebar.recents') %></h3>
+    <div class="widget">
+      <ul id="recent-post">
+        <% site.posts.sort('date', -1).limit(5).each(function(post){ %>
+          <li>
+            <div class="item-thumbnail">
+              <%- partial('../_partial/post/thumbnail.ejs', {post: post}) %>
+            </div>
+            <div class="item-inner">
+              <p class="item-category"><%- list_categories(post.categories, {show_count: false, depth:2, class: 'article-category', style: 'none', separator: '<i class="icon" id="icon-angle-right"></i>'}) %></p>
+              <p class="item-title"><a href="<%- url_for((post.link?post.link:post.path)) %>" class="title"><%= post.title %></a></p>
+              <p class="item-date"><time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date) %></time></p>
+            </div>
+          </li>
+        <% }) %>
+      </ul>
+    </div>
+  </div>
+<% } %>

+ 8 - 0
layout/_widget/tag.ejs

@@ -0,0 +1,8 @@
+<% if (site.tags.length){ %>
+  <div class="widget-wrap">
+    <h3 class="widget-title">Tags</h3>
+    <div class="widget">
+      <%- list_tags() %>
+    </div>
+  </div>
+<% } %>

+ 8 - 0
layout/_widget/tagcloud.ejs

@@ -0,0 +1,8 @@
+<% if (site.tags.length){ %>
+  <div class="widget-wrap">
+    <h3 class="widget-title">Tag Cloud</h3>
+    <div class="widget tagcloud">
+      <%- tagcloud() %>
+    </div>
+  </div>
+<% } %>

+ 1 - 0
layout/archive.ejs

@@ -0,0 +1 @@
+<%- partial('_partial/archive', {pagination: config.archive, index: true}) %>

+ 1 - 0
layout/category.ejs

@@ -0,0 +1 @@
+<%- partial('_partial/archive', {pagination: config.category, index: true}) %>

+ 1 - 0
layout/index.ejs

@@ -0,0 +1 @@
+<%- partial('_partial/archive', {pagination: 2, index: true}) %>

+ 16 - 0
layout/layout.ejs

@@ -0,0 +1,16 @@
+<%- partial('_partial/head') %>
+<body>
+  <div id="container">
+    <%- partial('_partial/header', null, {cache: !config.relative_link}) %>
+    <div class="outer">
+      <%- partial('_partial/profile', null, {cache: !config.relative_link}) %>
+      <section id="main"><%- body %></section>
+      <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>
+        <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
+      <% } %>
+    </div>
+    <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
+    <%- partial('_partial/after-footer') %>
+  </div>
+</body>
+</html>

+ 1 - 0
layout/page.ejs

@@ -0,0 +1 @@
+<%- partial('_partial/article', {post: page, index: false}) %>

+ 1 - 0
layout/post.ejs

@@ -0,0 +1 @@
+<%- partial('_partial/article', {post: page, index: false}) %>

+ 1 - 0
layout/tag.ejs

@@ -0,0 +1 @@
+<%- partial('_partial/archive', {pagination: config.tag, index: true}) %>

+ 12 - 0
package.json

@@ -0,0 +1,12 @@
+{
+  "name": "hexo-theme-icarus",
+  "version": "0.0.1",
+  "private": true,
+  "devDependencies": {
+    "grunt": "~0.4.2",
+    "load-grunt-tasks": "~0.2.0",
+    "grunt-git": "~0.2.2",
+    "grunt-contrib-clean": "~0.5.0",
+    "grunt-contrib-copy": "~0.4.1"
+  }
+}

+ 24 - 0
scripts/fancybox.js

@@ -0,0 +1,24 @@
+var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/;
+
+/**
+* Fancybox tag
+*
+* Syntax:
+*   {% fancybox /path/to/image [/path/to/thumbnail] [title] %}
+*/
+
+hexo.extend.tag.register('fancybox', function(args){
+  var original = args.shift(),
+    thumbnail = '';
+
+  if (args.length && rUrl.test(args[0])){
+    thumbnail = args.shift();
+  }
+
+  var title = args.join(' ');
+
+  return '<a class="fancybox" href="' + original + '" title="' + title + '">' +
+    '<img src="' + (thumbnail || original) + '" alt="' + title + '">'
+    '</a>' +
+    (title ? '<span class="caption">' + title + '</span>' : '');
+});

+ 59 - 0
source/css/_extend.styl

@@ -0,0 +1,59 @@
+$block-caption
+  text-decoration: none
+  text-transform: uppercase
+  color: color-grey
+  margin-bottom: 1em
+  line-height: 1em
+  text-shadow: 0 1px #fff
+  font-weight: bold
+
+$block
+  background: #fff
+  box-shadow: 0 1px 2px rgba(0,0,0,0.05)
+
+$base-style
+  h1
+    font-size: 2em
+  h2
+    font-size: 1.5em
+  h3
+    font-size: 1.3em
+  h4
+    font-size: 1.2em
+  h5
+    font-size: 1em
+  h6
+    font-size: 1em
+    color: color-grey
+  hr
+    border: 1px dashed color-border
+  strong
+    font-weight: bold
+  em, cite
+    font-style: italic
+  sup, sub
+    font-size: 0.75em
+    line-height: 0
+    position: relative
+    vertical-align: baseline
+  sup
+    top: -0.5em
+  sub
+    bottom: -0.2em
+  small
+    font-size: 0.85em
+  acronym, abbr
+    border-bottom: 1px dotted
+  ul, ol, dl
+    margin: 0 20px
+    line-height: line-height
+  ul, ol
+    ul, ol
+      margin-top: 0
+      margin-bottom: 0
+  ul
+    list-style: disc
+  ol
+    list-style: decimal
+  dt
+    font-weight: bold

+ 80 - 0
source/css/_partial/archive.styl

@@ -0,0 +1,80 @@
+.archives-wrap
+  margin: block-margin 0
+
+.archives
+  clearfix()
+
+.archive-year-wrap
+  margin-bottom: 1em
+
+.archive-year
+  @extend $block-caption
+
+.archives
+  column-gap: 10px
+  @media mq-tablet
+    column-count: 2
+  @media mq-normal
+    column-count: 3
+
+.archive-article
+  avoid-column-break()
+
+.archive-article-inner
+  @extend $block
+  padding: 10px
+  margin-bottom: 15px
+
+.archive-article-title
+  text-decoration: none
+  font-weight: bold
+  color: color-default
+  transition: color 0.2s
+  line-height: line-height
+  &:hover
+    color: color-link
+
+.archive-article-footer
+  margin-top: 1em
+
+.archive-article-date
+  color: color-grey
+  text-decoration: none
+  font-size: 0.85em
+  line-height: 1em
+  margin-bottom: 0.5em
+  display: block
+
+#page-nav
+  clearfix()
+  margin: block-margin auto
+  background: #fff
+  box-shadow: 1px 2px 3px #ddd
+  border: 1px solid color-border
+  border-radius: 3px
+  text-align: center
+  color: color-grey
+  overflow: hidden
+  a, span
+    padding: 10px 20px
+    line-height: 1
+    height: 2ex
+  a
+    color: color-grey
+    text-decoration: none
+    &:hover
+      background: color-grey
+      color: #fff
+  .prev
+    float: left
+  .next
+    float: right
+  .page-number
+    display: inline-block
+    @media mq-mobile
+      display: none
+  .current
+    color: color-default
+    font-weight: bold
+  .space
+    color: color-border

+ 345 - 0
source/css/_partial/article.styl

@@ -0,0 +1,345 @@
+.article
+  margin: block-margin 0
+
+.article-inner
+  @extend $block
+  overflow: hidden
+
+.article-meta
+  clearfix()
+
+.article-date
+  @extend $block-caption
+  float: left
+
+.article-category
+  float: left
+  line-height: 1em
+  color: #ccc
+  text-shadow: 0 1px #fff
+  &:before
+    content: "\2022"
+
+.article-category-link
+  @extend $block-caption
+
+.article-header
+  padding: article-padding article-padding 0
+
+.article-title
+  text-decoration: none
+  font-size: 2em
+  color: color-default
+  line-height: line-height-title
+  transition: color 0.2s
+  a&:hover
+    color: color-link
+
+.article-entry
+  @extend $base-style
+  clearfix()
+  color: color-default
+  padding: 0 article-padding
+  p, table
+    line-height: line-height
+    margin: line-height 0
+  h1, h2, h3, h4, h5, h6
+    font-weight: bold
+  h1, h2, h3, h4, h5, h6
+    line-height: line-height-title
+    margin: line-height-title 0
+  a
+    color: color-link
+    text-decoration: none
+    &:hover
+      text-decoration: underline
+  ul, ol, dl
+    margin-top: line-height
+    margin-bottom: line-height
+  img, video
+    max-width: 100%
+    height: auto
+    display: block
+    margin: auto
+  iframe
+    border: none
+  table
+    width: 100%
+    border-collapse: collapse
+    border-spacing: 0
+  th
+    font-weight: bold
+    border-bottom: 3px solid color-border
+    padding-bottom: 0.5em
+  td
+    border-bottom: 1px solid color-border
+    padding: 10px 0
+  blockquote
+    font-family: font-serif
+    font-size: 1.4em
+    margin: line-height 20px
+    text-align: center
+    footer
+      font-size: font-size
+      margin: line-height 0
+      font-family: font-sans
+      cite
+        &:before
+          content: "—"
+          padding: 0 0.5em
+  .pullquote
+    text-align: left
+    width: 45%
+    margin: 0
+    &.left
+      margin-left: 0.5em
+      margin-right: 1em
+    &.right
+      margin-right: 0.5em
+      margin-left: 1em
+  .caption
+    color: color-grey
+    display: block
+    font-size: 0.9em
+    margin-top: 0.5em
+    position: relative
+    text-align: center
+  // http://webdesignerwall.com/tutorials/css-elastic-videos
+  .video-container
+    position: relative
+    padding-top: (9 / 16 * 100)% // 16:9 ratio
+    height: 0
+    overflow: hidden
+    iframe, object, embed
+      position: absolute
+      top: 0
+      left: 0
+      width: 100%
+      height: 100%
+      margin-top: 0
+
+.article-more-link a
+  display: inline-block
+  line-height: 1em
+  padding: 6px 15px
+  border-radius: 15px
+  background: color-background
+  color: color-grey
+  text-shadow: 0 1px #fff
+  text-decoration: none
+  &:hover
+    background: color-link
+    color: #fff
+    text-decoration: none
+    text-shadow: 0 1px darken(color-link, 20%)
+
+.article-footer
+  clearfix()
+  font-size: 0.85em
+  line-height: line-height
+  border-top: 1px solid color-border
+  padding-top: line-height
+  margin: 0 article-padding article-padding
+  a
+    color: color-grey
+    text-decoration: none
+    &:hover
+      color: color-default
+
+.article-tag-list-item
+  float: left
+  margin-right: 10px
+
+.article-tag-list-link
+  &:before
+    content: "#"
+
+.article-comment-link
+  float: right
+  &:before
+    content: "\f075"
+    font-family: font-icon
+    padding-right: 8px
+
+.article-share-link
+  cursor: pointer
+  float: right
+  margin-left: 20px
+  &:before
+    content: "\f064"
+    font-family: font-icon
+    padding-right: 6px
+
+#article-nav
+  clearfix()
+  position: relative
+  @media mq-normal
+    margin: block-margin 0
+    &:before
+      absolute-center(8px)
+      content: ""
+      border-radius: 50%
+      background: color-border
+      box-shadow: 0 1px 2px #fff
+
+.article-nav-link-wrap
+  text-decoration: none
+  text-shadow: 0 1px #fff
+  color: color-grey
+  box-sizing: border-box
+  margin-top: block-margin
+  text-align: center
+  display: block
+  &:hover
+    color: color-default
+  @media mq-normal
+    width: 50%
+    margin-top: 0
+
+#article-nav-newer
+  @media mq-normal
+    float: left
+    text-align: right
+    padding-right: 20px
+
+#article-nav-older
+  @media mq-normal
+    float: right
+    text-align: left
+    padding-left: 20px
+
+.article-nav-caption
+  text-transform: uppercase
+  letter-spacing: 2px
+  color: color-border
+  line-height: 1em
+  font-weight: bold
+  #article-nav-newer &
+    margin-right: -2px
+
+.article-nav-title
+  font-size: 0.85em
+  line-height: line-height
+  margin-top: 0.5em
+
+.article-share-box
+  position: absolute
+  display: none
+  background: #fff
+  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1)
+  border-radius: 3px
+  margin-left: -145px
+  overflow: hidden
+  z-index: 1
+  &.on
+    display: block
+
+.article-share-input
+  width: 100%
+  background: none
+  box-sizing: border-box
+  font: 14px font-sans
+  padding: 0 15px
+  color: color-default
+  outline: none
+  border: 1px solid color-border
+  border-radius: 3px 3px 0 0
+  height: 36px
+  line-height: 36px
+
+.article-share-links
+  clearfix()
+  background: color-background
+
+$article-share-link
+  width: 50px
+  height: 36px
+  display: block
+  float: left
+  position: relative
+  color: #999
+  text-shadow: 0 1px #fff
+  &:before
+    font-size: 20px
+    absolute-center(@font-size)
+    text-align: center
+  &:hover
+    color: #fff
+
+.article-share-twitter
+  @extend $article-share-link
+  &:hover
+    background: color-twitter
+    text-shadow: 0 1px darken(color-twitter, 20%)
+
+.article-share-facebook
+  @extend $article-share-link
+  &:hover
+    background: color-facebook
+    text-shadow: 0 1px darken(color-facebook, 20%)
+
+.article-share-pinterest
+  @extend $article-share-link
+  &:hover
+    background: color-pinterest
+    text-shadow: 0 1px darken(color-pinterest, 20%)
+
+.article-share-google
+  @extend $article-share-link
+  &:hover
+    background: color-google
+    text-shadow: 0 1px darken(color-google, 20%)
+
+.article-gallery
+  background: #000
+  position: relative
+
+.article-gallery-photos
+  position: relative
+  overflow: hidden
+
+.article-gallery-img
+  display: none
+  max-width: 100%
+  &:first-child
+    display: block
+  &.loaded
+    position: absolute
+    display: block
+  img
+    display: block
+    max-width: 100%
+    margin: 0 auto
+/*
+$article-gallery-ctrl
+  position: absolute
+  top: 0
+  height: 100%
+  width: 60px
+  color: #fff
+  text-shadow: 0 0 3px rgba(0, 0, 0, 0.3)
+  opacity: 0.3
+  transition: opacity 0.2s
+  cursor: pointer
+  &:hover
+    opacity: 0.8
+  &:before
+    font-size: 30px
+    font-family: font-icon
+    position: absolute
+    top: 50%
+    margin-top: @font-size * -0.5
+
+.article-gallery-prev
+  @extend $article-gallery-ctrl
+  left: 0
+  &:before
+    content: "\f053"
+    left: 15px
+
+.article-gallery-next
+  @extend $article-gallery-ctrl
+  right: 0
+  &:before
+    content: "\f054"
+    right: 15px*/

+ 9 - 0
source/css/_partial/comment.styl

@@ -0,0 +1,9 @@
+#comments
+  background: #fff
+  box-shadow: 1px 2px 3px #ddd
+  padding: article-padding
+  border: 1px solid color-border
+  border-radius: 3px
+  margin: block-margin 0
+  a
+    color: color-link

+ 17 - 0
source/css/_partial/footer.styl

@@ -0,0 +1,17 @@
+#footer
+  padding: 20px 0
+  border-top: 1px solid color-border
+  color: color-default
+  font-size: font-size + 2
+  text-align: center
+  .outer
+    margin-bottom: 0
+  a
+    color: color-link
+    text-decoration: none
+    &:hover
+      text-decoration: underline
+
+#footer-info
+  line-height: line-height
+  font-size: 0.85em

+ 130 - 0
source/css/_partial/header.styl

@@ -0,0 +1,130 @@
+#header
+  @extend $block
+  background: white
+  position: relative
+  a, a:visited
+    transition: 0.2s ease
+    color: color-default
+  a:hover
+    color: color-link
+
+$header-block
+  height: logo-size
+  line-height: logo-size
+  padding: ((header-height - logo-size)/2) 15px
+
+$header-block-left
+  float: left
+  border-right: 1px solid color-border
+
+$header-block-right
+  float: right
+  border-left: 1px solid color-border
+  
+.header-inner
+  height: 100%
+  position: relative
+  #logo
+    @extend $header-block
+    @extend $header-block-left
+    display: inline-block
+    .logo
+      display: inline-block
+      width: logo-size
+      height: logo-size
+      margin-right: 5px
+    .site-title
+      font-size: 16px
+      display: inline-block
+      vertical-align: top
+      font-weight: 600
+
+#header-title
+  text-align: center
+  height: logo-size
+  position: absolute
+  top: 50%
+  left: 0
+  margin-top: logo-size * -0.5
+  
+#header-sub
+  border-top: 1px solid color-border
+  ul
+    margin: 0 15px
+    li
+      float: left
+      margin: 0 10px
+      a
+        display: inline-block
+        line-height: header-sub-height
+
+#main-nav
+  @extend $header-block
+  @extend $header-block-left
+
+$nav-link
+  float: left
+  display: block
+  padding: 0 15px
+
+.nav-icon
+  @extend $nav-link
+  text-align: center
+  font-size: font-size
+  width: font-size
+  height: font-size
+  position: relative
+  cursor: pointer
+  height: logo-size !important
+  line-height: logo-size !important
+
+.main-nav-link
+  @extend $nav-link
+  font-weight: 300
+  @media mq-mobile
+    display: none
+
+#main-nav-toggle
+  display: none
+  &:before
+    content: "\f0c9"
+  @media mq-mobile
+    display: block
+
+#sub-nav
+  @extend $header-block
+  @extend $header-block-right
+
+#search-form-wrap
+  @extend $header-block
+  @extend $header-block-left
+  width: 200px
+  .search-form
+    position: relative
+    border: 1px solid color-border
+    border-radius: ((logo-size + 2)/2)
+    padding: 0 30px 0 10px
+    .search-form-input
+      border: none
+      background: none
+      color: color-default
+      width: 100%
+      font: 13px font-sans
+      outline: none
+      &::-webkit-search-results-decoration
+      &::-webkit-search-cancel-button
+        -webkit-appearance: none
+    .search-form-submit
+      top: 50%
+      right: 15px
+      border: none
+      cursor: pointer
+      margin-top: -7px
+      background: none
+      position: absolute
+      font: 13px font-icon
+      font-family: 'FontAwesome'
+      &:before
+        content: '\f002'
+      &:hover, &:focus
+        color: #777

+ 156 - 0
source/css/_partial/highlight.styl

@@ -0,0 +1,156 @@
+// https://github.com/chriskempson/tomorrow-theme
+highlight-background = #2d2d2d
+highlight-current-line = #393939
+highlight-selection = #515151
+highlight-foreground = #cccccc
+highlight-comment = #999999
+highlight-red = #f2777a
+highlight-orange = #f99157
+highlight-yellow = #ffcc66
+highlight-green = #99cc99
+highlight-aqua = #66cccc
+highlight-blue = #6699cc
+highlight-purple = #cc99cc
+
+$code-block
+  background: highlight-background
+  margin: 0 article-padding * -1
+  padding: 15px article-padding
+  border-style: solid
+  border-color: color-border
+  border-width: 1px 0
+  overflow: auto
+  color: highlight-foreground
+  line-height: font-size * line-height
+
+$line-numbers
+  color: #666
+  font-size: 0.85em
+
+.article-entry
+  pre, code
+    font-family: font-mono
+  code
+    background: color-background
+    text-shadow: 0 1px #fff
+    padding: 0 0.3em
+  pre
+    @extend $code-block
+    code
+      background: none
+      text-shadow: none
+      padding: 0
+  .highlight
+    @extend $code-block
+    pre
+      border: none
+      margin: 0
+      padding: 0
+    table
+      margin: 0
+      width: auto
+    td
+      border: none
+      padding: 0
+    figcaption
+      clearfix()
+      font-size: 0.85em
+      color: highlight-comment
+      line-height: 1em
+      margin-bottom: 1em
+      a
+        float: right
+    .gutter pre
+      @extend $line-numbers
+      text-align: right
+      padding-right: 20px
+    .line
+      height: font-size * line-height
+  .gist
+    margin: 0 article-padding * -1
+    border-style: solid
+    border-color: color-border
+    border-width: 1px 0
+    background: highlight-background
+    padding: 15px article-padding 15px 0
+    .gist-file
+      border: none
+      font-family: font-mono
+      margin: 0
+      .gist-data
+        background: none
+        border: none
+        .line-numbers
+          @extend $line-numbers
+          background: none
+          border: none
+          padding: 0 20px 0 0
+        .line-data
+          padding: 0 !important
+      .highlight
+        margin: 0
+        padding: 0
+        border: none
+      .gist-meta
+        background: highlight-background
+        color: highlight-comment
+        font: 0.85em font-sans
+        text-shadow: 0 0
+        padding: 0
+        margin-top: 1em
+        margin-left: article-padding
+        a
+          color: color-link
+          font-weight: normal
+          &:hover
+            text-decoration: underline
+
+pre
+  .comment
+  .title
+    color: highlight-comment
+  .variable
+  .attribute
+  .tag
+  .regexp
+  .ruby .constant
+  .xml .tag .title
+  .xml .pi
+  .xml .doctype
+  .html .doctype
+  .css .id
+  .css .class
+  .css .pseudo
+    color: highlight-red
+  .number
+  .preprocessor
+  .built_in
+  .literal
+  .params
+  .constant
+    color: highlight-orange
+  .class
+  .ruby .class .title
+  .css .rules .attribute
+    color: highlight-green
+  .string
+  .value
+  .inheritance
+  .header
+  .ruby .symbol
+  .xml .cdata
+    color: highlight-green
+  .css .hexcolor
+    color: highlight-aqua
+  .function
+  .python .decorator
+  .python .title
+  .ruby .function .title
+  .ruby .title .keyword
+  .perl .sub
+  .javascript .title
+  .coffeescript .title
+    color: highlight-blue
+  .keyword
+  .javascript .function
+    color: highlight-purple

+ 19 - 0
source/css/_partial/mobile.styl

@@ -0,0 +1,19 @@
+@media mq-mobile
+  #mobile-nav
+    position: absolute
+    top: 0
+    left: 0
+    width: mobile-nav-width
+    height: 100%
+    background: color-mobile-nav-background
+    border-right: 1px solid #fff
+
+@media mq-mobile
+  .mobile-nav-link
+    display: block
+    color: color-grey
+    text-decoration: none
+    padding: 15px 20px
+    font-weight: bold
+    &:hover
+      color: #fff

+ 98 - 0
source/css/_partial/profile.styl

@@ -0,0 +1,98 @@
+.profile-block
+  padding: 15px 20px
+  border-bottom: 1px solid color-border
+  &:last-child
+    border-bottom: none
+
+#profile
+  @media mq-normal
+    column(profile-column)
+  .inner
+    @extend $block
+    margin-top: block-margin
+    background: white
+    .base-info
+      #avatar
+        display: block
+        margin: 10px auto 20px
+        width: profile-avatar-size
+        height: profile-avatar-size
+      #name, #title, #location
+        display: block
+        text-align: center
+      #name
+        font-size: 20px
+        font-weight: 600
+      #location
+        font-size: font-size - 2
+        margin-top: 5px
+        color: color-default + #444
+        .fa
+          margin-right: 5px
+      #follow
+        color: white
+        width: 150px
+        height: 40px
+        display: block
+        font-size: 14px
+        line-height: 40px
+        text-align: center
+        margin: 20px auto 10px
+        background: #38b7ea
+        border-radius: 20px
+        transition: 0.2s ease
+        &:hover
+          background: #38b7ea + #111
+    .article-info
+      clearfix()
+      padding: 0px
+      .article-info-block
+        width: 50%
+        float: left
+        padding: 20px 15px
+        text-align: center
+        box-sizing: border-box
+        font-size: font-size + 6px
+        span
+          display: block
+          font-size: font-size
+          text-transform: uppercase
+        &:first-child
+          border-right: 1px solid color-border
+    .contact-info
+      .contact-list
+        width: 100%
+        td
+          text-align: center
+          font-size: font-size + 10px
+          a
+            position: relative
+            transition: 0.2s ease
+            color: color-default + #333
+            &:hover
+              color: color-default
+              &:after
+                right: -50%
+                top: -41px
+                color: white
+                background: #333
+                font-size: 14px
+                content: attr(title)
+                display: block
+                padding: 5px 15px
+                position: absolute
+                white-space: nowrap
+                border-radius: 2px
+                text-transform: uppercase
+                box-shadow: 0 0 2px rgba(0,0,0,0.2)
+                z-index: 1
+              &:before
+                top: -12px
+                right: 8px
+                border: solid
+                border-color: #333 transparent
+                border-width: 5px 5px 0 5px
+                content: ""
+                display: block
+                position: absolute
+                z-index: 2

+ 130 - 0
source/css/_partial/sidebar.styl

@@ -0,0 +1,130 @@
+#sidebar
+  @media mq-normal
+    column(sidebar-column)
+
+.widget
+  @extend $base-style
+  line-height: line-height
+  word-wrap: break-word
+  font-size: 0.9em
+  ul, ol
+    list-style: none
+    margin: 0
+    ul, ol
+      margin: 0 20px
+    ul
+      list-style: disc
+    ol
+      list-style: decimal
+
+.category-list-count
+.tag-list-count
+.archive-list-count
+  padding-left: 5px
+  color: color-grey
+  font-size: 0.85em
+  &:before
+    content: "("
+  &:after
+    content: ")"
+
+.tagcloud
+  a
+    margin-right: 5px
+
+.widget-wrap
+  margin: block-margin 10px
+
+.widget-title
+  @extend $block-caption
+  margin-bottom: 0
+
+.widget
+  padding: 15px 5px
+  a
+    color: color-sidebar-text
+    text-decoration: none
+    &:hover
+      color: color-sidebar-text-dark
+  ul, ol, dl
+    ul, ol, dl
+      margin-left: 15px
+      list-style: disc
+  ul, ol
+    list-style: none
+    li
+      padding: 10px 0
+      font-size: font-size
+      border-bottom: 1px solid border-color
+      a
+        color: color-sidebar-text
+    ul, ol
+      list-style: none
+      li
+        border: none
+        &:last-child
+          padding-bottom: 0px
+  ul:not(#recent-post), ol:not(#recent-post)
+    li
+      a
+        &:before
+          color: #ccc
+          content: "\f0da"
+          font-size: 12px
+          margin-right: 6px
+          font-family: FontAwesome
+          transition: 0.2s ease
+        &:hover:before
+          color: color-sidebar-text-dark
+
+#recent-post
+  li
+    clearfix()
+    padding: 10px 0 10px 94px
+    .item-thumbnail
+      opacity: 1
+      float: left
+      margin-left: -94px
+      transition: all 0.2s ease
+      .thumbnail
+        width: 80px
+        height: 80px
+        display: block
+        position: relative
+        overflow: hidden
+        span
+          width: 100%
+          height: 100%
+          display: block
+        .thumbnail-image
+          position: absolute
+          background-size: cover
+          background-position: center
+        .thumbnail-none
+          background-image: url(thumbnail-default-small)
+          background-size: 100% 100%
+    .item-inner
+      a
+      .item-category
+        font-size: 13px
+        text-transform: uppercase
+        a
+          color: color-link
+          &:hover
+            color: color-sidebar-text-dark
+        a, .icon
+          margin-right: 5px
+      .item-title
+        font-size: 15px
+        a
+          color: color-sidebar-text-dark
+          transition: all 0.2s ease
+      .item-date
+        color: #aaa
+        font-size: 13px
+        text-transform: uppercase
+    &:hover
+      .item-thumbnail
+        opacity: 0.8
+      .item-title a
+        color: color-link

+ 38 - 0
source/css/_util/grid.styl

@@ -0,0 +1,38 @@
+/////////////////
+// Semantic.gs // for Stylus: http://learnboost.github.com/stylus/
+/////////////////
+
+// Utility function — you should never need to modify this
+// _gridsystem-width = (column-width + gutter-width) * columns
+gridsystem-width(_columns = columns)
+  (column-width + gutter-width) * _columns
+
+// Set @total-width to 100% for a fluid layout
+// total-width = gridsystem-width(columns)
+total-width = 100%
+
+//////////
+// GRID //
+//////////
+
+body
+  clearfix()
+  width: 100%
+
+row(_columns = columns)
+  clearfix()
+  display: block
+  width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns))
+  margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1)
+
+column(x, _columns = columns)
+  display: inline
+  float: left
+  width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns))
+  margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns))
+
+push(offset = 1)
+  margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns))
+
+pull(offset = 1)
+  margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns))

+ 31 - 0
source/css/_util/mixin.styl

@@ -0,0 +1,31 @@
+// http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
+hide-text()
+  text-indent: 100%
+  white-space: nowrap
+  overflow: hidden
+
+// http://codepen.io/shshaw/full/gEiDt
+absolute-center(width, height = width)
+  // margin: auto
+  // position: absolute
+  // top: 50%
+  // top: 0
+  // left: 0
+  // bottom: 0
+  // right: 0
+  // width: width
+  // height: height
+  // overflow: auto
+  width: width
+  height: height
+  position: absolute
+  top: 50%
+  left: 50%
+  margin-top: width * -0.5
+  margin-left: height * -0.5
+
+avoid-column-break()
+  vendor("column-break-inside", avoid, only: webkit)
+  page-break-inside: avoid // for firefox
+  overflow: hidden // fix for firefox
+  break-inside: avoid-column

+ 63 - 0
source/css/_variables.styl

@@ -0,0 +1,63 @@
+// Config
+support-for-ie = false
+vendor-prefixes = webkit moz ms official
+
+// Colors
+color-default = #565a5f
+color-grey = #999
+color-border = #eceff2
+color-link = #38b7ea
+color-background = #f5f8f9
+color-sidebar-text = #777
+color-sidebar-text-dark = #333
+color-widget-background = #ddd
+color-widget-border = #ccc
+color-mobile-nav-background = #191919
+color-twitter = #00aced
+color-facebook = #3b5998
+color-pinterest = #cb2027
+color-google = #dd4b39
+
+// Fonts
+font-sans = "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif
+font-serif = Georgia, "Times New Roman", serif
+font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace
+font-size = 14px
+line-height = 1.6em
+line-height-title = 1.1em
+
+// Header
+logo-size = 40px
+header-height = 64px
+header-sub-height = 48px
+logo-url = "images/logo.svg"
+
+// Sidebar
+sidebar = hexo-config("sidebar")
+thumbnail-default-small = 'css/images/thumb-default-small.png'
+
+// Profile
+profile-avatar-size = 128px
+
+// Layout
+block-margin = 40px
+article-padding = 20px
+mobile-nav-width = 280px
+main-column = 7
+profile-column = 3
+sidebar-column = 3
+
+if sidebar and sidebar isnt bottom
+  _sidebar-column = sidebar-column
+else
+  _sidebar-column = 0
+
+// Grids
+column-width = 80px
+gutter-width = 20px
+columns = main-column + _sidebar-column + profile-column
+
+// Media queries
+mq-mobile = "screen and (max-width: 479px)"
+mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)"
+mq-normal = "screen and (min-width: 768px)"

BIN
source/css/images/avatar.png


+ 8 - 0
source/css/images/logo.svg

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
+<path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7
+	l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/>
+</svg>

BIN
source/css/images/thumb-default-small.png


+ 79 - 0
source/css/style.styl

@@ -0,0 +1,79 @@
+@import "nib"
+@import "_variables"
+@import "_util/mixin"
+@import "_util/grid"
+
+global-reset()
+
+input, button
+  margin: 0
+  padding: 0
+  &::-moz-focus-inner
+    border: 0
+    padding: 0
+
+html, body, #container
+  height: 100%
+
+body
+  color: color-default
+  background: color-background
+  font: font-size font-sans
+  -webkit-text-size-adjust: 100%
+  
+a
+  color: color-link
+  text-decoration: none
+  &:visited
+    color: color-link
+
+.outer
+  clearfix()
+  max-width: (column-width + gutter-width) * columns + gutter-width
+  margin: 0 auto
+  padding: 0 gutter-width
+
+.inner
+  column(columns)
+
+.left, .alignleft
+  float: left
+
+.right, .alignright
+  float: right
+
+.clear
+  clear: both
+  
+.logo
+  background-image: url(logo-url)
+  background-size: cover
+
+#container
+  position: relative
+  & > .outer
+    margin-bottom: 30px
+
+if sidebar and sidebar isnt bottom
+  #main
+    @media mq-normal
+      column(main-column)
+
+@import "_extend"
+@import "_partial/header"
+@import "_partial/profile"
+@import "_partial/article"
+@import "_partial/comment"
+@import "_partial/archive"
+@import "_partial/footer"
+@import "_partial/highlight"
+@import "_partial/mobile"
+
+if sidebar
+  @import "_partial/sidebar"
+
+if sidebar is left
+  #main
+    float: right
+  #profile
+    float: right

BIN
source/fancybox/blank.gif


BIN
source/fancybox/fancybox_loading.gif


BIN
source/fancybox/fancybox_loading@2x.gif


BIN
source/fancybox/fancybox_overlay.png


BIN
source/fancybox/fancybox_sprite.png


BIN
source/fancybox/fancybox_sprite@2x.png


BIN
source/fancybox/helpers/fancybox_buttons.png


+ 97 - 0
source/fancybox/helpers/jquery.fancybox-buttons.css

@@ -0,0 +1,97 @@
+#fancybox-buttons {
+	position: fixed;
+	left: 0;
+	width: 100%;
+	z-index: 8050;
+}
+
+#fancybox-buttons.top {
+	top: 10px;
+}
+
+#fancybox-buttons.bottom {
+	bottom: 10px;
+}
+
+#fancybox-buttons ul {
+	display: block;
+	width: 166px;
+	height: 30px;
+	margin: 0 auto;
+	padding: 0;
+	list-style: none;
+	border: 1px solid #111;
+	border-radius: 3px;
+	-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
+	   -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
+	        box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
+	background: rgb(50,50,50);
+	background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
+	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
+	background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
+	background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
+	background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
+	background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
+	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
+}
+
+#fancybox-buttons ul li {
+	float: left;
+	margin: 0;
+	padding: 0;
+}
+
+#fancybox-buttons a {
+	display: block;
+	width: 30px;
+	height: 30px;
+	text-indent: -9999px;
+	background-color: transparent;
+	background-image: url('fancybox_buttons.png');
+	background-repeat: no-repeat;
+	outline: none;
+	opacity: 0.8;
+}
+
+#fancybox-buttons a:hover {
+	opacity: 1;
+}
+
+#fancybox-buttons a.btnPrev {
+	background-position: 5px 0;
+}
+
+#fancybox-buttons a.btnNext {
+	background-position: -33px 0;
+	border-right: 1px solid #3e3e3e;
+}
+
+#fancybox-buttons a.btnPlay {
+	background-position: 0 -30px;
+}
+
+#fancybox-buttons a.btnPlayOn {
+	background-position: -30px -30px;
+}
+
+#fancybox-buttons a.btnToggle {
+	background-position: 3px -60px;
+	border-left: 1px solid #111;
+	border-right: 1px solid #3e3e3e;
+	width: 35px
+}
+
+#fancybox-buttons a.btnToggleOn {
+	background-position: -27px -60px;
+}
+
+#fancybox-buttons a.btnClose {
+	border-left: 1px solid #111;
+	width: 35px;
+	background-position: -56px 0px;
+}
+
+#fancybox-buttons a.btnDisabled {
+	opacity : 0.4;
+	cursor: default;
+}

+ 122 - 0
source/fancybox/helpers/jquery.fancybox-buttons.js

@@ -0,0 +1,122 @@
+ /*!
+ * Buttons helper for fancyBox
+ * version: 1.0.5 (Mon, 15 Oct 2012)
+ * @requires fancyBox v2.0 or later
+ *
+ * Usage:
+ *     $(".fancybox").fancybox({
+ *         helpers : {
+ *             buttons: {
+ *                 position : 'top'
+ *             }
+ *         }
+ *     });
+ *
+ */
+;(function ($) {
+	//Shortcut for fancyBox object
+	var F = $.fancybox;
+
+	//Add helper object
+	F.helpers.buttons = {
+		defaults : {
+			skipSingle : false, // disables if gallery contains single image
+			position   : 'top', // 'top' or 'bottom'
+			tpl        : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'
+		},
+
+		list : null,
+		buttons: null,
+
+		beforeLoad: function (opts, obj) {
+			//Remove self if gallery do not have at least two items
+
+			if (opts.skipSingle && obj.group.length < 2) {
+				obj.helpers.buttons = false;
+				obj.closeBtn = true;
+
+				return;
+			}
+
+			//Increase top margin to give space for buttons
+			obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
+		},
+
+		onPlayStart: function () {
+			if (this.buttons) {
+				this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
+			}
+		},
+
+		onPlayEnd: function () {
+			if (this.buttons) {
+				this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
+			}
+		},
+
+		afterShow: function (opts, obj) {
+			var buttons = this.buttons;
+
+			if (!buttons) {
+				this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
+
+				buttons = {
+					prev   : this.list.find('.btnPrev').click( F.prev ),
+					next   : this.list.find('.btnNext').click( F.next ),
+					play   : this.list.find('.btnPlay').click( F.play ),
+					toggle : this.list.find('.btnToggle').click( F.toggle ),
+					close  : this.list.find('.btnClose').click( F.close )
+				}
+			}
+
+			//Prev
+			if (obj.index > 0 || obj.loop) {
+				buttons.prev.removeClass('btnDisabled');
+			} else {
+				buttons.prev.addClass('btnDisabled');
+			}
+
+			//Next / Play
+			if (obj.loop || obj.index < obj.group.length - 1) {
+				buttons.next.removeClass('btnDisabled');
+				buttons.play.removeClass('btnDisabled');
+
+			} else {
+				buttons.next.addClass('btnDisabled');
+				buttons.play.addClass('btnDisabled');
+			}
+
+			this.buttons = buttons;
+
+			this.onUpdate(opts, obj);
+		},
+
+		onUpdate: function (opts, obj) {
+			var toggle;
+
+			if (!this.buttons) {
+				return;
+			}
+
+			toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
+
+			//Size toggle button
+			if (obj.canShrink) {
+				toggle.addClass('btnToggleOn');
+
+			} else if (!obj.canExpand) {
+				toggle.addClass('btnDisabled');
+			}
+		},
+
+		beforeClose: function () {
+			if (this.list) {
+				this.list.remove();
+			}
+
+			this.list    = null;
+			this.buttons = null;
+		}
+	};
+
+}(jQuery));

+ 199 - 0
source/fancybox/helpers/jquery.fancybox-media.js

@@ -0,0 +1,199 @@
+/*!
+ * Media helper for fancyBox
+ * version: 1.0.6 (Fri, 14 Jun 2013)
+ * @requires fancyBox v2.0 or later
+ *
+ * Usage:
+ *     $(".fancybox").fancybox({
+ *         helpers : {
+ *             media: true
+ *         }
+ *     });
+ *
+ * Set custom URL parameters:
+ *     $(".fancybox").fancybox({
+ *         helpers : {
+ *             media: {
+ *                 youtube : {
+ *                     params : {
+ *                         autoplay : 0
+ *                     }
+ *                 }
+ *             }
+ *         }
+ *     });
+ *
+ * Or:
+ *     $(".fancybox").fancybox({,
+ *         helpers : {
+ *             media: true
+ *         },
+ *         youtube : {
+ *             autoplay: 0
+ *         }
+ *     });
+ *
+ *  Supports:
+ *
+ *      Youtube
+ *          http://www.youtube.com/watch?v=opj24KnzrWo
+ *          http://www.youtube.com/embed/opj24KnzrWo
+ *          http://youtu.be/opj24KnzrWo
+ *			http://www.youtube-nocookie.com/embed/opj24KnzrWo
+ *      Vimeo
+ *          http://vimeo.com/40648169
+ *          http://vimeo.com/channels/staffpicks/38843628
+ *          http://vimeo.com/groups/surrealism/videos/36516384
+ *          http://player.vimeo.com/video/45074303
+ *      Metacafe
+ *          http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
+ *          http://www.metacafe.com/watch/7635964/
+ *      Dailymotion
+ *          http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
+ *      Twitvid
+ *          http://twitvid.com/QY7MD
+ *      Twitpic
+ *          http://twitpic.com/7p93st
+ *      Instagram
+ *          http://instagr.am/p/IejkuUGxQn/
+ *          http://instagram.com/p/IejkuUGxQn/
+ *      Google maps
+ *          http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
+ *          http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
+ *          http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
+ */
+;(function ($) {
+	"use strict";
+
+	//Shortcut for fancyBox object
+	var F = $.fancybox,
+		format = function( url, rez, params ) {
+			params = params || '';
+
+			if ( $.type( params ) === "object" ) {
+				params = $.param(params, true);
+			}
+
+			$.each(rez, function(key, value) {
+				url = url.replace( '$' + key, value || '' );
+			});
+
+			if (params.length) {
+				url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
+			}
+
+			return url;
+		};
+
+	//Add helper object
+	F.helpers.media = {
+		defaults : {
+			youtube : {
+				matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
+				params  : {
+					autoplay    : 1,
+					autohide    : 1,
+					fs          : 1,
+					rel         : 0,
+					hd          : 1,
+					wmode       : 'opaque',
+					enablejsapi : 1
+				},
+				type : 'iframe',
+				url  : '//www.youtube.com/embed/$3'
+			},
+			vimeo : {
+				matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
+				params  : {
+					autoplay      : 1,
+					hd            : 1,
+					show_title    : 1,
+					show_byline   : 1,
+					show_portrait : 0,
+					fullscreen    : 1
+				},
+				type : 'iframe',
+				url  : '//player.vimeo.com/video/$1'
+			},
+			metacafe : {
+				matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
+				params  : {
+					autoPlay : 'yes'
+				},
+				type : 'swf',
+				url  : function( rez, params, obj ) {
+					obj.swf.flashVars = 'playerVars=' + $.param( params, true );
+
+					return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
+				}
+			},
+			dailymotion : {
+				matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
+				params  : {
+					additionalInfos : 0,
+					autoStart : 1
+				},
+				type : 'swf',
+				url  : '//www.dailymotion.com/swf/video/$1'
+			},
+			twitvid : {
+				matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
+				params  : {
+					autoplay : 0
+				},
+				type : 'iframe',
+				url  : '//www.twitvid.com/embed.php?guid=$1'
+			},
+			twitpic : {
+				matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
+				type : 'image',
+				url  : '//twitpic.com/show/full/$1/'
+			},
+			instagram : {
+				matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
+				type : 'image',
+				url  : '//$1/p/$2/media/?size=l'
+			},
+			google_maps : {
+				matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
+				type : 'iframe',
+				url  : function( rez ) {
+					return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
+				}
+			}
+		},
+
+		beforeLoad : function(opts, obj) {
+			var url   = obj.href || '',
+				type  = false,
+				what,
+				item,
+				rez,
+				params;
+
+			for (what in opts) {
+				if (opts.hasOwnProperty(what)) {
+					item = opts[ what ];
+					rez  = url.match( item.matcher );
+
+					if (rez) {
+						type   = item.type;
+						params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
+
+						url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
+
+						break;
+					}
+				}
+			}
+
+			if (type) {
+				obj.href = url;
+				obj.type = type;
+
+				obj.autoHeight = false;
+			}
+		}
+	};
+
+}(jQuery));

+ 55 - 0
source/fancybox/helpers/jquery.fancybox-thumbs.css

@@ -0,0 +1,55 @@
+#fancybox-thumbs {
+	position: fixed;
+	left: 0;
+	width: 100%;
+	overflow: hidden;
+	z-index: 8050;
+}
+
+#fancybox-thumbs.bottom {
+	bottom: 2px;
+}
+
+#fancybox-thumbs.top {
+	top: 2px;
+}
+
+#fancybox-thumbs ul {
+	position: relative;
+	list-style: none;
+	margin: 0;
+	padding: 0;
+}
+
+#fancybox-thumbs ul li {
+	float: left;
+	padding: 1px;
+	opacity: 0.5;
+}
+
+#fancybox-thumbs ul li.active {
+	opacity: 0.75;
+	padding: 0;
+	border: 1px solid #fff;
+}
+
+#fancybox-thumbs ul li:hover {
+	opacity: 1;
+}
+
+#fancybox-thumbs ul li a {
+	display: block;
+	position: relative;
+	overflow: hidden;
+	border: 1px solid #222;
+	background: #111;
+	outline: none;
+}
+
+#fancybox-thumbs ul li img {
+	display: block;
+	position: relative;
+	border: 0;
+	padding: 0;
+	max-width: none;
+}

+ 165 - 0
source/fancybox/helpers/jquery.fancybox-thumbs.js

@@ -0,0 +1,165 @@
+ /*!
+ * Thumbnail helper for fancyBox
+ * version: 1.0.7 (Mon, 01 Oct 2012)
+ * @requires fancyBox v2.0 or later
+ *
+ * Usage:
+ *     $(".fancybox").fancybox({
+ *         helpers : {
+ *             thumbs: {
+ *                 width  : 50,
+ *                 height : 50
+ *             }
+ *         }
+ *     });
+ *
+ */
+;(function ($) {
+	//Shortcut for fancyBox object
+	var F = $.fancybox;
+
+	//Add helper object
+	F.helpers.thumbs = {
+		defaults : {
+			width    : 50,       // thumbnail width
+			height   : 50,       // thumbnail height
+			position : 'bottom', // 'top' or 'bottom'
+			source   : function ( item ) {  // function to obtain the URL of the thumbnail image
+				var href;
+
+				if (item.element) {
+					href = $(item.element).find('img').attr('src');
+				}
+
+				if (!href && item.type === 'image' && item.href) {
+					href = item.href;
+				}
+
+				return href;
+			}
+		},
+
+		wrap  : null,
+		list  : null,
+		width : 0,
+
+		init: function (opts, obj) {
+			var that = this,
+				list,
+				thumbWidth  = opts.width,
+				thumbHeight = opts.height,
+				thumbSource = opts.source;
+
+			//Build list structure
+			list = '';
+
+			for (var n = 0; n < obj.group.length; n++) {
+				list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
+			}
+
+			this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
+			this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
+
+			//Load each thumbnail
+			$.each(obj.group, function (i) {
+				var el   = obj.group[ i ],
+					href = thumbSource( el );
+
+				if (!href) {
+					return;
+				}
+
+				$("<img />").load(function () {
+					var width  = this.width,
+						height = this.height,
+						widthRatio, heightRatio, parent;
+
+					if (!that.list || !width || !height) {
+						return;
+					}
+
+					//Calculate thumbnail width/height and center it
+					widthRatio  = width / thumbWidth;
+					heightRatio = height / thumbHeight;
+
+					parent = that.list.children().eq(i).find('a');
+
+					if (widthRatio >= 1 && heightRatio >= 1) {
+						if (widthRatio > heightRatio) {
+							width  = Math.floor(width / heightRatio);
+							height = thumbHeight;
+
+						} else {
+							width  = thumbWidth;
+							height = Math.floor(height / widthRatio);
+						}
+					}
+
+					$(this).css({
+						width  : width,
+						height : height,
+						top    : Math.floor(thumbHeight / 2 - height / 2),
+						left   : Math.floor(thumbWidth / 2 - width / 2)
+					});
+
+					parent.width(thumbWidth).height(thumbHeight);
+
+					$(this).hide().appendTo(parent).fadeIn(300);
+
+				})
+				.attr('src',   href)
+				.attr('title', el.title);
+			});
+
+			//Set initial width
+			this.width = this.list.children().eq(0).outerWidth(true);
+
+			this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
+		},
+
+		beforeLoad: function (opts, obj) {
+			//Remove self if gallery do not have at least two items
+			if (obj.group.length < 2) {
+				obj.helpers.thumbs = false;
+
+				return;
+			}
+
+			//Increase bottom margin to give space for thumbs
+			obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
+		},
+
+		afterShow: function (opts, obj) {
+			//Check if exists and create or update list
+			if (this.list) {
+				this.onUpdate(opts, obj);
+
+			} else {
+				this.init(opts, obj);
+			}
+
+			//Set active element
+			this.list.children().removeClass('active').eq(obj.index).addClass('active');
+		},
+
+		//Center list
+		onUpdate: function (opts, obj) {
+			if (this.list) {
+				this.list.stop(true).animate({
+					'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
+				}, 150);
+			}
+		},
+
+		beforeClose: function () {
+			if (this.wrap) {
+				this.wrap.remove();
+			}
+
+			this.wrap  = null;
+			this.list  = null;
+			this.width = 0;
+		}
+	}
+
+}(jQuery));

+ 273 - 0
source/fancybox/jquery.fancybox.css

@@ -0,0 +1,273 @@
+/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
+.fancybox-wrap,
+.fancybox-skin,
+.fancybox-outer,
+.fancybox-inner,
+.fancybox-image,
+.fancybox-wrap iframe,
+.fancybox-wrap object,
+.fancybox-nav,
+.fancybox-nav span,
+.fancybox-tmp
+{
+	padding: 0;
+	margin: 0;
+	border: 0;
+	outline: none;
+	vertical-align: top;
+}
+
+.fancybox-wrap {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: 8020;
+}
+
+.fancybox-skin {
+	position: relative;
+	background: #f9f9f9;
+	color: #444;
+	text-shadow: none;
+	-webkit-border-radius: 4px;
+	   -moz-border-radius: 4px;
+	        border-radius: 4px;
+}
+
+.fancybox-opened {
+	z-index: 8030;
+}
+
+.fancybox-opened .fancybox-skin {
+	-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
+	   -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
+	        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
+}
+
+.fancybox-outer, .fancybox-inner {
+	position: relative;
+}
+
+.fancybox-inner {
+	overflow: hidden;
+}
+
+.fancybox-type-iframe .fancybox-inner {
+	-webkit-overflow-scrolling: touch;
+}
+
+.fancybox-error {
+	color: #444;
+	font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
+	margin: 0;
+	padding: 15px;
+	white-space: nowrap;
+}
+
+.fancybox-image, .fancybox-iframe {
+	display: block;
+	width: 100%;
+	height: 100%;
+}
+
+.fancybox-image {
+	max-width: 100%;
+	max-height: 100%;
+}
+
+#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
+	background-image: url(fancybox_sprite.png);
+}
+
+#fancybox-loading {
+	position: fixed;
+	top: 50%;
+	left: 50%;
+	margin-top: -22px;
+	margin-left: -22px;
+	background-position: 0 -108px;
+	opacity: 0.8;
+	cursor: pointer;
+	z-index: 8060;
+}
+
+#fancybox-loading div {
+	width: 44px;
+	height: 44px;
+	background: url(fancybox_loading.gif) center center no-repeat;
+}
+
+.fancybox-close {
+	position: absolute;
+	top: -18px;
+	right: -18px;
+	width: 36px;
+	height: 36px;
+	cursor: pointer;
+	z-index: 8040;
+}
+
+.fancybox-nav {
+	position: absolute;
+	top: 0;
+	width: 40%;
+	height: 100%;
+	cursor: pointer;
+	text-decoration: none;
+	background: transparent url(blank.gif); /* helps IE */
+	-webkit-tap-highlight-color: rgba(0,0,0,0);
+	z-index: 8040;
+}
+
+.fancybox-prev {
+	left: 0;
+}
+
+.fancybox-next {
+	right: 0;
+}
+
+.fancybox-nav span {
+	position: absolute;
+	top: 50%;
+	width: 36px;
+	height: 34px;
+	margin-top: -18px;
+	cursor: pointer;
+	z-index: 8040;
+	visibility: hidden;
+}
+
+.fancybox-prev span {
+	left: 10px;
+	background-position: 0 -36px;
+}
+
+.fancybox-next span {
+	right: 10px;
+	background-position: 0 -72px;
+}
+
+.fancybox-nav:hover span {
+	visibility: visible;
+}
+
+.fancybox-tmp {
+	position: absolute;
+	top: -99999px;
+	left: -99999px;
+	max-width: 99999px;
+	max-height: 99999px;
+	overflow: visible !important;
+}
+
+/* Overlay helper */
+
+.fancybox-lock {
+    overflow: visible !important;
+    width: auto;
+}
+
+.fancybox-lock body {
+    overflow: hidden !important;
+}
+
+.fancybox-lock-test {
+    overflow-y: hidden !important;
+}
+
+.fancybox-overlay {
+	position: absolute;
+	top: 0;
+	left: 0;
+	overflow: hidden;
+	display: none;
+	z-index: 8010;
+	background: url(fancybox_overlay.png);
+}
+
+.fancybox-overlay-fixed {
+	position: fixed;
+	bottom: 0;
+	right: 0;
+}
+
+.fancybox-lock .fancybox-overlay {
+	overflow: auto;
+	overflow-y: scroll;
+}
+
+/* Title helper */
+
+.fancybox-title {
+	visibility: hidden;
+	font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
+	position: relative;
+	text-shadow: none;
+	z-index: 8050;
+}
+
+.fancybox-opened .fancybox-title {
+	visibility: visible;
+}
+
+.fancybox-title-float-wrap {
+	position: absolute;
+	bottom: 0;
+	right: 50%;
+	margin-bottom: -35px;
+	z-index: 8050;
+	text-align: center;
+}
+
+.fancybox-title-float-wrap .child {
+	display: inline-block;
+	margin-right: -100%;
+	padding: 2px 20px;
+	background: transparent; /* Fallback for web browsers that doesn't support RGBa */
+	background: rgba(0, 0, 0, 0.8);
+	-webkit-border-radius: 15px;
+	   -moz-border-radius: 15px;
+	        border-radius: 15px;
+	text-shadow: 0 1px 2px #222;
+	color: #FFF;
+	font-weight: bold;
+	line-height: 24px;
+	white-space: nowrap;
+}
+
+.fancybox-title-outside-wrap {
+	position: relative;
+	margin-top: 10px;
+	color: #fff;
+}
+
+.fancybox-title-inside-wrap {
+	padding-top: 10px;
+}
+
+.fancybox-title-over-wrap {
+	position: absolute;
+	bottom: 0;
+	left: 0;
+	color: #fff;
+	padding: 10px;
+	background: #000;
+	background: rgba(0, 0, 0, .8);
+}
+
+/*Retina graphics!*/
+@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
+	   only screen and (min--moz-device-pixel-ratio: 1.5),
+	   only screen and (min-device-pixel-ratio: 1.5){
+
+	#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
+		background-image: url(fancybox_sprite@2x.png);
+		background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
+	}
+
+	#fancybox-loading div {
+		background-image: url(fancybox_loading@2x.gif);
+		background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
+	}
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 2017 - 0
source/fancybox/jquery.fancybox.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 46 - 0
source/fancybox/jquery.fancybox.pack.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 4 - 0
source/font-awesome/css/font-awesome.min.css


BIN
source/font-awesome/fonts/FontAwesome.otf


BIN
source/font-awesome/fonts/fontawesome-webfont.eot


Diferenças do arquivo suprimidas por serem muito extensas
+ 565 - 0
source/font-awesome/fonts/fontawesome-webfont.svg


BIN
source/font-awesome/fonts/fontawesome-webfont.ttf


BIN
source/font-awesome/fonts/fontawesome-webfont.woff


BIN
source/font-awesome/fonts/fontawesome-webfont.woff2


+ 105 - 0
source/js/script.js

@@ -0,0 +1,105 @@
+(function($){
+  // Share
+  $('body').on('click', function(){
+    $('.article-share-box.on').removeClass('on');
+  }).on('click', '.article-share-link', function(e){
+    e.stopPropagation();
+
+    var $this = $(this),
+      url = $this.attr('data-url'),
+      encodedUrl = encodeURIComponent(url),
+      id = 'article-share-box-' + $this.attr('data-id'),
+      offset = $this.offset();
+
+    if ($('#' + id).length){
+      var box = $('#' + id);
+
+      if (box.hasClass('on')){
+        box.removeClass('on');
+        return;
+      }
+    } else {
+      var html = [
+        '<div id="' + id + '" class="article-share-box">',
+          '<input class="article-share-input" value="' + url + '">',
+          '<div class="article-share-links">',
+            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
+            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
+            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
+            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
+          '</div>',
+        '</div>'
+      ].join('');
+
+      var box = $(html);
+
+      $('body').append(box);
+    }
+
+    $('.article-share-box.on').hide();
+
+    box.css({
+      top: offset.top + 25,
+      left: offset.left
+    }).addClass('on');
+  }).on('click', '.article-share-box', function(e){
+    e.stopPropagation();
+  }).on('click', '.article-share-box-input', function(){
+    $(this).select();
+  }).on('click', '.article-share-box-link', function(e){
+    e.preventDefault();
+    e.stopPropagation();
+
+    window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
+  });
+
+  // Caption
+  $('.article-entry').each(function(i){
+    $(this).find('img').each(function(){
+      if ($(this).parent().hasClass('fancybox')) return;
+
+      var alt = this.alt;
+
+      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
+
+      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
+    });
+
+    $(this).find('.fancybox').each(function(){
+      $(this).attr('rel', 'article' + i);
+    });
+  });
+
+  if ($.fancybox){
+    $('.fancybox').fancybox();
+  }
+
+  // Mobile nav
+  var $container = $('#container'),
+    isMobileNavAnim = false,
+    mobileNavAnimDuration = 200;
+
+  var startMobileNavAnim = function(){
+    isMobileNavAnim = true;
+  };
+
+  var stopMobileNavAnim = function(){
+    setTimeout(function(){
+      isMobileNavAnim = false;
+    }, mobileNavAnimDuration);
+  }
+
+  $('#main-nav-toggle').on('click', function(){
+    if (isMobileNavAnim) return;
+
+    startMobileNavAnim();
+    $container.toggleClass('mobile-nav-on');
+    stopMobileNavAnim();
+  });
+
+  $('#wrap').on('click', function(){
+    if (isMobileNavAnim || !$container.hasClass('mobile-nav-on')) return;
+
+    $container.removeClass('mobile-nav-on');
+  });
+})(jQuery);