├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── languages ├── de.yml ├── default.yml ├── es.yml ├── ru.yml ├── zh-CN.yml └── zh-TW.yml ├── layout ├── _partial │ ├── after_footer.ejs │ ├── analytics.ejs │ ├── archive.ejs │ ├── article.ejs │ ├── comment.ejs │ ├── footer.ejs │ ├── head.ejs │ ├── header.ejs │ ├── pagination.ejs │ ├── post │ │ ├── category.ejs │ │ ├── gallery.ejs │ │ ├── share.ejs │ │ ├── tag.ejs │ │ └── title.ejs │ └── sidebar.ejs ├── _widget │ ├── category.ejs │ ├── links.ejs │ ├── profile.ejs │ ├── recent_posts.ejs │ ├── search.ejs │ ├── tag.ejs │ ├── tagcloud.ejs │ └── weibo.ejs ├── archive.ejs ├── category.ejs ├── index.ejs ├── layout.ejs ├── page.ejs ├── post.ejs └── tag.ejs └── source ├── 4804c6e7655297ff7c7ad85c68482faadbc5451c19583d-Cv7iLq.jpg ├── beian.png ├── cc-by-sa.png ├── css ├── _base │ ├── layout.styl │ ├── utils.styl │ └── variable.styl ├── _partial │ ├── archive.styl │ ├── article.styl │ ├── comment.styl │ ├── footer.styl │ ├── header.styl │ ├── index.styl │ ├── sidebar.styl │ └── syntax.styl ├── font │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff └── style.styl ├── fancybox ├── blank.gif ├── fancybox_loading.gif ├── fancybox_loading@2x.gif ├── fancybox_overlay.png ├── fancybox_sprite.png ├── fancybox_sprite@2x.png ├── jquery.fancybox.css └── jquery.fancybox.pack.js └── js ├── gallery.js └── jquery.imagesloaded.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Tommy Chen 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # exLight 主题 2 | 3 | [Hexo](http://hexo.io) [Light](https://github.com/hexojs/hexo-theme-light) 主题中国大陆本地化分支 4 | 5 | ## 安装 6 | 7 | 在hexo根目录运行运行以下命令来安装exlight主题 8 | 9 | ``` 10 | git clone https://github.com/noahziheng/hexo-theme-exlight.git themes/exlight 11 | ``` 12 | 13 | ## 特征 14 | 15 | exLight主题相比light原主题有以下改动: 16 | * 移除自带的墙内无法使用的FacebookComment,加入多说评论支持,仍支持hexo自带的disqus配置 17 | * 加入新的个人介绍挂件(感谢[Icarus](http://blog.zhangruipeng.me/hexo-theme-icarus/)提供灵感),提供主要SNS链接 18 | * 加入友链挂件,只支持修改ejs添加友链的方式 19 | * 加入微博秀挂件 20 | * 替换搜索挂件为[TinySou](http://tinysou.com/)支持 21 | * 加入百度统计支持,保留Google Analytics支持 22 | * 加入JiaThis分享取代原生的墙内不可用分享组件 23 | * 加入InstantClick优化插件,提高加载速度 24 | 25 | 效果请参看我的博客[Noah's Blog](http://noahgao.net) 26 | 27 | ## 配置 28 | 29 | 默认配置: 30 | 31 | ``` yaml 32 | menu: 33 | Home: / 34 | Archives: /archives 35 | Projects: /projects 36 | About: /about 37 | 38 | widgets: 39 | - profile #个人介绍挂件 40 | - search #基于TinySou的小挂件,需配置下面的TinySou标志 41 | - recent_posts #最近文章挂件 42 | - category #分类挂件 43 | - tagcloud #标签云挂件 44 | - weibo #微博秀挂件,需配置底下的UID 45 | - links #友链挂件,添加友链需修改./layout/_widget/links.ejs 46 | #另有tag挂件可选 47 | 48 | excerpt_link: 阅读全文 49 | 50 | jiathis: 51 | enable: true #JiaThis分享开关 52 | 53 | fancybox: true #fancybox配置 54 | baidu_tongji: #百度统计 55 | google_analytics: #UA-XXXXXX-X 56 | rss: #可不填写 57 | duoshuo_shortname: noahgao #多说评论名称 58 | 59 | tinysou_id: #tinysou引擎ID 60 | 61 | weibo_uid: 2652975830 #微博秀UID 62 | SNS: #右侧个人介绍widget社交链接配置 63 | github: http://github.com/noahziheng 64 | twitter: https://twitter.com/noahziheng 65 | facebook: https://www.facebook.com/profile.php?id=100007443646852 66 | weibo: http://weibo.com/noah1719 67 | zhihu: http://www.zhihu.com/people/noah-gao 68 | profile: #右侧个人介绍widget配置 69 | name: #你的名字 70 | headimg: #你的头像地址 71 | description: #你的一句话简介 72 | location: #你的位置 73 | ``` 74 | --- 75 | **以下是light主题官方使用方式介绍,exLight全部支持** 76 | ## Features 77 | 78 | ### Gallery Post 79 | 80 | ![](http://i.minus.com/ibp6Hbytwgof9y.jpg) 81 | 82 | ``` 83 | --- 84 | layout: photo 85 | title: Gallery Post 86 | photos: 87 | - http://i.minus.com/ibobbTlfxZgITW.jpg 88 | - http://i.minus.com/iedpg90Y0exFS.jpg 89 | --- 90 | ``` 91 | 92 | ### Link Post 93 | 94 | ![](http://i.minus.com/i7hBbGqh14EWo.png) 95 | 96 | ``` 97 | --- 98 | layout: link 99 | title: Link Post 100 | link: http://www.google.com/ 101 | --- 102 | ``` 103 | 104 | ### Tweet Widget 105 | 106 | ![](http://i.minus.com/iMC8EyF9y0Y3y.PNG) 107 | 108 | ### Fancybox 109 | 110 | ![](http://i.minus.com/iHv7h7rZNqHvo.PNG) 111 | 112 | [Hexo]: http://zespia.tw/hexo/ 113 | [Fancybox]: http://fancyapps.com/fancybox/ -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | menu: 2 | Home: / 3 | Archives: /archives 4 | Projects: /projects 5 | About: /about 6 | 7 | widgets: 8 | - profile #个人介绍挂件 9 | - search #基于TinySou的小挂件,需配置下面的TinySou标志 10 | - recent_posts #最近文章挂件 11 | - category #分类挂件 12 | - tagcloud #标签云挂件 13 | #- weibo #微博秀挂件,需配置底下的UID 14 | - links #友链挂件,添加友链需修改./layout/_widget/links.ejs 15 | #另有tag挂件可选 16 | 17 | excerpt_link: 阅读全文 18 | 19 | jiathis: 20 | enable: false #JiaThis分享开关 21 | 22 | fancybox: true #fancybox配置 23 | #baidu_tongji: f4eb406be058265cf6064b36b379393d #百度统计 24 | google_analytics: #UA-XXXXXX-X 25 | rss: #可不填写 26 | duoshuo_shortname: noahgao #多说评论名称 27 | 28 | tinysou_id: ce95ee1b31097fdb02a4 29 | 30 | weibo_uid: 2652975830 #微博秀UID 31 | SNS: #右侧个人介绍widget社交链接配置 32 | github: http://github.com/noahziheng 33 | twitter: https://twitter.com/noahziheng 34 | facebook: https://www.facebook.com/profile.php?id=100007443646852 35 | weibo: http://weibo.com/noah1719 36 | zhihu: http://www.zhihu.com/people/noah-gao 37 | profile: #右侧个人介绍widget配置 38 | name: 'Noah Gao' #你的名字 39 | headimg: https://ooo.0o0.ooo/2016/12/13/5850153a10499.jpg #你的头像地址 40 | description: 'Full-stack & Embedded Developer' #你的一句话简介 41 | location: 'Tianjin,China' #你的位置 42 | -------------------------------------------------------------------------------- /languages/de.yml: -------------------------------------------------------------------------------- 1 | categories: Kategorien 2 | search: Suche 3 | tags: Tags 4 | tagcloud: Tag-Cloud 5 | tweets: Tweets 6 | prev: Vorherige Seite 7 | next: Nächste Seite 8 | comment: Kommentare 9 | archive_a: Archiv 10 | archive_b: "Archiv: %s" 11 | page: Seite %d 12 | recent_posts: Neueste Artikel -------------------------------------------------------------------------------- /languages/default.yml: -------------------------------------------------------------------------------- 1 | categories: Categories 2 | search: Search 3 | tags: Tags 4 | tagcloud: Tag Cloud 5 | tweets: Tweets 6 | prev: Prev 7 | next: Next 8 | comment: Comments 9 | archive_a: Archives 10 | archive_b: "Archives: %s" 11 | page: Page %d 12 | recent_posts: Recent Posts -------------------------------------------------------------------------------- /languages/es.yml: -------------------------------------------------------------------------------- 1 | categories: Categorías 2 | search: Buscar 3 | tags: Etiquetas 4 | tagcloud: Nube de Etiquetas 5 | tweets: Tweets 6 | prev: Anterior 7 | next: Siguiente 8 | comment: Comentarios 9 | archive_a: Archivo 10 | archive_b: "Archivo: %s" 11 | page: Página %d 12 | recent_posts: Entradas Recientes -------------------------------------------------------------------------------- /languages/ru.yml: -------------------------------------------------------------------------------- 1 | categories: Категории 2 | search: Поиск 3 | tags: Метки 4 | tagcloud: Облако меток 5 | tweets: Твиты 6 | prev: Назад 7 | next: Вперед 8 | comment: Комментарии 9 | archive_a: Архив 10 | archive_b: "Архив: %s" 11 | page: Страница %d 12 | -------------------------------------------------------------------------------- /languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | categories: 分类 2 | search: 搜索 3 | tags: 标签 4 | tagcloud: 标签云 5 | tweets: 推文 6 | prev: 上一页 7 | next: 下一页 8 | comment: 留言 9 | archive_a: 归档 10 | archive_b: 归档:%s 11 | page: 第 %d 页 12 | recent_posts: 最新文章 13 | -------------------------------------------------------------------------------- /languages/zh-TW.yml: -------------------------------------------------------------------------------- 1 | categories: 分類 2 | search: 搜尋 3 | tags: 標籤 4 | tagcloud: 標籤雲 5 | tweets: 推文 6 | prev: 上一頁 7 | next: 下一頁 8 | comment: 留言 9 | archive_a: 彙整 10 | archive_b: 彙整:%s 11 | page: 第 %d 頁 12 | recent_posts: 最新文章 -------------------------------------------------------------------------------- /layout/_partial/after_footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <% if (config.disqus_shortname){ %> 6 | 17 | <% } %> 18 | 19 | <% if (theme.fancybox){ %> 20 | 21 | 22 | 27 | <% } %> 28 | 29 | -------------------------------------------------------------------------------- /layout/_partial/analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.baidu_tongji){ %> 2 | 9 | <% } %> 10 | <% if (theme.google_analytics){ %> 11 | 21 | <% } %> 22 | -------------------------------------------------------------------------------- /layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var title = ''; 3 | if (page.category) title = page.category; 4 | if (page.tag) title = page.tag; 5 | if (page.archive){ 6 | if (page.year) title = page.year + (page.month ? '/' + page.month : ''); 7 | else title = __('archive_a'); 8 | } 9 | %> 10 |

