├── .gitignore ├── LICENSE ├── README.md ├── assets ├── css │ ├── all.min.css │ ├── dev.min.css │ ├── font.min.css │ ├── screen.css │ └── uncompressed.css ├── fonts │ ├── demo.css │ ├── demo.html │ ├── iconfont.css │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff ├── images │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon.png │ ├── escheresque_ste.png │ ├── favicon.png │ ├── qr-alipay-256.png │ └── qr-wechat-256.png └── js │ ├── all.min.js │ ├── dev.min.js │ ├── duoshuo.modify.js │ ├── index.js │ ├── jquery.fitvids.js │ ├── lazy.js │ ├── prism.js │ └── webfont.js ├── author.hbs ├── default.hbs ├── dev ├── css │ ├── reset.css │ ├── sass │ │ ├── _1024up.scss │ │ ├── _321up.scss │ │ ├── _361up.scss │ │ ├── _481up.scss │ │ ├── _768up.scss │ │ ├── _base.scss │ │ ├── _duoshuo.scss │ │ ├── _fonts.scss │ │ ├── _mixins.scss │ │ ├── _normalize.scss │ │ ├── _print.scss │ │ ├── _prism.scss │ │ ├── _sprite.scss │ │ └── style.scss │ ├── style.css │ └── uncompressed.css ├── img │ └── sprite@2x.png └── js │ └── base.js ├── gulpfile.js ├── index.hbs ├── package.json ├── page.hbs ├── partials ├── loop.hbs └── navigation.hbs ├── post.hbs └── tag.hbs /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated Stuff 2 | .sass-cache 3 | .sass-cache/* 4 | css/*.map 5 | 6 | # bundling output 7 | build/* 8 | build 9 | dist/* 10 | dist 11 | 12 | # Node Modules (use `npm install` to generate these) 13 | node_modules/* 14 | node_modules 15 | ../* 16 | 17 | # OS X Junk 18 | .DS_Store 19 | .DS_Store/* 20 | 21 | 22 | # Not-Needed System Files 23 | *.swp 24 | *.bak 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 Ghost Foundation 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Yasuko 2 | 3 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/yasuko2.jpg) 4 | 5 | 为了国内备案,博客停止解析将近半个月,今天[罗磊的独立博客](https://luolei.org)重新上线,迁移到国内阿里云,进行了不少重构和优化,现在进入博客,速度体验上应该可以有一个飞跃性的提升。 6 | 7 | 新的博客主题名叫「Yasuko 康子],依旧开源在[Github/Yasuko](https://github.com/foru17/Yasuko)上,只需稍作配置,就能用到你自己的[Ghost](http://ghost.org/)博客上。 8 | 9 | ## 首先讲一个故事 10 | 11 | 这篇博文开头,我先不讲Ghost这个主题有什么新功能,我要讲一个叫[难波康子(Namba Yasuko)](https://ja.wikipedia.org/wiki/%E9%9B%A3%E6%B3%A2%E5%BA%B7%E5%AD%90)的日本女人的故事。 12 | 13 | 1949年,战后三年,难波康子出生在日本东京大田区,1967年,十八岁的难波康子高中毕业,进入早稻田大学,并且加入了学校的登山俱乐部,随后开始了自己的登山生涯。毕业之后,难波康子进入了物流巨鳄UPS,收入颇丰,但是她坚持登山的爱好并且持续付诸行动。 14 | 15 | 1982年,她攀登上了非洲最高峰乞力马扎罗,两年之后,成功登顶南美最高峰阿空加瓜山,1985年六月,登顶北美最高峰麦金利峰,七年之后92年八月登顶欧洲最高峰厄尔布鲁士峰,接下来的93和94两年,先后登顶南极洲最高峰文森山和大洋洲最高峰查亚峰。也是在登山俱乐部,结实了自己的爱人健一难波。 16 | 17 | 难波康子先后攀登上上世界七大洲的六座顶峰。1996年,两只商业登山队向珠峰发起冲刺,难波康子也在其中,5月10日冲顶,由于种种因缘,商业行为在高原缺氧地带的不理性选择,多个队伍同时登顶导致的登山通道拥挤,两队的大部分队员不幸遭遇暴风雪,被困在距离4号营地300多米的南坳,下午六点钟暴风雪最大的时候,难波康子氧气耗尽,经过最后的挣扎,依旧不幸遇难,在四号营地外,失温而亡。 18 | 19 | 难波康子是第二位登上世界七大高峰的日本女性,出身名门,企业高层,算得上是日本男权社会中的一个标杆性人物,她的死,在日本社会造成了很大的影响。 20 | 21 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/everest96.jpg) 22 | 23 | 今年上映的电影[《绝命海拔》](http://movie.douban.com/subject/22265299/)之中,讲述的就是96年这次珠峰事故的故事,推荐大家有机会可以去看看。上图的前排右一就是难波康子。 24 | 25 | ## 关于为什么要叫这个名字 26 | 27 | 其实我并没有看过《绝命海拔》这部电影,之所以取这个名字,就跟我的上一个Ghost主题[Nevecoo](https://luolei.org/theme-nevecoo/)一样,取名的时候并没有想什么特殊的含义,就是随意而为。 28 | 在谷歌中随意输入几个字符,点击搜索,就这么看到了Yasuko的故事。 29 | 30 | 看着她的照片,看着照片中的雪山,想起自己几年之前一直想去登山的梦想,那就叫Yasuko这个名字吧,缅怀先烈之余,也算是勿忘初心。 31 | 32 | ## Theme Yasuko 33 | 34 | 回到这次的改版,说先说一下这次改版的几个变化,对于其中涉及的几个技术和优化点,也稍作说明。 35 | 36 | #### 1.备案&&迁移到国内阿里云 37 | 38 | 过去我的博客一直托管在[Linode](https://www.linode.com/?r=bc281a496205a4bb946c7e7d0a9a44116bebdf32)的日本东京机房,本来速度和稳定性都不错,Ping值好的时候可以到50-70ms,可是随着这两年某W的升级和国际线路的日益糟糕,大陆到日本的国际线路稳定性越来越不可靠,时常会遇到DNS无法解析,SSH无法连接的情况,虽说我的大部分静态资源都是托管在国内CDN,可是主站速度尤其是初次访问速度还是无法保证。 39 | 40 | 这次依旧是通过阿里云的备案流程,增加了一个备案主体,将luolei.org这个域名在国内备案,12月10日阿里云提交备案申请,28日批准备案,流程还是比较顺利的,详细的过程可以看下图。 41 | 42 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/aliyun2.jpg) 43 | 44 | #### 1.1 海外访客进行反向代理加速 45 | 46 | 由于无法保证阿里云在海外的访问速度,我让DNSpod对大陆用户和海外用户分别解析到阿里云和美国DO的机房IP,利用美国DigitalOcean旧金山机房的服务器进行了一次反向代理。 47 | 48 | 由于我的博客进行了https加密,反向代理同样需要`ssl`证书。 49 | 50 | ```language-nginx 51 | #https相关配置 52 | server { 53 | listen 443; 54 | server_name luolei.org; 55 | ssl on; 56 | ssl_certificate /somepath/ssl/ssl.crt; 57 | ssl_certificate_key /somepath/ssl/server.key; 58 | proxy_pass http://115.28.56.68:xxxx; #这里是关键,需要填写国内的IP地址 59 | proxy_set_header Host $host; 60 | proxy_set_header X-Real-IP $remote_addr; 61 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 62 | proxy_set_header X-Forwarded-Proto $scheme; 63 | proxy_redirect off; 64 | } 65 | ``` 66 | 67 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/ping.png) 68 | 69 | 测速下,国内外的延迟优化还是很明显的,当然,实际上到网站还需要加上DO机房到阿里云的延迟,只需要两个机房的线路能保持稳定,也是可以接受的。 70 | 71 | #### 2.图片全面优化 72 | 73 | 我的大部分图片都是放在又拍云的CDN上,又拍云已经赞助我的博客几年了,在这里再说一下感谢。图片向来是网络请求的大头,这一次,在图片加载上面做了几个处理。 74 | 75 | A.主要图片均lazyload:g 76 | 77 | 延迟加载,只有滑动到可视区域才加载,Ghost改动Markdown渲染引擎不够方便,但是编辑的时候可以直接写html,需要直接把的代码写在编辑器里。 78 | 79 | ```language-html 80 | 81 | cover 82 | ``` 83 | 84 | B.WebP图片和分辨率适配 85 | 86 | 根据设备浏览器是否支持WebP,是否是手机,利用又拍云的图形处理接口,分别加载不同格式,不同分辨率的图片,大大优化了图片的大小。 87 | 88 | ``` language-javascript 89 | /*通过js判断浏览器是否支持webP格式的图片*/ 90 | webPCheck: function(feature, callback) { 91 | var TestImages = { 92 | demo: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAsAAAABBxAREYiI/gcAAABWUDggGAAAADABAJ0BKgEAAQABABwlpAADcAD+/gbQAA==" 93 | }; 94 | var img = new Image(); 95 | img.onload = function() { 96 | var result = (img.width > 0) && (img.height > 0); 97 | console.log('支持Webp'); 98 | ImageSmartLoader.isWebPSupported = true; 99 | ImageSmartLoader.webPLoader(); 100 | }; 101 | img.onerror = function() { 102 | ImageSmartLoader.isWebPSupported = false; 103 | ImageSmartLoader.webPLoader(); 104 | }; 105 | img.src = "data:image/webp;base64," + TestImages['demo']; 106 | }, 107 | 108 | 109 | /*通过传参调用不同的lazyload*/ 110 | $(".lazy").lazyload({ 111 | advanced_load: true, 112 | data_attribute: 'url', 113 | webP_load: true, 114 | is_scale: true, 115 | scale_width: 750 116 | }); 117 | 118 | /*重新拼装lazyload的url,配合又拍云接口调用不同图片*/ 119 | if (settings.advanced_load == true) { 120 | updatedUrl += '!'; 121 | } 122 | if (settings.is_scale == true) { 123 | updatedUrl += '/fw/' + settings.scale_width; 124 | } 125 | if (settings.webP_load == true) { 126 | updatedUrl += '/format/webp'; 127 | } 128 | 129 | ``` 130 | 131 | C.进一步优化Iconfont 132 | 133 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/iconfont.png) 134 | 135 | 这一次重新用[Sketch](https://www.sketchapp.com)整理了常见的社交网站icon,加入了国内常见的V2EX、知乎、简书等网站的icon,调用起来更加方便。通过阿里云[iconfont.cn](http://iconfont.cn)生成,字体font部署在阿里云CDN上。文章中也依旧增加了自动给引用的URL标识logo的功能。 136 | 137 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/icon1.jpg) 138 | 139 | 豆瓣,维基百科在iPhone上的显示效果,十分清晰。 140 | 141 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/icon2.jpg) 142 | 143 | Github、知乎在iPhone上的效果。 144 | 145 | ``` language-javascript 146 | /*给文章中的url添加iconfont方便识别*/ 147 | urlIconlize: function(url) { 148 | var domain, 149 | _output; 150 | var iconFontTag = 'iconfont'; 151 | var iconMap = { /*索引 可在这里添加匹配规则*/ 152 | 'twitter': iconFontTag + '-twitter', 153 | 'qzone': iconFontTag + '-qzone', 154 | 'weibo': iconFontTag + '-weibo', 155 | 'facebook': iconFontTag + '-facebook', 156 | 'github': iconFontTag + '-github', 157 | 'douban': iconFontTag + '-douban', 158 | 'google': iconFontTag + '-google', 159 | 'luolei': iconFontTag + '-luolei', 160 | 'dribble': iconFontTag + '-dribble', 161 | 'v2ex': iconFontTag + '-v2ex', 162 | 'zhihu': iconFontTag + '-zhihu', 163 | 'wikipedia': iconFontTag + '-wikipedia', 164 | 'jianshu': iconFontTag + '-jianshu', 165 | 'youku': iconFontTag + '-youku', 166 | 'youtube': iconFontTag + '-youtube' 167 | 168 | } 169 | 170 | for (var name in iconMap) { 171 | if (typeof iconMap[name] !== 'function') { 172 | var MapKey = name; 173 | if (url.indexOf(MapKey) >= 0) { 174 | domain = MapKey; 175 | _output = iconMap[MapKey]; 176 | } 177 | } 178 | } 179 | 180 | return _output; 181 | }, 182 | addIcons: function() { 183 | /*给博客文章地址url添加ico识别*/ 184 | $('.single-post-inner a:not(:has(img))').each(function(i) { 185 | var _src = $(this).attr('href'); 186 | var tmp = document.createElement('a'); 187 | tmp.href = _src; 188 | _selfDomain = tmp.hostname; 189 | General.urlIconlize(_selfDomain); 190 | console.log(_selfDomain); 191 | $(this).prepend(''); 192 | }); 193 | }, 194 | ``` 195 | 考虑元旦的时候把这个功能抽出来做一个组件,方便任意网站调用。需要维护对应的域名表。 196 | 197 | 198 | D.多说评论、webfont懒加载 199 | 200 | ``` language-javascript 201 | /*异步加载js*/ 202 | function loadJS(url, callback, el) { 203 | var isIE = !!window.ActiveXObject, 204 | isIE6 = isIE && !window.XMLHttpRequest, 205 | script = document.createElement("script"), 206 | head = isIE6 ? document.documentElement : document.getElementsByTagName("head")[0]; 207 | script.type = "text/javascript"; 208 | script.async = true; 209 | if (script.readyState) { 210 | script.onreadystatechange = function() { 211 | if (script.readyState == "loaded" || script.readyState == "complete") { 212 | script.onreadystatechange = null; 213 | if (callback) { 214 | callback(); 215 | } 216 | } 217 | } 218 | } else { 219 | script.onload = function() { 220 | if (callback) { 221 | callback(); 222 | } 223 | } 224 | } 225 | script.src = url; 226 | if (el) { 227 | document.getElementById(el).appendChild(script); 228 | } else { 229 | head.insertBefore(script, head.firstChild); 230 | } 231 | }; 232 | ``` 233 | 234 | 过去webfont、多说等`.js`和`.css`资源都是页面加载的时候就直接加载,占用了一定的带宽和连接,考虑到实际情况,对于评论的`.js`均采用异步加载的方式,webfont加载使用的是[webfontloader](https://github.com/typekit/webfontloader)的异步方案,一定程度下优化。 235 | 236 | E.其他优化 237 | 238 | 除了性能上的优化,这次[Yasuko](https://github.com/foru17/Yasuko)主题在UI、体验上均做了较大的改善,着重优化了移动端上的阅读体验和细节,围绕内容而设计。 239 | 240 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/show1.jpg) 241 | 242 | 首页和文章列表页面更加紧凑,关键字和入口更加清晰,采取镜像显示模式,显示缩略图和文章摘要。 243 | 244 | ![](https://luoleiorg.b0.upaiyun.com/blog/2015/12/show2.jpg) 245 | 246 | 文章页增强阅读体验,对于字体、行高、间距等均做过调试,让不同系统、不同分辨率和不同浏览器下均能获得良好的感受。 247 | 248 | 通过Ghost自己的接口,增加前后文导航。另外自己写了一个QR二维码的接口,自动生成当前文章的二维码,方便读者能够快速扫码在手机上打开。 249 | 250 | 当然,最重要的是,增加了「打赏」功能。 251 | 252 | 点击打赏按钮,会自动弹出支付宝打赏或者微信打赏(需要自定义图片)。 253 | 254 | > 在这里我也想做一个实验,如果你觉得我过去的文章和作品对你有一定帮助,就随意打赏我点钱,也让我看看我的这篇文章都在什么时候被大家看到,几毛几块都可以。 255 | 256 | ![](http://luoleiorg.b0.upaiyun.com/vogue/qr3.gif) 257 | 258 | 259 | ## Copyright & License 260 | 261 | Copyright (c) 2013-2015 Ghost Foundation - Released under the MIT License. 262 | 263 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 264 | 265 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 266 | 267 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 268 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 269 | -------------------------------------------------------------------------------- /assets/css/font.min.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('//at.alicdn.com/t/font_1451113484_260868.eot'); /* IE9*/ 4 | src: url('//at.alicdn.com/t/font_1451113484_260868.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('//at.alicdn.com/t/font_1451113484_260868.woff') format('woff'), /* chrome、firefox */ 6 | url('//at.alicdn.com/t/font_1451113484_260868.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ 7 | url('//at.alicdn.com/t/font_1451113484_260868.svg#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | @font-face { 11 | font-family: 'Exo'; 12 | font-style: normal; 13 | font-weight: 100; 14 | src: local('Exo Thin'), local('Exo-Thin'), url(https://luoleiorg.b0.upaiyun.com/source/fonts/exo/ek6B72kladJz_Z6o5PEplKCWcynf_cDxXwCLxiixG1c.woff) format('woff'); 15 | } 16 | 17 | @font-face { 18 | font-family: 'Exo'; 19 | font-style: normal; 20 | font-weight: 400; 21 | src: local('Exo Regular'), local('Exo-Regular'), url(https://luoleiorg.b0.upaiyun.com/source/fonts/exo/ZcGd2dvMSgl3mHN3lKAjNw.woff) format('woff'); 22 | } 23 | -------------------------------------------------------------------------------- /assets/fonts/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main {padding: 30px 100px;} 60 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 61 | 62 | .helps{margin-top:40px;} 63 | .helps pre{ 64 | padding:20px; 65 | margin:10px 0; 66 | border:solid 1px #e7e1cd; 67 | background-color: #fffdef; 68 | overflow: auto; 69 | } 70 | 71 | .icon_lists li{ 72 | float:left; 73 | width: 100px; 74 | height:180px; 75 | text-align: center; 76 | } 77 | .icon_lists .icon{ 78 | font-size: 42px; 79 | line-height: 100px; 80 | margin: 10px 0; 81 | color:#333; 82 | -webkit-transition: font-size 0.25s ease-out 0s; 83 | -moz-transition: font-size 0.25s ease-out 0s; 84 | transition: font-size 0.25s ease-out 0s; 85 | 86 | } 87 | .icon_lists .icon:hover{ 88 | font-size: 100px; 89 | } 90 | -------------------------------------------------------------------------------- /assets/fonts/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 11 |
12 |

IconFont 图标

13 |
    14 | 15 |
  • 16 | 17 |
    iconfont-douban
    18 |
    
    19 |
    .iconfontdouban
    20 |
  • 21 | 22 |
  • 23 | 24 |
    iconfont-facebook
    25 |
    
    26 |
    .iconfontfacebook
    27 |
  • 28 | 29 |
  • 30 | 31 |
    iconfont-google
    32 |
    
    33 |
    .iconfontgoogle
    34 |
  • 35 | 36 |
  • 37 | 38 |
    iconfont-instagram
    39 |
    
    40 |
    .iconfontinstagram
    41 |
  • 42 | 43 |
  • 44 | 45 |
    iconfont-twitter
    46 |
    
    47 |
    .iconfonttwitter
    48 |
  • 49 | 50 |
  • 51 | 52 |
    iconfont-v2ex
    53 |
    
    54 |
    .iconfontv2ex
    55 |
  • 56 | 57 |
  • 58 | 59 |
    iconfont-wechat
    60 |
    
    61 |
    .iconfontwechat
    62 |
  • 63 | 64 |
  • 65 | 66 |
    iconfont-weibo
    67 |
    
    68 |
    .iconfontweibo
    69 |
  • 70 | 71 |
  • 72 | 73 |
    iconfont-wikipedia
    74 |
    
    75 |
    .iconfontwikipedia
    76 |
  • 77 | 78 |
  • 79 | 80 |
    iconfont-zhihu
    81 |
    
    82 |
    .iconfontzhihu
    83 |
  • 84 | 85 |
86 | 87 | 88 |
89 | 第一步:使用font-face声明字体 90 |
 91 | @font-face {font-family: 'iconfont';
 92 |     src: url('iconfont.eot'); /* IE9*/
 93 |     src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
 94 |     url('iconfont.woff') format('woff'), /* chrome、firefox */
 95 |     url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
 96 |     url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
 97 | }
 98 | 
99 | 第二步:定义使用iconfont的样式 100 |
101 | .iconfont{
102 |     font-family:"iconfont" !important;
103 |     font-size:16px;font-style:normal;
104 |     -webkit-font-smoothing: antialiased;
105 |     -webkit-text-stroke-width: 0.2px;
106 |     -moz-osx-font-smoothing: grayscale;}
107 | 
108 | 第三步:挑选相应图标并获取字体编码,应用于页面 109 |
110 | <i class="iconfont">&#x33;</i>
111 | 
112 |
113 | 114 |
115 | 116 | 117 | -------------------------------------------------------------------------------- /assets/fonts/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot'); /* IE9*/ 4 | src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('iconfont.woff') format('woff'), /* chrome, firefox */ 6 | url('iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg#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-iconfontdouban:before { content: "\e600"; } 19 | .icon-iconfontfacebook:before { content: "\e601"; } 20 | .icon-iconfontgoogle:before { content: "\e602"; } 21 | .icon-iconfontinstagram:before { content: "\e603"; } 22 | .icon-iconfonttwitter:before { content: "\e604"; } 23 | .icon-iconfontv2ex:before { content: "\e605"; } 24 | .icon-iconfontwechat:before { content: "\e606"; } 25 | .icon-iconfontweibo:before { content: "\e607"; } 26 | .icon-iconfontwikipedia:before { content: "\e608"; } 27 | .icon-iconfontzhihu:before { content: "\e609"; } 28 | -------------------------------------------------------------------------------- /assets/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/fonts/iconfont.eot -------------------------------------------------------------------------------- /assets/fonts/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20120731 at Sat Dec 26 00:54:09 2015 6 | By Ads 7 | 8 | 9 | 10 | 24 | 26 | 28 | 30 | 32 | 36 | 39 | 42 | 46 | 50 | 54 | 61 | 67 | 74 | 80 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /assets/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/fonts/iconfont.ttf -------------------------------------------------------------------------------- /assets/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/fonts/iconfont.woff -------------------------------------------------------------------------------- /assets/images/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /assets/images/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /assets/images/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /assets/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/apple-touch-icon.png -------------------------------------------------------------------------------- /assets/images/escheresque_ste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/escheresque_ste.png -------------------------------------------------------------------------------- /assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/favicon.png -------------------------------------------------------------------------------- /assets/images/qr-alipay-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/qr-alipay-256.png -------------------------------------------------------------------------------- /assets/images/qr-wechat-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/assets/images/qr-wechat-256.png -------------------------------------------------------------------------------- /assets/js/all.min.js: -------------------------------------------------------------------------------- 1 | function loadJS(A,e,t){var o=!!window.ActiveXObject,i=o&&!window.XMLHttpRequest,a=document.createElement("script"),r=i?document.documentElement:document.getElementsByTagName("head")[0];a.type="text/javascript",a.async=!0,a.readyState?a.onreadystatechange=function(){"loaded"!=a.readyState&&"complete"!=a.readyState||(a.onreadystatechange=null,e&&e())}:a.onload=function(){e&&e()},a.src=A,t?document.getElementById(t).appendChild(a):r.insertBefore(a,r.firstChild)}$.fn.extend({isOnScreenVisible:function(){if(!$("body").hasClass("post-template"))return!1;var A=$(window),e={top:A.scrollTop(),left:A.scrollLeft()};e.right=e.left+A.width(),e.bottom=e.top+A.height();var t=this.offset();return t.right=t.left+this.outerWidth(),t.bottom=t.top+this.outerHeight(),!(e.rightt.right||e.bottomt.bottom)}});var duoshuoQuery={short_name:"luolei"},GlobalConfigue={masterDomain:"https://luolei.org"},General={isMobile:!1,isWechat:!1,viewWidth:$(window).width(),absUrl:location.protocol+"//"+location.host,init:function(){var A=window,e=(A.document,navigator.userAgent.toLowerCase()),t=A.navigator.appVersion.match(/android/gi);A.navigator.appVersion.match(/iphone/gi);"micromessenger"==e.match(/MicroMessenger/i)&&(General.isWechat=!0,$("body").addClass("wechat-webview")),t&&(General.isMobile=!0),$("body").hasClass("post-template")&&(General.updateImageWidth(),General.rewardLoader()),General.webFontLoader(),General.scrollToPos(),General.arrowEvent()},updateImageWidth:function(){function A(){var A=$(this),e=t.outerWidth(),o=this.naturalWidth;o>=e?A.addClass("full-img"):A.removeClass("full-img")}function e(){o.each(A)}var t=$(".post-content"),o=$(".single-post-inner img").on("load",A);e()},webFontLoader:function(){WebFontConfig={loading:function(){},custom:{families:["Exo","iconfont"],urls:[General.absUrl+"/assets/css/font.min.css"]}},loadJS(General.absUrl+"/assets/js/webfont.js",function(){WebFont.load({custom:{families:["Exo","iconfont"]}})})},arrowEvent:function(){$(".arrow_down").click(function(){return $("html,body").animate({scrollTop:$(window).height()-20},600,function(){window.location.hash="#"}),!1})},scrollToPos:function(A){var e="我要飞到最高",t=(A||$(window).height(),$('
').appendTo("body"));$(window).scroll(function(){$(window).scrollTop()>$(window).height()?t.fadeIn(500):t.fadeOut(500)}),t.click(function(A){A.preventDefault(),$("html,body").animate({scrollTop:0},666,function(){window.location.hash="#"})})},urlIconlize:function(A){var e,t,o="iconfont",i={twitter:o+"-twitter",qzone:o+"-qzone",weibo:o+"-weibo",facebook:o+"-facebook",github:o+"-github",douban:o+"-douban",google:o+"-google",luolei:o+"-luolei",dribble:o+"-dribble",v2ex:o+"-v2ex",zhihu:o+"-zhihu",wikipedia:o+"-wikipedia",jianshu:o+"-jianshu",youku:o+"-youku",youtube:o+"-youtube"};for(var a in i)if("function"!=typeof i[a]){var r=a;A.indexOf(r)>=0&&(e=r,t=i[r])}return t},addIcons:function(){$(".single-post-inner a:not(:has(img))").each(function(A){var e=$(this).attr("href"),t=document.createElement("a");t.href=e,_selfDomain=t.hostname,General.urlIconlize(_selfDomain),$(this).prepend('');var o=$(this).find("i").css("color"),i=$(this).css("color");$(this).hover(function(){$(this).css("color",o),$(this).addClass("animated pulse")},function(){$(this).css("color",i),$(this).removeClass("animated pulse")})})},rewardLoader:function(){var A={alipay:"/assets/images/qr-alipay-256.png",wechat:"/assets/images/qr-wechat-256.png"};General.isWechat&&$(".wechat-code b").html("长按上方二维码打赏作者"),$(".money-like .reward-button").hover(function(){$("img.wechat-img").attr("src",A.wechat),$("img.alipay-img").attr("src",A.alipay),$(".money-code").fadeIn(),$(this).addClass("active")},function(){$(".money-code").fadeOut(),$(this).removeClass("active")},800),$(".money-like .reward-button").click(function(){$(this).hasClass("active")?($(this).find("img.wechat-img").attr("src",A.wechat),$(this).find("img.alipay-img").attr("src",A.alipay),$(".money-code").fadeOut(),$(this).removeClass("active")):($(".money-code").fadeIn(),$(this).addClass("active"))})},commentLoader:function(){if(!$("body").hasClass("post-template"))return!1;var A=GlobalConfigue.masterDomain+location.pathname;$(window).scroll(function(){if($(".author-image").isOnScreenVisible()&&!$(".author-image").hasClass("comment-loaded")){var e=document,t=e.createElement("script");t.src="https://luoleiorg.disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),loadJS("https://luoleiorg.disqus.com/embed.js",function(){$(".author-image").addClass("comment-loaded"),DISQUS.reset({reload:!0,config:function(){this.page.identifier=A,this.page.url=A}})})}})}},ImageSmartLoader={isWebPSupported:!1,isImageCompressed:!1,init:function(){ImageSmartLoader.webPCheck()},isCompressedCheck:function(){},webPCheck:function(A,e){var t={demo:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAsAAAABBxAREYiI/gcAAABWUDggGAAAADABAJ0BKgEAAQABABwlpAADcAD+/gbQAA=="},o=new Image;o.onload=function(){o.width>0&&o.height>0;ImageSmartLoader.isWebPSupported=!0,ImageSmartLoader.webPLoader()},o.onerror=function(){ImageSmartLoader.isWebPSupported=!1,ImageSmartLoader.webPLoader()},o.src="data:image/webp;base64,"+t.demo},imgLoader:function(){},webPLoader:function(){if(1==ImageSmartLoader.isWebPSupported){if(768==General.viewWidth)return $(".lazy").lazyload({advanced_load:!0,data_attribute:"url",webP_load:!0,is_scale:!1}),!1;General.viewWidth<768?$(".lazy").lazyload({advanced_load:!0,data_attribute:"url",webP_load:!0,is_scale:!0,scale_width:750}):$(".lazy").lazyload({advanced_load:!0,data_attribute:"url",webP_load:!0,is_scale:!1})}else{if(768==General.viewWidth)return $(".lazy").lazyload({advanced_load:!0,data_attribute:"url",webP_load:!1,is_scale:!0,scale_width:1500}),!1;General.viewWidth<768?$(".lazy").lazyload({advanced_load:!0,data_attribute:"url",webP_load:!1,is_scale:!0,scale_width:750}):$(".lazy").lazyload({advanced_load:!0,data_attribute:"url",webP_load:!1,is_scale:!1})}}};$(document).ready(function(){var A=$(window);$.fn.lazyload=function(e){function t(){var A=0;i.each(function(){var e=$(this);if(!a.skip_invisible||e.is(":visible"))if($.abovethetop(this,a)||$.leftofbegin(this,a));else if($.belowthefold(this,a)||$.rightoffold(this,a)){if(++A>a.failure_limit)return!1}else e.trigger("appear"),A=0})}var o,i=this,a={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:window,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/gif;base64,R0lGODlhbgAKAIAAAP///////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQICQAAACwAAAAAbgAKAAACIIyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8lUAACH5BAgJAAAALAAAAABuAAoAg7SytNza3PTy9MTCxLy+vOTi5Pz6/LS2tMzOzOTm5Pz+/P///wAAAAAAAAAAAAAAAAQ+cMlJq7046827/2AojmSJGchBJGbrvhsCzIcA33h7zHOQ/0APgXcoBI/ISgKwIyiSUKQgUHhGr9isdst9RQAAIfkECAkAAAAsAAAAAG4ACgCDtLK03Nrc9PL0xMLEvL685OLk/Pr8tLa0zM7M5Obk/P78////AAAAAAAAAAAAAAAABD5wyUmrvTjrzbv/YCiOZGlaBnIQyem+8IUA9CHEeE4eNB3owOCG0DsUhMikJAHgERTKaFAQKECl2Kx2y91GAAAh+QQICQAAACwAAAAAbgAKAIO0srTc2tz08vTEwsS8vrzk4uT8+vy0trTMzszk5uT8/vz///8AAAAAAAAAAAAAAAAEPnDJSau9OOvNu/9gKI5kaZYGchDJ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0xMLEvL685OLk/Pr8tLa0zM7M5Obk/P78////AAAAAAAAAAAAAAAABD5wyUmrvTjrzbv/YCiOZGmeS0IciIG+cCwJQA0gcq6HwQH4h51wiCnYAASiUqlY/RLLqFBRCAik2Kx2y4VFAAAh+QQICQAAACwAAAAAbgAKAIO0srTc2tz08vTEwsS8vrzk4uT8+vy0trTMzszk5uT8/vz///8AAAAAAAAAAAAAAAAEPnDJSau9OOvNu/9gKI5kaZ5bQhyIgb5wLAlADSByrofBAfiHnXCIKdgABKJSqVj9EsuoUFEICKTYrHbLBUUAACH5BAgJAAAALAAAAABuAAoAg7SytNza3PTy9MTCxLy+vOTi5Pz6/LS2tMzOzOTm5Pz+/P///wAAAAAAAAAAAAAAAAQ+cMlJq7046827/2AojmRpnqiUEAdipHAMC0ANIHKuh8EB+IedcIgp2AAEolKpYP0Sy6hQUQgIpNisdstdRAAAIfkECAkAAAAsAAAAAG4ACgCDtLK03Nrc9PL0xMLEvL685OLk/Pr8tLa0zM7M5Obk/P78////AAAAAAAAAAAAAAAABD1wyUmrvTjrzbv/YCiOZGmeqJkQB2KkcAwLQA0gcq6HwQH4h51wiCnYAASiUqlg/RLLqFBRCAik2Kx2i4oAADs=",advanced_load:!1,webP_load:!1,is_scale:!1,scale_width:750};return e&&(void 0!==e.failurelimit&&(e.failure_limit=e.failurelimit,delete e.failurelimit),void 0!==e.effectspeed&&(e.effect_speed=e.effectspeed,delete e.effectspeed),$.extend(a,e)),o=void 0===a.container||a.container===window?A:$(a.container),0===a.event.indexOf("scroll")&&o.bind(a.event,function(){return t()}),this.each(function(){var A=this,e=$(A);A.loaded=!1,void 0!==e.attr("src")&&e.attr("src")!==!1||e.is("img")&&(e.attr("src",a.placeholder),e.addClass("loading")),e.one("appear",function(){if(!this.loaded){if(a.appear){var t=i.length;a.appear.call(A,t,a)}var o=e.attr("data-"+a.data_attribute);(o.indexOf("upaiyun")>-1||o.indexOf("file.is26.com")>-1)&&(1==a.advanced_load&&(o+="!"),1==a.is_scale&&(o+="/fw/"+a.scale_width),1==a.webP_load&&(o+="/format/webp")),$("").bind("load",function(){e.hide(),e.is("img")?e.attr("src",o):e.css("background-image","url('"+o+"')"),e[a.effect](a.effect_speed),A.loaded=!0;var t=$.grep(i,function(A){return!A.loaded});if(i=$(t),a.load){var r=i.length;a.load.call(A,r,a)}e.removeClass("loading")}).attr("src",o)}}),0!==a.event.indexOf("scroll")&&e.bind(a.event,function(){A.loaded||e.trigger("appear")})}),A.bind("resize",function(){t()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&A.bind("pageshow",function(A){A.originalEvent&&A.originalEvent.persisted&&i.each(function(){$(this).trigger("appear")})}),$(document).ready(function(){t()}),this},$.belowthefold=function(e,t){var o;return o=void 0===t.container||t.container===window?(window.innerHeight?window.innerHeight:A.height())+A.scrollTop():$(t.container).offset().top+$(t.container).height(),o<=$(e).offset().top-t.threshold},$.rightoffold=function(e,t){var o;return o=void 0===t.container||t.container===window?A.width()+A.scrollLeft():$(t.container).offset().left+$(t.container).width(),o<=$(e).offset().left-t.threshold},$.abovethetop=function(e,t){var o;return o=void 0===t.container||t.container===window?A.scrollTop():$(t.container).offset().top,o>=$(e).offset().top+t.threshold+$(e).height()},$.leftofbegin=function(e,t){var o;return o=void 0===t.container||t.container===window?A.scrollLeft():$(t.container).offset().left,o>=$(e).offset().left+t.threshold+$(e).width()},$.inviewport=function(A,e){return!($.rightoffold(A,e)||$.leftofbegin(A,e)||$.belowthefold(A,e)||$.abovethetop(A,e))},$.extend($.expr[":"],{"below-the-fold":function(A){return $.belowthefold(A,{threshold:0})},"above-the-top":function(A){return!$.belowthefold(A,{threshold:0})},"right-of-screen":function(A){return $.rightoffold(A,{threshold:0})},"left-of-screen":function(A){return!$.rightoffold(A,{threshold:0})},"in-viewport":function(A){return $.inviewport(A,{threshold:0})},"above-the-fold":function(A){return!$.belowthefold(A,{threshold:0})},"right-of-fold":function(A){return $.rightoffold(A,{threshold:0})},"left-of-fold":function(A){return!$.rightoffold(A,{threshold:0})}}),General.init(),ImageSmartLoader.init(),$("body").hasClass("post-template")&&(General.addIcons(),General.commentLoader())}); -------------------------------------------------------------------------------- /assets/js/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Main JS file for Casper behaviours 3 | */ 4 | 5 | /* globals jQuery, document */ 6 | (function ($, undefined) { 7 | "use strict"; 8 | 9 | var $document = $(document); 10 | 11 | $document.ready(function () { 12 | 13 | var $postContent = $(".post-content"); 14 | $postContent.fitVids(); 15 | 16 | $(".scroll-down").arctic_scroll(); 17 | 18 | $(".menu-button, .nav-cover, .nav-close").on("click", function(e){ 19 | e.preventDefault(); 20 | $("body").toggleClass("nav-opened nav-closed"); 21 | }); 22 | 23 | }); 24 | 25 | // Arctic Scroll by Paul Adam Davis 26 | // https://github.com/PaulAdamDavis/Arctic-Scroll 27 | $.fn.arctic_scroll = function (options) { 28 | 29 | var defaults = { 30 | elem: $(this), 31 | speed: 500 32 | }, 33 | 34 | allOptions = $.extend(defaults, options); 35 | 36 | allOptions.elem.click(function (event) { 37 | event.preventDefault(); 38 | var $this = $(this), 39 | $htmlBody = $('html, body'), 40 | offset = ($this.attr('data-offset')) ? $this.attr('data-offset') : false, 41 | position = ($this.attr('data-position')) ? $this.attr('data-position') : false, 42 | toMove; 43 | 44 | if (offset) { 45 | toMove = parseInt(offset); 46 | $htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, allOptions.speed); 47 | } else if (position) { 48 | toMove = parseInt(position); 49 | $htmlBody.stop(true, false).animate({scrollTop: toMove }, allOptions.speed); 50 | } else { 51 | $htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, allOptions.speed); 52 | } 53 | }); 54 | 55 | }; 56 | })(jQuery); 57 | -------------------------------------------------------------------------------- /assets/js/jquery.fitvids.js: -------------------------------------------------------------------------------- 1 | /*global jQuery */ 2 | /*jshint browser:true */ 3 | /*! 4 | * FitVids 1.1 5 | * 6 | * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 7 | * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 8 | * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 9 | * 10 | */ 11 | 12 | (function( $ ){ 13 | 14 | "use strict"; 15 | 16 | $.fn.fitVids = function( options ) { 17 | var settings = { 18 | customSelector: null 19 | }; 20 | 21 | if(!document.getElementById('fit-vids-style')) { 22 | // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 23 | var head = document.head || document.getElementsByTagName('head')[0]; 24 | var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; 25 | var div = document.createElement('div'); 26 | div.innerHTML = '

x

'; 27 | head.appendChild(div.childNodes[1]); 28 | } 29 | 30 | if ( options ) { 31 | $.extend( settings, options ); 32 | } 33 | 34 | return this.each(function(){ 35 | var selectors = [ 36 | "iframe[src*='player.vimeo.com']", 37 | "iframe[src*='youtube.com']", 38 | "iframe[src*='youtube-nocookie.com']", 39 | "iframe[src*='kickstarter.com'][src*='video.html']", 40 | "object", 41 | "embed" 42 | ]; 43 | 44 | if (settings.customSelector) { 45 | selectors.push(settings.customSelector); 46 | } 47 | 48 | var $allVideos = $(this).find(selectors.join(',')); 49 | $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 50 | 51 | $allVideos.each(function(){ 52 | var $this = $(this); 53 | if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 54 | var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 55 | width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 56 | aspectRatio = height / width; 57 | if(!$this.attr('id')){ 58 | var videoID = 'fitvid' + Math.floor(Math.random()*999999); 59 | $this.attr('id', videoID); 60 | } 61 | $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 62 | $this.removeAttr('height').removeAttr('width'); 63 | }); 64 | }); 65 | }; 66 | // Works with either jQuery or Zepto 67 | })( window.jQuery || window.Zepto ); 68 | -------------------------------------------------------------------------------- /assets/js/lazy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Lazy Load - jQuery plugin for lazy loading images 3 | * 4 | * Copyright (c) 2007-2015 Mika Tuupola 5 | * 6 | * Licensed under the MIT license: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * 9 | * Project home: 10 | * http://www.appelsiini.net/projects/lazyload 11 | * 12 | * Version: 1.9.7 13 | * 14 | */ 15 | 16 | (function($, window, document, undefined) { 17 | var $window = $(window); 18 | 19 | $.fn.lazyload = function(options) { 20 | var elements = this; 21 | var $container; 22 | var settings = { 23 | threshold : 0, 24 | failure_limit : 0, 25 | event : "scroll", 26 | effect : "show", 27 | container : window, 28 | data_attribute : "original", 29 | skip_invisible : false, 30 | appear : null, 31 | load : null, 32 | placeholder : "data:image/gif;base64,R0lGODlhbgAKAIAAAP///////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQICQAAACwAAAAAbgAKAAACIIyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8lUAACH5BAgJAAAALAAAAABuAAoAg7SytNza3PTy9MTCxLy+vOTi5Pz6/LS2tMzOzOTm5Pz+/P///wAAAAAAAAAAAAAAAAQ+cMlJq7046827/2AojmSJGchBJGbrvhsCzIcA33h7zHOQ/0APgXcoBI/ISgKwIyiSUKQgUHhGr9isdst9RQAAIfkECAkAAAAsAAAAAG4ACgCDtLK03Nrc9PL0xMLEvL685OLk/Pr8tLa0zM7M5Obk/P78////AAAAAAAAAAAAAAAABD5wyUmrvTjrzbv/YCiOZGlaBnIQyem+8IUA9CHEeE4eNB3owOCG0DsUhMikJAHg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AAAAAAAAAAAAAAAAQ+cMlJq7046827/2AojmRpjglxIMbpvrAlADSAxHhOBgfQH7qgcFOoAQjDpFKiUPkSy6hQUQgIpNisdssNRgAAIfkECAkAAAAsAAAAAG4ACgCDtLK03Nrc9PL0xMLEvL685OLk/Pr8tLa0zM7M5Obk/P78////AAAAAAAAAAAAAAAABD5wyUmrvTjrzbv/YCiOZGmeS0IciIG+cCwJQA0gcq6HwQH4h51wiCnYAASiUqlY/RLLqFBRCAik2Kx2y4VFAAAh+QQICQAAACwAAAAAbgAKAIO0srTc2tz08vTEwsS8vrzk4uT8+vy0trTMzszk5uT8/vz///8AAAAAAAAAAAAAAAAEPnDJSau9OOvNu/9gKI5kaZ5bQhyIgb5wLAlADSByrofBAfiHnXCIKdgABKJSqVj9EsuoUFEICKTYrHbLBUUAACH5BAgJAAAALAAAAABuAAoAg7SytNza3PTy9MTCxLy+vOTi5Pz6/LS2tMzOzOTm5Pz+/P///wAAAAAAAAAAAAAAAAQ+cMlJq7046827/2AojmRpnqiUEAdipHAMC0ANIHKuh8EB+IedcIgp2AAEolKpYP0Sy6hQUQgIpNisdstdRAAAIfkECAkAAAAsAAAAAG4ACgCDtLK03Nrc9PL0xMLEvL685OLk/Pr8tLa0zM7M5Obk/P78////AAAAAAAAAAAAAAAABD1wyUmrvTjrzbv/YCiOZGmeqJkQB2KkcAwLQA0gcq6HwQH4h51wiCnYAASiUqlg/RLLqFBRCAik2Kx2i4oAADs=", 33 | advanced_load:false, 34 | webP_load : false, 35 | is_scale:false, 36 | scale_width:750 37 | }; 38 | 39 | function update() { 40 | var counter = 0; 41 | 42 | elements.each(function() { 43 | var $this = $(this); 44 | if (settings.skip_invisible && !$this.is(":visible")) { 45 | return; 46 | } 47 | if ($.abovethetop(this, settings) || 48 | $.leftofbegin(this, settings)) { 49 | /* Nothing. */ 50 | } else if (!$.belowthefold(this, settings) && 51 | !$.rightoffold(this, settings)) { 52 | $this.trigger("appear"); 53 | /* if we found an image we'll load, reset the counter */ 54 | counter = 0; 55 | } else { 56 | if (++counter > settings.failure_limit) { 57 | return false; 58 | } 59 | } 60 | }); 61 | 62 | } 63 | 64 | if(options) { 65 | /* Maintain BC for a couple of versions. */ 66 | if (undefined !== options.failurelimit) { 67 | options.failure_limit = options.failurelimit; 68 | delete options.failurelimit; 69 | } 70 | if (undefined !== options.effectspeed) { 71 | options.effect_speed = options.effectspeed; 72 | delete options.effectspeed; 73 | } 74 | 75 | $.extend(settings, options); 76 | } 77 | 78 | /* Cache container as jQuery as object. */ 79 | $container = (settings.container === undefined || 80 | settings.container === window) ? $window : $(settings.container); 81 | 82 | /* Fire one scroll event per scroll. Not one scroll event per image. */ 83 | if (0 === settings.event.indexOf("scroll")) { 84 | $container.bind(settings.event, function() { 85 | // console.log('滚动了111'); 86 | // console.log('滚动'); 87 | return update(); 88 | }); 89 | } 90 | 91 | this.each(function() { 92 | var self = this; 93 | var $self = $(self); 94 | 95 | self.loaded = false; 96 | 97 | /* If no src attribute given use data:uri. */ 98 | if ($self.attr("src") === undefined || $self.attr("src") === false) { 99 | if ($self.is("img")) { 100 | $self.attr("src", settings.placeholder); 101 | $self.addClass("loading"); 102 | } 103 | } 104 | 105 | /* When appear is triggered load original image. */ 106 | 107 | $self.one("appear", function() { 108 | if (!this.loaded) { 109 | if (settings.appear) { 110 | var elements_left = elements.length; 111 | settings.appear.call(self, elements_left, settings); 112 | } 113 | var updatedUrl = $self.attr("data-" + settings.data_attribute ); 114 | if(settings.advanced_load == true){ 115 | updatedUrl +='!'; 116 | } 117 | if(settings.is_scale ==true){ 118 | updatedUrl += '/fw/' + settings.scale_width; 119 | } 120 | if(settings.webP_load == true){ 121 | updatedUrl += '/format/webp'; 122 | } 123 | 124 | // console.log(updatedUrl); 125 | $("") 126 | .bind("load", function() { 127 | 128 | $self.hide(); 129 | 130 | if ($self.is("img")) { 131 | $self.attr("src", updatedUrl); 132 | } else { 133 | $self.css("background-image", "url('" + updatedUrl + "')"); 134 | } 135 | $self[settings.effect](settings.effect_speed); 136 | 137 | self.loaded = true; 138 | 139 | /* Remove image from array so it is not looped next time. */ 140 | var temp = $.grep(elements, function(element) { 141 | return !element.loaded; 142 | }); 143 | elements = $(temp); 144 | 145 | if (settings.load) { 146 | var elements_left = elements.length; 147 | settings.load.call(self, elements_left, settings); 148 | } 149 | $self.removeClass("loading"); 150 | }) 151 | .attr("src", updatedUrl); 152 | } 153 | }); 154 | 155 | /* When wanted event is triggered load original image */ 156 | /* by triggering appear. */ 157 | if (0 !== settings.event.indexOf("scroll")) { 158 | $self.bind(settings.event, function() { 159 | if (!self.loaded) { 160 | $self.trigger("appear"); 161 | } 162 | }); 163 | } 164 | }); 165 | 166 | /* Check if something appears when window is resized. */ 167 | $window.bind("resize", function() { 168 | update(); 169 | }); 170 | 171 | /* With IOS5 force loading images when navigating with back button. */ 172 | /* Non optimal workaround. */ 173 | if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) { 174 | $window.bind("pageshow", function(event) { 175 | if (event.originalEvent && event.originalEvent.persisted) { 176 | elements.each(function() { 177 | $(this).trigger("appear"); 178 | }); 179 | } 180 | }); 181 | } 182 | 183 | /* Force initial check if images should appear. */ 184 | $(document).ready(function() { 185 | update(); 186 | }); 187 | 188 | return this; 189 | }; 190 | 191 | /* Convenience methods in jQuery namespace. */ 192 | /* Use as $.belowthefold(element, {threshold : 100, container : window}) */ 193 | 194 | $.belowthefold = function(element, settings) { 195 | var fold; 196 | 197 | if (settings.container === undefined || settings.container === window) { 198 | fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop(); 199 | } else { 200 | fold = $(settings.container).offset().top + $(settings.container).height(); 201 | } 202 | 203 | return fold <= $(element).offset().top - settings.threshold; 204 | }; 205 | 206 | $.rightoffold = function(element, settings) { 207 | var fold; 208 | 209 | if (settings.container === undefined || settings.container === window) { 210 | fold = $window.width() + $window.scrollLeft(); 211 | } else { 212 | fold = $(settings.container).offset().left + $(settings.container).width(); 213 | } 214 | 215 | return fold <= $(element).offset().left - settings.threshold; 216 | }; 217 | 218 | $.abovethetop = function(element, settings) { 219 | var fold; 220 | 221 | if (settings.container === undefined || settings.container === window) { 222 | fold = $window.scrollTop(); 223 | } else { 224 | fold = $(settings.container).offset().top; 225 | } 226 | 227 | return fold >= $(element).offset().top + settings.threshold + $(element).height(); 228 | }; 229 | 230 | $.leftofbegin = function(element, settings) { 231 | var fold; 232 | 233 | if (settings.container === undefined || settings.container === window) { 234 | fold = $window.scrollLeft(); 235 | } else { 236 | fold = $(settings.container).offset().left; 237 | } 238 | 239 | return fold >= $(element).offset().left + settings.threshold + $(element).width(); 240 | }; 241 | 242 | $.inviewport = function(element, settings) { 243 | 244 | return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) && 245 | !$.belowthefold(element, settings) && !$.abovethetop(element, settings); 246 | }; 247 | 248 | /* Custom selectors for your convenience. */ 249 | /* Use as $("img:below-the-fold").something() or */ 250 | /* $("img").filter(":below-the-fold").something() which is faster */ 251 | 252 | $.extend($.expr[":"], { 253 | "below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); }, 254 | "above-the-top" : function(a) { return !$.belowthefold(a, {threshold : 0}); }, 255 | "right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); }, 256 | "left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); }, 257 | "in-viewport" : function(a) { return $.inviewport(a, {threshold : 0}); }, 258 | /* Maintain BC for couple of versions. */ 259 | "above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); }, 260 | "right-of-fold" : function(a) { return $.rightoffold(a, {threshold : 0}); }, 261 | "left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); } 262 | }); 263 | 264 | })(jQuery, window, document); 265 | -------------------------------------------------------------------------------- /assets/js/prism.js: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+bash+css-extras+git+handlebars+http+makefile+markdown+nginx+php+sass+scss&plugins=line-highlight+line-numbers+autolinker+file-highlight+show-language */ 2 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=_self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(d instanceof a)){u.lastIndex=0;var m=u.exec(d);if(m){c&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),P=[p,1];b&&P.push(b);var A=new a(i,g?t.tokenize(m,g):m,h);P.push(A),w&&P.push(w),Array.prototype.splice.apply(r,P)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var l={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}t.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+""},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code,l=n.immediateClose;_self.postMessage(t.highlight(r,t.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 3 | Prism.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; 4 | Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); 5 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; 6 | Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript; 7 | !function(e){var t={variable:[{pattern:/\$?\(\([\w\W]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\w\W]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,lookbehind:!0,inside:t},{pattern:/("|')(?:\\?[\s\S])*?\1/g,inside:t}],variable:t.variable,"function":{pattern:/(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,lookbehind:!0},keyword:{pattern:/(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,lookbehind:!0},"boolean":{pattern:/(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation}(Prism); 8 | Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:\.\w]+/,id:/#[-:\.\w]+/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,6}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%\.]+/}); 9 | Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(\\?.)*?\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s(--|-)\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m}; 10 | !function(e){var a=/\{\{\{[\w\W]+?\}\}\}|\{\{[\w\W]+?\}\}/g;e.languages.handlebars=e.languages.extend("markup",{handlebars:{pattern:a,inside:{delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(\\?.)*?\1/,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?)\b/,"boolean":/\b(true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\w\W]+/}},punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/}}}),e.languages.insertBefore("handlebars","tag",{"handlebars-comment":{pattern:/\{\{![\w\W]*?\}\}/,alias:["handlebars","comment"]}}),e.hooks.add("before-highlight",function(e){"handlebars"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(a,function(a){return e.tokenStack.push(a),"___HANDLEBARS"+e.tokenStack.length+"___"}))}),e.hooks.add("before-insert",function(e){"handlebars"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),e.hooks.add("after-highlight",function(a){if("handlebars"===a.language){for(var n,t=0;n=a.tokenStack[t];t++)a.highlightedCode=a.highlightedCode.replace("___HANDLEBARS"+(t+1)+"___",e.highlight(n,a.grammar,"handlebars").replace(/\$/g,"$$$$"));a.element.innerHTML=a.highlightedCode}})}(Prism); 11 | Prism.languages.http={"request-line":{pattern:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] [0-9]+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )[0-9]+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:new RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http","header-name",options)}; 12 | Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|.)*/,lookbehind:!0},string:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}; 13 | Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])([\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.italic.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.bold.inside.italic=Prism.util.clone(Prism.languages.markdown.italic),Prism.languages.markdown.italic.inside.bold=Prism.util.clone(Prism.languages.markdown.bold); 14 | Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|server|events|location|include|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types)\b/i}),Prism.languages.insertBefore("nginx","keyword",{variable:/\$[a-z_]+/i}); 15 | Prism.languages.php=Prism.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),Prism.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),Prism.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),Prism.languages.markup&&(Prism.hooks.add("before-highlight",function(e){"php"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(a){return e.tokenStack.push(a),"{{{PHP"+e.tokenStack.length+"}}}"}))}),Prism.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),Prism.hooks.add("after-highlight",function(e){if("php"===e.language){for(var a,n=0;a=e.tokenStack[n];n++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(n+1)+"}}}",Prism.highlight(a,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),Prism.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),Prism.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:Prism.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})); 16 | !function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var a=/((\$[-_\w]+)|(#\{\$[-_\w]+\}))/i,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:a,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:a,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,delete e.languages.sass.selector,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); 17 | Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;\{\}\(\)]?([^@;\{\}\(\)]|&|#\{\$[-_\w]+\})+(?=\s*\{(\}|\s|[^\}]+(:|\{)[^\}]+))/m,inside:{placeholder:/%[-_\w]+/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","property",{variable:/\$[-_\w]+|#\{\$[-_\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-_\w]+/,alias:"selector"},statement:/\B!(?:default|optional)\b/i,"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.util.clone(Prism.languages.scss); 18 | !function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function t(e,t){return t=" "+t+" ",(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)>-1}function n(e,n,i){for(var o,a=n.replace(/\s+/g,"").split(","),l=+e.getAttribute("data-line-offset")||0,d=r()?parseInt:parseFloat,c=d(getComputedStyle(e).lineHeight),s=0;o=a[s++];){o=o.split("-");var u=+o[0],m=+o[1]||u,h=document.createElement("div");h.textContent=Array(m-u+2).join(" \n"),h.className=(i||"")+" line-highlight",t(e,"line-numbers")||(h.setAttribute("data-start",u),m>u&&h.setAttribute("data-end",m)),h.style.top=(u-l-1)*c+"px",t(e,"line-numbers")?e.appendChild(h):(e.querySelector("code")||e).appendChild(h)}}function i(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var i=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(i&&!document.getElementById(t)){var r=t.slice(0,t.lastIndexOf(".")),o=document.getElementById(r);o&&(o.hasAttribute("data-line")||o.setAttribute("data-line",""),n(o,i,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var r=function(){var e;return function(){if("undefined"==typeof e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding=0,t.style.border=0,t.innerHTML=" 
 ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}}(),o=0;Prism.hooks.add("complete",function(t){var r=t.element.parentNode,a=r&&r.getAttribute("data-line");r&&a&&/pre/i.test(r.nodeName)&&(clearTimeout(o),e(".line-highlight",r).forEach(function(e){e.parentNode.removeChild(e)}),n(r,a),o=setTimeout(i,1))}),window.addEventListener&&window.addEventListener("hashchange",i)}}(); 19 | !function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("complete",function(e){if(e.code){var t=e.element.parentNode,s=/\s*\bline-numbers\b\s*/;if(t&&/pre/i.test(t.nodeName)&&(s.test(t.className)||s.test(e.element.className))&&!e.element.querySelector(".line-numbers-rows")){s.test(e.element.className)&&(e.element.className=e.element.className.replace(s,"")),s.test(t.className)||(t.className+=" line-numbers");var n,a=e.code.match(/\n(?!$)/g),l=a?a.length+1:1,m=new Array(l+1);m=m.join(""),n=document.createElement("span"),n.className="line-numbers-rows",n.innerHTML=m,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(n)}}})}(); 20 | !function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var i=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~\/.:#=?&]+/,n=/\b\S+@[\w.]+[a-z]{2}/,e=/\[([^\]]+)]\(([^)]+)\)/,t=["comment","url","attr-value","string"];Prism.hooks.add("before-highlight",function(a){a.grammar&&!a.grammar["url-link"]&&(Prism.languages.DFS(a.grammar,function(a,r,l){t.indexOf(l)>-1&&"Array"!==Prism.util.type(r)&&(r.pattern||(r=this[a]={pattern:r}),r.inside=r.inside||{},"comment"==l&&(r.inside["md-link"]=e),"attr-value"==l?Prism.languages.insertBefore("inside","punctuation",{"url-link":i},r):r.inside["url-link"]=i,r.inside["email-link"]=n)}),a.grammar["url-link"]=i,a.grammar["email-link"]=n)}),Prism.hooks.add("wrap",function(i){if(/-link$/.test(i.type)){i.tag="a";var n=i.content;if("email-link"==i.type&&0!=n.indexOf("mailto:"))n="mailto:"+n;else if("md-link"==i.type){var t=i.content.match(e);n=t[2],i.content=t[1]}i.attributes.href=n}})}}(); 21 | !function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",html:"markup",svg:"markup",xml:"markup",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){for(var r,a=t.getAttribute("data-src"),s=t,n=/\blang(?:uage)?-(?!\*)(\w+)\b/i;s&&!n.test(s.className);)s=s.parentNode;if(s&&(r=(t.className.match(n)||[,""])[1]),!r){var o=(a.match(/\.(\w+)$/)||[,""])[1];r=e[o]||o}var l=document.createElement("code");l.className="language-"+r,t.textContent="",l.textContent="Loading…",t.appendChild(l);var i=new XMLHttpRequest;i.open("GET",a,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)})},self.Prism.fileHighlight())}(); 22 | !function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e={css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",asciidoc:"AsciiDoc",aspnet:"ASP.NET (C#)",autoit:"AutoIt",autohotkey:"AutoHotkey",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript","css-extras":"CSS Extras",fsharp:"F#",glsl:"GLSL",http:"HTTP",inform7:"Inform 7",latex:"LaTeX",lolcode:"LOLCODE",matlab:"MATLAB",mel:"MEL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",powershell:"PowerShell",jsx:"React JSX",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",typescript:"TypeScript",vhdl:"VHDL",vim:"vim",wiki:"Wiki markup",yaml:"YAML"};Prism.hooks.add("before-highlight",function(a){var s=a.element.parentNode;if(s&&/pre/i.test(s.nodeName)){var t=e[a.language]||a.language.substring(0,1).toUpperCase()+a.language.substring(1);s.setAttribute("data-language",t);var i,r,l=s.previousSibling;l&&/\s*\bprism-show-language\b\s*/.test(l.className)&&l.firstChild&&/\s*\bprism-show-language-label\b\s*/.test(l.firstChild.className)?(r=l.firstChild,r.getAttribute("data-language")!==t&&(r.setAttribute("data-language",t),r.innerHTML=t)):(i=document.createElement("div"),r=document.createElement("div"),r.className="prism-show-language-label",r.setAttribute("data-language",t),r.innerHTML=t,i.className="prism-show-language",i.appendChild(r),s.parentNode.insertBefore(i,s))}})}}(); 23 | -------------------------------------------------------------------------------- /assets/js/webfont.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Small Batch, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | /* Web Font Loader v1.5.18 - (c) Adobe Systems, Google. License: Apache 2.0 */ 17 | ;(function(window,document,undefined){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2a.c||this.c===a.c&&this.g>a.g||this.c===a.c&&this.g===a.g&&this.D>a.D?1:this.cd.c||536==d.c&&11>d.g))} 29 | function E(a,b,c){return(a=a.match(b))&&a[c]?a[c]:""};function G(a){this.ma=a||"-"}G.prototype.e=function(a){for(var b=[],c=0;c=a.X?a.k.ga&&R(a,b,c)&&(null===a.ca||a.ca.hasOwnProperty(a.m.getName()))?S(a,a.$):S(a,a.ka):ja(a):S(a,a.$)}function ja(a){setTimeout(k(function(){Q(this)},a),50)}function S(a,b){a.t.remove();a.u.remove();a.H.remove();b(a.m)};function T(a,b,c,d){this.d=b;this.A=c;this.S=0;this.ea=this.ba=!1;this.X=d;this.k=a.k}function ka(a,b,c,d,e){c=c||{};if(0===b.length&&e)J(a.A);else for(a.S+=b.length,e&&(a.ba=e),e=0;e 9 | 15 | 16 | 17 |
