├── source ├── CNAME ├── css │ ├── .DS_Store │ ├── fonts │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.svgz │ │ └── fontawesome-webfont.woff │ ├── _partial │ │ ├── wheelmenu.styl │ │ ├── page.styl │ │ ├── mobile-slider.styl │ │ ├── scroll.styl │ │ ├── share.styl │ │ ├── instagram.styl │ │ ├── header.styl │ │ ├── highlight.styl │ │ ├── archive.styl │ │ ├── footer.styl │ │ ├── mobile.styl │ │ ├── main.styl │ │ ├── article.styl │ │ └── tagcloud.styl │ ├── _util │ │ ├── mixin.styl │ │ ├── grid.styl │ │ ├── styles.css │ │ └── normalize.css │ ├── _extend.styl │ ├── _variables.styl │ └── style.styl ├── favicon.ico ├── img │ ├── face.png │ ├── mail.png │ ├── rss.png │ ├── weibo.png │ ├── zhihu.png │ ├── cursor.ico │ ├── douban.png │ ├── github.png │ ├── google.png │ ├── img-err.png │ ├── jianshu.png │ ├── scroll.png │ ├── twitter.png │ ├── wymusic.png │ ├── coderwall.png │ ├── delicious.png │ ├── facebook.png │ ├── linkedin.png │ ├── pinboard.png │ ├── pinterest.png │ ├── face-duoshuo.png │ ├── img-loading.png │ ├── scrollbar_arrow.png │ └── stackoverflow.png ├── js │ ├── .DS_Store │ ├── photo.js │ ├── pc.js │ ├── instagram.js │ ├── mobile.js │ ├── main.js │ ├── jquery.lazyload.js │ ├── clipboard.min.js │ └── jquery.githubRepoWidget.min.js ├── fancybox │ ├── blank.gif │ ├── fancybox_sprite.png │ ├── fancybox_loading.gif │ ├── fancybox_overlay.png │ ├── fancybox_loading@2x.gif │ ├── fancybox_sprite@2x.png │ ├── helpers │ │ ├── fancybox_buttons.png │ │ ├── jquery.fancybox-thumbs.css │ │ ├── jquery.fancybox-buttons.css │ │ ├── jquery.fancybox-buttons.js │ │ ├── jquery.fancybox-thumbs.js │ │ └── jquery.fancybox-media.js │ ├── jquery.fancybox.css │ └── jquery.fancybox.pack.js ├── background │ ├── bg-1.jpg │ ├── bg-10.jpg │ ├── bg-11.jpg │ ├── bg-12.jpg │ ├── bg-13.jpg │ ├── bg-14.jpg │ ├── bg-15.jpg │ ├── bg-16.jpg │ ├── bg-17.jpg │ ├── bg-18.jpg │ ├── bg-2.jpg │ ├── bg-3.jpg │ ├── bg-4.jpg │ ├── bg-5.jpg │ ├── bg-6.jpg │ ├── bg-7.jpg │ ├── bg-8.jpg │ └── bg-9.jpg ├── webcomponent │ ├── github.png │ ├── spinner.gif │ └── github-card.html └── font-awesome │ └── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── .gitignore ├── layout ├── page.ejs ├── post.ejs ├── index.ejs ├── tag.ejs ├── .DS_Store ├── archive.ejs ├── category.ejs ├── _partial │ ├── .DS_Store │ ├── post │ │ ├── date.ejs │ │ ├── tag.ejs │ │ ├── category.ejs │ │ ├── title.ejs │ │ ├── duoshuo.ejs │ │ ├── share.ejs │ │ └── nav.ejs │ ├── google-analytics.ejs │ ├── archive-post.ejs │ ├── mathjax.ejs │ ├── after-footer.ejs │ ├── mobile-nav.ejs │ ├── header.ejs │ ├── archive.ejs │ ├── head.ejs │ ├── article.ejs │ ├── footer.ejs │ └── left-col.ejs └── layout.ejs ├── package.json ├── _config.yml └── README.md /source/CNAME: -------------------------------------------------------------------------------- 1 | ursb.me -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | source/css/.DS_Store 3 | -------------------------------------------------------------------------------- /layout/page.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {post: page, index: false}) %> -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {post: page, index: false}) %> -------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: 2, index: true}) %> -------------------------------------------------------------------------------- /layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.tag, index: true}) %> -------------------------------------------------------------------------------- /layout/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/layout/.DS_Store -------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.archive, index: true}) %> -------------------------------------------------------------------------------- /layout/category.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.category, index: true}) %> -------------------------------------------------------------------------------- /source/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/css/.DS_Store -------------------------------------------------------------------------------- /source/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/favicon.ico -------------------------------------------------------------------------------- /source/img/face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/face.png -------------------------------------------------------------------------------- /source/img/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/mail.png -------------------------------------------------------------------------------- /source/img/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/rss.png -------------------------------------------------------------------------------- /source/img/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/weibo.png -------------------------------------------------------------------------------- /source/img/zhihu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/zhihu.png -------------------------------------------------------------------------------- /source/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/js/.DS_Store -------------------------------------------------------------------------------- /source/img/cursor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/cursor.ico -------------------------------------------------------------------------------- /source/img/douban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/douban.png -------------------------------------------------------------------------------- /source/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/github.png -------------------------------------------------------------------------------- /source/img/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/google.png -------------------------------------------------------------------------------- /source/img/img-err.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/img-err.png -------------------------------------------------------------------------------- /source/img/jianshu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/jianshu.png -------------------------------------------------------------------------------- /source/img/scroll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/scroll.png -------------------------------------------------------------------------------- /source/img/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/twitter.png -------------------------------------------------------------------------------- /source/img/wymusic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/wymusic.png -------------------------------------------------------------------------------- /layout/_partial/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/layout/_partial/.DS_Store -------------------------------------------------------------------------------- /source/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/blank.gif -------------------------------------------------------------------------------- /source/img/coderwall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/coderwall.png -------------------------------------------------------------------------------- /source/img/delicious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/delicious.png -------------------------------------------------------------------------------- /source/img/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/facebook.png -------------------------------------------------------------------------------- /source/img/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/linkedin.png -------------------------------------------------------------------------------- /source/img/pinboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/pinboard.png -------------------------------------------------------------------------------- /source/img/pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/pinterest.png -------------------------------------------------------------------------------- /source/background/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-1.jpg -------------------------------------------------------------------------------- /source/background/bg-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-10.jpg -------------------------------------------------------------------------------- /source/background/bg-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-11.jpg -------------------------------------------------------------------------------- /source/background/bg-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-12.jpg -------------------------------------------------------------------------------- /source/background/bg-13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-13.jpg -------------------------------------------------------------------------------- /source/background/bg-14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-14.jpg -------------------------------------------------------------------------------- /source/background/bg-15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-15.jpg -------------------------------------------------------------------------------- /source/background/bg-16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-16.jpg -------------------------------------------------------------------------------- /source/background/bg-17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-17.jpg -------------------------------------------------------------------------------- /source/background/bg-18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-18.jpg -------------------------------------------------------------------------------- /source/background/bg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-2.jpg -------------------------------------------------------------------------------- /source/background/bg-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-3.jpg -------------------------------------------------------------------------------- /source/background/bg-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-4.jpg -------------------------------------------------------------------------------- /source/background/bg-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-5.jpg -------------------------------------------------------------------------------- /source/background/bg-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-6.jpg -------------------------------------------------------------------------------- /source/background/bg-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-7.jpg -------------------------------------------------------------------------------- /source/background/bg-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-8.jpg -------------------------------------------------------------------------------- /source/background/bg-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/background/bg-9.jpg -------------------------------------------------------------------------------- /source/img/face-duoshuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/face-duoshuo.png -------------------------------------------------------------------------------- /source/img/img-loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/img-loading.png -------------------------------------------------------------------------------- /source/img/scrollbar_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/scrollbar_arrow.png -------------------------------------------------------------------------------- /source/img/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/img/stackoverflow.png -------------------------------------------------------------------------------- /source/webcomponent/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/webcomponent/github.png -------------------------------------------------------------------------------- /source/webcomponent/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/webcomponent/spinner.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /source/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /source/css/fonts/fontawesome-webfont.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/css/fonts/fontawesome-webfont.svgz -------------------------------------------------------------------------------- /source/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /source/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /source/fancybox/helpers/fancybox_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/fancybox/helpers/fancybox_buttons.png -------------------------------------------------------------------------------- /source/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /source/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /source/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /source/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airingursb/hexo-theme-airia/HEAD/source/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /layout/_partial/post/date.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.tags && post.tags.length){ %> 2 |
3 | <%- list_tags(post.tags, { 4 | show_count: false, 5 | class: 'article-tag' 6 | }) %> 7 |
8 | <% } %> -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-site", 3 | "version": "2.8.3", 4 | "private": true, 5 | "dependencies": { 6 | "hexo-renderer-ejs": "*", 7 | "hexo-renderer-stylus": "*", 8 | "hexo-renderer-marked": "*" 9 | } 10 | } -------------------------------------------------------------------------------- /layout/_partial/post/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.categories && post.categories.length){ %> 2 |
3 | <%- list_categories(post.categories, { 4 | show_count: false, 5 | class: 'article-category', 6 | style: 'none', 7 | separator: '' 8 | }) %> 9 |
10 | <% } %> 11 | -------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/head') %> 2 | 3 |
4 |
5 | <%- partial('_partial/left-col', null, {cache: !config.relative_link}) %> 6 |
7 |
8 | <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> 9 |
<%- body %>
10 | <%- partial('_partial/footer') %> 11 |
12 | <%- partial('_partial/after-footer') %> 13 |
14 | 15 | -------------------------------------------------------------------------------- /source/css/_partial/wheelmenu.styl: -------------------------------------------------------------------------------- 1 | /* Required Stylesheets */ 2 | .wheel-button { 3 | position: relative; 4 | } 5 | 6 | .wheel { 7 | margin: 0; 8 | padding: 0; 9 | list-style: none; 10 | width: 200px; /* this will determine the diameter of the circle */ 11 | height: 200px; /* this will determine the diameter of the circle */ 12 | visibility: hidden; 13 | position: relative; 14 | display: none; 15 | } 16 | 17 | .wheel li { 18 | overflow: hidden; 19 | float:left; 20 | } 21 | 22 | .wheel li a { 23 | display: block; 24 | } -------------------------------------------------------------------------------- /layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.link){ %> 2 |

3 | 4 |

5 | <% } else if (post.title){ %> 6 | <% if (index){ %> 7 |

8 | <%= post.title %> 9 |

10 | <% } else { %> 11 |

12 | <%= post.title %> 13 |

14 | <% } %> 15 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/google-analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.google_analytics){ %> 2 | 3 | 13 | 14 | <% } %> 15 | -------------------------------------------------------------------------------- /layout/_partial/archive-post.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 7 | <%- partial('post/title', {class_name: 'archive-article-title'}) %> 8 | 12 |
13 |
14 |
15 |
-------------------------------------------------------------------------------- /layout/_partial/mathjax.ejs: -------------------------------------------------------------------------------- 1 | 17 | 18 | 20 | -------------------------------------------------------------------------------- /layout/_partial/after-footer.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.fancybox){ %> 2 | <%- css('fancybox/jquery.fancybox') %> 3 | <% } %> 4 | 5 | 18 | <%- js('http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min') %> 19 | <%- js('js/main') %> 20 | 21 | 22 | <%- partial('google-analytics') %> 23 | 24 | <% if (theme.mathjax){ %> 25 | <%- partial('mathjax') %> 26 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/page.styl: -------------------------------------------------------------------------------- 1 | #page-nav{ 2 | text-align: center; 3 | margin-top: 30px; 4 | .page-number{ 5 | width: 20px; 6 | height: 20px; 7 | background: #4d4d4d; 8 | -webkit-border-radius: 50%; 9 | -moz-border-radius: 50%; 10 | border-radius: 50%; 11 | display: inline-block; 12 | color: #fff; 13 | line-height: 20px; 14 | font-size: 12px; 15 | margin: 0 3px 30px; 16 | &:hover{ 17 | background: #5e5e5e; 18 | } 19 | } 20 | .current{ 21 | background: #88acdb; 22 | cursor: default; 23 | &:hover{ 24 | background: #88acdb; 25 | } 26 | } 27 | .extend{ 28 | color: #4d4d4d; 29 | margin: 0 27px; 30 | opacity: 0; 31 | &:hover{ 32 | color: #5e5e5e; 33 | } 34 | } 35 | &:hover{ 36 | .extend{ 37 | opacity: 1; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /source/css/_util/mixin.styl: -------------------------------------------------------------------------------- 1 | // http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ 2 | hide-text() 3 | text-indent: 100% 4 | white-space: nowrap 5 | overflow: hidden 6 | 7 | // http://codepen.io/shshaw/full/gEiDt 8 | absolute-center(width, height = width) 9 | // margin: auto 10 | // position: absolute 11 | // top: 50% 12 | // top: 0 13 | // left: 0 14 | // bottom: 0 15 | // right: 0 16 | // width: width 17 | // height: height 18 | // overflow: auto 19 | width: width 20 | height: height 21 | position: absolute 22 | top: 50% 23 | left: 50% 24 | margin-top: width * -0.5 25 | margin-left: height * -0.5 26 | 27 | avoid-column-break() 28 | vendor("column-break-inside", avoid, only: webkit) 29 | page-break-inside: avoid // for firefox 30 | overflow: hidden // fix for firefox 31 | break-inside: avoid-column 32 | -------------------------------------------------------------------------------- /source/fancybox/helpers/jquery.fancybox-thumbs.css: -------------------------------------------------------------------------------- 1 | #fancybox-thumbs { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | overflow: hidden; 6 | z-index: 8050; 7 | } 8 | 9 | #fancybox-thumbs.bottom { 10 | bottom: 2px; 11 | } 12 | 13 | #fancybox-thumbs.top { 14 | top: 2px; 15 | } 16 | 17 | #fancybox-thumbs ul { 18 | position: relative; 19 | list-style: none; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | #fancybox-thumbs ul li { 25 | float: left; 26 | padding: 1px; 27 | opacity: 0.5; 28 | } 29 | 30 | #fancybox-thumbs ul li.active { 31 | opacity: 0.75; 32 | padding: 0; 33 | border: 1px solid #fff; 34 | } 35 | 36 | #fancybox-thumbs ul li:hover { 37 | opacity: 1; 38 | } 39 | 40 | #fancybox-thumbs ul li a { 41 | display: block; 42 | position: relative; 43 | overflow: hidden; 44 | border: 1px solid #222; 45 | background: #111; 46 | outline: none; 47 | } 48 | 49 | #fancybox-thumbs ul li img { 50 | display: block; 51 | position: relative; 52 | border: 0; 53 | padding: 0; 54 | max-width: none; 55 | } -------------------------------------------------------------------------------- /layout/_partial/post/duoshuo.ejs: -------------------------------------------------------------------------------- 1 |
2 | 最近访客 3 |
4 |
5 | 6 |
7 | 8 | 9 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /layout/_partial/mobile-nav.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/header.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/post/share.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 | <% if (theme.share) { %> 4 |
5 |
  • 6 |
  • 7 |
  • 8 |
  • 9 |
  • 10 |
  • 11 |
  • 12 |
    13 | 17 | <% } %> 18 |
    19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /source/css/_extend.styl: -------------------------------------------------------------------------------- 1 | $block-caption 2 | text-decoration: none 3 | text-transform: uppercase 4 | letter-spacing: 2px 5 | color: color-grey 6 | margin-bottom: 1em 7 | margin-left: 5px 8 | line-height: 1em 9 | text-shadow: 0 1px #fff 10 | font-weight: bold 11 | 12 | $block 13 | background: #fff 14 | box-shadow: 1px 2px 3px #ddd 15 | border: 1px solid color-border 16 | border-radius: 3px 17 | 18 | $base-style 19 | h1 20 | font-size: 2em 21 | h2 22 | font-size: 1.5em 23 | h3 24 | font-size: 1.3em 25 | h4 26 | font-size: 1.2em 27 | h5 28 | font-size: 1em 29 | h6 30 | font-size: 1em 31 | color: color-grey 32 | hr 33 | border: 1px dashed color-border 34 | strong 35 | font-weight: bold 36 | em, cite 37 | font-style: italic 38 | sup, sub 39 | font-size: 0.75em 40 | line-height: 0 41 | position: relative 42 | vertical-align: baseline 43 | sup 44 | top: -0.5em 45 | sub 46 | bottom: -0.2em 47 | small 48 | font-size: 0.85em 49 | acronym, abbr 50 | border-bottom: 1px dotted 51 | ul, ol, dl 52 | margin: 0 20px 53 | line-height: line-height 54 | ul, ol 55 | ul, ol 56 | margin-top: 0 57 | margin-bottom: 0 58 | ul 59 | list-style: disc 60 | ol 61 | list-style: decimal 62 | dt 63 | font-weight: bold -------------------------------------------------------------------------------- /source/css/_util/grid.styl: -------------------------------------------------------------------------------- 1 | ///////////////// 2 | // Semantic.gs // for Stylus: http://learnboost.github.com/stylus/ 3 | ///////////////// 4 | 5 | // Utility function — you should never need to modify this 6 | // _gridsystem-width = (column-width + gutter-width) * columns 7 | gridsystem-width(_columns = columns) 8 | (column-width + gutter-width) * _columns 9 | 10 | // Set @total-width to 100% for a fluid layout 11 | // total-width = gridsystem-width(columns) 12 | total-width = 100% 13 | 14 | ////////// 15 | // GRID // 16 | ////////// 17 | 18 | body 19 | clearfix() 20 | width: 100% 21 | 22 | row(_columns = columns) 23 | clearfix() 24 | display: block 25 | width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns)) 26 | margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1) 27 | 28 | column(x, _columns = columns) 29 | display: inline 30 | float: left 31 | width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns)) 32 | margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns)) 33 | 34 | push(offset = 1) 35 | margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) 36 | 37 | pull(offset = 1) 38 | margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Header 2 | menu: 3 | 主页: / 4 | 所有文章: /archives 5 | 文集: /collection 6 | 相册: /photo 7 | 留言板: /about 8 | 9 | # SubNav 10 | subnav: 11 | github: "https://github.com/airingursb" 12 | jianshu: "http://www.jianshu.com/users/b7757a81a98f/latest_articles" 13 | weibo: "http://weibo.com/2696578192/profile?topnav=1&wvr=6" 14 | rss: "http://ursb.me/atom.xml" 15 | #zhihu: "#" 16 | #douban: "#" 17 | #mail: "mailto:gx-deng@163.com" 18 | #facebook: "https://www.facebook.com/airing.gx" 19 | #google: "#" 20 | #twitter: "#" 21 | #linkedin: "#" 22 | #wymusic: "http://music.163.com/#/user/home?id=94609819" 23 | 24 | rss: /atom.xml 25 | 26 | # Content 27 | excerpt_link: more 28 | fancybox: true 29 | mathjax: true 30 | 31 | # 是否开启动画效果 32 | animate: true 33 | 34 | # 是否在新窗口打开链接 35 | open_in_new: false 36 | 37 | # Miscellaneous 38 | google_analytics: '' 39 | favicon: /favicon.ico 40 | 41 | #你的头像url 42 | avatar: /img/face.png 43 | #是否开启分享 44 | share: true 45 | #是否开启多说评论,填写你在多说申请的项目名称 46 | duoshuo: airingursb 47 | #若使用disqus,请在博客config文件中填写disqus_shortname,并关闭多说评论 48 | #duoshuo: true 49 | #是否开启云标签 50 | tagcloud: true 51 | 52 | #是否开启友情链接 53 | #不开启—— 54 | #friends: false 55 | #开启—— 56 | friends: 57 | #安林镜界: http://ursb.me/ 58 | NoMan: http://nomanteam.github.io/Hole/ 59 | urdb.me: http://urdb.me/ 60 | 荏苒。: http://www.eyrefree.org/ 61 | #是否开启“关于我”。 62 | #不开启—— 63 | #aboutme: false 64 | #开启—— 65 | aboutme: 谢谢支持!使用支付宝扫码即可。 -------------------------------------------------------------------------------- /layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 | <% if (pagination == 2){ %> 2 | <% page.posts.data = page.posts.data.sort(function(prev, next) { %> 3 | <% if (next.top && !prev.top) { %> 4 | <% return true; %> 5 | <% } %> 6 | <% }); %> 7 | <% page.posts.each(function(post){ %> 8 | <%- partial('article', {post: post, index: true}) %> 9 | <% }) %> 10 | <% if (page.total > 1){ %> 11 | 17 | <% } %> 18 | <% } else { %> 19 | <% var last; %> 20 | <% page.posts.each(function(post, i){ %> 21 | <% var year = post.date.year(); %> 22 | <% if (last != year){ %> 23 | <% if (last != null){ %> 24 | 25 | <% } %> 26 | <% last = year; %> 27 |
    28 |
    29 | <%= year %> 30 |
    31 |
    32 | <% } %> 33 | <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> 34 | <% }) %> 35 | <% if (page.posts.length){ %> 36 |
    37 | <% } %> 38 | 39 | <% if (page.total > 1){ %> 40 | 46 | <% } %> 47 | 48 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/mobile-slider.styl: -------------------------------------------------------------------------------- 1 | #viewer{ 2 | position: fixed; 3 | z-index: 1000000; 4 | top: 0; 5 | bottom: 0; 6 | left: 0; 7 | right: 0; 8 | overflow: hidden; 9 | } 10 | #viewer-box{ 11 | width: 100%; 12 | height: 100%; 13 | position: relative; 14 | color: #ccc; 15 | -webkit-transform: translate3d(-100%, 0, 0 ); 16 | -webkit-transition: -webkit-transform .25s ease-in-out; 17 | .viewer-box-l{ 18 | background: rgba(20,20,20,0.9); 19 | width: 80%; 20 | height: 100%; 21 | float: left; 22 | .viewer-box-wrap{ 23 | margin: 20px 10px 0px 20px; 24 | } 25 | .viewer-title{ 26 | line-height: 32px; 27 | &:before{ 28 | content: ""; 29 | width: 6px; 30 | height: 6px; 31 | border: 1px solid #999; 32 | -webkit-border-radius: 10px; 33 | border-radius: 10px; 34 | background: #aaa; 35 | display: inline-block; 36 | margin-right: 10px; 37 | } 38 | } 39 | .viewer-div{ 40 | border-bottom: 1px dotted #666; 41 | padding-bottom: 13px; 42 | line-height: 20px; 43 | &:last-child{ 44 | border-bottom: none; 45 | } 46 | .switch-friends-link{ 47 | line-height: 20px; 48 | } 49 | } 50 | } 51 | .viewer-box-r{ 52 | background: rgba(0,0,0,0); 53 | width: 20%; 54 | height: 100%; 55 | float: right; 56 | } 57 | } 58 | #viewer-box.anm-swipe{ 59 | -webkit-transform: translate3d(0, 0, 0); 60 | .viewer-box-r{ 61 | background: rgba(0,0,0,0); 62 | } 63 | } 64 | .hide{ 65 | display: none; 66 | } 67 | #viewer-box .viewer-list{ 68 | margin: 0; 69 | padding: 0; 70 | height: 100%; 71 | overflow: hidden; 72 | } -------------------------------------------------------------------------------- /source/css/_partial/scroll.styl: -------------------------------------------------------------------------------- 1 | /* 设置滚动条的样式 */ 2 | ::-webkit-scrollbar { 3 | width: 10px; 4 | height: 10px; 5 | } 6 | 7 | ::-webkit-scrollbar-button { 8 | width: 0; 9 | height: 0; 10 | } 11 | 12 | ::-webkit-scrollbar-button:start:increment,::-webkit-scrollbar-button:end:decrement { 13 | display: none; 14 | } 15 | 16 | ::-webkit-scrollbar-corner { 17 | display: block; 18 | } 19 | 20 | ::-webkit-scrollbar-thumb { 21 | border-radius: 8px; 22 | background-color: rgba(0,0,0,.2); 23 | } 24 | 25 | ::-webkit-scrollbar-thumb:hover { 26 | border-radius: 8px; 27 | background-color: rgba(0,0,0,.5); 28 | } 29 | 30 | ::-webkit-scrollbar-track,::-webkit-scrollbar-thumb { 31 | border-right: 1px solid transparent; 32 | border-left: 1px solid transparent; 33 | } 34 | 35 | ::-webkit-scrollbar-track:hover { 36 | background-color: rgba(0,0,0,.15); 37 | } 38 | ::-webkit-scrollbar-button:start { 39 | width: 10px; 40 | height: 10px; 41 | background: url(../img/scrollbar_arrow.png) no-repeat 0 0; 42 | } 43 | 44 | ::-webkit-scrollbar-button:start:hover { 45 | background: url(../img/scrollbar_arrow.png) no-repeat -15px 0; 46 | } 47 | 48 | ::-webkit-scrollbar-button:start:active { 49 | background: url(../img/scrollbar_arrow.png) no-repeat -30px 0; 50 | } 51 | 52 | ::-webkit-scrollbar-button:end { 53 | width: 10px; 54 | height: 10px; 55 | background: url(../img/scrollbar_arrow.png) no-repeat 0 -18px; 56 | } 57 | 58 | ::-webkit-scrollbar-button:end:hover { 59 | background: url(../img/scrollbar_arrow.png) no-repeat -15px -18px; 60 | } 61 | 62 | ::-webkit-scrollbar-button:end:active { 63 | background: url(../img/scrollbar_arrow.png) no-repeat -30px -18px; 64 | } -------------------------------------------------------------------------------- /source/css/_variables.styl: -------------------------------------------------------------------------------- 1 | // Config 2 | support-for-ie = false 3 | vendor-prefixes = webkit moz ms official 4 | 5 | // Colors 6 | color-default = #555 7 | color-grey = #999 8 | color-border = #ddd 9 | color-link = #258fb8 10 | color-background = #eee 11 | color-sidebar-text = #777 12 | color-widget-background = #ddd 13 | color-widget-border = #ccc 14 | color-footer-background = #262a30 15 | color-mobile-nav-background = #191919 16 | color-twitter = #00aced 17 | color-facebook = #3b5998 18 | color-pinterest = #cb2027 19 | color-google = #dd4b39 20 | 21 | // Fonts 22 | font-sans = "Helvetica Neue", Helvetica, Arial, sans-serif 23 | font-serif = Georgia, "Times New Roman", serif 24 | font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace 25 | font-icon = FontAwesome 26 | font-icon-path = "fonts/fontawesome-webfont" 27 | font-icon-version = "4.0.3" 28 | font-size = 14px 29 | line-height = 1.6em 30 | line-height-title = 1.1em 31 | 32 | // Header 33 | logo-size = 40px 34 | subtitle-size = 16px 35 | banner-height = 300px 36 | banner-url = "images/banner.jpg" 37 | 38 | sidebar = hexo-config("sidebar") 39 | 40 | // Layout 41 | block-margin = 50px 42 | article-padding = 20px 43 | mobile-nav-width = 280px 44 | main-column = 9 45 | sidebar-column = 3 46 | 47 | if sidebar and sidebar isnt bottom 48 | _sidebar-column = sidebar-column 49 | else 50 | _sidebar-column = 0 51 | 52 | // Grids 53 | column-width = 80px 54 | gutter-width = 20px 55 | columns = main-column + _sidebar-column 56 | 57 | // Media queries 58 | mq-mobile = "screen and (max-width: 479px)" 59 | mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)" 60 | mq-normal = "screen and (min-width: 768px)" -------------------------------------------------------------------------------- /source/css/_partial/share.styl: -------------------------------------------------------------------------------- 1 | baidu-share = hexo-config("share") 2 | 3 | .share 4 | padding-left 40px 5 | margin 1em auto .5em 6 | opacity .5 7 | &:hover 8 | opacity 1 9 | 10 | if baidu-share 11 | .bdsharebuttonbox 12 | font-family Arial 13 | li 14 | display inline-block 15 | width 28px 16 | height @width 17 | margin-right 2px 18 | font 20px FontAwesome 19 | background #6f7170 20 | text-align center 21 | vertical-align middle 22 | box-shadow 1px 1px 1px rgba(0,0,0, .1), 1px 1px 1px rgba(0,0,0, .3) 23 | a, .bds_more 24 | float none 25 | margin 0 26 | padding 0 27 | font @font 28 | background-image none 29 | color white 30 | line-height @width 31 | &:hover 32 | opacity 1 33 | &:hover 34 | opacity 1 35 | transform scale(1.1) 36 | a 37 | color white 38 | 39 | // http://share.baidu.com/help/webid 40 | font-logo = bds_tsina f18a #db332f, 41 | bds_sqq f1d6 #1cbcef, 42 | bds_copy f016 #8f8f8f, 43 | bds_mail f003 #6fc0e4, 44 | bds_weixin f1d7 #8cdc49, 45 | bds_more f1e0 #8cbcf5, 46 | bds_twi f099 #21abf4 47 | 48 | for i in font-logo 49 | .{i[0]}:before 50 | content '\' + i[1] 51 | #{i[0]} 52 | background i[2] 53 | -------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <% 6 | var title = page.title; 7 | 8 | if (is_archive()){ 9 | title = 'Archives'; 10 | 11 | if (is_month()){ 12 | title += ': ' + page.year + '/' + page.month; 13 | } else if (is_year()){ 14 | title += ': ' + page.year; 15 | } 16 | } else if (is_category()){ 17 | title = 'Category: ' + page.category; 18 | } else if (is_tag()){ 19 | title = 'Tag: ' + page.tag; 20 | } 21 | %> 22 | <% if (title){ %><%= title %> | <% } %><%= config.title %> 23 | 24 | <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 25 | <% if (theme.rss){ %> 26 | 27 | <% } %> 28 | <% if (theme.favicon){ %> 29 | 30 | <% } %> 31 | <%- css('css/style') %> 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /source/js/photo.js: -------------------------------------------------------------------------------- 1 | define([], function () { 2 | return { 3 | page: 1, 4 | offset: 20, 5 | init: function () { 6 | var that = this; 7 | $.getJSON("/photo/output.json", function (data) { 8 | that.render(that.page, data); 9 | 10 | that.scroll(data); 11 | }); 12 | }, 13 | 14 | render: function (page, data) { 15 | var begin = (page - 1) * this.offset; 16 | var end = page * this.offset; 17 | if (begin >= data.length) return; 18 | var html, li = ""; 19 | for (var i = begin; i < end && i < data.length; i++) { 20 | li += '
  • ' + 21 | '' + 22 | '' + 23 | '
  • '; 24 | } 25 | 26 | $(".img-box-ul").append(li); 27 | $(".img-box-ul").lazyload(); 28 | $("a[rel=example_group]").fancybox(); 29 | }, 30 | 31 | scroll: function (data) { 32 | var that = this; 33 | $(window).scroll(function() { 34 | var windowPageYOffset = window.pageYOffset; 35 | var windowPageYOffsetAddHeight = windowPageYOffset + window.innerHeight; 36 | var sensitivity = 0; 37 | 38 | var offsetTop = $(".instagram").offset().top + $(".instagram").height(); 39 | 40 | if (offsetTop >= windowPageYOffset && offsetTop < windowPageYOffsetAddHeight + sensitivity) { 41 | that.render(++that.page, data); 42 | } 43 | }) 44 | } 45 | } 46 | }) -------------------------------------------------------------------------------- /layout/_partial/post/nav.ejs: -------------------------------------------------------------------------------- 1 | <% if (post.original != false && !is_page()){ %> 2 | 3 | 21 | 22 | <% } else { %> 23 | <% } %> 24 | 25 | 26 | <% if (post.prev || post.next){ %> 27 | 47 | <% } %> -------------------------------------------------------------------------------- /source/css/_partial/instagram.styl: -------------------------------------------------------------------------------- 1 | #post-instagram{ 2 | .article-entry{ 3 | padding-right: 0; 4 | } 5 | padding: 30px; 6 | } 7 | .instagram{ 8 | position: relative; 9 | min-height: 500px; 10 | } 11 | .instagram .open-ins{ 12 | display: block; 13 | padding: 10px 0; 14 | position: absolute; 15 | right: 28px; 16 | top: -75px; 17 | color: #333; 18 | &:hover{ 19 | color: #657b83; 20 | } 21 | } 22 | .instagram .year{ 23 | display: inline; 24 | } 25 | .instagram .album h1 em{ 26 | font-style: normal; 27 | font-size: 14px; 28 | margin-left: 10px; 29 | } 30 | .instagram .album ul{ 31 | min-height: 149px; 32 | padding-top: 17px; 33 | border-bottom: 1px solid #ddd; 34 | list-style: none; 35 | } 36 | .instagram .album li{ 37 | position: relative; 38 | display: inline-block; 39 | min-width: 157px; 40 | margin: 0; 41 | &:before{ 42 | display: none; 43 | } 44 | } 45 | 46 | 47 | .instagram .album div.img-box{ 48 | position: relative; 49 | margin: 0 20px 10px; 50 | -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 1px rgba(255,255,255,0.1); 51 | -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 1px rgba(255,255,255,0.1); 52 | box-shadow: 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 1px rgba(255,255,255,0.1); 53 | } 54 | .instagram .album div.img-box .img-bg{ 55 | position: absolute; 56 | top: 0; 57 | left: 0; 58 | bottom: 0px; 59 | width: 100%; 60 | margin: -5px; 61 | padding: 5px; 62 | background: rgba(204, 204, 204, 0.8) ; 63 | -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 1px 5px rgba(0,0,0,0.1); 64 | -moz-box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 1px 5px rgba(0,0,0,0.1); 65 | box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 1px 5px rgba(0,0,0,0.1); 66 | -webkit-transition: all 0.15s ease-out 0.1s; 67 | -moz-transition: all 0.15s ease-out 0.1s; 68 | -o-transition: all 0.15s ease-out 0.1s; 69 | transition: all 0.15s ease-out 0.1s; 70 | opacity: 0.2; 71 | cursor: pointer; 72 | display: block; 73 | } 74 | .instagram .album div.img-box .img-bg:hover{ 75 | opacity: 0; 76 | } 77 | .instagram .album div.img-box img{ 78 | width: 100%; 79 | height: auto; 80 | display: block; 81 | } 82 | @media screen and (max-width:600px) { 83 | .instagram .album ul { 84 | margin-left: 0; 85 | padding: 0; 86 | text-align: center; 87 | } 88 | .instagram .album li { 89 | max-width: 300px; 90 | } 91 | .instagram .album div.img-box{ 92 | margin: 0; 93 | } 94 | } -------------------------------------------------------------------------------- /source/js/pc.js: -------------------------------------------------------------------------------- 1 | define([], function(){ 2 | 3 | var Tips = (function(){ 4 | 5 | var $tipBox = $(".tips-box"); 6 | 7 | return { 8 | show: function(){ 9 | $tipBox.removeClass("hide"); 10 | }, 11 | hide: function(){ 12 | $tipBox.addClass("hide"); 13 | }, 14 | init: function(){ 15 | 16 | } 17 | } 18 | })(); 19 | 20 | var resetTags = function(){ 21 | var tags = $(".tagcloud a"); 22 | tags.css({"font-size": "12px"}); 23 | for(var i=0,len=tags.length; i 2 | <%if(post.noDate != "true"){%> 3 |
    4 | <%- partial('post/date', {class_name: 'article-date', date_format: null}) %> 5 |
    6 | <%}%> 7 |
    8 | <% if (theme.fancybox){ %> 9 | 10 | <% } %> 11 | <% if (post.link || post.title){ %> 12 |
    13 | <%- partial('post/title', {class_name: 'article-title'}) %> 14 |
    15 | <% if (!index){ %> 16 | 21 | <% } %> 22 | <% } %> 23 |
    24 | <% if (post.excerpt && index){ %> 25 | <%- post.excerpt %> 26 | <% } else { %> 27 | <%- post.content %> 28 | <% } %> 29 |
    30 | 31 |
    32 |
    33 | <% if (index){ %> 34 | 49 | <% } %> 50 |
    51 | <% if (!index){ %> 52 | <%- partial('post/nav') %> 53 | <% } %> 54 | 55 | 56 | <% if (!index && theme.share){ %> 57 | <%- partial('post/share') %> 58 | <% } %> 59 | 60 | <% if (!index && theme.duoshuo && post.comments){ %> 61 | <%- partial('post/duoshuo', { 62 | key: post.slug, 63 | title: post.title, 64 | url: config.url+url_for(post.path) 65 | }) %> 66 | <% } %> 67 | <% if (!index && post.comments && config.disqus_shortname){ %> 68 |
    69 |
    70 | 81 | 82 |
    83 | <% } %> 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | hexo-theme-yilia 2 | ================ 3 | 4 | Yilia 是为 [hexo](https://github.com/tommy351/hexo) 2.4+制作的主题。 5 | 崇尚简约优雅,以及极致的性能。 你可以点击 [我的博客](http://litten.github.io/) 查看效果。 6 | 7 | 如遇到问题或有需求,可以: 8 | * 提issue给我 9 | * 在这篇文章下留言[Hexo主题Yilia](http://litten.github.io/2014/08/31/hexo-theme-yilia/) 10 | * 移动端问题留言[Yilia在移动端适配的一些事](http://litten.github.io/2015/02/23/yilia-on-mobile/) 11 | 12 | 我都会看到并处理。 13 | 14 | 如果你想体验手机浏览效果,可以扫一下二维码: 15 | 16 | ![litten-qrcode](https://cloud.githubusercontent.com/assets/2024949/6349328/51a067fe-bc64-11e4-881c-f68050c50c28.png) 17 | 18 | ————————————————————— 19 | 20 | 关于主题: 21 | 22 | 1. 我喜欢简约。所以近期文章,搜索框都拿掉了 23 | 2. 接地气一点。所以用上了jiathis分享,友言评论,以及baidu的cdn 24 | 3. 追求移动端的体验 25 | 3. 让大家把注意力放到内容上。这是本主题设计初衷 26 | 4. 主题不支持IE6,7,8。以后也不会 27 | 28 | ##一、近期更新 29 | 30 | 2015.6.14 - 模块化加载 31 | 2015.2.21 - 移动侧重构&布局bug修改 32 | 2014.11.7 - 增加“友情链接”“关于我” 33 | 2014.10.22 - 优化fancybox展示 34 | 2014.10.16 - 增加表格样式 35 | 2014.9.19 - 云标签挂件 36 | 37 | ##二、使用 38 | 39 | #### 安装 40 | 41 | ``` bash 42 | $ git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia 43 | ``` 44 | 45 | #### 配置 46 | 47 | 修改hexo根目录下的 `_config.yml` : `theme: yilia` 48 | 49 | #### 更新 50 | 51 | ``` bash 52 | cd themes/yilia 53 | git pull 54 | ``` 55 | 56 | ##三、外观 57 | 58 | ####**宽屏** 59 | ![宽屏](http://littendomo.sinaapp.com/yilia/yilia-pc1.png) 60 | 61 | ####**宽屏文字** 62 | ![宽屏文字](http://littendomo.sinaapp.com/yilia/yilia-pc2.png) 63 | 64 | ####**窄屏** 65 | ![窄屏](http://littendomo.sinaapp.com/yilia/yilia-pc3.png) 66 | 67 | ####**同步instagram** 68 | ![同步instagram](http://littendomo.sinaapp.com/yilia/yilia-pc4.png) 69 | 70 | ####**移动端** 71 | ![移动端](http://littendomo.sinaapp.com/yilia/yilia-mobile.png) 72 | ![移动端](http://littendomo.sinaapp.com/yilia/yilia-mobile2.png) 73 | 74 | ##四、配置 75 | 76 | 主题配置文件在主目录下的`_config.yml`: 77 | 78 | ``` 79 | # Header 80 | menu: 81 | 主页: / 82 | 所有文章: /archives 83 | # 随笔: /tags/随笔 84 | 85 | # SubNav 86 | subnav: 87 | github: "#" 88 | weibo: "#" 89 | rss: "#" 90 | zhihu: "#" 91 | #douban: "#" 92 | #mail: "#" 93 | #facebook: "#" 94 | #google: "#" 95 | #twitter: "#" 96 | #linkedin: "#" 97 | 98 | rss: /atom.xml 99 | 100 | # Content 101 | excerpt_link: more 102 | fancybox: true 103 | mathjax: true 104 | 105 | # Miscellaneous 106 | google_analytics: '' 107 | favicon: /favicon.png 108 | 109 | #你的头像url 110 | avatar: "" 111 | #是否开启分享 112 | share: true 113 | #是否开启多说评论,填写你在多说申请的项目名称 duoshuo: duoshuo-key 114 | #若使用disqus,请在博客config文件中填写disqus_shortname,并关闭多说评论 115 | duoshuo: true 116 | #是否开启云标签 117 | tagcloud: true 118 | 119 | #是否开启友情链接 120 | #不开启—— 121 | #friends: false 122 | #开启—— 123 | friends: 124 | 奥巴马的博客: http://localhost:4000/ 125 | 卡卡的美丽传说: http://localhost:4000/ 126 | 本泽马的博客: http://localhost:4000/ 127 | 吉格斯的博客: http://localhost:4000/ 128 | 习大大大不同: http://localhost:4000/ 129 | 托蒂的博客: http://localhost:4000/ 130 | 131 | #是否开启“关于我”。 132 | #不开启—— 133 | #aboutme: false 134 | #开启—— 135 | aboutme: 我是谁,我从哪里来,我到哪里去?我就是我,是颜色不一样的吃货… 136 | ``` 137 | ##五、其他 138 | 139 | [同步你的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) 140 | -------------------------------------------------------------------------------- /source/fancybox/helpers/jquery.fancybox-buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Buttons helper for fancyBox 3 | * version: 1.0.5 (Mon, 15 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * buttons: { 10 | * position : 'top' 11 | * } 12 | * } 13 | * }); 14 | * 15 | */ 16 | ;(function ($) { 17 | //Shortcut for fancyBox object 18 | var F = $.fancybox; 19 | 20 | //Add helper object 21 | F.helpers.buttons = { 22 | defaults : { 23 | skipSingle : false, // disables if gallery contains single image 24 | position : 'top', // 'top' or 'bottom' 25 | tpl : '
    ' 26 | }, 27 | 28 | list : null, 29 | buttons: null, 30 | 31 | beforeLoad: function (opts, obj) { 32 | //Remove self if gallery do not have at least two items 33 | 34 | if (opts.skipSingle && obj.group.length < 2) { 35 | obj.helpers.buttons = false; 36 | obj.closeBtn = true; 37 | 38 | return; 39 | } 40 | 41 | //Increase top margin to give space for buttons 42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 43 | }, 44 | 45 | onPlayStart: function () { 46 | if (this.buttons) { 47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 48 | } 49 | }, 50 | 51 | onPlayEnd: function () { 52 | if (this.buttons) { 53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 54 | } 55 | }, 56 | 57 | afterShow: function (opts, obj) { 58 | var buttons = this.buttons; 59 | 60 | if (!buttons) { 61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 62 | 63 | buttons = { 64 | prev : this.list.find('.btnPrev').click( F.prev ), 65 | next : this.list.find('.btnNext').click( F.next ), 66 | play : this.list.find('.btnPlay').click( F.play ), 67 | toggle : this.list.find('.btnToggle').click( F.toggle ), 68 | close : this.list.find('.btnClose').click( F.close ) 69 | } 70 | } 71 | 72 | //Prev 73 | if (obj.index > 0 || obj.loop) { 74 | buttons.prev.removeClass('btnDisabled'); 75 | } else { 76 | buttons.prev.addClass('btnDisabled'); 77 | } 78 | 79 | //Next / Play 80 | if (obj.loop || obj.index < obj.group.length - 1) { 81 | buttons.next.removeClass('btnDisabled'); 82 | buttons.play.removeClass('btnDisabled'); 83 | 84 | } else { 85 | buttons.next.addClass('btnDisabled'); 86 | buttons.play.addClass('btnDisabled'); 87 | } 88 | 89 | this.buttons = buttons; 90 | 91 | this.onUpdate(opts, obj); 92 | }, 93 | 94 | onUpdate: function (opts, obj) { 95 | var toggle; 96 | 97 | if (!this.buttons) { 98 | return; 99 | } 100 | 101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 102 | 103 | //Size toggle button 104 | if (obj.canShrink) { 105 | toggle.addClass('btnToggleOn'); 106 | 107 | } else if (!obj.canExpand) { 108 | toggle.addClass('btnDisabled'); 109 | } 110 | }, 111 | 112 | beforeClose: function () { 113 | if (this.list) { 114 | this.list.remove(); 115 | } 116 | 117 | this.list = null; 118 | this.buttons = null; 119 | } 120 | }; 121 | 122 | }(jQuery)); 123 | -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 | 96 | -------------------------------------------------------------------------------- /layout/_partial/left-col.ejs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 116 | 117 |
    -------------------------------------------------------------------------------- /source/css/_partial/header.styl: -------------------------------------------------------------------------------- 1 | #header 2 | height: banner-height 3 | position: relative 4 | border-bottom: 1px solid color-border 5 | &:before, &:after 6 | content: "" 7 | position: absolute 8 | left: 0 9 | right: 0 10 | height: 40px 11 | &:before 12 | top: 0 13 | background: linear-gradient(rgba(0, 0, 0, 0.2), transparent) 14 | &:after 15 | bottom: 0 16 | background: linear-gradient(transparent, rgba(0, 0, 0, 0.2)) 17 | 18 | #header-outer 19 | height: 100% 20 | position: relative 21 | 22 | #header-inner 23 | position: relative 24 | overflow: hidden 25 | 26 | #banner 27 | position: absolute 28 | top: 0 29 | left: 0 30 | width: 100% 31 | height: 100% 32 | background: url(banner-url) center #000 33 | background-size: cover 34 | z-index: -1 35 | 36 | #header-title 37 | text-align: center 38 | height: logo-size 39 | position: absolute 40 | top: 50% 41 | left: 0 42 | margin-top: logo-size * -0.5 43 | 44 | $logo-text 45 | text-decoration: none 46 | color: #fff 47 | font-weight: 300 48 | text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) 49 | 50 | #logo 51 | @extend $logo-text 52 | font-size: logo-size 53 | line-height: logo-size 54 | letter-spacing: 2px 55 | 56 | #subtitle 57 | @extend $logo-text 58 | font-size: subtitle-size 59 | line-height: subtitle-size 60 | letter-spacing: 1px 61 | 62 | #subtitle-wrap 63 | margin-top: subtitle-size 64 | 65 | #main-nav 66 | float: left 67 | margin-left: -15px 68 | 69 | $nav-link 70 | float: left 71 | color: #fff 72 | opacity: 0.6 73 | text-decoration: none 74 | text-shadow: 0 1px rgba(0, 0, 0, 0.2) 75 | transition: opacity 0.2s 76 | display: block 77 | padding: 20px 15px 78 | &:hover 79 | opacity: 1 80 | 81 | .nav-icon 82 | @extend $nav-link 83 | font-family: font-icon 84 | text-align: center 85 | font-size: font-size 86 | width: font-size 87 | height: font-size 88 | padding: 20px 15px 89 | position: relative 90 | cursor: pointer 91 | 92 | .main-nav-link 93 | @extend $nav-link 94 | font-weight: 300 95 | letter-spacing: 1px 96 | @media mq-mobile 97 | display: none 98 | 99 | #main-nav-toggle 100 | display: none 101 | &:before 102 | content: "\f0c9" 103 | @media mq-mobile 104 | display: block 105 | 106 | #sub-nav 107 | float: right 108 | margin-right: -15px 109 | 110 | #nav-rss-link 111 | &:before 112 | content: "\f09e" 113 | 114 | #nav-search-btn 115 | &:before 116 | content: "\f002" 117 | 118 | #search-form-wrap 119 | position: absolute 120 | top: 15px 121 | width: 150px 122 | height: 30px 123 | right: -150px 124 | opacity: 0 125 | transition: 0.2s ease-out 126 | &.on 127 | opacity: 1 128 | right: 0 129 | @media mq-mobile 130 | width: 100% 131 | right: -100% 132 | 133 | .search-form 134 | position: absolute 135 | top: 0 136 | left: 0 137 | right: 0 138 | background: #fff 139 | padding: 5px 15px 140 | border-radius: 15px 141 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) 142 | 143 | .search-form-input 144 | border: none 145 | background: none 146 | color: color-default 147 | width: 100% 148 | font: 13px font-sans 149 | outline: none 150 | &::-webkit-search-results-decoration 151 | &::-webkit-search-cancel-button 152 | -webkit-appearance: none 153 | 154 | .search-form-submit 155 | position: absolute 156 | top: 50% 157 | right: 10px 158 | margin-top: -7px 159 | font: 13px font-icon 160 | border: none 161 | background: none 162 | color: #bbb 163 | cursor: pointer 164 | &:hover, &:focus 165 | color: #777 -------------------------------------------------------------------------------- /source/css/_partial/highlight.styl: -------------------------------------------------------------------------------- 1 | // https://github.com/chriskempson/tomorrow-theme 2 | highlight-background = #272822 3 | highlight-current-line = #393939 4 | highlight-selection = #515151 5 | highlight-foreground = #ffffff 6 | highlight-comment = #a6e22e 7 | highlight-red = #f2777a 8 | highlight-orange = #66d9ef 9 | highlight-yellow = #ffcc66 10 | highlight-green = #e6db74 11 | highlight-aqua = #66cccc 12 | highlight-blue = #6699cc 13 | highlight-purple = #f92672 14 | 15 | $code-block 16 | background: #4D4D4D 17 | margin: 10px 0 18 | padding: 10px 10px 19 | overflow: auto 20 | color: #4C4C4C 21 | line-height: font-size * line-height 22 | 23 | $line-numbers 24 | color: #666 25 | font-size: 0.85em 26 | 27 | .article-entry 28 | pre, code 29 | font-family: font-mono 30 | code 31 | background: color-background 32 | text-shadow: 0 1px #fff 33 | padding: 0 0.3em 34 | border: none 35 | pre 36 | @extend $code-block 37 | color: #EEF8FC 38 | code 39 | background: none 40 | text-shadow: none 41 | padding: 0 42 | color: #EEF8FC 43 | .highlight 44 | @extend $code-block 45 | pre 46 | border: none 47 | margin: 0 48 | padding: 0 49 | table 50 | margin: 0 51 | width: auto 52 | td 53 | border: none 54 | padding: 0 55 | figcaption 56 | clearfix() 57 | font-size: 0.85em 58 | color: highlight-comment 59 | line-height: 1em 60 | margin-bottom: 1em 61 | a 62 | float: right 63 | .gutter pre 64 | @extend $line-numbers 65 | text-align: right 66 | padding-right: 20px 67 | .line 68 | text-shadow: none 69 | .line 70 | font-size: font-size 71 | height: font-size * line-height 72 | .gist 73 | margin: 0 article-padding * -1 74 | border-style: solid 75 | border-color: color-border 76 | border-width: 1px 0 77 | background: highlight-background 78 | padding: 15px article-padding 15px 0 79 | .gist-file 80 | border: none 81 | font-family: font-mono 82 | margin: 0 83 | .gist-data 84 | background: none 85 | border: none 86 | .line-numbers 87 | @extend $line-numbers 88 | background: none 89 | border: none 90 | padding: 0 20px 0 0 91 | .line-data 92 | padding: 0 !important 93 | .highlight 94 | margin: 0 95 | padding: 0 96 | border: none 97 | .gist-meta 98 | background: highlight-background 99 | color: highlight-comment 100 | font: 0.85em font-sans 101 | text-shadow: 0 0 102 | padding: 0 103 | margin-top: 1em 104 | margin-left: article-padding 105 | a 106 | color: color-link 107 | font-weight: normal 108 | &:hover 109 | text-decoration: underline 110 | 111 | pre 112 | .comment 113 | color: #ddd 114 | .title 115 | color: highlight-comment 116 | .variable 117 | .attribute 118 | .tag 119 | .regexp 120 | .ruby .constant 121 | .xml .tag .title 122 | .xml .pi 123 | .xml .doctype 124 | .html .doctype 125 | .css .id 126 | .css .class 127 | .css .pseudo 128 | color: highlight-red 129 | .number 130 | .preprocessor 131 | .built_in 132 | .literal 133 | .params 134 | .constant 135 | color: highlight-orange 136 | .class 137 | .ruby .class .title 138 | .css .rules .attribute 139 | color: highlight-green 140 | .string 141 | .value 142 | .inheritance 143 | .header 144 | .ruby .symbol 145 | .xml .cdata 146 | color: highlight-green 147 | .css .hexcolor 148 | color: highlight-aqua 149 | .function 150 | .python .decorator 151 | .python .title 152 | .ruby .function .title 153 | .ruby .title .keyword 154 | .perl .sub 155 | .javascript .title 156 | .coffeescript .title 157 | color: highlight-blue 158 | .keyword 159 | .javascript .function 160 | color: highlight-purple 161 | -------------------------------------------------------------------------------- /source/css/_partial/archive.styl: -------------------------------------------------------------------------------- 1 | .archives-wrap{ 2 | position: relative; 3 | margin: 0 30px; 4 | padding-right: 60px; 5 | border-bottom: 1px solid #eee; 6 | background: #fff; 7 | &:first-child{ 8 | margin-top: 30px; 9 | } 10 | &:last-child{ 11 | margin-bottom: 80px; 12 | } 13 | .archive-year-wrap{ 14 | line-height: 35px; 15 | width: 200px; 16 | position: absolute; 17 | padding-top: 15px; 18 | font-size: 1.8em; 19 | } 20 | .archive-year-wrap a{ 21 | color: #666; 22 | font-weight: bold; 23 | padding-left: 48px; 24 | } 25 | } 26 | 27 | .archives { 28 | position:relative; 29 | .article-info{ 30 | border: none; 31 | } 32 | .archive-article { 33 | margin-left:200px; 34 | padding:20px 0; 35 | border-bottom: 1px solid #eee; 36 | border-top: 1px solid #fff; 37 | position: relative; 38 | &:first-child{ 39 | border-top: none; 40 | } 41 | &:last-child{ 42 | border-bottom: none; 43 | } 44 | } 45 | 46 | .archive-article-title { 47 | font-size: 16px; 48 | color: #333; 49 | transition: color 0.3s; 50 | &:hover{ 51 | color: #657b83; 52 | } 53 | span{ 54 | display: block; 55 | color: #a8a8a8; 56 | font-size: 12px; 57 | line-height: 14px; 58 | height: 7px; 59 | padding-left: 2px; 60 | &:before{ 61 | display: inline-block; 62 | content: "“"; 63 | font-family: serif; 64 | font-size: 30px; 65 | float: left; 66 | margin: 4px 4px 0 -12px; 67 | color: #c8c8c8; 68 | } 69 | } 70 | } 71 | } 72 | 73 | .archive-article-inner{ 74 | .archive-article-header{ 75 | position: relative; 76 | } 77 | .article-meta{ 78 | position: relative; 79 | float: right; 80 | margin-top: -10px; 81 | color: #555; 82 | background: none; 83 | text-align: right; 84 | width: auto; 85 | .article-date{ 86 | time{ 87 | color: #aaa; 88 | } 89 | } 90 | .archive-article-date, .article-tag-list{ 91 | margin-right: 30px; 92 | display: -moz-inline-stack; 93 | display: inline-block; 94 | vertical-align: middle; 95 | zoom: 1; 96 | color: #666; 97 | font-size: 14px; 98 | } 99 | .archive-article-date{ 100 | cursor: default; 101 | font-size: 12px; 102 | margin-bottom: 5px; 103 | margin-top: -10px; 104 | time{ 105 | &:before { 106 | content: "\f073"; 107 | color: #999; 108 | position: relative; 109 | margin-right: 10px; 110 | font: 16px FontAwesome; 111 | } 112 | } 113 | } 114 | .article-category{ 115 | &:before{ 116 | float: left; 117 | margin-top: 1px; 118 | left: 15px; 119 | } 120 | .article-category-link{ 121 | width: auto; 122 | max-width: 83px; 123 | padding-left: 10px; 124 | } 125 | } 126 | .article-tag-list{ 127 | margin-top: 0px; 128 | &:before{ 129 | left: 15px; 130 | } 131 | .article-tag-list-item{ 132 | display: inline-block; 133 | width: auto; 134 | max-width: 83px; 135 | padding-left: 8px; 136 | font-size: 12px; 137 | } 138 | } 139 | } 140 | } 141 | 142 | .archives-wrap { 143 | background: rgba(255,255,255,.4); 144 | .archives { 145 | background: transparent; 146 | } 147 | } 148 | 149 | #back-to-top { 150 | cursor: pointer; 151 | position: fixed; 152 | right: 50px; 153 | top: -900px; 154 | z-index: 9; 155 | width: 70px; 156 | height: 900px; 157 | background: url(/img/scroll.png); 158 | transition: all 0.5s ease-in-out; 159 | } 160 | 161 | #back-to-top #rocket { 162 | margin: 8px; 163 | } 164 | 165 | #back-to-top #rocket path { 166 | transition: .5s; 167 | -o-transition: .5s; 168 | -moz-transition: .5s; 169 | -webkit-transition: .5s; 170 | } 171 | 172 | #back-to-top.red:hover #rocket path { 173 | fill: #92C0EF; 174 | } 175 | -------------------------------------------------------------------------------- /source/js/instagram.js: -------------------------------------------------------------------------------- 1 | var Instagram = (function(){ 2 | 3 | var _collection = []; 4 | 5 | var preLoad = function(data){ 6 | for(var em in data){ 7 | for(var i=0,len=data[em].srclist.length;i\ 22 | \ 23 | \ 24 | '; 25 | } 26 | $('

    '+data[em].year+''+data[em].month+'月

    \ 27 |
      '+liTmpl+'
    \ 28 |
    ').appendTo($(".instagram")); 29 | } 30 | 31 | $(".instagram").lazyload(); 32 | changeSize(); 33 | 34 | setTimeout(function(){ 35 | preLoad(data); 36 | },3000); 37 | 38 | $("a[rel=example_group]").fancybox(); 39 | } 40 | 41 | var replacer = function(str){ 42 | if(str.indexOf("outbound-distilleryimage") >= 0 ){ 43 | var cdnNum = str.match(/outbound-distilleryimage([\s\S]*?)\//)[1]; 44 | var arr = str.split("/"); 45 | return "http://distilleryimage"+cdnNum+".ak.instagram.com/"+arr[arr.length-1]; 46 | }else{ 47 | var url = "http://photos-g.ak.instagram.com/hphotos-ak-xpf1/"; 48 | var arr = str.split("/"); 49 | return url+arr[arr.length-1]; 50 | } 51 | } 52 | 53 | var ctrler = function(data){ 54 | var imgObj = {}; 55 | for(var i=0,len=data.length;i'; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('
      ' + list + '
    ').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var el = obj.group[ i ], 66 | href = thumbSource( el ); 67 | 68 | if (!href) { 69 | return; 70 | } 71 | 72 | $("").load(function () { 73 | var width = this.width, 74 | height = this.height, 75 | widthRatio, heightRatio, parent; 76 | 77 | if (!that.list || !width || !height) { 78 | return; 79 | } 80 | 81 | //Calculate thumbnail width/height and center it 82 | widthRatio = width / thumbWidth; 83 | heightRatio = height / thumbHeight; 84 | 85 | parent = that.list.children().eq(i).find('a'); 86 | 87 | if (widthRatio >= 1 && heightRatio >= 1) { 88 | if (widthRatio > heightRatio) { 89 | width = Math.floor(width / heightRatio); 90 | height = thumbHeight; 91 | 92 | } else { 93 | width = thumbWidth; 94 | height = Math.floor(height / widthRatio); 95 | } 96 | } 97 | 98 | $(this).css({ 99 | width : width, 100 | height : height, 101 | top : Math.floor(thumbHeight / 2 - height / 2), 102 | left : Math.floor(thumbWidth / 2 - width / 2) 103 | }); 104 | 105 | parent.width(thumbWidth).height(thumbHeight); 106 | 107 | $(this).hide().appendTo(parent).fadeIn(300); 108 | 109 | }) 110 | .attr('src', href) 111 | .attr('title', el.title); 112 | }); 113 | 114 | //Set initial width 115 | this.width = this.list.children().eq(0).outerWidth(true); 116 | 117 | 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))); 118 | }, 119 | 120 | beforeLoad: function (opts, obj) { 121 | //Remove self if gallery do not have at least two items 122 | if (obj.group.length < 2) { 123 | obj.helpers.thumbs = false; 124 | 125 | return; 126 | } 127 | 128 | //Increase bottom margin to give space for thumbs 129 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 130 | }, 131 | 132 | afterShow: function (opts, obj) { 133 | //Check if exists and create or update list 134 | if (this.list) { 135 | this.onUpdate(opts, obj); 136 | 137 | } else { 138 | this.init(opts, obj); 139 | } 140 | 141 | //Set active element 142 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 143 | }, 144 | 145 | //Center list 146 | onUpdate: function (opts, obj) { 147 | if (this.list) { 148 | this.list.stop(true).animate({ 149 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 150 | }, 150); 151 | } 152 | }, 153 | 154 | beforeClose: function () { 155 | if (this.wrap) { 156 | this.wrap.remove(); 157 | } 158 | 159 | this.wrap = null; 160 | this.list = null; 161 | this.width = 0; 162 | } 163 | } 164 | 165 | }(jQuery)); -------------------------------------------------------------------------------- /source/js/mobile.js: -------------------------------------------------------------------------------- 1 | define([], function(){ 2 | var _isShow = false; 3 | var $tag, $aboutme, $friends; 4 | 5 | var ctn,radio,scaleW,idx,basicwrap; 6 | 7 | //第一步 -- 初始化 8 | var reset = function() { 9 | //设定窗口比率 10 | radio = document.body.scrollHeight/document.body.scrollWidth; 11 | //设定一页的宽度 12 | scaleW = document.body.scrollWidth; 13 | //设定初始的索引值 14 | idx = 0; 15 | }; 16 | //第一步 -- 组合 17 | var combine = function(){ 18 | if($tag){ 19 | document.getElementById("js-mobile-tagcloud").innerHTML = $tag.innerHTML; 20 | } 21 | if($aboutme){ 22 | document.getElementById("js-mobile-aboutme").innerHTML = $aboutme.innerHTML; 23 | } 24 | if($friends){ 25 | document.getElementById("js-mobile-friends").innerHTML = $friends.innerHTML; 26 | } 27 | } 28 | //第三步 -- 根据数据渲染DOM 29 | var renderDOM = function(){ 30 | //生成节点 31 | var $viewer = document.createElement("div"); 32 | $viewer.id = "viewer"; 33 | $viewer.className = "hide"; 34 | $tag = document.getElementById("js-tagcloud"); 35 | $aboutme = document.getElementById("js-aboutme"); 36 | $friends = document.getElementById("js-friends"); 37 | var tagStr = $tag?'标签
    ':""; 38 | var friendsStr = $friends?'友情链接
    ':""; 39 | var aboutmeStr = $aboutme?'关于我
    ':""; 40 | 41 | $viewer.innerHTML = '
    \ 42 |
    \ 43 |
    '+aboutmeStr+friendsStr+tagStr+'
    \ 44 |
    \ 45 |
    \ 46 |
    '; 47 | 48 | //主要图片节点 49 | document.getElementsByTagName("body")[0].appendChild($viewer); 50 | var wrap = document.getElementById("viewer-box"); 51 | basicwrap = wrap; 52 | wrap.style.height = document.body.scrollHeight + 'px'; 53 | }; 54 | 55 | var show = function(target, idx){ 56 | document.getElementById("viewer").className = ""; 57 | setTimeout(function(){ 58 | basicwrap.className = "anm-swipe"; 59 | },0); 60 | _isShow = true; 61 | document.ontouchstart=function(e){ 62 | if(e.target.tagName != "A"){ 63 | return false; 64 | } 65 | } 66 | } 67 | 68 | var hide = function(){ 69 | document.getElementById("viewer-box").className = ""; 70 | _isShow = false; 71 | document.ontouchstart=function(){ 72 | return true; 73 | } 74 | } 75 | 76 | //第四步 -- 绑定 DOM 事件 77 | var bindDOM = function(){ 78 | var scaleW = scaleW; 79 | 80 | //滑动隐藏 81 | document.getElementById("viewer-box").addEventListener("webkitTransitionEnd", function(){ 82 | 83 | if(_isShow == false){ 84 | document.getElementById("viewer").className = "hide"; 85 | _isShow = true; 86 | }else{ 87 | } 88 | 89 | }, false); 90 | 91 | //点击展示和隐藏 92 | ctn.addEventListener("touchend", function(){ 93 | show(); 94 | }, false); 95 | 96 | var $right = document.getElementsByClassName("viewer-box-r")[0]; 97 | var touchStartTime; 98 | var touchEndTime; 99 | $right.addEventListener("touchstart", function(){ 100 | touchStartTime = + new Date(); 101 | }, false); 102 | $right.addEventListener("touchend", function(){ 103 | touchEndTime = + new Date(); 104 | if(touchEndTime - touchStartTime < 300){ 105 | hide(); 106 | } 107 | touchStartTime = 0; 108 | touchEndTime = 0; 109 | }, false); 110 | 111 | //滚动样式 112 | var $overlay = $("#mobile-nav .overlay"); 113 | var $header = $(".js-mobile-header"); 114 | window.onscroll = function(){ 115 | var scrollTop = document.documentElement.scrollTop + document.body.scrollTop; 116 | if(scrollTop >= 69){ 117 | $overlay.addClass("fixed"); 118 | }else{ 119 | $overlay.removeClass("fixed"); 120 | } 121 | if(scrollTop >= 160){ 122 | $header.removeClass("hide").addClass("fixed"); 123 | }else{ 124 | $header.addClass("hide").removeClass("fixed"); 125 | } 126 | }; 127 | $header[0].addEventListener("touchstart", function(){ 128 | $('html, body').animate({scrollTop:0}, 'slow'); 129 | }, false); 130 | }; 131 | 132 | var resetTags = function(){ 133 | var tags = $(".tagcloud a"); 134 | tags.css({"font-size": "12px"}); 135 | for(var i=0,len=tags.length; i -1, //IE内核 23 | presto: u.indexOf('Presto') > -1, //opera内核 24 | webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 25 | gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核 26 | mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端 27 | ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 28 | android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器 29 | iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者安卓QQ浏览器 30 | iPad: u.indexOf('iPad') > -1, //是否为iPad 31 | webApp: u.indexOf('Safari') == -1 ,//是否为web应用程序,没有头部与底部 32 | weixin: u.indexOf('MicroMessenger') == -1 //是否为微信浏览器 33 | }; 34 | }() 35 | } 36 | 37 | $(window).bind("resize", function(){ 38 | if(isMobileInit && isPCInit){ 39 | $(window).unbind("resize"); 40 | return; 41 | } 42 | var w = $(window).width(); 43 | if(w >= 700){ 44 | loadPC(); 45 | }else{ 46 | loadMobile(); 47 | } 48 | }); 49 | 50 | if(browser.versions.mobile === true || $(window).width() < 700){ 51 | loadMobile(); 52 | }else{ 53 | loadPC(); 54 | } 55 | 56 | //是否使用fancybox 57 | if(yiliaConfig.fancybox === true){ 58 | require(['/fancybox/jquery.fancybox.js'], function(pc){ 59 | var isFancy = $(".isFancy"); 60 | if(isFancy.length != 0){ 61 | var imgArr = $(".article-inner img"); 62 | for(var i=0,len=imgArr.length;i"); 66 | } 67 | $(".article-inner .fancy-ctn").fancybox(); 68 | } 69 | }); 70 | 71 | } 72 | //是否开启动画 73 | if(yiliaConfig.animate === true){ 74 | 75 | require(['/js/jquery.lazyload.js'], function(){ 76 | //avatar 77 | $(".js-avatar").attr("src", $(".js-avatar").attr("lazy-src")); 78 | $(".js-avatar")[0].onload = function(){ 79 | $(".js-avatar").addClass("show"); 80 | } 81 | }); 82 | 83 | if(yiliaConfig.isHome === true){ 84 | //content 85 | function showArticle(){ 86 | $(".article").each(function(){ 87 | if( $(this).offset().top <= $(window).scrollTop()+$(window).height() && !($(this).hasClass('show')) ) { 88 | $(this).removeClass("hidden").addClass("show"); 89 | $(this).addClass("is-hiddened"); 90 | }else{ 91 | if(!$(this).hasClass("is-hiddened")){ 92 | $(this).addClass("hidden"); 93 | } 94 | } 95 | }); 96 | } 97 | $(window).on('scroll', function(){ 98 | showArticle(); 99 | }); 100 | showArticle(); 101 | } 102 | 103 | } 104 | 105 | //是否新窗口打开链接 106 | if(yiliaConfig.open_in_new == true){ 107 | $(".article a[href]").attr("target", "_blank") 108 | } 109 | 110 | if($(".instagram").length) { 111 | require(['/js/photo.js', '/fancybox/jquery.fancybox.js', '/js/jquery.lazyload.js'], function(obj) { 112 | obj.init(); 113 | }); 114 | } 115 | 116 | var colorList = ["#6da336", "#ff945c", "#66CC66", "#99CC99", "#CC6666", "#76becc", "#c99979", "#918597", "#4d4d4d"]; 117 | var id = Math.ceil(Math.random()*(colorList.length-1)); 118 | //移动页面 119 | $("#container #mobile-nav .overlay").css({"background-color": colorList[id],"opacity": .7}); 120 | //PC页面 121 | $("#container .left-col .overlay").css({"background-color": colorList[id],"opacity": .3}); 122 | 123 | //随机背景图片 124 | var backgroundList = ["url(/background/bg-1.jpg)", "url(/background/bg-2.jpg)","url(/background/bg-3.jpg)","url(/background/bg-4.jpg)","url(/background/bg-5.jpg)","url(/background/bg-6.jpg)","url(/background/bg-7.jpg)","url(/background/bg-8.jpg)","url(/background/bg-9.jpg)","url(/background/bg-10.jpg)","url(/background/bg-11.jpg)","url(/background/bg-12.jpg)","url(/background/bg-13.jpg)","url(/background/bg-14.jpg)","url(/background/bg-15.jpg)","url(/background/bg-16.jpg)","url(/background/bg-17.jpg)","url(/background/bg-18.jpg)"]; 125 | var background = Math.floor(Math.random() * backgroundList.length); 126 | $("body").css({"background": backgroundList[background], "background-attachment": "fixed", "background-size": "cover"}); 127 | }); 128 | 129 | -------------------------------------------------------------------------------- /source/css/_partial/footer.styl: -------------------------------------------------------------------------------- 1 | #footer { 2 | font-size: 12px; 3 | font-family: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace; 4 | text-shadow: 0 1px #fff; 5 | position: absolute; 6 | bottom: 30px; 7 | opacity: 0.6; 8 | width: 100%; 9 | text-align: center; 10 | .outer{ 11 | padding: 0 30px; 12 | } 13 | } 14 | .footer-left{ 15 | float: left; 16 | } 17 | .footer-right{ 18 | float: right; 19 | } 20 | 21 | #footer-time { 22 | max-width: 100%; 23 | margin: 0 154px; 24 | position: relative; 25 | } 26 | 27 | .fa.fa-heart { 28 | color: red; 29 | } 30 | 31 | .my-face { 32 | animation: my-face 5s infinite ease-in-out; 33 | display: inline-block; 34 | margin: 0 5px; 35 | } 36 | 37 | @keyframes my-face { 38 | 2% { 39 | transform: translate(0, 1.5px) rotate(1.5deg); 40 | } 41 | 4% { 42 | transform: translate(0, -1.5px) rotate(-0.5deg); 43 | } 44 | 6% { 45 | transform: translate(0, 1.5px) rotate(-1.5deg); 46 | } 47 | 8% { 48 | transform: translate(0, -1.5px) rotate(-1.5deg); 49 | } 50 | 10% { 51 | transform: translate(0, 2.5px) rotate(1.5deg); 52 | } 53 | 12% { 54 | transform: translate(0, -0.5px) rotate(1.5deg); 55 | } 56 | 14% { 57 | transform: translate(0, -1.5px) rotate(1.5deg); 58 | } 59 | 16% { 60 | transform: translate(0, -0.5px) rotate(-1.5deg); 61 | } 62 | 18% { 63 | transform: translate(0, 0.5px) rotate(-1.5deg); 64 | } 65 | 20% { 66 | transform: translate(0, -1.5px) rotate(2.5deg); 67 | } 68 | 22% { 69 | transform: translate(0, 0.5px) rotate(-1.5deg); 70 | } 71 | 24% { 72 | transform: translate(0, 1.5px) rotate(1.5deg); 73 | } 74 | 26% { 75 | transform: translate(0, 0.5px) rotate(0.5deg); 76 | } 77 | 28% { 78 | transform: translate(0, 0.5px) rotate(1.5deg); 79 | } 80 | 30% { 81 | transform: translate(0, -0.5px) rotate(2.5deg); 82 | } 83 | 32% { 84 | transform: translate(0, 1.5px) rotate(-0.5deg); 85 | } 86 | 34% { 87 | transform: translate(0, 1.5px) rotate(-0.5deg); 88 | } 89 | 36% { 90 | transform: translate(0, -1.5px) rotate(2.5deg); 91 | } 92 | 38% { 93 | transform: translate(0, 1.5px) rotate(-1.5deg); 94 | } 95 | 40% { 96 | transform: translate(0, -0.5px) rotate(2.5deg); 97 | } 98 | 42% { 99 | transform: translate(0, 2.5px) rotate(-1.5deg); 100 | } 101 | 44% { 102 | transform: translate(0, 1.5px) rotate(0.5deg); 103 | } 104 | 46% { 105 | transform: translate(0, -1.5px) rotate(2.5deg); 106 | } 107 | 48% { 108 | transform: translate(0, -0.5px) rotate(0.5deg); 109 | } 110 | 50% { 111 | transform: translate(0, 0.5px) rotate(0.5deg); 112 | } 113 | 52% { 114 | transform: translate(0, 2.5px) rotate(2.5deg); 115 | } 116 | 54% { 117 | transform: translate(0, -1.5px) rotate(1.5deg); 118 | } 119 | 56% { 120 | transform: translate(0, 2.5px) rotate(2.5deg); 121 | } 122 | 58% { 123 | transform: translate(0, 0.5px) rotate(2.5deg); 124 | } 125 | 60% { 126 | transform: translate(0, 2.5px) rotate(2.5deg); 127 | } 128 | 62% { 129 | transform: translate(0, -0.5px) rotate(2.5deg); 130 | } 131 | 64% { 132 | transform: translate(0, -0.5px) rotate(1.5deg); 133 | } 134 | 66% { 135 | transform: translate(0, 1.5px) rotate(-0.5deg); 136 | } 137 | 68% { 138 | transform: translate(0, -1.5px) rotate(-0.5deg); 139 | } 140 | 70% { 141 | transform: translate(0, 1.5px) rotate(0.5deg); 142 | } 143 | 72% { 144 | transform: translate(0, 2.5px) rotate(1.5deg); 145 | } 146 | 74% { 147 | transform: translate(0, -0.5px) rotate(0.5deg); 148 | } 149 | 76% { 150 | transform: translate(0, -0.5px) rotate(2.5deg); 151 | } 152 | 78% { 153 | transform: translate(0, -0.5px) rotate(1.5deg); 154 | } 155 | 80% { 156 | transform: translate(0, 1.5px) rotate(1.5deg); 157 | } 158 | 82% { 159 | transform: translate(0, -0.5px) rotate(0.5deg); 160 | } 161 | 84% { 162 | transform: translate(0, 1.5px) rotate(2.5deg); 163 | } 164 | 86% { 165 | transform: translate(0, -1.5px) rotate(-1.5deg); 166 | } 167 | 88% { 168 | transform: translate(0, -0.5px) rotate(2.5deg); 169 | } 170 | 90% { 171 | transform: translate(0, 2.5px) rotate(-0.5deg); 172 | } 173 | 92% { 174 | transform: translate(0, 0.5px) rotate(-0.5deg); 175 | } 176 | 94% { 177 | transform: translate(0, 2.5px) rotate(0.5deg); 178 | } 179 | 96% { 180 | transform: translate(0, -0.5px) rotate(1.5deg); 181 | } 182 | 98% { 183 | transform: translate(0, -1.5px) rotate(-0.5deg); 184 | } 185 | 0%, 100% { 186 | transform: translate(0, 0) rotate(0deg); 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /source/webcomponent/github-card.html: -------------------------------------------------------------------------------- 1 | 131 | 132 | 188 | -------------------------------------------------------------------------------- /source/css/_partial/mobile.styl: -------------------------------------------------------------------------------- 1 | .left-col { 2 | display: none; 3 | } 4 | .mid-col { 5 | left: 0; 6 | } 7 | #header{ 8 | .header-nav{ 9 | position: relative; 10 | } 11 | } 12 | .header-author{ 13 | &.fixed{ 14 | position: fixed; 15 | top: -13px; 16 | width: 100%; 17 | color: #ddd; 18 | } 19 | } 20 | .overlay{ 21 | .slider-trigger{ 22 | position: absolute; 23 | z-index: 101; 24 | bottom: 0; 25 | left: 0; 26 | width: 42px; 27 | height: 42px; 28 | &:hover{ 29 | background: #444; 30 | } 31 | &:before{ 32 | color: #ddd; 33 | content: "\f00b"; 34 | font: 16px FontAwesome; 35 | width: 16px; 36 | height: 16px; 37 | margin-left: 9px; 38 | margin-top: 14px; 39 | display: block; 40 | } 41 | } 42 | } 43 | .article-header{ 44 | border-left: none; 45 | padding: 0; 46 | border-bottom: 1px dotted #ddd; 47 | h1{ 48 | margin-bottom: 10px; 49 | } 50 | } 51 | .header-subtitle{ 52 | padding: 0 24px; 53 | } 54 | 55 | .article-info-index.article-info{ 56 | padding-top: 10px; 57 | margin: 0; 58 | border-top: 1px solid #ddd; 59 | } 60 | .article-info-post.article-info{ 61 | margin: 0; 62 | padding-top: 10px; 63 | border: none; 64 | } 65 | .article-more-link{ 66 | a{ 67 | float:right; 68 | } 69 | } 70 | #viewer-box .viewer-box-l{ 71 | font-size: 14px; 72 | } 73 | .article{ 74 | padding: 10px; 75 | margin: 10px; 76 | font-size: 14px; 77 | .article-entry{ 78 | padding-left: 0; 79 | padding-right: 0; 80 | padding-top: 10px; 81 | } 82 | .article-title{ 83 | font-size: 18px; 84 | max-width: 185px; 85 | display: block; 86 | margin: 0; 87 | } 88 | .article-meta{ 89 | width: auto; 90 | height: 30px; 91 | margin-top: -5px; 92 | position: ralative; 93 | .article-date{ 94 | font-size: 12px; 95 | border-radius: 0; 96 | color: #666; 97 | background: none; 98 | height: auto; 99 | padding: 0; 100 | margin: 0; 101 | width: 100%; 102 | text-align: left; 103 | margin-left: 10px; 104 | time{ 105 | width: auto; 106 | float: right; 107 | margin-right: 10px; 108 | } 109 | } 110 | .article-tag-list{ 111 | margin-top: 7px; 112 | position: absolute; 113 | right: 10px; 114 | top: 0; 115 | &:before{ 116 | float: left; 117 | margin-top: 1px; 118 | left: 0; 119 | } 120 | .article-tag-list-item{ 121 | float: left; 122 | padding-left: 0; 123 | width: auto; 124 | max-width: 83px; 125 | } 126 | } 127 | .article-category{ 128 | margin-top: 7px; 129 | position: absolute; 130 | right: 10px; 131 | top: -30px; 132 | &:before{ 133 | float: left; 134 | margin-top: 1px; 135 | left: 15px; 136 | } 137 | .article-category-link{ 138 | max-width: 83px; 139 | width: auto; 140 | padding-left:10px; 141 | } 142 | } 143 | } 144 | .article-nav-link-wrap{ 145 | margin: 5px 0; 146 | strong{ 147 | float: left; 148 | margin-right: 5px; 149 | } 150 | } 151 | #article-nav-older{ 152 | float: none; 153 | display: block; 154 | } 155 | } 156 | .share{ 157 | padding: 3px 10px; 158 | } 159 | .duoshuo { 160 | padding: 0 13px; 161 | } 162 | #disqus_thread { 163 | padding: 0 13px; 164 | } 165 | 166 | #mobile-nav{ 167 | display: block; 168 | } 169 | 170 | #page-nav .extend{ 171 | opacity: 1; 172 | } 173 | 174 | .instagram .open-ins{ 175 | left: 2px; 176 | top: -30px; 177 | color: #aaa; 178 | } 179 | .info-on-right{ 180 | float: initial; 181 | } 182 | .archives-wrap{ 183 | margin: 10px 10px 0px; 184 | padding: 10px; 185 | .archive-article-title{ 186 | font-size: 14px; 187 | } 188 | .archive-year-wrap{ 189 | position: relative; 190 | padding: 0 0 0 0; 191 | a{ 192 | padding: 0 0 0 0; 193 | } 194 | } 195 | .article-meta{ 196 | .archive-article-date{ 197 | font-size: 12px; 198 | margin-right: 10px; 199 | margin-top: -5px; 200 | } 201 | .article-tag-list-link{ 202 | font-size: 12px; 203 | } 204 | } 205 | } 206 | .archives{ 207 | .archive-article{ 208 | padding: 10px 0; 209 | margin-left: 0; 210 | } 211 | } 212 | 213 | #footer { 214 | .footer-left{ 215 | float: initial; 216 | margin-bottom: 10px; 217 | } 218 | .footer-right{ 219 | float: initial; 220 | } 221 | } 222 | .copyright { 223 | margin: 0 0.5em; 224 | padding: .5em 1.3em; 225 | } -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | .fancybox-wrap, 3 | .fancybox-skin, 4 | .fancybox-outer, 5 | .fancybox-inner, 6 | .fancybox-image, 7 | .fancybox-wrap iframe, 8 | .fancybox-wrap object, 9 | .fancybox-nav, 10 | .fancybox-nav span, 11 | .fancybox-tmp 12 | { 13 | padding: 0; 14 | margin: 0; 15 | border: 0; 16 | outline: none; 17 | vertical-align: top; 18 | } 19 | 20 | .fancybox-wrap { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | z-index: 8020; 25 | } 26 | 27 | .fancybox-skin { 28 | position: relative; 29 | background: #f9f9f9; 30 | color: #444; 31 | text-shadow: none; 32 | -webkit-border-radius: 4px; 33 | -moz-border-radius: 4px; 34 | border-radius: 4px; 35 | } 36 | 37 | .fancybox-opened { 38 | z-index: 8030; 39 | } 40 | 41 | .fancybox-opened .fancybox-skin { 42 | -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 43 | -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 44 | box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 45 | } 46 | 47 | .fancybox-outer, .fancybox-inner { 48 | position: relative; 49 | } 50 | 51 | .fancybox-inner { 52 | overflow: hidden; 53 | } 54 | 55 | .fancybox-type-iframe .fancybox-inner { 56 | -webkit-overflow-scrolling: touch; 57 | } 58 | 59 | .fancybox-error { 60 | color: #444; 61 | font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 62 | margin: 0; 63 | padding: 15px; 64 | white-space: nowrap; 65 | } 66 | 67 | .fancybox-image, .fancybox-iframe { 68 | display: block; 69 | width: 100%; 70 | height: 100%; 71 | } 72 | 73 | .fancybox-image { 74 | max-width: 100%; 75 | max-height: 100%; 76 | } 77 | 78 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 79 | background-image: url(fancybox_sprite.png); 80 | } 81 | 82 | #fancybox-loading { 83 | position: fixed; 84 | top: 50%; 85 | left: 50%; 86 | margin-top: -22px; 87 | margin-left: -22px; 88 | background-position: 0 -108px; 89 | opacity: 0.8; 90 | cursor: pointer; 91 | z-index: 8060; 92 | } 93 | 94 | #fancybox-loading div { 95 | width: 44px; 96 | height: 44px; 97 | background: url(fancybox_loading.gif) center center no-repeat; 98 | } 99 | 100 | .fancybox-close { 101 | position: absolute; 102 | top: -18px; 103 | right: -18px; 104 | width: 36px; 105 | height: 36px; 106 | cursor: pointer; 107 | z-index: 8040; 108 | } 109 | 110 | .fancybox-nav { 111 | position: absolute; 112 | top: 0; 113 | width: 40%; 114 | height: 100%; 115 | cursor: pointer; 116 | text-decoration: none; 117 | background: transparent url(blank.gif); /* helps IE */ 118 | -webkit-tap-highlight-color: rgba(0,0,0,0); 119 | z-index: 8040; 120 | } 121 | 122 | .fancybox-prev { 123 | left: 0; 124 | } 125 | 126 | .fancybox-next { 127 | right: 0; 128 | } 129 | 130 | .fancybox-nav span { 131 | position: absolute; 132 | top: 50%; 133 | width: 36px; 134 | height: 34px; 135 | margin-top: -18px; 136 | cursor: pointer; 137 | z-index: 8040; 138 | visibility: hidden; 139 | } 140 | 141 | .fancybox-prev span { 142 | left: 10px; 143 | background-position: 0 -36px; 144 | } 145 | 146 | .fancybox-next span { 147 | right: 10px; 148 | background-position: 0 -72px; 149 | } 150 | 151 | .fancybox-nav:hover span { 152 | visibility: visible; 153 | } 154 | 155 | .fancybox-tmp { 156 | position: absolute; 157 | top: -99999px; 158 | left: -99999px; 159 | max-width: 99999px; 160 | max-height: 99999px; 161 | overflow: visible !important; 162 | } 163 | 164 | /* Overlay helper */ 165 | 166 | .fancybox-lock { 167 | overflow: visible !important; 168 | width: auto; 169 | } 170 | 171 | .fancybox-lock body { 172 | overflow: hidden !important; 173 | } 174 | 175 | .fancybox-lock-test { 176 | overflow-y: hidden !important; 177 | } 178 | 179 | .fancybox-overlay { 180 | position: absolute; 181 | top: 0; 182 | left: 0; 183 | overflow: hidden; 184 | display: none; 185 | z-index: 8010; 186 | background: url(fancybox_overlay.png); 187 | } 188 | 189 | .fancybox-overlay-fixed { 190 | position: fixed; 191 | bottom: 0; 192 | right: 0; 193 | } 194 | 195 | .fancybox-lock .fancybox-overlay { 196 | overflow: auto; 197 | overflow-y: scroll; 198 | } 199 | 200 | /* Title helper */ 201 | 202 | .fancybox-title { 203 | visibility: hidden; 204 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 205 | position: relative; 206 | text-shadow: none; 207 | z-index: 8050; 208 | } 209 | 210 | .fancybox-opened .fancybox-title { 211 | visibility: visible; 212 | } 213 | 214 | .fancybox-title-float-wrap { 215 | position: absolute; 216 | bottom: 0; 217 | right: 50%; 218 | margin-bottom: -35px; 219 | z-index: 8050; 220 | text-align: center; 221 | } 222 | 223 | .fancybox-title-float-wrap .child { 224 | display: inline-block; 225 | margin-right: -100%; 226 | padding: 2px 20px; 227 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 228 | background: rgba(0, 0, 0, 0.8); 229 | -webkit-border-radius: 15px; 230 | -moz-border-radius: 15px; 231 | border-radius: 15px; 232 | text-shadow: 0 1px 2px #222; 233 | color: #FFF; 234 | font-weight: bold; 235 | line-height: 24px; 236 | text-align: left; 237 | } 238 | 239 | .fancybox-title-outside-wrap { 240 | position: relative; 241 | margin-top: 10px; 242 | color: #fff; 243 | } 244 | 245 | .fancybox-title-inside-wrap { 246 | padding-top: 10px; 247 | } 248 | 249 | .fancybox-title-over-wrap { 250 | position: absolute; 251 | bottom: 0; 252 | left: 0; 253 | color: #fff; 254 | padding: 10px; 255 | background: #000; 256 | background: rgba(0, 0, 0, .8); 257 | } 258 | 259 | /*Retina graphics!*/ 260 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 261 | only screen and (min--moz-device-pixel-ratio: 1.5), 262 | only screen and (min-device-pixel-ratio: 1.5){ 263 | 264 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 265 | background-image: url(fancybox_sprite@2x.png); 266 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 267 | } 268 | 269 | #fancybox-loading div { 270 | background-image: url(fancybox_loading@2x.gif); 271 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 272 | } 273 | } -------------------------------------------------------------------------------- /source/fancybox/helpers/jquery.fancybox-media.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Media helper for fancyBox 3 | * version: 1.0.6 (Fri, 14 Jun 2013) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * media: true 10 | * } 11 | * }); 12 | * 13 | * Set custom URL parameters: 14 | * $(".fancybox").fancybox({ 15 | * helpers : { 16 | * media: { 17 | * youtube : { 18 | * params : { 19 | * autoplay : 0 20 | * } 21 | * } 22 | * } 23 | * } 24 | * }); 25 | * 26 | * Or: 27 | * $(".fancybox").fancybox({, 28 | * helpers : { 29 | * media: true 30 | * }, 31 | * youtube : { 32 | * autoplay: 0 33 | * } 34 | * }); 35 | * 36 | * Supports: 37 | * 38 | * Youtube 39 | * http://www.youtube.com/watch?v=opj24KnzrWo 40 | * http://www.youtube.com/embed/opj24KnzrWo 41 | * http://youtu.be/opj24KnzrWo 42 | * http://www.youtube-nocookie.com/embed/opj24KnzrWo 43 | * Vimeo 44 | * http://vimeo.com/40648169 45 | * http://vimeo.com/channels/staffpicks/38843628 46 | * http://vimeo.com/groups/surrealism/videos/36516384 47 | * http://player.vimeo.com/video/45074303 48 | * Metacafe 49 | * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 50 | * http://www.metacafe.com/watch/7635964/ 51 | * Dailymotion 52 | * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 53 | * Twitvid 54 | * http://twitvid.com/QY7MD 55 | * Twitpic 56 | * http://twitpic.com/7p93st 57 | * Instagram 58 | * http://instagr.am/p/IejkuUGxQn/ 59 | * http://instagram.com/p/IejkuUGxQn/ 60 | * Google maps 61 | * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 62 | * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 63 | * 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 64 | */ 65 | ;(function ($) { 66 | "use strict"; 67 | 68 | //Shortcut for fancyBox object 69 | var F = $.fancybox, 70 | format = function( url, rez, params ) { 71 | params = params || ''; 72 | 73 | if ( $.type( params ) === "object" ) { 74 | params = $.param(params, true); 75 | } 76 | 77 | $.each(rez, function(key, value) { 78 | url = url.replace( '$' + key, value || '' ); 79 | }); 80 | 81 | if (params.length) { 82 | url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 83 | } 84 | 85 | return url; 86 | }; 87 | 88 | //Add helper object 89 | F.helpers.media = { 90 | defaults : { 91 | youtube : { 92 | matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 93 | params : { 94 | autoplay : 1, 95 | autohide : 1, 96 | fs : 1, 97 | rel : 0, 98 | hd : 1, 99 | wmode : 'opaque', 100 | enablejsapi : 1 101 | }, 102 | type : 'iframe', 103 | url : '//www.youtube.com/embed/$3' 104 | }, 105 | vimeo : { 106 | matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 107 | params : { 108 | autoplay : 1, 109 | hd : 1, 110 | show_title : 1, 111 | show_byline : 1, 112 | show_portrait : 0, 113 | fullscreen : 1 114 | }, 115 | type : 'iframe', 116 | url : '//player.vimeo.com/video/$1' 117 | }, 118 | metacafe : { 119 | matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 120 | params : { 121 | autoPlay : 'yes' 122 | }, 123 | type : 'swf', 124 | url : function( rez, params, obj ) { 125 | obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 126 | 127 | return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 128 | } 129 | }, 130 | dailymotion : { 131 | matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 132 | params : { 133 | additionalInfos : 0, 134 | autoStart : 1 135 | }, 136 | type : 'swf', 137 | url : '//www.dailymotion.com/swf/video/$1' 138 | }, 139 | twitvid : { 140 | matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 141 | params : { 142 | autoplay : 0 143 | }, 144 | type : 'iframe', 145 | url : '//www.twitvid.com/embed.php?guid=$1' 146 | }, 147 | twitpic : { 148 | matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 149 | type : 'image', 150 | url : '//twitpic.com/show/full/$1/' 151 | }, 152 | instagram : { 153 | matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 154 | type : 'image', 155 | url : '//$1/p/$2/media/?size=l' 156 | }, 157 | google_maps : { 158 | matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 159 | type : 'iframe', 160 | url : function( rez ) { 161 | return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 162 | } 163 | } 164 | }, 165 | 166 | beforeLoad : function(opts, obj) { 167 | var url = obj.href || '', 168 | type = false, 169 | what, 170 | item, 171 | rez, 172 | params; 173 | 174 | for (what in opts) { 175 | if (opts.hasOwnProperty(what)) { 176 | item = opts[ what ]; 177 | rez = url.match( item.matcher ); 178 | 179 | if (rez) { 180 | type = item.type; 181 | params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 182 | 183 | url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 184 | 185 | break; 186 | } 187 | } 188 | } 189 | 190 | if (type) { 191 | obj.href = url; 192 | obj.type = type; 193 | 194 | obj.autoHeight = false; 195 | } 196 | } 197 | }; 198 | 199 | }(jQuery)); -------------------------------------------------------------------------------- /source/js/jquery.lazyload.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author littenli 3 | * @date 2014-03-10 version 0.2 4 | * @description 图片延时加载,裂图替换,图片错误上报处理 5 | * @update 增加非可视区域延时加载 6 | * @example $(".container").lazy(options); 7 | * 遍历$(".container")节点内的img节点,都应用lazyload;若此节点为img节点,只应用此节点 8 | * options.srcSign {String} 可为空.img节点约定的src标志,默认为lazy-src;响应img节点为: 9 | * options.errCallBack {Function} 可为空.提供img加载失败回调,供业务额外去处理加载失败逻辑 10 | * options.container {Dom} 提供容器节点内可视区域的加载能力,默认为window 11 | */ 12 | (function (root, factory) { 13 | if (typeof define === 'function' && define.amd) { 14 | define(['jquery'], factory); 15 | } else { 16 | factory(root['jQuery']); 17 | } 18 | }(this, function ($) { 19 | 20 | $.fn.lazyload = function(options) { 21 | return this.each(function() { 22 | 23 | options = options || {}; 24 | var defualts = {}; 25 | 26 | var opts = $.extend({}, defualts, options); 27 | var obj = $(this); 28 | var dom = this; 29 | 30 | var srcSign = options.srcSign || "lazy-src"; 31 | var errCallBack = options.errCallBack || function(){}; 32 | var container = options.container || $(window); 33 | 34 | /** 35 | * @description src正常 36 | */ 37 | var imgload = function (e, target) { 38 | //todo: 上报 39 | } 40 | 41 | /** 42 | * @description src失效 43 | */ 44 | var imgerr = function (e, target, fn, src) { 45 | if(target[0].src && (target[0].src.indexOf("img-err.png")>0 || target[0].src.indexOf("img-err2.png")>0)){ 46 | return ; 47 | } 48 | var w = target.width(); 49 | var h = target.height(); 50 | target[0].src = "/img/img-err.png"; 51 | 52 | fn(); 53 | //todo: 上报 54 | }; 55 | 56 | var tempImg = function(target){ 57 | var w = target.width(); 58 | var h = target.height(); 59 | var t = target.offset().top; 60 | var l = target.offset().left; 61 | var tempDom = target.clone().addClass("lazy-loding").insertBefore(target); 62 | tempDom[0].src = "/img/img-loading.png"; 63 | target.hide(); 64 | } 65 | /** 66 | * @description src替换,loading过程中添加类lazy-loading; 67 | */ 68 | var setSrc = function(target, srcSign, errCallBack){ 69 | 70 | if(target.attr("src"))return ; 71 | 72 | if(options.cache == true){ 73 | console.log(target); 74 | //存进localstorage 75 | var canvas1 = document.getElementById('canvas1'); 76 | var ctx1 = canvas1.getContext('2d'); 77 | var imageData; 78 | 79 | image = new Image(); 80 | image.src = target.attr(srcSign); 81 | image.onload=function(){ 82 | ctx1.drawImage(image,0,0); 83 | imageData = ctx1.getImageData(0,0,500,250); 84 | console.log(imageData); 85 | } 86 | 87 | }else{ 88 | tempImg(target); 89 | 90 | var src = target.attr(srcSign); 91 | target[0].onerror = function (e) { 92 | imgerr(e, target, errCallBack, src); 93 | }; 94 | target[0].onload = function (e) { 95 | target.parent().find(".lazy-loding").remove(); 96 | target.show(); 97 | imgload(e, target); 98 | } 99 | target[0].src = src; 100 | } 101 | } 102 | 103 | /** 104 | * @description 重组 105 | */ 106 | opts.cache = []; 107 | 108 | if(dom.tagName == "IMG"){ 109 | var data = { 110 | obj: obj, 111 | tag: "img", 112 | url: obj.attr(srcSign) 113 | }; 114 | opts.cache.push(data); 115 | }else{ 116 | var imgArr = obj.find("img"); 117 | imgArr.each(function(index) { 118 | var node = this.nodeName.toLowerCase(), url = $(this).attr(srcSign); 119 | //重组 120 | var data = { 121 | obj: imgArr.eq(index), 122 | tag: node, 123 | url: url 124 | }; 125 | opts.cache.push(data); 126 | }); 127 | } 128 | 129 | 130 | //动态显示数据 131 | var scrollHandle = function() { 132 | var contHeight = container.height(); 133 | var contop; 134 | if ($(window).get(0) === window) { 135 | contop = $(window).scrollTop(); 136 | } else { 137 | contop = container.offset().top; 138 | } 139 | $.each(opts.cache, function(i, data) { 140 | var o = data.obj, tag = data.tag, url = data.url, post, posb; 141 | if (o) { 142 | post = o.offset().top - contop, post + o.height(); 143 | 144 | if ((post >= 0 && post < contHeight) || (posb > 0 && posb <= contHeight)) { 145 | if (url) { 146 | //在浏览器窗口内 147 | if (tag === "img") { 148 | //改变src 149 | setSrc(o, srcSign, errCallBack); 150 | } 151 | } 152 | data.obj = null; 153 | } 154 | } 155 | }); 156 | } 157 | 158 | //加载完毕即执行 159 | scrollHandle(); 160 | //滚动执行 161 | container.bind("scroll", scrollHandle); 162 | container.bind("resize", scrollHandle); 163 | 164 | }); 165 | }; 166 | 167 | })); 168 | -------------------------------------------------------------------------------- /source/js/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v1.4.3 3 | * https://zenorocha.github.io/clipboard.js 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,i){function o(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return o(n?n:t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;ai;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],o=[];if(i&&e)for(var r=0,a=i.length;a>r;r++)i[r].fn!==e&&i[r].fn._!==e&&o.push(i[r]);return o.length?n[t]=o:delete n[t],this}},e.exports=i},{}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var r=function(){function t(t,e){for(var n=0;n'+".github-box *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}"+".github-box{font-family:helvetica,arial,sans-serif;font-size:13px;line-height:18px;background:#fafafa;border:1px solid #ddd;color:#666;border-radius:3px}"+".github-box a{color:#4183c4;border:0;text-decoration:none}"+".github-box .github-box-title{position:relative;border-bottom:1px solid #ddd;border-radius:3px 3px 0 0;background:#fcfcfc;background:-moz-linear-gradient(#fcfcfc,#ebebeb);background:-webkit-linear-gradient(#fcfcfc,#ebebeb);}"+".github-box .github-box-title h3{word-wrap:break-word;font-family:helvetica,arial,sans-serif;font-weight:normal;font-size:16px;color:gray;margin:0;padding:10px 10px 10px 30px;background:url("+n+") 7px center no-repeat; width: auto;}"+".github-box .github-box-title h3 .repo{font-weight:bold}"+".github-box .github-box-title .github-stats{float:right;position:absolute;top:8px;right:10px;font-size:11px;font-weight:bold;line-height:21px;height:auto;min-height:21px}"+".github-box .github-box-title .github-stats a{display:inline-block;height:21px;color:#666;border:1px solid #ddd;border-radius:3px;padding:0 5px 0 18px;background: white url("+r+") no-repeat}"+".github-box .github-box-title .github-stats .watchers{border-right:1px solid #ddd}"+".github-box .github-box-title .github-stats .forks{background-position:-4px -21px;padding-left:15px}"+".github-box .github-box-content{padding:10px;font-weight:300}"+".github-box .github-box-content p{margin:0}"+".github-box .github-box-content .link{font-weight:bold}"+".github-box .github-box-download{position:relative;border-top:1px solid #ddd;background:white;border-radius:0 0 3px 3px;padding:10px;height:auto;min-height:24px;}"+".github-box .github-box-download .updated{word-wrap:break-word;margin:0;font-size:11px;color:#666;line-height:24px;font-weight:300;width:auto}"+".github-box .github-box-download .updated strong{font-weight:bold;color:#000}"+".github-box .github-box-download .download{float:right;position:absolute;top:10px;right:10px;height:24px;line-height:24px;font-size:12px;color:#666;font-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,0.9);padding:0 10px;border:1px solid #ddd;border-bottom-color:#bbb;border-radius:3px;background:#f5f5f5;background:-moz-linear-gradient(#f5f5f5,#e5e5e5);background:-webkit-linear-gradient(#f5f5f5,#e5e5e5);}"+".github-box .github-box-download .download:hover{color:#527894;border-color:#cfe3ed;border-bottom-color:#9fc7db;background:#f1f7fa;background:-moz-linear-gradient(#f1f7fa,#dbeaf1);background:-webkit-linear-gradient(#f1f7fa,#dbeaf1);}"+"@media (max-width: 767px) {"+".github-box .github-box-title{height:auto;min-height:60px}"+".github-box .github-box-title h3 .repo{display:block}"+".github-box .github-box-title .github-stats a{display:block;clear:right;float:right;}"+".github-box .github-box-download{height:auto;min-height:46px;}"+".github-box .github-box-download .download{top:32px;}"+"}"+"");t++;var s=e(this),o,u=s.data("repo"),a=u.split("/")[0],f=u.split("/")[1],l="http://github.com/"+a,c="http://github.com/"+a+"/"+f;o=e('
    '+'
    '+"

    "+''+a+""+"/"+''+f+""+"

    "+'
    '+'?'+'?'+"
    "+"
    "+'
    '+'

    Read More

    '+''+"
    "+'"+"
    ");o.appendTo(s);e.ajax({url:"https://api.github.com/repos/"+u,dataType:"jsonp",success:function(t){var n=t.data,r,i="unknown";if(n.pushed_at){r=new Date(n.pushed_at);i=r.getMonth()+1+"-"+r.getDate()+"-"+r.getFullYear()}o.find(".watchers").text(n.watchers);o.find(".forks").text(n.forks);o.find(".description span").text(n.description);o.find(".updated").html("Latest commit to the "+n.default_branch+" branch on "+i);if(n.homepage!=null)o.find(".link").append(e("").attr("href",n.homepage).text(n.homepage))}})})}); -------------------------------------------------------------------------------- /source/css/_partial/main.styl: -------------------------------------------------------------------------------- 1 | #container{ 2 | position:relative; 3 | min-height:100%; 4 | #mobile-nav{ 5 | display: none; 6 | .overlay{ 7 | height: 110px; 8 | position: absolute; 9 | width: 100%; 10 | background: #4d4d4d; 11 | &.fixed{ 12 | position: fixed; 13 | height: 42px; 14 | z-index: 99; 15 | } 16 | } 17 | #header{ 18 | padding: 10px 0 0 0; 19 | .profilepic{ 20 | display: block; 21 | position: relative; 22 | z-index: 100; 23 | } 24 | .header-menu{ 25 | height: auto; 26 | margin: 10px; 27 | ul{ 28 | text-align: center; 29 | cursor: default; 30 | } 31 | li{ 32 | display: inline-block; 33 | margin: 3px; 34 | } 35 | } 36 | } 37 | } 38 | .left-col { 39 | background: #fff; 40 | width: 300px; 41 | position:fixed; 42 | opacity:1; 43 | transition:all .2s ease-in; 44 | height:100%; 45 | 46 | .overlay{ 47 | width: 100%; 48 | height: 180px; 49 | background-color: black; 50 | position: absolute; 51 | opacity: 0.7; 52 | } 53 | 54 | .intrude-less { 55 | width: 76%; 56 | text-align: center; 57 | margin: 112px auto 0; 58 | } 59 | } 60 | .mid-col { 61 | position:absolute; 62 | right:0; 63 | min-height:100%; 64 | background:#eaeaea; 65 | left: 300px; 66 | width: auto; 67 | } 68 | 69 | @media screen and (max-width:1040px) { 70 | 71 | }@media screen and (max-width:800px) { 72 | @import "_partial/mobile" 73 | } 74 | } 75 | .header-author{ 76 | text-align: center; 77 | margin: 0.67em 0; 78 | font-family: Roboto, "Roboto", serif; 79 | font-size: 30px; 80 | transition: 0.3s; 81 | } 82 | #header{ 83 | width:100%; 84 | a { 85 | color: #696969; 86 | &:hover { 87 | color: #B0A0AA; 88 | } 89 | } 90 | .profilepic{ 91 | text-align: center; 92 | display: block; 93 | border: 5px solid #fff; 94 | border-radius: 300px; 95 | width: 128px; 96 | height: 128px; 97 | margin: 0 auto; 98 | position: relative; 99 | overflow: hidden; 100 | background: #88acdb; 101 | -webkit-transition: all 0.2s ease-in; 102 | display: -webkit-box; 103 | -webkit-box-orient: horizontal; 104 | -webkit-box-pack: center; 105 | -webkit-box-align: center; 106 | text-align: center; 107 | img{ 108 | width: 20%; 109 | height: 20%; 110 | border-radius: 300px; 111 | opacity: 0; 112 | -webkit-transition: all 0.2s ease-in; 113 | &.show{ 114 | width: 100%; 115 | height: 100%; 116 | opacity: 1; 117 | } 118 | } 119 | } 120 | .header-subtitle{ 121 | text-align: center; 122 | color:#999; 123 | font-size: 14px; 124 | line-height: 25px; 125 | overflow: hidden; 126 | text-overflow: ellipsis; 127 | display: -webkit-box; 128 | -webkit-line-clamp: 2; 129 | -webkit-box-orient: vertical; 130 | } 131 | .header-menu{ 132 | font-weight: 300; 133 | line-height: 31px; 134 | cursor: pointer; 135 | text-transform: uppercase; 136 | float:none; 137 | height: 150px; 138 | margin-left: -12px; 139 | text-align: center; 140 | display: -webkit-box; 141 | -webkit-box-orient: horizontal; 142 | -webkit-box-pack: center; 143 | -webkit-box-align: center; 144 | li{ 145 | cursor: default; 146 | a{ 147 | font-size: 14px; 148 | min-width: 300px; 149 | } 150 | } 151 | } 152 | .switch-area{ 153 | position: relative; 154 | width: 100%; 155 | overflow: hidden; 156 | min-height: 500px; 157 | font-size: 14px; 158 | .switch-wrap{ 159 | transition: transform .3s ease-in; 160 | position: relative; 161 | } 162 | } 163 | .turn-left{ 164 | transform: translate(-100%, 0 ); 165 | } 166 | .header-nav{ 167 | width: 100%; 168 | position: absolute; 169 | transition: transform .3s ease-in; 170 | .social { 171 | margin-right:15px; 172 | margin-top:10px; 173 | text-align: center; 174 | a { 175 | border-radius:50%; 176 | display:-moz-inline-stack; 177 | display:inline-block; 178 | vertical-align:middle; 179 | *vertical-align:auto; 180 | zoom:1; 181 | *display:inline; 182 | text-indent:-9999px; 183 | margin:0 8px 15px 8px; 184 | opacity:0.7; 185 | width:28px; 186 | height:28px; 187 | transition:0.3s; 188 | &:hover { 189 | opacity:1 190 | } 191 | } 192 | a:last-of-type { 193 | margin-right:0 194 | } 195 | a.weibo { 196 | background:url('/img/weibo.png') center no-repeat #aaaaff; 197 | border:1px solid #aaaaff; 198 | &:hover { 199 | border:1px solid #aaaaff; 200 | } 201 | } 202 | a.rss { 203 | background:url('/img/rss.png') center no-repeat #ef7522; 204 | border:1px solid #ef7522; 205 | &:hover { 206 | border:1px solid #cf5d0f; 207 | } 208 | } 209 | a.github { 210 | background:url('/img/github.png') center no-repeat #afb6ca; 211 | border:1px solid #afb6ca; 212 | &:hover { 213 | border:1px solid #909ab6; 214 | } 215 | } 216 | a.facebook { 217 | background:url('/img/facebook.png') center no-repeat #3b5998; 218 | border:1px solid #3b5998; 219 | &:hover { 220 | border:1px solid #2d4373; 221 | } 222 | } 223 | a.google { 224 | background:url('/img/google.png') center no-repeat #c83d20; 225 | border:1px solid #c83d20; 226 | &:hover { 227 | border:1px solid #9c3019; 228 | } 229 | } 230 | a.twitter { 231 | background:url('/img/twitter.png') center no-repeat #55cff8; 232 | border:1px solid #55cff8; 233 | &:hover { 234 | border:1px solid #24c1f6; 235 | } 236 | } 237 | a.linkedin { 238 | background:url('/img/linkedin.png') center no-repeat #005a87; 239 | border:1px solid #005a87; 240 | &:hover { 241 | border:1px solid #006b98; 242 | } 243 | } 244 | a.zhihu { 245 | background:url('/img/zhihu.png') center no-repeat #0078d8; 246 | border:1px solid #0078d8; 247 | &:hover { 248 | border:1px solid #0078d8; 249 | } 250 | } 251 | a.douban { 252 | background:url('/img/douban.png') center no-repeat #06c611; 253 | border:1px solid #06c611; 254 | &:hover { 255 | border:1px solid #06c611; 256 | } 257 | } 258 | a.mail { 259 | background:url('/img/mail.png') center no-repeat #005a87; 260 | border:1px solid #005a87; 261 | &:hover { 262 | border:1px solid #006b98; 263 | } 264 | } 265 | a.jianshu { 266 | background:url('/img/jianshu.png') center no-repeat #D49085; 267 | border:1px solid #D49085; 268 | &:hover { 269 | border:1px solid #B97D72; 270 | } 271 | } 272 | a.wymusic { 273 | background:url('/img/wymusic.png') center no-repeat #E30100; 274 | border:1px solid #E30100; 275 | &:hover { 276 | border:1px solid #FF0100; 277 | } 278 | } 279 | } 280 | } 281 | .switch-part{ 282 | width: 100%; 283 | position: absolute; 284 | } 285 | .switch-part1{ 286 | left: 0; 287 | } 288 | .switch-part2{ 289 | left: 100%; 290 | top: 20px; 291 | overlay-x: hidden; 292 | overflow-y: auto; 293 | max-height: 200px; 294 | } 295 | .switch-part3{ 296 | left: 200%; 297 | line-height: 30px; 298 | .switch-friends-link{ 299 | margin-right: 9px; 300 | border-radius: 3px; 301 | padding: 5px; 302 | &:hover{ 303 | background: #88acdb; 304 | color: #fff; 305 | } 306 | } 307 | } 308 | .switch-part4{ 309 | left: 300%; 310 | text-align: left; 311 | line-height: 30px; 312 | } 313 | } 314 | 315 | .duoshuo{ 316 | padding: 0 40px; 317 | } 318 | 319 | #disqus_thread{ 320 | padding: 0 40px; 321 | } 322 | 323 | 324 | /*MOxFIVE's color schemes*/ 325 | body { 326 | background-size:cover; 327 | } 328 | #container .left-col { 329 | background-color: rgba(255,255,255,.85); 330 | } 331 | #container .mid-col { 332 | background-color: rgba(255,255,255,.8); 333 | } 334 | .overlay { 335 | opacity: 0; 336 | } 337 | .player { 338 | opacity: 0.5; 339 | } 340 | .player:hover { 341 | opacity: .9; 342 | }; -------------------------------------------------------------------------------- /source/css/_util/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.1 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. 29 | * Correct `block` display not defined for `main` in IE 11. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | hgroup, 40 | main, 41 | nav, 42 | section, 43 | summary { 44 | display: block; 45 | } 46 | 47 | /** 48 | * 1. Correct `inline-block` display not defined in IE 8/9. 49 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 50 | */ 51 | 52 | audio, 53 | canvas, 54 | progress, 55 | video { 56 | display: inline-block; /* 1 */ 57 | vertical-align: baseline; /* 2 */ 58 | } 59 | 60 | /** 61 | * Prevent modern browsers from displaying `audio` without controls. 62 | * Remove excess height in iOS 5 devices. 63 | */ 64 | 65 | audio:not([controls]) { 66 | display: none; 67 | height: 0; 68 | } 69 | 70 | /** 71 | * Address `[hidden]` styling not present in IE 8/9/10. 72 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 73 | */ 74 | 75 | [hidden], 76 | template { 77 | display: none; 78 | } 79 | 80 | /* Links 81 | ========================================================================== */ 82 | 83 | /** 84 | * Remove the gray background color from active links in IE 10. 85 | */ 86 | 87 | a { 88 | background: transparent; 89 | } 90 | 91 | /** 92 | * Improve readability when focused and also mouse hovered in all browsers. 93 | */ 94 | 95 | a:active, 96 | a:hover { 97 | outline: 0; 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 105 | */ 106 | 107 | abbr[title] { 108 | border-bottom: 1px dotted; 109 | } 110 | 111 | /** 112 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 113 | */ 114 | 115 | b, 116 | strong { 117 | font-weight: bold; 118 | } 119 | 120 | /** 121 | * Address styling not present in Safari and Chrome. 122 | */ 123 | 124 | dfn { 125 | font-style: italic; 126 | } 127 | 128 | /** 129 | * Address variable `h1` font-size and margin within `section` and `article` 130 | * contexts in Firefox 4+, Safari, and Chrome. 131 | */ 132 | 133 | h1 { 134 | font-size: 2em; 135 | margin: 0.67em 0; 136 | } 137 | 138 | /** 139 | * Address styling not present in IE 8/9. 140 | */ 141 | 142 | mark { 143 | background: #ff0; 144 | color: #000; 145 | } 146 | 147 | /** 148 | * Address inconsistent and variable font size in all browsers. 149 | */ 150 | 151 | small { 152 | font-size: 80%; 153 | } 154 | 155 | /** 156 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 157 | */ 158 | 159 | sub, 160 | sup { 161 | font-size: 75%; 162 | line-height: 0; 163 | position: relative; 164 | vertical-align: baseline; 165 | } 166 | 167 | sup { 168 | top: -0.5em; 169 | } 170 | 171 | sub { 172 | bottom: -0.25em; 173 | } 174 | 175 | /* Embedded content 176 | ========================================================================== */ 177 | 178 | /** 179 | * Remove border when inside `a` element in IE 8/9/10. 180 | */ 181 | 182 | img { 183 | border: 0; 184 | } 185 | 186 | /** 187 | * Correct overflow not hidden in IE 9/10/11. 188 | */ 189 | 190 | svg:not(:root) { 191 | overflow: hidden; 192 | } 193 | 194 | /* Grouping content 195 | ========================================================================== */ 196 | 197 | /** 198 | * Address margin not present in IE 8/9 and Safari. 199 | */ 200 | 201 | figure { 202 | margin: 1em 40px; 203 | } 204 | 205 | /** 206 | * Address differences between Firefox and other browsers. 207 | */ 208 | 209 | hr { 210 | -moz-box-sizing: content-box; 211 | box-sizing: content-box; 212 | height: 0; 213 | } 214 | 215 | /** 216 | * Contain overflow in all browsers. 217 | */ 218 | 219 | pre { 220 | overflow: auto; 221 | } 222 | 223 | /** 224 | * Address odd `em`-unit font size rendering in all browsers. 225 | */ 226 | 227 | code, 228 | kbd, 229 | pre, 230 | samp { 231 | font-family: monospace, monospace; 232 | font-size: 1em; 233 | } 234 | 235 | /* Forms 236 | ========================================================================== */ 237 | 238 | /** 239 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 240 | * styling of `select`, unless a `border` property is set. 241 | */ 242 | 243 | /** 244 | * 1. Correct color not being inherited. 245 | * Known issue: affects color of disabled elements. 246 | * 2. Correct font properties not being inherited. 247 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 248 | */ 249 | 250 | button, 251 | input, 252 | optgroup, 253 | select, 254 | textarea { 255 | color: inherit; /* 1 */ 256 | font: inherit; /* 2 */ 257 | margin: 0; /* 3 */ 258 | } 259 | 260 | /** 261 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 262 | */ 263 | 264 | button { 265 | overflow: visible; 266 | } 267 | 268 | /** 269 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 270 | * All other form control elements do not inherit `text-transform` values. 271 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 272 | * Correct `select` style inheritance in Firefox. 273 | */ 274 | 275 | button, 276 | select { 277 | text-transform: none; 278 | } 279 | 280 | /** 281 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 282 | * and `video` controls. 283 | * 2. Correct inability to style clickable `input` types in iOS. 284 | * 3. Improve usability and consistency of cursor style between image-type 285 | * `input` and others. 286 | */ 287 | 288 | button, 289 | html input[type="button"], /* 1 */ 290 | input[type="reset"], 291 | input[type="submit"] { 292 | -webkit-appearance: button; /* 2 */ 293 | cursor: pointer; /* 3 */ 294 | } 295 | 296 | /** 297 | * Re-set default cursor for disabled elements. 298 | */ 299 | 300 | button[disabled], 301 | html input[disabled] { 302 | cursor: default; 303 | } 304 | 305 | /** 306 | * Remove inner padding and border in Firefox 4+. 307 | */ 308 | 309 | button::-moz-focus-inner, 310 | input::-moz-focus-inner { 311 | border: 0; 312 | padding: 0; 313 | } 314 | 315 | /** 316 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 317 | * the UA stylesheet. 318 | */ 319 | 320 | input { 321 | line-height: normal; 322 | } 323 | 324 | /** 325 | * It's recommended that you don't attempt to style these elements. 326 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 327 | * 328 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 329 | * 2. Remove excess padding in IE 8/9/10. 330 | */ 331 | 332 | input[type="checkbox"], 333 | input[type="radio"] { 334 | box-sizing: border-box; /* 1 */ 335 | padding: 0; /* 2 */ 336 | } 337 | 338 | /** 339 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 340 | * `font-size` values of the `input`, it causes the cursor style of the 341 | * decrement button to change from `default` to `text`. 342 | */ 343 | 344 | input[type="number"]::-webkit-inner-spin-button, 345 | input[type="number"]::-webkit-outer-spin-button { 346 | height: auto; 347 | } 348 | 349 | /** 350 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 351 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 352 | * (include `-moz` to future-proof). 353 | */ 354 | 355 | input[type="search"] { 356 | -webkit-appearance: textfield; /* 1 */ 357 | -moz-box-sizing: content-box; 358 | -webkit-box-sizing: content-box; /* 2 */ 359 | box-sizing: content-box; 360 | } 361 | 362 | /** 363 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 364 | * Safari (but not Chrome) clips the cancel button when the search input has 365 | * padding (and `textfield` appearance). 366 | */ 367 | 368 | input[type="search"]::-webkit-search-cancel-button, 369 | input[type="search"]::-webkit-search-decoration { 370 | -webkit-appearance: none; 371 | } 372 | 373 | /** 374 | * Define consistent border, margin, and padding. 375 | */ 376 | 377 | fieldset { 378 | border: 1px solid #c0c0c0; 379 | margin: 0 2px; 380 | padding: 0.35em 0.625em 0.75em; 381 | } 382 | 383 | /** 384 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 385 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 386 | */ 387 | 388 | legend { 389 | border: 0; /* 1 */ 390 | padding: 0; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove default vertical scrollbar in IE 8/9/10/11. 395 | */ 396 | 397 | textarea { 398 | overflow: auto; 399 | } 400 | 401 | /** 402 | * Don't inherit the `font-weight` (applied by a rule above). 403 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 404 | */ 405 | 406 | optgroup { 407 | font-weight: bold; 408 | } 409 | 410 | /* Tables 411 | ========================================================================== */ 412 | 413 | /** 414 | * Remove most spacing between table cells. 415 | */ 416 | 417 | table { 418 | border-collapse: collapse; 419 | border-spacing: 0; 420 | } 421 | 422 | td, 423 | th { 424 | padding: 0; 425 | } -------------------------------------------------------------------------------- /source/css/_partial/article.styl: -------------------------------------------------------------------------------- 1 | .body-wrap{ 2 | margin-bottom: 80px; 3 | } 4 | .article { 5 | margin: 30px; 6 | position: relative; 7 | border: 1px solid #ddd; 8 | background: #fff; 9 | -webkit-transition: all 0.2s ease-in; 10 | &.show{ 11 | visibility: visible; 12 | -webkit-animation: cd-bounce-1 0.6s; 13 | -moz-animation: cd-bounce-1 0.6s; 14 | animation: cd-bounce-1 0.6s; 15 | } 16 | &.hidden{ 17 | visibility: hidden; 18 | } 19 | img{ 20 | max-width: 100%; 21 | } 22 | } 23 | @-webkit-keyframes cd-bounce-1 { 24 | 0% { 25 | opacity: 0; 26 | -webkit-transform: scale(1); 27 | } 28 | 60% { 29 | opacity: 1; 30 | -webkit-transform: scale(1.01); 31 | } 32 | 100% { 33 | -webkit-transform: scale(1); 34 | } 35 | } 36 | @-moz-keyframes cd-bounce-1 { 37 | 0% { 38 | opacity: 0; 39 | -moz-transform: scale(1); 40 | } 41 | 60% { 42 | opacity: 1; 43 | -moz-transform: scale(1.01); 44 | } 45 | 100% { 46 | -moz-transform: scale(1); 47 | } 48 | } 49 | @keyframes cd-bounce-1 { 50 | 0% { 51 | opacity: 0; 52 | -webkit-transform: scale(1); 53 | -moz-transform: scale(1); 54 | -ms-transform: scale(1); 55 | -o-transform: scale(1); 56 | transform: scale(1); 57 | } 58 | 60% { 59 | opacity: 1; 60 | -webkit-transform: scale(1.01); 61 | -moz-transform: scale(1.01); 62 | -ms-transform: scale(1.01); 63 | -o-transform: scale(1.01); 64 | transform: scale(1.01); 65 | } 66 | 100% { 67 | -webkit-transform: scale(1); 68 | -moz-transform: scale(1); 69 | -ms-transform: scale(1); 70 | -o-transform: scale(1); 71 | transform: scale(1); 72 | } 73 | } 74 | .article-index{ 75 | margin-left: 200px; 76 | padding: 15px 0; 77 | margin-right: 75px; 78 | .brief{ 79 | display: block; 80 | color: #a8a8a8; 81 | font-size: 12px; 82 | line-height: 14px; 83 | height: 7px; 84 | padding-left: 2px; 85 | &:before{ 86 | display: inline-block; 87 | content: "“"; 88 | font-family: serif; 89 | font-size: 30px; 90 | float: left; 91 | margin: 4px 4px 0 -12px; 92 | color: #c8c8c8; 93 | } 94 | } 95 | } 96 | 97 | .article-title { 98 | color: #696969; 99 | margin-left: 0px; 100 | font-weight: 300; 101 | line-height: 35px; 102 | margin-bottom: 20px; 103 | font-size: 26px; 104 | -webkit-transition: color 0.3s; 105 | -moz-transition: color 0.3s; 106 | -o-transition: color 0.3s; 107 | transition: color 0.3s; 108 | &:hover{ 109 | color: #B0A0AA; 110 | } 111 | } 112 | 113 | .article-inner{ 114 | position: relative; 115 | margin-bottom: 20px; 116 | } 117 | .article-header{ 118 | border-left: 5px solid; 119 | padding: 15px 0px 15px 25px; 120 | } 121 | 122 | .article-info.info-on-right{ 123 | margin: 10px 0 0 0; 124 | float: right; 125 | } 126 | .article-info-index.article-info{ 127 | padding-top: 20px; 128 | margin: 30px 30px 0 30px; 129 | border-top: 1px solid #ddd; 130 | } 131 | .article-info-post.article-info{ 132 | padding: 0 133 | border: none; 134 | margin: -30px 0 20px 30px; 135 | } 136 | .article-entry{ 137 | line-height: 1.8em; 138 | padding-right: 30px; 139 | padding-left: 30px; 140 | p{ 141 | margin-top: 10px; 142 | } 143 | p code,li code{ 144 | padding: 1px 3px; 145 | margin: 0 3px; 146 | background: #ddd; 147 | border: 1px solid #ccc; 148 | font-family: Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace; 149 | word-wrap: break-word; 150 | font-size: 14px; 151 | } 152 | blockquote { 153 | background: #ddd; 154 | border-left: 5px solid #ccc; 155 | padding: 15px 20px; 156 | margin-top: 10px; 157 | border-left: 5px solid #657b83; 158 | background: #f6f6f6; 159 | p{ 160 | margin-top: 0; 161 | } 162 | } 163 | em { 164 | font-style: italic; 165 | } 166 | ul{ 167 | li:before{ 168 | content: ""; 169 | width: 6px; 170 | height: 6px; 171 | border: 1px solid #999; 172 | border-radius: 10px; 173 | background: #aaa; 174 | display: inline-block; 175 | margin-right: 10px; 176 | float: left; 177 | margin-top: 12px; 178 | } 179 | } 180 | ul,ol{ 181 | font-size: 14px; 182 | margin: 10px 0px; 183 | } 184 | li{ 185 | ul,ol{ 186 | margin-left: 30px; 187 | li:before{ 188 | content: ""; 189 | background: #dedede; 190 | } 191 | } 192 | } 193 | h1{ 194 | margin-top: 30px; 195 | } 196 | h2{ 197 | margin-top: 20px; 198 | font-weight: 300; 199 | color: #574C4C; 200 | padding-bottom: 5px; 201 | border-bottom: 1px solid #ddd; 202 | } 203 | h3,h4,h5,h6{ 204 | margin-top: 20px; 205 | font-weight: 300; 206 | color: #574C4C; 207 | padding-bottom: 5px; 208 | border-bottom: 1px solid #ddd; 209 | } 210 | video{ 211 | max-width: 100%; 212 | } 213 | strong { 214 | font-weight: bold; 215 | } 216 | .caption{ 217 | display: block; 218 | font-size: 0.8em; 219 | color: #aaa; 220 | } 221 | hr{ 222 | height: 0; 223 | margin-top: 20px; 224 | margin-bottom: 20px; 225 | border-left: 0; 226 | border-right: 0; 227 | border-top: 1px solid #DDD; 228 | border-bottom: 1px solid #FFF; 229 | } 230 | pre { 231 | font-size: 1 / 0.9em; 232 | line-height: 1.5; 233 | margin-top: 10px; 234 | padding: 5px 15px; 235 | overflow-x: auto; 236 | color: #657b83; 237 | font-size: 10px; 238 | border: 1px solid #ccc; 239 | text-shadow: 0 1px #444; 240 | font-family: Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace; 241 | code{ 242 | font-size: 14px; 243 | } 244 | } 245 | table{ 246 | width:100%; 247 | border: 1px solid #dedede; 248 | margin: 15px 0; 249 | border-collapse:collapse; 250 | tr,td{ 251 | height:35px; 252 | } 253 | thead{ 254 | tr { 255 | background: #f8f8f8; 256 | } 257 | } 258 | tbody{ 259 | tr:hover{ 260 | background: #efefef; 261 | } 262 | } 263 | td,th{ 264 | border: 1px solid #dedede; 265 | padding: 0 10px; 266 | } 267 | } 268 | figure{ 269 | table { 270 | border: none; 271 | width: auto; 272 | margin: 0; 273 | tbody{ 274 | tr:hover{ 275 | background: none; 276 | } 277 | } 278 | } 279 | } 280 | } 281 | 282 | .article-meta{ 283 | width: 150px; 284 | font-size: 14; 285 | text-align: right; 286 | position: absolute; 287 | right: 0; 288 | top: 23px; 289 | text-align: center; 290 | z-index: 1; 291 | time{ 292 | color: #aaa; 293 | &:before{ 294 | color: #999; 295 | content: "\f073"; 296 | font: 17px FontAwesome; 297 | margin-right: 10px; 298 | } 299 | } 300 | } 301 | 302 | .article-more-link{ 303 | margin-top: 5px; 304 | text-align: right; 305 | a{ 306 | background: #4d4d4d; 307 | color: #fff; 308 | font-size: 12px; 309 | padding: 2px 8px 4px; 310 | line-height: 16px; 311 | -webkit-border-radius: 2px; 312 | -moz-border-radius: 2px; 313 | border-radius: 2px; 314 | transition: background 0.3s; 315 | &:hover{ 316 | background: #3c3c3c; 317 | } 318 | &.hidden{ 319 | visibility: hidden; 320 | } 321 | } 322 | } 323 | 324 | #article-nav{ 325 | margin: 80px 0 30px 0; 326 | padding-bottom: 10px; 327 | .article-nav-link-wrap{ 328 | margin: 0px 30px 0px 30px; 329 | font-size: 14px; 330 | color: #333; 331 | .article-nav-title{ 332 | display: inline-block; 333 | font-size: 12px; 334 | color: #aaa; 335 | transition: color 0.3s; 336 | } 337 | strong{ 338 | background: #ddd; 339 | color: #fff; 340 | border-radius: 100%; 341 | width: 15px; 342 | height: 15px; 343 | display: inline-block; 344 | text-align: center; 345 | transition: background 0.3s; 346 | } 347 | &:hover{ 348 | strong{ 349 | background: #4d4d4d; 350 | } 351 | .article-nav-title{ 352 | color: #4d4d4d; 353 | } 354 | } 355 | } 356 | #article-nav-older{ 357 | float: right; 358 | } 359 | } 360 | 361 | .copyright { 362 | width: 85%; 363 | max-width: 45em; 364 | margin: 1.2em auto 0; 365 | padding: .5em 1.8em; 366 | border: 1px solid lightgray; 367 | font-size: .93em; 368 | line-height: 1.6em; 369 | word-break: break-all; 370 | background: rgba(255, 255, 255, .4); 371 | span { 372 | display: inline-block; 373 | width: 5.8em; 374 | color: #B5B5B5; 375 | font-weight: bold; 376 | } 377 | a { 378 | color: gray; 379 | &:hover { 380 | color: #a3d2a3; 381 | text-decoration: underline; 382 | } 383 | } 384 | &:hover .fa-clipboard { 385 | color: black; 386 | } 387 | .copy-path { 388 | margin-left: 1em; 389 | &:hover { 390 | color: gray; 391 | cursor: pointer; 392 | } 393 | } 394 | } 395 | 396 | 397 | 398 | /*MOxFIVE's color schemes*/ 399 | .article .article-inner{ 400 | margin-bottom: 0px; 401 | padding-bottom: .5em; 402 | } 403 | 404 | .article { 405 | background: rgba(255,255,255,.4); 406 | border: none; 407 | } 408 | 409 | .copyright { 410 | background-color: rgba(255,255,255,.3); 411 | } 412 | 413 | #article-nav { 414 | background-color: rgba(158, 188, 226, .6); 415 | } 416 | 417 | .article-entry blockquote { 418 | background: rgba(255,255,255,0.4); 419 | /* border-left: 4px solid #cbe8f7;*/ 420 | } 421 | li:hover { 422 | background: rgba(158, 188, 226, .21); 423 | } 424 | 425 | #toc { 426 | background: none; 427 | } 428 | 429 | #tocButton { 430 | background: none; 431 | } 432 | 433 | /*.article-entry .highlight { 434 | background: none; 435 | }*/ 436 | 437 | .article-entry > ol:last-child > li:nth-child(2n) { 438 | background: rgba(158, 188, 226, .12); 439 | &:hover { 440 | background: ; 441 | }; 442 | }; 443 | .article-entry h3 { 444 | background: rgba(243, 248, 253, .6) 445 | &::after { 446 | content: ""; 447 | }; 448 | } 449 | 450 | .like { 451 | display: block; 452 | height: 86px; 453 | width: 312px; 454 | font-family: "Avenir Next",Helvetica,Arial,"Lantinghei SC","Microsoft YaHei",sans-serif; 455 | background: #fff; 456 | padding: 15px; 457 | margin: 20px auto; 458 | border-radius: 5px; 459 | box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12); 460 | } 461 | 462 | .article img { 463 | display: block; 464 | max-width: 100%; 465 | margin: 0 auto; 466 | } -------------------------------------------------------------------------------- /source/css/_partial/tagcloud.styl: -------------------------------------------------------------------------------- 1 | .switch-btn { 2 | margin-left: 74px; 3 | margin-top: 23px; 4 | position: relative; 5 | width: 70px; 6 | text-align: center; 7 | .tips-box{ 8 | position: relative; 9 | .tips-arrow{ 10 | width: 0; 11 | height: 0; 12 | border-left: 5px solid transparent; 13 | border-right: 5px solid transparent; 14 | border-bottom: 6px solid #000; 15 | opacity: 0.8; 16 | position: absolute; 17 | top: -6px; 18 | left: 30px; 19 | } 20 | .tips-inner{ 21 | padding: 5px 8px 4px 8px; 22 | background-color: black; 23 | color: white; 24 | width: 80px; 25 | text-align: center; 26 | border-radius: 3px; 27 | opacity: 0.8; 28 | position: absolute; 29 | z-index: 99; 30 | left: -13px; 31 | li{ 32 | padding: 4px 0; 33 | cursor: pointer; 34 | font-size: 13px; 35 | color: #ddd; 36 | &:hover{ 37 | background: #111; 38 | } 39 | } 40 | } 41 | } 42 | .icon{ 43 | height: 32px; 44 | width: 32px; 45 | background: #cecece; 46 | border-radius: 100px; 47 | position: relative; 48 | overflow: hidden; 49 | display: inline-block; 50 | padding: 10px; 51 | transform: scale(0.6); 52 | cursor: pointer; 53 | } 54 | 55 | .icon-ctn { 56 | width: 34px; 57 | height: 34px; 58 | position: relative; 59 | overflow: hidden; 60 | .birdhouse { 61 | width: 0; 62 | height: 0; 63 | position: absolute; 64 | top: 0; 65 | left: 0; 66 | border-style: solid; 67 | border-color: transparent transparent #4d4d4d transparent; 68 | border-width: 0 16px 14px; 69 | &:after { 70 | content: ''; 71 | position: absolute; 72 | top: 12px; 73 | left: -12px; 74 | border-style: solid; 75 | border-color: #4d4d4d transparent transparent transparent; 76 | border-width: 100px 12px; 77 | } 78 | } 79 | .birdhouse_holes { 80 | width: 12px; 81 | height: 12px; 82 | background: #ddd; 83 | position: absolute; 84 | -webkit-border-radius: 60px; 85 | -moz-border-radius: 60px; 86 | border-radius: 60px; 87 | left: 10px; 88 | top: 8px; 89 | &:after { 90 | content: ''; 91 | position: absolute; 92 | width: 4px; 93 | height: 4px; 94 | background: #ccc; 95 | bottom: -8px; 96 | left: 4px; 97 | -webkit-border-radius: 60px; 98 | -moz-border-radius: 60px; 99 | border-radius: 60px; 100 | } 101 | } 102 | .ribbon { 103 | width: 12px; 104 | height: 20px; 105 | background: #333; 106 | margin: 2px 0 0 10px; 107 | &:after{ 108 | content: ''; 109 | position: absolute; 110 | left: 10px; 111 | top: 16px; 112 | width: 0; 113 | height: 0; 114 | border: solid #333; 115 | border-color: transparent #333 transparent #333; 116 | border-width: 6px 6px 8px 6px; 117 | } 118 | } 119 | .loopback_l { 120 | width: 10px; 121 | height: 5px; 122 | border-style: solid; 123 | border-width: 0px 3px 3px 3px; 124 | border-color: #333; 125 | border-radius: 0 0 50px 50px; 126 | position: absolute; 127 | top: 16px; 128 | left: 1px; 129 | &:before { 130 | content: ''; 131 | position: absolute; 132 | width: 0; 133 | height: 0; 134 | border-style: solid; 135 | border-width: 4px; 136 | border-color: transparent transparent transparent #333; 137 | bottom: 7px; 138 | left: 5px; 139 | } 140 | &:after { 141 | content: ''; 142 | width: 5px; 143 | height: 5px; 144 | border-style: solid; 145 | border-width: 3px 0 0 3px; 146 | border-color: #333; 147 | border-radius: 50px 0 0 0; 148 | position: absolute; 149 | left: -3px; 150 | bottom: 5px; 151 | } 152 | } 153 | .loopback_r { 154 | width: 10px; 155 | height: 5px; 156 | border-style: solid; 157 | border-width: 3px 3px 0 3px; 158 | border-color: #333; 159 | border-radius: 50px 50px 0 0; 160 | position: absolute; 161 | top: 8px; 162 | right: 2px; 163 | &:before { 164 | content: ''; 165 | position: absolute; 166 | width: 0; 167 | height: 0; 168 | border-style: solid; 169 | border-width: 4px; 170 | border-color: transparent #333 transparent transparent; 171 | top: 7px; 172 | right: 5px; 173 | } 174 | &:after { 175 | content: ''; 176 | width: 5px; 177 | height: 5px; 178 | border-style: solid; 179 | border-width: 0 3px 3px 0; 180 | border-color: #333; 181 | border-radius: 0 0 50px 0; 182 | position: absolute; 183 | left: 5px; 184 | top: 5px; 185 | } 186 | } 187 | .user { 188 | width: 12px; 189 | height: 14px; 190 | background: #333; 191 | border-radius: 5px 5px 0 0; 192 | margin-left: 10px; 193 | margin-top: 2px; 194 | &:before { 195 | content: ''; 196 | width: 0px; 197 | height: 0px; 198 | position: absolute; 199 | top: 17px; 200 | left: 0px; 201 | border-style: solid; 202 | border-color: transparent transparent #333 transparent; 203 | border-width: 0 16px 6px 16px; 204 | } 205 | &:after { 206 | content: ''; 207 | width: 8px; 208 | height: 5px; 209 | background: #333; 210 | position: absolute; 211 | margin-top: 13px; 212 | margin-left: -4px; 213 | } 214 | } 215 | .shoulder { 216 | width: 32px; 217 | height: 6px; 218 | background: #333; 219 | position: absolute; 220 | bottom: 6px; 221 | } 222 | } 223 | } 224 | 225 | #header .tagcloud a{ 226 | color:#fff; 227 | } 228 | .tagcloud{ 229 | a{ 230 | display:inline-block; 231 | text-decoration:none; 232 | font-weight: normal; 233 | font-size:10px; 234 | color:#fff; 235 | height:18px; 236 | line-height:18px; 237 | float: left; 238 | padding:0 5px 0px 10px; 239 | position:relative; 240 | border-radius:0 5px 5px 0; 241 | margin: 5px 9px 5px 8px; 242 | font-family: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace; 243 | &:hover{ 244 | opacity: 0.8; 245 | } 246 | &:before{ 247 | content: " "; 248 | width: 0px; 249 | height: 0px; 250 | position: absolute; 251 | top: 0; 252 | left: -18px; 253 | border: 9px solid transparent; 254 | } 255 | &:after{ 256 | content:" "; 257 | width:4px; 258 | height:4px; 259 | background-color:#fff; 260 | border-radius:4px; 261 | box-shadow:0px 0px 0px 1px rgba(0,0,0,.3); 262 | position:absolute; 263 | top: 7px; 264 | left: 2px; 265 | } 266 | } 267 | a.color1{ 268 | background: #FF945C; 269 | &:before{ 270 | border-right-color: #FF945C; 271 | } 272 | } 273 | a.color2{ 274 | background: #F5C7B7; 275 | &:before{ 276 | border-right-color: #F5C7B7; 277 | } 278 | } 279 | a.color3{ 280 | background: #BA8F6C; 281 | &:before{ 282 | border-right-color: #BA8F6C; 283 | } 284 | } 285 | a.color4{ 286 | background: #CFB7C4; 287 | &:before{ 288 | border-right-color:#CFB7C4; 289 | } 290 | } 291 | a.color5{ 292 | background: #7B5D5F; 293 | &:before{ 294 | border-right-color:#7B5D5F; 295 | } 296 | } 297 | } 298 | 299 | .article-tag-list{ 300 | .article-tag-list-item{ 301 | float: left; 302 | } 303 | } 304 | .article-tag{ 305 | float: left; 306 | .article-tag-list{ 307 | float: left; 308 | } 309 | &:before{ 310 | float: left; 311 | color: #999; 312 | content: "\f06c"; 313 | font: 16px FontAwesome; 314 | float: left; 315 | margin-right: 10px; 316 | margin-top: 9px; 317 | } 318 | &:after{ 319 | float: left; 320 | content: ""; 321 | margin-right: 20px; 322 | margin-top: 9px; 323 | float: left; 324 | } 325 | } 326 | .article-category{ 327 | float: left; 328 | &:before{ 329 | float: left; 330 | color: #999; 331 | content: "\f02d"; 332 | font: 16px FontAwesome; 333 | float: left; 334 | margin-right: 10px; 335 | margin-top: 9px; 336 | } 337 | &:after{ 338 | float: left; 339 | content: ""; 340 | margin-right: 20px; 341 | margin-top: 9px; 342 | float: left; 343 | } 344 | } 345 | .article-pop-out { 346 | float: left; 347 | &:before{ 348 | float: left; 349 | color: #999; 350 | content: "\f08d"; 351 | font: 16px FontAwesome; 352 | float: left; 353 | margin-right: 10px; 354 | margin-top: 9px; 355 | } 356 | &:after{ 357 | float: left; 358 | content: ""; 359 | margin-right: 20px; 360 | margin-top: 9px; 361 | float: left; 362 | } 363 | } 364 | 365 | .article-pop-out { 366 | float: left; 367 | &:before{ 368 | float: left; 369 | color: #999; 370 | content: "\f08d"; 371 | font: 16px FontAwesome; 372 | float: left; 373 | margin-right: 10px; 374 | margin-top: 9px; 375 | } 376 | &:after{ 377 | float: left; 378 | content: ""; 379 | margin-right: 20px; 380 | margin-top: 9px; 381 | float: left; 382 | } 383 | } -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.pack.js: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | (function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0
    ',image:'',iframe:'",error:'

    The requested content cannot be loaded.
    Please try again later.

    ',closeBtn:'
    ',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 6 | openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, 7 | isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=u(a)?f(a).get():[a]),f.each(a,function(e,c){var l={},g,h,k,n,m;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),u(c)?(l={href:c.data("fancybox-href")||c.attr("href"),title:f("
    ").text(c.data("fancybox-title")||c.attr("title")).html(),isDom:!0,element:c}, 8 | f.metadata&&f.extend(!0,l,c.metadata())):l=c);g=d.href||l.href||(r(c)?c:null);h=d.title!==w?d.title:l.title||"";n=(k=d.content||l.content)?"html":d.type||l.type;!n&&l.isDom&&(n=c.data("fancybox-type"),n||(n=(n=c.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(c)&&(n="html",k=c)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));k||("inline"===n?g?k=f(r(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):l.isDom&&(k=c): 9 | "html"===n?k=g:n||g||!l.isDom||(n="inline",k=c));f.extend(l,{href:g,type:n,content:k,title:h,selector:m});a[e]=l}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==w&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(), 10 | b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&& 11 | (b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==w&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,l;c&&(l=b._getPosition(d),a&&"scroll"===a.type?(delete l.position,c.stop(!0,!0).animate(l,200)):(c.css(l),e.pos=f.extend({},e.dim,l)))}, 13 | update:function(a){var d=a&&a.originalEvent&&a.originalEvent.type,e=!d||"orientationchange"===d;e&&(clearTimeout(C),C=null);b.isOpen&&!C&&(C=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),C=null)},e&&!t?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,t&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), 14 | b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
    ').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}));b.trigger("onLoading")},getViewport:function(){var a=b.current&& 15 | b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=t&&s.innerWidth?s.innerWidth:q.width(),d.h=t&&s.innerHeight?s.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&u(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(t?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c= 16 | e.which||e.keyCode,l=e.target||e.srcElement;if(27===c&&b.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||l&&(l.type||f(l).is("[contenteditable]"))||f.each(d,function(d,l){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();0!==c&&!k&&1g||0>l)&&b.next(0>g?"up":"right"),d.preventDefault())}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&& 18 | b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=m(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c, 19 | c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== 20 | c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&t&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(t?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady"); 21 | if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= 22 | this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, 23 | d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",t?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);t||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload|| 24 | b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,l,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 25 | b.unbindEvents();e=a.content;c=a.type;l=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
    ").html(e).find(a.selector):u(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
    ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", 26 | !1)}));break;case "image":e=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}u(e)&&e.parent().is(a.inner)||a.inner.append(e);b.trigger("beforeShow"); 27 | a.inner.css("overflow","yes"===l?"scroll":"no"===l?"hidden":l);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(d.prevMethod)b.transitions[d.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,l=b.skin,g=b.inner,h=b.current,c=h.width,k=h.height,n=h.minWidth,v=h.minHeight,p=h.maxWidth, 28 | q=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,z=m(y[1]+y[3]),s=m(y[0]+y[2]),w,A,u,D,B,G,C,E,I;e.add(l).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=m(l.outerWidth(!0)-l.width());w=m(l.outerHeight(!0)-l.height());A=z+y;u=s+w;D=F(c)?(a.w-A)*m(c)/100:c;B=F(k)?(a.h-u)*m(k)/100:k;if("iframe"===h.type){if(I=h.content,h.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(D).height(9999),G=I.contents().find("body"),r&&G.css("overflow-x", 29 | "hidden"),B=G.outerHeight(!0))}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=m(D);k=m(B);E=D/B;n=m(F(n)?m(n,"w")-A:n);p=m(F(p)?m(p,"w")-A:p);v=m(F(v)?m(v,"h")-u:v);q=m(F(q)?m(q,"h")-u:q);G=p;C=q;h.fitToView&&(p=Math.min(a.w-A,p),q=Math.min(a.h-u,q));A=a.w-z;s=a.h-s;h.aspectRatio?(c>p&&(c=p,k=m(c/E)),k>q&&(k=q,c=m(k*E)),cA||z>s)&&c>n&&k>v&&!(19p&&(c=p,k=m(c/E)),g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height();else c=Math.max(n,Math.min(c,c-(a-A))),k=Math.max(v,Math.min(k,k-(z-s)));r&&"auto"===t&&kA||z>s)&&c>n&&k>v;c=h.aspectRatio?cv&&k
    ').appendTo(d&&d.lenth?d:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay", 40 | function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); 41 | J?(b=Math.max(H.documentElement.offsetWidth,H.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*").filter(function(){return"fixed"=== 42 | f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", 43 | position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(r(e)&&""!==f.trim(e)){d=f('
    '+e+"
    ");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),J&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(m(d.css("margin-bottom")))}d["top"===a.position?"prependTo": 44 | "appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",l=function(g){var h=f(this).blur(),k=d,l,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||h.is(".fancybox-wrap")||(l=a.groupAttr||"data-fancybox-group",m=h.attr(l),m||(l="rel",m=h.get(0)[l]),m&&""!==m&&"nofollow"!==m&&(h=c.length?f(c):e,h=h.filter("["+l+'="'+m+'"]'),k=h.index(this)),a.index=k,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;c&&!1!==a.live?p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')", 45 | "click.fb-start",l):e.unbind("click.fb-start").bind("click.fb-start",l);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===w&&(f.scrollbarWidth=function(){var a=f('
    ').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===w&&(f.support.fixedPosition=function(){var a=f('
    ').appendTo("body"), 46 | b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(s).width();K.addClass("fancybox-lock-test");d=f(s).width();K.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); --------------------------------------------------------------------------------