<%= title %>

11 | 12 | <% if (pagination == 2){ %> 13 | <% page.posts.each(function(item){ %> 14 | <%- partial('article', {item: item, index: true}) %> 15 | <% }); %> 16 | 17 | <%- partial('pagination') %> 18 | <% } else { %> 19 |
20 | <% page.posts.each(function(item){ %> 21 |
22 |
23 |
24 |
25 | 26 | <% if (item.link){ %> 27 | <% if (item.title){ %> 28 |

<%= item.title %>

29 | <% } else { %> 30 |

<%= item.link %>

31 | <% } %> 32 | <% } else { %> 33 |

<%= item.title %>

34 | <% } %> 35 |
36 |
37 |
38 | <% }); %> 39 |
40 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/article.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (item.photos && item.photos.length){ %> 3 | <%- partial('post/gallery') %> 4 | <% } %> 5 |
6 |
7 | <% if (item.layout != 'page'){ %> 8 |
9 | 10 | <% } %> 11 | <%- partial('post/title') %> 12 |
13 |
14 | <% if (item.excerpt && index){ %> 15 | <%- item.excerpt %> 16 | <% } else { %> 17 | <%- item.content %> 18 | <% } %> 19 |
20 | 34 |
35 |
36 | 37 | <%- partial('comment') %> 38 | -------------------------------------------------------------------------------- /layout/_partial/comment.ejs: -------------------------------------------------------------------------------- 1 | <% if (page.comments){ %> 2 | 11 |
12 |

<%= __('comment') %>

13 | <% if(config.disqus_shortname) { %> 14 |
15 | 16 |
17 | <% } %> 18 | <% if (!index && theme.duoshuo_shortname){ %> 19 | 20 |
21 | 22 | 23 | 34 | 35 | <% } %> 36 |
37 | <% } %> 38 | -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (config.author){ %> 3 | © <%= new Date().getFullYear() %> <%= config.author %> 4 | <% } else { %> 5 | © <%= new Date().getFullYear() %> <%= config.title %> 6 | <% } %> 7 | . Powered by Hexo. 8 | <%= config.icp %>.知识共享许可协议 除非另有声明,本站的文字内容均在知识共享 署名-相同方式共享 4.0协议之条款下提供。 9 |
10 |

<%= config.beian %>

11 |
12 |
13 |
14 | <%- partial('analytics') %> -------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <% 6 | var title = []; 7 | if (page.current > 1) title.push(__('page', page.current)); 8 | if (page.title) title.push(page.title); 9 | if (page.category) title.push(page.category); 10 | if (page.tag) title.push(page.tag); 11 | if (page.archive){ 12 | if (page.year) title.push(__('archive_b', page.year + (page.month ? '/' + page.month : ''))); 13 | else title.push(__('archive_a')); 14 | } 15 | title.push(config.title); 16 | %> 17 | <%= title.join(' | ') %> 18 | <% if (config.author){ %><% } %> 19 | <% if (page.description){ %> 20 | 21 | <% } else if (config.description){ %> 22 | 23 | <% } else if (page.excerpt){ %> 24 | 25 | <% } else if (page.content){ %> 26 | 27 | <% } %> 28 | <% if (page.keywords){ %><% } %> 29 | 30 | 31 | <% if (page.title){ %><% } %> 32 | 33 | 34 | <% if(page.cover) { %> 35 | 36 | <% } else { %> 37 | 38 | <% } %> 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /layout/_partial/header.ejs: -------------------------------------------------------------------------------- 1 |
2 |

<%= config.title %>

3 |

<% if (config.subtitle){ %><%= config.subtitle %><% } %>

4 |
5 | 13 |
-------------------------------------------------------------------------------- /layout/_partial/pagination.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/post/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.categories && item.categories.length){ %> 2 | <% 3 | var cats = []; 4 | item.categories.forEach(function(cat){ 5 | cats.push('' + cat.name + ''); 6 | }); 7 | %> 8 |
9 | <%- cats.join(', ') %> 10 |
11 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/gallery.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/post/share.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.jiathis.enable){ %> 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 | 17 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.tags && item.tags.length){ %> 2 | <% 3 | var tags = []; 4 | item.tags.forEach(function(tag){ 5 | tags.push('' + tag.name + ''); 6 | }); 7 | %> 8 |
9 | <%- tags.join(', ') %> 10 |
11 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.link){ %> 2 | <% if (item.title){ %> 3 |

<%= item.title %>

4 | <% } else { %> 5 |

<%= item.link %>

6 | <% } %> 7 | <% } else { %> 8 | <% if (index){ %> 9 |

<%= item.title %>

10 | <% } else { %> 11 |

<%= item.title %>

12 | <% } %> 13 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/sidebar.ejs: -------------------------------------------------------------------------------- 1 | <% theme.widgets.forEach(function(widget){ %> 2 | <%- partial('../_widget/' + widget) %> 3 | <% }); %> -------------------------------------------------------------------------------- /layout/_widget/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.categories.length){ %> 2 |
3 |

<%= __('categories') %>

4 | 9 |
10 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/links.ejs: -------------------------------------------------------------------------------- 1 |
2 |

友情链接

3 | 7 |
-------------------------------------------------------------------------------- /layout/_widget/profile.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |

<%= theme.profile.name%>

5 |

<%= theme.profile.description%>

6 | <%= theme.profile.location%> 7 |
8 |
9 | 13 | 17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /layout/_widget/recent_posts.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.posts.length){ %> 2 |
3 |

<%= __('recent_posts') %>

4 | 11 |
12 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/search.ejs: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /layout/_widget/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 |
3 |

<%= __('tags') %>

4 | 9 |
10 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/tagcloud.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 |
3 |

<%= __('tagcloud') %>

4 |
5 | <%- tagcloud(site.tags, {}) %> 6 |
7 |
8 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/weibo.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.archive}) %> -------------------------------------------------------------------------------- /layout/category.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.category}) %> -------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 | <% page.posts.each(function(item){ %> 2 | <%- partial('_partial/article', {item: item, index: true}) %> 3 | <% }); %> 4 | 5 | <%- partial('_partial/pagination') %> -------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/head') %> 2 | 3 | 4 | 5 |
6 |
<%- body %>
7 | 8 |
9 |
10 | 11 | <%- partial('_partial/after_footer') %> 12 | 13 | -------------------------------------------------------------------------------- /layout/page.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {item: page, index: false}) %> -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {item: page, index: false}) %> -------------------------------------------------------------------------------- /layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.tag}) %> -------------------------------------------------------------------------------- /source/4804c6e7655297ff7c7ad85c68482faadbc5451c19583d-Cv7iLq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/4804c6e7655297ff7c7ad85c68482faadbc5451c19583d-Cv7iLq.jpg -------------------------------------------------------------------------------- /source/beian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/beian.png -------------------------------------------------------------------------------- /source/cc-by-sa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/cc-by-sa.png -------------------------------------------------------------------------------- /source/css/_base/layout.styl: -------------------------------------------------------------------------------- 1 | * 2 | margin 0 3 | padding 0 4 | 5 | body 6 | background color-background 7 | color color-font 8 | font-family font-default 9 | font-size 14px 10 | text-shadow 0 0 1px transparent 11 | @media screen and (max-width: 1260px) 12 | margin 0 30px 13 | @media screen and (max-width: 600px) 14 | font-size 13px 15 | 16 | h1, h2, h3, h4, h5, h6 17 | font-family font-title 18 | 19 | h1 20 | font-size 1.8em 21 | 22 | h2 23 | font-size 1.5em 24 | 25 | h3 26 | font-size 1.3em 27 | 28 | a 29 | text-decoration none 30 | color color-link 31 | &:hover 32 | text-decoration underline 33 | 34 | .alignleft 35 | float left 36 | 37 | .alignright 38 | float right 39 | 40 | .clearfix 41 | clearfix() 42 | 43 | .inner 44 | width page-width 45 | margin 0 auto 46 | @media screen and (max-width: 1260px) 47 | width 100% 48 | 49 | #main-col 50 | width 900px 51 | @media screen and (max-width: 1260px) 52 | width 100% 53 | margin-right -300px 54 | @media screen and (max-width: 900px) 55 | margin-right 0 56 | float none 57 | 58 | #wrapper 59 | @media screen and (max-width: 1260px) 60 | margin-right 300px 61 | @media screen and (max-width: 900px) 62 | margin-right 0 -------------------------------------------------------------------------------- /source/css/_base/utils.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/css/_base/utils.styl -------------------------------------------------------------------------------- /source/css/_base/variable.styl: -------------------------------------------------------------------------------- 1 | // Color 2 | color-default = #565a5f 3 | color-background = #eee 4 | color-font = #444 5 | color-meta = #999 6 | color-border = #ddd 7 | color-link = #258fb8 8 | 9 | // Font 10 | font-default = "Helvetica Neue", "Helvetica", Arial, sans-serif 11 | font-serif = "Georgia", serif 12 | font-mono = Monaco, Menlo, Consolas, Courier New, monospace 13 | font-title = "Lato", Helvetica Neue, Helvetica, Arial, sans-serif 14 | 15 | @import url("https://fonts.googleapis.com/css?family=Lato:400,400italic") 16 | 17 | font-icon = FontAwesome 18 | font-icon-path = 'font/fontawesome-webfont' 19 | 20 | @font-face { 21 | font-family 'FontAwesome' 22 | font-style normal 23 | font-weight normal 24 | src url(font-icon-path.eot?#iefix) format('embedded-opentype'), url(font-icon-path.woff) format('woff'), url(font-icon-path.ttf) format('truetype'), url(font-icon-path.svg#FontAwesomeRegular) format('svg') 25 | } 26 | 27 | // Width 28 | page-width = 1200px 29 | 30 | if profile 31 | _profile-column = profile-column 32 | else 33 | _profile-column = 0 -------------------------------------------------------------------------------- /source/css/_partial/archive.styl: -------------------------------------------------------------------------------- 1 | .archive-title 2 | color color-meta 3 | font-weight normal 4 | margin-bottom 30px 5 | text-shadow 0 0 1px #fff 6 | &:before 7 | font-family font-icon 8 | content '\f073' 9 | padding-right 15px 10 | 11 | &.tag 12 | &:before 13 | content '\f02b' 14 | 15 | &.category 16 | &:before 17 | content '\f07b' 18 | 19 | .archive 20 | box-shadow 1px 2px 3px color-border 21 | border-bottom 1px solid color-border 22 | margin-bottom 50px 23 | article 24 | box-shadow none 25 | .post-content 26 | margin-bottom 0 -------------------------------------------------------------------------------- /source/css/_partial/article.styl: -------------------------------------------------------------------------------- 1 | icon-size = 32px 2 | icon-gap = 25px 3 | 4 | article 5 | box-shadow 1px 2px 3px #ddd 6 | background #fff 7 | &.page 8 | padding-left 20px 9 | .icon 10 | display none 11 | 12 | &.post 13 | .icon 14 | &:before 15 | content '\f016' 16 | 17 | &.photo 18 | .icon 19 | &:before 20 | content '\f030' 21 | 22 | &.link 23 | .icon 24 | &:before 25 | content '\f0c1' 26 | 27 | .title 28 | a 29 | &:after 30 | content '\f08e' 31 | color color-meta 32 | font 12px font-icon 33 | padding-left 10px 34 | vertical-align super 35 | 36 | .post-content 37 | padding 20px 20px 15px (icon-size + icon-gap + 20) 38 | margin-bottom 50px 39 | position relative 40 | @media screen and (max-width: 600px) 41 | padding-left 20px 42 | 43 | .gallery 44 | overflow hidden 45 | position relative 46 | &:hover 47 | .control 48 | opacity 1 49 | 50 | img 51 | min-width 100% 52 | max-width 100% 53 | height auto 54 | position absolute 55 | top 0 56 | left 0 57 | opacity 0 58 | 59 | .control 60 | opacity 0 61 | transition 0.3s 62 | 63 | .prev, .next 64 | position absolute 65 | top 0 66 | width 50% 67 | height 100% 68 | cursor pointer 69 | &:before 70 | position absolute 71 | font 24px/1 font-icon 72 | text-align center 73 | width 24px 74 | text-shadow 0 0 15px rgba(0,0,0,0.5) 75 | color #fff 76 | margin-top -12px 77 | top 50% 78 | 79 | .prev 80 | left 0 81 | &:before 82 | content '\f053' 83 | left 10px 84 | 85 | .next 86 | right 0 87 | &:before 88 | content '\f054' 89 | right 10px 90 | 91 | header 92 | .icon 93 | width icon-size 94 | height icon-size 95 | margin-right icon-gap 96 | position absolute 97 | top 20px 98 | left 20px 99 | color color-link 100 | @media screen and (max-width: 600px) 101 | display none 102 | &:before 103 | position absolute 104 | font 32px font-icon 105 | top 0 106 | left 0 107 | width 32px 108 | text-align center 109 | 110 | time 111 | color color-meta 112 | font 0.9em font-title 113 | margin-bottom 5px 114 | display block 115 | line-height 1 116 | 117 | .title 118 | font-weight normal 119 | a 120 | color color-font 121 | &:hover 122 | color color-link 123 | text-decoration none 124 | 125 | .entry 126 | text-align justify 127 | line-height 1.6 128 | p, blockquote, ul, ol, dl, table, iframe, h3, h4, h5, h6, .video-container 129 | margin-top 15px 130 | 131 | blockquote 132 | border-top 1px solid color-border 133 | border-bottom 1px solid color-border 134 | font-style italic 135 | font-family font-serif 136 | font-size 1.2em 137 | padding 0 30px 15px 138 | text-align center 139 | footer 140 | border-top none 141 | font-size 0.8em 142 | line-height 1 143 | margin 20px 0 0 144 | padding-top 0 145 | cite 146 | &:before 147 | content '—' 148 | color #ccc 149 | padding 0 0.5em 150 | 151 | code, pre 152 | font-family font-mono 153 | 154 | code 155 | background #eee 156 | color #666 157 | padding 0 5px 158 | margin 0 2px 159 | font-size 0.9em 160 | border 1px solid color-border 161 | border-radius 3px 162 | 163 | pre 164 | background #eee 165 | border 1px solid color-border 166 | margin-top 15px 167 | overflow auto 168 | padding 7px 15px 169 | border-radius 2px 170 | code 171 | background none 172 | padding 0 173 | margin 0 174 | border none 175 | border-radius 0 176 | 177 | ul, ol, dl 178 | margin-left 20px 179 | ul, ol, dl 180 | margin-top 0 181 | 182 | h1, h2 183 | font-weight normal 184 | border-bottom 1px solid color-border 185 | padding-bottom 10px 186 | margin-top 20px 187 | 188 | h3, h4, h5, h6 189 | font-weight normal 190 | 191 | img, video 192 | max-width 100% 193 | height auto 194 | border none 195 | 196 | iframe 197 | border none 198 | 199 | .caption 200 | display block 201 | margin-top 5px 202 | color color-meta 203 | position relative 204 | font-size 0.9em 205 | padding-left 25px 206 | &:before 207 | content '\f040' 208 | position absolute 209 | font 1.3em font-icon 210 | position absolute 211 | left 0 212 | top 3px 213 | 214 | .video-container 215 | position relative 216 | padding-bottom 56.25% 217 | padding-top 30px 218 | height 0 219 | overflow hidden 220 | iframe, object, embed 221 | position absolute 222 | top 0 223 | left 0 224 | width 100% 225 | height 100% 226 | margin-top 0 227 | 228 | .pullquote 229 | float right 230 | border none 231 | padding 0 232 | margin 1em 0 0.5em 1.5em 233 | text-align left 234 | width 45% 235 | font-size 1.5em 236 | 237 | footer 238 | margin-top 15px 239 | padding-top 10px 240 | border-top 1px solid color-border 241 | color color-meta 242 | font-size 0.9em 243 | line-height 16px 244 | position relative 245 | min-height 16px 246 | a 247 | color color-meta 248 | &:hover 249 | color color-link 250 | text-decoration none 251 | &:before 252 | font 1.1em font-icon 253 | padding-right 10px 254 | vertical-align middle 255 | 256 | &.more-link 257 | &:before 258 | content '\f054' 259 | 260 | &.comment-link 261 | &:before 262 | content '\f075' 263 | 264 | .categories, .tags 265 | position relative 266 | padding-left 25px 267 | margin 5px 0 268 | &:before 269 | position absolute 270 | font 1.1em font-icon 271 | 272 | .categories 273 | &:before 274 | content '\f07b' 275 | top 2px 276 | left 1px 277 | 278 | .tags 279 | &:before 280 | content '\f02b' 281 | top 3px 282 | left 2px 283 | 284 | .addthis 285 | margin-top 15px 286 | iframe 287 | margin-top 0 288 | -------------------------------------------------------------------------------- /source/css/_partial/comment.styl: -------------------------------------------------------------------------------- 1 | #comment 2 | padding 20px 3 | background #fff 4 | box-shadow 1px 2px 3px #ddd 5 | margin-bottom 50px 6 | .title 7 | font-weight normal 8 | margin-bottom 15px -------------------------------------------------------------------------------- /source/css/_partial/footer.styl: -------------------------------------------------------------------------------- 1 | #footer 2 | color color-meta 3 | margin-bottom 50px 4 | font 0.9em/1.6 font-title 5 | text-shadow 0 0 1px #fff -------------------------------------------------------------------------------- /source/css/_partial/header.styl: -------------------------------------------------------------------------------- 1 | #header 2 | text-shadow 0 0 1px #fff 3 | margin 50px auto 4 | a 5 | color #999 6 | &:hover 7 | color color-link 8 | text-decoration none 9 | 10 | h1 11 | font-weight normal 12 | font-size 2.5em 13 | line-height 1 14 | 15 | h2 16 | font-weight normal 17 | font-size 0.9em 18 | line-height 1 19 | margin-top 10px 20 | 21 | #main-nav 22 | font-family font-title 23 | line-height 2.5em 24 | ul 25 | list-style none 26 | li 27 | float left 28 | margin-left 30px -------------------------------------------------------------------------------- /source/css/_partial/index.styl: -------------------------------------------------------------------------------- 1 | #pagination 2 | a 3 | display block 4 | padding 5px 10px 5 | background color-border 6 | color color-meta 7 | font-family font-title 8 | text-shadow 0 0 1px #fff 9 | margin-bottom 50px 10 | &:hover 11 | background color-link 12 | color #fff 13 | text-decoration none 14 | text-shadow none 15 | 16 | .prev 17 | &:before 18 | content '\f053' 19 | padding-right 10px 20 | font-family font-icon 21 | 22 | .next 23 | &:after 24 | content '\f054' 25 | padding-left 10px 26 | font-family font-icon -------------------------------------------------------------------------------- /source/css/_partial/sidebar.styl: -------------------------------------------------------------------------------- 1 | #sidebar 2 | width 270px 3 | line-height 1.8em 4 | @media screen and (max-width: 900px) 5 | float none 6 | width 100% 7 | .widget 8 | background #fff 9 | box-shadow 1px 2px 3px #ddd 10 | margin-bottom 30px 11 | word-wrap break-word 12 | .title 13 | padding 15px 20px 14 | font-size 1em 15 | border-bottom 1px solid color-border 16 | font-weight normal 17 | 18 | .entry 19 | font-size 0.9em 20 | padding 15px 20px 21 | 22 | ul, ol, dl 23 | list-style none 24 | ul, ol, dl 25 | list-style disc 26 | margin-left 20px 27 | 28 | .search 29 | margin-bottom 30px 30 | input 31 | background #fff 32 | font-family font-title 33 | font-style italic 34 | font-size 1em 35 | padding 10px 15px 36 | border 1px solid color-border 37 | width 100% 38 | box-sizing border-box 39 | color color-meta 40 | &:focus 41 | color color-font 42 | 43 | .tag 44 | small 45 | margin-left 15px 46 | color color-meta 47 | &:before 48 | content '(' 49 | &:after 50 | content ')' 51 | 52 | .twitter 53 | li 54 | border-bottom 1px solid color-border 55 | padding 15px 20px 56 | font-size 0.9em 57 | &:last-of-type 58 | border-bottom none 59 | small 60 | display block 61 | margin-top 10px 62 | color color-meta 63 | line-height 1 64 | 65 | .tagcloud 66 | .entry 67 | padding-right 5px 68 | a 69 | margin-right 10px 70 | display inline-block -------------------------------------------------------------------------------- /source/css/_partial/syntax.styl: -------------------------------------------------------------------------------- 1 | .entry 2 | .gist 3 | background #eee 4 | border 1px solid color-border 5 | margin-top 15px 6 | padding 7px 15px 7 | border-radius 2px 8 | text-shadow 0 0 1px #fff 9 | line-height 1.6 10 | overflow auto 11 | color #666 12 | .gist-file 13 | border none 14 | font-family inherit 15 | margin 0 16 | font-size 0.9em 17 | .gist-data 18 | background none 19 | border-bottom none 20 | pre 21 | padding 0 !important 22 | font-family font-mono 23 | .gist-meta 24 | background none 25 | color color-meta 26 | margin-top 5px 27 | padding 0 28 | text-shadow 0 0 1px #fff 29 | font-size 100% 30 | a 31 | color color-link 32 | &:visited 33 | color color-link 34 | 35 | figure.highlight 36 | background #eee 37 | border 1px solid color-border 38 | margin-top 15px 39 | padding 7px 15px 40 | border-radius 2px 41 | text-shadow 0 0 1px #fff 42 | line-height 1.6 43 | overflow auto 44 | position relative 45 | font-size 0.9em 46 | figcaption 47 | color color-meta 48 | margin-bottom 5px 49 | text-shadow 0 0 1px #fff 50 | a 51 | position absolute 52 | right 15px 53 | 54 | pre 55 | border none 56 | padding 0 57 | margin 0 58 | 59 | table 60 | margin-top 0 61 | border-spacing 0 62 | 63 | .gutter 64 | color color-meta 65 | padding-right 15px 66 | border-right 1px solid color-border 67 | text-align right 68 | 69 | .code 70 | padding-left 15px 71 | border-left 1px solid #fff 72 | color #666 73 | 74 | .line 75 | height: 20px 76 | 77 | pre 78 | // Theme: Solarized - Light 79 | // More theme here: http://softwaremaniacs.org/media/soft/highlight/test.html 80 | .comment 81 | .template_comment 82 | .diff .header 83 | .doctype 84 | .pi 85 | .lisp .string 86 | .javadoc 87 | color #93a1a1 88 | font-style italic 89 | 90 | .keyword 91 | .winutils 92 | .method 93 | .addition 94 | .css .tag 95 | .request 96 | .status 97 | .nginx .title 98 | color #859900 99 | 100 | .number 101 | .command 102 | .string 103 | .tag .value 104 | .phpdoc 105 | .tex .formula 106 | .regexp 107 | .hexcolor 108 | color #2aa198 109 | 110 | .title 111 | .localvars 112 | .chunk 113 | .decorator 114 | .built_in 115 | .identifier 116 | .vhdl 117 | .literal 118 | .id 119 | color #268bd2 120 | 121 | .attribute 122 | .variable 123 | .lisp .body 124 | .smalltalk .number 125 | .constant 126 | .class .title 127 | .parent 128 | .haskell .type 129 | color #b58900 130 | 131 | .preprocessor 132 | .preprocessor .keyword 133 | .shebang 134 | .symbol 135 | .symbol .string 136 | .diff .change 137 | .special 138 | .attr_selector 139 | .important 140 | .subst 141 | .cdata 142 | .clojure .title 143 | color #cb4b16 144 | 145 | .deletion 146 | color #dc322f -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/css/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/css/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/css/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /source/css/style.styl: -------------------------------------------------------------------------------- 1 | @import 'nib' 2 | 3 | @import '_base/variable' 4 | @import '_base/utils' 5 | @import '_base/layout' 6 | 7 | @import '_partial/header' 8 | @import '_partial/article' 9 | @import '_partial/comment' 10 | @import '_partial/index' 11 | @import '_partial/archive' 12 | @import '_partial/sidebar' 13 | @import '_partial/footer' 14 | @import '_partial/syntax' -------------------------------------------------------------------------------- /source/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/fancybox/blank.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noahziheng/hexo-theme-exlight/40db35b6727f527bfc1439cb305a5d4f0e93fb31/source/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /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 | visibility: hidden; 160 | max-width: 99999px; 161 | max-height: 99999px; 162 | overflow: visible !important; 163 | } 164 | 165 | /* Overlay helper */ 166 | 167 | .fancybox-lock { 168 | overflow: hidden !important; 169 | width: auto; 170 | } 171 | 172 | .fancybox-lock body { 173 | overflow: hidden !important; 174 | } 175 | 176 | .fancybox-lock-test { 177 | overflow-y: hidden !important; 178 | } 179 | 180 | .fancybox-overlay { 181 | position: absolute; 182 | top: 0; 183 | left: 0; 184 | overflow: hidden; 185 | display: none; 186 | z-index: 8010; 187 | background: url('fancybox_overlay.png'); 188 | } 189 | 190 | .fancybox-overlay-fixed { 191 | position: fixed; 192 | bottom: 0; 193 | right: 0; 194 | } 195 | 196 | .fancybox-lock .fancybox-overlay { 197 | overflow: auto; 198 | overflow-y: scroll; 199 | } 200 | 201 | /* Title helper */ 202 | 203 | .fancybox-title { 204 | visibility: hidden; 205 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 206 | position: relative; 207 | text-shadow: none; 208 | z-index: 8050; 209 | } 210 | 211 | .fancybox-opened .fancybox-title { 212 | visibility: visible; 213 | } 214 | 215 | .fancybox-title-float-wrap { 216 | position: absolute; 217 | bottom: 0; 218 | right: 50%; 219 | margin-bottom: -35px; 220 | z-index: 8050; 221 | text-align: center; 222 | } 223 | 224 | .fancybox-title-float-wrap .child { 225 | display: inline-block; 226 | margin-right: -100%; 227 | padding: 2px 20px; 228 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 229 | background: rgba(0, 0, 0, 0.8); 230 | -webkit-border-radius: 15px; 231 | -moz-border-radius: 15px; 232 | border-radius: 15px; 233 | text-shadow: 0 1px 2px #222; 234 | color: #FFF; 235 | font-weight: bold; 236 | line-height: 24px; 237 | white-space: nowrap; 238 | } 239 | 240 | .fancybox-title-outside-wrap { 241 | position: relative; 242 | margin-top: 10px; 243 | color: #fff; 244 | } 245 | 246 | .fancybox-title-inside-wrap { 247 | padding-top: 10px; 248 | } 249 | 250 | .fancybox-title-over-wrap { 251 | position: absolute; 252 | bottom: 0; 253 | left: 0; 254 | color: #fff; 255 | padding: 10px; 256 | background: #000; 257 | background: rgba(0, 0, 0, .8); 258 | } 259 | 260 | /*Retina graphics!*/ 261 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 262 | only screen and (min--moz-device-pixel-ratio: 1.5), 263 | only screen and (min-device-pixel-ratio: 1.5){ 264 | 265 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 266 | background-image: url('fancybox_sprite@2x.png'); 267 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 268 | } 269 | 270 | #fancybox-loading div { 271 | background-image: url('fancybox_loading@2x.gif'); 272 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 273 | } 274 | } -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.pack.js: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(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=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, 8 | c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& 9 | k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(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(),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(),b.coming=null,b.current|| 10 | b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(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]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= 11 | setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(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]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= 13 | a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=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"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), 14 | 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){if(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}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), 15 | y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; 16 | if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)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&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 18 | {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(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,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, 19 | 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"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= 20 | !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"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,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); 21 | "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=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= 22 | 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,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); 23 | 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);s||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||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, 24 | 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,k,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());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, 25 | 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):t(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",!1)}));break;case "image":e=a.tpl.image.replace("{href}", 26 | g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": 27 | "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();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,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? 28 | h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| 29 | h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),cz||y>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&jz||y>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j
').appendTo(b.coming?b.coming.parent:a.parent);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||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? 40 | b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), 41 | p.width()>b&&(a=p.width())):p.width()>n.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)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(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")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));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",position:"bottom"},beforeShow:function(a){var d= 43 | b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(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"),I&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, 44 | e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ 45 | ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('
').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('
').appendTo("body");var e=20=== 46 | d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); -------------------------------------------------------------------------------- /source/js/gallery.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | // Caption 3 | $('.entry').each(function(i){ 4 | $(this).find('img').each(function(){ 5 | if (!$(this).hasClass('nofancybox')){ 6 | var alt = this.alt; 7 | 8 | if (alt){ 9 | $(this).after('' + alt + ''); 10 | } 11 | 12 | $(this).wrap(''); 13 | } 14 | }); 15 | }); 16 | 17 | // Gallery 18 | var play = function(parent, item, callback){ 19 | var width = parent.width(); 20 | 21 | item.imagesLoaded(function(){ 22 | var _this = this[0], 23 | nWidth = _this.naturalWidth, 24 | nHeight = _this.naturalHeight; 25 | 26 | callback(); 27 | this.animate({opacity: 1}, 500); 28 | parent.animate({height: width * nHeight / nWidth}, 500); 29 | }); 30 | }; 31 | 32 | $('.gallery').each(function(){ 33 | var $this = $(this), 34 | current = 0, 35 | photoset = $this.children('.photoset').children(), 36 | all = photoset.length, 37 | loading = true; 38 | 39 | play($this, photoset.eq(0), function(){ 40 | loading = false; 41 | }); 42 | 43 | $this.on('click', '.prev', function(){ 44 | if (!loading){ 45 | var next = (current - 1) % all; 46 | loading = true; 47 | 48 | play($this, photoset.eq(next), function(){ 49 | photoset.eq(current).animate({opacity: 0}, 500); 50 | loading = false; 51 | current = next; 52 | }); 53 | } 54 | }).on('click', '.next', function(){ 55 | if (!loading){ 56 | var next = (current + 1) % all; 57 | loading = true; 58 | 59 | play($this, photoset.eq(next), function(){ 60 | photoset.eq(current).animate({opacity: 0}, 500); 61 | loading = false; 62 | current = next; 63 | }); 64 | } 65 | }); 66 | }); 67 | })(jQuery); 68 | -------------------------------------------------------------------------------- /source/js/jquery.imagesloaded.min.js: -------------------------------------------------------------------------------- 1 | (function(c,n){var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function m(){var b=c(i),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function j(b,a){b.src===l||-1!==c.inArray(b,k)||(k.push(b),a?h.push(b):i.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),o&&d.notifyWith(c(b),[a,e,c(i),c(h)]),e.length===k.length&&(setTimeout(m),e.unbind(".imagesLoaded")))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred(): 2 | 0,o=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),k=[],i=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",function(b){j(b.target,"error"===b.type)}).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)j(a,e.isBroken);else if(a.complete&&a.naturalWidth!==n)j(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=l,a.src=d}):m();return d?d.promise(g): 3 | g}})(jQuery); 4 | --------------------------------------------------------------------------------