18 | {{#if profile_image}} 19 |
20 |
21 |
22 | {{/if}} 23 |

{{name}}

24 | {{#if bio}} 25 |

{{bio}}

26 | {{/if}} 27 |
28 | {{#if location}}{{location}}{{/if}} 29 | {{#if website}}{{website}}{{/if}} 30 | {{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} 31 |
32 |
33 | {{/author}} 34 | 35 | {{! The main content area on the homepage }} 36 |
37 | 38 | {{! The tag below includes the post loop - partials/loop.hbs }} 39 | {{> "loop"}} 40 | 41 |
42 | -------------------------------------------------------------------------------- /default.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{! Document Settings }} 5 | 6 | 7 | {{! Page Meta }} 8 | {{meta_title}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{! Styles'n'Scripts }} 19 | 20 | {{! Ghost outputs important style and meta data with this tag }} 21 | {{ghost_head}} 22 | 31 | 32 | 33 | {{! Everything else gets inserted here }} 34 | {{{body}}} 35 | 44 | {{!-- jQuery needs to come before `{{ghost_foot}}` so that jQuery can be used in code injection --}} 45 | 46 | {{! Ghost outputs important scripts and data with this tag }} 47 | {{ghost_foot}} 48 | 49 | 50 | 59 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /dev/css/reset.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.3 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 29 | * and Firefox. 30 | * Correct `block` display not defined for `main` in IE 11. 31 | */ 32 | 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | menu, 43 | nav, 44 | section, 45 | summary { 46 | display: block; 47 | } 48 | 49 | /** 50 | * 1. Correct `inline-block` display not defined in IE 8/9. 51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 52 | */ 53 | 54 | audio, 55 | canvas, 56 | progress, 57 | video { 58 | display: inline-block; /* 1 */ 59 | vertical-align: baseline; /* 2 */ 60 | } 61 | 62 | /** 63 | * Prevent modern browsers from displaying `audio` without controls. 64 | * Remove excess height in iOS 5 devices. 65 | */ 66 | 67 | audio:not([controls]) { 68 | display: none; 69 | height: 0; 70 | } 71 | 72 | /** 73 | * Address `[hidden]` styling not present in IE 8/9/10. 74 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 75 | */ 76 | 77 | [hidden], 78 | template { 79 | display: none; 80 | } 81 | 82 | /* Links 83 | ========================================================================== */ 84 | 85 | /** 86 | * Remove the gray background color from active links in IE 10. 87 | */ 88 | 89 | a { 90 | background-color: transparent; 91 | } 92 | 93 | /** 94 | * Improve readability when focused and also mouse hovered in all browsers. 95 | */ 96 | 97 | a:active, 98 | a:hover { 99 | outline: 0; 100 | } 101 | 102 | /* Text-level semantics 103 | ========================================================================== */ 104 | 105 | /** 106 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 107 | */ 108 | 109 | abbr[title] { 110 | border-bottom: 1px dotted; 111 | } 112 | 113 | /** 114 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 115 | */ 116 | 117 | b, 118 | strong { 119 | font-weight: bold; 120 | } 121 | 122 | /** 123 | * Address styling not present in Safari and Chrome. 124 | */ 125 | 126 | dfn { 127 | font-style: italic; 128 | } 129 | 130 | /** 131 | * Address variable `h1` font-size and margin within `section` and `article` 132 | * contexts in Firefox 4+, Safari, and Chrome. 133 | */ 134 | 135 | h1 { 136 | font-size: 2em; 137 | margin: 0.67em 0; 138 | } 139 | 140 | /** 141 | * Address styling not present in IE 8/9. 142 | */ 143 | 144 | mark { 145 | background: #ff0; 146 | color: #000; 147 | } 148 | 149 | /** 150 | * Address inconsistent and variable font size in all browsers. 151 | */ 152 | 153 | small { 154 | font-size: 80%; 155 | } 156 | 157 | /** 158 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 159 | */ 160 | 161 | sub, 162 | sup { 163 | font-size: 75%; 164 | line-height: 0; 165 | position: relative; 166 | vertical-align: baseline; 167 | } 168 | 169 | sup { 170 | top: -0.5em; 171 | } 172 | 173 | sub { 174 | bottom: -0.25em; 175 | } 176 | 177 | /* Embedded content 178 | ========================================================================== */ 179 | 180 | /** 181 | * Remove border when inside `a` element in IE 8/9/10. 182 | */ 183 | 184 | img { 185 | border: 0; 186 | } 187 | 188 | /** 189 | * Correct overflow not hidden in IE 9/10/11. 190 | */ 191 | 192 | svg:not(:root) { 193 | overflow: hidden; 194 | } 195 | 196 | /* Grouping content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Address margin not present in IE 8/9 and Safari. 201 | */ 202 | 203 | figure { 204 | margin: 1em 40px; 205 | } 206 | 207 | /** 208 | * Address differences between Firefox and other browsers. 209 | */ 210 | 211 | hr { 212 | -moz-box-sizing: content-box; 213 | box-sizing: content-box; 214 | height: 0; 215 | } 216 | 217 | /** 218 | * Contain overflow in all browsers. 219 | */ 220 | 221 | pre { 222 | overflow: auto; 223 | } 224 | 225 | /** 226 | * Address odd `em`-unit font size rendering in all browsers. 227 | */ 228 | 229 | code, 230 | kbd, 231 | pre, 232 | samp { 233 | font-family: monospace, monospace; 234 | font-size: 1em; 235 | } 236 | 237 | /* Forms 238 | ========================================================================== */ 239 | 240 | /** 241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 242 | * styling of `select`, unless a `border` property is set. 243 | */ 244 | 245 | /** 246 | * 1. Correct color not being inherited. 247 | * Known issue: affects color of disabled elements. 248 | * 2. Correct font properties not being inherited. 249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | color: inherit; /* 1 */ 258 | font: inherit; /* 2 */ 259 | margin: 0; /* 3 */ 260 | } 261 | 262 | /** 263 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 264 | */ 265 | 266 | button { 267 | overflow: visible; 268 | } 269 | 270 | /** 271 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 272 | * All other form control elements do not inherit `text-transform` values. 273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 274 | * Correct `select` style inheritance in Firefox. 275 | */ 276 | 277 | button, 278 | select { 279 | text-transform: none; 280 | } 281 | 282 | /** 283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 284 | * and `video` controls. 285 | * 2. Correct inability to style clickable `input` types in iOS. 286 | * 3. Improve usability and consistency of cursor style between image-type 287 | * `input` and others. 288 | */ 289 | 290 | button, 291 | html input[type="button"], /* 1 */ 292 | input[type="reset"], 293 | input[type="submit"] { 294 | -webkit-appearance: button; /* 2 */ 295 | cursor: pointer; /* 3 */ 296 | } 297 | 298 | /** 299 | * Re-set default cursor for disabled elements. 300 | */ 301 | 302 | button[disabled], 303 | html input[disabled] { 304 | cursor: default; 305 | } 306 | 307 | /** 308 | * Remove inner padding and border in Firefox 4+. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | input::-moz-focus-inner { 313 | border: 0; 314 | padding: 0; 315 | } 316 | 317 | /** 318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 319 | * the UA stylesheet. 320 | */ 321 | 322 | input { 323 | line-height: normal; 324 | } 325 | 326 | /** 327 | * It's recommended that you don't attempt to style these elements. 328 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 329 | * 330 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 331 | * 2. Remove excess padding in IE 8/9/10. 332 | */ 333 | 334 | input[type="checkbox"], 335 | input[type="radio"] { 336 | box-sizing: border-box; /* 1 */ 337 | padding: 0; /* 2 */ 338 | } 339 | 340 | /** 341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 342 | * `font-size` values of the `input`, it causes the cursor style of the 343 | * decrement button to change from `default` to `text`. 344 | */ 345 | 346 | input[type="number"]::-webkit-inner-spin-button, 347 | input[type="number"]::-webkit-outer-spin-button { 348 | height: auto; 349 | } 350 | 351 | /** 352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 354 | * (include `-moz` to future-proof). 355 | */ 356 | 357 | input[type="search"] { 358 | -webkit-appearance: textfield; /* 1 */ 359 | -moz-box-sizing: content-box; 360 | -webkit-box-sizing: content-box; /* 2 */ 361 | box-sizing: content-box; 362 | } 363 | 364 | /** 365 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 366 | * Safari (but not Chrome) clips the cancel button when the search input has 367 | * padding (and `textfield` appearance). 368 | */ 369 | 370 | input[type="search"]::-webkit-search-cancel-button, 371 | input[type="search"]::-webkit-search-decoration { 372 | -webkit-appearance: none; 373 | } 374 | 375 | /** 376 | * Define consistent border, margin, and padding. 377 | */ 378 | 379 | fieldset { 380 | border: 1px solid #c0c0c0; 381 | margin: 0 2px; 382 | padding: 0.35em 0.625em 0.75em; 383 | } 384 | 385 | /** 386 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 387 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 388 | */ 389 | 390 | legend { 391 | border: 0; /* 1 */ 392 | padding: 0; /* 2 */ 393 | } 394 | 395 | /** 396 | * Remove default vertical scrollbar in IE 8/9/10/11. 397 | */ 398 | 399 | textarea { 400 | overflow: auto; 401 | } 402 | 403 | /** 404 | * Don't inherit the `font-weight` (applied by a rule above). 405 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 406 | */ 407 | 408 | optgroup { 409 | font-weight: bold; 410 | } 411 | 412 | /* Tables 413 | ========================================================================== */ 414 | 415 | /** 416 | * Remove most spacing between table cells. 417 | */ 418 | 419 | table { 420 | border-collapse: collapse; 421 | border-spacing: 0; 422 | } 423 | 424 | td, 425 | th { 426 | padding: 0; 427 | } 428 | 429 | -------------------------------------------------------------------------------- /dev/css/sass/_1024up.scss: -------------------------------------------------------------------------------- 1 | #main{ 2 | width:100%; 3 | // margin:-6rem auto; 4 | } 5 | -------------------------------------------------------------------------------- /dev/css/sass/_321up.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/dev/css/sass/_321up.scss -------------------------------------------------------------------------------- /dev/css/sass/_361up.scss: -------------------------------------------------------------------------------- 1 | .site-footer{ 2 | margin-top: 3rem; 3 | font-size:1.2rem; 4 | } 5 | 6 | 7 | #main{ 8 | width:100%; 9 | margin: 2rem auto; 10 | } 11 | 12 | .nav-header-container{ 13 | width: 80%; 14 | } 15 | .back-home{ 16 | top: .5rem; 17 | left: 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /dev/css/sass/_481up.scss: -------------------------------------------------------------------------------- 1 | #header { 2 | height: 60%; 3 | max-height: 100%; 4 | } 5 | .home-template { 6 | #main { 7 | margin: 0rem auto; 8 | } 9 | #header { 10 | height: 60%; 11 | } 12 | } 13 | .archive-template { 14 | #main { 15 | margin: 0 auto; 16 | } 17 | } 18 | .post-info-container { 19 | width: 84%; 20 | margin: 3rem auto 2rem; 21 | padding: 2rem 0; 22 | } 23 | .header-wrap { 24 | width: 94%; 25 | margin: 0 auto; 26 | } 27 | .post-in-list { 28 | margin-bottom: 0rem; 29 | } 30 | .info-mask { 31 | height: 6rem; 32 | } 33 | .post-title { 34 | margin: 0.2rem 0; 35 | line-height: 2.2rem; 36 | a {} 37 | } 38 | .mask-wrapper { 39 | margin-top: .5rem; 40 | } 41 | #main { 42 | width: 100%; 43 | margin: 0rem auto; 44 | } 45 | .post-page-title { 46 | font-size: 2.4rem; 47 | line-height: 2.8rem; 48 | min-height: 4.8rem; 49 | margin-bottom: 1rem; 50 | } 51 | .author-detail { 52 | padding: 6rem 1.6rem 1.6rem; 53 | // margin: 0 0 2rem 0; 54 | // padding: 0 0 1.6rem 0; 55 | // border-bottom: #EBF2F6 1px dashed; 56 | } 57 | .post-excerpt-mirror-mask { 58 | display: block; 59 | // padding:1.5rem 3rem; 60 | } 61 | .post-excerpt { 62 | p { 63 | display: block; 64 | overflow: hidden; 65 | // height: 20rem; 66 | } 67 | } 68 | .post-excerpt-mirror { 69 | p { 70 | display: block; 71 | overflow: hidden; 72 | height: 20rem; 73 | } 74 | a { 75 | font-size: 2rem; 76 | font-family: $fontOSX; 77 | &.btn-post-excerpt { 78 | font-size: 1.4rem; 79 | line-height: 1.8rem; 80 | margin-top: 1.5rem; 81 | } 82 | } 83 | .post-short-intro { 84 | font-size: 1.4rem; 85 | line-height: 2rem; 86 | max-height: 4rem; 87 | font-family: $fontIOS; 88 | } 89 | } 90 | .excert-detail-container { 91 | max-width: 80%; 92 | width: 80%; 93 | margin-left: -40%; 94 | } 95 | .home-info-container { 96 | margin-top: 6rem; 97 | h2, 98 | h4 { 99 | color: #fff; 100 | font-weight: lighter; 101 | text-shadow: 0 1px 1px #595959; 102 | &:hover { 103 | text-shadow: 0 1px 1px #333; 104 | } 105 | } 106 | h2 { 107 | font-size: 3.2rem; 108 | } 109 | h4 { 110 | font-size: 1.4rem; 111 | letter-spacing: .5rem; 112 | } 113 | } 114 | .back-home { 115 | top: .2rem; 116 | } 117 | .arrow_down { 118 | bottom: 3rem; 119 | } 120 | .pagination { 121 | width: 90%; 122 | a { 123 | font-size: 1rem; 124 | } 125 | } 126 | .archive-template, 127 | .tag-template { 128 | #main { 129 | margin: 0 auto; 130 | } 131 | #header { 132 | height: 45%; 133 | } 134 | .home-info-container { 135 | margin-top: 10rem; 136 | h2, 137 | h4 { 138 | &:hover {} 139 | } 140 | h2 { 141 | // line-height: 3.2rem; 142 | font-size: 3.2rem; 143 | } 144 | h4 { 145 | font-size: 1.8rem; 146 | } 147 | } 148 | } 149 | .tag-template { 150 | .home-info-container { 151 | h4 { 152 | -webkit-animation-name: shine; 153 | -webkit-animation-duration: 3.5s; 154 | -webkit-animation-timing-function: linear; 155 | -webkit-animation-iteration-count: infinite; 156 | } 157 | } 158 | } 159 | .info-mask { 160 | display: none; 161 | } 162 | .post-meta { 163 | // display: none; 164 | span.post-tags { 165 | a { 166 | width: auto; 167 | margin-left: 0; 168 | } 169 | display: none; 170 | } 171 | } 172 | .site-footer { 173 | margin-top: 3rem; 174 | } 175 | .home-logo, 176 | .svg-logo { 177 | opacity: .8; 178 | top: 0rem; 179 | } 180 | .share-icons { 181 | a { 182 | i { 183 | font-size: 4.2rem; 184 | margin: 0 .8rem; 185 | } 186 | } 187 | } 188 | .tag-box { 189 | a { 190 | padding: 0rem .3rem; 191 | border-radius: .2rem; 192 | background: rgba(37, 54, 74, .5); 193 | color: #fff; 194 | text-align: center; 195 | margin-right: .4rem; 196 | font-size: 1.2rem; 197 | height: 1.8rem; 198 | line-height: 1.8rem; 199 | } 200 | } 201 | .nav-header-container { 202 | width: 80%; 203 | } 204 | .read-next { 205 | margin: 5rem auto 2rem; 206 | } 207 | 208 | .read-next-story .post { 209 | background: transparent; 210 | padding: 5rem 3rem; 211 | } 212 | -------------------------------------------------------------------------------- /dev/css/sass/_768up.scss: -------------------------------------------------------------------------------- 1 | #main { 2 | width: 100%; 3 | margin: 2rem auto; 4 | } 5 | .post-template { 6 | .site-footer { 7 | margin-top: 3rem; 8 | } 9 | } 10 | .home-template { 11 | .site-footer { 12 | margin-top: 3rem; 13 | } 14 | } 15 | .nav-header-container { 16 | // width: 80%; 17 | } 18 | .arrow_down { 19 | display: block; 20 | } 21 | .back-home { 22 | top: .5rem; 23 | left: 0; 24 | } 25 | #header { 26 | max-height: 100%; 27 | } 28 | .home-info-container { 29 | max-width: 80%; 30 | margin: 16rem auto; 31 | } 32 | 33 | .read-next-story .post{ 34 | padding:6rem 3rem; 35 | } 36 | 37 | .read-next { 38 | -webkit-box-orient: vertical; 39 | -webkit-box-direction: normal; 40 | -webkit-flex-direction: column; 41 | -ms-flex-direction: column; 42 | flex-direction: column; 43 | margin-top: 4rem; 44 | } 45 | .read-next-story h2 { 46 | font-size: 2.4rem; 47 | line-height: 3.2rem; 48 | @include word-wrap-multi; 49 | text-overflow: ellipsis; 50 | display: -webkit-box; 51 | -webkit-line-clamp: 2; 52 | -webkit-box-orient: vertical; 53 | } 54 | .read-next p { 55 | // display: none; 56 | padding: 0 1rem; 57 | } 58 | .read-next-story.no-cover + .read-next-story.no-cover { 59 | border-top: rgba(0, 0, 100, 0.06) 1px solid; 60 | border-left: none; 61 | } 62 | .wechat-webview { 63 | .qr-code{ 64 | display: none; 65 | } 66 | .money-like{ 67 | padding:3rem 0; 68 | } 69 | .money-code { 70 | width: 14rem; 71 | height: 13rem; 72 | margin-left: -8.2rem; 73 | top: -19rem; 74 | span { 75 | width: auto; 76 | height: auto; 77 | &.wechat-code { 78 | float: none; 79 | } 80 | } 81 | img { 82 | display: block; 83 | width: 13.5rem; 84 | height: 13.5rem; 85 | } 86 | b{ 87 | font-size: 1.2rem; 88 | } 89 | } 90 | .alipay-code { 91 | display: none !important; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /dev/css/sass/_duoshuo.scss: -------------------------------------------------------------------------------- 1 | .yasuko-only { 2 | #ds-reset .ds-avatar img { 3 | width: 54px; 4 | height: 54px; 5 | border-radius:50%; 6 | box-shadow: 0; 7 | // -webkit-box-shadow: inset 0 -1px 0 #333; 8 | -webkit-transition: 0.3s; 9 | -webkit-transition: -webkit-transform 0.4s ease-out; 10 | transition: transform 0.4s ease-out; 11 | } 12 | #ds-reset .ds-avatar img:hover { 13 | box-shadow: 0 0 10px #fff; 14 | -webkit-box-shadow: 0 0 10px #fff; 15 | -webkit-transform: rotateZ(360deg); 16 | transform: rotateZ(360deg); 17 | } 18 | #ds-thread #ds-reset .ds-textarea-wrapper { 19 | border: 1px solid #efefef; 20 | background: #fff; 21 | border-bottom: 0; 22 | } 23 | #ds-reset .ds-rounded-top { 24 | border-radius: 0; 25 | } 26 | #ds-reset .ds-gradient-bg { 27 | background: #fff; 28 | } 29 | #ds-thread #ds-reset .ds-post-options { 30 | position: relative; 31 | margin-right: 100px; 32 | height: 30px; 33 | border: 1px solid #efefef; 34 | border-right: none; 35 | } 36 | #ds-thread #ds-reset .ds-post-button { 37 | background: #00BCD4; 38 | color: #fff; 39 | border: 0 none; 40 | border-radius: 0; 41 | } 42 | #ds-thread #ds-reset .ds-post-button:hover { 43 | background: #04AAC2; 44 | color: #fff; 45 | } 46 | #ds-thread #ds-reset .ds-post-toolbar { 47 | box-shadow: 0; 48 | } 49 | #ds-thread #ds-reset li.ds-tab a.ds-current { 50 | border: 0; 51 | background-color: rgba(0, 0, 0, 0.06); 52 | } 53 | #ds-reset .ds-rounded-top { 54 | border-radius: 0; 55 | } 56 | #ds-thread #ds-reset .ds-post-button { 57 | text-shadow: none; 58 | } 59 | #ds-wrapper #ds-reset .ds-dialog-inner { 60 | background: #fff; 61 | box-shadow:0; 62 | text-shadow: 0; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /dev/css/sass/_fonts.scss: -------------------------------------------------------------------------------- 1 | /* 载入iconfont字体 */ 2 | 3 | // @font-face { 4 | // font-family: 'iconfont'; 5 | // src: url(#{$fontPath}/iconfont.eot); 6 | // /* IE9*/ 7 | // src: url(#{$fontPath}/iconfont.eot?#iefix) format('embedded-opentype'), 8 | // /* IE6-IE8 */ 9 | // url(#{$fontPath}/iconfont.woff) format('woff'), 10 | // /* chrome、firefox */ 11 | // url(#{$fontPath}/iconfont.ttf) format('truetype'), 12 | // /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ 13 | // url(#{$fontPath}/iconfont.svg#uxiconfont) format('svg'); 14 | // /* iOS 4.1- */ 15 | // } 16 | .iconfont { 17 | font-family: "iconfont" !important; 18 | font-size: 16px; 19 | font-style: normal; 20 | -webkit-font-smoothing: antialiased; 21 | // -webkit-text-stroke-width: 0.2px; 22 | -moz-osx-font-smoothing: grayscale; 23 | display: inline-block; 24 | speak: none; 25 | } 26 | .iconfont { 27 | vertical-align: middle; 28 | &:hover { 29 | opacity: 0.6; 30 | color: #363636; 31 | } 32 | } 33 | .iconfont.undefined{ 34 | display: none !important; 35 | } 36 | .iconfont-self { 37 | color: red 38 | } 39 | .iconfont-weibo { 40 | color: #E6162D 41 | } 42 | .iconfont-twitter { 43 | color: #2aa9e0 44 | } 45 | .iconfont-facebook { 46 | color: #204385 47 | } 48 | .iconfont-google { 49 | color: #176DEE 50 | } 51 | .iconfont-wikipedia { 52 | color: #626262; 53 | } 54 | .iconfont-weixin { 55 | color: #75D140 56 | } 57 | .iconfont-qzone { 58 | color: #186CC6 59 | } 60 | .iconfont-github { 61 | color: #333333 62 | } 63 | .iconfont-douban { 64 | color: #279337 65 | } 66 | .iconfont-luolei { 67 | color: #6596C1 68 | } 69 | .iconfont-dribble { 70 | color: #F72D84 71 | } 72 | .iconfont-zhihu { 73 | color: #0767c8 74 | } 75 | .iconfont-instagram { 76 | color: #9b6954 77 | } 78 | .iconfont-v2ex { 79 | color: #1A1A1B 80 | } 81 | .icon-weibo-pure { 82 | color: #E6162D 83 | } 84 | .icon-twitter-pure { 85 | color: #2aa9e0 86 | } 87 | .icon-github-pure { 88 | color: #333333 89 | } 90 | .icon-dribble-pure { 91 | color: #F72D84 92 | } 93 | .icon-weixin-pure { 94 | color: #75D140 95 | } 96 | .iconfont-jianshu{ 97 | color:#e78170; 98 | } 99 | .iconfont-youku{ 100 | color:#06a7e1; 101 | } 102 | .iconfont-youtube{ 103 | color:#E52413; 104 | } 105 | /* 自定义IconFont CSS 才用:before的形式 */ 106 | 107 | .single-post-inner { 108 | .iconfont-local:before { 109 | content: "\0f00ac"; 110 | } 111 | .iconfont-twitter:before { 112 | content: "\00e604"; 113 | } 114 | .iconfont-wechat:before { 115 | content: "\00e606"; 116 | } 117 | .iconfont-weibo:before { 118 | content: "\00e607"; 119 | } 120 | .iconfont-facebook:before { 121 | content: "\00e601"; 122 | } 123 | .iconfont-google:before { 124 | content: "\00e602"; 125 | } 126 | .iconfont-github:before { 127 | content: "\00e60d"; 128 | } 129 | .iconfont-douban:before { 130 | content: "\0e600"; 131 | } 132 | .iconfont-luolei:before { 133 | content: "\0" 134 | } 135 | .iconfont-v2ex:before { 136 | content: "\00e605" 137 | } 138 | .iconfont-zhihu:before { 139 | content: '\00e609' 140 | } 141 | .iconfont-wikipedia:before { 142 | content: '\00e608' 143 | } 144 | .iconfont-jianshu:before { 145 | content: '\00e60b' 146 | } 147 | .iconfont-youku:before { 148 | content: '\00e60c' 149 | } 150 | .iconfont-youtube:before { 151 | content: '\00e60a' 152 | } 153 | .iconfont-luolei:before { 154 | content: '\00e60e' 155 | } 156 | } 157 | 158 | -------------------------------------------------------------------------------- /dev/css/sass/_mixins.scss: -------------------------------------------------------------------------------- 1 | // $imgPath:"../../img"; 2 | $imgPath:"../../assets/images"; 3 | $fontPath:"../../assets/fonts"; 4 | $fontBase:"Helvetica Neue", \5FAE\8F6F\96C5\9ED1, Tohoma; 5 | $fontOSX:"-apple-system", "Open Sans", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", "Hiragino Sans GB","Microsoft YaHei",Helvetica, Arial, sans-serif; 6 | $fontIOS:"HelveticaNeue-UltraLight", "Helvetica Neue UltraLight"; 7 | $googleFontExo:"Exo"; 8 | // 设置精灵图资源路径,把路径以变量形式控制,方便处理多个精灵。 9 | $sprite-normal: '../images/sprite.png'; 10 | $sprite-retina: '../images/sprite@2x.png'; 11 | @mixin word-wrap { 12 | white-space: nowrap; 13 | overflow: hidden; 14 | text-overflow: ellipsis; 15 | } 16 | @mixin word-wrap-multi { 17 | white-space: normal; 18 | overflow: hidden; 19 | text-overflow: ellipsis; 20 | } 21 | // 处理高清精灵自定义函数 22 | @mixin retina-image-width($sprite) { 23 | width: nth($sprite, 5)/2; 24 | } 25 | @mixin retina-image-height($sprite) { 26 | height: nth($sprite, 6)/2; 27 | } 28 | @mixin retina-sprite-position($sprite) { 29 | $sprite-offset-x: nth($sprite, 3)/2; 30 | $sprite-offset-y: nth($sprite, 4)/2; 31 | background-position: $sprite-offset-x $sprite-offset-y; 32 | } 33 | @mixin retina-sprite-size($sprite) { 34 | background-size: nth($sprite, 7)/2; 35 | } 36 | 37 | /* 38 | 参考 _sprite.scss 的代码 39 | */ 40 | 41 | //处理高清精灵自定义函数 42 | @mixin retina-image($sprite) { 43 | @include retina-image-height($sprite); 44 | @include retina-image-width($sprite); 45 | @include retina-sprite-position($sprite); 46 | @include retina-sprite-size($sprite); 47 | } 48 | 49 | /* 50 | 在css中,直接@include即可 51 | 例: 52 | .icon-search{ 53 | @include use-sprite($icon-search,$normal,$retina) 54 | } 55 | */ 56 | 57 | @mixin use-sprite($name, $normal, $retina) { 58 | background-image: url($normal); 59 | background-repeat: no-repeat; 60 | @include retina-image($name); 61 | // Media Query for retina 62 | @media (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6/2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) { 63 | background-image: url($retina); 64 | @include retina-image($name); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /dev/css/sass/_normalize.scss: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS and IE text size adjust after device orientation change, 6 | * without disabling user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 29 | * and Firefox. 30 | * Correct `block` display not defined for `main` in IE 11. 31 | */ 32 | 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | menu, 43 | nav, 44 | section, 45 | summary { 46 | display: block; 47 | } 48 | 49 | /** 50 | * 1. Correct `inline-block` display not defined in IE 8/9. 51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 52 | */ 53 | 54 | audio, 55 | canvas, 56 | progress, 57 | video { 58 | display: inline-block; /* 1 */ 59 | vertical-align: baseline; /* 2 */ 60 | } 61 | 62 | /** 63 | * Prevent modern browsers from displaying `audio` without controls. 64 | * Remove excess height in iOS 5 devices. 65 | */ 66 | 67 | audio:not([controls]) { 68 | display: none; 69 | height: 0; 70 | } 71 | 72 | /** 73 | * Address `[hidden]` styling not present in IE 8/9/10. 74 | * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. 75 | */ 76 | 77 | [hidden], 78 | template { 79 | display: none; 80 | } 81 | 82 | /* Links 83 | ========================================================================== */ 84 | 85 | /** 86 | * Remove the gray background color from active links in IE 10. 87 | */ 88 | 89 | a { 90 | background-color: transparent; 91 | } 92 | 93 | /** 94 | * Improve readability of focused elements when they are also in an 95 | * active/hover state. 96 | */ 97 | 98 | a:active, 99 | a:hover { 100 | outline: 0; 101 | } 102 | 103 | /* Text-level semantics 104 | ========================================================================== */ 105 | 106 | /** 107 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 108 | */ 109 | 110 | abbr[title] { 111 | border-bottom: 1px dotted; 112 | } 113 | 114 | /** 115 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 116 | */ 117 | 118 | b, 119 | strong { 120 | font-weight: bold; 121 | } 122 | 123 | /** 124 | * Address styling not present in Safari and Chrome. 125 | */ 126 | 127 | dfn { 128 | font-style: italic; 129 | } 130 | 131 | /** 132 | * Address variable `h1` font-size and margin within `section` and `article` 133 | * contexts in Firefox 4+, Safari, and Chrome. 134 | */ 135 | 136 | h1 { 137 | font-size: 2em; 138 | margin: 0.67em 0; 139 | } 140 | 141 | /** 142 | * Address styling not present in IE 8/9. 143 | */ 144 | 145 | mark { 146 | background: #ff0; 147 | color: #000; 148 | } 149 | 150 | /** 151 | * Address inconsistent and variable font size in all browsers. 152 | */ 153 | 154 | small { 155 | font-size: 80%; 156 | } 157 | 158 | /** 159 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 160 | */ 161 | 162 | sub, 163 | sup { 164 | font-size: 75%; 165 | line-height: 0; 166 | position: relative; 167 | vertical-align: baseline; 168 | } 169 | 170 | sup { 171 | top: -0.5em; 172 | } 173 | 174 | sub { 175 | bottom: -0.25em; 176 | } 177 | 178 | /* Embedded content 179 | ========================================================================== */ 180 | 181 | /** 182 | * Remove border when inside `a` element in IE 8/9/10. 183 | */ 184 | 185 | img { 186 | border: 0; 187 | } 188 | 189 | /** 190 | * Correct overflow not hidden in IE 9/10/11. 191 | */ 192 | 193 | svg:not(:root) { 194 | overflow: hidden; 195 | } 196 | 197 | /* Grouping content 198 | ========================================================================== */ 199 | 200 | /** 201 | * Address margin not present in IE 8/9 and Safari. 202 | */ 203 | 204 | figure { 205 | margin: 1em 40px; 206 | } 207 | 208 | /** 209 | * Address differences between Firefox and other browsers. 210 | */ 211 | 212 | hr { 213 | box-sizing: content-box; 214 | height: 0; 215 | } 216 | 217 | /** 218 | * Contain overflow in all browsers. 219 | */ 220 | 221 | pre { 222 | overflow: auto; 223 | } 224 | 225 | /** 226 | * Address odd `em`-unit font size rendering in all browsers. 227 | */ 228 | 229 | code, 230 | kbd, 231 | pre, 232 | samp { 233 | font-family: monospace, monospace; 234 | font-size: 1em; 235 | } 236 | 237 | /* Forms 238 | ========================================================================== */ 239 | 240 | /** 241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 242 | * styling of `select`, unless a `border` property is set. 243 | */ 244 | 245 | /** 246 | * 1. Correct color not being inherited. 247 | * Known issue: affects color of disabled elements. 248 | * 2. Correct font properties not being inherited. 249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | color: inherit; /* 1 */ 258 | font: inherit; /* 2 */ 259 | margin: 0; /* 3 */ 260 | } 261 | 262 | /** 263 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 264 | */ 265 | 266 | button { 267 | overflow: visible; 268 | } 269 | 270 | /** 271 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 272 | * All other form control elements do not inherit `text-transform` values. 273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 274 | * Correct `select` style inheritance in Firefox. 275 | */ 276 | 277 | button, 278 | select { 279 | text-transform: none; 280 | } 281 | 282 | /** 283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 284 | * and `video` controls. 285 | * 2. Correct inability to style clickable `input` types in iOS. 286 | * 3. Improve usability and consistency of cursor style between image-type 287 | * `input` and others. 288 | */ 289 | 290 | button, 291 | html input[type="button"], /* 1 */ 292 | input[type="reset"], 293 | input[type="submit"] { 294 | -webkit-appearance: button; /* 2 */ 295 | cursor: pointer; /* 3 */ 296 | } 297 | 298 | /** 299 | * Re-set default cursor for disabled elements. 300 | */ 301 | 302 | button[disabled], 303 | html input[disabled] { 304 | cursor: default; 305 | } 306 | 307 | /** 308 | * Remove inner padding and border in Firefox 4+. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | input::-moz-focus-inner { 313 | border: 0; 314 | padding: 0; 315 | } 316 | 317 | /** 318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 319 | * the UA stylesheet. 320 | */ 321 | 322 | input { 323 | line-height: normal; 324 | } 325 | 326 | /** 327 | * It's recommended that you don't attempt to style these elements. 328 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 329 | * 330 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 331 | * 2. Remove excess padding in IE 8/9/10. 332 | */ 333 | 334 | input[type="checkbox"], 335 | input[type="radio"] { 336 | box-sizing: border-box; /* 1 */ 337 | padding: 0; /* 2 */ 338 | } 339 | 340 | /** 341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 342 | * `font-size` values of the `input`, it causes the cursor style of the 343 | * decrement button to change from `default` to `text`. 344 | */ 345 | 346 | input[type="number"]::-webkit-inner-spin-button, 347 | input[type="number"]::-webkit-outer-spin-button { 348 | height: auto; 349 | } 350 | 351 | /** 352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. 354 | */ 355 | 356 | input[type="search"] { 357 | -webkit-appearance: textfield; /* 1 */ 358 | box-sizing: content-box; /* 2 */ 359 | } 360 | 361 | /** 362 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 363 | * Safari (but not Chrome) clips the cancel button when the search input has 364 | * padding (and `textfield` appearance). 365 | */ 366 | 367 | input[type="search"]::-webkit-search-cancel-button, 368 | input[type="search"]::-webkit-search-decoration { 369 | -webkit-appearance: none; 370 | } 371 | 372 | /** 373 | * Define consistent border, margin, and padding. 374 | */ 375 | 376 | fieldset { 377 | border: 1px solid #c0c0c0; 378 | margin: 0 2px; 379 | padding: 0.35em 0.625em 0.75em; 380 | } 381 | 382 | /** 383 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 384 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 385 | */ 386 | 387 | legend { 388 | border: 0; /* 1 */ 389 | padding: 0; /* 2 */ 390 | } 391 | 392 | /** 393 | * Remove default vertical scrollbar in IE 8/9/10/11. 394 | */ 395 | 396 | textarea { 397 | overflow: auto; 398 | } 399 | 400 | /** 401 | * Don't inherit the `font-weight` (applied by a rule above). 402 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 403 | */ 404 | 405 | optgroup { 406 | font-weight: bold; 407 | } 408 | 409 | /* Tables 410 | ========================================================================== */ 411 | 412 | /** 413 | * Remove most spacing between table cells. 414 | */ 415 | 416 | table { 417 | border-collapse: collapse; 418 | border-spacing: 0; 419 | } 420 | 421 | td, 422 | th { 423 | padding: 0; 424 | } 425 | -------------------------------------------------------------------------------- /dev/css/sass/_print.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/dev/css/sass/_print.scss -------------------------------------------------------------------------------- /dev/css/sass/_prism.scss: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+bash+css-extras+git+handlebars+http+makefile+markdown+nginx+php+sass+scss&plugins=line-highlight+line-numbers+autolinker+file-highlight+show-language */ 2 | /** 3 | * prism.js default theme for JavaScript, CSS and HTML 4 | * Based on dabblet (http://dabblet.com) 5 | * @author Lea Verou 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: black; 11 | text-shadow: 0 1px white; 12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 13 | direction: ltr; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 33 | text-shadow: none; 34 | background: #b3d4fc; 35 | } 36 | 37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 38 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 39 | text-shadow: none; 40 | background: #b3d4fc; 41 | } 42 | 43 | @media print { 44 | code[class*="language-"], 45 | pre[class*="language-"] { 46 | text-shadow: none; 47 | } 48 | } 49 | 50 | /* Code blocks */ 51 | pre[class*="language-"] { 52 | padding: 1em; 53 | margin: .5em 0; 54 | overflow: auto; 55 | } 56 | 57 | :not(pre) > code[class*="language-"], 58 | pre[class*="language-"] { 59 | background: #f5f2f0; 60 | } 61 | 62 | /* Inline code */ 63 | :not(pre) > code[class*="language-"] { 64 | padding: .1em; 65 | border-radius: .3em; 66 | white-space: normal; 67 | } 68 | 69 | .token.comment, 70 | .token.prolog, 71 | .token.doctype, 72 | .token.cdata { 73 | color: slategray; 74 | } 75 | 76 | .token.punctuation { 77 | color: #999; 78 | } 79 | 80 | .namespace { 81 | opacity: .7; 82 | } 83 | 84 | .token.property, 85 | .token.tag, 86 | .token.boolean, 87 | .token.number, 88 | .token.constant, 89 | .token.symbol, 90 | .token.deleted { 91 | color: #905; 92 | } 93 | 94 | .token.selector, 95 | .token.attr-name, 96 | .token.string, 97 | .token.char, 98 | .token.builtin, 99 | .token.inserted { 100 | color: #690; 101 | } 102 | 103 | .token.operator, 104 | .token.entity, 105 | .token.url, 106 | .language-css .token.string, 107 | .style .token.string { 108 | color: #a67f59; 109 | background: hsla(0, 0%, 100%, .5); 110 | } 111 | 112 | .token.atrule, 113 | .token.attr-value, 114 | .token.keyword { 115 | color: #07a; 116 | } 117 | 118 | .token.function { 119 | color: #DD4A68; 120 | } 121 | 122 | .token.regex, 123 | .token.important, 124 | .token.variable { 125 | color: #e90; 126 | } 127 | 128 | .token.important, 129 | .token.bold { 130 | font-weight: bold; 131 | } 132 | .token.italic { 133 | font-style: italic; 134 | } 135 | 136 | .token.entity { 137 | cursor: help; 138 | } 139 | 140 | pre[data-line] { 141 | position: relative; 142 | padding: 1em 0 1em 3em; 143 | } 144 | 145 | .line-highlight { 146 | position: absolute; 147 | left: 0; 148 | right: 0; 149 | padding: inherit 0; 150 | margin-top: 1em; /* Same as .prism’s padding-top */ 151 | 152 | background: hsla(24, 20%, 50%,.08); 153 | background: -moz-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); 154 | background: -webkit-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); 155 | background: -o-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); 156 | background: linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); 157 | 158 | pointer-events: none; 159 | 160 | line-height: inherit; 161 | white-space: pre; 162 | } 163 | 164 | .line-highlight:before, 165 | .line-highlight[data-end]:after { 166 | content: attr(data-start); 167 | position: absolute; 168 | top: .4em; 169 | left: .6em; 170 | min-width: 1em; 171 | padding: 0 .5em; 172 | background-color: hsla(24, 20%, 50%,.4); 173 | color: hsl(24, 20%, 95%); 174 | font: bold 65%/1.5 sans-serif; 175 | text-align: center; 176 | vertical-align: .3em; 177 | border-radius: 999px; 178 | text-shadow: none; 179 | box-shadow: 0 1px white; 180 | } 181 | 182 | .line-highlight[data-end]:after { 183 | content: attr(data-end); 184 | top: auto; 185 | bottom: .4em; 186 | } 187 | pre.line-numbers { 188 | position: relative; 189 | padding-left: 3.8em; 190 | counter-reset: linenumber; 191 | } 192 | 193 | pre.line-numbers > code { 194 | position: relative; 195 | } 196 | 197 | .line-numbers .line-numbers-rows { 198 | position: absolute; 199 | pointer-events: none; 200 | top: 0; 201 | font-size: 100%; 202 | left: -3.8em; 203 | width: 3em; /* works for line-numbers below 1000 lines */ 204 | letter-spacing: -1px; 205 | border-right: 1px solid #999; 206 | 207 | -webkit-user-select: none; 208 | -moz-user-select: none; 209 | -ms-user-select: none; 210 | user-select: none; 211 | 212 | } 213 | 214 | .line-numbers-rows > span { 215 | pointer-events: none; 216 | display: block; 217 | counter-increment: linenumber; 218 | } 219 | 220 | .line-numbers-rows > span:before { 221 | content: counter(linenumber); 222 | color: #999; 223 | display: block; 224 | padding-right: 0.8em; 225 | text-align: right; 226 | } 227 | .token a { 228 | color: inherit; 229 | } 230 | div.prism-show-language { 231 | position: relative; 232 | } 233 | 234 | div.prism-show-language > div.prism-show-language-label[data-language] { 235 | color: black; 236 | background-color: #CFCFCF; 237 | display: inline-block; 238 | position: absolute; 239 | bottom: auto; 240 | left: auto; 241 | top: 0; 242 | right: 0; 243 | width: auto; 244 | height: auto; 245 | font-size: 0.9em; 246 | border-radius: 0 0 0 5px; 247 | padding: 0 0.5em; 248 | text-shadow: none; 249 | z-index: 1; 250 | -webkit-box-shadow: none; 251 | -moz-box-shadow: none; 252 | box-shadow: none; 253 | -webkit-transform: none; 254 | -moz-transform: none; 255 | -ms-transform: none; 256 | -o-transform: none; 257 | transform: none; 258 | } 259 | 260 | -------------------------------------------------------------------------------- /dev/css/sass/_sprite.scss: -------------------------------------------------------------------------------- 1 | /* 2 | SCSS variables are information about icon's compiled state, stored under its original file name 3 | 4 | .icon-home { 5 | width: $icon-home-width; 6 | } 7 | 8 | The large array-like variables contain all information about a single icon 9 | $icon-home: x y offset_x offset_y width height total_width total_height image_path; 10 | 11 | At the bottom of this section, we provide information about the spritesheet itself 12 | $spritesheet: width height image $spritesheet-sprites; 13 | */ 14 | $icon-hongxiu-name: 'icon-hongxiu'; 15 | $icon-hongxiu-x: 334px; 16 | $icon-hongxiu-y: 100px; 17 | $icon-hongxiu-offset-x: -334px; 18 | $icon-hongxiu-offset-y: -100px; 19 | $icon-hongxiu-width: 200px; 20 | $icon-hongxiu-height: 74px; 21 | $icon-hongxiu-total-width: 534px; 22 | $icon-hongxiu-total-height: 380px; 23 | $icon-hongxiu-image: 'sprite@2x.png'; 24 | $icon-hongxiu: (334px, 100px, -334px, -100px, 200px, 74px, 534px, 380px, 'sprite@2x.png', 'icon-hongxiu', ); 25 | $icon-qidian-name: 'icon-qidian'; 26 | $icon-qidian-x: 334px; 27 | $icon-qidian-y: 184px; 28 | $icon-qidian-offset-x: -334px; 29 | $icon-qidian-offset-y: -184px; 30 | $icon-qidian-width: 200px; 31 | $icon-qidian-height: 74px; 32 | $icon-qidian-total-width: 534px; 33 | $icon-qidian-total-height: 380px; 34 | $icon-qidian-image: 'sprite@2x.png'; 35 | $icon-qidian: (334px, 184px, -334px, -184px, 200px, 74px, 534px, 380px, 'sprite@2x.png', 'icon-qidian', ); 36 | $icon-readnovel-name: 'icon-readnovel'; 37 | $icon-readnovel-x: 0px; 38 | $icon-readnovel-y: 322px; 39 | $icon-readnovel-offset-x: 0px; 40 | $icon-readnovel-offset-y: -322px; 41 | $icon-readnovel-width: 200px; 42 | $icon-readnovel-height: 58px; 43 | $icon-readnovel-total-width: 534px; 44 | $icon-readnovel-total-height: 380px; 45 | $icon-readnovel-image: 'sprite@2x.png'; 46 | $icon-readnovel: (0px, 322px, 0px, -322px, 200px, 58px, 534px, 380px, 'sprite@2x.png', 'icon-readnovel', ); 47 | $icon-rongshuxia-name: 'icon-rongshuxia'; 48 | $icon-rongshuxia-x: 0px; 49 | $icon-rongshuxia-y: 110px; 50 | $icon-rongshuxia-offset-x: 0px; 51 | $icon-rongshuxia-offset-y: -110px; 52 | $icon-rongshuxia-width: 200px; 53 | $icon-rongshuxia-height: 108px; 54 | $icon-rongshuxia-total-width: 534px; 55 | $icon-rongshuxia-total-height: 380px; 56 | $icon-rongshuxia-image: 'sprite@2x.png'; 57 | $icon-rongshuxia: (0px, 110px, 0px, -110px, 200px, 108px, 534px, 380px, 'sprite@2x.png', 'icon-rongshuxia', ); 58 | $icon-tingbook-name: 'icon-tingbook'; 59 | $icon-tingbook-x: 0px; 60 | $icon-tingbook-y: 0px; 61 | $icon-tingbook-offset-x: 0px; 62 | $icon-tingbook-offset-y: 0px; 63 | $icon-tingbook-width: 324px; 64 | $icon-tingbook-height: 100px; 65 | $icon-tingbook-total-width: 534px; 66 | $icon-tingbook-total-height: 380px; 67 | $icon-tingbook-image: 'sprite@2x.png'; 68 | $icon-tingbook: (0px, 0px, 0px, 0px, 324px, 100px, 534px, 380px, 'sprite@2x.png', 'icon-tingbook', ); 69 | $icon-xs8-name: 'icon-xs8'; 70 | $icon-xs8-x: 0px; 71 | $icon-xs8-y: 228px; 72 | $icon-xs8-offset-x: 0px; 73 | $icon-xs8-offset-y: -228px; 74 | $icon-xs8-width: 214px; 75 | $icon-xs8-height: 84px; 76 | $icon-xs8-total-width: 534px; 77 | $icon-xs8-total-height: 380px; 78 | $icon-xs8-image: 'sprite@2x.png'; 79 | $icon-xs8: (0px, 228px, 0px, -228px, 214px, 84px, 534px, 380px, 'sprite@2x.png', 'icon-xs8', ); 80 | $icon-xxsy-name: 'icon-xxsy'; 81 | $icon-xxsy-x: 334px; 82 | $icon-xxsy-y: 0px; 83 | $icon-xxsy-offset-x: -334px; 84 | $icon-xxsy-offset-y: 0px; 85 | $icon-xxsy-width: 200px; 86 | $icon-xxsy-height: 90px; 87 | $icon-xxsy-total-width: 534px; 88 | $icon-xxsy-total-height: 380px; 89 | $icon-xxsy-image: 'sprite@2x.png'; 90 | $icon-xxsy: (334px, 0px, -334px, 0px, 200px, 90px, 534px, 380px, 'sprite@2x.png', 'icon-xxsy', ); 91 | $spritesheet-width: 534px; 92 | $spritesheet-height: 380px; 93 | $spritesheet-image: 'sprite@2x.png'; 94 | $spritesheet-sprites: ($icon-hongxiu, $icon-qidian, $icon-readnovel, $icon-rongshuxia, $icon-tingbook, $icon-xs8, $icon-xxsy, ); 95 | $spritesheet: (534px, 380px, 'sprite@2x.png', $spritesheet-sprites, ); 96 | 97 | /* 98 | The provided mixins are intended to be used with the array-like variables 99 | 100 | .icon-home { 101 | @include sprite-width($icon-home); 102 | } 103 | 104 | .icon-email { 105 | @include sprite($icon-email); 106 | } 107 | */ 108 | @mixin sprite-width($sprite) { 109 | width: nth($sprite, 5); 110 | } 111 | 112 | @mixin sprite-height($sprite) { 113 | height: nth($sprite, 6); 114 | } 115 | 116 | @mixin sprite-position($sprite) { 117 | $sprite-offset-x: nth($sprite, 3); 118 | $sprite-offset-y: nth($sprite, 4); 119 | background-position: $sprite-offset-x $sprite-offset-y; 120 | } 121 | 122 | @mixin sprite-image($sprite) { 123 | $sprite-image: nth($sprite, 9); 124 | background-image: url(#{$sprite-image}); 125 | } 126 | 127 | @mixin sprite($sprite) { 128 | @include sprite-image($sprite); 129 | @include sprite-position($sprite); 130 | @include sprite-width($sprite); 131 | @include sprite-height($sprite); 132 | } 133 | 134 | /* 135 | The `sprites` mixin generates identical output to the CSS template 136 | but can be overridden inside of SCSS 137 | 138 | @include sprites($spritesheet-sprites); 139 | */ 140 | @mixin sprites($sprites) { 141 | @each $sprite in $sprites { 142 | $sprite-name: nth($sprite, 10); 143 | .#{$sprite-name} { 144 | @include sprite($sprite); 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /dev/css/sass/style.scss: -------------------------------------------------------------------------------- 1 | @import "normalize"; 2 | // @import "webfont"; 3 | @import "mixins"; 4 | 5 | // 载入图片精灵 6 | @import "prism"; 7 | @import "base"; 8 | @import "fonts"; 9 | @import "duoshuo"; 10 | 11 | @media print { 12 | @import "print"; 13 | } // end of media query 14 | @media only screen and (min-width: 1024px) { 15 | @import "1024up"; 16 | } // end of media query 17 | @media only screen and (max-width: 768px) { 18 | @import "768up"; 19 | } // end of media query 20 | @media only screen and (max-width: 481px) { 21 | @import "481up"; 22 | } // end of media query 23 | @media only screen and (max-width: 361px) { 24 | @import "361up"; 25 | } // end of media query 26 | @media only screen and (max-width: 321px) { 27 | @import "321up"; 28 | } // end of media query 29 | -------------------------------------------------------------------------------- /dev/img/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foru17/Yasuko/40584a7b3df0d2de232c79172d277299ffbf39ae/dev/img/sprite@2x.png -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | 创建Gulp配置文件 3 | */ 4 | 5 | //引入 gulp 6 | var gulp = require('gulp'); 7 | 8 | //引入功能组件 9 | 10 | var compass = require('gulp-compass'); 11 | var concat = require('gulp-concat'); 12 | var uglify = require('gulp-uglify'); 13 | var sourcemaps = require('gulp-sourcemaps'); 14 | var del = require('del'); 15 | var jshint = require('gulp-jshint'); 16 | 17 | var sass = require('gulp-sass'); 18 | var sourcemaps = require('gulp-sourcemaps'); 19 | 20 | 21 | var autoprefixer = require('gulp-autoprefixer'); 22 | var minifycss = require('gulp-minify-css'); 23 | var rename = require('gulp-rename'); 24 | 25 | // 图像处理 26 | 27 | var imagemin = require('gulp-imagemin'); //十分大 28 | var pngquant = require('imagemin-pngquant'); 29 | var spritesmith = require('gulp.spritesmith'); 30 | var imageResize = require('gulp-image-resize'); 31 | 32 | 33 | // 错误处理 34 | var plumber = require("gulp-plumber"); 35 | var stylish = require("jshint-stylish"); 36 | 37 | // 开发辅助 38 | var pkg = require('./package.json'); //获得配置文件中相关信息 39 | var chalk = require('chalk'); //美化日志 40 | var dateFormat = require('dateformat'); //获得自然时间 41 | var csscomb = require('gulp-csscomb'); //CSS规范排序 42 | 43 | // 打包发布 44 | var zip = require('gulp-zip'); 45 | var ftp = require('gulp-ftp'); 46 | 47 | 48 | // 设置相关路径 49 | var paths = { 50 | assets: 'assets', 51 | sass: 'dev/css/sass/**/*', 52 | css: 'dev/css', 53 | js: 'dev/js/**/*', //js文件相关目录 54 | img: 'dev/img/**/*', //图片相关 55 | }; 56 | 57 | gulp.task('clean', function(cb) { 58 | del(['build'], cb); 59 | }); 60 | 61 | 62 | 63 | // Sass 处理 64 | gulp.task('sass', function() { 65 | gulp.src(paths.sass) 66 | .pipe(plumber()) 67 | .pipe(sourcemaps.init()) 68 | .pipe(sass()) 69 | .pipe(concat('style.css')) 70 | .pipe(gulp.dest(paths.css)) 71 | .pipe(minifycss()) 72 | .pipe(sourcemaps.write({ 73 | sourceRoot: '/css/sass' 74 | })) 75 | .pipe(rename('dev.min.css')) 76 | .pipe(gulp.dest('assets/css')); 77 | 78 | gulp.src(paths.sass) 79 | .pipe(plumber()) 80 | .pipe(sass()) 81 | .pipe(concat('style.css')) 82 | .pipe(csscomb()) 83 | .pipe(rename('uncompressed.css')) 84 | .pipe(gulp.dest('assets/css')) 85 | .pipe(gulp.dest(paths.css)) 86 | .pipe(minifycss()) 87 | .pipe(rename('all.min.css')) 88 | .pipe(gulp.dest('assets/css')); 89 | 90 | }); 91 | 92 | 93 | 94 | 95 | // JS检查 96 | gulp.task('lint', function() { 97 | return gulp.src(paths.js) 98 | .pipe(jshint()) 99 | .pipe(jshint.reporter('default')); 100 | }); 101 | 102 | 103 | gulp.task('scripts', function() { 104 | // Minify and copy all JavaScript (except vendor scripts) 105 | // with sourcemaps all the way down 106 | gulp.src(paths.js) 107 | .pipe(plumber()) 108 | .pipe(sourcemaps.init()) 109 | .pipe(jshint()) 110 | .pipe(jshint.reporter(stylish)) 111 | .pipe(uglify({ 112 | compress: { 113 | drop_console: false 114 | } 115 | })) 116 | .pipe(concat('all.min.js')) 117 | .pipe(gulp.dest('assets/js')) 118 | .pipe(rename('dev.min.js')) 119 | .pipe(sourcemaps.write()) 120 | .pipe(gulp.dest('assets/js')); 121 | 122 | }); 123 | 124 | 125 | 126 | // 处理图像 127 | gulp.task('image', function() { 128 | return gulp.src(paths.img) 129 | .pipe(imagemin({ 130 | progressive: true, 131 | svgoPlugins: [{ 132 | removeViewBox: false 133 | }], 134 | use: [pngquant()] 135 | })) 136 | .pipe(gulp.dest('assets/images')); 137 | }); 138 | 139 | 140 | /** 141 | * 自动生成@2x图片精灵 142 | * $ gulp sprite 143 | * algorithm排列有top-down,left-right,diagonal,alt-diagonal,binary-tree五种方式,根据需求选择 144 | * 参考:https://github.com/Ensighten/spritesmith#algorithms 145 | * 此task生成的为@2x的高清图 146 | */ 147 | 148 | 149 | gulp.task('retinasprite', function(cb) { 150 | del(['dev/img/*.png'], function() { 151 | console.log(chalk.red('[清理] 删除旧有精灵')) 152 | }); 153 | var spriteData = gulp.src('dev/sprites/*.png').pipe(spritesmith({ 154 | imgName: 'sprite@2x.png', 155 | cssName: '_sprite.scss', 156 | algorithm: 'binary-tree', 157 | padding: 10 //建议留白10像素 158 | })); 159 | spriteData.img.pipe(gulp.dest('dev/img/')); // 输出合成图片 160 | spriteData.css.pipe(gulp.dest('dev/css/sass/')).on('end', cb) 161 | console.log(chalk.green('[缩略] 生成高清图')) 162 | }); 163 | 164 | 165 | /** 166 | * 自动生成@1x图片精灵 167 | * 在retinasprite执行后自动生成标清精灵 168 | */ 169 | 170 | gulp.task('standardsprite', ['retinasprite'], function(cb) { 171 | console.log(chalk.green('[缩略] 生成标清图')) 172 | gulp.src('dev/img/sprite@2x.png').pipe(imageResize({ 173 | width: '50%' 174 | })) 175 | .pipe(rename('sprite.png')) 176 | .pipe(gulp.dest('dev/img/')).on('end', cb) 177 | 178 | }) 179 | gulp.task('sprite2assets', ['retinasprite', 'standardsprite'], function() { 180 | console.log(chalk.green('[转移] 复制精灵图到资源目录')) 181 | gulp.src('dev/img/*.png').pipe(gulp.dest('assets/images/')) 182 | }) 183 | 184 | /** 185 | * 文件变更监听 186 | * $ gulp watch 187 | */ 188 | 189 | gulp.task('watch', function() { 190 | console.log(chalk.green('[监听] 启动gulp watch自动编译')) 191 | gulp.watch(paths.js, ['scripts']); 192 | gulp.watch(paths.sass, ['sass']); 193 | }); 194 | 195 | /** 196 | * 生成最终交付文件夹 197 | * $ gulp build 198 | * 199 | */ 200 | gulp.task('build', function() { 201 | del(['build'], function() { 202 | console.log(chalk.red('[清理] 删除旧有build文件夹')) 203 | }); 204 | gulp.src('*.html').pipe(gulp.dest('build')) 205 | gulp.src('assets/**/!(*dev*)*').pipe(gulp.dest('build/assets')) 206 | }); 207 | 208 | 209 | /** 210 | * 压缩最终的文件 211 | * 自动增加当前时间戳 + 项目名称 212 | * $ gulp zip 213 | */ 214 | 215 | gulp.task('zip', function() { 216 | var now = new Date(); 217 | del(['zipped/*.zip'], function() { 218 | console.log(chalk.red('[清理] 删除旧有压缩包')) 219 | }); 220 | console.log(chalk.red('[压缩] 打包最终文件')) 221 | gulp.src('build/**/*') 222 | .pipe(zip(dateFormat(now, 'yyyy-mmmm-dS-h-MMTT') + '-' + pkg.name + '.zip')) 223 | .pipe(gulp.dest('zipped/')) 224 | }); 225 | 226 | 227 | gulp.task('ftp', function() { 228 | console.log(chalk.red('[发布] 上传到内网服务器')) 229 | gulp.src('build/**/*') 230 | .pipe(ftp({ 231 | host: '10.97.19.100', 232 | user: 'ftp', 233 | pass: '123456', 234 | remotePath: pkg.name 235 | })) 236 | .pipe(gutil.noop()); 237 | }); 238 | 239 | 240 | 241 | 242 | gulp.task('sprite', ['retinasprite', 'standardsprite', 'sprite2assets']); 243 | gulp.task('default', ['watch', 'scripts']); 244 | gulp.task('watch:base', ['watch']); 245 | -------------------------------------------------------------------------------- /index.hbs: -------------------------------------------------------------------------------- 1 | {{!< default}} 2 | 3 | 35 | {{! The main content area on the homepage }} 36 |
37 | {{! Each post will be output using this markup }} 38 | {{> "loop"}} 39 | {{!! After all the posts, we have the previous/next pagination links }} 40 | 41 | {{!-- {{pagination}} --}} 42 |
43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yasuko", 3 | "version": "0.1.0", 4 | "description": "A Ghost theme designed and developed by @foru17", 5 | "author": "@foru17", 6 | "homepage": "https://luolei.org", 7 | "devDependencies": { 8 | "chalk": "^1.1.1", 9 | "dateformat": "^1.0.12", 10 | "del": "^2.1.0", 11 | "gulp": "^3.8.10", 12 | "gulp-autoprefixer": "^3.1.0", 13 | "gulp-compass": "^2.0.3", 14 | "gulp-concat": "^2.4.3", 15 | "gulp-csscomb": "^3.0.6", 16 | "gulp-ftp": "^1.1.0", 17 | "gulp-image-resize": "^0.7.1", 18 | "gulp-imagemin": "^2.1.0", 19 | "jshint": "2.8.0", 20 | "gulp-jshint": "^2.0.0", 21 | "gulp-minify-css": "^1.2.1", 22 | "gulp-plumber": "^1.0.0", 23 | "gulp-rename": "^1.2.0", 24 | "gulp-sass": "^2.0.0", 25 | "gulp-sourcemaps": "^1.3.0", 26 | "gulp-strip-debug": "^1.1.0", 27 | "gulp-uglify": "^1.1.0", 28 | "gulp-zip": "^3.0.2", 29 | "gulp.spritesmith": "^6.0.0", 30 | "imagemin-pngquant": "^4.0.0", 31 | "jshint-stylish": "^2.1.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /page.hbs: -------------------------------------------------------------------------------- 1 | {{!< default}} 2 | 3 | {{! This is a page template. A page outputs content just like any other post, and has all the same 4 | attributes by default, but you can also customise it to behave differently if you prefer. }} 5 | 6 | {{! Everything inside the #post tags pulls data from the page }} 7 | {{#post}} 8 | 9 |
10 | 16 |
17 | 18 |
19 |
20 | 21 |
22 |

{{title}}

23 |
24 | 25 |
26 | {{content}} 27 |
28 | 29 |
30 |
31 | {{/post}} 32 | -------------------------------------------------------------------------------- /partials/loop.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{! This is the post loop - each post will be output using this markup }} 3 | {{#foreach posts}} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
12 |

{{{title}}}

13 | 19 |
20 |
21 |
22 |
23 |
24 | 25 | 26 |
27 | 36 | 37 | 38 |
39 |
40 |
41 |
42 | 43 | {{/foreach}} 44 | 45 | 46 | {{! Previous/next page links - displayed on every page }} 47 | {{pagination}} 48 | -------------------------------------------------------------------------------- /partials/navigation.hbs: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /post.hbs: -------------------------------------------------------------------------------- 1 | {{!< default}} 2 | 3 | {{! The comment above "< default" means - insert everything in this file into 4 | the {body} of the default.hbs template, which contains our header/footer. }} 5 | 6 | {{! Everything inside the #post tags pulls data from the post }} 7 | {{#post}} 8 | {{#if feature_image}} 9 | 10 |