├── .gitignore ├── LICENSE ├── README.CN.md ├── README.md ├── _config.yml ├── languages ├── en.yml └── zh-CN.yml ├── layout ├── archive.swig ├── category.swig ├── includes │ ├── baidu-tongji.swig │ ├── disqus.swig │ ├── duoshuo.swig │ ├── footer.swig │ ├── gallery.swig │ ├── gitalk.swig │ ├── google-analytics.swig │ ├── head.swig │ ├── jiathis.swig │ ├── layout.swig │ ├── pagination.swig │ ├── post-title-item.swig │ ├── recent-posts.swig │ ├── side-pagination.swig │ ├── social-icon.swig │ ├── toc.swig │ ├── user-card.swig │ ├── uyan.swig │ └── valine.swig ├── index.swig ├── math │ ├── index.swig │ ├── katex.swig │ └── mathjax.swig ├── page.swig ├── post.swig └── tag.swig └── source ├── css ├── blank.gif ├── fancybox_loading.gif ├── fancybox_loading@2x.gif ├── fancybox_overlay.png ├── fancybox_sprite.png ├── fancybox_sprite@2x.png ├── highlight-railscasts.css ├── iconfont │ ├── iconfont.css │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff ├── jquery.fancybox-thumbs.css ├── jquery.fancybox.css ├── next.png ├── plyr.css ├── prev.png ├── random.styl ├── sprite.svg └── vegas.min.css ├── hollow.ico └── js ├── highlight.pack.js ├── jquery-3.6.4.min.js ├── jquery.fancybox-thumbs.js ├── jquery.fancybox.pack.js ├── jquery.mousewheel.pack.js ├── plyr.js ├── random.js └── vegas.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | node_modules 28 | 29 | # Optional npm cache directory 30 | .npm 31 | 32 | # Optional REPL history 33 | .node_repl_history 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Stiekel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.CN.md: -------------------------------------------------------------------------------- 1 | # hexo-theme-random 中文文档 2 | 3 | ## Demo 4 | 5 | * [Demo on Openshift](http://random-stiekel.rhcloud.com/) 6 | * [不可能不确定](http://chensd.com) 7 | 8 | 如果你: 9 | 10 | * 喜欢用大图做背景 11 | * 不喜欢文章摘要 12 | * 不喜欢在文章列表中翻页 13 | 14 | 那这款主题很可能适合你。 15 | 16 | ## 屏幕截图 17 | 18 | ![hexo theme random screenshot homepage ](http://i.imgur.com/6N7QVHp.png) 19 | ![hexo theme random screenshot archive ](http://i.imgur.com/bfcRUbO.png) 20 | ![hexo theme random screenshot detail ](http://i.imgur.com/nYiNCha.png) 21 | ![hexo theme random screenshot user card ](http://i.imgur.com/g4y0Vce.png) 22 | ![hexo theme random screenshot categories ](http://i.imgur.com/M662lrh.png) 23 | ![hexo theme random screenshot tags cloud ](http://i.imgur.com/bkpds14.png) 24 | ![hexo theme random screenshot tag list ](http://i.imgur.com/e1q6gIn.png) 25 | ![hexo theme random screenshot code style ](http://i.imgur.com/wEBheiq.png) 26 | 27 | ## 主题安装 28 | 29 | 在你的博客目录里,执行如下的命令: 30 | 31 | ```sh 32 | git clone https://github.com/stiekel/hexo-theme-random.git themes/random 33 | ``` 34 | 35 | 然后修改博客的主配置文件,将主题设置为 `random`: 36 | 37 | ```yml 38 | theme: random 39 | ``` 40 | 41 | ## 头像设置 42 | 43 | 可以在 Hexo 主配置文件,或者主题的配置文件 `theme/random/_config.yml` ,增加一个 `avatar` 配置,如下: 44 | 45 | ```yml 46 | avatar: http://7te9fe.com1.z0.glb.clouddn.com/default_avatar.jpg 47 | ``` 48 | 49 | ## 菜单与导航链接的设置 50 | 51 | 显示在首页和导航的链接,可以在主题的配置文件(`theme/random/_config.yml`)中自定义。如果想链接到标签和分类的列表页,还需要自己手动创建对应页面。 52 | 53 | ### 链接 54 | 55 | 在主题的配置文件中,可以设置首页和导航菜单中的链接,配置如下: 56 | 57 | ```yml 58 | menu: 59 | 首页: / 60 | 文章: /archives 61 | 标签: /tags 62 | 分类: /categories 63 | 关于: /about 64 | ``` 65 | 66 | 在首页中,会自动隐藏指向首页的链接。但是,标签和分类的列表页,需要我们手动创建。 67 | 68 | ### 创建分类列表页和标签列表页 69 | 70 | hexo 默认是没有分类和标签列表页的,本主题已经提供了对这两个页面的支持,但需要手动生成对应的页面。 71 | 72 | 要生成标签列表页,在博客主目录中执行如下命令: 73 | 74 | ```sh 75 | hexo new page tags 76 | ``` 77 | 78 | 这样,会生成一个 `source/tags/index.md` 文件,编辑文件,修改文件的 `type` 项为 `tags`,如下: 79 | 80 | ```yml 81 | title: 标签 82 | date: 2016-01-16 06:17:29 83 | type: "tags" 84 | comments: false 85 | ``` 86 | 87 | 同样,创建分类列表页: 88 | 89 | ```sh 90 | hexo new page categories 91 | ``` 92 | 93 | 编辑 `source/categories/index.md` 如下: 94 | 95 | ```yml 96 | title: 分类 97 | date: 2015-08-03 14:19:29 98 | type: "categories" 99 | comments: false 100 | ``` 101 | 102 | ## 社交网站链接配置 103 | 104 | 在主页和点击头像弹出的个人信息卡片中,显示有社交网站的链接,需要在主题的配置文件 `theme/random/_config.yml` 中添加对应的配置,如下: 105 | 106 | ```yml 107 | social: 108 | GitHub: https://github.com/stiekel 109 | Coding.NET: https://coding.net/u/Stiekel 110 | Twitter: https://twitter.com/SidCN 111 | Weibo: http://weibo.com/sidcn 112 | DouBan: http://www.douban.com/people/Stiekel/ 113 | ``` 114 | 115 | 在显示的时候,会自动根据社交网站的 url ,来显示对应的图标。除了上述几个,另外还支持 Facebook / Google Plus / Dribbble / LinkedIn / NPMjs / Youtube / 知乎 / Quora。 116 | 117 | 如果您喜欢的社交网站不在其中,欢迎提 [issue](https://github.com/stiekel/hexo-theme-random/issues)。 118 | 119 | ## 添加 RSS 图标 120 | 121 | 在上面的 `social` 配置项目中,添加一个索引名为 `RSS`,值为订阅地址的项目即可: 122 | 123 | ```yml 124 | social: 125 | rss: http://chensd.com/feed 126 | ``` 127 | 128 | ## 第三方服务的配置 129 | 130 | 本主题支持 [Google Analytics](https://www.google.com/analytics/) / [百度统计](http://tongji.baidu.com/web/welcome/login) / [Disqus](https://disqus.com/) / [友言](http://www.uyan.cc/) / [JiaThis](http://www.jiathis.com/) / [Valine](https://valine.js.org/en/index.html) / [gitalk](https://github.com/gitalk/gitalk),即可以在主题配置文件中设置,也可以在博客的主配置文件中设置,增加项目如下: 131 | 132 | ```yml 133 | # Google analytics 134 | google_analytics: 135 | # Baidu tongji 136 | baidu_analytics: 137 | # Disqus 138 | disqus_shortname: 139 | # Uyan 140 | uyan_id: 141 | # jiaThis 142 | jiaThis_uid: 143 | jiathisConfig: 144 | data_track_clickback: true 145 | summary: "" 146 | showClose: true 147 | shortUrl: false 148 | hideMore: false 149 | valine: 150 | enable: false # 设置为 true 即可开启 151 | appId: #your leancloud appId 152 | appKey: #your leancloud appKey 153 | guest_info: nick,mail,link #valine comment header info 154 | placeholder: # valine comment input placeholder(like: Please leave your footprints ) 155 | avatar: robohash # gravatar style https://valine.js.org/avatar 156 | pageSize: 10 # comment list page size 157 | verify: false # valine verify code (true/false) 158 | notify: true # valine mail notify (true/false) 159 | lang: en 160 | visit_analytics: true 161 | gitalk: 162 | enable: false 163 | clientID: clientID 164 | clientSecret: clientSecret 165 | repo: gitalk-comments 166 | owner: github-username 167 | ``` 168 | 169 | 对应各个服务的 key 或者 code,直接添加在冒号之后即可。 170 | 171 | ## 主题配置 172 | 173 | 主题安装后,不需要任何配置,也可以很好的显示。 174 | 175 | ### 首页中显示最新文章列表 176 | 177 | 首页默认是不显示最新文章链接的,如果需要显示,则需要在主题或站点配置文件中添加 `homepageArticleCount` 配置,为 `0` 时不显示最近文章列表,配置如下: 178 | 179 | ```yml 180 | # 显示最新的三篇文章 181 | homepageArticleCount: 3 182 | ``` 183 | 184 | ### 背景图来源的配置 185 | 186 | 对于轮播的背景图片,有两种来源,一是使用指定的图片,二是使用 [unsplash](https://source.unsplash.com/) 提供的随机图片。 187 | 188 | 如果使用 unsplash 的图片,则可以在主题的配置文件 `_config.yml` 中进行配置,参数的具体意见,请参见 [unsplash文档](https://unsplash.it/): 189 | 190 | ```yml 191 | unsplashConfig: 192 | # 关于这几个配置项的说明,请参见 https://unsplash.it/ 193 | # blur: true # 给图片增加模糊特效 194 | gravity: 'north' # north, east, south, west, center # 图片翻转 195 | # greyscale: true # 使用灰度图片 196 | ``` 197 | 198 | 当然,也可以自己配置背景图片,也是在主题配置文件中进行,如下: 199 | 200 | ```yml 201 | backgroundImages: 202 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 203 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 204 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 205 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 206 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 207 | ``` 208 | 209 | URL 中的 `__width__` 和 `__height__` ,在请求时,会替换为浏览器的宽度和高度值,如果你的图片服务器支持按分辨率裁剪,那就可以用得上。 210 | 211 | ### 背景图轮播的配置 212 | 213 | 背景图轮播,使用的是 [vegas](http://vegas.jaysalvat.com) ,也是在主题的配置文件中进行自定义: 214 | 215 | ```yml 216 | vegasConfig: 217 | # animation: 'random' 218 | preload­Image: true # 图片预加载配置 219 | transition: # 图片的切换物资 220 | - slideLeft2 221 | - slideRight2 222 | # - zoomIn 223 | # - swirLeft 224 | # - swirRight 225 | # - flash 226 | - flash2 227 | # transition: 'swirlRight' # 可以只配置一个 228 | timer: true # 是否显示时间进度条 229 | delay: 5000 # 每张图片的显示时间 230 | shuffle: true # 按顺序播放,还是随机播放 231 | count: 10 #一共多少张图片 232 | ``` 233 | 234 | 具体参数的意义,请参见 [vegas 文档](http://vegas.jaysalvat.com/documentation/settings/)。 235 | 236 | ### 关闭背景图轮播 237 | 238 | 如果你不喜欢背景图和轮播,是可以关闭的,在主配置文件或者主题配置文件中添加如下的值: 239 | 240 | ```yml 241 | turnoffBackgroundImage: 242 | # home page 243 | index: false 244 | # arcihve / categories / tags 245 | post_list: false 246 | # post and page 247 | post: true 248 | ``` 249 | 250 | 关闭背景图后,可以通过下面的变量来设置背景色,注意,不要包括 # : 251 | 252 | ```yml 253 | backgroundColor: D7CCC8 254 | ``` 255 | 256 | 257 | ### Hide 按钮 258 | 259 | 在每个页面的左下角,都有一个 __Hide__ 按钮,点击这个按钮之后,按钮之外的东西都会被隐藏。如果不想显示这个按钮,可以在主题或者 Hexo 的主配置文件中修改 `hideButtonVisibility`,设置为 `false`: 260 | 261 | ```yml 262 | hideButtonVisibility: false 263 | ``` 264 | 265 | ### 忽略特定服务器的访问统计 266 | 267 | 当你在调试和写作的时候,可以不将这些访问发送到 Google Analytics 或百度统计,只需要将你的调试服务器地址加入到下面的配置变量即可: 268 | 269 | ```yml 270 | isIgnoreSpecialHostVisitor: true 271 | ignoreHostList: 272 | - localhost 273 | - 127.0.0.1 274 | ``` 275 | 276 | ## 感谢 277 | 278 | * 背景轮插插件: [vegas](http://vegas.jaysalvat.com/) 279 | * 社交网站链接图标: [iconfont](http://iconfont.cn/) 280 | * Hexo 主题生成器: [generator-hexo-theme](https://github.com/tcrowe/generator-hexo-theme) 281 | * 视频播放: [plyr](https://plyr.io/) 282 | 283 | ## 反馈 284 | 285 | 欢迎使用,如果有问题,请您在 [issue](https://github.com/stiekel/hexo-theme-random/issues) 中提出来。 286 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hexo-theme-random 2 | A hexo theme with random fullscreen background image. 3 | 4 | ## Demo 5 | 6 | * [Demo](https://env-wwufiyop-1252212664.tcloudbaseapp.com/random-demo/?latest) 7 | 8 | ## [中文文档](README.CN.md) 9 | 10 | If you 11 | 12 | * prefer to use fullscreen picture as background image 13 | * do NOT like show article abstract in post list 14 | * do NOT like use paginations in post list 15 | 16 | This theme seems to suit you. 17 | 18 | ## Screenshot 19 | 20 | ![hexo theme random screenshot homepage ](http://i.imgur.com/6N7QVHp.png) 21 | ![hexo theme random screenshot archive ](http://i.imgur.com/bfcRUbO.png) 22 | ![hexo theme random screenshot detail ](http://i.imgur.com/nYiNCha.png) 23 | ![hexo theme random screenshot user card ](http://i.imgur.com/g4y0Vce.png) 24 | ![hexo theme random screenshot categories ](http://i.imgur.com/M662lrh.png) 25 | ![hexo theme random screenshot tags cloud ](http://i.imgur.com/bkpds14.png) 26 | ![hexo theme random screenshot tag list ](http://i.imgur.com/e1q6gIn.png) 27 | ![hexo theme random screenshot code style ](http://i.imgur.com/wEBheiq.png) 28 | 29 | ## Install 30 | 31 | execute this command in blog root path: 32 | 33 | ```sh 34 | git clone https://github.com/stiekel/hexo-theme-random.git themes/random 35 | ``` 36 | 37 | modify the `theme` setting in hexo main config file `_config.yml` as following: 38 | 39 | ```yml 40 | theme: random 41 | ``` 42 | 43 | ## Avatar 44 | 45 | You can config the avatar in hexo main config file or theme config file as following: 46 | 47 | ```yml 48 | avatar: http://7te9fe.com1.z0.glb.clouddn.com/default_avatar.jpg 49 | ``` 50 | 51 | ## Nav links config 52 | 53 | Nav links in homepage and the top of other pages, you can config it in theme config file `theme/random/_config.yml`: 54 | 55 | ```yml 56 | menu: 57 | Home: / 58 | Archives: /archives 59 | Tags: /tags 60 | Categories: /categories 61 | About: /about 62 | ``` 63 | 64 | In index page, the `Home` link will hide itself. 65 | 66 | ## Create tags list page and categories list page 67 | 68 | Hexo do NOT create tags list page and categories list page in default, but Random theme provide those pages, you just need to create it. 69 | 70 | If you want to create tags list page, run this command in blog root path: 71 | 72 | ```sh 73 | hexo new page tags 74 | ``` 75 | 76 | this will create a folder and a markdown file `source/tags/index.md`, change the `type` value of thie file as following: 77 | 78 | ```yml 79 | title: Tags 80 | date: 2016-01-16 06:17:29 81 | type: "tags" 82 | comments: false 83 | ``` 84 | 85 | the same to create categories list page: 86 | 87 | ```sh 88 | hexo new page categories 89 | ``` 90 | 91 | and modify the `source/categories/index.md` as following: 92 | 93 | ```md 94 | title: Categories 95 | date: 2015-08-03 14:19:29 96 | type: "categories" 97 | comments: false 98 | ``` 99 | 100 | ## Social links config 101 | 102 | In the homepage, and the user card when visitors click the avatar, there are some social site icon links, You can config the icons in theme config file `theme/random/_config.yml` as following: 103 | 104 | ```yml 105 | social: 106 | GitHub: https://github.com/stiekel 107 | Coding.NET: https://coding.net/u/Stiekel 108 | Twitter: https://twitter.com/SidCN 109 | Weibo: http://weibo.com/sidcn 110 | DouBan: http://www.douban.com/people/Stiekel/ 111 | ``` 112 | 113 | It will replace text into icon automaticalcally, Random theme support to show icon of Facebook / Google Plus / Dribbble / LinkedIn / NPMjs / Youtube / Zhihu / Quora. 114 | 115 | If you need more, please create [issue](https://github.com/stiekel/hexo-theme-random/issues). 116 | 117 | ## Add RSS Icon 118 | 119 | If you want add RSS icon to social links, please add the following code at the `social` section in config file: 120 | 121 | ```yml 122 | social: 123 | rss: http://chensd.com/feed 124 | ``` 125 | 126 | ## Third party Service 127 | 128 | Random support [Google Analytics](https://www.google.com/analytics/) / [Baidu Tongji](http://tongji.baidu.com/web/welcome/login) / [Disqus](https://disqus.com/) / [Uyan](http://www.uyan.cc/) / [JiaThis](http://www.jiathis.com/) / [Valine](https://valine.js.org/en/index.html) / [gitalk](https://github.com/gitalk/gitalk), You can config these in theme config file or hexo main config file: 129 | 130 | ```yml 131 | # Google analytics 132 | google_analytics: 133 | # Baidu tongji 134 | baidu_analytics: 135 | # Disqus 136 | disqus_shortname: 137 | # Uyan 138 | uyan_id: 139 | # jiaThis 140 | jiaThis_uid: 141 | jiathisConfig: 142 | data_track_clickback: true 143 | summary: "" 144 | showClose: true 145 | shortUrl: false 146 | hideMore: false 147 | valine: 148 | enable: false # set true if you want to use 149 | appId: #your leancloud appId 150 | appKey: #your leancloud appKey 151 | guest_info: nick,mail,link #valine comment header info 152 | placeholder: # valine comment input placeholder(like: Please leave your footprints ) 153 | avatar: robohash # gravatar style https://valine.js.org/avatar 154 | pageSize: 10 # comment list page size 155 | verify: false # valine verify code (true/false) 156 | notify: true # valine mail notify (true/false) 157 | lang: en 158 | visit_analytics: true 159 | 160 | gitalk: 161 | enable: false 162 | clientID: clientID 163 | clientSecret: clientSecret 164 | repo: gitalk-comments 165 | owner: github-username 166 | ``` 167 | 168 | Just add the key or code after the ':'. 169 | 170 | ## Theme config 171 | 172 | The following settings is not prerequisite. 173 | 174 | ### Show latest articles in homepage 175 | 176 | Homepage did NOT show latest article links by default, if you want show latest articles in homepage, you need to add `homepageArticleCount` in theme or site config, `0` to hide latest article links. 177 | 178 | ```yml 179 | # show latest 3 articles in homepage 180 | homepageArticleCount: 3 181 | ``` 182 | 183 | ### Background image source config 184 | 185 | The background image use [unsplash](https://source.unsplash.com/) as default, but you can use your custom pictures. 186 | 187 | If you use unsplash images, you can config the settings in theme config file `theme/random/_config.yml`: 188 | 189 | ```yml 190 | unsplashConfig: 191 | # more about config on https://unsplash.it/ 192 | # blur: true 193 | gravity: 'north' # north, east, south, west, center 194 | # greyscale: true 195 | ``` 196 | 197 | if you want use your own pictures, change the following section: 198 | 199 | ```yml 200 | backgroundImages: 201 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 202 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 203 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 204 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 205 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 206 | ``` 207 | 208 | `__width__` and `__height__` in URLs will replace with browser window size when show the picture, It's very useful when you image server support cut image into appointed size. 209 | 210 | ### Vegas(background image player) config 211 | 212 | Random theme use [Vegas](http://vegas.jaysalvat.com/) to organize pictures, you can config it in following section of theme config file: 213 | 214 | ```yml 215 | vegasConfig: 216 | # more about config http://vegas.jaysalvat.com/documentation/settings/ 217 | # animation: 'random' 218 | # transition: 'swirlRight' 219 | preload­Image: true 220 | transition: 221 | - slideLeft2 222 | - slideRight2 223 | # - zoomIn 224 | # - swirLeft 225 | # - swirRight 226 | # - flash 227 | - flash2 228 | timer: true 229 | delay: 5000 230 | shuffle: true 231 | count: 28 232 | ``` 233 | 234 | ### Do NOT use background images 235 | 236 | If you do NOT like the background iamges, you can turn it off, please add this option in you site config or theme config file: 237 | 238 | ```yml 239 | turnoffBackgroundImage: 240 | # home page 241 | index: false 242 | # arcihve / categories / tags 243 | post_list: false 244 | # post and page 245 | post: true 246 | ``` 247 | 248 | and you can set the background color with: 249 | 250 | ```yml 251 | backgroundColor: D7CCC8 252 | ``` 253 | 254 | ### Hide button 255 | 256 | There is a __Hide__ button on the left bottom of every page, all of the content except button itself will be hide while user click this button. If you want to hide this button, please change `hideButtonVisibility` to `false` in theme config or main config file: 257 | 258 | ```yml 259 | hideButtonVisibility: false 260 | ``` 261 | 262 | ### Ignore visitor statistics on special server 263 | 264 | When you are debugging or writting, you may do NOT like to send the visitor statistics to Google Analytics or Baidu Tongji, Just add the debugging server address to the following variables: 265 | 266 | ```yml 267 | isIgnoreSpecialHostVisitor: true 268 | ignoreHostList: 269 | - localhost 270 | - 127.0.0.1 271 | ``` 272 | 273 | ## Thanks 274 | 275 | * [Vegas](http://vegas.jaysalvat.com) 276 | * [iconfont](http://iconfont.cn/) 277 | * [generator-hexo-theme](https://github.com/tcrowe/generator-hexo-theme) 278 | * [plyr](https://plyr.io/) 279 | 280 | ## Feedback 281 | 282 | [issue](https://github.com/stiekel/hexo-theme-random/issues). 283 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | 2 | # html lang 3 | language: zh-CN 4 | 5 | # main menu navigation 6 | menu: 7 | Home: index.html 8 | Archives: archives 9 | Tags: tags 10 | Categories: categories 11 | About: about 12 | Github: https://github.com/stiekel 13 | 14 | social: 15 | GitHub: https://github.com/stiekel 16 | Weibo: http://weibo.com/sidcn 17 | M: histkc@gmail.com 18 | 19 | # homepage article list size, 0 to hide list in homepage 20 | homepageArticleCount: 3 21 | 22 | # Google analytics 23 | google_analytics: false 24 | # Baidu tongji 25 | baidu_analytics: false 26 | # Disqus 27 | disqus_shortname: 28 | # Uyan 29 | uyan_id: 30 | # jiaThis id 31 | # if you want to change the style of jiaThis, please go to chage the following file: 32 | # theme/random/layouts/includes/jiathis.swig 33 | jiaThis_uid: 34 | jiathisConfig: 35 | data_track_clickback: true 36 | summary: "" 37 | showClose: true 38 | shortUrl: false 39 | hideMore: false 40 | 41 | # Valine comments https://valine.js.org 42 | valine: 43 | enable: false # set true if you want to use 44 | appId: #your leancloud appId 45 | appKey: #your leancloud appKey 46 | guest_info: nick,mail,link #valine comment header info 47 | placeholder: # valine comment input placeholder(like: Please leave your footprints ) 48 | avatar: robohash # gravatar style https://valine.js.org/avatar 49 | pageSize: 10 # comment list page size 50 | verify: false # valine verify code (true/false) 51 | notify: true # valine mail notify (true/false) 52 | lang: en 53 | visit_analytics: true 54 | 55 | # gitalk comments https://github.com/gitalk/gitalk 56 | gitalk: 57 | enable: false 58 | clientID: clientID 59 | clientSecret: clientSecret 60 | repo: gitalk-comments 61 | owner: github-username 62 | 63 | # Miscelaneous 64 | favicon: /hollow.ico 65 | 66 | # stylesheets loaded in the 67 | stylesheets: 68 | - /css/random.css 69 | - /css/vegas.min.css 70 | - /css/highlight-railscasts.css 71 | - /css/jquery.fancybox.css 72 | - /css/iconfont/iconfont.css 73 | - /css/jquery.fancybox-thumbs.css 74 | - /css/plyr.css 75 | 76 | # scripts loaded in the end of the body 77 | scripts: 78 | - /js/jquery-3.6.4.min.js 79 | - /js/vegas.min.js 80 | - /js/random.js 81 | - /js/highlight.pack.js 82 | - /js/jquery.mousewheel.pack.js 83 | - /js/jquery.fancybox.pack.js 84 | - /js/jquery.fancybox-thumbs.js 85 | - /js/plyr.js 86 | 87 | # ignore visitor statistics on special server, for example on you local computer or debugging server 88 | isIgnoreSpecialHostVisitor: true 89 | ignoreHostList: 90 | - localhost 91 | - 127.0.0.1 92 | 93 | # if you want to turn off the background images, pleaase set this value as true 94 | turnoffBackgroundImage: 95 | # home page 96 | index: false 97 | # arcihve / categories / tags 98 | post_list: false 99 | # post and page 100 | post: false 101 | # when you turn off backgrounds, you can set a background color. 102 | backgroundColor: 34495E 103 | 104 | backgroundImages: 105 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 106 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 107 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 108 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 109 | - https://unsplash.it/__width__/__height__?random&t=6&gravity=center 110 | vegasConfig: 111 | # more about config http://vegas.jaysalvat.com/documentation/settings/ 112 | # animation: 'random' 113 | # transition: 'swirlRight' 114 | preload­Image: true 115 | transition: 116 | - slideLeft2 117 | - slideRight2 118 | - swirLeft 119 | - swirRight 120 | - flash 121 | animation­Duration: 100 122 | timer: false 123 | delay: 10000 124 | shuffle: true 125 | count: 12 126 | 127 | unsplashConfig: 128 | # more about config on https://unsplash.it/ 129 | # blur: true 130 | gravity: 'center' # north, east, south, west, center 131 | # greyscale: true 132 | 133 | avatar: images/blog-avatar.png 134 | 135 | # do not like fancybox, set this as false, this will turn it off 136 | fancybox: true 137 | 138 | # set the visibility of hide button in left bottom. 139 | hideButtonVisibility: true 140 | -------------------------------------------------------------------------------- /languages/en.yml: -------------------------------------------------------------------------------- 1 | archive_title: Archives 2 | category_title: Category 3 | tag_title: Tag 4 | rss_title: RSS 5 | excerpt_title: Read More 6 | without_title: No Title 7 | 8 | total_title: Total 9 | post_title: post 10 | posts_title: posts 11 | not_post: Wrote nothing 12 | 13 | comment: Comments 14 | 15 | prev: Prev 16 | next: Next 17 | 18 | prev_post: Prev post 19 | next_post: Next post 20 | 21 | page_number_part1: Page 22 | page_number_part2: of 23 | page_number_part3: . 24 | 25 | created_at: Created at 26 | updated_at: Updated at 27 | 28 | toc: Table of Content 29 | hide_toc: Hide TOC 30 | show_toc: Show TOC 31 | 32 | show_all: Show All 33 | -------------------------------------------------------------------------------- /languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | archive_title: 归档 2 | category_title: 分类 3 | tag_title: 标签 4 | rss_title: RSS 5 | excerpt_title: 阅读全文 6 | without_title: 空标题 7 | 8 | total_title: 共 9 | post_title: 文章 10 | posts_title: 文章 11 | not_post: 没有写文章哟 12 | 13 | comment: 评论 14 | 15 | prev: 上一页 16 | next: 下一页 17 | 18 | prev_post: 上一篇 19 | next_post: 下一篇 20 | 21 | page_number_part1: 第 22 | page_number_part2: 页,共 23 | page_number_part3: 页 24 | 25 | created_at: 撰写于 26 | updated_at: 修改于 27 | 28 | toc: 目录 29 | hide_toc: 隐藏目录 30 | show_toc: 显示目录 31 | 32 | show_all: 查看全部 33 | -------------------------------------------------------------------------------- /layout/archive.swig: -------------------------------------------------------------------------------- 1 | {% extends 'includes/layout.swig' %} 2 | 3 | {% block body %} 4 |
5 | {% include 'includes/recent-posts.swig' %} 6 |
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /layout/category.swig: -------------------------------------------------------------------------------- 1 | {% extends 'includes/layout.swig' %} 2 | 3 | {% block body %} 4 |
5 | {% for cat in site.categories %} 6 | {% if cat.name === page.category %} 7 |

8 | {{ page_title || __('category_title') }} 9 | {# {{ page.category }} 10 | {% if cat.posts.length %} 11 | 12 | {{ __('total_title') }} 13 | {{ cat.posts.length }} 14 | {% if 1 === cat.posts.length %} 15 | {{ __('post_title') }} 16 | {% else %} 17 | {{ __('posts_title') }} 18 | {% endif %} 19 | 20 | {% else %} 21 | {{ __('not_post') }} 22 | {% endif %} #} 23 |

24 | {% endif %} 25 | {% endfor %} 26 | 38 | {% set allPosts = site.posts.sort('date', 'desc') %} 39 | {% for postItem in allPosts %} 40 | {% set isShow = false %} 41 | {% for cat in postItem.categories %} 42 | {% if cat.name === page.category %} 43 | {% set isShow = true %} 44 | {% endif %} 45 | {% endfor %} 46 | {% if isShow %} 47 | {% include 'includes/post-title-item.swig' %} 48 | {% endif %} 49 | {% endfor %} 50 |
51 | 52 | {# {% include 'includes/pagination.swig' %} #} 53 | {% endblock %} 54 | -------------------------------------------------------------------------------- /layout/includes/baidu-tongji.swig: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /layout/includes/disqus.swig: -------------------------------------------------------------------------------- 1 |
2 | 22 | -------------------------------------------------------------------------------- /layout/includes/duoshuo.swig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/includes/footer.swig: -------------------------------------------------------------------------------- 1 | {% include 'user-card.swig' %} 2 | {% if config.hideButtonVisibility || theme.hideButtonVisibility %} 3 |
Hide
4 | {% endif %} 5 | 18 | {% if config.baidu_analytics || theme.baidu_analytics || config.baidu_tongji || theme.baidu_tongji %} 19 | {% include 'baidu-tongji.swig' %} 20 | {% endif %} 21 | {% if config.google_analytics || theme.google_analytics %} 22 | {% include 'google-analytics.swig' %} 23 | {% endif %} 24 | 25 | {% if theme.scripts !== undefined && theme.scripts.length > 0 %} 26 | {# scripts list from config.yml #} 27 | {% for url in theme.scripts %} 28 | 29 | {% endfor %} 30 | {% endif %} 31 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /layout/includes/gallery.swig: -------------------------------------------------------------------------------- 1 |
2 | {% for photo in page.photos %} 3 | 4 | 5 | 6 | {% endfor %} 7 |
8 | -------------------------------------------------------------------------------- /layout/includes/gitalk.swig: -------------------------------------------------------------------------------- 1 |
2 | 3 | 15 | -------------------------------------------------------------------------------- /layout/includes/google-analytics.swig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/includes/head.swig: -------------------------------------------------------------------------------- 1 | {% set pageTitle = page.title || config.subtitle || '' %} 2 | {% if is_archive() %} 3 | {% set pageTitle = _p('archive_title') %} 4 | {% endif %} 5 | {% if is_tag() %} 6 | {% set pageTitle = __('tag_title') + ': ' + page.tag %} 7 | {% endif %} 8 | {% if is_category() %} 9 | {% set pageTitle = __('category_title') + ': ' + page.category %} 10 | {% endif %} 11 | {% if is_month() %} 12 | {% set pageTitle = pageTitle + ': ' + page.month + '/' + page.year %} 13 | {% endif %} 14 | {% if is_year() %} 15 | {% set pageTitle = pageTitle + ': ' + page.year %} 16 | {% endif %} 17 | {% set pageTitle = pageTitle + ' [ ' + config.title + ' ]' %} 18 | 19 | 20 | 21 | 22 | 23 | {% if config.author %} 24 | 25 | {% endif %} 26 | {% if config.keywords || theme.keywords %} 27 | 28 | {% endif %} 29 | {% set metaDescription = trim(strip_html(page.description || page.excerpt || page.content || config.description)) %} 30 | {% if metaDescription.length > 200 %} 31 | 32 | {% else %} 33 | 34 | {% endif %} 35 | {{ pageTitle }} 36 | {% if config.feed || theme.feed %} 37 | {{ feed_tag(config.feed.path || theme.feed.path, {title: config.title, type: config.feed.type || theme.feed.type}) }} 38 | {% endif %} 39 | {% if config.favicon || theme.favicon%} 40 | {{ favicon_tag(config.favicon || theme.favicon) }} 41 | {% endif %} 42 | {% if theme.stylesheets !== undefined && theme.stylesheets.length > 0 %} 43 | {{ css(theme.stylesheets) }} 44 | {% endif %} 45 | {% if page.comments && (theme.gitalk.enable) %} 46 | 47 | {% endif %} 48 | 49 | 50 | -------------------------------------------------------------------------------- /layout/includes/jiathis.swig: -------------------------------------------------------------------------------- 1 | 2 | {% if config.jiaThis_uid || theme.jiaThis_uid %} 3 | 6 | 7 | {% endif %} 8 | 9 | -------------------------------------------------------------------------------- /layout/includes/layout.swig: -------------------------------------------------------------------------------- 1 | {% include 'head.swig' %} 2 | 3 | {% include 'side-pagination.swig' %} 4 |
5 |
6 | 35 | 36 |
37 |
38 | {# {% autoescape false %}{{ body }}{% endautoescape %} #} 39 | {% block body %}{% endblock %} 40 | {% if page.comments && (config.uyan_id || theme.uyan_id) %} 41 |
42 | {% endif %} 43 | {% if page.comments && (config.disqus_shortname || theme.disqus_shortname) %} 44 |
45 | {% endif %} 46 |
47 |
48 | 49 |
50 |
51 | Site by {{ config.author }} using 52 | Hexo & Random 53 |
54 | {% if config.since %} 55 | © 56 | {% set thisYear = date(Date.now(), 'YYYY') %} 57 | 58 | {{config.since}} 59 | {% if thisYear != config.since %} 60 | - {{ date(Date.now(), 'YYYY') }} 61 | {% endif %} 62 | {% endif %} 63 |
64 |
65 |
66 | 67 |
68 | {% if page.comments && (config.disqus_shortname || theme.disqus_shortname) %} 69 | {% include 'disqus.swig' %} 70 | {% endif %} 71 | {% if page.comments && (config.uyan_id || theme.uyan_id) %} 72 | {% include 'uyan.swig' %} 73 | {% endif %} 74 | {% include 'footer.swig' %} 75 | -------------------------------------------------------------------------------- /layout/includes/pagination.swig: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /layout/includes/post-title-item.swig: -------------------------------------------------------------------------------- 1 |
2 | {% set postTitle = postItem.title || trim(strip_html(postItem.content)) %} 3 | 4 | {% if postTitle.length < 80 %} 5 | {{ postTitle }} 6 | {% else %} 7 | {{ truncate( postTitle, {length: 80}) }} 8 | {% endif %} 9 | 10 |

11 | {% if postItem.archive == 'true' %} 12 | {{ date(postItem.date, 'M-D') }} 13 | {% else %} 14 | {{ date(postItem.date, 'Y-M-D') }} 15 | {% endif %} 16 | {% if postItem.categories.length %} 17 | {{ __('category_title') }} 18 | {% set i = 0 %} 19 | {% for cat in postItem.categories %} 20 | {% if i !== 0 %} 21 | {{'/'}} 22 | {% endif %} 23 | {% set i = i + 1 %} 24 | {{ cat.name }} 25 | {% endfor %} 26 | 27 | {% endif %} 28 | {% if postItem.tags.length %} 29 | 30 | {{ __('tag_title') }} 31 | {% set i = 0 %} 32 | {% for tag in postItem.tags %} 33 | {% if i !== 0 %} 34 | {{'/'}} 35 | {% endif %} 36 | {% set i = i + 1 %} 37 | {{ tag.name }} 38 | {% endfor %} 39 | 40 | {% endif %} 41 | {% if postItem.photos %} 42 |
43 | {% set i = 0 %} 44 | {% for photo in postItem.photos %} 45 | {% set i = i + 1 %} 46 | {% if i <= 3 %} 47 | 48 | 49 | 50 | {% endif %} 51 | {% endfor %} 52 | {% endif %} 53 |

54 | 55 |
-------------------------------------------------------------------------------- /layout/includes/recent-posts.swig: -------------------------------------------------------------------------------- 1 | 2 | {% if site.posts.length > 0 %} 3 |
4 |

{{ __('archive_title') }} 5 | {% if page.posts.length %} 6 | 7 | {{ __('total_title') }} 8 | {{ site.posts.length }} 9 | {% if 1 === page.posts.length %} 10 | {{ __('post_title') }} 11 | {% else %} 12 | {{ __('posts_title') }} 13 | {% endif %} 14 | 15 | {% else %} 16 | {{ __('not_post') }} 17 | {% endif %} 18 |

19 | {% set howMuch = {} %} 20 | {% set allPosts = site.posts.sort('date', 'desc') %} 21 | {% for postItem in allPosts %} 22 | {% set thisYear = date(postItem.date, 'YYYY') %} 23 | {% if !howMuch[thisYear] %} 24 | {% set howMuch[thisYear] = 0 %} 25 | {% endif %} 26 | {% set howMuch[thisYear] = howMuch[thisYear] + 1 %} 27 | {% endfor %} 28 | {% set lastYear%} 29 | {% for postItem in allPosts %} 30 | {% set thisYear = date(postItem.date, 'YYYY') %} 31 | {% if thisYear != lastYear %} 32 | {% set lastYear = thisYear %} 33 |

{{ thisYear }} 34 | {% if howMuch[thisYear] %} 35 | 36 | {{ __('total_title') }} 37 | {{ howMuch[thisYear] }} 38 | {% if 1 === howMuch[thisYear] %} 39 | {{ __('post_title') }} 40 | {% else %} 41 | {{ __('posts_title') }} 42 | {% endif %} 43 | 44 | {% else %} 45 | {{ __('not_post') }} 46 | {% endif %} 47 |

48 | {% endif %} 49 | {% include 'post-title-item.swig' %} 50 | {% endfor %} 51 |
52 | {% endif %} 53 | -------------------------------------------------------------------------------- /layout/includes/side-pagination.swig: -------------------------------------------------------------------------------- 1 |
2 | {% if page.prev.path %} 3 | 11 | {% endif %} 12 | {% if page.next.path %} 13 | 21 | {% endif %} 22 |
-------------------------------------------------------------------------------- /layout/includes/social-icon.swig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/includes/toc.swig: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 |

{{__('toc')}}

6 | {{ toc(page.content, {list_number: false}) }} 7 |
8 |
9 | -------------------------------------------------------------------------------- /layout/includes/user-card.swig: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |

{{ site.description || theme.description }}

5 | {% include 'social-icon.swig' %} 6 |
7 |
8 | -------------------------------------------------------------------------------- /layout/includes/uyan.swig: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /layout/includes/valine.swig: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 25 | -------------------------------------------------------------------------------- /layout/index.swig: -------------------------------------------------------------------------------- 1 | {% include 'includes/head.swig' %} 2 |
3 |
4 |
5 | blog avatar 6 |
7 |
8 |
{{ config.title }}
9 |
{{ config.subtitle }}
10 |
11 |
12 |
13 | 21 | {% include 'includes/social-icon.swig' %} 22 | {% set homepageArticleCount = config.homepageArticleCount || theme.homepageArticleCount %} 23 | {% if homepageArticleCount > 0 %} 24 |
25 |
26 | {% set allPosts = site.posts.sort('date', 'desc') %} 27 | {% for idx, postItem in allPosts %} 28 | {% if idx < homepageArticleCount %} 29 | {% include 'includes/post-title-item.swig' %} 30 | {% endif %} 31 | {% endfor %} 32 |
33 | 36 |
37 | {% endif %} 38 |
39 |
40 |
41 | {% include 'includes/footer.swig' %} 42 | -------------------------------------------------------------------------------- /layout/math/index.swig: -------------------------------------------------------------------------------- 1 | {% if theme.math.enable %} 2 | {% set is_index_has_math = false %} 3 | 4 | {# At home, check if there has `mathjax: true` post #} 5 | {% if is_home() %} 6 | {% for post in page.posts %} 7 | {% if post.mathjax and not is_index_has_math %} 8 | {% set is_index_has_math = true %} 9 | {% endif %} 10 | {% endfor %} 11 | {% endif %} 12 | 13 | {% if not theme.math.per_page or (is_index_has_math or page.mathjax) %} 14 | {% if theme.math.engine == 'mathjax' %} 15 | {% include 'mathjax.swig' %} 16 | {% elif theme.math.engine == 'katex' %} 17 | {% include 'katex.swig' %} 18 | {% endif %} 19 | {% endif %} 20 | {% endif %} 21 | -------------------------------------------------------------------------------- /layout/math/katex.swig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /layout/math/mathjax.swig: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /layout/page.swig: -------------------------------------------------------------------------------- 1 | {% extends 'includes/layout.swig' %} 2 | 3 | {% block body %} 4 |
5 | {% set page_title = page.title %} 6 | {% if 'categories' === page.type %} 7 |

{{ page_title || __('category_title') }}

8 | {{ list_categories() }} 9 | {% elif 'tags' === page.type %} 10 |

{{ page_title || __('tag_title') }}

11 |
12 | {{ tagcloud({min_font: 16, max_font: 32, amount: 200, color: true, start_color: '#999', end_color: '#444'}) }} 13 |
14 | {% else %} 15 |

{{ page_title }}

16 | {% if page.photos.length %} 17 | {% include 'includes/gallery.swig' %} 18 | {% endif %} 19 | {% autoescape false %}{{page.content }}{% endautoescape %} 20 | {% if page.comments && (theme.valine.enable) %} 21 | {% include 'includes/valine.swig' %} 22 | {% endif %} 23 | {% endif %} 24 |
25 | 26 | {% include 'includes/pagination.swig' %} 27 | {% include 'includes/jiathis.swig' %} 28 | {% if page.comments && (theme.gitalk.enable) %} 29 | {% include 'includes/gitalk.swig' %} 30 | {% endif %} 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /layout/post.swig: -------------------------------------------------------------------------------- 1 | {% extends 'includes/layout.swig' %} 2 | 3 | {% block body %} 4 | {% include 'math/index.swig' %} 5 |
6 |

{{ page.title || __('without_title') }}

7 |

8 | {{ __('created_at') }} {{ date(page.date) }} 9 | {% if page.date !== page.updated %} 10 | {{ __('updated_at') }} {{ date(page.updated) }} 11 | {% endif %} 12 | {% if page.categories.length %} 13 | {{ __('category_title') }} 14 | {% set i = 0 %} 15 | {% for cat in page.categories %} 16 | {% if i !== 0 %} 17 | {{'/'}} 18 | {% endif %} 19 | {% set i = i + 1 %} 20 | {{ cat.name }} 21 | {% endfor %} 22 | 23 | {% endif %} 24 | {% if page.tags.length %} 25 | 26 | {{ __('tag_title') }} 27 | {% set i = 0 %} 28 | {% for tag in page.tags %} 29 | {% if i !== 0 %} 30 | {{'/'}} 31 | {% endif %} 32 | {% set i = i + 1 %} 33 | {{ tag.name }} 34 | {% endfor %} 35 | 36 | {% endif %} 37 | 38 | 39 | 40 | 41 |

42 | {% if page.photos.length %} 43 | {% include 'includes/gallery.swig' %} 44 | {% endif %} 45 | {% autoescape false %}{{ page.content }}{% endautoescape %} 46 |
47 | {% include 'includes/toc.swig' %} 48 | {% if page.comments && (theme.valine.enable) %} 49 | {% include 'includes/valine.swig' %} 50 | {% endif %} 51 | {% include 'includes/pagination.swig' %} 52 | {% include 'includes/jiathis.swig' %} 53 | {% if page.comments && (theme.gitalk.enable) %} 54 | {% include 'includes/gitalk.swig' %} 55 | {% endif %} 56 | {% endblock %} 57 | -------------------------------------------------------------------------------- /layout/tag.swig: -------------------------------------------------------------------------------- 1 | {% extends 'includes/layout.swig' %} 2 | 3 | {% block body %} 4 |
5 |

{{ page.tag }}

6 | {% set allPosts = site.posts.sort('date', 'desc') %} 7 | {% for postItem in allPosts %} 8 | {% set isShow = false %} 9 | {% for tag in postItem.tags %} 10 | {% if tag.name === page.tag %} 11 | {% set isShow = true %} 12 | {% endif %} 13 | {% endfor %} 14 | {% if isShow %} 15 | {% include 'includes/post-title-item.swig' %} 16 | {% endif %} 17 | {% endfor %} 18 |
19 | 20 | {# {% include 'includes/pagination.swig' %} #} 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /source/css/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/blank.gif -------------------------------------------------------------------------------- /source/css/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/fancybox_loading.gif -------------------------------------------------------------------------------- /source/css/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /source/css/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/fancybox_overlay.png -------------------------------------------------------------------------------- /source/css/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/fancybox_sprite.png -------------------------------------------------------------------------------- /source/css/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /source/css/highlight-railscasts.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Railscasts-like style (c) Visoft, Inc. (Damien White) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #232323; 12 | color: #e6e1dc; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #bc9458; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag { 23 | color: #c26230; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-variable, 30 | .hljs-template-variable { 31 | color: #a5c261; 32 | } 33 | 34 | .hljs-subst { 35 | color: #519f50; 36 | } 37 | 38 | .hljs-tag, 39 | .hljs-name { 40 | color: #e8bf6a; 41 | } 42 | 43 | .hljs-type { 44 | color: #da4939; 45 | } 46 | 47 | 48 | .hljs-symbol, 49 | .hljs-bullet, 50 | .hljs-built_in, 51 | .hljs-builtin-name, 52 | .hljs-attr, 53 | .hljs-link { 54 | color: #6d9cbe; 55 | } 56 | 57 | .hljs-params { 58 | color: #d0d0ff; 59 | } 60 | 61 | .hljs-attribute { 62 | color: #cda869; 63 | } 64 | 65 | .hljs-meta { 66 | color: #9b859d; 67 | } 68 | 69 | .hljs-title, 70 | .hljs-section { 71 | color: #ffc66d; 72 | } 73 | 74 | .hljs-addition { 75 | background-color: #144212; 76 | color: #e6e1dc; 77 | display: inline-block; 78 | width: 100%; 79 | } 80 | 81 | .hljs-deletion { 82 | background-color: #600; 83 | color: #e6e1dc; 84 | display: inline-block; 85 | width: 100%; 86 | } 87 | 88 | .hljs-selector-class { 89 | color: #9b703f; 90 | } 91 | 92 | .hljs-selector-id { 93 | color: #8b98ab; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | 104 | .hljs-link { 105 | text-decoration: underline; 106 | } 107 | -------------------------------------------------------------------------------- /source/css/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1475620527'); /* IE9*/ 4 | src: url('iconfont.eot?t=1475620527#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('iconfont.woff?t=1475620527') format('woff'), /* chrome, firefox */ 6 | url('iconfont.ttf?t=1475620527') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1475620527#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -webkit-text-stroke-width: 0.2px; 16 | -moz-osx-font-smoothing: grayscale; 17 | } 18 | .icon-Twitter:before { content: "\e600"; } 19 | .icon-sociallinkedin:before { content: "\e601"; } 20 | .icon-weibo:before { content: "\e602"; } 21 | .icon-iconsf:before { content: "\e611"; } 22 | .icon-google:before { content: "\e603"; } 23 | .icon-rss:before { content: "\e60e"; } 24 | .icon-facebook:before { content: "\e604"; } 25 | .icon-lofter:before { content: "\e60d"; } 26 | .icon-dribbble:before { content: "\e605"; } 27 | .icon-youtube:before { content: "\e60a"; } 28 | .icon-twelve:before { content: "\e60c"; } 29 | .icon-instagram:before { content: "\e613"; } 30 | .icon-iconfontzhihu:before { content: "\e60b"; } 31 | .icon-github:before { content: "\e606"; } 32 | .icon-coding-copy:before { content: "\e607"; } 33 | .icon-slice1:before { content: "\e608"; } 34 | .icon-douban-copy:before { content: "\e60f"; } 35 | .icon-jianshu:before { content: "\e614"; } 36 | .icon-stackoverflow:before { content: "\e612"; } 37 | -------------------------------------------------------------------------------- /source/css/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/iconfont/iconfont.eot -------------------------------------------------------------------------------- /source/css/iconfont/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20120731 at Wed Oct 5 06:35:27 2016 6 | By admin 7 | 8 | 9 | 10 | 24 | 26 | 28 | 30 | 32 | 36 | 39 | 41 | 48 | 52 | 54 | 63 | 68 | 74 | 76 | 78 | 82 | 86 | 88 | 92 | 94 | 98 | 100 | 103 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /source/css/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /source/css/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/iconfont/iconfont.woff -------------------------------------------------------------------------------- /source/css/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 | } -------------------------------------------------------------------------------- /source/css/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/css/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/next.png -------------------------------------------------------------------------------- /source/css/plyr.css: -------------------------------------------------------------------------------- 1 | .plyr .plyr__video-embed iframe,.plyr__tooltip{pointer-events:none}@-webkit-keyframes plyr-progress{to{background-position:25px 0}}@keyframes plyr-progress{to{background-position:25px 0}}.plyr{position:relative;max-width:100%;min-width:200px;font-family:Avenir,"Avenir Next","Helvetica Neue","Segoe UI",Helvetica,Arial,sans-serif}.plyr,.plyr *,.plyr ::after,.plyr ::before{box-sizing:border-box}.plyr a,.plyr button,.plyr input,.plyr label{-ms-touch-action:manipulation;touch-action:manipulation}.plyr audio,.plyr video{width:100%;height:auto;vertical-align:middle;border-radius:inherit}.plyr input[type=range]{display:block;height:20px;width:100%;margin:0;padding:0;vertical-align:middle;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;border:none;background:0 0}.plyr input[type=range]::-webkit-slider-runnable-track{height:8px;background:0 0;border:0;border-radius:4px;-webkit-user-select:none;user-select:none}.plyr input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;position:relative;height:16px;width:16px;background:#fff;border:2px solid transparent;border-radius:100%;transition:background .2s ease,border .2s ease,-webkit-transform .2s ease;transition:background .2s ease,border .2s ease,transform .2s ease;transition:background .2s ease,border .2s ease,transform .2s ease,-webkit-transform .2s ease;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.15);box-sizing:border-box}.plyr input[type=range]::-moz-range-track{height:8px;background:0 0;border:0;border-radius:4px;-moz-user-select:none;user-select:none}.plyr input[type=range]::-moz-range-thumb{position:relative;height:16px;width:16px;background:#fff;border:2px solid transparent;border-radius:100%;transition:background .2s ease,border .2s ease,-webkit-transform .2s ease;transition:background .2s ease,border .2s ease,transform .2s ease;transition:background .2s ease,border .2s ease,transform .2s ease,-webkit-transform .2s ease;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.15);box-sizing:border-box}.plyr input[type=range]::-ms-track{height:8px;background:0 0;border:0;color:transparent}.plyr input[type=range]::-ms-fill-upper{height:8px;background:0 0;border:0;border-radius:4px;-ms-user-select:none;user-select:none}.plyr input[type=range]::-ms-fill-lower{height:8px;border:0;border-radius:4px;-ms-user-select:none;user-select:none;background:#3498db}.plyr input[type=range]::-ms-thumb{position:relative;height:16px;width:16px;background:#fff;border:2px solid transparent;border-radius:100%;transition:background .2s ease,border .2s ease,-webkit-transform .2s ease;transition:background .2s ease,border .2s ease,transform .2s ease;transition:background .2s ease,border .2s ease,transform .2s ease,-webkit-transform .2s ease;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.15);box-sizing:border-box;margin-top:0}.plyr input[type=range]::-ms-tooltip{display:none}.plyr input[type=range]:focus{outline:0}.plyr input[type=range]::-moz-focus-outer{border:0}.plyr input[type=range].tab-focus:focus{outline-offset:3px}.plyr input[type=range]:active::-webkit-slider-thumb{background:#3498db;border-color:#fff;-webkit-transform:scale(1.25);transform:scale(1.25)}.plyr input[type=range]:active::-moz-range-thumb{background:#3498db;border-color:#fff;transform:scale(1.25)}.plyr input[type=range]:active::-ms-thumb{background:#3498db;border-color:#fff;transform:scale(1.25)}.plyr--video input[type=range].tab-focus:focus{outline:rgba(255,255,255,.5) dotted 1px}.plyr--audio input[type=range].tab-focus:focus{outline:rgba(86,93,100,.5) dotted 1px}.plyr__sr-only{position:absolute!important;clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.plyr__video-wrapper{position:relative;background:#000;border-radius:inherit;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.plyr__video-embed{padding-bottom:56.25%;height:0;overflow:hidden;border-radius:inherit}.plyr__video-embed iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.plyr__video-embed>div{position:relative;padding-bottom:200%;-webkit-transform:translateY(-35.95%);transform:translateY(-35.95%)}.plyr video::-webkit-media-text-track-container{display:none}.plyr__captions{display:none;position:absolute;bottom:0;left:0;width:100%;padding:20px;-webkit-transform:translateY(-60px);transform:translateY(-60px);transition:-webkit-transform .3s ease;transition:transform .3s ease;transition:transform .3s ease,-webkit-transform .3s ease;color:#fff;font-size:20px;text-align:center;font-weight:400}.plyr__captions span{border-radius:2px;padding:3px 10px;background:rgba(0,0,0,.85)}.plyr__captions span:empty{display:none}@media (min-width:768px){.plyr__captions{font-size:24px}}.plyr--captions-active .plyr__captions{display:block}.plyr--fullscreen-active .plyr__captions{font-size:32px}.plyr--hide-controls .plyr__captions{-webkit-transform:translateY(-20px);transform:translateY(-20px)}.plyr__controls{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;line-height:1;text-align:center;transition:opacity .3s ease}.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>button{margin-left:5px}.plyr__controls .plyr__progress:first-child,.plyr__controls .plyr__time:first-child,.plyr__controls>button:first-child{margin-left:0}.plyr__controls .plyr__volume{margin-left:5px}.plyr__controls [data-plyr=pause]{margin-left:0}.plyr__controls button{position:relative;display:inline-block;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;vertical-align:middle;padding:5px;border:0;background:0 0;border-radius:3px;cursor:pointer;transition:background .3s ease,color .3s ease,opacity .3s ease;color:inherit}.plyr__controls button svg{width:18px;height:18px;display:block;fill:currentColor}.plyr__controls button:focus{outline:0}.plyr__controls .icon--captions-on,.plyr__controls .icon--exit-fullscreen,.plyr__controls .icon--muted{display:none}@media (min-width:480px){.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>button{margin-left:10px}.plyr__controls button{padding:5px 10px}}.plyr--hide-controls .plyr__controls{opacity:0}.plyr--video .plyr__controls{position:absolute;left:0;right:0;bottom:0;padding:50px 10px 10px;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.5));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;color:#fff}.plyr--video .plyr__controls button.tab-focus:focus,.plyr--video .plyr__controls button:hover{background:#3498db;color:#fff}@media (min-width:480px){.plyr--video .plyr__controls{padding-left:15px;padding-right:15px}}.plyr--audio .plyr__controls{padding:10px;border-radius:inherit;background:#fff;border:1px solid #dbe3e8;box-shadow:0 1px 1px rgba(0,0,0,.05);color:#565D64}.plyr--audio .plyr__controls button.tab-focus:focus,.plyr--audio .plyr__controls button:hover,.plyr__play-large{background:#3498db;color:#fff}.plyr__play-large{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);padding:10px;border:4px solid currentColor;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15);transition:opacity .3s ease,visibility .3s ease}.plyr__play-large svg{position:relative;left:2px;width:20px;height:20px;display:block;fill:currentColor}.plyr--audio .plyr__play-large,.plyr--playing .plyr__controls [data-plyr=play],.plyr__controls [data-plyr=pause]{display:none}.plyr__play-large:focus{outline:rgba(255,255,255,.5) dotted 1px}.plyr--playing .plyr__play-large{opacity:0;visibility:hidden}.plyr--playing .plyr__controls [data-plyr=pause]{display:inline-block}.plyr--captions-active .plyr__controls .icon--captions-on,.plyr--fullscreen-active .icon--exit-fullscreen,.plyr--muted .plyr__controls .icon--muted{display:block}.plyr [data-plyr=captions],.plyr [data-plyr=fullscreen],.plyr--captions-active .plyr__controls .icon--captions-on+svg,.plyr--fullscreen-active .icon--exit-fullscreen+svg,.plyr--muted .plyr__controls .icon--muted+svg{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__tooltip{position:absolute;z-index:2;bottom:100%;margin-bottom:10px;padding:5px 7.5px;opacity:0;background:#000;box-shadow:0 0 5px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.1);border-radius:3px;color:#fff;font-size:14px;line-height:1.3;-webkit-transform:translate(-50%,10px) scale(.8);transform:translate(-50%,10px) scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transition:opacity .2s .1s ease,-webkit-transform .2s .1s ease;transition:transform .2s .1s ease,opacity .2s .1s ease;transition:transform .2s .1s ease,opacity .2s .1s ease,-webkit-transform .2s .1s ease}.plyr__tooltip::before{content:'';position:absolute;width:0;height:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:-4px;border-right:4px solid transparent;border-top:4px solid #000;border-left:4px solid transparent;z-index:2}.plyr button.tab-focus:focus .plyr__tooltip,.plyr button:hover .plyr__tooltip,.plyr__tooltip--visible{opacity:1;-webkit-transform:translate(-50%,0) scale(1);transform:translate(-50%,0) scale(1)}.plyr button:hover .plyr__tooltip{z-index:3}.plyr__progress{position:relative;-webkit-flex:1;-ms-flex:1;flex:1}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress input[type=range]::-webkit-slider-runnable-track{background:0 0}.plyr__progress input[type=range]::-moz-range-track{background:0 0}.plyr__progress input[type=range]::-ms-fill-upper{background:0 0}.plyr__progress .plyr__tooltip{left:0}.plyr__progress--buffer,.plyr__progress--played,.plyr__volume--display{position:absolute;left:0;top:50%;width:100%;height:8px;margin:-4px 0 0;padding:0;vertical-align:top;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:100px}.plyr__progress--buffer::-webkit-progress-bar,.plyr__progress--played::-webkit-progress-bar,.plyr__volume--display::-webkit-progress-bar{background:0 0}.plyr__progress--buffer::-webkit-progress-value,.plyr__progress--played::-webkit-progress-value,.plyr__volume--display::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:8px}.plyr__progress--buffer::-moz-progress-bar,.plyr__progress--played::-moz-progress-bar,.plyr__volume--display::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:8px}.plyr__progress--buffer::-ms-fill,.plyr__progress--played::-ms-fill,.plyr__volume--display::-ms-fill{border-radius:100px}.plyr__progress--played,.plyr__volume--display{z-index:1;color:#3498db;background:0 0;transition:none}.plyr__progress--played::-webkit-progress-value,.plyr__volume--display::-webkit-progress-value{min-width:8px;max-width:99%;border-top-right-radius:0;border-bottom-right-radius:0}.plyr__progress--played::-moz-progress-bar,.plyr__volume--display::-moz-progress-bar{min-width:8px;max-width:99%;border-top-right-radius:0;border-bottom-right-radius:0}.plyr__progress--played::-ms-fill,.plyr__volume--display::-ms-fill{display:none}.plyr__progress--buffer::-webkit-progress-value{transition:width .2s ease}.plyr__progress--buffer::-moz-progress-bar{transition:width .2s ease}.plyr__progress--buffer::-ms-fill{transition:width .2s ease}.plyr--video .plyr__progress--buffer,.plyr--video .plyr__volume--display{background:rgba(255,255,255,.25)}.plyr--video .plyr__progress--buffer{color:rgba(255,255,255,.25)}.plyr--audio .plyr__progress--buffer,.plyr--audio .plyr__volume--display{background:rgba(198,214,219,.66)}.plyr--audio .plyr__progress--buffer{color:rgba(198,214,219,.66)}.plyr--loading .plyr__progress--buffer{-webkit-animation:plyr-progress 1s linear infinite;animation:plyr-progress 1s linear infinite;background-size:25px 25px;background-repeat:repeat-x;background-image:linear-gradient(-45deg,rgba(0,0,0,.15) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.15) 50%,rgba(0,0,0,.15) 75%,transparent 75%,transparent);color:transparent}.plyr--video.plyr--loading .plyr__progress--buffer{background-color:rgba(255,255,255,.25)}.plyr--audio.plyr--loading .plyr__progress--buffer{background-color:rgba(198,214,219,.66)}.plyr__time{display:inline-block;vertical-align:middle;font-size:14px;line-height:.95}.plyr__time+.plyr__time{display:none}@media (min-width:768px){.plyr__time+.plyr__time{display:inline-block}}.plyr__time+.plyr__time::before{content:'\2044';margin-right:10px}.plyr .plyr__volume{display:none;position:relative}.plyr .plyr__volume input[type=range]{position:relative;z-index:2}@media (min-width:480px){.plyr .plyr__volume{display:block;max-width:60px}}@media (min-width:768px){.plyr .plyr__volume{max-width:100px}}.plyr--is-ios .plyr__volume,.plyr--is-ios [data-plyr=mute]{display:none!important}.plyr--fullscreen,.plyr--fullscreen-active{position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:10000000;background:#000;border-radius:0}.plyr--fullscreen video,.plyr--fullscreen-active video{height:100%}.plyr--fullscreen .plyr__video-wrapper,.plyr--fullscreen-active .plyr__video-wrapper{height:100%;width:100%}.plyr--fullscreen .plyr__controls,.plyr--fullscreen-active .plyr__controls{position:absolute;bottom:0;left:0;right:0} -------------------------------------------------------------------------------- /source/css/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/css/prev.png -------------------------------------------------------------------------------- /source/css/random.styl: -------------------------------------------------------------------------------- 1 | // desktop max width 2 | desktopWidth = 760px 3 | mdDesktopWidth = 860px 4 | lgDesktopWidth = 960px 5 | // content margin site on desktop 6 | marginBorder = 10px 7 | opacityValue = 0.95 8 | // mobile max width 9 | mobileMaxWidth = 480px 10 | mobileOpacityValue = 0.95 11 | codeFontFamily = SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace 12 | // code line height 13 | codeLineHeight = 22px 14 | body 15 | background-color: #34495E; 16 | margin: 0px; 17 | font: 400 1em/1.8 'Microsoft Yahei', 'PingFang SC', 'Avenir', 'Segoe UI', 'Hiragino Sans GB', STHeiti, 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif 18 | font-size: 18px; 19 | display: flex; 20 | justify-content: center; 21 | align-content: center; 22 | height: 100vh; 23 | @media (max-width: mdDesktopWidth) 24 | font-size: 16px; 25 | article 26 | line-height: 1.5em; 27 | .highlight 28 | line-height: 1.25em; 29 | a { 30 | text-decoration: none; 31 | color: #3A539B; 32 | } 33 | 34 | a:hover { 35 | // background-color: #1E8BC3; 36 | // color: #fff; 37 | text-decoration: underline; 38 | } 39 | 40 | #outer-container { 41 | position: absolute; 42 | left: 50%; 43 | width: lgDesktopWidth; 44 | margin-left: - (lgDesktopWidth / 2); 45 | @media (max-width: lgDesktopWidth) { 46 | width: mdDesktopWidth; 47 | margin-left: - (mdDesktopWidth / 2); 48 | } 49 | @media (max-width: mdDesktopWidth) { 50 | width: desktopWidth; 51 | margin-left: - (desktopWidth / 2); 52 | } 53 | // box-shadow: 0px 0px 5px 5px rgba(0, 0, 0, .55); 54 | box-shadow: 0 0 2.5em #5d656c; 55 | } 56 | 57 | #menu-outer, #container 58 | background-color: #fff; 59 | 60 | #menu-outer, #bottom-outer, #random-index { 61 | opacity: opacityValue; 62 | } 63 | 64 | .random-center { 65 | display: flex; 66 | justify-content: center; 67 | align-items: center; 68 | } 69 | 70 | #random-index { 71 | margin: 10px; 72 | padding: 40px; 73 | text-align: center; 74 | border-radius: 10px; 75 | background-color: #ecf0f1; 76 | width: 520px; 77 | } 78 | 79 | #random-index .index-article-container { 80 | .index-article-list { 81 | text-align: left; 82 | .post-title-item { 83 | margin-left: 0px; 84 | a { 85 | padding-left: 0px; 86 | } 87 | } 88 | } 89 | .show-all-link { 90 | text-align: right; 91 | a { 92 | color: #888; 93 | font-size: 12px; 94 | } 95 | } 96 | } 97 | 98 | #random-index a { 99 | // text-transform: uppercase; 100 | padding: 5px; 101 | } 102 | 103 | #random-index .title { 104 | font-size: 28px; 105 | font-weight: 900; 106 | font-color: #34495e; 107 | // text-shadow: 0 2px rgb(127, 140, 141); 108 | padding-bottom: 5px; 109 | cursor: pointer; 110 | } 111 | 112 | #random-index .title a { 113 | color: #34495e; 114 | } 115 | 116 | #random-index .title a:hover { 117 | color: #34495e; 118 | text-decoration: none; 119 | background-color: transparent; 120 | } 121 | 122 | .sub-title { 123 | cursor: pointer; 124 | font-weight: none; 125 | padding-bottom: 10px; 126 | } 127 | 128 | #random-index .index-nav-link { 129 | list-style: none; 130 | padding: 5px 0px 5px 0px; 131 | } 132 | 133 | #random-index .index-nav-link li { 134 | display: inline; 135 | padding-left: 5px; 136 | } 137 | 138 | #random-index hr { 139 | width: 75%; 140 | color: #7f8c8d; 141 | margin: 0px auto; 142 | } 143 | 144 | .center-field { 145 | margin: 0 auto; 146 | } 147 | 148 | .avatar { 149 | cursor: pointer; 150 | margin-top: -70px; 151 | border: 2px solid white; 152 | border-radius: 50%; 153 | background-color: #ecf0f1; 154 | box-shadow: 0 0px 3px 1px rgba(0,0,0,0.3); 155 | } 156 | 157 | // menu start 158 | #menu-outer 159 | margin: 0px; 160 | padding: 0px; 161 | position: fixed; 162 | z-index: 1; 163 | transition-property: all; 164 | transition-duration: .5s; 165 | transition-timing-function: cubic-bezier(0, 1, 0.5, 1); 166 | 167 | .slide-up 168 | top: -50px; 169 | 170 | .slide-down 171 | top: 0; 172 | 173 | #menu-inner 174 | line-height: 50px; 175 | height: 49px; 176 | border-bottom: 1px solid #ddd; 177 | // height: 20px; 178 | padding: 0px marginBorder 0 marginBorder; 179 | width: lgDesktopWidth - marginBorder * 2; 180 | @media (max-width: lgDesktopWidth) 181 | width: mdDesktopWidth - marginBorder * 2; 182 | @media (max-width: mdDesktopWidth) 183 | width: desktopWidth - marginBorder * 2; 184 | 185 | #menu-inner .left 186 | float: left; 187 | 188 | #menu-inner #brand 189 | // margin: 0px; 190 | float: left; 191 | // display: inline-block; 192 | vertical-align: middle; 193 | cursor: pointer; 194 | 195 | #menu-inner #homelink 196 | line-height: 32px; 197 | display: inline-block; 198 | 199 | #menu-inner #brand a 200 | top: 0; 201 | color: #000; 202 | 203 | #menu-inner #brand a:hover 204 | background-color: #fff; 205 | text-decoration: none; 206 | 207 | #menu-list 208 | line-style: none; 209 | display: inline-block; 210 | float: right; 211 | padding-left: 0px; 212 | 213 | #menu-list ul 214 | margin: 0px; 215 | 216 | #menu-list ul li 217 | padding: 5px; 218 | margin: 5px; 219 | text-align: center; 220 | display: inline; 221 | 222 | #menu-list ul li.active 223 | font-weight: 900; 224 | #menu-list ul li.active a 225 | color: #000; 226 | 227 | #menu-list ul li:hover 228 | font-weight: 900; 229 | 230 | #menu-list ul li a 231 | text-decoration: none; 232 | 233 | #menu-outer #avatar 234 | border-radius: 50%; 235 | border: 2px wihte solid; 236 | box-shadow: 0 0px 3px 1px rgba(0,0,0,0.3); 237 | vertical-align: middle; 238 | width: 32px; 239 | height: 32px; 240 | 241 | // menu end 242 | 243 | // bottom start 244 | #bottom-outer 245 | color: #888; 246 | text-align: center; 247 | padding: marginBorder; 248 | padding-top: 40px; 249 | background-color: #fff; 250 | font-size: 14px; 251 | @media (max-width: lgDesktopWidth) 252 | font-size: 12px; 253 | // bottom end 254 | 255 | // content start 256 | #container 257 | margin-top: 50px; 258 | 259 | #content-outer 260 | padding: marginBorder; 261 | 262 | // content end 263 | 264 | .tag-cloud-tags 265 | text-align: center; 266 | 267 | .tag-cloud-tags a 268 | // background-color: #e8e8e8; 269 | padding: 3px; 270 | 271 | .tag-cloud-tags a:hover 272 | text-decoration: none; 273 | background-color: #bbb; 274 | color: #000; 275 | 276 | .center-title 277 | text-align: center; 278 | 279 | .category-list 280 | text-align: center; 281 | padding-left: 0px; 282 | 283 | ul.category-list 284 | list-style: none; 285 | 286 | ul.category-list li 287 | display: inline-block; 288 | margin: 10px; 289 | 290 | ul.category-list li a 291 | padding: 8px; 292 | margin: 8px; 293 | background-color: #EEE; 294 | color: #000; 295 | 296 | ul.category-list li a:hover 297 | background-color: #DDD; 298 | text-decoration: none; 299 | 300 | // archive start 301 | .archive-year-title 302 | margin: 10px 0 5px 0; 303 | 304 | .posts-count 305 | font-size: 12px; 306 | font-weight: normal; 307 | color: #888; 308 | font-style: italic; 309 | 310 | .post-title-item 311 | margin-left: 20px; 312 | padding-left: 5px; 313 | border-left: 2px #BBB solid; 314 | 315 | .post-title-item:hover 316 | border-left: 4px #1E8BC3 solid; 317 | // archive end8 318 | 319 | .post-title-item p 320 | margin-top: 2px; 321 | 322 | #pagination 323 | margin-top: 20px; 324 | text-align: center; 325 | 326 | #pagination a 327 | padding: 5px; 328 | background-color: #EEE; 329 | line-height: 28px; 330 | 331 | #pagination a:hover 332 | background-color: #DDD; 333 | color: #1F3A93; 334 | text-decoration: none; 335 | 336 | // hide all button 337 | #btn-view 338 | color: #C8F7C5; 339 | text-align: center; 340 | background-color: #0b2d1b; 341 | border-radius: 50%; 342 | line-height: 40px; 343 | display: block; 344 | position: fixed; 345 | bottom: 10%; 346 | left: 5%; 347 | margin-left: 20px; 348 | height: 40px; 349 | width: 40px; 350 | cursor: pointer; 351 | opacity: 0.65; 352 | 353 | #btn-view:hover 354 | opacity: 0.95; 355 | box-shadow: 0 0px 10px 5px rgba(46, 204, 113, 0.9); 356 | 357 | .page-title-sub 358 | color: #888; 359 | font-size: 14px; 360 | @media (max-width: lgDesktopWidth) 361 | font-size: 12px; 362 | 363 | .page-title-sub span 364 | margin-right: 5px; 365 | 366 | article img 367 | max-width: lgDesktopWidth - marginBorder * 2; 368 | @media (max-width: lgDesktopWidth) 369 | max-width: mdDesktopWidth - marginBorder * 2; 370 | @media (max-width: mdDesktopWidth) 371 | max-width: desktopWidth - marginBorder * 2; 372 | 373 | #user-card 374 | text-align: center; 375 | color: #333; 376 | display: none; 377 | // width: 400px; 378 | 379 | #user-card .avatar 380 | width: 96px; 381 | height: 96px; 382 | margin-top: 0px; 383 | // margin-top: -110px; 384 | 385 | #user-card ul 386 | list-style: none; 387 | padding: 0px; 388 | 389 | #user-card ul li 390 | display: inline; 391 | margin: 0px; 392 | padding: 0px 3px; 393 | 394 | #show-menu 395 | display: none; 396 | // position: static; 397 | // text-align: right; 398 | float: right; 399 | // margin-right: 10px; 400 | 401 | #show-menu button 402 | background-color: #EEE; 403 | border: 1px #444 solid; 404 | padding: 6px; 405 | position: static; 406 | right: 0; 407 | left: auto; 408 | 409 | .category-list-item .active 410 | background-color: #4183D7; 411 | color: #fff; 412 | .category-list-item .active:hover 413 | background-color: #22A7F0; 414 | 415 | .social-icon 416 | padding-left: 0px; 417 | 418 | .social-icon li 419 | display: inline; 420 | 421 | .social-icon li a 422 | color: gray; 423 | 424 | .social-icon li a i 425 | font-size: 25px; 426 | 427 | .social-icon li a:hover 428 | text-decoration: none; 429 | 430 | .douban:hover 431 | color: #072; 432 | .twitter:hover 433 | color: #1da1f2; 434 | .linkedin:hover 435 | color: #333; 436 | .weibo:hover 437 | color: #fa7d3c; 438 | .google-plus:hover 439 | color: #d73d32; 440 | .facebook:hover 441 | color: #0e385f; 442 | .dribbble:hover 443 | color: #ea4c89; 444 | .github:hover 445 | color: #4078c0; 446 | .coding:hover 447 | color: #000; 448 | .npmjs:hover 449 | color: #cb3837; 450 | .youtube:hover 451 | color: #cc181e; 452 | .zhihu:hover 453 | color: #0e78e7; 454 | .lofter:hover 455 | color: #444; 456 | .quora:hover 457 | color: #b92b27; 458 | .rss:hover 459 | color: #D35400; 460 | .jian:hover 461 | color: #de533a; 462 | .instagram:hover 463 | color: #fd1d1d; 464 | .stackoverflow:hover 465 | color: #f48024; 466 | .segmentfault:hover 467 | color: #005f3c; 468 | .side-navigate 469 | position: fixed; 470 | top: 60%; 471 | width: 100%; 472 | z-index: 2; 473 | pointer-events: none; 474 | 475 | .side-navigate .item 476 | display: table-cell; 477 | 478 | .side-navigate .item-icon:hover 479 | // border: 5px #52B3D9 solid; 480 | opacity: 1; 481 | background-size: 40px 40px; 482 | 483 | .side-navigate .item-icon 484 | pointer-events: auto; 485 | opacity: 0.55; 486 | padding: 20px; 487 | border-radius: 50%; 488 | border: 1px #52B3D9 solid; 489 | width: 30px; 490 | height: 30px; 491 | background-repeat: no-repeat; 492 | background-position: center; 493 | background-size: 30px 30px; 494 | 495 | // .side-navigate .item-icon:hover 496 | // display: none; 497 | .side-navigate a:hover + div 498 | display: block; 499 | .side-navigate a:hover 500 | display: block; 501 | 502 | .side-navigate .prev .item-icon 503 | background-image: url('prev.png'); 504 | float: left; 505 | .side-navigate .prev 506 | display: inline-block; 507 | left: 0; 508 | 509 | .side-navigate .item-title 510 | display: none; 511 | padding: 10px; 512 | max-width: 300px; 513 | vertical-align: center; 514 | background-color: #52B3D9; 515 | height: 52px; 516 | 517 | .side-navigate .next .item-icon 518 | background-image: url('next.png') 519 | float: right; 520 | .side-navigate .prev .item-title 521 | margin-left: 70px; 522 | .side-navigate .next .item-title 523 | margin-right: 70px; 524 | 525 | .side-navigate .next 526 | // text-align: right; 527 | display: inline-block; 528 | float: right; 529 | right: 0; 530 | 531 | .fancybox-thumb:hover 532 | text-decoration: none; 533 | .fancybox-thumb img 534 | max-width: 120px; 535 | max-height: 120px; 536 | padding: 3px; 537 | border-radius: 5%; 538 | border: 1px solid #DDD; 539 | 540 | .caption 541 | display: block; 542 | text-align: center; 543 | font-size: 14px; 544 | color: #999; 545 | 546 | .random-toc-area 547 | position: fixed; 548 | width: 200px; 549 | // right: 0px; 550 | top: 50px; 551 | left: calc(50vw - (960px / 2) - 220px); 552 | display: block; 553 | @media (max-width: lgDesktopWidth + 400px) 554 | display: none; 555 | 556 | .random-toc 557 | // top: 30px; 558 | background: rgba(0, 0, 0, .6); 559 | color: #bbb; 560 | max-height: 500px; 561 | padding: 4px; 562 | margin-top: 0px; 563 | font-size: 12px; 564 | height: 100%; 565 | overflow-y: auto; 566 | border-radius: 0px 0px 6px 6px; 567 | .random-toc ol 568 | padding-left: 15px; 569 | .random-toc h2 570 | text-align: center; 571 | .random-toc a 572 | color: #bbb; 573 | display: block; 574 | // .random-toc li:hover 575 | .toc-text 576 | display: block; 577 | .toc-text:hover 578 | background-color: rgba(255, 255, 255, .2); 579 | .toc-link:hover 580 | text-decoration: none; 581 | .btn-hide-toc 582 | border: none; 583 | border-radius: 6px 6px 0px 0px; 584 | z-index: 1; 585 | display: block; 586 | width: 100%; 587 | background-color: #666; 588 | height: 30px; 589 | color: #bbb; 590 | cursor: pointer; 591 | .btn-hide-toc:hover 592 | background-color: #888; 593 | .btn-hide-toc-show 594 | border-radius: 6px; 595 | // code style 596 | figure.highlight 597 | margin: 0px -10px 0px -10px; 598 | 599 | td.gutter 600 | padding-right: 20px; 601 | 602 | .line 603 | height: codeLineHeight; 604 | 605 | code 606 | font-family: codeFontFamily; 607 | background-color: #ddd; 608 | font-style: italic; 609 | padding-left: 12px; 610 | padding-right: 12px; 611 | 612 | table .line 613 | font-family: codeFontFamily; 614 | height: codeLineHeight; 615 | 616 | blockquote 617 | background-color: #EEE; 618 | padding: 2px 10px; 619 | border-left: 2px solid #999; 620 | 621 | // side-navigate, hide while max-width < desktopWidth + 300px 622 | @media (max-width: desktopWidth + 300px) 623 | .side-navigate 624 | display: none; 625 | .jiathis_style 626 | display: none; 627 | visibility: hidden; 628 | 629 | // mobile 630 | @media (max-width: desktopWidth) 631 | #outer-container,.random-center,#menu-outer 632 | width: 100%; 633 | #outer-container 634 | left: 0%; 635 | margin-left: 0px; 636 | #menu-inner 637 | width: 95%; 638 | padding: 0 2%; 639 | .post-title-item 640 | margin-left: 3px; 641 | #show-menu 642 | display: inline-block; 643 | article img 644 | width: 95% 645 | #menu-list 646 | display: none; 647 | position: absolute; 648 | margin-top: 50px; 649 | background-color: #FFF; 650 | opacity: opacityValue; 651 | width: 100%; 652 | #menu-list ul 653 | padding-left: 0px; 654 | #menu-list ul li 655 | text-align: center; 656 | display: block; 657 | .highlight 658 | margin-left: 0px; 659 | margin-right: 0px; 660 | // #user-card 661 | // width: 200px; 662 | @media (max-width: mobileMaxWidth) 663 | .random-center 664 | position: static; 665 | left: 0; 666 | margin-left: 0px; 667 | width: 100%; 668 | #random-index 669 | width: 100%; 670 | padding: 5px; 671 | #random-index .index-nav-link 672 | margin: 5px; 673 | .social-icon 674 | margin: 0px; 675 | #bottom-outer, #random-index 676 | opacity: mobileOpacityValue; 677 | #menu-outer 678 | opacity: mobileOpacityValue; 679 | 680 | @media (max-height: 480px) 681 | .random-center 682 | position: static; 683 | top: 0; 684 | left: 0; 685 | margin-left: 0px; 686 | margin-top: 95px; 687 | width: 100%; 688 | #random-index 689 | width: 100%; 690 | padding: 5px; 691 | #random-index .index-nav-link 692 | li 693 | display: block; 694 | padding: 0px 0px; 695 | @media (max-height: 320px) 696 | .random-center 697 | margin-top: 75px; 698 | -------------------------------------------------------------------------------- /source/css/sprite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/css/vegas.min.css: -------------------------------------------------------------------------------- 1 | .vegas-overlay,.vegas-slide,.vegas-slide-inner,.vegas-timer,.vegas-wrapper{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;border:none;padding:0;margin:0}.vegas-overlay{opacity:.5;background:url(overlays/02.png) center center}.vegas-timer{top:auto;bottom:0;height:2px}.vegas-timer-progress{width:0;height:100%;background:#fff;-webkit-transition:width ease-out;transition:width ease-out}.vegas-timer-running .vegas-timer-progress{width:100%}.vegas-slide,.vegas-slide-inner{margin:0;padding:0;background:center center no-repeat;-webkit-transform:translateZ(0);transform:translateZ(0)}body .vegas-container{overflow:hidden!important;position:relative}.vegas-video{min-width:100%;min-height:100%;width:auto;height:auto}body.vegas-container{overflow:auto;position:static;z-index:-2}body.vegas-container>.vegas-overlay,body.vegas-container>.vegas-slide,body.vegas-container>.vegas-timer{position:fixed;z-index:-1}:root body.vegas-container>.vegas-overlay,:root body.vegas-container>.vegas-slide,_::full-page-media,_:future{bottom:-76px}.vegas-transition-fade,.vegas-transition-fade2{opacity:0}.vegas-transition-fade-in,.vegas-transition-fade2-in{opacity:1}.vegas-transition-fade2-out{opacity:0}.vegas-transition-blur,.vegas-transition-blur2{opacity:0;-webkit-filter:blur(32px);filter:blur(32px)}.vegas-transition-blur-in,.vegas-transition-blur2-in{opacity:1;-webkit-filter:blur(0);filter:blur(0)}.vegas-transition-blur2-out{opacity:0}.vegas-transition-flash,.vegas-transition-flash2{opacity:0;-webkit-filter:brightness(25);filter:brightness(25)}.vegas-transition-flash-in,.vegas-transition-flash2-in{opacity:1;-webkit-filter:brightness(1);filter:brightness(1)}.vegas-transition-flash2-out{opacity:0;-webkit-filter:brightness(25);filter:brightness(25)}.vegas-transition-negative,.vegas-transition-negative2{opacity:0;-webkit-filter:invert(100%);filter:invert(100%)}.vegas-transition-negative-in,.vegas-transition-negative2-in{opacity:1;-webkit-filter:invert(0);filter:invert(0)}.vegas-transition-negative2-out{opacity:0;-webkit-filter:invert(100%);filter:invert(100%)}.vegas-transition-burn,.vegas-transition-burn2{opacity:0;-webkit-filter:contrast(1000%) saturate(1000%);filter:contrast(1000%) saturate(1000%)}.vegas-transition-burn-in,.vegas-transition-burn2-in{opacity:1;-webkit-filter:contrast(100%) saturate(100%);filter:contrast(100%) saturate(100%)}.vegas-transition-burn2-out{opacity:0;-webkit-filter:contrast(1000%) saturate(1000%);filter:contrast(1000%) saturate(1000%)}.vegas-transition-slideLeft,.vegas-transition-slideLeft2{-webkit-transform:translateX(100%);transform:translateX(100%)}.vegas-transition-slideLeft-in,.vegas-transition-slideLeft2-in{-webkit-transform:translateX(0);transform:translateX(0)}.vegas-transition-slideLeft2-out,.vegas-transition-slideRight,.vegas-transition-slideRight2{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.vegas-transition-slideRight-in,.vegas-transition-slideRight2-in{-webkit-transform:translateX(0);transform:translateX(0)}.vegas-transition-slideRight2-out{-webkit-transform:translateX(100%);transform:translateX(100%)}.vegas-transition-slideUp,.vegas-transition-slideUp2{-webkit-transform:translateY(100%);transform:translateY(100%)}.vegas-transition-slideUp-in,.vegas-transition-slideUp2-in{-webkit-transform:translateY(0);transform:translateY(0)}.vegas-transition-slideDown,.vegas-transition-slideDown2,.vegas-transition-slideUp2-out{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.vegas-transition-slideDown-in,.vegas-transition-slideDown2-in{-webkit-transform:translateY(0);transform:translateY(0)}.vegas-transition-slideDown2-out{-webkit-transform:translateY(100%);transform:translateY(100%)}.vegas-transition-zoomIn,.vegas-transition-zoomIn2{-webkit-transform:scale(0);transform:scale(0);opacity:0}.vegas-transition-zoomIn-in,.vegas-transition-zoomIn2-in{-webkit-transform:scale(1);transform:scale(1);opacity:1}.vegas-transition-zoomIn2-out,.vegas-transition-zoomOut,.vegas-transition-zoomOut2{-webkit-transform:scale(2);transform:scale(2);opacity:0}.vegas-transition-zoomOut-in,.vegas-transition-zoomOut2-in{-webkit-transform:scale(1);transform:scale(1);opacity:1}.vegas-transition-zoomOut2-out{-webkit-transform:scale(0);transform:scale(0);opacity:0}.vegas-transition-swirlLeft,.vegas-transition-swirlLeft2{-webkit-transform:scale(2) rotate(35deg);transform:scale(2) rotate(35deg);opacity:0}.vegas-transition-swirlLeft-in,.vegas-transition-swirlLeft2-in{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0);opacity:1}.vegas-transition-swirlLeft2-out,.vegas-transition-swirlRight,.vegas-transition-swirlRight2{-webkit-transform:scale(2) rotate(-35deg);transform:scale(2) rotate(-35deg);opacity:0}.vegas-transition-swirlRight-in,.vegas-transition-swirlRight2-in{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0);opacity:1}.vegas-transition-swirlRight2-out{-webkit-transform:scale(2) rotate(35deg);transform:scale(2) rotate(35deg);opacity:0}.vegas-animation-kenburns{-webkit-animation:kenburns ease-out;animation:kenburns ease-out}@-webkit-keyframes kenburns{0%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes kenburns{0%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.vegas-animation-kenburnsUp{-webkit-animation:kenburnsUp ease-out;animation:kenburnsUp ease-out}@-webkit-keyframes kenburnsUp{0%{-webkit-transform:scale(1.5) translate(0,10%);transform:scale(1.5) translate(0,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsUp{0%{-webkit-transform:scale(1.5) translate(0,10%);transform:scale(1.5) translate(0,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsDown{-webkit-animation:kenburnsDown ease-out;animation:kenburnsDown ease-out}@-webkit-keyframes kenburnsDown{0%{-webkit-transform:scale(1.5) translate(0,-10%);transform:scale(1.5) translate(0,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsDown{0%{-webkit-transform:scale(1.5) translate(0,-10%);transform:scale(1.5) translate(0,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsLeft{-webkit-animation:kenburnsLeft ease-out;animation:kenburnsLeft ease-out}@-webkit-keyframes kenburnsLeft{0%{-webkit-transform:scale(1.5) translate(10%,0);transform:scale(1.5) translate(10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsLeft{0%{-webkit-transform:scale(1.5) translate(10%,0);transform:scale(1.5) translate(10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsRight{-webkit-animation:kenburnsRight ease-out;animation:kenburnsRight ease-out}@-webkit-keyframes kenburnsRight{0%{-webkit-transform:scale(1.5) translate(-10%,0);transform:scale(1.5) translate(-10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsRight{0%{-webkit-transform:scale(1.5) translate(-10%,0);transform:scale(1.5) translate(-10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsUpLeft{-webkit-animation:kenburnsUpLeft ease-out;animation:kenburnsUpLeft ease-out}@-webkit-keyframes kenburnsUpLeft{0%{-webkit-transform:scale(1.5) translate(10%,10%);transform:scale(1.5) translate(10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsUpLeft{0%{-webkit-transform:scale(1.5) translate(10%,10%);transform:scale(1.5) translate(10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsUpRight{-webkit-animation:kenburnsUpRight ease-out;animation:kenburnsUpRight ease-out}@-webkit-keyframes kenburnsUpRight{0%{-webkit-transform:scale(1.5) translate(-10%,10%);transform:scale(1.5) translate(-10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsUpRight{0%{-webkit-transform:scale(1.5) translate(-10%,10%);transform:scale(1.5) translate(-10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsDownLeft{-webkit-animation:kenburnsDownLeft ease-out;animation:kenburnsDownLeft ease-out}@-webkit-keyframes kenburnsDownLeft{0%{-webkit-transform:scale(1.5) translate(10%,-10%);transform:scale(1.5) translate(10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsDownLeft{0%{-webkit-transform:scale(1.5) translate(10%,-10%);transform:scale(1.5) translate(10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsDownRight{-webkit-animation:kenburnsDownRight ease-out;animation:kenburnsDownRight ease-out}@-webkit-keyframes kenburnsDownRight{0%{-webkit-transform:scale(1.5) translate(-10%,-10%);transform:scale(1.5) translate(-10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsDownRight{0%{-webkit-transform:scale(1.5) translate(-10%,-10%);transform:scale(1.5) translate(-10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}} -------------------------------------------------------------------------------- /source/hollow.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stiekel/hexo-theme-random/af8c728bc49fe0f430cb76979433a02e65fd471f/source/hollow.ico -------------------------------------------------------------------------------- /source/js/jquery.fancybox-thumbs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Thumbnail helper for fancyBox 3 | * version: 1.0.7 (Mon, 01 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * thumbs: { 10 | * width : 50, 11 | * height : 50 12 | * } 13 | * } 14 | * }); 15 | * 16 | */ 17 | (function ($) { 18 | //Shortcut for fancyBox object 19 | var F = $.fancybox; 20 | 21 | //Add helper object 22 | F.helpers.thumbs = { 23 | defaults : { 24 | width : 50, // thumbnail width 25 | height : 50, // thumbnail height 26 | position : 'bottom', // 'top' or 'bottom' 27 | source : function ( item ) { // function to obtain the URL of the thumbnail image 28 | var href; 29 | 30 | if (item.element) { 31 | href = $(item.element).find('img').attr('src'); 32 | } 33 | 34 | if (!href && item.type === 'image' && item.href) { 35 | href = item.href; 36 | } 37 | 38 | return href; 39 | } 40 | }, 41 | 42 | wrap : null, 43 | list : null, 44 | width : 0, 45 | 46 | init: function (opts, obj) { 47 | var that = this, 48 | list, 49 | thumbWidth = opts.width, 50 | thumbHeight = opts.height, 51 | thumbSource = opts.source; 52 | 53 | //Build list structure 54 | list = ''; 55 | 56 | for (var n = 0; n < obj.group.length; n++) { 57 | list += '
  • '; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var href = thumbSource( obj.group[ i ] ); 66 | 67 | if (!href) { 68 | return; 69 | } 70 | 71 | $("").load(function () { 72 | var width = this.width, 73 | height = this.height, 74 | widthRatio, heightRatio, parent; 75 | 76 | if (!that.list || !width || !height) { 77 | return; 78 | } 79 | 80 | //Calculate thumbnail width/height and center it 81 | widthRatio = width / thumbWidth; 82 | heightRatio = height / thumbHeight; 83 | 84 | parent = that.list.children().eq(i).find('a'); 85 | 86 | if (widthRatio >= 1 && heightRatio >= 1) { 87 | if (widthRatio > heightRatio) { 88 | width = Math.floor(width / heightRatio); 89 | height = thumbHeight; 90 | 91 | } else { 92 | width = thumbWidth; 93 | height = Math.floor(height / widthRatio); 94 | } 95 | } 96 | 97 | $(this).css({ 98 | width : width, 99 | height : height, 100 | top : Math.floor(thumbHeight / 2 - height / 2), 101 | left : Math.floor(thumbWidth / 2 - width / 2) 102 | }); 103 | 104 | parent.width(thumbWidth).height(thumbHeight); 105 | 106 | $(this).hide().appendTo(parent).fadeIn(300); 107 | 108 | }).attr('src', href); 109 | }); 110 | 111 | //Set initial width 112 | this.width = this.list.children().eq(0).outerWidth(true); 113 | 114 | 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))); 115 | }, 116 | 117 | beforeLoad: function (opts, obj) { 118 | //Remove self if gallery do not have at least two items 119 | if (obj.group.length < 2) { 120 | obj.helpers.thumbs = false; 121 | 122 | return; 123 | } 124 | 125 | //Increase bottom margin to give space for thumbs 126 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 127 | }, 128 | 129 | afterShow: function (opts, obj) { 130 | //Check if exists and create or update list 131 | if (this.list) { 132 | this.onUpdate(opts, obj); 133 | 134 | } else { 135 | this.init(opts, obj); 136 | } 137 | 138 | //Set active element 139 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 140 | }, 141 | 142 | //Center list 143 | onUpdate: function (opts, obj) { 144 | if (this.list) { 145 | this.list.stop(true).animate({ 146 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 147 | }, 150); 148 | } 149 | }, 150 | 151 | beforeClose: function () { 152 | if (this.wrap) { 153 | this.wrap.remove(); 154 | } 155 | 156 | this.wrap = null; 157 | this.list = null; 158 | this.width = 0; 159 | } 160 | } 161 | 162 | }(jQuery)); -------------------------------------------------------------------------------- /source/js/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/jquery.mousewheel.pack.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY 7 | * 8 | * Version: 3.0.6 9 | * 10 | * Requires: 1.2.2+ 11 | */ 12 | (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 13 | d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); -------------------------------------------------------------------------------- /source/js/plyr.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,document):"function"==typeof define&&define.amd?define(null,function(){t(e,document)}):e.plyr=t(e,document)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(){var e,n,a,r=navigator.userAgent,s=navigator.appName,o=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10);return-1!==navigator.appVersion.indexOf("Windows NT")&&-1!==navigator.appVersion.indexOf("rv:11")?(s="IE",o="11;"):-1!==(n=r.indexOf("MSIE"))?(s="IE",o=r.substring(n+5)):-1!==(n=r.indexOf("Chrome"))?(s="Chrome",o=r.substring(n+7)):-1!==(n=r.indexOf("Safari"))?(s="Safari",o=r.substring(n+7),-1!==(n=r.indexOf("Version"))&&(o=r.substring(n+8))):-1!==(n=r.indexOf("Firefox"))?(s="Firefox",o=r.substring(n+8)):(e=r.lastIndexOf(" ")+1)<(n=r.lastIndexOf("/"))&&(s=r.substring(e,n),o=r.substring(n+1),s.toLowerCase()==s.toUpperCase()&&(s=navigator.appName)),-1!==(a=o.indexOf(";"))&&(o=o.substring(0,a)),-1!==(a=o.indexOf(" "))&&(o=o.substring(0,a)),i=parseInt(""+o,10),isNaN(i)&&(o=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10)),{name:s,version:i,ios:/(iPad|iPhone|iPod)/g.test(navigator.platform),touch:"ontouchstart"in t.documentElement}}function a(e,t){var n=e.media;if("video"==e.type)switch(t){case"video/webm":return!(!n.canPlayType||!n.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/no/,""));case"video/mp4":return!(!n.canPlayType||!n.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""));case"video/ogg":return!(!n.canPlayType||!n.canPlayType('video/ogg; codecs="theora"').replace(/no/,""))}else if("audio"==e.type)switch(t){case"audio/mpeg":return!(!n.canPlayType||!n.canPlayType("audio/mpeg;").replace(/no/,""));case"audio/ogg":return!(!n.canPlayType||!n.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/,""));case"audio/wav":return!(!n.canPlayType||!n.canPlayType('audio/wav; codecs="1"').replace(/no/,""))}return!1}function r(e){if(!t.querySelectorAll('script[src="'+e+'"]').length){var n=t.createElement("script");n.src=e;var a=t.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a)}}function s(e,t){return Array.prototype.indexOf&&-1!=e.indexOf(t)}function o(e,t,n){return e.replace(new RegExp(t.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),n)}function i(e,t){e.length||(e=[e]);for(var n=e.length-1;n>=0;n--){var a=n>0?t.cloneNode(!0):t,r=e[n],s=r.parentNode,o=r.nextSibling;a.appendChild(r),o?s.insertBefore(a,o):s.appendChild(a)}}function l(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function u(e){e&&e.parentNode.removeChild(e)}function c(e,t){e.insertBefore(t,e.firstChild)}function p(e,t){for(var n in t)e.setAttribute(n,"boolean"==typeof t[n]&&t[n]?"":t[n])}function d(e,n,a){var r=t.createElement(e);p(r,a),c(n,r)}function A(e){return e.replace(".","")}function m(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=a+(n?" "+t:"")}}function f(e,t){return e?e.classList?e.classList.contains(t):new RegExp("(\\s|^)"+t+"(\\s|$)").test(e.className):!1}function y(e,t,n,a){e&&g(e,t,n,!0,a)}function b(e,t,n,a){e&&g(e,t,n,!1,a)}function v(e,t,n,a,r){y(e,t,function(t){n&&n.apply(e,[t]),a.apply(e,[t])},r)}function g(e,t,n,a,r){var s=t.split(" ");if("boolean"!=typeof r&&(r=!1),e instanceof NodeList)for(var o=0;oa;a++){var r=e[a];for(var s in r)r[s]&&r[s].constructor&&r[s].constructor===Object?(t[s]=t[s]||{},T(t[s],r[s])):t[s]=r[s]}return t}}function x(){var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",element:null,prefix:""},n="webkit moz o ms khtml".split(" ");if("undefined"!=typeof t.cancelFullScreen)e.supportsFullScreen=!0;else for(var a=0,r=n.length;r>a;a++){if(e.prefix=n[a],"undefined"!=typeof t[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}if("undefined"!=typeof t.msExitFullscreen&&t.msFullscreenEnabled){e.prefix="ms",e.supportsFullScreen=!0;break}}return e.supportsFullScreen&&(e.fullScreenEventName="ms"==e.prefix?"MSFullscreenChange":e.prefix+"fullscreenchange",e.isFullScreen=function(e){switch("undefined"==typeof e&&(e=t.body),this.prefix){case"":return t.fullscreenElement==e;case"moz":return t.mozFullScreenElement==e;default:return t[this.prefix+"FullscreenElement"]==e}},e.requestFullScreen=function(e){return"undefined"==typeof e&&(e=t.body),""===this.prefix?e.requestFullScreen():e[this.prefix+("ms"==this.prefix?"RequestFullscreen":"RequestFullScreen")]()},e.cancelFullScreen=function(){return""===this.prefix?t.cancelFullScreen():t[this.prefix+("ms"==this.prefix?"ExitFullscreen":"CancelFullScreen")]()},e.element=function(){return""===this.prefix?t.fullscreenElement:t[this.prefix+"FullscreenElement"]}),e}function _(){var t={supported:function(){if(!("localStorage"in e))return!1;try{e.localStorage.setItem("___test","OK");var t=e.localStorage.getItem("___test");return e.localStorage.removeItem("___test"),"OK"===t}catch(n){return!1}return!1}()};return t}function E(g,T){function E(t,n){T.debug&&e.console&&console[n?"warn":"log"](t)}function S(){var e=[],t=T.iconUrl+"#"+T.iconPrefix;return s(T.controls,"play-large")&&e.push('"),e.push('
    '),s(T.controls,"restart")&&e.push('"),s(T.controls,"rewind")&&e.push('"),s(T.controls,"play")&&e.push('",'"),s(T.controls,"fast-forward")&&e.push('"),s(T.controls,"progress")&&(e.push('','','','','',"0% "+T.i18n.buffered,""),T.tooltips.seek&&e.push('00:00'),e.push("")),s(T.controls,"current-time")&&e.push('',''+T.i18n.currentTime+"",'00:00',""),s(T.controls,"duration")&&e.push('',''+T.i18n.duration+"",'00:00',""),s(T.controls,"mute")&&e.push('"),s(T.controls,"volume")&&e.push('','",'','',""),s(T.controls,"captions")&&e.push('"),s(T.controls,"fullscreen")&&e.push('"),e.push("
    "),e.join("")}function I(){if(Se.supported.full&&("audio"!=Se.type||T.fullscreen.allowAudio)&&T.fullscreen.enabled){var e=C.supportsFullScreen;e||T.fullscreen.fallback&&!V()?(E((e?"Native":"Fallback")+" fullscreen enabled"),m(Se.container,T.classes.fullscreen.enabled,!0)):E("Fullscreen not supported and fallback disabled"),k(Se.buttons.fullscreen,!1),H()}}function N(){if("video"===Se.type){L(T.selectors.captions)||Se.videoContainer.insertAdjacentHTML("afterbegin",'
    '),Se.usingTextTracks=!1,Se.media.textTracks&&(Se.usingTextTracks=!0);for(var e,t="",n=Se.media.childNodes,a=0;a=10||"Firefox"===Se.browser.name&&Se.browser.version>=31)&&(E("Detected browser with known TextTrack issues - using manual fallback"),Se.usingTextTracks=!1),Se.usingTextTracks){E("TextTracks supported");for(var o=0;o ");for(var a=0;aSe.captions.length-1){Se.subcount=Se.captions.length-1;break}Se.media.currentTime.toFixed(1)>=n(Se.captions[Se.subcount][0])&&Se.media.currentTime.toFixed(1)<=a(Se.captions[Se.subcount][0])?(Se.currentCaption=Se.captions[Se.subcount][1],P(Se.currentCaption)):P()}}function R(){Se.buttons.captions&&(m(Se.container,T.classes.captions.enabled,!0),T.captions.defaultActive&&(m(Se.container,T.classes.captions.active,!0),k(Se.buttons.captions,!0)))}function B(e){return Se.container.querySelectorAll(e)}function L(e){return B(e)[0]}function V(){try{return e.self!==e.top}catch(t){return!0}}function H(){function e(e){9===e.which&&Se.isFullscreen&&(e.target!==a||e.shiftKey?e.target===n&&e.shiftKey&&(e.preventDefault(),a.focus()):(e.preventDefault(),n.focus()))}var t=B("input:not([disabled]), button:not([disabled])"),n=t[0],a=t[t.length-1];y(Se.container,"keydown",e)}function O(e,t){if("string"==typeof t)d(e,Se.media,{src:t});else if(t.constructor===Array)for(var n=t.length-1;n>=0;n--)d(e,Se.media,t[n])}function W(){var e=T.html;E("Injecting custom controls"),e||(e=S()),e=o(e,"{seektime}",T.seekTime),e=o(e,"{id}",Math.floor(1e4*Math.random()));var n;if(null!==T.selectors.controls.container&&(n=T.selectors.controls.container,"string"==typeof selector&&(n=t.querySelector(n))),n instanceof HTMLElement||(n=Se.container),n.insertAdjacentHTML("beforeend",e),T.tooltips.controls)for(var a=B([T.selectors.controls.wrapper," ",T.selectors.labels," .",T.classes.hidden].join("")),r=a.length-1;r>=0;r--){var s=a[r];m(s,T.classes.hidden,!1),m(s,T.classes.tooltip,!0)}}function G(){try{return Se.controls=L(T.selectors.controls.wrapper),Se.buttons={},Se.buttons.seek=L(T.selectors.buttons.seek),Se.buttons.play=B(T.selectors.buttons.play),Se.buttons.pause=L(T.selectors.buttons.pause),Se.buttons.restart=L(T.selectors.buttons.restart),Se.buttons.rewind=L(T.selectors.buttons.rewind),Se.buttons.forward=L(T.selectors.buttons.forward),Se.buttons.fullscreen=L(T.selectors.buttons.fullscreen),Se.buttons.mute=L(T.selectors.buttons.mute),Se.buttons.captions=L(T.selectors.buttons.captions),Se.progress={},Se.progress.container=L(T.selectors.progress.container),Se.progress.buffer={},Se.progress.buffer.bar=L(T.selectors.progress.buffer),Se.progress.buffer.text=Se.progress.buffer.bar&&Se.progress.buffer.bar.getElementsByTagName("span")[0],Se.progress.played=L(T.selectors.progress.played),Se.progress.tooltip=Se.progress.container&&Se.progress.container.querySelector("."+T.classes.tooltip),Se.volume={},Se.volume.input=L(T.selectors.volume.input),Se.volume.display=L(T.selectors.volume.display),Se.duration=L(T.selectors.duration),Se.currentTime=L(T.selectors.currentTime),Se.seekTime=B(T.selectors.seekTime),!0}catch(e){return E("It looks like there is a problem with your controls html",!0),q(!0),!1}}function Y(){m(Se.container,T.selectors.container.replace(".",""),Se.supported.full)}function q(e){e?Se.media.setAttribute("controls",""):Se.media.removeAttribute("controls")}function z(e){var t=T.i18n.play;if("undefined"!=typeof T.title&&T.title.length&&(t+=", "+T.title),Se.supported.full&&Se.buttons.play)for(var n=Se.buttons.play.length-1;n>=0;n--)Se.buttons.play[n].setAttribute("aria-label",t);e instanceof HTMLElement&&e.setAttribute("title",T.i18n.frameTitle.replace("{title}",T.title))}function Q(){if(!Se.media)return E("No audio or video element found",!0),!1;if(Se.supported.full&&(m(Se.container,T.classes.type.replace("{0}",Se.type),!0),s(T.types.embed,Se.type)&&m(Se.container,T.classes.type.replace("{0}","video"),!0),m(Se.container,T.classes.stopped,T.autoplay),m(Se.container,T.classes.isIos,Se.browser.ios),m(Se.container,T.classes.isTouch,Se.browser.touch),"video"===Se.type)){var e=t.createElement("div");e.setAttribute("class",T.classes.videoWrapper),i(Se.media,e),Se.videoContainer=e}s(T.types.embed,Se.type)&&(j(),Se.embedId=null)}function j(){for(var n=t.createElement("div"),a=Se.embedId,s=Se.type+"-"+Math.floor(1e4*Math.random()),o=B('[id^="'+Se.type+'-"]'),i=o.length-1;i>=0;i--)u(o[i]);if(m(Se.media,T.classes.videoWrapper,!0),m(Se.media,T.classes.embedWrapper,!0),"youtube"===Se.type)Se.media.appendChild(n),n.setAttribute("id",s),"object"==typeof YT?U(a,n):(r(T.urls.youtube.api),e.onYouTubeReadyCallbacks=e.onYouTubeReadyCallbacks||[],e.onYouTubeReadyCallbacks.push(function(){U(a,n)}),e.onYouTubeIframeAPIReady=function(){e.onYouTubeReadyCallbacks.forEach(function(e){e()})});else if("vimeo"===Se.type){var l=t.createElement("iframe");l.loaded=!1,y(l,"load",function(){l.loaded=!0}),p(l,{src:"https://player.vimeo.com/video/"+a+"?player_id="+s+"&api=1&badge=0&byline=0&portrait=0&title=0",id:s,webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:"",frameborder:0}),Se.supported.full?(n.appendChild(l),Se.media.appendChild(n)):Se.media.appendChild(l),"$f"in e||r(T.urls.vimeo.api);var c=e.setInterval(function(){"$f"in e&&l.loaded&&(e.clearInterval(c),X.call(l))},50)}else if("soundcloud"===Se.type){var d=t.createElement("iframe");d.loaded=!1,y(d,"load",function(){d.loaded=!0}),p(d,{src:"https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/"+a,id:s}),n.appendChild(d),Se.media.appendChild(n),e.SC||r(T.urls.soundcloud.api);var A=e.setInterval(function(){e.SC&&d.loaded&&(e.clearInterval(A),Z.call(d))},50)}}function D(){Se.container.plyr.embed=Se.embed,Fe(),z(L("iframe"))}function U(t,n){"timer"in Se||(Se.timer={}),Se.embed=new YT.Player(n.id,{videoId:t,playerVars:{autoplay:T.autoplay?1:0,controls:Se.supported.full?0:1,rel:0,showinfo:0,iv_load_policy:3,cc_load_policy:T.captions.defaultActive?1:0,cc_lang_pref:"en",wmode:"transparent",modestbranding:1,disablekb:1,origin:"*"},events:{onError:function(e){h(Se.container,"error",!0,{code:e.data,embed:e.target})},onReady:function(t){var n=t.target;Se.media.play=function(){n.playVideo(),Se.media.paused=!1},Se.media.pause=function(){n.pauseVideo(),Se.media.paused=!0},Se.media.stop=function(){n.stopVideo(),Se.media.paused=!0},Se.media.duration=n.getDuration(),Se.media.paused=!0,Se.media.currentTime=n.getCurrentTime(),Se.media.muted=n.isMuted(),T.title=n.getVideoData().title,h(Se.media,"timeupdate"),e.clearInterval(Se.timer.buffering),Se.timer.buffering=e.setInterval(function(){Se.media.buffered=n.getVideoLoadedFraction(),h(Se.media,"progress"),1===Se.media.buffered&&(e.clearInterval(Se.timer.buffering),h(Se.media,"canplaythrough"))},200),D(),fe()},onStateChange:function(t){var n=t.target;switch(e.clearInterval(Se.timer.playing),t.data){case 0:Se.media.paused=!0,h(Se.media,"ended");break;case 1:Se.media.paused=!1,Se.media.seeking=!1,h(Se.media,"play"),h(Se.media,"playing"),Se.timer.playing=e.setInterval(function(){Se.media.currentTime=n.getCurrentTime(),h(Se.media,"timeupdate")},100);break;case 2:Se.media.paused=!0,h(Se.media,"pause")}}}})}function X(){Se.embed=$f(this),Se.embed.addEvent("ready",function(){Se.media.play=function(){Se.embed.api("play"),Se.media.paused=!1},Se.media.pause=function(){Se.embed.api("pause"),Se.media.paused=!0},Se.media.stop=function(){Se.embed.api("stop"),Se.media.paused=!0},Se.media.paused=!0,Se.media.currentTime=0,D(),Se.embed.api("getCurrentTime",function(e){Se.media.currentTime=e,h(Se.media,"timeupdate")}),Se.embed.api("getDuration",function(e){Se.media.duration=e,fe()}),Se.embed.addEvent("play",function(){Se.media.paused=!1,h(Se.media,"play"),h(Se.media,"playing")}),Se.embed.addEvent("pause",function(){Se.media.paused=!0,h(Se.media,"pause")}),Se.embed.addEvent("playProgress",function(e){Se.media.seeking=!1,Se.media.currentTime=e.seconds,h(Se.media,"timeupdate")}),Se.embed.addEvent("loadProgress",function(e){Se.media.buffered=e.percent,h(Se.media,"progress"),1===parseInt(e.percent)&&h(Se.media,"canplaythrough")}),Se.embed.addEvent("finish",function(){Se.media.paused=!0,h(Se.media,"ended")}),T.autoplay&&Se.embed.api("play")})}function Z(){Se.embed=e.SC.Widget(this),Se.embed.bind(e.SC.Widget.Events.READY,function(){Se.media.play=function(){Se.embed.play(),Se.media.paused=!1},Se.media.pause=function(){Se.embed.pause(),Se.media.paused=!0},Se.media.stop=function(){Se.embed.seekTo(0),Se.embed.pause(),Se.media.paused=!0},Se.media.paused=!0,Se.media.currentTime=0,D(),Se.embed.getPosition(function(e){Se.media.currentTime=e,h(Se.media,"timeupdate")}),Se.embed.getDuration(function(e){Se.media.duration=e/1e3,fe()}),Se.embed.bind(e.SC.Widget.Events.PLAY,function(){Se.media.paused=!1,h(Se.media,"play"),h(Se.media,"playing")}),Se.embed.bind(e.SC.Widget.Events.PAUSE,function(){Se.media.paused=!0,h(Se.media,"pause")}),Se.embed.bind(e.SC.Widget.Events.PLAY_PROGRESS,function(e){Se.media.seeking=!1,Se.media.currentTime=e.currentPosition/1e3,h(Se.media,"timeupdate")}),Se.embed.bind(e.SC.Widget.Events.LOAD_PROGRESS,function(e){Se.media.buffered=e.loadProgress,h(Se.media,"progress"),1===parseInt(e.loadProgress)&&h(Se.media,"canplaythrough")}),Se.embed.bind(e.SC.Widget.Events.FINISH,function(){Se.media.paused=!0,h(Se.media,"ended")}),T.autoplay&&Se.embed.play()})}function $(){"play"in Se.media&&Se.media.play()}function J(){"pause"in Se.media&&Se.media.pause()}function K(e){e===!0?$():e===!1?J():Se.media[Se.media.paused?"play":"pause"]()}function ee(e){"number"!=typeof e&&(e=T.seekTime),ne(Se.media.currentTime-e)}function te(e){"number"!=typeof e&&(e=T.seekTime),ne(Se.media.currentTime+e)}function ne(e){var t=0,n=Se.media.paused,a=ae();"number"==typeof e?t=e:"object"!=typeof e||"input"!==e.type&&"change"!==e.type||(t=e.target.value/e.target.max*a),0>t?t=0:t>a&&(t=a),be(t);try{Se.media.currentTime=t.toFixed(1)}catch(r){}if(s(T.types.embed,Se.type)){switch(Se.type){case"youtube":Se.embed.seekTo(t);break;case"vimeo":Se.embed.api("seekTo",t.toFixed(0));break;case"soundcloud":Se.embed.seekTo(1e3*t)}n&&J(),h(Se.media,"timeupdate"),Se.media.seeking=!0}E("Seeking to "+Se.media.currentTime+" seconds"),M(t)}function ae(){var e=parseInt(T.duration),t=0;return null===Se.media.duration||isNaN(Se.media.duration)||(t=Se.media.duration),isNaN(e)?t:e}function re(){m(Se.container,T.classes.playing,!Se.media.paused),m(Se.container,T.classes.stopped,Se.media.paused),ge(Se.media.paused)}function se(e){var n=C.supportsFullScreen;e&&e.type===C.fullScreenEventName?Se.isFullscreen=C.isFullScreen(Se.container):n?(C.isFullScreen(Se.container)?C.cancelFullScreen():C.requestFullScreen(Se.container),Se.isFullscreen=C.isFullScreen(Se.container)):(Se.isFullscreen=!Se.isFullscreen,Se.isFullscreen?(y(t,"keyup",oe),t.body.style.overflow="hidden"):(b(t,"keyup",oe),t.body.style.overflow="")),m(Se.container,T.classes.fullscreen.active,Se.isFullscreen),Se.isFullscreen?Se.container.setAttribute("tabindex","-1"):Se.container.removeAttribute("tabindex"),H(Se.isFullscreen),k(Se.buttons.fullscreen,Se.isFullscreen),h(Se.container,Se.isFullscreen?"enterfullscreen":"exitfullscreen")}function oe(e){27===(e.which||e.charCode||e.keyCode)&&Se.isFullscreen&&se()}function ie(e){if("boolean"!=typeof e&&(e=!Se.media.muted),k(Se.buttons.mute,e),Se.media.muted=e,0===Se.media.volume&&le(T.volume),s(T.types.embed,Se.type)){switch(Se.type){case"youtube":Se.embed[Se.media.muted?"mute":"unMute"]();break;case"vimeo":Se.embed.api("setVolume",Se.media.muted?0:parseFloat(T.volume/10));break;case"soundcloud":Se.embed.setVolume(Se.media.muted?0:parseFloat(T.volume/10))}h(Se.media,"volumechange")}}function le(t){if("undefined"==typeof t&&(t=T.volume,T.storage.enabled&&_().supported&&(t=e.localStorage.getItem(T.storage.key),e.localStorage.removeItem("plyr-volume"))),(null===t||isNaN(t))&&(t=T.volume),t>10&&(t=10),0>t&&(t=0),Se.media.volume=parseFloat(t/10),Se.volume.display&&(Se.volume.display.value=t),s(T.types.embed,Se.type)){switch(Se.type){case"youtube":Se.embed.setVolume(100*Se.media.volume);break;case"vimeo":Se.embed.api("setVolume",Se.media.volume);break;case"soundcloud":Se.embed.setVolume(Se.media.volume)}h(Se.media,"volumechange")}Se.media.muted&&t>0&&ie()}function ue(){var t=Se.media.muted?0:10*Se.media.volume;Se.supported.full&&(Se.volume.input&&(Se.volume.input.value=t),Se.volume.display&&(Se.volume.display.value=t)),T.storage.enabled&&_().supported&&!isNaN(t)&&e.localStorage.setItem(T.storage.key,t),m(Se.container,T.classes.muted,0===t),Se.supported.full&&Se.buttons.mute&&k(Se.buttons.mute,0===t)}function ce(e){Se.supported.full&&Se.buttons.captions&&("boolean"!=typeof e&&(e=-1===Se.container.className.indexOf(T.classes.captions.active)),Se.captionsEnabled=e,k(Se.buttons.captions,Se.captionsEnabled),m(Se.container,T.classes.captions.active,Se.captionsEnabled),h(Se.container,Se.captionsEnabled?"captionsenabled":"captionsdisabled"))}function pe(e){var t="waiting"===e.type;clearTimeout(Se.timers.loading),Se.timers.loading=setTimeout(function(){m(Se.container,T.classes.loading,t)},t?250:0)}function de(e){var t=Se.progress.played,n=0,a=ae();if(e)switch(e.type){case"timeupdate":case"seeking":n=w(Se.media.currentTime,a),"timeupdate"==e.type&&Se.buttons.seek&&(Se.buttons.seek.value=n);break;case"playing":case"progress":t=Se.progress.buffer,n=function(){var e=Se.media.buffered;return e&&e.length?w(e.end(0),a):"number"==typeof e?100*e:0}()}Ae(t,n)}function Ae(e,t){"undefined"==typeof t&&(t=0),e instanceof HTMLElement?e.value=t:(e.bar&&(e.bar.value=t),e.text&&(e.text.innerHTML=t))}function me(e,t){if(t){isNaN(e)&&(e=0),Se.secs=parseInt(e%60),Se.mins=parseInt(e/60%60),Se.hours=parseInt(e/60/60%60);var n=parseInt(ae()/60/60%60)>0;Se.secs=("0"+Se.secs).slice(-2),Se.mins=("0"+Se.mins).slice(-2),t.innerHTML=(n?Se.hours+":":"")+Se.mins+":"+Se.secs}}function fe(){if(Se.supported.full){var e=ae()||0;!Se.duration&&T.displayDuration&&Se.media.paused&&me(e,Se.currentTime),Se.duration&&me(e,Se.duration),ve()}}function ye(e){me(Se.media.currentTime,Se.currentTime),e&&"timeupdate"==e.type&&Se.media.seeking||de(e)}function be(e){"number"!=typeof e&&(e=0);var t=ae(),n=w(e,t);Se.progress&&Se.progress.played&&(Se.progress.played.value=n),Se.buttons&&Se.buttons.seek&&(Se.buttons.seek.value=n)}function ve(e){var t=ae();if(T.tooltips.seek&&Se.progress.container&&0!==t){var n=Se.progress.container.getBoundingClientRect(),a=0,r=T.classes.tooltip+"--visible";if(e)a=100/n.width*(e.pageX-n.left);else{if(!f(Se.progress.tooltip,r))return;a=Se.progress.tooltip.style.left.replace("%","")}0>a?a=0:a>100&&(a=100),me(t/100*a,Se.progress.tooltip),Se.progress.tooltip.style.left=a+"%",e&&s(["mouseenter","mouseleave"],e.type)&&m(Se.progress.tooltip,r,"mouseenter"===e.type)}}function ge(t){if(T.hideControls&&"audio"!==Se.type){var n=0,a=!1,r=t;"boolean"!=typeof t&&(t&&t.type?(a="enterfullscreen"===t.type,r=s(["mousemove","mouseenter","focus"],t.type),"mousemove"===t.type&&(n=2e3),"focus"===t.type&&(n=3e3)):r=!1),e.clearTimeout(Se.timers.hover),(r||Se.media.paused)&&(m(Se.container,T.classes.hideControls,!1),Se.media.paused)||r&&Se.media.paused||(Se.timers.hover=e.setTimeout(function(){Se.controls.active&&!a||m(Se.container,T.classes.hideControls,!0)},n))}}function he(e){if("undefined"!=typeof e)return void ke(e);var t;switch(Se.type){case"youtube":t=Se.embed.getVideoUrl();break;case"vimeo":Se.embed.api("getVideoUrl",function(e){t=e});break;case"soundcloud":Se.embed.getCurrentSound(function(e){t=e.permalink_url});break;default:t=Se.media.currentSrc}return t||""}function ke(n){if(!("undefined"!=typeof n&&"sources"in n&&n.sources.length))return void E("Invalid source format",!0);if(J(),be(),Ae(Se.progress.buffer),_e(),"youtube"===Se.type?(Se.embed.destroy(),e.clearInterval(Se.timer.buffering),e.clearInterval(Se.timer.playing)):"video"===Se.type&&Se.videoContainer&&u(Se.videoContainer),Se.embed=null,u(Se.media),"type"in n&&(Se.type=n.type,"video"===Se.type)){var a=n.sources[0];"type"in a&&s(T.types.embed,a.type)&&(Se.type=a.type)}switch(Se.supported=F.supported(Se.type),Se.type){case"video":Se.media=t.createElement("video");break;case"audio":Se.media=t.createElement("audio");break;case"youtube":case"vimeo":case"soundcloud":Se.media=t.createElement("div"),Se.embedId=n.sources[0].src}c(Se.container,Se.media),"undefined"!=typeof n.autoplay&&(T.autoplay=n.autoplay),s(T.types.html5,Se.type)&&(T.crossorigin&&Se.media.setAttribute("crossorigin",""),T.autoplay&&Se.media.setAttribute("autoplay",""),"poster"in n&&Se.media.setAttribute("poster",n.poster),T.loop&&Se.media.setAttribute("loop","")),Se.container.className=Se.originalClassName,m(Se.container,T.classes.fullscreen.active,Se.isFullscreen),m(Se.container,T.classes.captions.active,Se.captionsEnabled),Y(),s(T.types.html5,Se.type)&&O("source",n.sources),Q(),s(T.types.html5,Se.type)&&("tracks"in n&&O("track",n.tracks),Se.media.load(),Fe(),fe()),T.title=n.title,z(),Se.container.plyr.media=Se.media}function we(e){"video"===Se.type&&Se.media.setAttribute("poster",e)}function Te(){function n(){var e=Se.media.paused;e?$():J();var t=Se.buttons[e?"play":"pause"],n=Se.buttons[e?"pause":"play"];if(n=n&&n.length>1?n[n.length-1]:n[0]){var a=f(t,T.classes.tabFocus);setTimeout(function(){n.focus(),a&&(m(t,T.classes.tabFocus,!1),m(n,T.classes.tabFocus,!0))},100)}}function a(){var e=t.activeElement;e&&e!=t.body?t.querySelector&&(e=t.querySelector(":focus")):e=null;for(var n in Se.buttons){var a=Se.buttons[n];if(a instanceof NodeList)for(var r=0;r lastScrollTop && currentST > $("#menu-outer").outerHeight()) { 57 | if($('#menu-list').is(":visible") && isMobile) { 58 | $("#menu-list").hide(); 59 | } 60 | $("#menu-outer").removeClass('slide-down').addClass('slide-up'); 61 | } else if(currentST + $(window).height() < $(document).height()) { 62 | $("#menu-outer").removeClass('slide-up').addClass('slide-down'); 63 | } 64 | 65 | lastScrollTop = currentST; 66 | } 67 | // toc control 68 | TOCToggle(); 69 | // if table of content is empty, hide the hole div 70 | if($(".random-toc ol").children().length <= 3) { 71 | 72 | $(".random-toc-area").hide(); 73 | } 74 | }); 75 | 76 | var hideAll = false; 77 | function showHideToggle() { 78 | if(hideAll) { 79 | $(".hide-area").show(); 80 | $("#btn-view").html('Hide'); 81 | $(".jiathis_style").css({'display': 'block'}); 82 | } else { 83 | $(".jiathis_style").css({'display': 'none'}); 84 | $(".hide-area").hide(); 85 | $("#btn-view").html('Show'); 86 | $("#menu-outer").removeClass('slide-up').addClass('slide-down'); 87 | } 88 | hideAll = !hideAll; 89 | } 90 | 91 | // open user card 92 | function openUserCard() { 93 | /*$("#user-card").modal({ 94 | showClose: false 95 | });*/ 96 | showHideToggle(); 97 | $.fancybox({ 98 | type: 'html', 99 | autoSize: true, 100 | maxWidth: 400, 101 | autoCenter: true, 102 | content: $("#user-card"), 103 | closeBtn: false, 104 | afterClose: showHideToggle 105 | }); 106 | } 107 | 108 | var isTOCShow = true; 109 | function TOCToggle() { 110 | if(isTOCShow) { 111 | $(".random-toc").show(); 112 | $(".btn-hide-toc-show").hide(); 113 | $(".btn-hide-toc-hide").show(); 114 | } else { 115 | $(".random-toc").hide(); 116 | $(".btn-hide-toc-show").show(); 117 | $(".btn-hide-toc-hide").hide(); 118 | } 119 | isTOCShow = !isTOCShow; 120 | } 121 | 122 | // set and change the background images. 123 | function playBackground() { 124 | // vegas config 125 | // add slide image 126 | var slides = []; 127 | if(backgroundImages && backgroundImages.length > 0) { 128 | backgroundImages.forEach(function(img){ 129 | if(!img) return; 130 | slides.push({ 131 | src: img.replace('__width__', window.screen.availWidth).replace('__height__', window.screen.availHeight) 132 | }); 133 | }); 134 | } 135 | // slides = []; 136 | if(slides.length === 0) { 137 | var endWith = ''; 138 | var greyscale = ''; 139 | if(unsplashConfig) { 140 | if(unsplashConfig.gravity) { 141 | endWith = '&gravity=' + unsplashConfig.gravity; 142 | } 143 | if(unsplashConfig.blur) { 144 | endWith += '&blur=1'; 145 | } 146 | if(unsplashConfig.greyscale) { 147 | greyscale = '/g'; 148 | } 149 | } 150 | 151 | for(var i = 1; i <= 10; i++) { 152 | slides.push({ 153 | src: ['https://unsplash.it', greyscale, '/', window.screen.availWidth, '/',window.screen.availHeight, '?random&t=', i, endWith].join('') 154 | }); 155 | } 156 | } 157 | // check vegas config 158 | if('object' !== typeof vegasConfig) { 159 | vegasConfig = { 160 | shuffle: true 161 | }; 162 | } 163 | vegasConfig.slides = slides; 164 | $('body').vegas(vegasConfig); 165 | } 166 | -------------------------------------------------------------------------------- /source/js/vegas.min.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Vegas - Fullscreen Backgrounds and Slideshows. 3 | * v2.2.0 - built 2016-01-18 4 | * Licensed under the MIT License. 5 | * http://vegas.jaysalvat.com/ 6 | * ---------------------------------------------------------------------------- 7 | * Copyright (C) 2010-2016 Jay Salvat 8 | * http://jaysalvat.com/ 9 | * --------------------------------------------------------------------------*/ 10 | !function(t){"use strict";var s={slide:0,delay:5e3,preload:!1,preloadImage:!1,preloadVideo:!1,timer:!0,overlay:!1,autoplay:!0,shuffle:!1,cover:!0,color:null,align:"center",valign:"center",transition:"fade",transitionDuration:1e3,transitionRegister:[],animation:null,animationDuration:"auto",animationRegister:[],init:function(){},play:function(){},pause:function(){},walk:function(){},slides:[]},i={},e=function(i,e){this.elmt=i,this.settings=t.extend({},s,t.vegas.defaults,e),this.slide=this.settings.slide,this.total=this.settings.slides.length,this.noshow=this.total<2,this.paused=!this.settings.autoplay||this.noshow,this.$elmt=t(i),this.$timer=null,this.$overlay=null,this.$slide=null,this.timeout=null,this.transitions=["fade","fade2","blur","blur2","flash","flash2","negative","negative2","burn","burn2","slideLeft","slideLeft2","slideRight","slideRight2","slideUp","slideUp2","slideDown","slideDown2","zoomIn","zoomIn2","zoomOut","zoomOut2","swirlLeft","swirlLeft2","swirlRight","swirlRight2"],this.animations=["kenburns","kenburnsLeft","kenburnsRight","kenburnsUp","kenburnsUpLeft","kenburnsUpRight","kenburnsDown","kenburnsDownLeft","kenburnsDownRight"],this.settings.transitionRegister instanceof Array==!1&&(this.settings.transitionRegister=[this.settings.transitionRegister]),this.settings.animationRegister instanceof Array==!1&&(this.settings.animationRegister=[this.settings.animationRegister]),this.transitions=this.transitions.concat(this.settings.transitionRegister),this.animations=this.animations.concat(this.settings.animationRegister),this.support={objectFit:"objectFit"in document.body.style,transition:"transition"in document.body.style||"WebkitTransition"in document.body.style,video:t.vegas.isVideoCompatible()},this.settings.shuffle===!0&&this.shuffle(),this._init()};e.prototype={_init:function(){var s,i,e,n="BODY"===this.elmt.tagName,o=this.settings.timer,a=this.settings.overlay,r=this;this._preload(),n||(this.$elmt.css("height",this.$elmt.css("height")),s=t('
    ').css("overflow",this.$elmt.css("overflow")).css("padding",this.$elmt.css("padding")),this.$elmt.css("padding")||s.css("padding-top",this.$elmt.css("padding-top")).css("padding-bottom",this.$elmt.css("padding-bottom")).css("padding-left",this.$elmt.css("padding-left")).css("padding-right",this.$elmt.css("padding-right")),this.$elmt.clone(!0).children().appendTo(s),this.elmt.innerHTML=""),o&&this.support.transition&&(e=t('
    '),this.$timer=e,this.$elmt.prepend(e)),a&&(i=t('
    '),"string"==typeof a&&i.css("background-image","url("+a+")"),this.$overlay=i,this.$elmt.prepend(i)),this.$elmt.addClass("vegas-container"),n||this.$elmt.append(s),setTimeout(function(){r.trigger("init"),r._goto(r.slide),r.settings.autoplay&&r.trigger("play")},1)},_preload:function(){var t,s;for(s=0;s1&&!this.paused&&!this.noshow&&(this.timeout=setTimeout(function(){t.next()},this._options("delay")))},_timer:function(t){var s=this;clearTimeout(this.timeout),this.$timer&&(this.$timer.removeClass("vegas-timer-running").find("div").css("transition-duration","0ms"),this.paused||this.noshow||t&&setTimeout(function(){s.$timer.addClass("vegas-timer-running").find("div").css("transition-duration",s._options("delay")-100+"ms")},100))},_video:function(t){var s,e,n=t.toString();return i[n]?i[n]:(t instanceof Array==!1&&(t=[t]),s=document.createElement("video"),s.preload=!0,t.forEach(function(t){e=document.createElement("source"),e.src=t,s.appendChild(e)}),i[n]=s,s)},_fadeOutSound:function(t,s){var i=this,e=s/10,n=t.volume-.09;n>0?(t.volume=n,setTimeout(function(){i._fadeOutSound(t,s)},e)):t.pause()},_fadeInSound:function(t,s){var i=this,e=s/10,n=t.volume+.09;1>n&&(t.volume=n,setTimeout(function(){i._fadeInSound(t,s)},e))},_options:function(t,s){return void 0===s&&(s=this.slide),void 0!==this.settings.slides[s][t]?this.settings.slides[s][t]:this.settings[t]},_goto:function(s){function i(){f._timer(!0),setTimeout(function(){y&&(f.support.transition?(h.css("transition","all "+_+"ms").addClass("vegas-transition-"+y+"-out"),h.each(function(){var t=h.find("video").get(0);t&&(t.volume=1,f._fadeOutSound(t,_))}),e.css("transition","all "+_+"ms").addClass("vegas-transition-"+y+"-in")):e.fadeIn(_));for(var t=0;tg)&&(_=g),"auto"===b&&(b=g),e=t('
    '),this.support.transition&&y&&e.addClass("vegas-transition-"+y),this.support.video&&l?(a=l instanceof Array?this._video(l):this._video(l.src),a.loop=void 0!==l.loop?l.loop:!0,a.muted=void 0!==l.mute?l.mute:!0,a.muted===!1?(a.volume=0,this._fadeInSound(a,_)):a.pause(),o=t(a).addClass("vegas-video").css("background-color",m),this.support.objectFit?o.css("object-position",u+" "+c).css("object-fit",p).css("width","100%").css("height","100%"):"contain"===p&&o.css("width","100%").css("height","100%"),e.append(o)):(r=new Image,n=t('
    ').css("background-image","url("+d+")").css("background-color",m).css("background-position",u+" "+c),"repeat"===p?n.css("background-repeat","repeat"):n.css("background-size",p),this.support.transition&&w&&n.addClass("vegas-animation-"+w).css("animation-duration",b+"ms"),e.append(n)),this.support.transition||e.css("display","none"),v?h.eq(v-1).after(e):this.$elmt.prepend(e),f._timer(!1),a?(4===a.readyState&&(a.currentTime=0),a.play(),i()):(r.src=d,r.onload=i)},shuffle:function(){for(var t,s,i=this.total-1;i>0;i--)s=Math.floor(Math.random()*(i+1)),t=this.settings.slides[i],this.settings.slides[i]=this.settings.slides[s],this.settings.slides[s]=t},play:function(){this.paused&&(this.paused=!1,this.next(),this.trigger("play"))},pause:function(){this._timer(!1),this.paused=!0,this.trigger("pause")},toggle:function(){this.paused?this.play():this.pause()},playing:function(){return!this.paused&&!this.noshow},current:function(t){return t?{slide:this.slide,data:this.settings.slides[this.slide]}:this.slide},jump:function(t){0>t||t>this.total-1||t===this.slide||(this.slide=t,this._goto(this.slide))},next:function(){this.slide++,this.slide>=this.total&&(this.slide=0),this._goto(this.slide)},previous:function(){this.slide--,this.slide<0&&(this.slide=this.total-1),this._goto(this.slide)},trigger:function(t){var s=[];s="init"===t?[this.settings]:[this.slide,this.settings.slides[this.slide]],this.$elmt.trigger("vegas"+t,s),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,s)},options:function(i,e){var n=this.settings.slides.slice();if("object"==typeof i)this.settings=t.extend({},s,t.vegas.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.settings.slides!==n&&(this.total=this.settings.slides.length,this.noshow=this.total<2,this._preload())},destroy:function(){clearTimeout(this.timeout),this.$elmt.removeClass("vegas-container"),this.$elmt.find("> .vegas-slide").remove(),this.$elmt.find("> .vegas-wrapper").clone(!0).children().appendTo(this.$elmt),this.$elmt.find("> .vegas-wrapper").remove(),this.settings.timer&&this.$timer.remove(),this.settings.overlay&&this.$overlay.remove(),this.elmt._vegas=null}},t.fn.vegas=function(t){var s,i=arguments,n=!1;if(void 0===t||"object"==typeof t)return this.each(function(){this._vegas||(this._vegas=new e(this,t))});if("string"==typeof t){if(this.each(function(){var e=this._vegas;if(!e)throw new Error("No Vegas applied to this element.");"function"==typeof e[t]&&"_"!==t[0]?s=e[t].apply(e,[].slice.call(i,1)):n=!0}),n)throw new Error('No method "'+t+'" in Vegas.');return void 0!==s?s:this}},t.vegas={},t.vegas.defaults=s,t.vegas.isVideoCompatible=function(){return!/(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent)}}(window.jQuery||window.Zepto); 11 | //# sourceMappingURL=vegas.min.js.map 12 | --------------------------------------------------------------------------------