diff --git a/2019/10/10/hello-world/index.html b/2019/10/10/hello-world/index.html deleted file mode 100644 index 1b1dc25..0000000 --- a/2019/10/10/hello-world/index.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - Hello World | 向着光亮的地方 - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
- -
- - -
- - -

- Hello World -

- - -
- -
- -

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

-

Quick Start

Create a new post

1
$ hexo new "My New Post"
- -

More info: Writing

-

Run server

1
$ hexo server
- -

More info: Server

-

Generate static files

1
$ hexo generate
- -

More info: Generating

-

Deploy to remote sites

1
$ hexo deploy
- -

More info: Deployment

- - -
- -
- - - - - -
- -
- - - -
-
- -
- -
-
-
- - - - - - - - - - - - - - -
- - \ No newline at end of file diff --git "a/2019/10/12/H5\351\241\271\347\233\256\345\274\225\345\205\245\345\255\227\344\275\223(\345\205\245\351\227\250\345\210\260\346\224\276\345\274\203)/index.html" "b/2019/10/12/H5\351\241\271\347\233\256\345\274\225\345\205\245\345\255\227\344\275\223(\345\205\245\351\227\250\345\210\260\346\224\276\345\274\203)/index.html" new file mode 100644 index 0000000..d00c02c --- /dev/null +++ "b/2019/10/12/H5\351\241\271\347\233\256\345\274\225\345\205\245\345\255\227\344\275\223(\345\205\245\351\227\250\345\210\260\346\224\276\345\274\203)/index.html" @@ -0,0 +1,807 @@ + + + + + + + + + + + + H5项目引入字体(入门到放弃) | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+ + + +
+
+ +
+ + + +
+ + +
+ +

+ +
+ + + +
+
+ + + + + + + +
+ + + +
+
+
+
+
+ + + + + + + +
+
+
+ + + + +
+ + + +
+

H5项目引入字体

方法1:
1.下载所需要的字体,.ttf格式本文以(FZCYJ.ttf 为例)
2.先自己定义一个font.css文件,字体文件的路径引入

+
1
2
3
4
5
6
7

@font-face {
font-family: "华文行楷";
src: url('stxingka.ttf');
font-weight: normal;
font-style: normal;
}
+ +

3.App.vue中的style里引入

+
1
2
3
<style lang="less" rel="stylesheet/less">
@import "./common/font/font.css";
</style>
+ +

4、添加loader

+
1
2
3
4
5
6
7
8
9
10
11
12
module: {
rules: [
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
}
+ +

5.使用

+
1
2
3
4
5
<style type="less" scoped>
.header{
font-family: "华文行楷"
}
</style>
+ +

上述方法弊端:

+
ttf文件教大,页面加载过慢,影响用户体验
+解决方向:压缩ttf文件

**方法2: font-spider(字蛛)压缩ttf**

+
先附上官方链接:http://font-spider.org/
+
+GITHUB:https://github.com/aui/font-spider/blob/master/README-ZH-CN.md
+
+使用教程:https://www.jianshu.com/p/8ef246692d14

上述方法弊端

+
font-spider原理是解析html页面中的含有中文字的标签,然后解析标签,将需要的ttf压缩,将压缩后的ttf文件放到项目中去,**但是,这种ttf文件会解析页面中已经存在的字体,而我们的项目是单页面应用,都是打包后的js文件,没有像静态页面中已存在的字体**,所以当我们把压缩好的ttf文件放到静态页面中尝试时,确实是有效的,可当我们放到项目中就失效了,这是我能想到能解释这个现象的唯一原因了。

所以怎么办?
方法3:
在万籁俱寂之时,为我无意间翻到了一个网站叫‘有字库“,网址是:https://www.webfont.com
具体使用方法

+
1、注册登录
+2、检索到需要的字体
+3、点击使用,下面照搬就行

avatar
avatar
这个在线字体库的唯一的优势就是它的js文件通过cdn加速过,加载字体文件的速度提高了,其他并没有什么特别之处。但是,为什么我后来又放弃了呢?当你搜一下下面的字体时突然发现
avatar
兄弟有钱不?

+

总结

如果你的产品跟你说:“去他妈的用户体验。”我强烈推荐方法1
+如果你使用的前端项目不是基于node应用使用方法2,且你不想这么费事,那就方法3。

敲黑板

天真的你们是不是以为这就完了,还有方法4呢?我怎么可能不解决问题就结束了呢?史上最强的解决方案来啦。。。
+我:"那个,口渴吗?"
+她:“什么事?”
+我:“这个图能帮我切一下吗?”
+她:“行啊!”
+我:“顺便把这个字体也放进去吧!”
+她:“可以的,现在就要吗?”
+我:“没事没事,你慢慢做,我不急”
+...半个小时后,美团的小哥在楼梯间吼道:“徐先生,徐先生,您的奶茶到了!”
+完结
+
+ +
+ + +
+
+
+
Related post
+
Comment
+
Share
+
+
+ + + To Top + + + + + + + + +
+
+ +
+
+ + +
+ +
    + +
  • +
    + + 移动端H5碰到的问题 + + +

    + 1、ios键盘唤起,键盘收起以后页面不归位问题描述: 输入内容,软键盘弹出,页面内容整体上移,但是键盘收起,页面内容不下滑出现原因分析: 固定定位的元素 在元素内 input 框聚焦的时候 弹出的软键盘占位 失去焦点的时候... +

    +
    + +
    + + + 移动端H5碰到的问题 + +
    +
  • + + +
  • +
    + + JS开发技巧 + + +

    + String Skill:字符串技巧 +对比时间 – 时间个位数形式需补0 +1234const time1 = "2019-02-14 21:00:00";const time2 = "2019-05-0... +

    +
    + +
    + + + JS开发技巧 + +
    +
  • + + +
  • +
    + + css技巧 + + +

    + 常用CSS1. 快速重置表单元素 unset 原始的 button 按钮要重置挺麻烦的。洋洋洒洒的要设置好几个属性,就像下面这样: +12345678button { background: none; border:... +

    +
    + +
    + + + css技巧 + +
    +
  • + + +
+ +
+
+
+
+ + + + + + +
Please check the comment setting in config.yml of hexo-theme-Annie!
+ + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/2019/10/12/H5\357\274\210nuxt\357\274\211\351\241\271\347\233\256\345\274\225\345\205\245\345\255\227\344\275\223(\345\205\245\351\227\250\345\210\260\346\224\276\345\274\203)/index.html" "b/2019/10/12/H5\357\274\210nuxt\357\274\211\351\241\271\347\233\256\345\274\225\345\205\245\345\255\227\344\275\223(\345\205\245\351\227\250\345\210\260\346\224\276\345\274\203)/index.html" deleted file mode 100644 index b3efaed..0000000 --- "a/2019/10/12/H5\357\274\210nuxt\357\274\211\351\241\271\347\233\256\345\274\225\345\205\245\345\255\227\344\275\223(\345\205\245\351\227\250\345\210\260\346\224\276\345\274\203)/index.html" +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - H5(nuxt)项目引入字体(入门到放弃) | 向着光亮的地方 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
- -
- - -
- - -

- H5(nuxt)项目引入字体(入门到放弃) -

- - -
- -
- -

H5(nuxt)项目引入字体

方法1:
1.下载所需要的字体,.ttf格式本文以(FZCYJ.ttf 为例)
2.先自己定义一个font.css文件,字体文件的路径引入

-
1
2
3
4
5
6
7

@font-face {
font-family: "华文行楷";
src: url('stxingka.ttf');
font-weight: normal;
font-style: normal;
}
- -

3.App.vue中的style里引入

-
1
2
3
<style lang="less" rel="stylesheet/less">
@import "./common/font/font.css";
</style>
- -

4、添加loader

-
1
2
3
4
5
6
7
8
9
10
11
12
module: {
rules: [
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
}
- -

5.使用

-
1
2
3
4
5
<style type="less" scoped>
.header{
font-family: "华文行楷"
}
</style>
- -

上述方法弊端:

-
ttf文件教大,页面加载过慢,影响用户体验
-解决方向:压缩ttf文件

**方法2: font-spider(字蛛)压缩ttf**

-
先附上官方链接:http://font-spider.org/
-
-GITHUB:https://github.com/aui/font-spider/blob/master/README-ZH-CN.md
-
-使用教程:https://www.jianshu.com/p/8ef246692d14

上述方法弊端

-
font-spider原理是解析html页面中的含有中文字的标签,然后解析标签,将需要的ttf压缩,将压缩后的ttf文件放到项目中去,**但是,这种ttf文件会解析页面中已经存在的字体,而我们的项目是单页面应用,都是打包后的js文件,没有像静态页面中已存在的字体**,所以当我们把压缩好的ttf文件放到静态页面中尝试时,确实是有效的,可当我们放到项目中就失效了,这是我能想到能解释这个现象的唯一原因了。

所以怎么办?
方法3:
在万籁俱寂之时,为我无意间翻到了一个网站叫‘有字库“,网址是:https://www.webfont.com
具体使用方法

-
1、注册登录
-2、检索到需要的字体
-3、点击使用,下面照搬就行

daeca34ed56e56127dd312e6d19e15b9.png
24a30303d048afa88cfb74b7d650d106.png
这个在线字体库的唯一的优势就是它的js文件通过cdn加速过,加载字体文件的速度提高了,其他并没有什么特别之处。但是,为什么我后来又放弃了呢?当你搜一下下面的字体时突然发现
12dfb4e51fb5e840c3d2a75abfa4fb98.png
兄弟有钱不?

-

总结

如果你的产品跟你说:“去他妈的用户体验。”我强烈推荐方法1
-如果你使用的前端项目不是基于node应用使用方法2,且你不想这么费事,那就方法3。

敲黑板

天真的你们是不是以为这就完了,还有方法4呢?我怎么可能不解决问题就结束了呢?史上最强的解决方案来啦。。。
-我:"那个,口渴吗?"
-她:“什么事?”
-我:“这个图能帮我切一下吗?”
-她:“行啊!”
-我:“顺便把这个字体也放进去吧!”
-她:“可以的,现在就要吗?”
-我:“没事没事,你慢慢做,我不急”
-...半个小时后,美团的小哥在楼梯间吼道:“徐先生,徐先生,您的奶茶到了!”
-完结
- -
- -
- - - - - -
- -
- - - -
-
- -
- -
-
-
- - - - - - - - - - - - - - -
- - \ No newline at end of file diff --git "a/2019/10/12/css\346\212\200\345\267\247/index.html" "b/2019/10/12/css\346\212\200\345\267\247/index.html" index cba70d6..fcfa5d7 100644 --- "a/2019/10/12/css\346\212\200\345\267\247/index.html" +++ "b/2019/10/12/css\346\212\200\345\267\247/index.html" @@ -1,97 +1,342 @@ + - + + + - - + + + + + + css技巧 | 向着光亮的地方 + + + + + + + + + + - css技巧 | 向着光亮的地方 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - -
-
-
+ +
+
+ - - +
+ + + +
+
+
+
- - - -
-
- -
- -
+ + + + + +
Please check the comment setting in config.yml of hexo-theme-Annie!
+ + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + +
+ +
- - - + - + + + + + + + - - + + + + + + + + \ No newline at end of file diff --git "a/2019/10/12/js\346\212\200\345\267\247/index.html" "b/2019/10/12/js\346\212\200\345\267\247/index.html" index 110a793..a846cc2 100644 --- "a/2019/10/12/js\346\212\200\345\267\247/index.html" +++ "b/2019/10/12/js\346\212\200\345\267\247/index.html" @@ -1,97 +1,342 @@ + - + + + - - + + + + + + JS开发技巧 | 向着光亮的地方 + + + + + + + + + + - JS开发技巧 | 向着光亮的地方 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - -
-
-
+ +
+
+ - - +
+ +
    + +
  • +
    + + H5项目引入字体(入门到放弃) + + +

    + H5项目引入字体方法1:1.下载所需要的字体,.ttf格式本文以(FZCYJ.ttf 为例)2.先自己定义一个font.css文件,字体文件的路径引入 +1234567@font-face { font-family: &q... +

    +
    - - - - -
    -

    Archives

    - -
    +
    + + + H5项目引入字体(入门到放弃) + +
    +
  • + + +
  • +
    + + 移动端H5碰到的问题 + + +

    + 1、ios键盘唤起,键盘收起以后页面不归位问题描述: 输入内容,软键盘弹出,页面内容整体上移,但是键盘收起,页面内容不下滑出现原因分析: 固定定位的元素 在元素内 input 框聚焦的时候 弹出的软键盘占位 失去焦点的时候... +

    +
    +
    + + + 移动端H5碰到的问题 + +
    +
  • + + +
  • +
    + + css技巧 + + +

    + 常用CSS1. 快速重置表单元素 unset 原始的 button 按钮要重置挺麻烦的。洋洋洒洒的要设置好几个属性,就像下面这样: +12345678button { background: none; border:... +

    +
    - - -
    -

    Recent Posts

    - -
    +
    + + + css技巧 + +
    +
  • + + +
+ +
+
+
+
- - - -
-
- -
- -
+ + + + + +
Please check the comment setting in config.yml of hexo-theme-Annie!
+ + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + +
+ +
- - - + - + + + + + + + - - + + + + + + + + \ No newline at end of file diff --git "a/2019/10/12/\347\247\273\345\212\250\347\253\257H5/index.html" "b/2019/10/12/\347\247\273\345\212\250\347\253\257H5/index.html" index e80c773..ab93ce9 100644 --- "a/2019/10/12/\347\247\273\345\212\250\347\253\257H5/index.html" +++ "b/2019/10/12/\347\247\273\345\212\250\347\253\257H5/index.html" @@ -1,97 +1,342 @@ + - + + + - - + + + + + + 移动端H5碰到的问题 | 向着光亮的地方 + + + + + + + + + + - 移动端H5碰到的问题 | 向着光亮的地方 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - -
-
-
+ +
+
+ - - - - -
-

Archives

- -
+
+ +
-
- -
- -
+
+ + + css技巧 + +
+ + + + + +
+
+
+
+ + + + + + +
Please check the comment setting in config.yml of hexo-theme-Annie!
+ + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + +
+ +
- - - + - + + + + + + + - - + + + + + + + + \ No newline at end of file diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..6426a12 --- /dev/null +++ b/about/index.html @@ -0,0 +1,426 @@ + + + + + + + + + + + + 关于 | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+ + + +
+
+ +
+ + + +
+ + +
+ +

+ +
+ + + +
+
+ + + + + + + +
+ +
+
+ +
+ + + + 关于 + + + +
+ + + +
+

联系方式

+ + + + + + + + + + + + + +
微信号公众号小程序
avataravataravatar
+ +
+ + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/archives/2019/10/index.html b/archives/2019/10/index.html index 783c3db..0fa7c6d 100644 --- a/archives/2019/10/index.html +++ b/archives/2019/10/index.html @@ -1,267 +1,586 @@ + - - - - + + - - Archives: 2019/10 | 向着光亮的地方 - + + + + + + + Archive: 2019/10 | 向着光亮的地方 + + + - - - - - - - - - - - - - - - + + + + + + + - + + + + + + - - -
-
-
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
- - - + - + + + + + + + -
- + + + + + + + + \ No newline at end of file diff --git a/archives/2019/index.html b/archives/2019/index.html index 1dc32ad..42ad6ca 100644 --- a/archives/2019/index.html +++ b/archives/2019/index.html @@ -1,267 +1,586 @@ + - - - - + + - - Archives: 2019 | 向着光亮的地方 - + + + + + + + Archive: 2019 | 向着光亮的地方 + + + - - - - - - - - - - - - - - - + + + + + + + - + + + + + + - - -
-
-
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
- - - + - + + + + + + + -
- + + + + + + + + \ No newline at end of file diff --git a/archives/index.html b/archives/index.html index 43a4de9..d6487ca 100644 --- a/archives/index.html +++ b/archives/index.html @@ -1,267 +1,586 @@ + - - - - + + - - Archives | 向着光亮的地方 - + + + + + + + Archive | 向着光亮的地方 + + + - - - - - - - - - - - - - - - + + + + + + + - + + + + + + - - -
-
-
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
- - - + - + + + + + + + -
- + + + + + + + + \ No newline at end of file diff --git a/categories/index.html b/categories/index.html new file mode 100644 index 0000000..1e427c7 --- /dev/null +++ b/categories/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + categories | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+ + + +
+
+ +
+ + + +
+ + +
+ +

+ +
+ + + +
+
+ + + + + + + +
+ +
+
+ +
+ + + + Total 1 ge categorie + + + +
+ + + +
+ +
+ + +
+ + + +
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/categories/\345\211\215\347\253\257/index.html" "b/categories/\345\211\215\347\253\257/index.html" new file mode 100644 index 0000000..dc14121 --- /dev/null +++ "b/categories/\345\211\215\347\253\257/index.html" @@ -0,0 +1,591 @@ + + + + + + + + + + + + category: -前端 | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+ + + +
+
+ +
+ + + +
+ + +
+ +

+ +
+ + + +
+
+ + + + + + + +
+ +
+
+ + + + + + -前端 4 pian + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/Annie.css b/css/Annie.css new file mode 100644 index 0000000..bad0ae2 --- /dev/null +++ b/css/Annie.css @@ -0,0 +1,2755 @@ +/* 2019-04-27 updated by Sariay */ +html, +body, +div, +main, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +span, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + vertical-align: baseline; +} +header, +nav, +footer, +main, +section, +aside, +article, +figure { + display: block; +} +html { + font-size: 16px; +} +body { +/*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell","Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;*/ + font-family: Ovo, Georgia, STZhongsong, "Microsoft YaHei", serif; + font-size: 1rem; + font-weight: normal; + color: #555; + -webkit-text-size-adjust: 100%; + -moz-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +/* + word-spacing: 1px; + letter-spacing: 1px; + word-wrap: break-word;//针对单词本身换行做处理 + word-break: break-all;//针对句子本身换行做处理 + */ +} +.html-loading { + width: 100%; + height: 100%; + overflow: hidden; +} +p { + text-align: justify; + margin-bottom: 1rem; +} +p:first-letter { + text-transform: uppercase; +} +h1, +h2, +h3, +h4, +h5, +h6 { + text-transform: uppercase; + font-weight: 900; + margin-bottom: 1rem; +} +h1 { + font-size: 2rem; +} +h2 { + font-size: 1.75rem; +} +h3 { + font-size: 1.5rem; +} +h4 { + font-size: 1.25rem; +} +h5 { + font-size: 1rem; +} +h6 { + font-size: 1rem; +} +hr { + border-bottom: 1px solid #e0e0e0; + margin-bottom: 1rem; +} +blockquote { + quotes: none; + border-left: 4px solid #e0e0e0; + background: #f5f5f5; + margin-bottom: 1rem; + padding: 0.5rem 0.5rem 0.5rem 2rem; +} +blockquote p { + margin-bottom: 0; +} +blockquote footer { + font-family: inherit; + font-size: inherit; + line-height: inherit; + text-align: inherit; + color: inherit; + background-color: inherit; + padding: 0; +} +b, +strong { + font-weight: bold; +} +em, +cite, +q { + font-style: italic; + quotes: auto; +} +sup, +sub { + position: relative; + font-size: 0.75rem; +} +sup { + top: -0.5rem; +} +sub { + bottom: -0.2rem; +} +small { + font-size: 12px; +} +acronym, +abbr { + border-bottom: 1px dotted #e0e0e0; +} +a { + transition: color 0.3s ease-in-out, background-color 0.2s ease-in-out, border-color 0.3s ease-in-out, box-shadow 0.2s ease-in-out; + border-bottom: 0px dotted #e0e0e0; + text-decoration: none; + color: #555; +} +a:hover { + border-bottom-color: transparent; +/*color: #009688;*/ +} +ul, +ol, +dl { + margin-bottom: 1rem; +} +ul { + list-style: disc; + list-style-position: inside; +} +ol { + list-style: decimal-leading-zero; + list-style-position: inside; +} +dt { + font-weight: bold; +} +table { + display: table; + table-layout: fixed; + border-collapse: collapse; + border-spacing: 0; +/*min-width: 100;*/ + margin-bottom: 1rem; +} +thead tr { + border: 1px solid #e0e0e0; + background: #f5f5f5; + font-weight: bold; +} +tbody tr { + border: 1px solid #e0e0e0; +} +tbody tr:nth-child(2n) { + background: #f5f5f5; +} +th, +td { + padding: 0.25rem 0.5rem; + border: 1px solid #e0e0e0; +/*min-width: 60px;*/ +} +img, +video, +audio { + display: block; + opacity: 1; + max-width: 100%; + width: 100%; + height: auto; + cursor: pointer; +} +code { + font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace; + font-size: 1rem; + padding: 2px 4px; + color: #555; + background: #eee; + border-radius: 3px; +} +pre { + -webkit-overflow-scrolling: touch; + font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace; + font-size: 1rem; + padding: 2px 4px; + margin-bottom: 1rem; +} +pre code { + display: block; + padding: 1rem 1.5rem; + overflow-x: auto; +} +img, +video { + display: block; + opacity: 1; + max-width: 100%; + width: 100%; + height: auto; + cursor: pointer; + margin-bottom: 1rem; +} +.video-container { + position: relative; + padding-top: cal(0.5625) rem; +/* 16:9 ratio*/ + margin-bottom: 1rem; + height: 0; + overflow: hidden; +} +.video-container iframe, +.video-container object, +.video-container embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + margin-top: 0; +} +iframe { + border: none; + margin-bottom: 1rem; +} +blockquote.colorquote { + position: relative; +} +blockquote.colorquote:before { + content: " "; + position: absolute; + top: 50%; + left: -14.5px; + margin-top: -12px; + width: 24px; + height: 24px; + border-radius: 50%; + text-align: center; + color: #fff; + background-size: 16px 16px; + background-position: 4px 4px; + background-repeat: no-repeat; +} +blockquote.colorquote.info { + border-color: #209cee; + background-color: #def0fd; +} +blockquote.colorquote.info:before { + background-color: #209cee; + background-image: url("/img/quote/info.svg"); +} +blockquote.colorquote.success { + border-color: #23d160; + background-color: #cbf6da; +} +blockquote.colorquote.success:before { + background-color: #23d160; + background-image: url("/img/quote/success.svg"); +} +blockquote.colorquote.warning { + border-color: #ffdd57; + background-color: #fff6d1; +} +blockquote.colorquote.warning:before { + background-color: #ffdd57; + background-image: url("/img/quote/warning.svg"); +} +blockquote.colorquote.danger { + border-color: #ff3860; + background-color: #ffb3c2; +} +blockquote.colorquote.danger:before { + background-color: #ff3860; + background-image: url("/img/quote/danger.svg"); +} +blockquote.pullquote { + float: right; + max-width: 50%; + font-size: 1.15rem; + position: relative; +} +@media screen and (max-width: 768px) { + blockquote.pullquote { + float: none; + max-width: 100%; + } +} +blockquote.pullquote:before { + content: " "; + position: absolute; + top: 5px; + left: 5px; + width: 3rem; + height: 3rem; + opacity: 0.1; + background: url("/img/quote/quote-left.svg") 0 0/3rem 3rem no-repeat; +} +blockquote footer cite { + font-style: normal; +} +blockquote footer cite:before { + content: "—"; + padding: 0 0.3em; +} +.caption { + display: block; + position: relative; + font-size: 0.9rem; + text-align: center; +} +.scrollbar::-webkit-scrollbar { + width: 0px; +} +.scrollbar::-webkit-scrollbar-track-piece { + background-color: #fff; +} +.scrollbar::-webkit-scrollbar-track { + background-color: #fff; +} +.scrollbar::-webkit-scrollbar-thumb { + background-color: #d4d8e2; +} +.scrollbar::-webkit-scrollbar-button { + background-color: #fff; + display: none; +} +#preloader { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + height: 100%; + width: 100%; + background-color: #f5f5f5; + z-index: 1000; +} +.pre-container { + position: absolute; + left: 50%; + top: 50%; + bottom: auto; + right: auto; + -webkit-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); + text-align: center; +} +.spinner { + width: 40px; + height: 40px; + position: relative; + margin: 100px auto; +} +.double-bounce1, +.double-bounce2 { + width: 100%; + height: 100%; + border-radius: 50%; + background-color: #222; + opacity: 0.6; + position: absolute; + top: 0; + left: 0; + -webkit-animation: bounce 2s infinite ease-in-out; + animation: bounce 2s infinite ease-in-out; +} +.double-bounce2 { + -webkit-animation-delay: -1s; + animation-delay: -1s; +} +@-webkit-keyframes bounce { + 0%, 100% { + -webkit-transform: scale(0); + } + 50% { + -webkit-transform: scale(1); + } +} +.transition { + margin: auto; + width: 100px; + text-align: center; +} +.transition>div { + width: 20px; + height: 20px; + background-color: #222; + border-radius: 100%; + display: inline-block; + -webkit-animation: bouncedelay 2s infinite ease-in-out; + animation: bouncedelay 2s infinite ease-in-out; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} +.transition .three-bounce1 { + -webkit-animation-delay: -0.32s; + animation-delay: -0.32s; +} +.transition .three-bounce2 { + -webkit-animation-delay: -0.16s; + animation-delay: -0.16s; +} +@-webkit-keyframes bouncedelay { + 0%, 80%, 100% { + -webkit-transform: scale(0); + } + 40% { + -webkit-transform: scale(1); + } +} +.cyclic { + width: 60px; + height: 60px; + margin: 0 auto; + position: relative; +} +.cyclic div { + width: 100%; + height: 100%; + position: absolute; + -webkit-animation: load 2s linear infinite; + animation: load 2s linear infinite; +} +.cyclic span { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 50%; + background-color: #222; + position: absolute; + left: 50%; + margin-top: -10px; + margin-left: -10px; +} +@-webkit-keyframes load { + 0% { + -webkit-transform: rotate(0deg); + } + 10% { + -webkit-transform: rotate(45deg); + } + 50% { + opacity: 1; + -webkit-transform: rotate(160deg); + } + 62% { + opacity: 0; + } + 65% { + opacity: 0; + -webkit-transform: rotate(200deg); + } + 90% { + -webkit-transform: rotate(340deg); + } + 100% { + -webkit-transform: rotate(360deg); + } +} +.cyclic div:nth-child(1) { + -webkit-animation-delay: 0.2s; +} +.cyclic div:nth-child(2) { + -webkit-animation-delay: 0.4s; +} +.cyclic div:nth-child(3) { + -webkit-animation-delay: 0.6s; +} +.cyclic div:nth-child(4) { + -webkit-animation-delay: 0.8s; +} +.fixbackground { +/* header Background parallax */ + background-attachment: fixed; +} +header { + position: relative; + width: 100%; + height: 100vh; + background: url("/img/pure-bg.png") repeat; + background-size: cover; + -webkit-animation-name: headerFade; + animation-name: headerFade; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} +@-webkit-keyframes headerFade { + 0% { + opacity: 1; + } + 16% { + opacity: 1; + } + 20% { + opacity: 1; + } + 22% { + opacity: 0; + } + 92% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +header .mask { + width: 100%; + height: 100vh; +/*遮罩效果*/ + background-color: rgba(0,0,0,0.08); +} +header .h-header { + position: relative; + height: 10rem; +/*font-family: Georgia, "Times New Roman", Times, serif;*/ + font-size: 1.4rem; + line-height: 3; +} +header #logo { + float: left; + padding-left: 1rem; +} +header #logo a { + border-bottom: none; + text-transform: uppercase; +} +header #logo a:hover { + color: #b8860b; +} +header #logo img { + max-width: 10rem; + max-height: 10rem; +} +header #navigation-show { + float: right; + padding-right: 1rem; +} +header #navigation-show ul { + list-style: none; +} +header #navigation-show ul li { + display: inline-block; + margin-left: 10px; +} +header #navigation-show ul li a { + opacity: 1; + border-bottom: none; +} +header #navigation-show ul li a:hover { + color: #b8860b; +} +header #navigation-show ul li .active { + border-bottom: 1px dotted #e0e0e0; + color: #b8860b; + font-weight: bold; + font-style: italic; + padding-bottom: 2px; +} +header .h-body { + text-align: center; + width: 100%; + position: relative; + clear: both; +} +header .motto { +/*font-family: Georgia, "Times New Roman", Times, serif;*/ + font-size: 1.4rem; + line-height: 2; + text-align: center; + width: 60%; + margin: 8rem auto; +} +header .motto .content { + text-align: left; +} +header .motto .author { + text-align: right; +} +header .h-footer { + width: 100%; + text-align: center; +} +header .h-footer a { + font-size: 2rem; +/*color: #fff;*/ + border-bottom: none; + position: absolute; + bottom: 5px; +} +#navigation-hide { + display: none; + position: fixed; + top: -50px; + left: 0; + right: 0; + width: 100%; + height: 50px; + background-color: #fff; + border-bottom: 1px solid #f5f5f5; + -webkit-transition: top 0.25s ease 0.5s; + transition: top 0.25s ease 0.5s; + z-index: 200; + line-height: 50px; +} +#navigation-hide p { + text-align: center; + display: none; +} +#progress-percentage { + position: fixed; + top: 0; + left: 20px; +} +#progress-percentage h1 { + font-family: "Times New Roman", Times, serif; + font-size: 1rem; +} +#progress-bar { + display: none; + position: fixed; + top: 0; + left: 0; + z-index: 100; + width: 0; + height: 2px; + background: #000; +} +.toc-switch { + position: fixed; + top: 0; + left: 80px; +} +.toc-switch span { + font-size: 1rem; + cursor: pointer; +} +.toc-switch-button-active { + color: #f70; +} +.show { + display: block; +} +.hide { + display: none; +} +@media screen and (max-width: 1024px) { + .toc-switch { + display: none; + } +} +footer { +/*font-family: Georgia, Times New Roman, Times, serif;*/ + font-size: 1rem; + line-height: 2; + text-align: center; + color: #fff; + background-color: #222; + padding-top: 2rem; + padding-bottom: 1rem; +} +footer a { + color: #fff; + text-decoration: none; + border-bottom: none; +} +footer a:hover { + color: #b8860b; +} +footer .social li { + display: inline-block; +} +footer .social li a { + padding: 10px; +} +footer .copyright p { + text-align: center; + letter-spacing: 1px; + word-spacing: 1px; +} +#totop { + position: fixed; + right: 16px; + bottom: 80px; + z-index: 5; + background: #fff; + border-radius: 50%; + cursor: pointer; +} +#tobuttom { + position: fixed; + right: 16px; + bottom: 40px; + display: none; + z-index: 5; + background: #fff; + border-radius: 50%; + cursor: pointer; +} +#tobuttom a, +#totop a { + color: #222; + background-color: transparent; + padding: 10px; + border: none; +} +@media (max-width: 768px) { + #tobuttom a, + #totop a { + display: none; + } +} +main { + width: 100%; + min-height: calc(100vh + 100px); + line-height: 2; +} +.layout-cart { + position: relative; + margin: 0em auto; + padding: 5em 0; +} +.layout-cart .post { + position: relative; + margin: 50px auto; + width: 1200px; +} +.layout-cart .post a { + border-bottom: none; +} +.layout-cart .post>a { + position: relative; + width: 680px; + height: 440px; + display: inline-block; + overflow: hidden; + background: #fff; + z-index: 2; +} +.layout-cart .post>a img { + width: 100%; + height: 100%; + position: relative; +} +.layout-cart .post-cover { + overflow: hidden; +} +.layout-cart .post-text { + position: absolute; + top: 20px; + height: 398px; + width: 498px; + border: 1px solid #e0e0e0; + background: #fff; + text-align: left; +} +.layout-cart .post:nth-child(odd) { + text-align: left; +} +.layout-cart .post:nth-child(even) { + text-align: right; +} +.layout-cart .post:nth-child(odd) .post-text { + left: 660px; +} +.layout-cart .post:nth-child(even) .post-text { + right: 660px; +} +.layout-cart .post-text .post-time { + color: #999; + font-size: 12px; + margin: 80px 0 0 80px; +} +.layout-cart .post-text .post-title { +/*font-family: Georgia, Times New Roman, Times, serif;*/ + font-size: 1.2rem; + font-weight: normal; + line-height: 1.5; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin: 10px 100px 0 80px; +} +.layout-cart .post-text .post-title a { + color: #222; +} +.layout-cart .post-text .post-content { + text-align: justify; + line-height: 2; + color: #555; + word-spacing: 2px; + letter-spacing: 0px; + word-break: break-word; + margin: 10px 100px 0 80px; +} +.layout-cart .post-text .post-meta { + position: absolute; + left: 80px; + bottom: 60px; + font-size: 12px; + color: #999; +} +.layout-cart .post-text .post-meta span { + margin-right: 16px; +} +.layout-pure { +/*For people who likes pure style*/ + width: 60%; + height: auto; + margin: 0em auto; + padding: 5em 0; +} +.layout-pure .post { + width: 100%; + margin-bottom: 3.5em; + display: flex; + justify-content: center; +} +.layout-pure .post a { + border-bottom: none; +} +.layout-pure .post>.post-text { + width: 100%; + opacity: 1; + padding: 0; + margin: 0; + display: block; + border-bottom: 1px solid #e0e0e0; +} +.layout-pure .post .post-text .post-title { +/*font-family: Georgia, Times New Roman, Times, serif;*/ + font-size: 1.5rem; + line-height: 1.5; + text-align: left; + min-height: 20px; + margin: 0 0 0.1em 0; + padding: 0 0 0.1em 0; +} +.layout-pure .post .post-text .post-title a { + border-bottom: 0px; +} +.layout-pure .post .post-text .post-content { + text-align: justify; + line-height: 2; + word-spacing: 2px; + word-break: break-word; +} +.layout-pure .post .post-text .post-meta { + min-height: 20px; + padding: 0; + margin: 10px 0; + color: #999; +} +.layout-pure .post .post-text .post-meta a { + color: #999; +} +.layout-pure .post .post-text .post-meta span { + margin-right: 16px; +} +.layout-pure .post .post-text .post-meta span>i { + color: #999; +} +.layout-pure .post .post-text .post-meta .right { + float: right; +} +#pagination { +/*Load more posts*/ + text-align: center; + margin-top: 5em; + min-height: 50px; +} +#pagination a { + font-size: 1rem; + color: #555; + text-align: center; + letter-spacing: 2px; + transition: none; + border-bottom: none; + display: inline-block; + cursor: pointer; +} +#pagination a:hover { + color: #4183c4; +} +.pagination-2 { + display: block; + list-style: none; + padding: 2em 0 0.5em; +} +.pagination-2 li { + display: inline-block; +} +.pagination-2 li a { + border-bottom: 0px dotted #e0e0e0; +} +.pagination-2 li a:hover { + border-bottom: 1px dotted #e0e0e0; +} +.pagination-2-prev { + float: left; +} +.pagination-2-next { + float: right; +} +.layout-gallery { + width: 96%; + margin: 0em auto; + padding: 4em 0; + border: 1px solid transparent; + background-color: #fff; +} +.annie-animation-zoom { +/*For one div: Zoom from 0 to 1!*/ + display: none; + -webkit-animation: zoom 0.8s; + animation: zoom 0.8s; +} +@-webkit-keyframes zoom { + from { + -webkit-transform: scale(0); + } + to { + -webkit-transform: scale(1); + } +} +.body-fixed { + overflow: hidden; +} +@-moz-keyframes bounce { + 0%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 50% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-webkit-keyframes bounce { + 0%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 50% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-o-keyframes bounce { + 0%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 50% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@keyframes bounce { + 0%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 50% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-moz-keyframes bouncedelay { + 0%, 80%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 40% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-webkit-keyframes bouncedelay { + 0%, 80%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 40% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-o-keyframes bouncedelay { + 0%, 80%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 40% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@keyframes bouncedelay { + 0%, 80%, 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 40% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-moz-keyframes headerFade { + 0% { + opacity: 1; + } + 16% { + opacity: 1; + } + 20% { + opacity: 1; + } + 22% { + opacity: 0; + } + 92% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-webkit-keyframes headerFade { + 0% { + opacity: 1; + } + 16% { + opacity: 1; + } + 20% { + opacity: 1; + } + 22% { + opacity: 0; + } + 92% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes headerFade { + 0% { + opacity: 1; + } + 16% { + opacity: 1; + } + 20% { + opacity: 1; + } + 22% { + opacity: 0; + } + 92% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes headerFade { + 0% { + opacity: 1; + } + 16% { + opacity: 1; + } + 20% { + opacity: 1; + } + 22% { + opacity: 0; + } + 92% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@-webkit-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@-o-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +.nav-trigger { + position: fixed; + top: 0px; + right: 16px; + height: 44px; + width: 44px; + z-index: 100; + border-bottom: none; + display: none; + cursor: pointer; +} +.nav-trigger span { + position: absolute; + left: 50%; + top: 50%; + bottom: auto; + right: auto; + width: 32px; + height: 3px; + background-color: #000; + -webkit-transform: translateX(-50%) translateY(-50%); + -moz-transform: translateX(-50%) translateY(-50%); + -ms-transform: translateX(-50%) translateY(-50%); + -o-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); +} +.nav-trigger span::before, +.nav-trigger span:after { + content: ''; + position: absolute; + top: 0; + right: 0; + width: 100%; + height: 100%; + background-color: inherit; +/* Force Hardware Acceleration in WebKit */ + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -ms-transform: translateZ(0); + -o-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.2s, width 0.2s; + -moz-transition: -moz-transform 0.2s, width 0.2s; + transition: transform 0.2s, width 0.2s; +} +.nav-trigger span::before { + -webkit-transform-origin: right top; + -moz-transform-origin: right top; + -ms-transform-origin: right top; + -o-transform-origin: right top; + transform-origin: right top; + -webkit-transform: translateY(-10px); + -moz-transform: translateY(-10px); + -ms-transform: translateY(-10px); + -o-transform: translateY(-10px); + transform: translateY(-10px); +} +.nav-trigger span::after { + -webkit-transform-origin: right bottom; + -moz-transform-origin: right bottom; + -ms-transform-origin: right bottom; + -o-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: translateY(10px); + -moz-transform: translateY(10px); + -ms-transform: translateY(10px); + -o-transform: translateY(10px); + transform: translateY(10px); +} +.nav-close { + position: absolute; + top: 20px; + right: 16px; + bottom: auto; + height: 44px; + width: 44px; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); +} +.nav-close::after, +.nav-close::before { + content: ''; + position: absolute; + left: 50%; + top: 50%; + height: 3px; + width: 32px; + background-color: #5c4b51; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.nav-close::after { + -webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg); + -moz-transform: translateX(-50%) translateY(-50%) rotate(45deg); + -ms-transform: translateX(-50%) translateY(-50%) rotate(45deg); + -o-transform: translateX(-50%) translateY(-50%) rotate(45deg); + transform: translateX(-50%) translateY(-50%) rotate(45deg); +} +.nav-close::before { + -webkit-transform: translateX(-50%) translateY(-50%) rotate(-45deg); + -moz-transform: translateX(-50%) translateY(-50%) rotate(-45deg); + -ms-transform: translateX(-50%) translateY(-50%) rotate(-45deg); + -o-transform: translateX(-50%) translateY(-50%) rotate(-45deg); + transform: translateX(-50%) translateY(-50%) rotate(-45deg); +} +.nav-container { + position: fixed; + top: 0; + right: 0; + width: 100%; + height: 100%; + z-index: 200; + background-color: #fff; + background-color: #f5f5f5; + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -ms-transform: translateZ(0); + -o-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transform: translateX(100%); + -moz-transform: translateX(100%); + -ms-transform: translateX(100%); + -o-transform: translateX(100%); + transform: translateX(100%); + -webkit-transition: -webkit-transform 0.4s 0s, box-shadow 0s 0.4s; + -moz-transition: -moz-transform 0.4s 0s, box-shadow 0s 0.4s; + transition: transform 0.4s 0s, box-shadow 0s 0.4s; +} +.nav-container a { + border-bottom: none; +} +.nav-container.is-visible { + -webkit-transform: translateX(0); + -moz-transform: translateX(0); + -ms-transform: translateX(0); + -o-transform: translateX(0); + transform: translateX(0); + -webkit-overflow-scrolling: touch; + box-shadow: -4px 0 30px rgba(0,0,0,0.2); + -webkit-transition: -webkit-transform 0.4s 0s, box-shadow 0s 0s; + -moz-transition: -moz-transform 0.4s 0s, box-shadow 0s 0s; + transition: transform 0.4s 0s, box-shadow 0s 0s; +} +.nav-container .nav-header { + height: 10rem; + position: relative; +} +.nav-container .nav-header h3 { + font-family: "Lora", serif; + font-size: 1.6rem; + font-weight: bold; + color: #555; + text-transform: uppercase; + padding: 16px; +} +.nav-container .nav-body { + padding: 2em 0; + text-align: center; +} +.nav-container .nav-body ul { + list-style: none; + margin: 0.2em 0; +} +.nav-container .nav-body ul li { + display: inline-block; + margin: 1em; +} +.nav-container .nav-body li a { + font-size: 1.5rem; + color: #555; +} +.nav-container .nav-body li a:hover { + color: #b8860b; +} +.nav-container .nav-footer { + width: 100%; + text-align: center; +} +.nav-container .nav-footer ul { + text-align: center; + margin: 0.2em 0; + padding: 1.6em; +} +.nav-container .nav-footer li { + display: inline-block; + margin: 1em; +} +.nav-container .nav-footer li a { + font-size: 1.5em; + padding: 0.2em; + color: #555; +} +.nav-container .nav-footer li a:hover { + color: #b8860b; +} +.layout-archive { + width: 70%; + margin: 0em auto; + padding: 4em 0; + border: 1px solid transparent; + background-color: #fff; +} +.layout-archive i { + color: #f00; + letter-spacing: 2px; + margin: 60px 0; +} +.layout-archive a { + border-bottom: 0px dotted #e0e0e0; +} +.layout-archive .i-container { + text-align: center; +} +#layout-archive-year { + margin-top: 2rem; + text-align: left; + width: 100%; + display: none; +} +#layout-archive-year ul { + list-style: none; + padding-left: 0rem; + transition: height 0.5s; + padding: 0px; + border: none; +} +#layout-archive-year ul li { + height: 44px; + border-bottom: 1px dashed #e0e0e0; + line-height: 44px; + font-size: 1rem; + padding-left: 0px; + overflow: hidden; + margin: 0px; +} +#layout-archive-year ul li em { + font-style: normal; + margin-right: 10px; + line-height: 10px; + margin-top: 10px; + padding: 5px 8px; + background: #eaeaea; + color: #999; +} +#layout-archive-year h3 { + cursor: pointer; + text-align: center; + background-color: #808080; + padding: 10px 0px; + margin-top: 2rem; + color: #fff; + transition: all 0.5s; +} +#layout-archive-year a { + background: none; +} +#layout-archive-year h3 em { + font-size: 0.5em; + position: absolute; + margin-top: -10px; +} +#layout-archive-year .title-bg { + background-color: #808080; +} +#layout-archive-year h3:hover { + background-color: #696969; +} +#layout-archive-year ul li:hover { + background: #f7f9fa; +} +#layout-archive-year ul li:hover em { + font-style: normal; + margin-right: 10px; + line-height: 10px; + margin-top: 10px; + padding: 5px 8px; + background: #f44336; + color: #f7f9fa; +} +#layout-archive-year li a { + text-decoration: none; +} +#layout-archive-year li .tag { + font-style: normal; + margin-right: 0px; + line-height: 10px; + margin-top: 10px; + padding: 8px 8px; + background: #eaeaea; + color: #999; + float: right; +} +#layout-archive-year li a:hover { + color: #f00; +} +#layout-archive-month ul { +/*Archive by month*/ + list-style: none; + padding-left: 0rem; + transition: height 0.5s; + padding: 0px; + border: none; +} +#layout-archive-month ul li { + height: 44px; + border-bottom: 1px dashed #e0e0e0; + line-height: 44px; + font-size: 1rem; + padding-left: 0x; + overflow: hidden; + margin: 0px; +} +#layout-archive-month ul li em { + font-style: normal; + margin-right: 10px; + line-height: 10px; + margin-top: 10px; + padding: 5px 8px; + background: #eaeaea; + color: #999; +} +#layout-archive-month h3 { + cursor: auto; + text-align: center; + background-color: #808080; + padding: 10px 0px; + color: #fff; + transition: all 0.5s; +} +#layout-archive-month h3>a { + color: #fff; + border-bottom: 0px dotted #d3d3d3; +} +#layout-archive-month { + margin-top: 0rem; + text-align: left; + max-width: 100%; +} +#layout-archive-month a { + background: none; +} +#layout-archive-month h3 em { + font-size: 0.5em; + position: absolute; + margin-top: -10px; +} +#layout-archive-month .title-bg { + background-color: #808080; +} +#layout-archive-month h3:hover { + background-color: #696969; +} +#layout-archive-month ul li:hover { + background: #f7f9fa; +} +#layout-archive-month ul li:hover em { + font-style: normal; + margin-right: 10px; + line-height: 10px; + margin-top: 10px; + padding: 5px 8px; + background: #f44336; + color: #f7f9fa; +} +#layout-archive-month li a { + text-decoration: none; +} +#layout-archive-month li .tag { + font-style: normal; + margin-right: 0px; + line-height: 10px; + margin-top: 10px; + padding: 8px 8px; + background: #eaeaea; + color: #999; + float: right; +} +#layout-archive-month li a:hover { + color: #f00; +} +.layout-page-container { + width: 70%; + margin: 0em auto; + padding: 4em 0; + border: 1px solid transparent; + background-color: #fff; +} +.layout-page-header { + text-align: center; +} +.layout-page-header i { + color: #f00; + letter-spacing: 2px; + text-align: inherit; + margin: 60px 0 60px 0; +} +.category { + width: 100%; +} +.category-list { + width: 100%; + overflow: overlay; + padding: 0; + text-align: center; +} +.category-list li { + font-size: 1rem; + display: inline-flex; + padding: 6px; + margin-right: 10px; + margin-bottom: 10px; +} +.category-list li:hover { + color: #f00; +} +.category-list a { + padding-bottom: 0.2em; +} +.category-list a:hover { + color: #f00; + padding-bottom: 0.2em; +} +.category-list-count { + font-size: 0.9rem; + margin-left: 2px; +} +.tags { + width: 100%; + text-align: center; +} +.tags a { + margin-right: 10px; + line-height: 2; +} +.layout-TCP-container { + width: 100%; +} +#TCP-title { + width: 70%; + text-align: left; + padding: 5px; + margin: 0em auto; +} +#TCP-content { + min-height: 500px; +} +.TCP-content { + -webkit-animation: zoom 0.8s; + animation: zoom 0.8s; +} +@-webkit-keyframes zoom { + from { + -webkit-transform: scale(0); + } + to { + -webkit-transform: scale(1); + } +} +.about { + width: 100%; + min-height: 100vh; + margin: 0em auto; + border: 1px solid transparent; +} +@-moz-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@-webkit-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@-o-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +.layout-post { + width: 60%; + margin: 0em auto; + padding: 5em 0; + border: 1px solid transparent; + background-color: #fff; +} +#layout-post { +/*font-family: Ovo,Georgia,STZhongsong,"Microsoft YaHei",serif;*/ + font-size: 1rem; + line-height: 2; +} +.article-title { + font-size: 2rem; + color: #333; +} +.article-title a { + border-bottom: 0; +} +.article-meta { + color: #999; + margin: 1em 0 2em; +} +.article-meta a { + border-bottom: 0; + color: #999; +} +.article-meta span { + padding: 0.4em; +} +.article-content a { + color: #4183c4; +} +.article-content a:hover { + border-bottomc: 1px dashed #4183c4; +} +.article-content>table { + display: table; + table-layout: fixed; + border-collapse: collapse; + border-spacing: 0; + min-width: 100%; + margin-bottom: 1rem; +} +.article-content>table thead tr { + border: 1px solid #e0e0e0; + background: #f5f5f5; + font-weight: bold; +} +.article-content>table tbody tr { + border: 1px solid #e0e0e0; +} +.article-content>table tbody tr:nth-child(2n) { + background: #f5f5f5; +} +.article-content>table th, +.article-content>table td { + padding: 0.25rem 0.5rem; + min-width: 60px; + border: 1px solid #e0e0e0; +} +.investment-container { + width: 100%; + margin: 6em auto 2em; +} +.investment-container .investment-header { + display: flex; + justify-content: center; + margin: 0.5em auto; +} +.investment-container .investment-header .investment-title-1 { + height: auto; + width: 50%; + overflow: hidden; +} +.investment-container .investment-header .investment-title-2 { + height: auto; + width: 50%; + overflow: hidden; +} +.investment-title-1 div { + width: auto; + height: auto; + color: #555; + float: left; + margin-right: 6px; + margin-left: 1px; + text-align: center; + cursor: pointer; +} +.investment-title-2>span { + width: auto; + height: auto; + color: #555; + float: right; + margin-right: 1px; + margin-left: 6px; + text-align: center; + cursor: pointer; +} +.investment-title-2>span a { + margin: 0 4px; +} +.investment-title-1 a, +.investment-title-1 a:link, +.investment-title-1 a:visited, +.investment-title-1 a:hover { + color: #555; + width: 131px; + height: auto; + display: inline-block; +} +.investment-title-1 div.on a, +.investment-title-1 div.on a:link, +.investment-title-1 div.on a:visited, +.investment-title-1 div.on a:hover { + color: #f70; +} +.investment-title-1 div.on { + color: #f70; +} +.investment-content { + clear: both; + border-top: 1px solid #ededed; + padding: 0; + min-height: 500px; +} +.investment-content-list { + display: none; + -webkit-animation: zoom 0.8s; + animation: zoom 0.8s; +} +@-webkit-keyframes zoom { + from { + -webkit-transform: scale(0); + } + to { + -webkit-transform: scale(1); + } +} +.relate-post { +/*font-family: inherit;*/ +/*line-height: 2;*/ + font-size: 1rem; +} +.relate-post ul { + width: 100%; + margin: 0 auto; + padding: 2px; +} +.relate-post ul:first-child { + margin-top: 4px; +} +.relate-post ul li { + display: inline-table; + width: 100%; + margin-bottom: 2px; + padding: 0.5em 0; + border-bottom: 1px solid #e8e8e8; + clear: both; +} +.relate-post .relate-post-text { + display: inline-block; + width: 70%; + vertical-align: top; + clear: right; +} +.relate-post .relate-post-text p { + margin-bottom: 0; +} +.relate-post .relate-post-text .relate-post-title { + font-size: 1.3rem; +} +.relate-post .relate-post-text .relate-post-date { + font-size: 0.8rem; +} +.relate-post .relate-post-text .relate-post-content { + font-size: 1rem; +} +.relate-post .relate-post-cover { + display: inline-block; + width: 27%; + vertical-align: top; + float: right; + overflow: hidden; +} +.relate-post .relate-post-cover img { + margin-bottom: 0; + position: relative; +} +.layout-pure .leancloud_likes, +.layout-cart .leancloud_likes, +.layout-post .leancloud_likes { + cursor: pointer; +} +.layout-post .leancloud_likes:hover, +.layout-post .leancloud_likes:focus { + color: #f00; +} +.heartAnimation { + color: #f00; +} +@-moz-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@-webkit-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@-o-keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +@keyframes zoom { + from { + transform: scale(0); + } + to { + transform: scale(1); + } +} +.layout-toc { + position: relative; + width: 24%; +} +#layout-toc { + display: none; + line-height: 1; +} +.inline-flex { + display: inline-flex; +} +.k-catelog-list { + width: 24%; + height: calc(100vh - 50px); + padding-left: 16px; + top: 50px; + overflow: hidden; + border-right: 1px solid #e0e0e0; + display: none; +} +.k-catelog-list>ul { + padding: 0; + margin: 0; + list-style: none; +} +.k-catelog-list li { + width: 100%; +} +.k-catelog-list li ul { +/*Exampl: h6 对于 h5的层级边距*/ + padding-left: 10px; + margin: 0; + list-style: none; +} +.k-catelog-link { + cursor: pointer; + display: block; + padding: 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + text-decoration: none; + transition: background 0.5s; + -moz-transition: background 0.5s; + -webkit-transition: background 0.5s; + -o-transition: background 0.5s; +} +.k-catelog-link-active { + color: #f00; + border-right: 1px solid #f00; +} +.layout-comment { + line-height: inherit; + margin-top: 1em; +} +.layout-comment a { + border-bottom: none; +} +.gt-container .gt-header-comment { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + margin-left: 0; +} +.gt-container .gt-header-textarea { + min-height: 8.125em; + max-height: 15em; +} +.gt-container .gt-avatar-github { + display: none; +} +.gt-container .gt-avatar.gt-header-avatar { + display: none; +} +.gt-container .gt-no-init { + padding: 1.25em 0; + text-align: center; +} +.gt-container .gt-no-init>p { + text-align: center; +} +.gt-container .gt-meta { + margin: 0 0; + padding: 1em 0; + position: relative; + border-bottom: 0px solid #e9e9e9; + font-size: 1em; +} +.gt-container .gt-popup { + position: absolute; + right: 0; + top: 3.2em; + background: #fff; + display: inline-block; + border: 1px solid #e9e9e9; + padding: 0.625em 0; + font-size: 0.875em; + letter-spacing: 0.5px; +} +.gt-container .gt-popup .gt-action.is--active:before { + content: ''; + width: 0.25em; + height: 0.25em; + background: #6190e8; + position: absolute; + left: 0.5em; + top: 1.2375em; +} +.valine .vwrap { + overflow: hidden; + position: relative; + border: 1px solid #ededed; + cursor: pointer; +} +.valine img { + display: inline-block; +} +.valine .vlist .vcard .vfooter .vat { + background: transparent; + color: #fff; + padding: 0.2em 1em; + line-height: 1.6; + cursor: pointer; + word-break: keep-all; + text-transform: uppercase; + display: inline-block; +/*display: inline-block; fix button ‘回复’ display on Firefox*/ +} +.layout-share { + line-height: inherit; + margin-top: 1em; +} +.local-search-popup { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: none; + color: #333; + background-color: #fff; + z-index: 1000; + border-radius: 5px; + overflow: auto; +} +.local-search-container { + position: relative; +} +.local-search-header { + width: 100%; + padding: 1em 0em; + background-color: #fff; +} +.local-search-header .input-prompt { + height: 100px; +} +.local-search-header #local-search-input { + display: block; + width: 64%; + margin: 0 auto; + padding: 0.5em 0.1em; + outline: none; + border: none; + border-bottom: 1px solid #e0e0e0; + font-size: 1.2rem; + text-align: center; +} +.body-fixed { + overflow: hidden; +} +.input-fixed { + position: fixed; + top: 0; + left: 18%; + z-index: 100; +} +.local-search-body { + width: 100%; + padding: 1em 0em; + background-color: #fff; +} +.local-search-body #local-search-output { + width: 60%; + margin: 0 auto; + padding: 2em 0; +} +.search-result-number { + font-family: serif; + font-size: 1rem; + font-weight: bold; + text-align: right; + color: #333; +} +.search-result-list { + list-style: none; + padding: 0em; + -webkit-animation: fadein 2s linear forwards; + animation: fadein 2s linear forwards; +} +@-webkit-keyframes fadein { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.search-result-list>li { + margin-bottom: 1.5em; + border-bottom: 1px solid #e0e0e0; + transition: all ease 0.3s; +} +.search-result-list>li:hover { + border-bottom: 1px solid #555; +} +.search-keyword { + font-weight: bold; + color: #c00; + border-bottom: 1px dashed #f00; +} +.search-result-title { + font-size: 1.2rem; + font-weight: bold; + line-height: 2; + border-bottom: none; +} +.search-result-content { + font-size: 1rem; + line-height: 2; + display: block; + margin: 0em; +} +#no-result { + text-align: right; + color: #ccc; +} +.local-search-footer { + width: 100%; + padding: 4em 0em; + background-color: #fff; +} +.local-search-footer .topN-post { + width: 60%; + margin: 0em auto; + padding: 1em 0; +} +.topN-post-list { + list-style: none; + line-height: 2; + margin: 0; + padding: 0em 0.2em; + overflow: hidden; +} +.topN-post-item { + clear: both; + margin: 10px 0; + border-bottom: 1px solid #e0e0e0; +} +.item-topNumber { + margin-right: 10px; + font-family: Georgia, "Times New Roman", Times, serif; + color: #333; +} +.item-title { + border-bottom: none; +} +.item-visitors { + float: right; +} +@media (min-width: 1025px) { + .popup-btn-close { + position: fixed; + top: 2em; + left: 2em; + border: 1px solid #151515; + padding: 0.4em 0.8em; + border-radius: 8px; + cursor: pointer; + transition: all ease 0.3s; + z-index: 200; + } + .popup-btn-close:hover { + background: #151515; + opacity: 0.9; + color: #fff; + } +} +@media (max-width: 1024px) { + .local-search-header #local-search-input { + width: 84%; + } + .input-fixed { + left: 8%; + } + .local-search-body #local-search-output { + width: 80%; + } + .local-search-footer .topN-post { + width: 80%; + } + .popup-btn-close { + font-size: 0; + position: fixed; + right: 20px; + bottom: 50px; + width: 50px; + height: 50px; + z-index: 100; + background: #fff; + border-radius: 50%; + box-shadow: 1px 1px 5px #888; + cursor: pointer; + } + .popup-btn-close::after { + content: '←'; + color: #222; + position: absolute; + top: 0; + left: 0; + font-size: 20px; + width: 100%; + height: 100%; + line-height: 50px; + text-align: center; + } + #no-result { + color: #ccc; + font-size: 1rem; + } +} +@media (max-width: 768px) { + .local-search-header #local-search-input { + width: 96%; + } + .input-fixed { + left: 2%; + } + .local-search-body #local-search-output { + width: 92%; + } + .local-search-footer .topN-post { + width: 92%; + display: none; + } +} +@-moz-keyframes fadein { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-webkit-keyframes fadein { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadein { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadein { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.copy-nav { + position: relative; + display: flex; + display: -webkit-flex; + align-items: center; + margin-bottom: 0px; + color: #666; + background: #292929; +} +.copy-nav:before { + content: " "; + background: #fc625d; + width: 12px; + height: 12px; + -webkit-border-radius: 50%; + border-radius: 50%; + -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; + box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; + position: absolute; + left: 10px; +} +.copy-nav .code-language { + font-style: italic; + margin-left: 82px; + text-transform: uppercase; +} +.copy-nav .copy-btn { + position: absolute; + right: 5px; + opacity: 1; + transition: opacity 0.3s ease-in-out; + cursor: pointer; +} +.copy-nav .copy-status { + color: #ffa500; +} +pre, +.highlight { + overflow: auto; +/*margin: 20px 0;*/ + margin-bottom: 1rem; + padding: 0; + font-size: 14px; + color: #eaeaea; + background: #000; + line-height: 1.6; +} +pre, +code { + font-family: "Consolas", "Microsoft Jhenghei", "Hiragino Sans GB", "Microsoft YaHei"; + word-spacing: normal; +} +code { + padding: 2px 4px; + color: #555; + background: #eee; + border-radius: 3px; + font-size: 14px; +} +pre { + padding: 10px; +} +pre code { + padding: 0; + color: #eaeaea; + background: none; + text-shadow: none; +} +.highlight { + border-radius: 1px; +} +.highlight pre { + border: none; + margin: 0; + padding: 10px 0; +} +.highlight table { + margin: 0; + width: auto; + border: none; + border-collapse: separate; +} +.highlight td { + border: none; + padding: 0; +} +.highlight figcaption { + font-size: 1em; + line-height: 1em; + margin-bottom: 1em; + margin: 0em; + padding: 0.5em; + padding-left: 10px; + color: #666; + background: #292929; + border-bottom: 0px solid #e9e9e9; +} +.highlight figcaption a { + float: right; + color: #eaeaea; +} +.highlight figcaption a:hover { + border-bottom-color: #eaeaea; +} +.highlight .gutter pre { + padding-left: 10px; + padding-right: 10px; + color: #666; + text-align: right; + background-color: #292929; +} +.highlight .code pre { + width: 100%; + padding-left: 10px; + padding-right: 10px; + background-color: #000; +} +.highlight .line { + height: 20px; +} +.gutter { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.gist table { + width: auto; +} +.gist table td { + border: none; +} +pre .deletion { + background: #800000; +} +pre .addition { + background: #008000; +} +pre .meta { + color: #c397d8; +} +pre .comment { + color: #969896; +} +pre .variable, +pre .attribute, +pre .tag, +pre .name, +pre .regexp, +pre .ruby .constant, +pre .xml .tag .title, +pre .xml .pi, +pre .xml .doctype, +pre .html .doctype, +pre .css .id, +pre .css .class, +pre .css .pseudo { + color: #d54e53; +} +pre .number, +pre .preprocessor, +pre .built_in, +pre .builtin-name, +pre .literal, +pre .params, +pre .constant, +pre .command { + color: #e78c45; +} +pre .ruby .class .title, +pre .css .rules .attribute, +pre .string, +pre .symbol, +pre .value, +pre .inheritance, +pre .header, +pre .ruby .symbol, +pre .xml .cdata, +pre .special, +pre .formula { + color: #b9ca4a; +} +pre .title, +pre .css .hexcolor { + color: #70c0b1; +} +pre .function, +pre .python .decorator, +pre .python .title, +pre .ruby .function .title, +pre .ruby .title .keyword, +pre .perl .sub, +pre .javascript .title, +pre .coffeescript .title { + color: #7aa6da; +} +pre .keyword, +pre .javascript .function { + color: #c397d8; +} +@media screen and (max-width: 1280px) { + .layout-cart .post { + width: 1024px; + } + .layout-cart .post>a { + width: 545px; + height: 340px; + } + .layout-cart .post-text { + top: 10px; + width: 475px; + height: 310px; + } + .layout-cart .post:nth-child(odd) .post-text { + left: 512px; + } + .layout-cart .post:nth-child(even) .post-text { + right: 512px; + } + .layout-cart .post-text .post-time { + font-size: 12px; + margin: 50px 0 0 60px; + } + .layout-cart .post-text .post-title { + font-size: 24px; + margin: 10px 60px 0 60px; + } + .layout-cart .post-text .post-content { + margin: 10px 60px 0 60px; + } + .layout-cart .post-text .post-meta { + position: absolute; + left: 60px; + bottom: 10px; + } +} +@media screen and (max-width: 1024px) { + .layout-cart .post { + width: 1000px; + } + .layout-cart .post>a { + width: 530px; + height: 320px; + } + .layout-cart .post-text { + top: 10px; + width: 460px; + height: 300px; + } + .layout-cart .post:nth-child(odd) .post-text { + left: 500px; + } + .layout-cart .post:nth-child(even) .post-text { + right: 500px; + } + .layout-cart .post-text .post-time { + font-size: 12px; + margin: 50px 0 0 60px; + } + .layout-cart .post-text .post-title { + font-size: 24px; + margin: 10px 60px 0 60px; + } + .layout-cart .post-text .post-content { + margin: 10px 60px 0 60px; + } + .layout-cart .post-text .post-meta { + position: absolute; + left: 60px; + bottom: 10px; + } +} +@media screen and (max-width: 1000px) { + .layout-cart .post { + width: 90%; + background: #fff; + border-bottom: 1px solid #eaeaea; + } + .layout-cart .post>a { + width: 100%; + height: auto; + margin: 0 auto; + display: block; + } + .layout-cart .post>a img { + margin: 0 auto; + } + .layout-cart .post-text { + position: static; + width: 100%; + height: auto; + margin: 0 auto; + background: transparent; + border: none; + } + .layout-cart .post-text .post-time { + margin: 10px 0; + } + .layout-cart .post-text .post-title { + font-size: 24px; + margin: 10px 0; + } + .layout-cart .post-text .post-content { + margin: 10px 0; + } + .layout-cart .post-text .post-meta { + position: static; + margin: 10px 0; + } +} +@media screen and (max-width: 1000px) { + .layout-cart .post { + width: 96%; + } +} +@media screen and (max-width: 1024px) { + header .motto { + width: 80%; + } + .layout-pure { + width: 70%; + } + .layout-archive { + width: 80%; + } + .layout-page-container { + width: 80%; + } + #TCP-title { + width: 80%; + } + .layout-post { + width: 80%; + } + .k-catelog-list { + display: none; + visibility: hidden; + } + .relate-post .relate-post-text { + width: 60%; + } + .relate-post .relate-post-cover { + width: 37%; + } +} +@media screen and (max-width: 768px) { + header .motto { + width: 90%; + } + header #logo { + margin: auto calc((100% - 10rem) / 2); + } + header #navigation-show { + clear: both; + text-align: center; + float: none; + } + .layout-cart { + width: 90%; + height: auto; + } + .layout-pure { + width: 90%; + } + .layout-archive { + width: 90%; + } + .layout-page-container { + width: 90%; + } + #TCP-title { + width: 90%; + } + .layout-post { + width: 90%; + } + .relate-post .relate-post-text { + width: 100%; + } + .relate-post .relate-post-cover { + display: none; + } +} +@media screen and (max-width: 640px) { + header .motto { + display: none; + } + .layout-pure .post-meta .right { + display: none; + } + .layout-archive { + width: 95%; + } + .layout-page-container { + width: 95%; + } + #TCP-title { + width: 95%; + } + .layout-post { + width: 95%; + } + #navigation-hide p { + text-align: left; + margin-left: 0.9em; + width: 80%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + #progress-percentage h1 { + display: none; + } + .investment-title-2>span a { + margin: 0px 2px; + } + .investment-title-2>span a:first-child { + display: none; + } +} diff --git a/css/comment.css b/css/comment.css new file mode 100644 index 0000000..3cca873 --- /dev/null +++ b/css/comment.css @@ -0,0 +1,83 @@ +.layout-comment { + line-height: inherit; + margin-top: 1em; +} +.layout-comment a { + border-bottom: none; +} +/* gitalk details */ +.gt-container .gt-header-comment { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + margin-left: 0; +} +.gt-container .gt-header-textarea { + min-height: 8.125em; + max-height: 15em; +} +.gt-container .gt-avatar-github { + display: none; +} +.gt-container .gt-avatar.gt-header-avatar { + display: none; +} +.gt-container .gt-no-init { + padding: 1.25em 0; + text-align: center; +} +.gt-container .gt-no-init>p { + text-align: center; +} +.gt-container .gt-meta { + margin: 0 0; + padding: 1em 0; + position: relative; + border-bottom: 0px solid #e9e9e9; + font-size: 1em; +} +.gt-container .gt-popup { + position: absolute; + right: 0; + top: 3.2em; + background: #fff; + display: inline-block; + border: 1px solid #e9e9e9; + padding: 0.625em 0; + font-size: 0.875em; + letter-spacing: 0.5px; +} +.gt-container .gt-popup .gt-action.is--active:before { + content: ''; + width: 0.25em; + height: 0.25em; + background: #6190e8; + position: absolute; + left: 0.5em; + top: 1.2375em; +} +/* vline details */ +.valine .vwrap { + overflow: hidden; + position: relative; + border: 1px solid #ededed; + cursor: pointer; +} +.valine img { + display: inline-block; +} +.valine .vlist .vcard .vfooter .vat { + background: transparent; + color: #fff; + padding: 0.2em 1em; + line-height: 1.6; + cursor: pointer; + word-break: keep-all; + text-transform: uppercase; + display: inline-block; +/*display: inline-block; fix button ‘回复’ display on Firefox*/ +} +.layout-share { + line-height: inherit; + margin-top: 1em; +} diff --git a/css/fonts/FontAwesome.otf b/css/fonts/FontAwesome.otf deleted file mode 100644 index 8b0f54e..0000000 Binary files a/css/fonts/FontAwesome.otf and /dev/null differ diff --git a/css/fonts/fontawesome-webfont.eot b/css/fonts/fontawesome-webfont.eot deleted file mode 100644 index 7c79c6a..0000000 Binary files a/css/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/css/fonts/fontawesome-webfont.svg b/css/fonts/fontawesome-webfont.svg deleted file mode 100644 index 45fdf33..0000000 --- a/css/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/css/fonts/fontawesome-webfont.ttf b/css/fonts/fontawesome-webfont.ttf deleted file mode 100644 index e89738d..0000000 Binary files a/css/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/css/fonts/fontawesome-webfont.woff b/css/fonts/fontawesome-webfont.woff deleted file mode 100644 index 8c1748a..0000000 Binary files a/css/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/css/images/banner.jpg b/css/images/banner.jpg deleted file mode 100644 index b963e06..0000000 Binary files a/css/images/banner.jpg and /dev/null differ diff --git a/css/style.css b/css/style.css deleted file mode 100644 index 0cfa2d3..0000000 --- a/css/style.css +++ /dev/null @@ -1,1374 +0,0 @@ -body { - width: 100%; -} -body:before, -body:after { - content: ""; - display: table; -} -body:after { - clear: both; -} -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-weight: inherit; - font-style: inherit; - font-family: inherit; - font-size: 100%; - vertical-align: baseline; -} -body { - line-height: 1; - color: #000; - background: #fff; -} -ol, -ul { - list-style: none; -} -table { - border-collapse: separate; - border-spacing: 0; - vertical-align: middle; -} -caption, -th, -td { - text-align: left; - font-weight: normal; - vertical-align: middle; -} -a img { - border: none; -} -input, -button { - margin: 0; - padding: 0; -} -input::-moz-focus-inner, -button::-moz-focus-inner { - border: 0; - padding: 0; -} -@font-face { - font-family: FontAwesome; - font-style: normal; - font-weight: normal; - src: url("fonts/fontawesome-webfont.eot?v=#4.0.3"); - src: url("fonts/fontawesome-webfont.eot?#iefix&v=#4.0.3") format("embedded-opentype"), url("fonts/fontawesome-webfont.woff?v=#4.0.3") format("woff"), url("fonts/fontawesome-webfont.ttf?v=#4.0.3") format("truetype"), url("fonts/fontawesome-webfont.svg#fontawesomeregular?v=#4.0.3") format("svg"); -} -html, -body, -#container { - height: 100%; -} -body { - background: #eee; - font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - -webkit-text-size-adjust: 100%; -} -.outer { - max-width: 1220px; - margin: 0 auto; - padding: 0 20px; -} -.outer:before, -.outer:after { - content: ""; - display: table; -} -.outer:after { - clear: both; -} -.inner { - display: inline; - float: left; - width: 98.33333333333333%; - margin: 0 0.833333333333333%; -} -.left, -.alignleft { - float: left; -} -.right, -.alignright { - float: right; -} -.clear { - clear: both; -} -#container { - position: relative; -} -.mobile-nav-on { - overflow: hidden; -} -#wrap { - height: 100%; - width: 100%; - position: absolute; - top: 0; - left: 0; - -webkit-transition: 0.2s ease-out; - -moz-transition: 0.2s ease-out; - -ms-transition: 0.2s ease-out; - transition: 0.2s ease-out; - z-index: 1; - background: #eee; -} -.mobile-nav-on #wrap { - left: 280px; -} -@media screen and (min-width: 768px) { - #main { - display: inline; - float: left; - width: 73.33333333333333%; - margin: 0 0.833333333333333%; - } -} -.article-date, -.article-category-link, -.archive-year, -.widget-title { - text-decoration: none; - text-transform: uppercase; - letter-spacing: 2px; - color: #999; - margin-bottom: 1em; - margin-left: 5px; - line-height: 1em; - text-shadow: 0 1px #fff; - font-weight: bold; -} -.article-inner, -.archive-article-inner { - background: #fff; - -webkit-box-shadow: 1px 2px 3px #ddd; - box-shadow: 1px 2px 3px #ddd; - border: 1px solid #ddd; - border-radius: 3px; -} -.article-entry h1, -.widget h1 { - font-size: 2em; -} -.article-entry h2, -.widget h2 { - font-size: 1.5em; -} -.article-entry h3, -.widget h3 { - font-size: 1.3em; -} -.article-entry h4, -.widget h4 { - font-size: 1.2em; -} -.article-entry h5, -.widget h5 { - font-size: 1em; -} -.article-entry h6, -.widget h6 { - font-size: 1em; - color: #999; -} -.article-entry hr, -.widget hr { - border: 1px dashed #ddd; -} -.article-entry strong, -.widget strong { - font-weight: bold; -} -.article-entry em, -.widget em, -.article-entry cite, -.widget cite { - font-style: italic; -} -.article-entry sup, -.widget sup, -.article-entry sub, -.widget sub { - font-size: 0.75em; - line-height: 0; - position: relative; - vertical-align: baseline; -} -.article-entry sup, -.widget sup { - top: -0.5em; -} -.article-entry sub, -.widget sub { - bottom: -0.2em; -} -.article-entry small, -.widget small { - font-size: 0.85em; -} -.article-entry acronym, -.widget acronym, -.article-entry abbr, -.widget abbr { - border-bottom: 1px dotted; -} -.article-entry ul, -.widget ul, -.article-entry ol, -.widget ol, -.article-entry dl, -.widget dl { - margin: 0 20px; - line-height: 1.6em; -} -.article-entry ul ul, -.widget ul ul, -.article-entry ol ul, -.widget ol ul, -.article-entry ul ol, -.widget ul ol, -.article-entry ol ol, -.widget ol ol { - margin-top: 0; - margin-bottom: 0; -} -.article-entry ul, -.widget ul { - list-style: disc; -} -.article-entry ol, -.widget ol { - list-style: decimal; -} -.article-entry dt, -.widget dt { - font-weight: bold; -} -#header { - height: 300px; - position: relative; - border-bottom: 1px solid #ddd; -} -#header:before, -#header:after { - content: ""; - position: absolute; - left: 0; - right: 0; - height: 40px; -} -#header:before { - top: 0; - background: -webkit-linear-gradient(rgba(0,0,0,0.2), transparent); - background: -moz-linear-gradient(rgba(0,0,0,0.2), transparent); - background: -ms-linear-gradient(rgba(0,0,0,0.2), transparent); - background: linear-gradient(rgba(0,0,0,0.2), transparent); -} -#header:after { - bottom: 0; - background: -webkit-linear-gradient(transparent, rgba(0,0,0,0.2)); - background: -moz-linear-gradient(transparent, rgba(0,0,0,0.2)); - background: -ms-linear-gradient(transparent, rgba(0,0,0,0.2)); - background: linear-gradient(transparent, rgba(0,0,0,0.2)); -} -#header-outer { - height: 100%; - position: relative; -} -#header-inner { - position: relative; - overflow: hidden; -} -#banner { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: url("images/banner.jpg") center #000; - -webkit-background-size: cover; - -moz-background-size: cover; - background-size: cover; - z-index: -1; -} -#header-title { - text-align: center; - height: 40px; - position: absolute; - top: 50%; - left: 0; - margin-top: -20px; -} -#logo, -#subtitle { - text-decoration: none; - color: #fff; - font-weight: 300; - text-shadow: 0 1px 4px rgba(0,0,0,0.3); -} -#logo { - font-size: 40px; - line-height: 40px; - letter-spacing: 2px; -} -#subtitle { - font-size: 16px; - line-height: 16px; - letter-spacing: 1px; -} -#subtitle-wrap { - margin-top: 16px; -} -#main-nav { - float: left; - margin-left: -15px; -} -.nav-icon, -.main-nav-link { - float: left; - color: #fff; - opacity: 0.6; - text-decoration: none; - text-shadow: 0 1px rgba(0,0,0,0.2); - -webkit-transition: opacity 0.2s; - -moz-transition: opacity 0.2s; - -ms-transition: opacity 0.2s; - transition: opacity 0.2s; - display: block; - padding: 20px 15px; -} -.nav-icon:hover, -.main-nav-link:hover { - opacity: 1; -} -.nav-icon { - font-family: FontAwesome; - text-align: center; - font-size: 14px; - width: 14px; - height: 14px; - padding: 20px 15px; - position: relative; - cursor: pointer; -} -.main-nav-link { - font-weight: 300; - letter-spacing: 1px; -} -@media screen and (max-width: 479px) { - .main-nav-link { - display: none; - } -} -#main-nav-toggle { - display: none; -} -#main-nav-toggle:before { - content: "\f0c9"; -} -@media screen and (max-width: 479px) { - #main-nav-toggle { - display: block; - } -} -#sub-nav { - float: right; - margin-right: -15px; -} -#nav-rss-link:before { - content: "\f09e"; -} -#nav-search-btn:before { - content: "\f002"; -} -#search-form-wrap { - position: absolute; - top: 15px; - width: 150px; - height: 30px; - right: -150px; - opacity: 0; - -webkit-transition: 0.2s ease-out; - -moz-transition: 0.2s ease-out; - -ms-transition: 0.2s ease-out; - transition: 0.2s ease-out; -} -#search-form-wrap.on { - opacity: 1; - right: 0; -} -@media screen and (max-width: 479px) { - #search-form-wrap { - width: 100%; - right: -100%; - } -} -.search-form { - position: absolute; - top: 0; - left: 0; - right: 0; - background: #fff; - padding: 5px 15px; - border-radius: 15px; - -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.3); - box-shadow: 0 0 10px rgba(0,0,0,0.3); -} -.search-form-input { - border: none; - background: none; - color: #555; - width: 100%; - font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - outline: none; -} -.search-form-input::-webkit-search-results-decoration, -.search-form-input::-webkit-search-cancel-button { - -webkit-appearance: none; -} -.search-form-submit { - position: absolute; - top: 50%; - right: 10px; - margin-top: -7px; - font: 13px FontAwesome; - border: none; - background: none; - color: #bbb; - cursor: pointer; -} -.search-form-submit:hover, -.search-form-submit:focus { - color: #777; -} -.article { - margin: 50px 0; -} -.article-inner { - overflow: hidden; -} -.article-meta:before, -.article-meta:after { - content: ""; - display: table; -} -.article-meta:after { - clear: both; -} -.article-date { - float: left; -} -.article-category { - float: left; - line-height: 1em; - color: #ccc; - text-shadow: 0 1px #fff; - margin-left: 8px; -} -.article-category:before { - content: "\2022"; -} -.article-category-link { - margin: 0 12px 1em; -} -.article-header { - padding: 20px 20px 0; -} -.article-title { - text-decoration: none; - font-size: 2em; - font-weight: bold; - color: #555; - line-height: 1.1em; - -webkit-transition: color 0.2s; - -moz-transition: color 0.2s; - -ms-transition: color 0.2s; - transition: color 0.2s; -} -a.article-title:hover { - color: #258fb8; -} -.article-entry { - color: #555; - padding: 0 20px; -} -.article-entry:before, -.article-entry:after { - content: ""; - display: table; -} -.article-entry:after { - clear: both; -} -.article-entry p, -.article-entry table { - line-height: 1.6em; - margin: 1.6em 0; -} -.article-entry h1, -.article-entry h2, -.article-entry h3, -.article-entry h4, -.article-entry h5, -.article-entry h6 { - font-weight: bold; -} -.article-entry h1, -.article-entry h2, -.article-entry h3, -.article-entry h4, -.article-entry h5, -.article-entry h6 { - line-height: 1.1em; - margin: 1.1em 0; -} -.article-entry a { - color: #258fb8; - text-decoration: none; -} -.article-entry a:hover { - text-decoration: underline; -} -.article-entry ul, -.article-entry ol, -.article-entry dl { - margin-top: 1.6em; - margin-bottom: 1.6em; -} -.article-entry img, -.article-entry video { - max-width: 100%; - height: auto; - display: block; - margin: auto; -} -.article-entry iframe { - border: none; -} -.article-entry table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; -} -.article-entry th { - font-weight: bold; - border-bottom: 3px solid #ddd; - padding-bottom: 0.5em; -} -.article-entry td { - border-bottom: 1px solid #ddd; - padding: 10px 0; -} -.article-entry blockquote { - font-family: Georgia, "Times New Roman", serif; - font-size: 1.4em; - margin: 1.6em 20px; - text-align: center; -} -.article-entry blockquote footer { - font-size: 14px; - margin: 1.6em 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -} -.article-entry blockquote footer cite:before { - content: "—"; - padding: 0 0.5em; -} -.article-entry .pullquote { - text-align: left; - width: 45%; - margin: 0; -} -.article-entry .pullquote.left { - margin-left: 0.5em; - margin-right: 1em; -} -.article-entry .pullquote.right { - margin-right: 0.5em; - margin-left: 1em; -} -.article-entry .caption { - color: #999; - display: block; - font-size: 0.9em; - margin-top: 0.5em; - position: relative; - text-align: center; -} -.article-entry .video-container { - position: relative; - padding-top: 56.25%; - height: 0; - overflow: hidden; -} -.article-entry .video-container iframe, -.article-entry .video-container object, -.article-entry .video-container embed { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - margin-top: 0; -} -.article-more-link a { - display: inline-block; - line-height: 1em; - padding: 6px 15px; - border-radius: 15px; - background: #eee; - color: #999; - text-shadow: 0 1px #fff; - text-decoration: none; -} -.article-more-link a:hover { - background: #258fb8; - color: #fff; - text-decoration: none; - text-shadow: 0 1px #1e7293; -} -.article-footer { - font-size: 0.85em; - line-height: 1.6em; - border-top: 1px solid #ddd; - padding-top: 1.6em; - margin: 0 20px 20px; -} -.article-footer:before, -.article-footer:after { - content: ""; - display: table; -} -.article-footer:after { - clear: both; -} -.article-footer a { - color: #999; - text-decoration: none; -} -.article-footer a:hover { - color: #555; -} -.article-tag-list-item { - float: left; - margin-right: 10px; -} -.article-tag-list-link:before { - content: "#"; -} -.article-comment-link { - float: right; -} -.article-comment-link:before { - content: "\f075"; - font-family: FontAwesome; - padding-right: 8px; -} -.article-share-link { - cursor: pointer; - float: right; - margin-left: 20px; -} -.article-share-link:before { - content: "\f064"; - font-family: FontAwesome; - padding-right: 6px; -} -#article-nav { - position: relative; -} -#article-nav:before, -#article-nav:after { - content: ""; - display: table; -} -#article-nav:after { - clear: both; -} -@media screen and (min-width: 768px) { - #article-nav { - margin: 50px 0; - } - #article-nav:before { - width: 8px; - height: 8px; - position: absolute; - top: 50%; - left: 50%; - margin-top: -4px; - margin-left: -4px; - content: ""; - border-radius: 50%; - background: #ddd; - -webkit-box-shadow: 0 1px 2px #fff; - box-shadow: 0 1px 2px #fff; - } -} -.article-nav-link-wrap { - text-decoration: none; - text-shadow: 0 1px #fff; - color: #999; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin-top: 50px; - text-align: center; - display: block; -} -.article-nav-link-wrap:hover { - color: #555; -} -@media screen and (min-width: 768px) { - .article-nav-link-wrap { - width: 50%; - margin-top: 0; - } -} -@media screen and (min-width: 768px) { - #article-nav-newer { - float: left; - text-align: right; - padding-right: 20px; - } -} -@media screen and (min-width: 768px) { - #article-nav-older { - float: right; - text-align: left; - padding-left: 20px; - } -} -.article-nav-caption { - text-transform: uppercase; - letter-spacing: 2px; - color: #ddd; - line-height: 1em; - font-weight: bold; -} -#article-nav-newer .article-nav-caption { - margin-right: -2px; -} -.article-nav-title { - font-size: 0.85em; - line-height: 1.6em; - margin-top: 0.5em; -} -.article-share-box { - position: absolute; - display: none; - background: #fff; - -webkit-box-shadow: 1px 2px 10px rgba(0,0,0,0.2); - box-shadow: 1px 2px 10px rgba(0,0,0,0.2); - border-radius: 3px; - margin-left: -145px; - overflow: hidden; - z-index: 1; -} -.article-share-box.on { - display: block; -} -.article-share-input { - width: 100%; - background: none; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - padding: 0 15px; - color: #555; - outline: none; - border: 1px solid #ddd; - border-radius: 3px 3px 0 0; - height: 36px; - line-height: 36px; -} -.article-share-links { - background: #eee; -} -.article-share-links:before, -.article-share-links:after { - content: ""; - display: table; -} -.article-share-links:after { - clear: both; -} -.article-share-twitter, -.article-share-facebook, -.article-share-pinterest, -.article-share-google { - width: 50px; - height: 36px; - display: block; - float: left; - position: relative; - color: #999; - text-shadow: 0 1px #fff; -} -.article-share-twitter:before, -.article-share-facebook:before, -.article-share-pinterest:before, -.article-share-google:before { - font-size: 20px; - font-family: FontAwesome; - width: 20px; - height: 20px; - position: absolute; - top: 50%; - left: 50%; - margin-top: -10px; - margin-left: -10px; - text-align: center; -} -.article-share-twitter:hover, -.article-share-facebook:hover, -.article-share-pinterest:hover, -.article-share-google:hover { - color: #fff; -} -.article-share-twitter:before { - content: "\f099"; -} -.article-share-twitter:hover { - background: #00aced; - text-shadow: 0 1px #008abe; -} -.article-share-facebook:before { - content: "\f09a"; -} -.article-share-facebook:hover { - background: #3b5998; - text-shadow: 0 1px #2f477a; -} -.article-share-pinterest:before { - content: "\f0d2"; -} -.article-share-pinterest:hover { - background: #cb2027; - text-shadow: 0 1px #a21a1f; -} -.article-share-google:before { - content: "\f0d5"; -} -.article-share-google:hover { - background: #dd4b39; - text-shadow: 0 1px #be3221; -} -.article-gallery { - background: #000; - position: relative; -} -.article-gallery-photos { - position: relative; - overflow: hidden; -} -.article-gallery-img { - display: none; - max-width: 100%; -} -.article-gallery-img:first-child { - display: block; -} -.article-gallery-img.loaded { - position: absolute; - display: block; -} -.article-gallery-img img { - display: block; - max-width: 100%; - margin: 0 auto; -} -#comments { - background: #fff; - -webkit-box-shadow: 1px 2px 3px #ddd; - box-shadow: 1px 2px 3px #ddd; - padding: 20px; - border: 1px solid #ddd; - border-radius: 3px; - margin: 50px 0; -} -#comments a { - color: #258fb8; -} -.archives-wrap { - margin: 50px 0; -} -.archives:before, -.archives:after { - content: ""; - display: table; -} -.archives:after { - clear: both; -} -.archive-year-wrap { - margin-bottom: 1em; -} -.archives { - -webkit-column-gap: 10px; - -moz-column-gap: 10px; - column-gap: 10px; -} -@media screen and (min-width: 480px) and (max-width: 767px) { - .archives { - -webkit-column-count: 2; - -moz-column-count: 2; - column-count: 2; - } -} -@media screen and (min-width: 768px) { - .archives { - -webkit-column-count: 3; - -moz-column-count: 3; - column-count: 3; - } -} -.archive-article { - -webkit-column-break-inside: avoid; - page-break-inside: avoid; - overflow: hidden; - break-inside: avoid-column; -} -.archive-article-inner { - padding: 10px; - margin-bottom: 15px; -} -.archive-article-title { - text-decoration: none; - font-weight: bold; - color: #555; - -webkit-transition: color 0.2s; - -moz-transition: color 0.2s; - -ms-transition: color 0.2s; - transition: color 0.2s; - line-height: 1.6em; -} -.archive-article-title:hover { - color: #258fb8; -} -.archive-article-footer { - margin-top: 1em; -} -.archive-article-date { - color: #999; - text-decoration: none; - font-size: 0.85em; - line-height: 1em; - margin-bottom: 0.5em; - display: block; -} -#page-nav { - margin: 50px auto; - background: #fff; - -webkit-box-shadow: 1px 2px 3px #ddd; - box-shadow: 1px 2px 3px #ddd; - border: 1px solid #ddd; - border-radius: 3px; - text-align: center; - color: #999; - overflow: hidden; -} -#page-nav:before, -#page-nav:after { - content: ""; - display: table; -} -#page-nav:after { - clear: both; -} -#page-nav a, -#page-nav span { - padding: 10px 20px; - line-height: 1; - height: 2ex; -} -#page-nav a { - color: #999; - text-decoration: none; -} -#page-nav a:hover { - background: #999; - color: #fff; -} -#page-nav .prev { - float: left; -} -#page-nav .next { - float: right; -} -#page-nav .page-number { - display: inline-block; -} -@media screen and (max-width: 479px) { - #page-nav .page-number { - display: none; - } -} -#page-nav .current { - color: #555; - font-weight: bold; -} -#page-nav .space { - color: #ddd; -} -#footer { - background: #262a30; - padding: 50px 0; - border-top: 1px solid #ddd; - color: #999; -} -#footer a { - color: #258fb8; - text-decoration: none; -} -#footer a:hover { - text-decoration: underline; -} -#footer-info { - line-height: 1.6em; - font-size: 0.85em; -} -.article-entry pre, -.article-entry .highlight { - background: #2d2d2d; - margin: 0 -20px; - padding: 15px 20px; - border-style: solid; - border-color: #ddd; - border-width: 1px 0; - overflow: auto; - color: #ccc; - line-height: 22.400000000000002px; -} -.article-entry .highlight .gutter pre, -.article-entry .gist .gist-file .gist-data .line-numbers { - color: #666; - font-size: 0.85em; -} -.article-entry pre, -.article-entry code { - font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace; -} -.article-entry code { - background: #eee; - text-shadow: 0 1px #fff; - padding: 0 0.3em; -} -.article-entry pre code { - background: none; - text-shadow: none; - padding: 0; -} -.article-entry .highlight pre { - border: none; - margin: 0; - padding: 0; -} -.article-entry .highlight table { - margin: 0; - width: auto; -} -.article-entry .highlight td { - border: none; - padding: 0; -} -.article-entry .highlight figcaption { - font-size: 0.85em; - color: #999; - line-height: 1em; - margin-bottom: 1em; -} -.article-entry .highlight figcaption:before, -.article-entry .highlight figcaption:after { - content: ""; - display: table; -} -.article-entry .highlight figcaption:after { - clear: both; -} -.article-entry .highlight figcaption a { - float: right; -} -.article-entry .highlight .gutter pre { - text-align: right; - padding-right: 20px; -} -.article-entry .highlight .line { - height: 22.400000000000002px; -} -.article-entry .highlight .line.marked { - background: #515151; -} -.article-entry .gist { - margin: 0 -20px; - border-style: solid; - border-color: #ddd; - border-width: 1px 0; - background: #2d2d2d; - padding: 15px 20px 15px 0; -} -.article-entry .gist .gist-file { - border: none; - font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace; - margin: 0; -} -.article-entry .gist .gist-file .gist-data { - background: none; - border: none; -} -.article-entry .gist .gist-file .gist-data .line-numbers { - background: none; - border: none; - padding: 0 20px 0 0; -} -.article-entry .gist .gist-file .gist-data .line-data { - padding: 0 !important; -} -.article-entry .gist .gist-file .highlight { - margin: 0; - padding: 0; - border: none; -} -.article-entry .gist .gist-file .gist-meta { - background: #2d2d2d; - color: #999; - font: 0.85em -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - text-shadow: 0 0; - padding: 0; - margin-top: 1em; - margin-left: 20px; -} -.article-entry .gist .gist-file .gist-meta a { - color: #258fb8; - font-weight: normal; -} -.article-entry .gist .gist-file .gist-meta a:hover { - text-decoration: underline; -} -pre .comment, -pre .title { - color: #999; -} -pre .variable, -pre .attribute, -pre .tag, -pre .regexp, -pre .ruby .constant, -pre .xml .tag .title, -pre .xml .pi, -pre .xml .doctype, -pre .html .doctype, -pre .css .id, -pre .css .class, -pre .css .pseudo { - color: #f2777a; -} -pre .number, -pre .preprocessor, -pre .built_in, -pre .literal, -pre .params, -pre .constant { - color: #f99157; -} -pre .class, -pre .ruby .class .title, -pre .css .rules .attribute { - color: #9c9; -} -pre .string, -pre .value, -pre .inheritance, -pre .header, -pre .ruby .symbol, -pre .xml .cdata { - color: #9c9; -} -pre .css .hexcolor { - color: #6cc; -} -pre .function, -pre .python .decorator, -pre .python .title, -pre .ruby .function .title, -pre .ruby .title .keyword, -pre .perl .sub, -pre .javascript .title, -pre .coffeescript .title { - color: #69c; -} -pre .keyword, -pre .javascript .function { - color: #c9c; -} -@media screen and (max-width: 479px) { - #mobile-nav { - position: absolute; - top: 0; - left: 0; - width: 280px; - height: 100%; - background: #191919; - border-right: 1px solid #fff; - } -} -@media screen and (max-width: 479px) { - .mobile-nav-link { - display: block; - color: #999; - text-decoration: none; - padding: 15px 20px; - font-weight: bold; - } - .mobile-nav-link:hover { - color: #fff; - } -} -@media screen and (min-width: 768px) { - #sidebar { - display: inline; - float: left; - width: 23.333333333333332%; - margin: 0 0.833333333333333%; - } -} -.widget-wrap { - margin: 50px 0; -} -.widget { - color: #777; - text-shadow: 0 1px #fff; - background: #ddd; - -webkit-box-shadow: 0 -1px 4px #ccc inset; - box-shadow: 0 -1px 4px #ccc inset; - border: 1px solid #ccc; - padding: 15px; - border-radius: 3px; -} -.widget a { - color: #258fb8; - text-decoration: none; -} -.widget a:hover { - text-decoration: underline; -} -.widget ul ul, -.widget ol ul, -.widget dl ul, -.widget ul ol, -.widget ol ol, -.widget dl ol, -.widget ul dl, -.widget ol dl, -.widget dl dl { - margin-left: 15px; - list-style: disc; -} -.widget { - line-height: 1.6em; - word-wrap: break-word; - font-size: 0.9em; -} -.widget ul, -.widget ol { - list-style: none; - margin: 0; -} -.widget ul ul, -.widget ol ul, -.widget ul ol, -.widget ol ol { - margin: 0 20px; -} -.widget ul ul, -.widget ol ul { - list-style: disc; -} -.widget ul ol, -.widget ol ol { - list-style: decimal; -} -.category-list-count, -.tag-list-count, -.archive-list-count { - padding-left: 5px; - color: #999; - font-size: 0.85em; -} -.category-list-count:before, -.tag-list-count:before, -.archive-list-count:before { - content: "("; -} -.category-list-count:after, -.tag-list-count:after, -.archive-list-count:after { - content: ")"; -} -.tagcloud a { - margin-right: 5px; - display: inline-block; -} diff --git a/fancybox/blank.gif b/fancybox/blank.gif deleted file mode 100644 index 35d42e8..0000000 Binary files a/fancybox/blank.gif and /dev/null differ diff --git a/fancybox/fancybox_loading.gif b/fancybox/fancybox_loading.gif deleted file mode 100644 index a03a40c..0000000 Binary files a/fancybox/fancybox_loading.gif and /dev/null differ diff --git a/fancybox/fancybox_loading@2x.gif b/fancybox/fancybox_loading@2x.gif deleted file mode 100644 index 9205aeb..0000000 Binary files a/fancybox/fancybox_loading@2x.gif and /dev/null differ diff --git a/fancybox/fancybox_overlay.png b/fancybox/fancybox_overlay.png deleted file mode 100644 index a439139..0000000 Binary files a/fancybox/fancybox_overlay.png and /dev/null differ diff --git a/fancybox/fancybox_sprite.png b/fancybox/fancybox_sprite.png deleted file mode 100644 index fd8d5ca..0000000 Binary files a/fancybox/fancybox_sprite.png and /dev/null differ diff --git a/fancybox/fancybox_sprite@2x.png b/fancybox/fancybox_sprite@2x.png deleted file mode 100644 index d0e4779..0000000 Binary files a/fancybox/fancybox_sprite@2x.png and /dev/null differ diff --git a/fancybox/helpers/fancybox_buttons.png b/fancybox/helpers/fancybox_buttons.png deleted file mode 100644 index 0787207..0000000 Binary files a/fancybox/helpers/fancybox_buttons.png and /dev/null differ diff --git a/fancybox/helpers/jquery.fancybox-buttons.css b/fancybox/helpers/jquery.fancybox-buttons.css deleted file mode 100644 index a26273a..0000000 --- a/fancybox/helpers/jquery.fancybox-buttons.css +++ /dev/null @@ -1,97 +0,0 @@ -#fancybox-buttons { - position: fixed; - left: 0; - width: 100%; - z-index: 8050; -} - -#fancybox-buttons.top { - top: 10px; -} - -#fancybox-buttons.bottom { - bottom: 10px; -} - -#fancybox-buttons ul { - display: block; - width: 166px; - height: 30px; - margin: 0 auto; - padding: 0; - list-style: none; - border: 1px solid #111; - border-radius: 3px; - -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); - -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); - box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); - background: rgb(50,50,50); - background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); - background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); -} - -#fancybox-buttons ul li { - float: left; - margin: 0; - padding: 0; -} - -#fancybox-buttons a { - display: block; - width: 30px; - height: 30px; - text-indent: -9999px; - background-color: transparent; - background-image: url('fancybox_buttons.png'); - background-repeat: no-repeat; - outline: none; - opacity: 0.8; -} - -#fancybox-buttons a:hover { - opacity: 1; -} - -#fancybox-buttons a.btnPrev { - background-position: 5px 0; -} - -#fancybox-buttons a.btnNext { - background-position: -33px 0; - border-right: 1px solid #3e3e3e; -} - -#fancybox-buttons a.btnPlay { - background-position: 0 -30px; -} - -#fancybox-buttons a.btnPlayOn { - background-position: -30px -30px; -} - -#fancybox-buttons a.btnToggle { - background-position: 3px -60px; - border-left: 1px solid #111; - border-right: 1px solid #3e3e3e; - width: 35px -} - -#fancybox-buttons a.btnToggleOn { - background-position: -27px -60px; -} - -#fancybox-buttons a.btnClose { - border-left: 1px solid #111; - width: 35px; - background-position: -56px 0px; -} - -#fancybox-buttons a.btnDisabled { - opacity : 0.4; - cursor: default; -} \ No newline at end of file diff --git a/fancybox/helpers/jquery.fancybox-buttons.js b/fancybox/helpers/jquery.fancybox-buttons.js deleted file mode 100644 index 352bb5f..0000000 --- a/fancybox/helpers/jquery.fancybox-buttons.js +++ /dev/null @@ -1,122 +0,0 @@ - /*! - * Buttons helper for fancyBox - * version: 1.0.5 (Mon, 15 Oct 2012) - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * helpers : { - * buttons: { - * position : 'top' - * } - * } - * }); - * - */ -;(function ($) { - //Shortcut for fancyBox object - var F = $.fancybox; - - //Add helper object - F.helpers.buttons = { - defaults : { - skipSingle : false, // disables if gallery contains single image - position : 'top', // 'top' or 'bottom' - tpl : '
' - }, - - list : null, - buttons: null, - - beforeLoad: function (opts, obj) { - //Remove self if gallery do not have at least two items - - if (opts.skipSingle && obj.group.length < 2) { - obj.helpers.buttons = false; - obj.closeBtn = true; - - return; - } - - //Increase top margin to give space for buttons - obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; - }, - - onPlayStart: function () { - if (this.buttons) { - this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); - } - }, - - onPlayEnd: function () { - if (this.buttons) { - this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); - } - }, - - afterShow: function (opts, obj) { - var buttons = this.buttons; - - if (!buttons) { - this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); - - buttons = { - prev : this.list.find('.btnPrev').click( F.prev ), - next : this.list.find('.btnNext').click( F.next ), - play : this.list.find('.btnPlay').click( F.play ), - toggle : this.list.find('.btnToggle').click( F.toggle ), - close : this.list.find('.btnClose').click( F.close ) - } - } - - //Prev - if (obj.index > 0 || obj.loop) { - buttons.prev.removeClass('btnDisabled'); - } else { - buttons.prev.addClass('btnDisabled'); - } - - //Next / Play - if (obj.loop || obj.index < obj.group.length - 1) { - buttons.next.removeClass('btnDisabled'); - buttons.play.removeClass('btnDisabled'); - - } else { - buttons.next.addClass('btnDisabled'); - buttons.play.addClass('btnDisabled'); - } - - this.buttons = buttons; - - this.onUpdate(opts, obj); - }, - - onUpdate: function (opts, obj) { - var toggle; - - if (!this.buttons) { - return; - } - - toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); - - //Size toggle button - if (obj.canShrink) { - toggle.addClass('btnToggleOn'); - - } else if (!obj.canExpand) { - toggle.addClass('btnDisabled'); - } - }, - - beforeClose: function () { - if (this.list) { - this.list.remove(); - } - - this.list = null; - this.buttons = null; - } - }; - -}(jQuery)); diff --git a/fancybox/helpers/jquery.fancybox-media.js b/fancybox/helpers/jquery.fancybox-media.js deleted file mode 100644 index 62737a5..0000000 --- a/fancybox/helpers/jquery.fancybox-media.js +++ /dev/null @@ -1,199 +0,0 @@ -/*! - * Media helper for fancyBox - * version: 1.0.6 (Fri, 14 Jun 2013) - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * helpers : { - * media: true - * } - * }); - * - * Set custom URL parameters: - * $(".fancybox").fancybox({ - * helpers : { - * media: { - * youtube : { - * params : { - * autoplay : 0 - * } - * } - * } - * } - * }); - * - * Or: - * $(".fancybox").fancybox({, - * helpers : { - * media: true - * }, - * youtube : { - * autoplay: 0 - * } - * }); - * - * Supports: - * - * Youtube - * http://www.youtube.com/watch?v=opj24KnzrWo - * http://www.youtube.com/embed/opj24KnzrWo - * http://youtu.be/opj24KnzrWo - * http://www.youtube-nocookie.com/embed/opj24KnzrWo - * Vimeo - * http://vimeo.com/40648169 - * http://vimeo.com/channels/staffpicks/38843628 - * http://vimeo.com/groups/surrealism/videos/36516384 - * http://player.vimeo.com/video/45074303 - * Metacafe - * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ - * http://www.metacafe.com/watch/7635964/ - * Dailymotion - * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people - * Twitvid - * http://twitvid.com/QY7MD - * Twitpic - * http://twitpic.com/7p93st - * Instagram - * http://instagr.am/p/IejkuUGxQn/ - * http://instagram.com/p/IejkuUGxQn/ - * Google maps - * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 - * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 - * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 - */ -;(function ($) { - "use strict"; - - //Shortcut for fancyBox object - var F = $.fancybox, - format = function( url, rez, params ) { - params = params || ''; - - if ( $.type( params ) === "object" ) { - params = $.param(params, true); - } - - $.each(rez, function(key, value) { - url = url.replace( '$' + key, value || '' ); - }); - - if (params.length) { - url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; - } - - return url; - }; - - //Add helper object - F.helpers.media = { - defaults : { - youtube : { - matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, - params : { - autoplay : 1, - autohide : 1, - fs : 1, - rel : 0, - hd : 1, - wmode : 'opaque', - enablejsapi : 1 - }, - type : 'iframe', - url : '//www.youtube.com/embed/$3' - }, - vimeo : { - matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, - params : { - autoplay : 1, - hd : 1, - show_title : 1, - show_byline : 1, - show_portrait : 0, - fullscreen : 1 - }, - type : 'iframe', - url : '//player.vimeo.com/video/$1' - }, - metacafe : { - matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, - params : { - autoPlay : 'yes' - }, - type : 'swf', - url : function( rez, params, obj ) { - obj.swf.flashVars = 'playerVars=' + $.param( params, true ); - - return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; - } - }, - dailymotion : { - matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, - params : { - additionalInfos : 0, - autoStart : 1 - }, - type : 'swf', - url : '//www.dailymotion.com/swf/video/$1' - }, - twitvid : { - matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, - params : { - autoplay : 0 - }, - type : 'iframe', - url : '//www.twitvid.com/embed.php?guid=$1' - }, - twitpic : { - matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, - type : 'image', - url : '//twitpic.com/show/full/$1/' - }, - instagram : { - matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, - type : 'image', - url : '//$1/p/$2/media/?size=l' - }, - google_maps : { - matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, - type : 'iframe', - url : function( rez ) { - return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); - } - } - }, - - beforeLoad : function(opts, obj) { - var url = obj.href || '', - type = false, - what, - item, - rez, - params; - - for (what in opts) { - if (opts.hasOwnProperty(what)) { - item = opts[ what ]; - rez = url.match( item.matcher ); - - if (rez) { - type = item.type; - params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); - - url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); - - break; - } - } - } - - if (type) { - obj.href = url; - obj.type = type; - - obj.autoHeight = false; - } - } - }; - -}(jQuery)); \ No newline at end of file diff --git a/fancybox/helpers/jquery.fancybox-thumbs.css b/fancybox/helpers/jquery.fancybox-thumbs.css deleted file mode 100644 index 63d2943..0000000 --- a/fancybox/helpers/jquery.fancybox-thumbs.css +++ /dev/null @@ -1,55 +0,0 @@ -#fancybox-thumbs { - position: fixed; - left: 0; - width: 100%; - overflow: hidden; - z-index: 8050; -} - -#fancybox-thumbs.bottom { - bottom: 2px; -} - -#fancybox-thumbs.top { - top: 2px; -} - -#fancybox-thumbs ul { - position: relative; - list-style: none; - margin: 0; - padding: 0; -} - -#fancybox-thumbs ul li { - float: left; - padding: 1px; - opacity: 0.5; -} - -#fancybox-thumbs ul li.active { - opacity: 0.75; - padding: 0; - border: 1px solid #fff; -} - -#fancybox-thumbs ul li:hover { - opacity: 1; -} - -#fancybox-thumbs ul li a { - display: block; - position: relative; - overflow: hidden; - border: 1px solid #222; - background: #111; - outline: none; -} - -#fancybox-thumbs ul li img { - display: block; - position: relative; - border: 0; - padding: 0; - max-width: none; -} \ No newline at end of file diff --git a/fancybox/helpers/jquery.fancybox-thumbs.js b/fancybox/helpers/jquery.fancybox-thumbs.js deleted file mode 100644 index 58c9719..0000000 --- a/fancybox/helpers/jquery.fancybox-thumbs.js +++ /dev/null @@ -1,165 +0,0 @@ - /*! - * Thumbnail helper for fancyBox - * version: 1.0.7 (Mon, 01 Oct 2012) - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * helpers : { - * thumbs: { - * width : 50, - * height : 50 - * } - * } - * }); - * - */ -;(function ($) { - //Shortcut for fancyBox object - var F = $.fancybox; - - //Add helper object - F.helpers.thumbs = { - defaults : { - width : 50, // thumbnail width - height : 50, // thumbnail height - position : 'bottom', // 'top' or 'bottom' - source : function ( item ) { // function to obtain the URL of the thumbnail image - var href; - - if (item.element) { - href = $(item.element).find('img').attr('src'); - } - - if (!href && item.type === 'image' && item.href) { - href = item.href; - } - - return href; - } - }, - - wrap : null, - list : null, - width : 0, - - init: function (opts, obj) { - var that = this, - list, - thumbWidth = opts.width, - thumbHeight = opts.height, - thumbSource = opts.source; - - //Build list structure - list = ''; - - for (var n = 0; n < obj.group.length; n++) { - list += '
  • '; - } - - this.wrap = $('
    ').addClass(opts.position).appendTo('body'); - this.list = $('').appendTo(this.wrap); - - //Load each thumbnail - $.each(obj.group, function (i) { - var el = obj.group[ i ], - href = thumbSource( el ); - - if (!href) { - return; - } - - $("").load(function () { - var width = this.width, - height = this.height, - widthRatio, heightRatio, parent; - - if (!that.list || !width || !height) { - return; - } - - //Calculate thumbnail width/height and center it - widthRatio = width / thumbWidth; - heightRatio = height / thumbHeight; - - parent = that.list.children().eq(i).find('a'); - - if (widthRatio >= 1 && heightRatio >= 1) { - if (widthRatio > heightRatio) { - width = Math.floor(width / heightRatio); - height = thumbHeight; - - } else { - width = thumbWidth; - height = Math.floor(height / widthRatio); - } - } - - $(this).css({ - width : width, - height : height, - top : Math.floor(thumbHeight / 2 - height / 2), - left : Math.floor(thumbWidth / 2 - width / 2) - }); - - parent.width(thumbWidth).height(thumbHeight); - - $(this).hide().appendTo(parent).fadeIn(300); - - }) - .attr('src', href) - .attr('title', el.title); - }); - - //Set initial width - this.width = this.list.children().eq(0).outerWidth(true); - - this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); - }, - - beforeLoad: function (opts, obj) { - //Remove self if gallery do not have at least two items - if (obj.group.length < 2) { - obj.helpers.thumbs = false; - - return; - } - - //Increase bottom margin to give space for thumbs - obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); - }, - - afterShow: function (opts, obj) { - //Check if exists and create or update list - if (this.list) { - this.onUpdate(opts, obj); - - } else { - this.init(opts, obj); - } - - //Set active element - this.list.children().removeClass('active').eq(obj.index).addClass('active'); - }, - - //Center list - onUpdate: function (opts, obj) { - if (this.list) { - this.list.stop(true).animate({ - 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) - }, 150); - } - }, - - beforeClose: function () { - if (this.wrap) { - this.wrap.remove(); - } - - this.wrap = null; - this.list = null; - this.width = 0; - } - } - -}(jQuery)); \ No newline at end of file diff --git a/fancybox/jquery.fancybox.css b/fancybox/jquery.fancybox.css deleted file mode 100644 index c75d051..0000000 --- a/fancybox/jquery.fancybox.css +++ /dev/null @@ -1,273 +0,0 @@ -/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ -.fancybox-wrap, -.fancybox-skin, -.fancybox-outer, -.fancybox-inner, -.fancybox-image, -.fancybox-wrap iframe, -.fancybox-wrap object, -.fancybox-nav, -.fancybox-nav span, -.fancybox-tmp -{ - padding: 0; - margin: 0; - border: 0; - outline: none; - vertical-align: top; -} - -.fancybox-wrap { - position: absolute; - top: 0; - left: 0; - z-index: 8020; -} - -.fancybox-skin { - position: relative; - background: #f9f9f9; - color: #444; - text-shadow: none; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.fancybox-opened { - z-index: 8030; -} - -.fancybox-opened .fancybox-skin { - -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); - box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); -} - -.fancybox-outer, .fancybox-inner { - position: relative; -} - -.fancybox-inner { - overflow: hidden; -} - -.fancybox-type-iframe .fancybox-inner { - -webkit-overflow-scrolling: touch; -} - -.fancybox-error { - color: #444; - font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; - margin: 0; - padding: 15px; - white-space: nowrap; -} - -.fancybox-image, .fancybox-iframe { - display: block; - width: 100%; - height: 100%; -} - -.fancybox-image { - max-width: 100%; - max-height: 100%; -} - -#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url(fancybox_sprite.png); -} - -#fancybox-loading { - position: fixed; - top: 50%; - left: 50%; - margin-top: -22px; - margin-left: -22px; - background-position: 0 -108px; - opacity: 0.8; - cursor: pointer; - z-index: 8060; -} - -#fancybox-loading div { - width: 44px; - height: 44px; - background: url(fancybox_loading.gif) center center no-repeat; -} - -.fancybox-close { - position: absolute; - top: -18px; - right: -18px; - width: 36px; - height: 36px; - cursor: pointer; - z-index: 8040; -} - -.fancybox-nav { - position: absolute; - top: 0; - width: 40%; - height: 100%; - cursor: pointer; - text-decoration: none; - background: transparent url(blank.gif); /* helps IE */ - -webkit-tap-highlight-color: rgba(0,0,0,0); - z-index: 8040; -} - -.fancybox-prev { - left: 0; -} - -.fancybox-next { - right: 0; -} - -.fancybox-nav span { - position: absolute; - top: 50%; - width: 36px; - height: 34px; - margin-top: -18px; - cursor: pointer; - z-index: 8040; - visibility: hidden; -} - -.fancybox-prev span { - left: 10px; - background-position: 0 -36px; -} - -.fancybox-next span { - right: 10px; - background-position: 0 -72px; -} - -.fancybox-nav:hover span { - visibility: visible; -} - -.fancybox-tmp { - position: absolute; - top: -99999px; - left: -99999px; - max-width: 99999px; - max-height: 99999px; - overflow: visible !important; -} - -/* Overlay helper */ - -.fancybox-lock { - overflow: visible !important; - width: auto; -} - -.fancybox-lock body { - overflow: hidden !important; -} - -.fancybox-lock-test { - overflow-y: hidden !important; -} - -.fancybox-overlay { - position: absolute; - top: 0; - left: 0; - overflow: hidden; - display: none; - z-index: 8010; - background: url(fancybox_overlay.png); -} - -.fancybox-overlay-fixed { - position: fixed; - bottom: 0; - right: 0; -} - -.fancybox-lock .fancybox-overlay { - overflow: auto; - overflow-y: scroll; -} - -/* Title helper */ - -.fancybox-title { - visibility: hidden; - font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; - position: relative; - text-shadow: none; - z-index: 8050; -} - -.fancybox-opened .fancybox-title { - visibility: visible; -} - -.fancybox-title-float-wrap { - position: absolute; - bottom: 0; - right: 50%; - margin-bottom: -35px; - z-index: 8050; - text-align: center; -} - -.fancybox-title-float-wrap .child { - display: inline-block; - margin-right: -100%; - padding: 2px 20px; - background: transparent; /* Fallback for web browsers that doesn't support RGBa */ - background: rgba(0, 0, 0, 0.8); - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - text-shadow: 0 1px 2px #222; - color: #FFF; - font-weight: bold; - line-height: 24px; - white-space: nowrap; -} - -.fancybox-title-outside-wrap { - position: relative; - margin-top: 10px; - color: #fff; -} - -.fancybox-title-inside-wrap { - padding-top: 10px; -} - -.fancybox-title-over-wrap { - position: absolute; - bottom: 0; - left: 0; - color: #fff; - padding: 10px; - background: #000; - background: rgba(0, 0, 0, .8); -} - -/*Retina graphics!*/ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), - only screen and (min--moz-device-pixel-ratio: 1.5), - only screen and (min-device-pixel-ratio: 1.5){ - - #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url(fancybox_sprite@2x.png); - background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ - } - - #fancybox-loading div { - background-image: url(fancybox_loading@2x.gif); - background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ - } -} \ No newline at end of file diff --git a/fancybox/jquery.fancybox.js b/fancybox/jquery.fancybox.js deleted file mode 100644 index 7a0f8ac..0000000 --- a/fancybox/jquery.fancybox.js +++ /dev/null @@ -1,2017 +0,0 @@ -/*! - * fancyBox - jQuery Plugin - * version: 2.1.5 (Fri, 14 Jun 2013) - * requires jQuery v1.6 or later - * - * Examples at http://fancyapps.com/fancybox/ - * License: www.fancyapps.com/fancybox/#license - * - * Copyright 2012 Janis Skarnelis - janis@fancyapps.com - * - */ - -;(function (window, document, $, undefined) { - "use strict"; - - var H = $("html"), - W = $(window), - D = $(document), - F = $.fancybox = function () { - F.open.apply( this, arguments ); - }, - IE = navigator.userAgent.match(/msie/i), - didUpdate = null, - isTouch = document.createTouch !== undefined, - - isQuery = function(obj) { - return obj && obj.hasOwnProperty && obj instanceof $; - }, - isString = function(str) { - return str && $.type(str) === "string"; - }, - isPercentage = function(str) { - return isString(str) && str.indexOf('%') > 0; - }, - isScrollable = function(el) { - return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); - }, - getScalar = function(orig, dim) { - var value = parseInt(orig, 10) || 0; - - if (dim && isPercentage(orig)) { - value = F.getViewport()[ dim ] / 100 * value; - } - - return Math.ceil(value); - }, - getValue = function(value, dim) { - return getScalar(value, dim) + 'px'; - }; - - $.extend(F, { - // The current version of fancyBox - version: '2.1.5', - - defaults: { - padding : 15, - margin : 20, - - width : 800, - height : 600, - minWidth : 100, - minHeight : 100, - maxWidth : 9999, - maxHeight : 9999, - pixelRatio: 1, // Set to 2 for retina display support - - autoSize : true, - autoHeight : false, - autoWidth : false, - - autoResize : true, - autoCenter : !isTouch, - fitToView : true, - aspectRatio : false, - topRatio : 0.5, - leftRatio : 0.5, - - scrolling : 'auto', // 'auto', 'yes' or 'no' - wrapCSS : '', - - arrows : true, - closeBtn : true, - closeClick : false, - nextClick : false, - mouseWheel : true, - autoPlay : false, - playSpeed : 3000, - preload : 3, - modal : false, - loop : true, - - ajax : { - dataType : 'html', - headers : { 'X-fancyBox': true } - }, - iframe : { - scrolling : 'auto', - preload : true - }, - swf : { - wmode: 'transparent', - allowfullscreen : 'true', - allowscriptaccess : 'always' - }, - - keys : { - next : { - 13 : 'left', // enter - 34 : 'up', // page down - 39 : 'left', // right arrow - 40 : 'up' // down arrow - }, - prev : { - 8 : 'right', // backspace - 33 : 'down', // page up - 37 : 'right', // left arrow - 38 : 'down' // up arrow - }, - close : [27], // escape key - play : [32], // space - start/stop slideshow - toggle : [70] // letter "f" - toggle fullscreen - }, - - direction : { - next : 'left', - prev : 'right' - }, - - scrollOutside : true, - - // Override some properties - index : 0, - type : null, - href : null, - content : null, - title : null, - - // HTML templates - tpl: { - wrap : '
    ', - image : '', - iframe : '', - error : '

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

    ', - closeBtn : '', - next : '', - prev : '' - }, - - // Properties for each animation type - // Opening fancyBox - openEffect : 'fade', // 'elastic', 'fade' or 'none' - openSpeed : 250, - openEasing : 'swing', - openOpacity : true, - openMethod : 'zoomIn', - - // Closing fancyBox - closeEffect : 'fade', // 'elastic', 'fade' or 'none' - closeSpeed : 250, - closeEasing : 'swing', - closeOpacity : true, - closeMethod : 'zoomOut', - - // Changing next gallery item - nextEffect : 'elastic', // 'elastic', 'fade' or 'none' - nextSpeed : 250, - nextEasing : 'swing', - nextMethod : 'changeIn', - - // Changing previous gallery item - prevEffect : 'elastic', // 'elastic', 'fade' or 'none' - prevSpeed : 250, - prevEasing : 'swing', - prevMethod : 'changeOut', - - // Enable default helpers - helpers : { - overlay : true, - title : true - }, - - // Callbacks - onCancel : $.noop, // If canceling - beforeLoad : $.noop, // Before loading - afterLoad : $.noop, // After loading - beforeShow : $.noop, // Before changing in current item - afterShow : $.noop, // After opening - beforeChange : $.noop, // Before changing gallery item - beforeClose : $.noop, // Before closing - afterClose : $.noop // After closing - }, - - //Current state - group : {}, // Selected group - opts : {}, // Group options - previous : null, // Previous element - coming : null, // Element being loaded - current : null, // Currently loaded element - isActive : false, // Is activated - isOpen : false, // Is currently open - isOpened : false, // Have been fully opened at least once - - wrap : null, - skin : null, - outer : null, - inner : null, - - player : { - timer : null, - isActive : false - }, - - // Loaders - ajaxLoad : null, - imgPreload : null, - - // Some collections - transitions : {}, - helpers : {}, - - /* - * Static methods - */ - - open: function (group, opts) { - if (!group) { - return; - } - - if (!$.isPlainObject(opts)) { - opts = {}; - } - - // Close if already active - if (false === F.close(true)) { - return; - } - - // Normalize group - if (!$.isArray(group)) { - group = isQuery(group) ? $(group).get() : [group]; - } - - // Recheck if the type of each element is `object` and set content type (image, ajax, etc) - $.each(group, function(i, element) { - var obj = {}, - href, - title, - content, - type, - rez, - hrefParts, - selector; - - if ($.type(element) === "object") { - // Check if is DOM element - if (element.nodeType) { - element = $(element); - } - - if (isQuery(element)) { - obj = { - href : element.data('fancybox-href') || element.attr('href'), - title : $('
    ').text( element.data('fancybox-title') || element.attr('title') ).html(), - isDom : true, - element : element - }; - - if ($.metadata) { - $.extend(true, obj, element.metadata()); - } - - } else { - obj = element; - } - } - - href = opts.href || obj.href || (isString(element) ? element : null); - title = opts.title !== undefined ? opts.title : obj.title || ''; - - content = opts.content || obj.content; - type = content ? 'html' : (opts.type || obj.type); - - if (!type && obj.isDom) { - type = element.data('fancybox-type'); - - if (!type) { - rez = element.prop('class').match(/fancybox\.(\w+)/); - type = rez ? rez[1] : null; - } - } - - if (isString(href)) { - // Try to guess the content type - if (!type) { - if (F.isImage(href)) { - type = 'image'; - - } else if (F.isSWF(href)) { - type = 'swf'; - - } else if (href.charAt(0) === '#') { - type = 'inline'; - - } else if (isString(element)) { - type = 'html'; - content = element; - } - } - - // Split url into two pieces with source url and content selector, e.g, - // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" - if (type === 'ajax') { - hrefParts = href.split(/\s+/, 2); - href = hrefParts.shift(); - selector = hrefParts.shift(); - } - } - - if (!content) { - if (type === 'inline') { - if (href) { - content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 - - } else if (obj.isDom) { - content = element; - } - - } else if (type === 'html') { - content = href; - - } else if (!type && !href && obj.isDom) { - type = 'inline'; - content = element; - } - } - - $.extend(obj, { - href : href, - type : type, - content : content, - title : title, - selector : selector - }); - - group[ i ] = obj; - }); - - // Extend the defaults - F.opts = $.extend(true, {}, F.defaults, opts); - - // All options are merged recursive except keys - if (opts.keys !== undefined) { - F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; - } - - F.group = group; - - return F._start(F.opts.index); - }, - - // Cancel image loading or abort ajax request - cancel: function () { - var coming = F.coming; - - if (coming && false === F.trigger('onCancel')) { - return; - } - - F.hideLoading(); - - if (!coming) { - return; - } - - if (F.ajaxLoad) { - F.ajaxLoad.abort(); - } - - F.ajaxLoad = null; - - if (F.imgPreload) { - F.imgPreload.onload = F.imgPreload.onerror = null; - } - - if (coming.wrap) { - coming.wrap.stop(true, true).trigger('onReset').remove(); - } - - F.coming = null; - - // If the first item has been canceled, then clear everything - if (!F.current) { - F._afterZoomOut( coming ); - } - }, - - // Start closing animation if is open; remove immediately if opening/closing - close: function (event) { - F.cancel(); - - if (false === F.trigger('beforeClose')) { - return; - } - - F.unbindEvents(); - - if (!F.isActive) { - return; - } - - if (!F.isOpen || event === true) { - $('.fancybox-wrap').stop(true).trigger('onReset').remove(); - - F._afterZoomOut(); - - } else { - F.isOpen = F.isOpened = false; - F.isClosing = true; - - $('.fancybox-item, .fancybox-nav').remove(); - - F.wrap.stop(true, true).removeClass('fancybox-opened'); - - F.transitions[ F.current.closeMethod ](); - } - }, - - // Manage slideshow: - // $.fancybox.play(); - toggle slideshow - // $.fancybox.play( true ); - start - // $.fancybox.play( false ); - stop - play: function ( action ) { - var clear = function () { - clearTimeout(F.player.timer); - }, - set = function () { - clear(); - - if (F.current && F.player.isActive) { - F.player.timer = setTimeout(F.next, F.current.playSpeed); - } - }, - stop = function () { - clear(); - - D.unbind('.player'); - - F.player.isActive = false; - - F.trigger('onPlayEnd'); - }, - start = function () { - if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { - F.player.isActive = true; - - D.bind({ - 'onCancel.player beforeClose.player' : stop, - 'onUpdate.player' : set, - 'beforeLoad.player' : clear - }); - - set(); - - F.trigger('onPlayStart'); - } - }; - - if (action === true || (!F.player.isActive && action !== false)) { - start(); - } else { - stop(); - } - }, - - // Navigate to next gallery item - next: function ( direction ) { - var current = F.current; - - if (current) { - if (!isString(direction)) { - direction = current.direction.next; - } - - F.jumpto(current.index + 1, direction, 'next'); - } - }, - - // Navigate to previous gallery item - prev: function ( direction ) { - var current = F.current; - - if (current) { - if (!isString(direction)) { - direction = current.direction.prev; - } - - F.jumpto(current.index - 1, direction, 'prev'); - } - }, - - // Navigate to gallery item by index - jumpto: function ( index, direction, router ) { - var current = F.current; - - if (!current) { - return; - } - - index = getScalar(index); - - F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; - F.router = router || 'jumpto'; - - if (current.loop) { - if (index < 0) { - index = current.group.length + (index % current.group.length); - } - - index = index % current.group.length; - } - - if (current.group[ index ] !== undefined) { - F.cancel(); - - F._start(index); - } - }, - - // Center inside viewport and toggle position type to fixed or absolute if needed - reposition: function (e, onlyAbsolute) { - var current = F.current, - wrap = current ? current.wrap : null, - pos; - - if (wrap) { - pos = F._getPosition(onlyAbsolute); - - if (e && e.type === 'scroll') { - delete pos.position; - - wrap.stop(true, true).animate(pos, 200); - - } else { - wrap.css(pos); - - current.pos = $.extend({}, current.dim, pos); - } - } - }, - - update: function (e) { - var type = (e && e.originalEvent && e.originalEvent.type), - anyway = !type || type === 'orientationchange'; - - if (anyway) { - clearTimeout(didUpdate); - - didUpdate = null; - } - - if (!F.isOpen || didUpdate) { - return; - } - - didUpdate = setTimeout(function() { - var current = F.current; - - if (!current || F.isClosing) { - return; - } - - F.wrap.removeClass('fancybox-tmp'); - - if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { - F._setDimension(); - } - - if (!(type === 'scroll' && current.canShrink)) { - F.reposition(e); - } - - F.trigger('onUpdate'); - - didUpdate = null; - - }, (anyway && !isTouch ? 0 : 300)); - }, - - // Shrink content to fit inside viewport or restore if resized - toggle: function ( action ) { - if (F.isOpen) { - F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; - - // Help browser to restore document dimensions - if (isTouch) { - F.wrap.removeAttr('style').addClass('fancybox-tmp'); - - F.trigger('onUpdate'); - } - - F.update(); - } - }, - - hideLoading: function () { - D.unbind('.loading'); - - $('#fancybox-loading').remove(); - }, - - showLoading: function () { - var el, viewport; - - F.hideLoading(); - - el = $('
    ').click(F.cancel).appendTo('body'); - - // If user will press the escape-button, the request will be canceled - D.bind('keydown.loading', function(e) { - if ((e.which || e.keyCode) === 27) { - e.preventDefault(); - - F.cancel(); - } - }); - - if (!F.defaults.fixed) { - viewport = F.getViewport(); - - el.css({ - position : 'absolute', - top : (viewport.h * 0.5) + viewport.y, - left : (viewport.w * 0.5) + viewport.x - }); - } - - F.trigger('onLoading'); - }, - - getViewport: function () { - var locked = (F.current && F.current.locked) || false, - rez = { - x: W.scrollLeft(), - y: W.scrollTop() - }; - - if (locked && locked.length) { - rez.w = locked[0].clientWidth; - rez.h = locked[0].clientHeight; - - } else { - // See http://bugs.jquery.com/ticket/6724 - rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); - rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); - } - - return rez; - }, - - // Unbind the keyboard / clicking actions - unbindEvents: function () { - if (F.wrap && isQuery(F.wrap)) { - F.wrap.unbind('.fb'); - } - - D.unbind('.fb'); - W.unbind('.fb'); - }, - - bindEvents: function () { - var current = F.current, - keys; - - if (!current) { - return; - } - - // Changing document height on iOS devices triggers a 'resize' event, - // that can change document height... repeating infinitely - W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); - - keys = current.keys; - - if (keys) { - D.bind('keydown.fb', function (e) { - var code = e.which || e.keyCode, - target = e.target || e.srcElement; - - // Skip esc key if loading, because showLoading will cancel preloading - if (code === 27 && F.coming) { - return false; - } - - // Ignore key combinations and key events within form elements - if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { - $.each(keys, function(i, val) { - if (current.group.length > 1 && val[ code ] !== undefined) { - F[ i ]( val[ code ] ); - - e.preventDefault(); - return false; - } - - if ($.inArray(code, val) > -1) { - F[ i ] (); - - e.preventDefault(); - return false; - } - }); - } - }); - } - - if ($.fn.mousewheel && current.mouseWheel) { - F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { - var target = e.target || null, - parent = $(target), - canScroll = false; - - while (parent.length) { - if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { - break; - } - - canScroll = isScrollable( parent[0] ); - parent = $(parent).parent(); - } - - if (delta !== 0 && !canScroll) { - if (F.group.length > 1 && !current.canShrink) { - if (deltaY > 0 || deltaX > 0) { - F.prev( deltaY > 0 ? 'down' : 'left' ); - - } else if (deltaY < 0 || deltaX < 0) { - F.next( deltaY < 0 ? 'up' : 'right' ); - } - - e.preventDefault(); - } - } - }); - } - }, - - trigger: function (event, o) { - var ret, obj = o || F.coming || F.current; - - if (obj) { - if ($.isFunction( obj[event] )) { - ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); - } - - if (ret === false) { - return false; - } - - if (obj.helpers) { - $.each(obj.helpers, function (helper, opts) { - if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { - F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); - } - }); - } - } - - D.trigger(event); - }, - - isImage: function (str) { - return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); - }, - - isSWF: function (str) { - return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); - }, - - _start: function (index) { - var coming = {}, - obj, - href, - type, - margin, - padding; - - index = getScalar( index ); - obj = F.group[ index ] || null; - - if (!obj) { - return false; - } - - coming = $.extend(true, {}, F.opts, obj); - - // Convert margin and padding properties to array - top, right, bottom, left - margin = coming.margin; - padding = coming.padding; - - if ($.type(margin) === 'number') { - coming.margin = [margin, margin, margin, margin]; - } - - if ($.type(padding) === 'number') { - coming.padding = [padding, padding, padding, padding]; - } - - // 'modal' propery is just a shortcut - if (coming.modal) { - $.extend(true, coming, { - closeBtn : false, - closeClick : false, - nextClick : false, - arrows : false, - mouseWheel : false, - keys : null, - helpers: { - overlay : { - closeClick : false - } - } - }); - } - - // 'autoSize' property is a shortcut, too - if (coming.autoSize) { - coming.autoWidth = coming.autoHeight = true; - } - - if (coming.width === 'auto') { - coming.autoWidth = true; - } - - if (coming.height === 'auto') { - coming.autoHeight = true; - } - - /* - * Add reference to the group, so it`s possible to access from callbacks, example: - * afterLoad : function() { - * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); - * } - */ - - coming.group = F.group; - coming.index = index; - - // Give a chance for callback or helpers to update coming item (type, title, etc) - F.coming = coming; - - if (false === F.trigger('beforeLoad')) { - F.coming = null; - - return; - } - - type = coming.type; - href = coming.href; - - if (!type) { - F.coming = null; - - //If we can not determine content type then drop silently or display next/prev item if looping through gallery - if (F.current && F.router && F.router !== 'jumpto') { - F.current.index = index; - - return F[ F.router ]( F.direction ); - } - - return false; - } - - F.isActive = true; - - if (type === 'image' || type === 'swf') { - coming.autoHeight = coming.autoWidth = false; - coming.scrolling = 'visible'; - } - - if (type === 'image') { - coming.aspectRatio = true; - } - - if (type === 'iframe' && isTouch) { - coming.scrolling = 'scroll'; - } - - // Build the neccessary markup - coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); - - $.extend(coming, { - skin : $('.fancybox-skin', coming.wrap), - outer : $('.fancybox-outer', coming.wrap), - inner : $('.fancybox-inner', coming.wrap) - }); - - $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { - coming.skin.css('padding' + v, getValue(coming.padding[ i ])); - }); - - F.trigger('onReady'); - - // Check before try to load; 'inline' and 'html' types need content, others - href - if (type === 'inline' || type === 'html') { - if (!coming.content || !coming.content.length) { - return F._error( 'content' ); - } - - } else if (!href) { - return F._error( 'href' ); - } - - if (type === 'image') { - F._loadImage(); - - } else if (type === 'ajax') { - F._loadAjax(); - - } else if (type === 'iframe') { - F._loadIframe(); - - } else { - F._afterLoad(); - } - }, - - _error: function ( type ) { - $.extend(F.coming, { - type : 'html', - autoWidth : true, - autoHeight : true, - minWidth : 0, - minHeight : 0, - scrolling : 'no', - hasError : type, - content : F.coming.tpl.error - }); - - F._afterLoad(); - }, - - _loadImage: function () { - // Reset preload image so it is later possible to check "complete" property - var img = F.imgPreload = new Image(); - - img.onload = function () { - this.onload = this.onerror = null; - - F.coming.width = this.width / F.opts.pixelRatio; - F.coming.height = this.height / F.opts.pixelRatio; - - F._afterLoad(); - }; - - img.onerror = function () { - this.onload = this.onerror = null; - - F._error( 'image' ); - }; - - img.src = F.coming.href; - - if (img.complete !== true) { - F.showLoading(); - } - }, - - _loadAjax: function () { - var coming = F.coming; - - F.showLoading(); - - F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { - url: coming.href, - error: function (jqXHR, textStatus) { - if (F.coming && textStatus !== 'abort') { - F._error( 'ajax', jqXHR ); - - } else { - F.hideLoading(); - } - }, - success: function (data, textStatus) { - if (textStatus === 'success') { - coming.content = data; - - F._afterLoad(); - } - } - })); - }, - - _loadIframe: function() { - var coming = F.coming, - iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) - .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) - .attr('src', coming.href); - - // This helps IE - $(coming.wrap).bind('onReset', function () { - try { - $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); - } catch (e) {} - }); - - if (coming.iframe.preload) { - F.showLoading(); - - iframe.one('load', function() { - $(this).data('ready', 1); - - // iOS will lose scrolling if we resize - if (!isTouch) { - $(this).bind('load.fb', F.update); - } - - // Without this trick: - // - iframe won't scroll on iOS devices - // - IE7 sometimes displays empty iframe - $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); - - F._afterLoad(); - }); - } - - coming.content = iframe.appendTo( coming.inner ); - - if (!coming.iframe.preload) { - F._afterLoad(); - } - }, - - _preloadImages: function() { - var group = F.group, - current = F.current, - len = group.length, - cnt = current.preload ? Math.min(current.preload, len - 1) : 0, - item, - i; - - for (i = 1; i <= cnt; i += 1) { - item = group[ (current.index + i ) % len ]; - - if (item.type === 'image' && item.href) { - new Image().src = item.href; - } - } - }, - - _afterLoad: function () { - var coming = F.coming, - previous = F.current, - placeholder = 'fancybox-placeholder', - current, - content, - type, - scrolling, - href, - embed; - - F.hideLoading(); - - if (!coming || F.isActive === false) { - return; - } - - if (false === F.trigger('afterLoad', coming, previous)) { - coming.wrap.stop(true).trigger('onReset').remove(); - - F.coming = null; - - return; - } - - if (previous) { - F.trigger('beforeChange', previous); - - previous.wrap.stop(true).removeClass('fancybox-opened') - .find('.fancybox-item, .fancybox-nav') - .remove(); - } - - F.unbindEvents(); - - current = coming; - content = coming.content; - type = coming.type; - scrolling = coming.scrolling; - - $.extend(F, { - wrap : current.wrap, - skin : current.skin, - outer : current.outer, - inner : current.inner, - current : current, - previous : previous - }); - - href = current.href; - - switch (type) { - case 'inline': - case 'ajax': - case 'html': - if (current.selector) { - content = $('
    ').html(content).find(current.selector); - - } else if (isQuery(content)) { - if (!content.data(placeholder)) { - content.data(placeholder, $('
    ').insertAfter( content ).hide() ); - } - - content = content.show().detach(); - - current.wrap.bind('onReset', function () { - if ($(this).find(content).length) { - content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); - } - }); - } - break; - - case 'image': - content = current.tpl.image.replace(/\{href\}/g, href); - break; - - case 'swf': - content = ''; - embed = ''; - - $.each(current.swf, function(name, val) { - content += ''; - embed += ' ' + name + '="' + val + '"'; - }); - - content += ''; - break; - } - - if (!(isQuery(content) && content.parent().is(current.inner))) { - current.inner.append( content ); - } - - // Give a chance for helpers or callbacks to update elements - F.trigger('beforeShow'); - - // Set scrolling before calculating dimensions - current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); - - // Set initial dimensions and start position - F._setDimension(); - - F.reposition(); - - F.isOpen = false; - F.coming = null; - - F.bindEvents(); - - if (!F.isOpened) { - $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); - - } else if (previous.prevMethod) { - F.transitions[ previous.prevMethod ](); - } - - F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); - - F._preloadImages(); - }, - - _setDimension: function () { - var viewport = F.getViewport(), - steps = 0, - canShrink = false, - canExpand = false, - wrap = F.wrap, - skin = F.skin, - inner = F.inner, - current = F.current, - width = current.width, - height = current.height, - minWidth = current.minWidth, - minHeight = current.minHeight, - maxWidth = current.maxWidth, - maxHeight = current.maxHeight, - scrolling = current.scrolling, - scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, - margin = current.margin, - wMargin = getScalar(margin[1] + margin[3]), - hMargin = getScalar(margin[0] + margin[2]), - wPadding, - hPadding, - wSpace, - hSpace, - origWidth, - origHeight, - origMaxWidth, - origMaxHeight, - ratio, - width_, - height_, - maxWidth_, - maxHeight_, - iframe, - body; - - // Reset dimensions so we could re-check actual size - wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); - - wPadding = getScalar(skin.outerWidth(true) - skin.width()); - hPadding = getScalar(skin.outerHeight(true) - skin.height()); - - // Any space between content and viewport (margin, padding, border, title) - wSpace = wMargin + wPadding; - hSpace = hMargin + hPadding; - - origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; - origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; - - if (current.type === 'iframe') { - iframe = current.content; - - if (current.autoHeight && iframe.data('ready') === 1) { - try { - if (iframe[0].contentWindow.document.location) { - inner.width( origWidth ).height(9999); - - body = iframe.contents().find('body'); - - if (scrollOut) { - body.css('overflow-x', 'hidden'); - } - - origHeight = body.outerHeight(true); - } - - } catch (e) {} - } - - } else if (current.autoWidth || current.autoHeight) { - inner.addClass( 'fancybox-tmp' ); - - // Set width or height in case we need to calculate only one dimension - if (!current.autoWidth) { - inner.width( origWidth ); - } - - if (!current.autoHeight) { - inner.height( origHeight ); - } - - if (current.autoWidth) { - origWidth = inner.width(); - } - - if (current.autoHeight) { - origHeight = inner.height(); - } - - inner.removeClass( 'fancybox-tmp' ); - } - - width = getScalar( origWidth ); - height = getScalar( origHeight ); - - ratio = origWidth / origHeight; - - // Calculations for the content - minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); - maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); - - minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); - maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); - - // These will be used to determine if wrap can fit in the viewport - origMaxWidth = maxWidth; - origMaxHeight = maxHeight; - - if (current.fitToView) { - maxWidth = Math.min(viewport.w - wSpace, maxWidth); - maxHeight = Math.min(viewport.h - hSpace, maxHeight); - } - - maxWidth_ = viewport.w - wMargin; - maxHeight_ = viewport.h - hMargin; - - if (current.aspectRatio) { - if (width > maxWidth) { - width = maxWidth; - height = getScalar(width / ratio); - } - - if (height > maxHeight) { - height = maxHeight; - width = getScalar(height * ratio); - } - - if (width < minWidth) { - width = minWidth; - height = getScalar(width / ratio); - } - - if (height < minHeight) { - height = minHeight; - width = getScalar(height * ratio); - } - - } else { - width = Math.max(minWidth, Math.min(width, maxWidth)); - - if (current.autoHeight && current.type !== 'iframe') { - inner.width( width ); - - height = inner.height(); - } - - height = Math.max(minHeight, Math.min(height, maxHeight)); - } - - // Try to fit inside viewport (including the title) - if (current.fitToView) { - inner.width( width ).height( height ); - - wrap.width( width + wPadding ); - - // Real wrap dimensions - width_ = wrap.width(); - height_ = wrap.height(); - - if (current.aspectRatio) { - while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { - if (steps++ > 19) { - break; - } - - height = Math.max(minHeight, Math.min(maxHeight, height - 10)); - width = getScalar(height * ratio); - - if (width < minWidth) { - width = minWidth; - height = getScalar(width / ratio); - } - - if (width > maxWidth) { - width = maxWidth; - height = getScalar(width / ratio); - } - - inner.width( width ).height( height ); - - wrap.width( width + wPadding ); - - width_ = wrap.width(); - height_ = wrap.height(); - } - - } else { - width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); - height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); - } - } - - if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { - width += scrollOut; - } - - inner.width( width ).height( height ); - - wrap.width( width + wPadding ); - - width_ = wrap.width(); - height_ = wrap.height(); - - canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; - canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); - - $.extend(current, { - dim : { - width : getValue( width_ ), - height : getValue( height_ ) - }, - origWidth : origWidth, - origHeight : origHeight, - canShrink : canShrink, - canExpand : canExpand, - wPadding : wPadding, - hPadding : hPadding, - wrapSpace : height_ - skin.outerHeight(true), - skinSpace : skin.height() - height - }); - - if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { - inner.height('auto'); - } - }, - - _getPosition: function (onlyAbsolute) { - var current = F.current, - viewport = F.getViewport(), - margin = current.margin, - width = F.wrap.width() + margin[1] + margin[3], - height = F.wrap.height() + margin[0] + margin[2], - rez = { - position: 'absolute', - top : margin[0], - left : margin[3] - }; - - if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { - rez.position = 'fixed'; - - } else if (!current.locked) { - rez.top += viewport.y; - rez.left += viewport.x; - } - - rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); - rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); - - return rez; - }, - - _afterZoomIn: function () { - var current = F.current; - - if (!current) { - return; - } - - F.isOpen = F.isOpened = true; - - F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); - - F.update(); - - // Assign a click event - if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { - F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { - if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { - e.preventDefault(); - - F[ current.closeClick ? 'close' : 'next' ](); - } - }); - } - - // Create a close button - if (current.closeBtn) { - $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { - e.preventDefault(); - - F.close(); - }); - } - - // Create navigation arrows - if (current.arrows && F.group.length > 1) { - if (current.loop || current.index > 0) { - $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); - } - - if (current.loop || current.index < F.group.length - 1) { - $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); - } - } - - F.trigger('afterShow'); - - // Stop the slideshow if this is the last item - if (!current.loop && current.index === current.group.length - 1) { - - F.play( false ); - - } else if (F.opts.autoPlay && !F.player.isActive) { - F.opts.autoPlay = false; - - F.play(true); - } - }, - - _afterZoomOut: function ( obj ) { - obj = obj || F.current; - - $('.fancybox-wrap').trigger('onReset').remove(); - - $.extend(F, { - group : {}, - opts : {}, - router : false, - current : null, - isActive : false, - isOpened : false, - isOpen : false, - isClosing : false, - wrap : null, - skin : null, - outer : null, - inner : null - }); - - F.trigger('afterClose', obj); - } - }); - - /* - * Default transitions - */ - - F.transitions = { - getOrigPosition: function () { - var current = F.current, - element = current.element, - orig = current.orig, - pos = {}, - width = 50, - height = 50, - hPadding = current.hPadding, - wPadding = current.wPadding, - viewport = F.getViewport(); - - if (!orig && current.isDom && element.is(':visible')) { - orig = element.find('img:first'); - - if (!orig.length) { - orig = element; - } - } - - if (isQuery(orig)) { - pos = orig.offset(); - - if (orig.is('img')) { - width = orig.outerWidth(); - height = orig.outerHeight(); - } - - } else { - pos.top = viewport.y + (viewport.h - height) * current.topRatio; - pos.left = viewport.x + (viewport.w - width) * current.leftRatio; - } - - if (F.wrap.css('position') === 'fixed' || current.locked) { - pos.top -= viewport.y; - pos.left -= viewport.x; - } - - pos = { - top : getValue(pos.top - hPadding * current.topRatio), - left : getValue(pos.left - wPadding * current.leftRatio), - width : getValue(width + wPadding), - height : getValue(height + hPadding) - }; - - return pos; - }, - - step: function (now, fx) { - var ratio, - padding, - value, - prop = fx.prop, - current = F.current, - wrapSpace = current.wrapSpace, - skinSpace = current.skinSpace; - - if (prop === 'width' || prop === 'height') { - ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); - - if (F.isClosing) { - ratio = 1 - ratio; - } - - padding = prop === 'width' ? current.wPadding : current.hPadding; - value = now - padding; - - F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); - F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); - } - }, - - zoomIn: function () { - var current = F.current, - startPos = current.pos, - effect = current.openEffect, - elastic = effect === 'elastic', - endPos = $.extend({opacity : 1}, startPos); - - // Remove "position" property that breaks older IE - delete endPos.position; - - if (elastic) { - startPos = this.getOrigPosition(); - - if (current.openOpacity) { - startPos.opacity = 0.1; - } - - } else if (effect === 'fade') { - startPos.opacity = 0.1; - } - - F.wrap.css(startPos).animate(endPos, { - duration : effect === 'none' ? 0 : current.openSpeed, - easing : current.openEasing, - step : elastic ? this.step : null, - complete : F._afterZoomIn - }); - }, - - zoomOut: function () { - var current = F.current, - effect = current.closeEffect, - elastic = effect === 'elastic', - endPos = {opacity : 0.1}; - - if (elastic) { - endPos = this.getOrigPosition(); - - if (current.closeOpacity) { - endPos.opacity = 0.1; - } - } - - F.wrap.animate(endPos, { - duration : effect === 'none' ? 0 : current.closeSpeed, - easing : current.closeEasing, - step : elastic ? this.step : null, - complete : F._afterZoomOut - }); - }, - - changeIn: function () { - var current = F.current, - effect = current.nextEffect, - startPos = current.pos, - endPos = { opacity : 1 }, - direction = F.direction, - distance = 200, - field; - - startPos.opacity = 0.1; - - if (effect === 'elastic') { - field = direction === 'down' || direction === 'up' ? 'top' : 'left'; - - if (direction === 'down' || direction === 'right') { - startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); - endPos[ field ] = '+=' + distance + 'px'; - - } else { - startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); - endPos[ field ] = '-=' + distance + 'px'; - } - } - - // Workaround for http://bugs.jquery.com/ticket/12273 - if (effect === 'none') { - F._afterZoomIn(); - - } else { - F.wrap.css(startPos).animate(endPos, { - duration : current.nextSpeed, - easing : current.nextEasing, - complete : F._afterZoomIn - }); - } - }, - - changeOut: function () { - var previous = F.previous, - effect = previous.prevEffect, - endPos = { opacity : 0.1 }, - direction = F.direction, - distance = 200; - - if (effect === 'elastic') { - endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; - } - - previous.wrap.animate(endPos, { - duration : effect === 'none' ? 0 : previous.prevSpeed, - easing : previous.prevEasing, - complete : function () { - $(this).trigger('onReset').remove(); - } - }); - } - }; - - /* - * Overlay helper - */ - - F.helpers.overlay = { - defaults : { - closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay - speedOut : 200, // duration of fadeOut animation - showEarly : true, // indicates if should be opened immediately or wait until the content is ready - css : {}, // custom CSS properties - locked : !isTouch, // if true, the content will be locked into overlay - fixed : true // if false, the overlay CSS position property will not be set to "fixed" - }, - - overlay : null, // current handle - fixed : false, // indicates if the overlay has position "fixed" - el : $('html'), // element that contains "the lock" - - // Public methods - create : function(opts) { - var parent; - - opts = $.extend({}, this.defaults, opts); - - if (this.overlay) { - this.close(); - } - - parent = F.coming ? F.coming.parent : opts.parent; - - this.overlay = $('
    ').appendTo( parent && parent.lenth ? parent : 'body' ); - this.fixed = false; - - if (opts.fixed && F.defaults.fixed) { - this.overlay.addClass('fancybox-overlay-fixed'); - - this.fixed = true; - } - }, - - open : function(opts) { - var that = this; - - opts = $.extend({}, this.defaults, opts); - - if (this.overlay) { - this.overlay.unbind('.overlay').width('auto').height('auto'); - - } else { - this.create(opts); - } - - if (!this.fixed) { - W.bind('resize.overlay', $.proxy( this.update, this) ); - - this.update(); - } - - if (opts.closeClick) { - this.overlay.bind('click.overlay', function(e) { - if ($(e.target).hasClass('fancybox-overlay')) { - if (F.isActive) { - F.close(); - } else { - that.close(); - } - - return false; - } - }); - } - - this.overlay.css( opts.css ).show(); - }, - - close : function() { - W.unbind('resize.overlay'); - - if (this.el.hasClass('fancybox-lock')) { - $('.fancybox-margin').removeClass('fancybox-margin'); - - this.el.removeClass('fancybox-lock'); - - W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); - } - - $('.fancybox-overlay').remove().hide(); - - $.extend(this, { - overlay : null, - fixed : false - }); - }, - - // Private, callbacks - - update : function () { - var width = '100%', offsetWidth; - - // Reset width/height so it will not mess - this.overlay.width(width).height('100%'); - - // jQuery does not return reliable result for IE - if (IE) { - offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); - - if (D.width() > offsetWidth) { - width = D.width(); - } - - } else if (D.width() > W.width()) { - width = D.width(); - } - - this.overlay.width(width).height(D.height()); - }, - - // This is where we can manipulate DOM, because later it would cause iframes to reload - onReady : function (opts, obj) { - var overlay = this.overlay; - - $('.fancybox-overlay').stop(true, true); - - if (!overlay) { - this.create(opts); - } - - if (opts.locked && this.fixed && obj.fixed) { - obj.locked = this.overlay.append( obj.wrap ); - obj.fixed = false; - } - - if (opts.showEarly === true) { - this.beforeShow.apply(this, arguments); - } - }, - - beforeShow : function(opts, obj) { - if (obj.locked && !this.el.hasClass('fancybox-lock')) { - if (this.fixPosition !== false) { - $('*').filter(function(){ - return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); - }).addClass('fancybox-margin'); - } - - this.el.addClass('fancybox-margin'); - - this.scrollV = W.scrollTop(); - this.scrollH = W.scrollLeft(); - - this.el.addClass('fancybox-lock'); - - W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); - } - - this.open(opts); - }, - - onUpdate : function() { - if (!this.fixed) { - this.update(); - } - }, - - afterClose: function (opts) { - // Remove overlay if exists and fancyBox is not opening - // (e.g., it is not being open using afterClose callback) - if (this.overlay && !F.coming) { - this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); - } - } - }; - - /* - * Title helper - */ - - F.helpers.title = { - defaults : { - type : 'float', // 'float', 'inside', 'outside' or 'over', - position : 'bottom' // 'top' or 'bottom' - }, - - beforeShow: function (opts) { - var current = F.current, - text = current.title, - type = opts.type, - title, - target; - - if ($.isFunction(text)) { - text = text.call(current.element, current); - } - - if (!isString(text) || $.trim(text) === '') { - return; - } - - title = $('
    ' + text + '
    '); - - switch (type) { - case 'inside': - target = F.skin; - break; - - case 'outside': - target = F.wrap; - break; - - case 'over': - target = F.inner; - break; - - default: // 'float' - target = F.skin; - - title.appendTo('body'); - - if (IE) { - title.width( title.width() ); - } - - title.wrapInner(''); - - //Increase bottom margin so this title will also fit into viewport - F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); - break; - } - - title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); - } - }; - - // jQuery plugin initialization - $.fn.fancybox = function (options) { - var index, - that = $(this), - selector = this.selector || '', - run = function(e) { - var what = $(this).blur(), idx = index, relType, relVal; - - if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { - relType = options.groupAttr || 'data-fancybox-group'; - relVal = what.attr(relType); - - if (!relVal) { - relType = 'rel'; - relVal = what.get(0)[ relType ]; - } - - if (relVal && relVal !== '' && relVal !== 'nofollow') { - what = selector.length ? $(selector) : that; - what = what.filter('[' + relType + '="' + relVal + '"]'); - idx = what.index(this); - } - - options.index = idx; - - // Stop an event from bubbling if everything is fine - if (F.open(what, options) !== false) { - e.preventDefault(); - } - } - }; - - options = options || {}; - index = options.index || 0; - - if (!selector || options.live === false) { - that.unbind('click.fb-start').bind('click.fb-start', run); - - } else { - D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); - } - - this.filter('[data-fancybox-start=1]').trigger('click'); - - return this; - }; - - // Tests that need a body at doc ready - D.ready(function() { - var w1, w2; - - if ( $.scrollbarWidth === undefined ) { - // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth - $.scrollbarWidth = function() { - var parent = $('
    ').appendTo('body'), - child = parent.children(), - width = child.innerWidth() - child.height( 99 ).innerWidth(); - - parent.remove(); - - return width; - }; - } - - if ( $.support.fixedPosition === undefined ) { - $.support.fixedPosition = (function() { - var elem = $('
    ').appendTo('body'), - fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); - - elem.remove(); - - return fixed; - }()); - } - - $.extend(F.defaults, { - scrollbarWidth : $.scrollbarWidth(), - fixed : $.support.fixedPosition, - parent : $('body') - }); - - //Get real width of page scroll-bar - w1 = $(window).width(); - - H.addClass('fancybox-lock-test'); - - w2 = $(window).width(); - - H.removeClass('fancybox-lock-test'); - - $("").appendTo("head"); - }); - -}(window, document, jQuery)); \ No newline at end of file diff --git a/fancybox/jquery.fancybox.pack.js b/fancybox/jquery.fancybox.pack.js deleted file mode 100644 index 2db1280..0000000 --- a/fancybox/jquery.fancybox.pack.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ -(function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0
    ',image:'',iframe:'",error:'

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

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

    + +
    + + + +
    +
    + + + + + + + +
    + +
    +
    + +
    + + + + gallery + + + +
    + + + +
    + +
    + + +
    + + +
    + +
    + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/1.jpg b/img/1.jpg new file mode 100644 index 0000000..f13cb97 Binary files /dev/null and b/img/1.jpg differ diff --git a/img/cart_cover.jpg b/img/cart_cover.jpg new file mode 100644 index 0000000..84eebd4 Binary files /dev/null and b/img/cart_cover.jpg differ diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100644 index 0000000..65d1c84 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/logo.png b/img/logo.png new file mode 100644 index 0000000..8bf5b2a Binary files /dev/null and b/img/logo.png differ diff --git a/img/logo3.png b/img/logo3.png new file mode 100644 index 0000000..f236d4d Binary files /dev/null and b/img/logo3.png differ diff --git a/img/placeholder.jpg b/img/placeholder.jpg new file mode 100644 index 0000000..de42abd Binary files /dev/null and b/img/placeholder.jpg differ diff --git a/img/pure-bg.png b/img/pure-bg.png new file mode 100644 index 0000000..39a084a Binary files /dev/null and b/img/pure-bg.png differ diff --git a/img/quote/danger.svg b/img/quote/danger.svg new file mode 100644 index 0000000..540848c --- /dev/null +++ b/img/quote/danger.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/img/quote/info.svg b/img/quote/info.svg new file mode 100644 index 0000000..fea8119 --- /dev/null +++ b/img/quote/info.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/img/quote/quote-left.svg b/img/quote/quote-left.svg new file mode 100644 index 0000000..d73aa5e --- /dev/null +++ b/img/quote/quote-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/quote/success.svg b/img/quote/success.svg new file mode 100644 index 0000000..41283bc --- /dev/null +++ b/img/quote/success.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/img/quote/warning.svg b/img/quote/warning.svg new file mode 100644 index 0000000..2bc6f75 --- /dev/null +++ b/img/quote/warning.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/index.html b/index.html index a781d5d..ce3058e 100644 --- a/index.html +++ b/index.html @@ -1,500 +1,641 @@ + - - - - - - - 向着光亮的地方 - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    - -
    - -
    - - -
    - - -

    - H5(nuxt)项目引入字体(入门到放弃) -

    - - -
    - -
    - -

    H5(nuxt)项目引入字体

    方法1:
    1.下载所需要的字体,.ttf格式本文以(FZCYJ.ttf 为例)
    2.先自己定义一个font.css文件,字体文件的路径引入

    -
    1
    2
    3
    4
    5
    6
    7

    @font-face {
    font-family: "华文行楷";
    src: url('stxingka.ttf');
    font-weight: normal;
    font-style: normal;
    }
    - -

    3.App.vue中的style里引入

    -
    1
    2
    3
    <style lang="less" rel="stylesheet/less">
    @import "./common/font/font.css";
    </style>
    - -

    4、添加loader

    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    module: {
    rules: [
    {
    test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
    loader: 'url-loader',
    options: {
    limit: 10000,
    name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
    }
    }
    ]
    }
    - -

    5.使用

    -
    1
    2
    3
    4
    5
    <style type="less" scoped>
    .header{
    font-family: "华文行楷"
    }
    </style>
    - -

    上述方法弊端:

    -
    ttf文件教大,页面加载过慢,影响用户体验
    -解决方向:压缩ttf文件

    **方法2: font-spider(字蛛)压缩ttf**

    -
    先附上官方链接:http://font-spider.org/
    -
    -GITHUB:https://github.com/aui/font-spider/blob/master/README-ZH-CN.md
    -
    -使用教程:https://www.jianshu.com/p/8ef246692d14

    上述方法弊端

    -
    font-spider原理是解析html页面中的含有中文字的标签,然后解析标签,将需要的ttf压缩,将压缩后的ttf文件放到项目中去,**但是,这种ttf文件会解析页面中已经存在的字体,而我们的项目是单页面应用,都是打包后的js文件,没有像静态页面中已存在的字体**,所以当我们把压缩好的ttf文件放到静态页面中尝试时,确实是有效的,可当我们放到项目中就失效了,这是我能想到能解释这个现象的唯一原因了。

    所以怎么办?
    方法3:
    在万籁俱寂之时,为我无意间翻到了一个网站叫‘有字库“,网址是:https://www.webfont.com
    具体使用方法

    -
    1、注册登录
    -2、检索到需要的字体
    -3、点击使用,下面照搬就行

    daeca34ed56e56127dd312e6d19e15b9.png
    24a30303d048afa88cfb74b7d650d106.png
    这个在线字体库的唯一的优势就是它的js文件通过cdn加速过,加载字体文件的速度提高了,其他并没有什么特别之处。但是,为什么我后来又放弃了呢?当你搜一下下面的字体时突然发现
    12dfb4e51fb5e840c3d2a75abfa4fb98.png
    兄弟有钱不?

    -

    总结

    如果你的产品跟你说:“去他妈的用户体验。”我强烈推荐方法1
    -如果你使用的前端项目不是基于node应用使用方法2,且你不想这么费事,那就方法3。

    敲黑板

    天真的你们是不是以为这就完了,还有方法4呢?我怎么可能不解决问题就结束了呢?史上最强的解决方案来啦。。。
    -我:"那个,口渴吗?"
    -她:“什么事?”
    -我:“这个图能帮我切一下吗?”
    -她:“行啊!”
    -我:“顺便把这个字体也放进去吧!”
    -她:“可以的,现在就要吗?”
    -我:“没事没事,你慢慢做,我不急”
    -...半个小时后,美团的小哥在楼梯间吼道:“徐先生,徐先生,您的奶茶到了!”
    -完结
    - -
    - -
    - -
    + + - - -
    - -
    + + + + + + 向着光亮的地方 - <header class="article-header"> - - - <h1 itemprop="name"> - <a class="article-title" href="/2019/10/12/移动端H5/">移动端H5碰到的问题</a> - </h1> - - - </header> - - <div class="article-entry" itemprop="articleBody"> - - <h5 id="1、ios键盘唤起,键盘收起以后页面不归位"><a href="#1、ios键盘唤起,键盘收起以后页面不归位" class="headerlink" title="1、ios键盘唤起,键盘收起以后页面不归位"></a>1、ios键盘唤起,键盘收起以后页面不归位</h5><p><strong>问题描述:</strong><br> 输入内容,软键盘弹出,页面内容整体上移,但是键盘收起,页面内容不下滑<br><strong>出现原因分析:</strong><br> 固定定位的元素 在元素内 input 框聚焦的时候 弹出的软键盘占位 失去焦点的时候软键盘消失 但是还是占位的 导致input框不能再次输入 在失去焦点的时候给一个事件</p> -<p><strong>解决办法:在input光标离开时重新设定滚动条的滚动高度<br>方法1:</strong></p> -<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><div class="list-warp"></span><br><span class="line"> <div class="title"><span>投·被保险人姓名</span></div></span><br><span class="line"> <div class="content"></span><br><span class="line"> <input class="content-input" </span><br><span class="line"> placeholder="请输入姓名"</span><br><span class="line"> v-model="peopleList.name"</span><br><span class="line"> @focus="changefocus()"</span><br><span class="line"> @blur.prevent="changeBlur()"/> </div></span><br><span class="line"> </div></span><br></pre></td></tr></table></figure> - -<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">changeBlur(){</span><br><span class="line"> let u = navigator.userAgent, app = navigator.appVersion;</span><br><span class="line"> let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);</span><br><span class="line"> if(isIOS){</span><br><span class="line"> setTimeout(() => {</span><br><span class="line"> const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0</span><br><span class="line"> window.scrollTo(0, Math.max(scrollHeight - 1, 0))</span><br><span class="line"> }, 200)</span><br><span class="line"> }</span><br><span class="line"> }</span><br></pre></td></tr></table></figure> - -<p><strong>方法2:原理同上-输入框失去焦点(即键盘隐藏时),手动调整页面</strong><br><a href="https://blog.csdn.net/m0_37520980/article/details/86305488" target="_blank" rel="noopener"><strong>原文链接</strong></a><br><strong>scrollIntoViewIfNeeded</strong><br>如果设置为 true,并且当前元素在视窗的可见范围内不可见,元素将尽量滚动到父元素可视区域的中部位置(垂直方向)<br>如果设置为 false,并且当前元素在视窗的可见范围内不可见,元素将尽量滚动到父元素可视区域距离最近的一边,至于到底滚动到父元素的顶部还是底部,取决于滚动的子元素距离父元素的哪一边比较近。<br>弊端:兼容性不足</p> -<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">setTimeout(()=>{</span><br><span class="line"> document.activeElement.scrollIntoViewIfNeeded(true);</span><br><span class="line">},100)</span><br></pre></td></tr></table></figure> - -<h5 id="2、-extend-x-y-注意项"><a href="#2、-extend-x-y-注意项" class="headerlink" title="2、$.extend(x, y)注意项"></a>2、$.extend(x, y)注意项</h5><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">let x = {a: 1}, y = {b: 2};</span><br><span class="line">$.extend(x, y);</span><br><span class="line">console.log(x, y);//{a: 1, b: 2}, {b: 2}</span><br><span class="line">注意:x的指针发生变化,当用到共用属性时,一定到放在后面参数的位子,也就是y的位置。否则共用属性会发生改变</span><br></pre></td></tr></table></figure> - - </div> - <footer class="article-footer"> - <a data-url="http://yoursite.com/2019/10/12/移动端H5/" data-id="ck1n3ivh500048cgv3unvncr9" class="article-share-link">Share</a> - - - </footer> - </div> - -</article> - + + + + + + + + + -
    - -
    - - -
    - - -

    - JS开发技巧 -

    - + + -
    - -
    - -

    String Skill:字符串技巧

      -
    • 对比时间 – 时间个位数形式需补0

      -
      1
      2
      3
      4
      const time1 = "2019-02-14 21:00:00";
      const time2 = "2019-05-01 09:00:00";
      const overtime = time1 > time2;
      // overtime => false
      -
    • -
    • 格式化金钱 – 三位数一逗

      -
      1
      2
      3
      const ThousandNum = num => num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
      const money = ThousandNum(20190214.89438);
      // money => "20,190,214"
      -
    • -
    • 生成随机ID – (常见的UUID-俗称宇宙唯一ID)

      -
      1
      2
      3
      const RandomId = len => Math.random().toString(36).substr(3, len);
      const id = RandomId(10);
      // id => "jg7zpgiqva"
      -
    • -
    • 生成随机HEX色值

      -
      1
      2
      3
      const RandomColor = () => "#" + Math.floor(Math.random() * 0xffffff).toString(16).padEnd(6, "0");
      const color = RandomColor();
      // color => "#f03665"
      -
    • -
    • 生成星级评分
      const StartScore = rate => “★★★★★☆☆☆☆☆”.slice(5 - rate, 10 - rate);
      const start = StartScore(3);
      // start => “★★★”

      -
    • -
    • 操作URL查询参数

      -
      1
      2
      3
      const params = new URLSearchParams(location.search.replace(/\?/ig, "")); // location.search = "?name=young&sex=male"
      params.has("young"); // true
      params.get("sex"); // "male"
      -
    • -
    • 获取web-view中url地址和参数

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      const getUrlToParams = function(webViewUrl) {
      let params = {};
         if(webViewUrl) {
         let shareUrl = webViewUrl.split("?")[0];
         let parts = webViewUrl.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
            params[key] = value;
      });
          params['shareUrl'] = shareUrl;
         }
         return params;
      }
        console.log(getUrlToParams('http://www.baidu.com?name=lrxu&age=23'))
      // { age: '23', name: 'lrxu', shareUrl: 'http://www.baidu.com' }
      -
    • -
    • 把u=1&a=2参数转对象

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      const getJoinToParams = function(body) {
        let params = {};
        if(notEmpty(body)) {
          let parts = body.replace(/([^=&]+)=([^&]*)/gi, function(m,key,value) {
            params[key] = value;
          });
        }
        return params;
      }
        console.log(getJoinToParams('u=1&a=2',) {u: 1, a: 2})
      - -
    • + + + + + + + +
      +
      + +
      +
      +
      +
      + +
      +
      + + + +
      +
      + +
      + + + +
      + + +
      + +

      + +
      + + + +
      +
      + + + + +
    - -
    - - - -
    - -
    - - -
    - - -

    - css技巧 -

    - - -
    - -
    - -

    常用CSS

    1. 快速重置表单元素 unset

    原始的 button 按钮要重置挺麻烦的。洋洋洒洒的要设置好几个属性,就像下面这样:

    -
    1
    2
    3
    4
    5
    6
    7
    8
    button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    outline: none;
    padding: 0;
    }
    - -

    其实你只需要这样就可以(像平时用的特别多的 input textarea ):

    -
    1
    button { all: unset; }
    - -

    2.文本省略号显示

    -

    文本省略号是非常常见的需求,而省略号展示又通常分为俩种情况折行和不折行。不折行:

    -
    1
    2
    3
    4
    5
    6
    div {  
    white-space:nowrap;/* 规定文本是否折行 */
    overflow: hidden;/* 规定超出内容宽度的元素隐藏 */
    text-overflow: ellipsis;
    /* 规定超出的内容文本省略号显示,通常跟上面的属性连用,因为没有上面的属性不会触发超出规定的内容 */
    }
    - -

    折行(能主动控制行数,这里设置的超出 4 行显示省略号):

    -
    1
    2
    3
    4
    5
    6
    7
    div {      
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box; /* 将对象作为弹性伸缩盒子模型显示 */
    -webkit-line-clamp: 4; /* 控制最多显示几行 */
    -webkit-box-orient: vertical; /* 设置或检索伸缩盒对象的子元素的排列方式 */
    }
    - -

    3.改变盒模型的宽高计算方式

    默认:盒模型的宽高 = 内容宽 + padding + border通常我们写页面的时候会直接固定好元素的宽高,后面才会在接着设置 padding,border 这些细节。然后设置了 padding,border 之后发现元素尺寸发生了变化,这种情况很是烦人,所以我们需要下面的理想情况↓
    理想: 盒模型直接设置的宽为最终宽,不会随 padding,border 改变

    -
    1
    box-sizing:border-box;
    +
    + + + +
    + + + + + +
    +
    + +
    + + + + + +
    +

    + 十月 12日, 2019 +

    +

    + + + + + + +

    +

    + + H5项目引入字体方法1:1.下载所需要的字体,.ttf格式本文以(FZCYJ.ttf 为例)2.先自己定义一个font.css文件,字体文件的路径引入 +1... + +

    + +
    +
    + +
    + + + + + +
    +

    + 十月 12日, 2019 +

    +

    + + + + + + +

    +

    + + 1、ios键盘唤起,键盘收起以后页面不归位问题描述: 输入内容,软键盘弹出,页面内容整体上移,但是键盘收起,页面内容不下滑出现原因分析: 固定... + +

    + +
    +
    + +
    + + + + + +
    +

    + 十月 12日, 2019 +

    +

    + + + + + + +

    +

    + + String Skill:字符串技巧 +对比时间 – 时间个位数形式需补0 +1234const time1 = "2019-02-14 21:0... + +

    + +
    +
    + +
    + + + + + +
    +

    + 十月 12日, 2019 +

    +

    + + + + + + +

    +

    + + 常用CSS1. 快速重置表单元素 unset 原始的 button 按钮要重置挺麻烦的。洋洋洒洒的要设置好几个属性,就像下面这样: +12345678b... + +

    + +
    +
    + +
    + + + + + + +
    + + +
    + + +
    + + + - -
    - -
    - -
    - -
    - - -
    - - -

    - Hello World -

    - +

    +

    + Hexo Theme Annie by Sariay. + 简体 + 繁體 +

    +
    + + + - - -
    - -

    Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

    -

    Quick Start

    Create a new post

    1
    $ hexo new "My New Post"
    - -

    More info: Writing

    -

    Run server

    1
    $ hexo server
    - -

    More info: Server

    -

    Generate static files

    1
    $ hexo generate
    - -

    More info: Generating

    -

    Deploy to remote sites

    1
    $ hexo deploy
    - -

    More info: Deployment

    - - -
    - -
    - -
    + + + - -
    - - - -
    -
    - -
    - -
    -
    -
    - - + +
    + +
    - - - + - + + + + + + + -
    - + + + + + + + + \ No newline at end of file diff --git a/js/jquery.min.js b/js/jquery.min.js new file mode 100644 index 0000000..e836475 --- /dev/null +++ b/js/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; +}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="
    a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:l.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("', + + // Preload iframe before displaying it + // This allows to calculate iframe content width and height + // (note: Due to "Same Origin Policy", you can't get cross domain data). + preload: true, + + // Custom CSS styling for iframe wrapping element + // You can use this to set custom iframe dimensions + css: {}, + + // Iframe tag attributes + attr: { + scrolling: "auto" + } + }, + + // For HTML5 video only + video: { + tpl: + '", + format: "", // custom video format + autoStart: true + }, + + // Default content type if cannot be detected automatically + defaultType: "image", + + // Open/close animation type + // Possible values: + // false - disable + // "zoom" - zoom images from/to thumbnail + // "fade" + // "zoom-in-out" + // + animationEffect: "zoom", + + // Duration in ms for open/close animation + animationDuration: 366, + + // Should image change opacity while zooming + // If opacity is "auto", then opacity will be changed if image and thumbnail have different aspect ratios + zoomOpacity: "auto", + + // Transition effect between slides + // + // Possible values: + // false - disable + // "fade' + // "slide' + // "circular' + // "tube' + // "zoom-in-out' + // "rotate' + // + transitionEffect: "fade", + + // Duration in ms for transition animation + transitionDuration: 366, + + // Custom CSS class for slide element + slideClass: "", + + // Custom CSS class for layout + baseClass: "", + + // Base template for layout + baseTpl: + '", + + // Loading indicator template + spinnerTpl: '
    ', + + // Error message template + errorTpl: '

    {{ERROR}}

    ', + + btnTpl: { + download: + '' + + '' + + "", + + zoom: + '", + + close: + '", + + // Arrows + arrowLeft: + '", + + arrowRight: + '", + + // This small close button will be appended to your html/inline/ajax content by default, + // if "smallBtn" option is not set to false + smallBtn: + '" + }, + + // Container is injected into this element + parentEl: "body", + + // Hide browser vertical scrollbars; use at your own risk + hideScrollbar: true, + + // Focus handling + // ============== + + // Try to focus on the first focusable element after opening + autoFocus: true, + + // Put focus back to active element after closing + backFocus: true, + + // Do not let user to focus on element outside modal content + trapFocus: true, + + // Module specific options + // ======================= + + fullScreen: { + autoStart: false + }, + + // Set `touch: false` to disable panning/swiping + touch: { + vertical: true, // Allow to drag content vertically + momentum: true // Continue movement after releasing mouse/touch when panning + }, + + // Hash value when initializing manually, + // set `false` to disable hash change + hash: null, + + // Customize or add new media types + // Example: + /* + media : { + youtube : { + params : { + autoplay : 0 + } + } + } + */ + media: {}, + + slideShow: { + autoStart: false, + speed: 3000 + }, + + thumbs: { + autoStart: false, // Display thumbnails on opening + hideOnClose: true, // Hide thumbnail grid when closing animation starts + parentEl: ".fancybox-container", // Container is injected into this element + axis: "y" // Vertical (y) or horizontal (x) scrolling + }, + + // Use mousewheel to navigate gallery + // If 'auto' - enabled for images only + wheel: "auto", + + // Callbacks + //========== + + // See Documentation/API/Events for more information + // Example: + /* + afterShow: function( instance, current ) { + console.info( 'Clicked element:' ); + console.info( current.opts.$orig ); + } + */ + + onInit: $.noop, // When instance has been initialized + + beforeLoad: $.noop, // Before the content of a slide is being loaded + afterLoad: $.noop, // When the content of a slide is done loading + + beforeShow: $.noop, // Before open animation starts + afterShow: $.noop, // When content is done loading and animating + + beforeClose: $.noop, // Before the instance attempts to close. Return false to cancel the close. + afterClose: $.noop, // After instance has been closed + + onActivate: $.noop, // When instance is brought to front + onDeactivate: $.noop, // When other instance has been activated + + // Interaction + // =========== + + // Use options below to customize taken action when user clicks or double clicks on the fancyBox area, + // each option can be string or method that returns value. + // + // Possible values: + // "close" - close instance + // "next" - move to next gallery item + // "nextOrClose" - move to next gallery item or close if gallery has only one item + // "toggleControls" - show/hide controls + // "zoom" - zoom image (if loaded) + // false - do nothing + + // Clicked on the content + clickContent: function(current, event) { + return current.type === "image" ? "zoom" : false; + }, + + // Clicked on the slide + clickSlide: "close", + + // Clicked on the background (backdrop) element; + // if you have not changed the layout, then most likely you need to use `clickSlide` option + clickOutside: "close", + + // Same as previous two, but for double click + dblclickContent: false, + dblclickSlide: false, + dblclickOutside: false, + + // Custom options when mobile device is detected + // ============================================= + + mobile: { + preventCaptionOverlap: false, + idleTime: false, + clickContent: function(current, event) { + return current.type === "image" ? "toggleControls" : false; + }, + clickSlide: function(current, event) { + return current.type === "image" ? "toggleControls" : "close"; + }, + dblclickContent: function(current, event) { + return current.type === "image" ? "zoom" : false; + }, + dblclickSlide: function(current, event) { + return current.type === "image" ? "zoom" : false; + } + }, + + // Internationalization + // ==================== + + lang: "en", + i18n: { + en: { + CLOSE: "Close", + NEXT: "Next", + PREV: "Previous", + ERROR: "The requested content cannot be loaded.
    Please try again later.", + PLAY_START: "Start slideshow", + PLAY_STOP: "Pause slideshow", + FULL_SCREEN: "Full screen", + THUMBS: "Thumbnails", + DOWNLOAD: "Download", + SHARE: "Share", + ZOOM: "Zoom" + }, + de: { + CLOSE: "Schließen", + NEXT: "Weiter", + PREV: "Zurück", + ERROR: "Die angeforderten Daten konnten nicht geladen werden.
    Bitte versuchen Sie es später nochmal.", + PLAY_START: "Diaschau starten", + PLAY_STOP: "Diaschau beenden", + FULL_SCREEN: "Vollbild", + THUMBS: "Vorschaubilder", + DOWNLOAD: "Herunterladen", + SHARE: "Teilen", + ZOOM: "Vergrößern" + } + } + }; + + // Few useful variables and methods + // ================================ + + var $W = $(window); + var $D = $(document); + + var called = 0; + + // Check if an object is a jQuery object and not a native JavaScript object + // ======================================================================== + var isQuery = function(obj) { + return obj && obj.hasOwnProperty && obj instanceof $; + }; + + // Handle multiple browsers for "requestAnimationFrame" and "cancelAnimationFrame" + // =============================================================================== + var requestAFrame = (function() { + return ( + window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + // if all else fails, use setTimeout + function(callback) { + return window.setTimeout(callback, 1000 / 60); + } + ); + })(); + + var cancelAFrame = (function() { + return ( + window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + window.oCancelAnimationFrame || + function(id) { + window.clearTimeout(id); + } + ); + })(); + + // Detect the supported transition-end event property name + // ======================================================= + var transitionEnd = (function() { + var el = document.createElement("fakeelement"), + t; + + var transitions = { + transition: "transitionend", + OTransition: "oTransitionEnd", + MozTransition: "transitionend", + WebkitTransition: "webkitTransitionEnd" + }; + + for (t in transitions) { + if (el.style[t] !== undefined) { + return transitions[t]; + } + } + + return "transitionend"; + })(); + + // Force redraw on an element. + // This helps in cases where the browser doesn't redraw an updated element properly + // ================================================================================ + var forceRedraw = function($el) { + return $el && $el.length && $el[0].offsetHeight; + }; + + // Exclude array (`buttons`) options from deep merging + // =================================================== + var mergeOpts = function(opts1, opts2) { + var rez = $.extend(true, {}, opts1, opts2); + + $.each(opts2, function(key, value) { + if ($.isArray(value)) { + rez[key] = value; + } + }); + + return rez; + }; + + // How much of an element is visible in viewport + // ============================================= + + var inViewport = function(elem) { + var elemCenter, rez; + + if (!elem || elem.ownerDocument !== document) { + return false; + } + + $(".fancybox-container").css("pointer-events", "none"); + + elemCenter = { + x: elem.getBoundingClientRect().left + elem.offsetWidth / 2, + y: elem.getBoundingClientRect().top + elem.offsetHeight / 2 + }; + + rez = document.elementFromPoint(elemCenter.x, elemCenter.y) === elem; + + $(".fancybox-container").css("pointer-events", ""); + + return rez; + }; + + // Class definition + // ================ + + var FancyBox = function(content, opts, index) { + var self = this; + + self.opts = mergeOpts({index: index}, $.fancybox.defaults); + + if ($.isPlainObject(opts)) { + self.opts = mergeOpts(self.opts, opts); + } + + if ($.fancybox.isMobile) { + self.opts = mergeOpts(self.opts, self.opts.mobile); + } + + self.id = self.opts.id || ++called; + + self.currIndex = parseInt(self.opts.index, 10) || 0; + self.prevIndex = null; + + self.prevPos = null; + self.currPos = 0; + + self.firstRun = true; + + // All group items + self.group = []; + + // Existing slides (for current, next and previous gallery items) + self.slides = {}; + + // Create group elements + self.addContent(content); + + if (!self.group.length) { + return; + } + + self.init(); + }; + + $.extend(FancyBox.prototype, { + // Create DOM structure + // ==================== + + init: function() { + var self = this, + firstItem = self.group[self.currIndex], + firstItemOpts = firstItem.opts, + $container, + buttonStr; + + if (firstItemOpts.closeExisting) { + $.fancybox.close(true); + } + + // Hide scrollbars + // =============== + + $("body").addClass("fancybox-active"); + + if ( + !$.fancybox.getInstance() && + firstItemOpts.hideScrollbar !== false && + !$.fancybox.isMobile && + document.body.scrollHeight > window.innerHeight + ) { + $("head").append( + '" + ); + + $("body").addClass("compensate-for-scrollbar"); + } + + // Build html markup and set references + // ==================================== + + // Build html code for buttons and insert into main template + buttonStr = ""; + + $.each(firstItemOpts.buttons, function(index, value) { + buttonStr += firstItemOpts.btnTpl[value] || ""; + }); + + // Create markup from base template, it will be initially hidden to + // avoid unnecessary work like painting while initializing is not complete + $container = $( + self.translate( + self, + firstItemOpts.baseTpl + .replace("{{buttons}}", buttonStr) + .replace("{{arrows}}", firstItemOpts.btnTpl.arrowLeft + firstItemOpts.btnTpl.arrowRight) + ) + ) + .attr("id", "fancybox-container-" + self.id) + .addClass(firstItemOpts.baseClass) + .data("FancyBox", self) + .appendTo(firstItemOpts.parentEl); + + // Create object holding references to jQuery wrapped nodes + self.$refs = { + container: $container + }; + + ["bg", "inner", "infobar", "toolbar", "stage", "caption", "navigation"].forEach(function(item) { + self.$refs[item] = $container.find(".fancybox-" + item); + }); + + self.trigger("onInit"); + + // Enable events, deactive previous instances + self.activate(); + + // Build slides, load and reveal content + self.jumpTo(self.currIndex); + }, + + // Simple i18n support - replaces object keys found in template + // with corresponding values + // ============================================================ + + translate: function(obj, str) { + var arr = obj.opts.i18n[obj.opts.lang] || obj.opts.i18n.en; + + return str.replace(/\{\{(\w+)\}\}/g, function(match, n) { + return arr[n] === undefined ? match : arr[n]; + }); + }, + + // Populate current group with fresh content + // Check if each object has valid type and content + // =============================================== + + addContent: function(content) { + var self = this, + items = $.makeArray(content), + thumbs; + + $.each(items, function(i, item) { + var obj = {}, + opts = {}, + $item, + type, + found, + src, + srcParts; + + // Step 1 - Make sure we have an object + // ==================================== + + if ($.isPlainObject(item)) { + // We probably have manual usage here, something like + // $.fancybox.open( [ { src : "image.jpg", type : "image" } ] ) + + obj = item; + opts = item.opts || item; + } else if ($.type(item) === "object" && $(item).length) { + // Here we probably have jQuery collection returned by some selector + $item = $(item); + + // Support attributes like `data-options='{"touch" : false}'` and `data-touch='false'` + opts = $item.data() || {}; + opts = $.extend(true, {}, opts, opts.options); + + // Here we store clicked element + opts.$orig = $item; + + obj.src = self.opts.src || opts.src || $item.attr("href"); + + // Assume that simple syntax is used, for example: + // `$.fancybox.open( $("#test"), {} );` + if (!obj.type && !obj.src) { + obj.type = "inline"; + obj.src = item; + } + } else { + // Assume we have a simple html code, for example: + // $.fancybox.open( '

    Hi!

    ' ); + obj = { + type: "html", + src: item + "" + }; + } + + // Each gallery object has full collection of options + obj.opts = $.extend(true, {}, self.opts, opts); + + // Do not merge buttons array + if ($.isArray(opts.buttons)) { + obj.opts.buttons = opts.buttons; + } + + if ($.fancybox.isMobile && obj.opts.mobile) { + obj.opts = mergeOpts(obj.opts, obj.opts.mobile); + } + + // Step 2 - Make sure we have content type, if not - try to guess + // ============================================================== + + type = obj.type || obj.opts.type; + src = obj.src || ""; + + if (!type && src) { + if ((found = src.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))) { + type = "video"; + + if (!obj.opts.video.format) { + obj.opts.video.format = "video/" + (found[1] === "ogv" ? "ogg" : found[1]); + } + } else if (src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)) { + type = "image"; + } else if (src.match(/\.(pdf)((\?|#).*)?$/i)) { + type = "iframe"; + obj = $.extend(true, obj, {contentType: "pdf", opts: {iframe: {preload: false}}}); + } else if (src.charAt(0) === "#") { + type = "inline"; + } + } + + if (type) { + obj.type = type; + } else { + self.trigger("objectNeedsType", obj); + } + + if (!obj.contentType) { + obj.contentType = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1 ? "html" : obj.type; + } + + // Step 3 - Some adjustments + // ========================= + + obj.index = self.group.length; + + if (obj.opts.smallBtn == "auto") { + obj.opts.smallBtn = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1; + } + + if (obj.opts.toolbar === "auto") { + obj.opts.toolbar = !obj.opts.smallBtn; + } + + // Find thumbnail image, check if exists and if is in the viewport + obj.$thumb = obj.opts.$thumb || null; + + if (obj.opts.$trigger && obj.index === self.opts.index) { + obj.$thumb = obj.opts.$trigger.find("img:first"); + + if (obj.$thumb.length) { + obj.opts.$orig = obj.opts.$trigger; + } + } + + if (!(obj.$thumb && obj.$thumb.length) && obj.opts.$orig) { + obj.$thumb = obj.opts.$orig.find("img:first"); + } + + if (obj.$thumb && !obj.$thumb.length) { + obj.$thumb = null; + } + + obj.thumb = obj.opts.thumb || (obj.$thumb ? obj.$thumb[0].src : null); + + // "caption" is a "special" option, it can be used to customize caption per gallery item + if ($.type(obj.opts.caption) === "function") { + obj.opts.caption = obj.opts.caption.apply(item, [self, obj]); + } + + if ($.type(self.opts.caption) === "function") { + obj.opts.caption = self.opts.caption.apply(item, [self, obj]); + } + + // Make sure we have caption as a string or jQuery object + if (!(obj.opts.caption instanceof $)) { + obj.opts.caption = obj.opts.caption === undefined ? "" : obj.opts.caption + ""; + } + + // Check if url contains "filter" used to filter the content + // Example: "ajax.html #something" + if (obj.type === "ajax") { + srcParts = src.split(/\s+/, 2); + + if (srcParts.length > 1) { + obj.src = srcParts.shift(); + + obj.opts.filter = srcParts.shift(); + } + } + + // Hide all buttons and disable interactivity for modal items + if (obj.opts.modal) { + obj.opts = $.extend(true, obj.opts, { + trapFocus: true, + // Remove buttons + infobar: 0, + toolbar: 0, + + smallBtn: 0, + + // Disable keyboard navigation + keyboard: 0, + + // Disable some modules + slideShow: 0, + fullScreen: 0, + thumbs: 0, + touch: 0, + + // Disable click event handlers + clickContent: false, + clickSlide: false, + clickOutside: false, + dblclickContent: false, + dblclickSlide: false, + dblclickOutside: false + }); + } + + // Step 4 - Add processed object to group + // ====================================== + + self.group.push(obj); + }); + + // Update controls if gallery is already opened + if (Object.keys(self.slides).length) { + self.updateControls(); + + // Update thumbnails, if needed + thumbs = self.Thumbs; + + if (thumbs && thumbs.isActive) { + thumbs.create(); + + thumbs.focus(); + } + } + }, + + // Attach an event handler functions for: + // - navigation buttons + // - browser scrolling, resizing; + // - focusing + // - keyboard + // - detecting inactivity + // ====================================== + + addEvents: function() { + var self = this; + + self.removeEvents(); + + // Make navigation elements clickable + // ================================== + + self.$refs.container + .on("click.fb-close", "[data-fancybox-close]", function(e) { + e.stopPropagation(); + e.preventDefault(); + + self.close(e); + }) + .on("touchstart.fb-prev click.fb-prev", "[data-fancybox-prev]", function(e) { + e.stopPropagation(); + e.preventDefault(); + + self.previous(); + }) + .on("touchstart.fb-next click.fb-next", "[data-fancybox-next]", function(e) { + e.stopPropagation(); + e.preventDefault(); + + self.next(); + }) + .on("click.fb", "[data-fancybox-zoom]", function(e) { + // Click handler for zoom button + self[self.isScaledDown() ? "scaleToActual" : "scaleToFit"](); + }); + + // Handle page scrolling and browser resizing + // ========================================== + + $W.on("orientationchange.fb resize.fb", function(e) { + if (e && e.originalEvent && e.originalEvent.type === "resize") { + if (self.requestId) { + cancelAFrame(self.requestId); + } + + self.requestId = requestAFrame(function() { + self.update(e); + }); + } else { + if (self.current && self.current.type === "iframe") { + self.$refs.stage.hide(); + } + + setTimeout( + function() { + self.$refs.stage.show(); + + self.update(e); + }, + $.fancybox.isMobile ? 600 : 250 + ); + } + }); + + $D.on("keydown.fb", function(e) { + var instance = $.fancybox ? $.fancybox.getInstance() : null, + current = instance.current, + keycode = e.keyCode || e.which; + + // Trap keyboard focus inside of the modal + // ======================================= + + if (keycode == 9) { + if (current.opts.trapFocus) { + self.focus(e); + } + + return; + } + + // Enable keyboard navigation + // ========================== + + if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is("input,textarea,video,audio")) { + return; + } + + // Backspace and Esc keys + if (keycode === 8 || keycode === 27) { + e.preventDefault(); + + self.close(e); + + return; + } + + // Left arrow and Up arrow + if (keycode === 37 || keycode === 38) { + e.preventDefault(); + + self.previous(); + + return; + } + + // Righ arrow and Down arrow + if (keycode === 39 || keycode === 40) { + e.preventDefault(); + + self.next(); + + return; + } + + self.trigger("afterKeydown", e, keycode); + }); + + // Hide controls after some inactivity period + if (self.group[self.currIndex].opts.idleTime) { + self.idleSecondsCounter = 0; + + $D.on( + "mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle", + function(e) { + self.idleSecondsCounter = 0; + + if (self.isIdle) { + self.showControls(); + } + + self.isIdle = false; + } + ); + + self.idleInterval = window.setInterval(function() { + self.idleSecondsCounter++; + + if (self.idleSecondsCounter >= self.group[self.currIndex].opts.idleTime && !self.isDragging) { + self.isIdle = true; + self.idleSecondsCounter = 0; + + self.hideControls(); + } + }, 1000); + } + }, + + // Remove events added by the core + // =============================== + + removeEvents: function() { + var self = this; + + $W.off("orientationchange.fb resize.fb"); + $D.off("keydown.fb .fb-idle"); + + this.$refs.container.off(".fb-close .fb-prev .fb-next"); + + if (self.idleInterval) { + window.clearInterval(self.idleInterval); + + self.idleInterval = null; + } + }, + + // Change to previous gallery item + // =============================== + + previous: function(duration) { + return this.jumpTo(this.currPos - 1, duration); + }, + + // Change to next gallery item + // =========================== + + next: function(duration) { + return this.jumpTo(this.currPos + 1, duration); + }, + + // Switch to selected gallery item + // =============================== + + jumpTo: function(pos, duration) { + var self = this, + groupLen = self.group.length, + firstRun, + isMoved, + loop, + current, + previous, + slidePos, + stagePos, + prop, + diff; + + if (self.isDragging || self.isClosing || (self.isAnimating && self.firstRun)) { + return; + } + + // Should loop? + pos = parseInt(pos, 10); + loop = self.current ? self.current.opts.loop : self.opts.loop; + + if (!loop && (pos < 0 || pos >= groupLen)) { + return false; + } + + // Check if opening for the first time; this helps to speed things up + firstRun = self.firstRun = !Object.keys(self.slides).length; + + // Create slides + previous = self.current; + + self.prevIndex = self.currIndex; + self.prevPos = self.currPos; + + current = self.createSlide(pos); + + if (groupLen > 1) { + if (loop || current.index < groupLen - 1) { + self.createSlide(pos + 1); + } + + if (loop || current.index > 0) { + self.createSlide(pos - 1); + } + } + + self.current = current; + self.currIndex = current.index; + self.currPos = current.pos; + + self.trigger("beforeShow", firstRun); + + self.updateControls(); + + // Validate duration length + current.forcedDuration = undefined; + + if ($.isNumeric(duration)) { + current.forcedDuration = duration; + } else { + duration = current.opts[firstRun ? "animationDuration" : "transitionDuration"]; + } + + duration = parseInt(duration, 10); + + // Check if user has swiped the slides or if still animating + isMoved = self.isMoved(current); + + // Make sure current slide is visible + current.$slide.addClass("fancybox-slide--current"); + + // Fresh start - reveal container, current slide and start loading content + if (firstRun) { + if (current.opts.animationEffect && duration) { + self.$refs.container.css("transition-duration", duration + "ms"); + } + + self.$refs.container.addClass("fancybox-is-open").trigger("focus"); + + // Attempt to load content into slide + // This will later call `afterLoad` -> `revealContent` + self.loadSlide(current); + + self.preload("image"); + + return; + } + + // Get actual slide/stage positions (before cleaning up) + slidePos = $.fancybox.getTranslate(previous.$slide); + stagePos = $.fancybox.getTranslate(self.$refs.stage); + + // Clean up all slides + $.each(self.slides, function(index, slide) { + $.fancybox.stop(slide.$slide, true); + }); + + if (previous.pos !== current.pos) { + previous.isComplete = false; + } + + previous.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"); + + // If slides are out of place, then animate them to correct position + if (isMoved) { + // Calculate horizontal swipe distance + diff = slidePos.left - (previous.pos * slidePos.width + previous.pos * previous.opts.gutter); + + $.each(self.slides, function(index, slide) { + slide.$slide.removeClass("fancybox-animated").removeClass(function(index, className) { + return (className.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" "); + }); + + // Make sure that each slide is in equal distance + // This is mostly needed for freshly added slides, because they are not yet positioned + var leftPos = slide.pos * slidePos.width + slide.pos * slide.opts.gutter; + + $.fancybox.setTranslate(slide.$slide, {top: 0, left: leftPos - stagePos.left + diff}); + + if (slide.pos !== current.pos) { + slide.$slide.addClass("fancybox-slide--" + (slide.pos > current.pos ? "next" : "previous")); + } + + // Redraw to make sure that transition will start + forceRedraw(slide.$slide); + + // Animate the slide + $.fancybox.animate( + slide.$slide, + { + top: 0, + left: (slide.pos - current.pos) * slidePos.width + (slide.pos - current.pos) * slide.opts.gutter + }, + duration, + function() { + slide.$slide + .css({ + transform: "", + opacity: "" + }) + .removeClass("fancybox-slide--next fancybox-slide--previous"); + + if (slide.pos === self.currPos) { + self.complete(); + } + } + ); + }); + } else if (duration && current.opts.transitionEffect) { + // Set transition effect for previously active slide + prop = "fancybox-animated fancybox-fx-" + current.opts.transitionEffect; + + previous.$slide.addClass("fancybox-slide--" + (previous.pos > current.pos ? "next" : "previous")); + + $.fancybox.animate( + previous.$slide, + prop, + duration, + function() { + previous.$slide.removeClass(prop).removeClass("fancybox-slide--next fancybox-slide--previous"); + }, + false + ); + } + + if (current.isLoaded) { + self.revealContent(current); + } else { + self.loadSlide(current); + } + + self.preload("image"); + }, + + // Create new "slide" element + // These are gallery items that are actually added to DOM + // ======================================================= + + createSlide: function(pos) { + var self = this, + $slide, + index; + + index = pos % self.group.length; + index = index < 0 ? self.group.length + index : index; + + if (!self.slides[pos] && self.group[index]) { + $slide = $('
    ').appendTo(self.$refs.stage); + + self.slides[pos] = $.extend(true, {}, self.group[index], { + pos: pos, + $slide: $slide, + isLoaded: false + }); + + self.updateSlide(self.slides[pos]); + } + + return self.slides[pos]; + }, + + // Scale image to the actual size of the image; + // x and y values should be relative to the slide + // ============================================== + + scaleToActual: function(x, y, duration) { + var self = this, + current = self.current, + $content = current.$content, + canvasWidth = $.fancybox.getTranslate(current.$slide).width, + canvasHeight = $.fancybox.getTranslate(current.$slide).height, + newImgWidth = current.width, + newImgHeight = current.height, + imgPos, + posX, + posY, + scaleX, + scaleY; + + if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) { + return; + } + + self.isAnimating = true; + + $.fancybox.stop($content); + + x = x === undefined ? canvasWidth * 0.5 : x; + y = y === undefined ? canvasHeight * 0.5 : y; + + imgPos = $.fancybox.getTranslate($content); + + imgPos.top -= $.fancybox.getTranslate(current.$slide).top; + imgPos.left -= $.fancybox.getTranslate(current.$slide).left; + + scaleX = newImgWidth / imgPos.width; + scaleY = newImgHeight / imgPos.height; + + // Get center position for original image + posX = canvasWidth * 0.5 - newImgWidth * 0.5; + posY = canvasHeight * 0.5 - newImgHeight * 0.5; + + // Make sure image does not move away from edges + if (newImgWidth > canvasWidth) { + posX = imgPos.left * scaleX - (x * scaleX - x); + + if (posX > 0) { + posX = 0; + } + + if (posX < canvasWidth - newImgWidth) { + posX = canvasWidth - newImgWidth; + } + } + + if (newImgHeight > canvasHeight) { + posY = imgPos.top * scaleY - (y * scaleY - y); + + if (posY > 0) { + posY = 0; + } + + if (posY < canvasHeight - newImgHeight) { + posY = canvasHeight - newImgHeight; + } + } + + self.updateCursor(newImgWidth, newImgHeight); + + $.fancybox.animate( + $content, + { + top: posY, + left: posX, + scaleX: scaleX, + scaleY: scaleY + }, + duration || 366, + function() { + self.isAnimating = false; + } + ); + + // Stop slideshow + if (self.SlideShow && self.SlideShow.isActive) { + self.SlideShow.stop(); + } + }, + + // Scale image to fit inside parent element + // ======================================== + + scaleToFit: function(duration) { + var self = this, + current = self.current, + $content = current.$content, + end; + + if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) { + return; + } + + self.isAnimating = true; + + $.fancybox.stop($content); + + end = self.getFitPos(current); + + self.updateCursor(end.width, end.height); + + $.fancybox.animate( + $content, + { + top: end.top, + left: end.left, + scaleX: end.width / $content.width(), + scaleY: end.height / $content.height() + }, + duration || 366, + function() { + self.isAnimating = false; + } + ); + }, + + // Calculate image size to fit inside viewport + // =========================================== + + getFitPos: function(slide) { + var self = this, + $content = slide.$content, + $slide = slide.$slide, + width = slide.width || slide.opts.width, + height = slide.height || slide.opts.height, + maxWidth, + maxHeight, + minRatio, + aspectRatio, + rez = {}; + + if (!slide.isLoaded || !$content || !$content.length) { + return false; + } + + maxWidth = $.fancybox.getTranslate(self.$refs.stage).width; + maxHeight = $.fancybox.getTranslate(self.$refs.stage).height; + + maxWidth -= + parseFloat($slide.css("paddingLeft")) + + parseFloat($slide.css("paddingRight")) + + parseFloat($content.css("marginLeft")) + + parseFloat($content.css("marginRight")); + + maxHeight -= + parseFloat($slide.css("paddingTop")) + + parseFloat($slide.css("paddingBottom")) + + parseFloat($content.css("marginTop")) + + parseFloat($content.css("marginBottom")); + + if (!width || !height) { + width = maxWidth; + height = maxHeight; + } + + minRatio = Math.min(1, maxWidth / width, maxHeight / height); + + width = minRatio * width; + height = minRatio * height; + + // Adjust width/height to precisely fit into container + if (width > maxWidth - 0.5) { + width = maxWidth; + } + + if (height > maxHeight - 0.5) { + height = maxHeight; + } + + if (slide.type === "image") { + rez.top = Math.floor((maxHeight - height) * 0.5) + parseFloat($slide.css("paddingTop")); + rez.left = Math.floor((maxWidth - width) * 0.5) + parseFloat($slide.css("paddingLeft")); + } else if (slide.contentType === "video") { + // Force aspect ratio for the video + // "I say the whole world must learn of our peaceful ways… by force!" + aspectRatio = slide.opts.width && slide.opts.height ? width / height : slide.opts.ratio || 16 / 9; + + if (height > width / aspectRatio) { + height = width / aspectRatio; + } else if (width > height * aspectRatio) { + width = height * aspectRatio; + } + } + + rez.width = width; + rez.height = height; + + return rez; + }, + + // Update content size and position for all slides + // ============================================== + + update: function(e) { + var self = this; + + $.each(self.slides, function(key, slide) { + self.updateSlide(slide, e); + }); + }, + + // Update slide content position and size + // ====================================== + + updateSlide: function(slide, e) { + var self = this, + $content = slide && slide.$content, + width = slide.width || slide.opts.width, + height = slide.height || slide.opts.height, + $slide = slide.$slide; + + // First, prevent caption overlap, if needed + self.adjustCaption(slide); + + // Then resize content to fit inside the slide + if ($content && (width || height || slide.contentType === "video") && !slide.hasError) { + $.fancybox.stop($content); + + $.fancybox.setTranslate($content, self.getFitPos(slide)); + + if (slide.pos === self.currPos) { + self.isAnimating = false; + + self.updateCursor(); + } + } + + // Then some adjustments + self.adjustLayout(slide); + + if ($slide.length) { + $slide.trigger("refresh"); + + if (slide.pos === self.currPos) { + self.$refs.toolbar + .add(self.$refs.navigation.find(".fancybox-button--arrow_right")) + .toggleClass("compensate-for-scrollbar", $slide.get(0).scrollHeight > $slide.get(0).clientHeight); + } + } + + self.trigger("onUpdate", slide, e); + }, + + // Horizontally center slide + // ========================= + + centerSlide: function(duration) { + var self = this, + current = self.current, + $slide = current.$slide; + + if (self.isClosing || !current) { + return; + } + + $slide.siblings().css({ + transform: "", + opacity: "" + }); + + $slide + .parent() + .children() + .removeClass("fancybox-slide--previous fancybox-slide--next"); + + $.fancybox.animate( + $slide, + { + top: 0, + left: 0, + opacity: 1 + }, + duration === undefined ? 0 : duration, + function() { + // Clean up + $slide.css({ + transform: "", + opacity: "" + }); + + if (!current.isComplete) { + self.complete(); + } + }, + false + ); + }, + + // Check if current slide is moved (swiped) + // ======================================== + + isMoved: function(slide) { + var current = slide || this.current, + slidePos, + stagePos; + + if (!current) { + return false; + } + + stagePos = $.fancybox.getTranslate(this.$refs.stage); + slidePos = $.fancybox.getTranslate(current.$slide); + + return ( + !current.$slide.hasClass("fancybox-animated") && + (Math.abs(slidePos.top - stagePos.top) > 0.5 || Math.abs(slidePos.left - stagePos.left) > 0.5) + ); + }, + + // Update cursor style depending if content can be zoomed + // ====================================================== + + updateCursor: function(nextWidth, nextHeight) { + var self = this, + current = self.current, + $container = self.$refs.container, + canPan, + isZoomable; + + if (!current || self.isClosing || !self.Guestures) { + return; + } + + $container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"); + + canPan = self.canPan(nextWidth, nextHeight); + + isZoomable = canPan ? true : self.isZoomable(); + + $container.toggleClass("fancybox-is-zoomable", isZoomable); + + $("[data-fancybox-zoom]").prop("disabled", !isZoomable); + + if (canPan) { + $container.addClass("fancybox-can-pan"); + } else if ( + isZoomable && + (current.opts.clickContent === "zoom" || ($.isFunction(current.opts.clickContent) && current.opts.clickContent(current) == "zoom")) + ) { + $container.addClass("fancybox-can-zoomIn"); + } else if (current.opts.touch && (current.opts.touch.vertical || self.group.length > 1) && current.contentType !== "video") { + $container.addClass("fancybox-can-swipe"); + } + }, + + // Check if current slide is zoomable + // ================================== + + isZoomable: function() { + var self = this, + current = self.current, + fitPos; + + // Assume that slide is zoomable if: + // - image is still loading + // - actual size of the image is smaller than available area + if (current && !self.isClosing && current.type === "image" && !current.hasError) { + if (!current.isLoaded) { + return true; + } + + fitPos = self.getFitPos(current); + + if (fitPos && (current.width > fitPos.width || current.height > fitPos.height)) { + return true; + } + } + + return false; + }, + + // Check if current image dimensions are smaller than actual + // ========================================================= + + isScaledDown: function(nextWidth, nextHeight) { + var self = this, + rez = false, + current = self.current, + $content = current.$content; + + if (nextWidth !== undefined && nextHeight !== undefined) { + rez = nextWidth < current.width && nextHeight < current.height; + } else if ($content) { + rez = $.fancybox.getTranslate($content); + rez = rez.width < current.width && rez.height < current.height; + } + + return rez; + }, + + // Check if image dimensions exceed parent element + // =============================================== + + canPan: function(nextWidth, nextHeight) { + var self = this, + current = self.current, + pos = null, + rez = false; + + if (current.type === "image" && (current.isComplete || (nextWidth && nextHeight)) && !current.hasError) { + rez = self.getFitPos(current); + + if (nextWidth !== undefined && nextHeight !== undefined) { + pos = {width: nextWidth, height: nextHeight}; + } else if (current.isComplete) { + pos = $.fancybox.getTranslate(current.$content); + } + + if (pos && rez) { + rez = Math.abs(pos.width - rez.width) > 1.5 || Math.abs(pos.height - rez.height) > 1.5; + } + } + + return rez; + }, + + // Load content into the slide + // =========================== + + loadSlide: function(slide) { + var self = this, + type, + $slide, + ajaxLoad; + + if (slide.isLoading || slide.isLoaded) { + return; + } + + slide.isLoading = true; + + if (self.trigger("beforeLoad", slide) === false) { + slide.isLoading = false; + + return false; + } + + type = slide.type; + $slide = slide.$slide; + + $slide + .off("refresh") + .trigger("onReset") + .addClass(slide.opts.slideClass); + + // Create content depending on the type + switch (type) { + case "image": + self.setImage(slide); + + break; + + case "iframe": + self.setIframe(slide); + + break; + + case "html": + self.setContent(slide, slide.src || slide.content); + + break; + + case "video": + self.setContent( + slide, + slide.opts.video.tpl + .replace(/\{\{src\}\}/gi, slide.src) + .replace("{{format}}", slide.opts.videoFormat || slide.opts.video.format || "") + .replace("{{poster}}", slide.thumb || "") + ); + + break; + + case "inline": + if ($(slide.src).length) { + self.setContent(slide, $(slide.src)); + } else { + self.setError(slide); + } + + break; + + case "ajax": + self.showLoading(slide); + + ajaxLoad = $.ajax( + $.extend({}, slide.opts.ajax.settings, { + url: slide.src, + success: function(data, textStatus) { + if (textStatus === "success") { + self.setContent(slide, data); + } + }, + error: function(jqXHR, textStatus) { + if (jqXHR && textStatus !== "abort") { + self.setError(slide); + } + } + }) + ); + + $slide.one("onReset", function() { + ajaxLoad.abort(); + }); + + break; + + default: + self.setError(slide); + + break; + } + + return true; + }, + + // Use thumbnail image, if possible + // ================================ + + setImage: function(slide) { + var self = this, + ghost; + + // Check if need to show loading icon + setTimeout(function() { + var $img = slide.$image; + + if (!self.isClosing && slide.isLoading && (!$img || !$img.length || !$img[0].complete) && !slide.hasError) { + self.showLoading(slide); + } + }, 50); + + //Check if image has srcset + self.checkSrcset(slide); + + // This will be wrapper containing both ghost and actual image + slide.$content = $('
    ') + .addClass("fancybox-is-hidden") + .appendTo(slide.$slide.addClass("fancybox-slide--image")); + + // If we have a thumbnail, we can display it while actual image is loading + // Users will not stare at black screen and actual image will appear gradually + if (slide.opts.preload !== false && slide.opts.width && slide.opts.height && slide.thumb) { + slide.width = slide.opts.width; + slide.height = slide.opts.height; + + ghost = document.createElement("img"); + + ghost.onerror = function() { + $(this).remove(); + + slide.$ghost = null; + }; + + ghost.onload = function() { + self.afterLoad(slide); + }; + + slide.$ghost = $(ghost) + .addClass("fancybox-image") + .appendTo(slide.$content) + .attr("src", slide.thumb); + } + + // Start loading actual image + self.setBigImage(slide); + }, + + // Check if image has srcset and get the source + // ============================================ + checkSrcset: function(slide) { + var srcset = slide.opts.srcset || slide.opts.image.srcset, + found, + temp, + pxRatio, + windowWidth; + + // If we have "srcset", then we need to find first matching "src" value. + // This is necessary, because when you set an src attribute, the browser will preload the image + // before any javascript or even CSS is applied. + if (srcset) { + pxRatio = window.devicePixelRatio || 1; + windowWidth = window.innerWidth * pxRatio; + + temp = srcset.split(",").map(function(el) { + var ret = {}; + + el.trim() + .split(/\s+/) + .forEach(function(el, i) { + var value = parseInt(el.substring(0, el.length - 1), 10); + + if (i === 0) { + return (ret.url = el); + } + + if (value) { + ret.value = value; + ret.postfix = el[el.length - 1]; + } + }); + + return ret; + }); + + // Sort by value + temp.sort(function(a, b) { + return a.value - b.value; + }); + + // Ok, now we have an array of all srcset values + for (var j = 0; j < temp.length; j++) { + var el = temp[j]; + + if ((el.postfix === "w" && el.value >= windowWidth) || (el.postfix === "x" && el.value >= pxRatio)) { + found = el; + break; + } + } + + // If not found, take the last one + if (!found && temp.length) { + found = temp[temp.length - 1]; + } + + if (found) { + slide.src = found.url; + + // If we have default width/height values, we can calculate height for matching source + if (slide.width && slide.height && found.postfix == "w") { + slide.height = (slide.width / slide.height) * found.value; + slide.width = found.value; + } + + slide.opts.srcset = srcset; + } + } + }, + + // Create full-size image + // ====================== + + setBigImage: function(slide) { + var self = this, + img = document.createElement("img"), + $img = $(img); + + slide.$image = $img + .one("error", function() { + self.setError(slide); + }) + .one("load", function() { + var sizes; + + if (!slide.$ghost) { + self.resolveImageSlideSize(slide, this.naturalWidth, this.naturalHeight); + + self.afterLoad(slide); + } + + if (self.isClosing) { + return; + } + + if (slide.opts.srcset) { + sizes = slide.opts.sizes; + + if (!sizes || sizes === "auto") { + sizes = + (slide.width / slide.height > 1 && $W.width() / $W.height() > 1 ? "100" : Math.round((slide.width / slide.height) * 100)) + + "vw"; + } + + $img.attr("sizes", sizes).attr("srcset", slide.opts.srcset); + } + + // Hide temporary image after some delay + if (slide.$ghost) { + setTimeout(function() { + if (slide.$ghost && !self.isClosing) { + slide.$ghost.hide(); + } + }, Math.min(300, Math.max(1000, slide.height / 1600))); + } + + self.hideLoading(slide); + }) + .addClass("fancybox-image") + .attr("src", slide.src) + .appendTo(slide.$content); + + if ((img.complete || img.readyState == "complete") && $img.naturalWidth && $img.naturalHeight) { + $img.trigger("load"); + } else if (img.error) { + $img.trigger("error"); + } + }, + + // Computes the slide size from image size and maxWidth/maxHeight + // ============================================================== + + resolveImageSlideSize: function(slide, imgWidth, imgHeight) { + var maxWidth = parseInt(slide.opts.width, 10), + maxHeight = parseInt(slide.opts.height, 10); + + // Sets the default values from the image + slide.width = imgWidth; + slide.height = imgHeight; + + if (maxWidth > 0) { + slide.width = maxWidth; + slide.height = Math.floor((maxWidth * imgHeight) / imgWidth); + } + + if (maxHeight > 0) { + slide.width = Math.floor((maxHeight * imgWidth) / imgHeight); + slide.height = maxHeight; + } + }, + + // Create iframe wrapper, iframe and bindings + // ========================================== + + setIframe: function(slide) { + var self = this, + opts = slide.opts.iframe, + $slide = slide.$slide, + $iframe; + + slide.$content = $('
    ') + .css(opts.css) + .appendTo($slide); + + $slide.addClass("fancybox-slide--" + slide.contentType); + + slide.$iframe = $iframe = $(opts.tpl.replace(/\{rnd\}/g, new Date().getTime())) + .attr(opts.attr) + .appendTo(slide.$content); + + if (opts.preload) { + self.showLoading(slide); + + // Unfortunately, it is not always possible to determine if iframe is successfully loaded + // (due to browser security policy) + + $iframe.on("load.fb error.fb", function(e) { + this.isReady = 1; + + slide.$slide.trigger("refresh"); + + self.afterLoad(slide); + }); + + // Recalculate iframe content size + // =============================== + + $slide.on("refresh.fb", function() { + var $content = slide.$content, + frameWidth = opts.css.width, + frameHeight = opts.css.height, + $contents, + $body; + + if ($iframe[0].isReady !== 1) { + return; + } + + try { + $contents = $iframe.contents(); + $body = $contents.find("body"); + } catch (ignore) {} + + // Calculate content dimensions, if it is accessible + if ($body && $body.length && $body.children().length) { + // Avoid scrolling to top (if multiple instances) + $slide.css("overflow", "visible"); + + $content.css({ + width: "100%", + "max-width": "100%", + height: "9999px" + }); + + if (frameWidth === undefined) { + frameWidth = Math.ceil(Math.max($body[0].clientWidth, $body.outerWidth(true))); + } + + $content.css("width", frameWidth ? frameWidth : "").css("max-width", ""); + + if (frameHeight === undefined) { + frameHeight = Math.ceil(Math.max($body[0].clientHeight, $body.outerHeight(true))); + } + + $content.css("height", frameHeight ? frameHeight : ""); + + $slide.css("overflow", "auto"); + } + + $content.removeClass("fancybox-is-hidden"); + }); + } else { + self.afterLoad(slide); + } + + $iframe.attr("src", slide.src); + + // Remove iframe if closing or changing gallery item + $slide.one("onReset", function() { + // This helps IE not to throw errors when closing + try { + $(this) + .find("iframe") + .hide() + .unbind() + .attr("src", "//about:blank"); + } catch (ignore) {} + + $(this) + .off("refresh.fb") + .empty(); + + slide.isLoaded = false; + slide.isRevealed = false; + }); + }, + + // Wrap and append content to the slide + // ====================================== + + setContent: function(slide, content) { + var self = this; + + if (self.isClosing) { + return; + } + + self.hideLoading(slide); + + if (slide.$content) { + $.fancybox.stop(slide.$content); + } + + slide.$slide.empty(); + + // If content is a jQuery object, then it will be moved to the slide. + // The placeholder is created so we will know where to put it back. + if (isQuery(content) && content.parent().length) { + // Make sure content is not already moved to fancyBox + if (content.hasClass("fancybox-content") || content.parent().hasClass("fancybox-content")) { + content.parents(".fancybox-slide").trigger("onReset"); + } + + // Create temporary element marking original place of the content + slide.$placeholder = $("
    ") + .hide() + .insertAfter(content); + + // Make sure content is visible + content.css("display", "inline-block"); + } else if (!slide.hasError) { + // If content is just a plain text, try to convert it to html + if ($.type(content) === "string") { + content = $("
    ") + .append($.trim(content)) + .contents(); + } + + // If "filter" option is provided, then filter content + if (slide.opts.filter) { + content = $("
    ") + .html(content) + .find(slide.opts.filter); + } + } + + slide.$slide.one("onReset", function() { + // Pause all html5 video/audio + $(this) + .find("video,audio") + .trigger("pause"); + + // Put content back + if (slide.$placeholder) { + slide.$placeholder.after(content.removeClass("fancybox-content").hide()).remove(); + + slide.$placeholder = null; + } + + // Remove custom close button + if (slide.$smallBtn) { + slide.$smallBtn.remove(); + + slide.$smallBtn = null; + } + + // Remove content and mark slide as not loaded + if (!slide.hasError) { + $(this).empty(); + + slide.isLoaded = false; + slide.isRevealed = false; + } + }); + + $(content).appendTo(slide.$slide); + + if ($(content).is("video,audio")) { + $(content).addClass("fancybox-video"); + + $(content).wrap("
    "); + + slide.contentType = "video"; + + slide.opts.width = slide.opts.width || $(content).attr("width"); + slide.opts.height = slide.opts.height || $(content).attr("height"); + } + + slide.$content = slide.$slide + .children() + .filter("div,form,main,video,audio,article,.fancybox-content") + .first(); + + slide.$content.siblings().hide(); + + // Re-check if there is a valid content + // (in some cases, ajax response can contain various elements or plain text) + if (!slide.$content.length) { + slide.$content = slide.$slide + .wrapInner("
    ") + .children() + .first(); + } + + slide.$content.addClass("fancybox-content"); + + slide.$slide.addClass("fancybox-slide--" + slide.contentType); + + self.afterLoad(slide); + }, + + // Display error message + // ===================== + + setError: function(slide) { + slide.hasError = true; + + slide.$slide + .trigger("onReset") + .removeClass("fancybox-slide--" + slide.contentType) + .addClass("fancybox-slide--error"); + + slide.contentType = "html"; + + this.setContent(slide, this.translate(slide, slide.opts.errorTpl)); + + if (slide.pos === this.currPos) { + this.isAnimating = false; + } + }, + + // Show loading icon inside the slide + // ================================== + + showLoading: function(slide) { + var self = this; + + slide = slide || self.current; + + if (slide && !slide.$spinner) { + slide.$spinner = $(self.translate(self, self.opts.spinnerTpl)) + .appendTo(slide.$slide) + .hide() + .fadeIn("fast"); + } + }, + + // Remove loading icon from the slide + // ================================== + + hideLoading: function(slide) { + var self = this; + + slide = slide || self.current; + + if (slide && slide.$spinner) { + slide.$spinner.stop().remove(); + + delete slide.$spinner; + } + }, + + // Adjustments after slide content has been loaded + // =============================================== + + afterLoad: function(slide) { + var self = this; + + if (self.isClosing) { + return; + } + + slide.isLoading = false; + slide.isLoaded = true; + + self.trigger("afterLoad", slide); + + self.hideLoading(slide); + + // Add small close button + if (slide.opts.smallBtn && (!slide.$smallBtn || !slide.$smallBtn.length)) { + slide.$smallBtn = $(self.translate(slide, slide.opts.btnTpl.smallBtn)).appendTo(slide.$content); + } + + // Disable right click + if (slide.opts.protect && slide.$content && !slide.hasError) { + slide.$content.on("contextmenu.fb", function(e) { + if (e.button == 2) { + e.preventDefault(); + } + + return true; + }); + + // Add fake element on top of the image + // This makes a bit harder for user to select image + if (slide.type === "image") { + $('
    ').appendTo(slide.$content); + } + } + + self.adjustCaption(slide); + + self.adjustLayout(slide); + + if (slide.pos === self.currPos) { + self.updateCursor(); + } + + self.revealContent(slide); + }, + + // Prevent caption overlap, + // fix css inconsistency across browsers + // ===================================== + + adjustCaption: function(slide) { + var self = this, + current = slide || self.current, + caption = current.opts.caption, + preventOverlap = current.opts.preventCaptionOverlap, + $caption = self.$refs.caption, + $clone, + captionH = false; + + $caption.toggleClass("fancybox-caption--separate", preventOverlap); + + if (preventOverlap && caption && caption.length) { + if (current.pos !== self.currPos) { + $clone = $caption.clone().appendTo($caption.parent()); + + $clone + .children() + .eq(0) + .empty() + .html(caption); + + captionH = $clone.outerHeight(true); + + $clone.empty().remove(); + } else if (self.$caption) { + captionH = self.$caption.outerHeight(true); + } + + current.$slide.css("padding-bottom", captionH || ""); + } + }, + + // Simple hack to fix inconsistency across browsers, described here (affects Edge, too): + // https://bugzilla.mozilla.org/show_bug.cgi?id=748518 + // ==================================================================================== + + adjustLayout: function(slide) { + var self = this, + current = slide || self.current, + scrollHeight, + marginBottom, + inlinePadding, + actualPadding; + + if (current.isLoaded && current.opts.disableLayoutFix !== true) { + current.$content.css("margin-bottom", ""); + + // If we would always set margin-bottom for the content, + // then it would potentially break vertical align + if (current.$content.outerHeight() > current.$slide.height() + 0.5) { + inlinePadding = current.$slide[0].style["padding-bottom"]; + actualPadding = current.$slide.css("padding-bottom"); + + if (parseFloat(actualPadding) > 0) { + scrollHeight = current.$slide[0].scrollHeight; + + current.$slide.css("padding-bottom", 0); + + if (Math.abs(scrollHeight - current.$slide[0].scrollHeight) < 1) { + marginBottom = actualPadding; + } + + current.$slide.css("padding-bottom", inlinePadding); + } + } + + current.$content.css("margin-bottom", marginBottom); + } + }, + + // Make content visible + // This method is called right after content has been loaded or + // user navigates gallery and transition should start + // ============================================================ + + revealContent: function(slide) { + var self = this, + $slide = slide.$slide, + end = false, + start = false, + isMoved = self.isMoved(slide), + isRevealed = slide.isRevealed, + effect, + effectClassName, + duration, + opacity; + + slide.isRevealed = true; + + effect = slide.opts[self.firstRun ? "animationEffect" : "transitionEffect"]; + duration = slide.opts[self.firstRun ? "animationDuration" : "transitionDuration"]; + + duration = parseInt(slide.forcedDuration === undefined ? duration : slide.forcedDuration, 10); + + if (isMoved || slide.pos !== self.currPos || !duration) { + effect = false; + } + + // Check if can zoom + if (effect === "zoom") { + if (slide.pos === self.currPos && duration && slide.type === "image" && !slide.hasError && (start = self.getThumbPos(slide))) { + end = self.getFitPos(slide); + } else { + effect = "fade"; + } + } + + // Zoom animation + // ============== + if (effect === "zoom") { + self.isAnimating = true; + + end.scaleX = end.width / start.width; + end.scaleY = end.height / start.height; + + // Check if we need to animate opacity + opacity = slide.opts.zoomOpacity; + + if (opacity == "auto") { + opacity = Math.abs(slide.width / slide.height - start.width / start.height) > 0.1; + } + + if (opacity) { + start.opacity = 0.1; + end.opacity = 1; + } + + // Draw image at start position + $.fancybox.setTranslate(slide.$content.removeClass("fancybox-is-hidden"), start); + + forceRedraw(slide.$content); + + // Start animation + $.fancybox.animate(slide.$content, end, duration, function() { + self.isAnimating = false; + + self.complete(); + }); + + return; + } + + self.updateSlide(slide); + + // Simply show content if no effect + // ================================ + if (!effect) { + slide.$content.removeClass("fancybox-is-hidden"); + + if (!isRevealed && isMoved && slide.type === "image" && !slide.hasError) { + slide.$content.hide().fadeIn("fast"); + } + + if (slide.pos === self.currPos) { + self.complete(); + } + + return; + } + + // Prepare for CSS transiton + // ========================= + $.fancybox.stop($slide); + + //effectClassName = "fancybox-animated fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-fx-" + effect; + effectClassName = "fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-animated fancybox-fx-" + effect; + + $slide.addClass(effectClassName).removeClass("fancybox-slide--current"); //.addClass(effectClassName); + + slide.$content.removeClass("fancybox-is-hidden"); + + // Force reflow + forceRedraw($slide); + + if (slide.type !== "image") { + slide.$content.hide().show(0); + } + + $.fancybox.animate( + $slide, + "fancybox-slide--current", + duration, + function() { + $slide.removeClass(effectClassName).css({ + transform: "", + opacity: "" + }); + + if (slide.pos === self.currPos) { + self.complete(); + } + }, + true + ); + }, + + // Check if we can and have to zoom from thumbnail + //================================================ + + getThumbPos: function(slide) { + var rez = false, + $thumb = slide.$thumb, + thumbPos, + btw, + brw, + bbw, + blw; + + if (!$thumb || !inViewport($thumb[0])) { + return false; + } + + thumbPos = $.fancybox.getTranslate($thumb); + + btw = parseFloat($thumb.css("border-top-width") || 0); + brw = parseFloat($thumb.css("border-right-width") || 0); + bbw = parseFloat($thumb.css("border-bottom-width") || 0); + blw = parseFloat($thumb.css("border-left-width") || 0); + + rez = { + top: thumbPos.top + btw, + left: thumbPos.left + blw, + width: thumbPos.width - brw - blw, + height: thumbPos.height - btw - bbw, + scaleX: 1, + scaleY: 1 + }; + + return thumbPos.width > 0 && thumbPos.height > 0 ? rez : false; + }, + + // Final adjustments after current gallery item is moved to position + // and it`s content is loaded + // ================================================================== + + complete: function() { + var self = this, + current = self.current, + slides = {}, + $el; + + if (self.isMoved() || !current.isLoaded) { + return; + } + + if (!current.isComplete) { + current.isComplete = true; + + current.$slide.siblings().trigger("onReset"); + + self.preload("inline"); + + // Trigger any CSS transiton inside the slide + forceRedraw(current.$slide); + + current.$slide.addClass("fancybox-slide--complete"); + + // Remove unnecessary slides + $.each(self.slides, function(key, slide) { + if (slide.pos >= self.currPos - 1 && slide.pos <= self.currPos + 1) { + slides[slide.pos] = slide; + } else if (slide) { + $.fancybox.stop(slide.$slide); + + slide.$slide.off().remove(); + } + }); + + self.slides = slides; + } + + self.isAnimating = false; + + self.updateCursor(); + + self.trigger("afterShow"); + + // Autoplay first html5 video/audio + if (!!current.opts.video.autoStart) { + current.$slide + .find("video,audio") + .filter(":visible:first") + .trigger("play") + .one("ended", function() { + if (this.webkitExitFullscreen) { + this.webkitExitFullscreen(); + } + + self.next(); + }); + } + + // Try to focus on the first focusable element + if (current.opts.autoFocus && current.contentType === "html") { + // Look for the first input with autofocus attribute + $el = current.$content.find("input[autofocus]:enabled:visible:first"); + + if ($el.length) { + $el.trigger("focus"); + } else { + self.focus(null, true); + } + } + + // Avoid jumping + current.$slide.scrollTop(0).scrollLeft(0); + }, + + // Preload next and previous slides + // ================================ + + preload: function(type) { + var self = this, + prev, + next; + + if (self.group.length < 2) { + return; + } + + next = self.slides[self.currPos + 1]; + prev = self.slides[self.currPos - 1]; + + if (prev && prev.type === type) { + self.loadSlide(prev); + } + + if (next && next.type === type) { + self.loadSlide(next); + } + }, + + // Try to find and focus on the first focusable element + // ==================================================== + + focus: function(e, firstRun) { + var self = this, + focusableStr = [ + "a[href]", + "area[href]", + 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', + "select:not([disabled]):not([aria-hidden])", + "textarea:not([disabled]):not([aria-hidden])", + "button:not([disabled]):not([aria-hidden])", + "iframe", + "object", + "embed", + "video", + "audio", + "[contenteditable]", + '[tabindex]:not([tabindex^="-"])' + ].join(","), + focusableItems, + focusedItemIndex; + + if (self.isClosing) { + return; + } + + if (e || !self.current || !self.current.isComplete) { + // Focus on any element inside fancybox + focusableItems = self.$refs.container.find("*:visible"); + } else { + // Focus inside current slide + focusableItems = self.current.$slide.find("*:visible" + (firstRun ? ":not(.fancybox-close-small)" : "")); + } + + focusableItems = focusableItems.filter(focusableStr).filter(function() { + return $(this).css("visibility") !== "hidden" && !$(this).hasClass("disabled"); + }); + + if (focusableItems.length) { + focusedItemIndex = focusableItems.index(document.activeElement); + + if (e && e.shiftKey) { + // Back tab + if (focusedItemIndex < 0 || focusedItemIndex == 0) { + e.preventDefault(); + + focusableItems.eq(focusableItems.length - 1).trigger("focus"); + } + } else { + // Outside or Forward tab + if (focusedItemIndex < 0 || focusedItemIndex == focusableItems.length - 1) { + if (e) { + e.preventDefault(); + } + + focusableItems.eq(0).trigger("focus"); + } + } + } else { + self.$refs.container.trigger("focus"); + } + }, + + // Activates current instance - brings container to the front and enables keyboard, + // notifies other instances about deactivating + // ================================================================================= + + activate: function() { + var self = this; + + // Deactivate all instances + $(".fancybox-container").each(function() { + var instance = $(this).data("FancyBox"); + + // Skip self and closing instances + if (instance && instance.id !== self.id && !instance.isClosing) { + instance.trigger("onDeactivate"); + + instance.removeEvents(); + + instance.isVisible = false; + } + }); + + self.isVisible = true; + + if (self.current || self.isIdle) { + self.update(); + + self.updateControls(); + } + + self.trigger("onActivate"); + + self.addEvents(); + }, + + // Start closing procedure + // This will start "zoom-out" animation if needed and clean everything up afterwards + // ================================================================================= + + close: function(e, d) { + var self = this, + current = self.current, + effect, + duration, + $content, + domRect, + opacity, + start, + end; + + var done = function() { + self.cleanUp(e); + }; + + if (self.isClosing) { + return false; + } + + self.isClosing = true; + + // If beforeClose callback prevents closing, make sure content is centered + if (self.trigger("beforeClose", e) === false) { + self.isClosing = false; + + requestAFrame(function() { + self.update(); + }); + + return false; + } + + // Remove all events + // If there are multiple instances, they will be set again by "activate" method + self.removeEvents(); + + $content = current.$content; + effect = current.opts.animationEffect; + duration = $.isNumeric(d) ? d : effect ? current.opts.animationDuration : 0; + + current.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"); + + if (e !== true) { + $.fancybox.stop(current.$slide); + } else { + effect = false; + } + + // Remove other slides + current.$slide + .siblings() + .trigger("onReset") + .remove(); + + // Trigger animations + if (duration) { + self.$refs.container + .removeClass("fancybox-is-open") + .addClass("fancybox-is-closing") + .css("transition-duration", duration + "ms"); + } + + // Clean up + self.hideLoading(current); + + self.hideControls(true); + + self.updateCursor(); + + // Check if possible to zoom-out + if ( + effect === "zoom" && + !($content && duration && current.type === "image" && !self.isMoved() && !current.hasError && (end = self.getThumbPos(current))) + ) { + effect = "fade"; + } + + if (effect === "zoom") { + $.fancybox.stop($content); + + domRect = $.fancybox.getTranslate($content); + + start = { + top: domRect.top, + left: domRect.left, + scaleX: domRect.width / end.width, + scaleY: domRect.height / end.height, + width: end.width, + height: end.height + }; + + // Check if we need to animate opacity + opacity = current.opts.zoomOpacity; + + if (opacity == "auto") { + opacity = Math.abs(current.width / current.height - end.width / end.height) > 0.1; + } + + if (opacity) { + end.opacity = 0; + } + + $.fancybox.setTranslate($content, start); + + forceRedraw($content); + + $.fancybox.animate($content, end, duration, done); + + return true; + } + + if (effect && duration) { + $.fancybox.animate( + current.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"), + "fancybox-animated fancybox-fx-" + effect, + duration, + done + ); + } else { + // If skip animation + if (e === true) { + setTimeout(done, duration); + } else { + done(); + } + } + + return true; + }, + + // Final adjustments after removing the instance + // ============================================= + + cleanUp: function(e) { + var self = this, + instance, + $focus = self.current.opts.$orig, + x, + y; + + self.current.$slide.trigger("onReset"); + + self.$refs.container.empty().remove(); + + self.trigger("afterClose", e); + + // Place back focus + if (!!self.current.opts.backFocus) { + if (!$focus || !$focus.length || !$focus.is(":visible")) { + $focus = self.$trigger; + } + + if ($focus && $focus.length) { + x = window.scrollX; + y = window.scrollY; + + $focus.trigger("focus"); + + $("html, body") + .scrollTop(y) + .scrollLeft(x); + } + } + + self.current = null; + + // Check if there are other instances + instance = $.fancybox.getInstance(); + + if (instance) { + instance.activate(); + } else { + $("body").removeClass("fancybox-active compensate-for-scrollbar"); + + $("#fancybox-style-noscroll").remove(); + } + }, + + // Call callback and trigger an event + // ================================== + + trigger: function(name, slide) { + var args = Array.prototype.slice.call(arguments, 1), + self = this, + obj = slide && slide.opts ? slide : self.current, + rez; + + if (obj) { + args.unshift(obj); + } else { + obj = self; + } + + args.unshift(self); + + if ($.isFunction(obj.opts[name])) { + rez = obj.opts[name].apply(obj, args); + } + + if (rez === false) { + return rez; + } + + if (name === "afterClose" || !self.$refs) { + $D.trigger(name + ".fb", args); + } else { + self.$refs.container.trigger(name + ".fb", args); + } + }, + + // Update infobar values, navigation button states and reveal caption + // ================================================================== + + updateControls: function() { + var self = this, + current = self.current, + index = current.index, + $container = self.$refs.container, + $caption = self.$refs.caption, + caption = current.opts.caption; + + // Recalculate content dimensions + current.$slide.trigger("refresh"); + + // Set caption + if (caption && caption.length) { + self.$caption = $caption; + + $caption + .children() + .eq(0) + .html(caption); + } else { + self.$caption = null; + } + + if (!self.hasHiddenControls && !self.isIdle) { + self.showControls(); + } + + // Update info and navigation elements + $container.find("[data-fancybox-count]").html(self.group.length); + $container.find("[data-fancybox-index]").html(index + 1); + + $container.find("[data-fancybox-prev]").prop("disabled", !current.opts.loop && index <= 0); + $container.find("[data-fancybox-next]").prop("disabled", !current.opts.loop && index >= self.group.length - 1); + + if (current.type === "image") { + // Re-enable buttons; update download button source + $container + .find("[data-fancybox-zoom]") + .show() + .end() + .find("[data-fancybox-download]") + .attr("href", current.opts.image.src || current.src) + .show(); + } else if (current.opts.toolbar) { + $container.find("[data-fancybox-download],[data-fancybox-zoom]").hide(); + } + + // Make sure focus is not on disabled button/element + if ($(document.activeElement).is(":hidden,[disabled]")) { + self.$refs.container.trigger("focus"); + } + }, + + // Hide toolbar and caption + // ======================== + + hideControls: function(andCaption) { + var self = this, + arr = ["infobar", "toolbar", "nav"]; + + if (andCaption || !self.current.opts.preventCaptionOverlap) { + arr.push("caption"); + } + + this.$refs.container.removeClass( + arr + .map(function(i) { + return "fancybox-show-" + i; + }) + .join(" ") + ); + + this.hasHiddenControls = true; + }, + + showControls: function() { + var self = this, + opts = self.current ? self.current.opts : self.opts, + $container = self.$refs.container; + + self.hasHiddenControls = false; + self.idleSecondsCounter = 0; + + $container + .toggleClass("fancybox-show-toolbar", !!(opts.toolbar && opts.buttons)) + .toggleClass("fancybox-show-infobar", !!(opts.infobar && self.group.length > 1)) + .toggleClass("fancybox-show-caption", !!self.$caption) + .toggleClass("fancybox-show-nav", !!(opts.arrows && self.group.length > 1)) + .toggleClass("fancybox-is-modal", !!opts.modal); + }, + + // Toggle toolbar and caption + // ========================== + + toggleControls: function() { + if (this.hasHiddenControls) { + this.showControls(); + } else { + this.hideControls(); + } + } + }); + + $.fancybox = { + version: "3.5.6", + defaults: defaults, + + // Get current instance and execute a command. + // + // Examples of usage: + // + // $instance = $.fancybox.getInstance(); + // $.fancybox.getInstance().jumpTo( 1 ); + // $.fancybox.getInstance( 'jumpTo', 1 ); + // $.fancybox.getInstance( function() { + // console.info( this.currIndex ); + // }); + // ====================================================== + + getInstance: function(command) { + var instance = $('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"), + args = Array.prototype.slice.call(arguments, 1); + + if (instance instanceof FancyBox) { + if ($.type(command) === "string") { + instance[command].apply(instance, args); + } else if ($.type(command) === "function") { + command.apply(instance, args); + } + + return instance; + } + + return false; + }, + + // Create new instance + // =================== + + open: function(items, opts, index) { + return new FancyBox(items, opts, index); + }, + + // Close current or all instances + // ============================== + + close: function(all) { + var instance = this.getInstance(); + + if (instance) { + instance.close(); + + // Try to find and close next instance + if (all === true) { + this.close(all); + } + } + }, + + // Close all instances and unbind all events + // ========================================= + + destroy: function() { + this.close(true); + + $D.add("body").off("click.fb-start", "**"); + }, + + // Try to detect mobile devices + // ============================ + + isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), + + // Detect if 'translate3d' support is available + // ============================================ + + use3d: (function() { + var div = document.createElement("div"); + + return ( + window.getComputedStyle && + window.getComputedStyle(div) && + window.getComputedStyle(div).getPropertyValue("transform") && + !(document.documentMode && document.documentMode < 11) + ); + })(), + + // Helper function to get current visual state of an element + // returns array[ top, left, horizontal-scale, vertical-scale, opacity ] + // ===================================================================== + + getTranslate: function($el) { + var domRect; + + if (!$el || !$el.length) { + return false; + } + + domRect = $el[0].getBoundingClientRect(); + + return { + top: domRect.top || 0, + left: domRect.left || 0, + width: domRect.width, + height: domRect.height, + opacity: parseFloat($el.css("opacity")) + }; + }, + + // Shortcut for setting "translate3d" properties for element + // Can set be used to set opacity, too + // ======================================================== + + setTranslate: function($el, props) { + var str = "", + css = {}; + + if (!$el || !props) { + return; + } + + if (props.left !== undefined || props.top !== undefined) { + str = + (props.left === undefined ? $el.position().left : props.left) + + "px, " + + (props.top === undefined ? $el.position().top : props.top) + + "px"; + + if (this.use3d) { + str = "translate3d(" + str + ", 0px)"; + } else { + str = "translate(" + str + ")"; + } + } + + if (props.scaleX !== undefined && props.scaleY !== undefined) { + str += " scale(" + props.scaleX + ", " + props.scaleY + ")"; + } else if (props.scaleX !== undefined) { + str += " scaleX(" + props.scaleX + ")"; + } + + if (str.length) { + css.transform = str; + } + + if (props.opacity !== undefined) { + css.opacity = props.opacity; + } + + if (props.width !== undefined) { + css.width = props.width; + } + + if (props.height !== undefined) { + css.height = props.height; + } + + return $el.css(css); + }, + + // Simple CSS transition handler + // ============================= + + animate: function($el, to, duration, callback, leaveAnimationName) { + var self = this, + from; + + if ($.isFunction(duration)) { + callback = duration; + duration = null; + } + + self.stop($el); + + from = self.getTranslate($el); + + $el.on(transitionEnd, function(e) { + // Skip events from child elements and z-index change + if (e && e.originalEvent && (!$el.is(e.originalEvent.target) || e.originalEvent.propertyName == "z-index")) { + return; + } + + self.stop($el); + + if ($.isNumeric(duration)) { + $el.css("transition-duration", ""); + } + + if ($.isPlainObject(to)) { + if (to.scaleX !== undefined && to.scaleY !== undefined) { + self.setTranslate($el, { + top: to.top, + left: to.left, + width: from.width * to.scaleX, + height: from.height * to.scaleY, + scaleX: 1, + scaleY: 1 + }); + } + } else if (leaveAnimationName !== true) { + $el.removeClass(to); + } + + if ($.isFunction(callback)) { + callback(e); + } + }); + + if ($.isNumeric(duration)) { + $el.css("transition-duration", duration + "ms"); + } + + // Start animation by changing CSS properties or class name + if ($.isPlainObject(to)) { + if (to.scaleX !== undefined && to.scaleY !== undefined) { + delete to.width; + delete to.height; + + if ($el.parent().hasClass("fancybox-slide--image")) { + $el.parent().addClass("fancybox-is-scaling"); + } + } + + $.fancybox.setTranslate($el, to); + } else { + $el.addClass(to); + } + + // Make sure that `transitionend` callback gets fired + $el.data( + "timer", + setTimeout(function() { + $el.trigger(transitionEnd); + }, duration + 33) + ); + }, + + stop: function($el, callCallback) { + if ($el && $el.length) { + clearTimeout($el.data("timer")); + + if (callCallback) { + $el.trigger(transitionEnd); + } + + $el.off(transitionEnd).css("transition-duration", ""); + + $el.parent().removeClass("fancybox-is-scaling"); + } + } + }; + + // Default click handler for "fancyboxed" links + // ============================================ + + function _run(e, opts) { + var items = [], + index = 0, + $target, + value, + instance; + + // Avoid opening multiple times + if (e && e.isDefaultPrevented()) { + return; + } + + e.preventDefault(); + + opts = opts || {}; + + if (e && e.data) { + opts = mergeOpts(e.data.options, opts); + } + + $target = opts.$target || $(e.currentTarget).trigger("blur"); + instance = $.fancybox.getInstance(); + + if (instance && instance.$trigger && instance.$trigger.is($target)) { + return; + } + + if (opts.selector) { + items = $(opts.selector); + } else { + // Get all related items and find index for clicked one + value = $target.attr("data-fancybox") || ""; + + if (value) { + items = e.data ? e.data.items : []; + items = items.length ? items.filter('[data-fancybox="' + value + '"]') : $('[data-fancybox="' + value + '"]'); + } else { + items = [$target]; + } + } + + index = $(items).index($target); + + // Sometimes current item can not be found + if (index < 0) { + index = 0; + } + + instance = $.fancybox.open(items, opts, index); + + // Save last active element + instance.$trigger = $target; + } + + // Create a jQuery plugin + // ====================== + + $.fn.fancybox = function(options) { + var selector; + + options = options || {}; + selector = options.selector || false; + + if (selector) { + // Use body element instead of document so it executes first + $("body") + .off("click.fb-start", selector) + .on("click.fb-start", selector, {options: options}, _run); + } else { + this.off("click.fb-start").on( + "click.fb-start", + { + items: this, + options: options + }, + _run + ); + } + + return this; + }; + + // Self initializing plugin for all elements having `data-fancybox` attribute + // ========================================================================== + + $D.on("click.fb-start", "[data-fancybox]", _run); + + // Enable "trigger elements" + // ========================= + + $D.on("click.fb-start", "[data-fancybox-trigger]", function(e) { + $('[data-fancybox="' + $(this).attr("data-fancybox-trigger") + '"]') + .eq($(this).attr("data-fancybox-index") || 0) + .trigger("click.fb-start", { + $trigger: $(this) + }); + }); + + // Track focus event for better accessibility styling + // ================================================== + (function() { + var buttonStr = ".fancybox-button", + focusStr = "fancybox-focus", + $pressed = null; + + $D.on("mousedown mouseup focus blur", buttonStr, function(e) { + switch (e.type) { + case "mousedown": + $pressed = $(this); + break; + case "mouseup": + $pressed = null; + break; + case "focusin": + $(buttonStr).removeClass(focusStr); + + if (!$(this).is($pressed) && !$(this).is("[disabled]")) { + $(this).addClass(focusStr); + } + break; + case "focusout": + $(buttonStr).removeClass(focusStr); + break; + } + }); + })(); +})(window, document, jQuery); + +// ========================================================================== +// +// Media +// Adds additional media type support +// +// ========================================================================== +(function($) { + "use strict"; + + // Object containing properties for each media type + var defaults = { + youtube: { + matcher: /(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i, + params: { + autoplay: 1, + autohide: 1, + fs: 1, + rel: 0, + hd: 1, + wmode: "transparent", + enablejsapi: 1, + html5: 1 + }, + paramPlace: 8, + type: "iframe", + url: "https://www.youtube-nocookie.com/embed/$4", + thumb: "https://img.youtube.com/vi/$4/hqdefault.jpg" + }, + + vimeo: { + matcher: /^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/, + params: { + autoplay: 1, + hd: 1, + show_title: 1, + show_byline: 1, + show_portrait: 0, + fullscreen: 1 + }, + paramPlace: 3, + type: "iframe", + url: "//player.vimeo.com/video/$2" + }, + + instagram: { + matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, + type: "image", + url: "//$1/p/$2/media/?size=l" + }, + + // Examples: + // http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 + // https://www.google.com/maps/@37.7852006,-122.4146355,14.65z + // https://www.google.com/maps/@52.2111123,2.9237542,6.61z?hl=en + // https://www.google.com/maps/place/Googleplex/@37.4220041,-122.0833494,17z/data=!4m5!3m4!1s0x0:0x6c296c66619367e0!8m2!3d37.4219998!4d-122.0840572 + gmap_place: { + matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i, + type: "iframe", + url: function(rez) { + return ( + "//maps.google." + + rez[2] + + "/?ll=" + + (rez[9] ? rez[9] + "&z=" + Math.floor(rez[10]) + (rez[12] ? rez[12].replace(/^\//, "&") : "") : rez[12] + "").replace(/\?/, "&") + + "&output=" + + (rez[12] && rez[12].indexOf("layer=c") > 0 ? "svembed" : "embed") + ); + } + }, + + // Examples: + // https://www.google.com/maps/search/Empire+State+Building/ + // https://www.google.com/maps/search/?api=1&query=centurylink+field + // https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393 + gmap_search: { + matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i, + type: "iframe", + url: function(rez) { + return "//maps.google." + rez[2] + "/maps?q=" + rez[5].replace("query=", "q=").replace("api=1", "") + "&output=embed"; + } + } + }; + + // Formats matching url to final form + var format = function(url, rez, params) { + if (!url) { + return; + } + + params = params || ""; + + if ($.type(params) === "object") { + params = $.param(params, true); + } + + $.each(rez, function(key, value) { + url = url.replace("$" + key, value || ""); + }); + + if (params.length) { + url += (url.indexOf("?") > 0 ? "&" : "?") + params; + } + + return url; + }; + + $(document).on("objectNeedsType.fb", function(e, instance, item) { + var url = item.src || "", + type = false, + media, + thumb, + rez, + params, + urlParams, + paramObj, + provider; + + media = $.extend(true, {}, defaults, item.opts.media); + + // Look for any matching media type + $.each(media, function(providerName, providerOpts) { + rez = url.match(providerOpts.matcher); + + if (!rez) { + return; + } + + type = providerOpts.type; + provider = providerName; + paramObj = {}; + + if (providerOpts.paramPlace && rez[providerOpts.paramPlace]) { + urlParams = rez[providerOpts.paramPlace]; + + if (urlParams[0] == "?") { + urlParams = urlParams.substring(1); + } + + urlParams = urlParams.split("&"); + + for (var m = 0; m < urlParams.length; ++m) { + var p = urlParams[m].split("=", 2); + + if (p.length == 2) { + paramObj[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); + } + } + } + + params = $.extend(true, {}, providerOpts.params, item.opts[providerName], paramObj); + + url = + $.type(providerOpts.url) === "function" ? providerOpts.url.call(this, rez, params, item) : format(providerOpts.url, rez, params); + + thumb = + $.type(providerOpts.thumb) === "function" ? providerOpts.thumb.call(this, rez, params, item) : format(providerOpts.thumb, rez); + + if (providerName === "youtube") { + url = url.replace(/&t=((\d+)m)?(\d+)s/, function(match, p1, m, s) { + return "&start=" + ((m ? parseInt(m, 10) * 60 : 0) + parseInt(s, 10)); + }); + } else if (providerName === "vimeo") { + url = url.replace("&%23", "#"); + } + + return false; + }); + + // If it is found, then change content type and update the url + + if (type) { + if (!item.opts.thumb && !(item.opts.$thumb && item.opts.$thumb.length)) { + item.opts.thumb = thumb; + } + + if (type === "iframe") { + item.opts = $.extend(true, item.opts, { + iframe: { + preload: false, + attr: { + scrolling: "no" + } + } + }); + } + + $.extend(item, { + type: type, + src: url, + origSrc: item.src, + contentSource: provider, + contentType: type === "image" ? "image" : provider == "gmap_place" || provider == "gmap_search" ? "map" : "video" + }); + } else if (url) { + item.type = item.opts.defaultType; + } + }); + + // Load YouTube/Video API on request to detect when video finished playing + var VideoAPILoader = { + youtube: { + src: "https://www.youtube.com/iframe_api", + class: "YT", + loading: false, + loaded: false + }, + + vimeo: { + src: "https://player.vimeo.com/api/player.js", + class: "Vimeo", + loading: false, + loaded: false + }, + + load: function(vendor) { + var _this = this, + script; + + if (this[vendor].loaded) { + setTimeout(function() { + _this.done(vendor); + }); + return; + } + + if (this[vendor].loading) { + return; + } + + this[vendor].loading = true; + + script = document.createElement("script"); + script.type = "text/javascript"; + script.src = this[vendor].src; + + if (vendor === "youtube") { + window.onYouTubeIframeAPIReady = function() { + _this[vendor].loaded = true; + _this.done(vendor); + }; + } else { + script.onload = function() { + _this[vendor].loaded = true; + _this.done(vendor); + }; + } + + document.body.appendChild(script); + }, + done: function(vendor) { + var instance, $el, player; + + if (vendor === "youtube") { + delete window.onYouTubeIframeAPIReady; + } + + instance = $.fancybox.getInstance(); + + if (instance) { + $el = instance.current.$content.find("iframe"); + + if (vendor === "youtube" && YT !== undefined && YT) { + player = new YT.Player($el.attr("id"), { + events: { + onStateChange: function(e) { + if (e.data == 0) { + instance.next(); + } + } + } + }); + } else if (vendor === "vimeo" && Vimeo !== undefined && Vimeo) { + player = new Vimeo.Player($el); + + player.on("ended", function() { + instance.next(); + }); + } + } + } + }; + + $(document).on({ + "afterShow.fb": function(e, instance, current) { + if (instance.group.length > 1 && (current.contentSource === "youtube" || current.contentSource === "vimeo")) { + VideoAPILoader.load(current.contentSource); + } + } + }); +})(jQuery); + +// ========================================================================== +// +// Guestures +// Adds touch guestures, handles click and tap events +// +// ========================================================================== +(function(window, document, $) { + "use strict"; + + var requestAFrame = (function() { + return ( + window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + // if all else fails, use setTimeout + function(callback) { + return window.setTimeout(callback, 1000 / 60); + } + ); + })(); + + var cancelAFrame = (function() { + return ( + window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + window.oCancelAnimationFrame || + function(id) { + window.clearTimeout(id); + } + ); + })(); + + var getPointerXY = function(e) { + var result = []; + + e = e.originalEvent || e || window.e; + e = e.touches && e.touches.length ? e.touches : e.changedTouches && e.changedTouches.length ? e.changedTouches : [e]; + + for (var key in e) { + if (e[key].pageX) { + result.push({ + x: e[key].pageX, + y: e[key].pageY + }); + } else if (e[key].clientX) { + result.push({ + x: e[key].clientX, + y: e[key].clientY + }); + } + } + + return result; + }; + + var distance = function(point2, point1, what) { + if (!point1 || !point2) { + return 0; + } + + if (what === "x") { + return point2.x - point1.x; + } else if (what === "y") { + return point2.y - point1.y; + } + + return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2)); + }; + + var isClickable = function($el) { + if ( + $el.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe') || + $.isFunction($el.get(0).onclick) || + $el.data("selectable") + ) { + return true; + } + + // Check for attributes like data-fancybox-next or data-fancybox-close + for (var i = 0, atts = $el[0].attributes, n = atts.length; i < n; i++) { + if (atts[i].nodeName.substr(0, 14) === "data-fancybox-") { + return true; + } + } + + return false; + }; + + var hasScrollbars = function(el) { + var overflowY = window.getComputedStyle(el)["overflow-y"], + overflowX = window.getComputedStyle(el)["overflow-x"], + vertical = (overflowY === "scroll" || overflowY === "auto") && el.scrollHeight > el.clientHeight, + horizontal = (overflowX === "scroll" || overflowX === "auto") && el.scrollWidth > el.clientWidth; + + return vertical || horizontal; + }; + + var isScrollable = function($el) { + var rez = false; + + while (true) { + rez = hasScrollbars($el.get(0)); + + if (rez) { + break; + } + + $el = $el.parent(); + + if (!$el.length || $el.hasClass("fancybox-stage") || $el.is("body")) { + break; + } + } + + return rez; + }; + + var Guestures = function(instance) { + var self = this; + + self.instance = instance; + + self.$bg = instance.$refs.bg; + self.$stage = instance.$refs.stage; + self.$container = instance.$refs.container; + + self.destroy(); + + self.$container.on("touchstart.fb.touch mousedown.fb.touch", $.proxy(self, "ontouchstart")); + }; + + Guestures.prototype.destroy = function() { + var self = this; + + self.$container.off(".fb.touch"); + + $(document).off(".fb.touch"); + + if (self.requestId) { + cancelAFrame(self.requestId); + self.requestId = null; + } + + if (self.tapped) { + clearTimeout(self.tapped); + self.tapped = null; + } + }; + + Guestures.prototype.ontouchstart = function(e) { + var self = this, + $target = $(e.target), + instance = self.instance, + current = instance.current, + $slide = current.$slide, + $content = current.$content, + isTouchDevice = e.type == "touchstart"; + + // Do not respond to both (touch and mouse) events + if (isTouchDevice) { + self.$container.off("mousedown.fb.touch"); + } + + // Ignore right click + if (e.originalEvent && e.originalEvent.button == 2) { + return; + } + + // Ignore taping on links, buttons, input elements + if (!$slide.length || !$target.length || isClickable($target) || isClickable($target.parent())) { + return; + } + // Ignore clicks on the scrollbar + if (!$target.is("img") && e.originalEvent.clientX > $target[0].clientWidth + $target.offset().left) { + return; + } + + // Ignore clicks while zooming or closing + if (!current || instance.isAnimating || current.$slide.hasClass("fancybox-animated")) { + e.stopPropagation(); + e.preventDefault(); + + return; + } + + self.realPoints = self.startPoints = getPointerXY(e); + + if (!self.startPoints.length) { + return; + } + + // Allow other scripts to catch touch event if "touch" is set to false + if (current.touch) { + e.stopPropagation(); + } + + self.startEvent = e; + + self.canTap = true; + self.$target = $target; + self.$content = $content; + self.opts = current.opts.touch; + + self.isPanning = false; + self.isSwiping = false; + self.isZooming = false; + self.isScrolling = false; + self.canPan = instance.canPan(); + + self.startTime = new Date().getTime(); + self.distanceX = self.distanceY = self.distance = 0; + + self.canvasWidth = Math.round($slide[0].clientWidth); + self.canvasHeight = Math.round($slide[0].clientHeight); + + self.contentLastPos = null; + self.contentStartPos = $.fancybox.getTranslate(self.$content) || {top: 0, left: 0}; + self.sliderStartPos = $.fancybox.getTranslate($slide); + + // Since position will be absolute, but we need to make it relative to the stage + self.stagePos = $.fancybox.getTranslate(instance.$refs.stage); + + self.sliderStartPos.top -= self.stagePos.top; + self.sliderStartPos.left -= self.stagePos.left; + + self.contentStartPos.top -= self.stagePos.top; + self.contentStartPos.left -= self.stagePos.left; + + $(document) + .off(".fb.touch") + .on(isTouchDevice ? "touchend.fb.touch touchcancel.fb.touch" : "mouseup.fb.touch mouseleave.fb.touch", $.proxy(self, "ontouchend")) + .on(isTouchDevice ? "touchmove.fb.touch" : "mousemove.fb.touch", $.proxy(self, "ontouchmove")); + + if ($.fancybox.isMobile) { + document.addEventListener("scroll", self.onscroll, true); + } + + // Skip if clicked outside the sliding area + if (!(self.opts || self.canPan) || !($target.is(self.$stage) || self.$stage.find($target).length)) { + if ($target.is(".fancybox-image")) { + e.preventDefault(); + } + + if (!($.fancybox.isMobile && $target.parents(".fancybox-caption").length)) { + return; + } + } + + self.isScrollable = isScrollable($target) || isScrollable($target.parent()); + + // Check if element is scrollable and try to prevent default behavior (scrolling) + if (!($.fancybox.isMobile && self.isScrollable)) { + e.preventDefault(); + } + + // One finger or mouse click - swipe or pan an image + if (self.startPoints.length === 1 || current.hasError) { + if (self.canPan) { + $.fancybox.stop(self.$content); + + self.isPanning = true; + } else { + self.isSwiping = true; + } + + self.$container.addClass("fancybox-is-grabbing"); + } + + // Two fingers - zoom image + if (self.startPoints.length === 2 && current.type === "image" && (current.isLoaded || current.$ghost)) { + self.canTap = false; + self.isSwiping = false; + self.isPanning = false; + + self.isZooming = true; + + $.fancybox.stop(self.$content); + + self.centerPointStartX = (self.startPoints[0].x + self.startPoints[1].x) * 0.5 - $(window).scrollLeft(); + self.centerPointStartY = (self.startPoints[0].y + self.startPoints[1].y) * 0.5 - $(window).scrollTop(); + + self.percentageOfImageAtPinchPointX = (self.centerPointStartX - self.contentStartPos.left) / self.contentStartPos.width; + self.percentageOfImageAtPinchPointY = (self.centerPointStartY - self.contentStartPos.top) / self.contentStartPos.height; + + self.startDistanceBetweenFingers = distance(self.startPoints[0], self.startPoints[1]); + } + }; + + Guestures.prototype.onscroll = function(e) { + var self = this; + + self.isScrolling = true; + + document.removeEventListener("scroll", self.onscroll, true); + }; + + Guestures.prototype.ontouchmove = function(e) { + var self = this; + + // Make sure user has not released over iframe or disabled element + if (e.originalEvent.buttons !== undefined && e.originalEvent.buttons === 0) { + self.ontouchend(e); + return; + } + + if (self.isScrolling) { + self.canTap = false; + return; + } + + self.newPoints = getPointerXY(e); + + if (!(self.opts || self.canPan) || !self.newPoints.length || !self.newPoints.length) { + return; + } + + if (!(self.isSwiping && self.isSwiping === true)) { + e.preventDefault(); + } + + self.distanceX = distance(self.newPoints[0], self.startPoints[0], "x"); + self.distanceY = distance(self.newPoints[0], self.startPoints[0], "y"); + + self.distance = distance(self.newPoints[0], self.startPoints[0]); + + // Skip false ontouchmove events (Chrome) + if (self.distance > 0) { + if (self.isSwiping) { + self.onSwipe(e); + } else if (self.isPanning) { + self.onPan(); + } else if (self.isZooming) { + self.onZoom(); + } + } + }; + + Guestures.prototype.onSwipe = function(e) { + var self = this, + instance = self.instance, + swiping = self.isSwiping, + left = self.sliderStartPos.left || 0, + angle; + + // If direction is not yet determined + if (swiping === true) { + // We need at least 10px distance to correctly calculate an angle + if (Math.abs(self.distance) > 10) { + self.canTap = false; + + if (instance.group.length < 2 && self.opts.vertical) { + self.isSwiping = "y"; + } else if (instance.isDragging || self.opts.vertical === false || (self.opts.vertical === "auto" && $(window).width() > 800)) { + self.isSwiping = "x"; + } else { + angle = Math.abs((Math.atan2(self.distanceY, self.distanceX) * 180) / Math.PI); + + self.isSwiping = angle > 45 && angle < 135 ? "y" : "x"; + } + + if (self.isSwiping === "y" && $.fancybox.isMobile && self.isScrollable) { + self.isScrolling = true; + + return; + } + + instance.isDragging = self.isSwiping; + + // Reset points to avoid jumping, because we dropped first swipes to calculate the angle + self.startPoints = self.newPoints; + + $.each(instance.slides, function(index, slide) { + var slidePos, stagePos; + + $.fancybox.stop(slide.$slide); + + slidePos = $.fancybox.getTranslate(slide.$slide); + stagePos = $.fancybox.getTranslate(instance.$refs.stage); + + slide.$slide + .css({ + transform: "", + opacity: "", + "transition-duration": "" + }) + .removeClass("fancybox-animated") + .removeClass(function(index, className) { + return (className.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" "); + }); + + if (slide.pos === instance.current.pos) { + self.sliderStartPos.top = slidePos.top - stagePos.top; + self.sliderStartPos.left = slidePos.left - stagePos.left; + } + + $.fancybox.setTranslate(slide.$slide, { + top: slidePos.top - stagePos.top, + left: slidePos.left - stagePos.left + }); + }); + + // Stop slideshow + if (instance.SlideShow && instance.SlideShow.isActive) { + instance.SlideShow.stop(); + } + } + + return; + } + + // Sticky edges + if (swiping == "x") { + if ( + self.distanceX > 0 && + (self.instance.group.length < 2 || (self.instance.current.index === 0 && !self.instance.current.opts.loop)) + ) { + left = left + Math.pow(self.distanceX, 0.8); + } else if ( + self.distanceX < 0 && + (self.instance.group.length < 2 || + (self.instance.current.index === self.instance.group.length - 1 && !self.instance.current.opts.loop)) + ) { + left = left - Math.pow(-self.distanceX, 0.8); + } else { + left = left + self.distanceX; + } + } + + self.sliderLastPos = { + top: swiping == "x" ? 0 : self.sliderStartPos.top + self.distanceY, + left: left + }; + + if (self.requestId) { + cancelAFrame(self.requestId); + + self.requestId = null; + } + + self.requestId = requestAFrame(function() { + if (self.sliderLastPos) { + $.each(self.instance.slides, function(index, slide) { + var pos = slide.pos - self.instance.currPos; + + $.fancybox.setTranslate(slide.$slide, { + top: self.sliderLastPos.top, + left: self.sliderLastPos.left + pos * self.canvasWidth + pos * slide.opts.gutter + }); + }); + + self.$container.addClass("fancybox-is-sliding"); + } + }); + }; + + Guestures.prototype.onPan = function() { + var self = this; + + // Prevent accidental movement (sometimes, when tapping casually, finger can move a bit) + if (distance(self.newPoints[0], self.realPoints[0]) < ($.fancybox.isMobile ? 10 : 5)) { + self.startPoints = self.newPoints; + return; + } + + self.canTap = false; + + self.contentLastPos = self.limitMovement(); + + if (self.requestId) { + cancelAFrame(self.requestId); + } + + self.requestId = requestAFrame(function() { + $.fancybox.setTranslate(self.$content, self.contentLastPos); + }); + }; + + // Make panning sticky to the edges + Guestures.prototype.limitMovement = function() { + var self = this; + + var canvasWidth = self.canvasWidth; + var canvasHeight = self.canvasHeight; + + var distanceX = self.distanceX; + var distanceY = self.distanceY; + + var contentStartPos = self.contentStartPos; + + var currentOffsetX = contentStartPos.left; + var currentOffsetY = contentStartPos.top; + + var currentWidth = contentStartPos.width; + var currentHeight = contentStartPos.height; + + var minTranslateX, minTranslateY, maxTranslateX, maxTranslateY, newOffsetX, newOffsetY; + + if (currentWidth > canvasWidth) { + newOffsetX = currentOffsetX + distanceX; + } else { + newOffsetX = currentOffsetX; + } + + newOffsetY = currentOffsetY + distanceY; + + // Slow down proportionally to traveled distance + minTranslateX = Math.max(0, canvasWidth * 0.5 - currentWidth * 0.5); + minTranslateY = Math.max(0, canvasHeight * 0.5 - currentHeight * 0.5); + + maxTranslateX = Math.min(canvasWidth - currentWidth, canvasWidth * 0.5 - currentWidth * 0.5); + maxTranslateY = Math.min(canvasHeight - currentHeight, canvasHeight * 0.5 - currentHeight * 0.5); + + // -> + if (distanceX > 0 && newOffsetX > minTranslateX) { + newOffsetX = minTranslateX - 1 + Math.pow(-minTranslateX + currentOffsetX + distanceX, 0.8) || 0; + } + + // <- + if (distanceX < 0 && newOffsetX < maxTranslateX) { + newOffsetX = maxTranslateX + 1 - Math.pow(maxTranslateX - currentOffsetX - distanceX, 0.8) || 0; + } + + // \/ + if (distanceY > 0 && newOffsetY > minTranslateY) { + newOffsetY = minTranslateY - 1 + Math.pow(-minTranslateY + currentOffsetY + distanceY, 0.8) || 0; + } + + // /\ + if (distanceY < 0 && newOffsetY < maxTranslateY) { + newOffsetY = maxTranslateY + 1 - Math.pow(maxTranslateY - currentOffsetY - distanceY, 0.8) || 0; + } + + return { + top: newOffsetY, + left: newOffsetX + }; + }; + + Guestures.prototype.limitPosition = function(newOffsetX, newOffsetY, newWidth, newHeight) { + var self = this; + + var canvasWidth = self.canvasWidth; + var canvasHeight = self.canvasHeight; + + if (newWidth > canvasWidth) { + newOffsetX = newOffsetX > 0 ? 0 : newOffsetX; + newOffsetX = newOffsetX < canvasWidth - newWidth ? canvasWidth - newWidth : newOffsetX; + } else { + // Center horizontally + newOffsetX = Math.max(0, canvasWidth / 2 - newWidth / 2); + } + + if (newHeight > canvasHeight) { + newOffsetY = newOffsetY > 0 ? 0 : newOffsetY; + newOffsetY = newOffsetY < canvasHeight - newHeight ? canvasHeight - newHeight : newOffsetY; + } else { + // Center vertically + newOffsetY = Math.max(0, canvasHeight / 2 - newHeight / 2); + } + + return { + top: newOffsetY, + left: newOffsetX + }; + }; + + Guestures.prototype.onZoom = function() { + var self = this; + + // Calculate current distance between points to get pinch ratio and new width and height + var contentStartPos = self.contentStartPos; + + var currentWidth = contentStartPos.width; + var currentHeight = contentStartPos.height; + + var currentOffsetX = contentStartPos.left; + var currentOffsetY = contentStartPos.top; + + var endDistanceBetweenFingers = distance(self.newPoints[0], self.newPoints[1]); + + var pinchRatio = endDistanceBetweenFingers / self.startDistanceBetweenFingers; + + var newWidth = Math.floor(currentWidth * pinchRatio); + var newHeight = Math.floor(currentHeight * pinchRatio); + + // This is the translation due to pinch-zooming + var translateFromZoomingX = (currentWidth - newWidth) * self.percentageOfImageAtPinchPointX; + var translateFromZoomingY = (currentHeight - newHeight) * self.percentageOfImageAtPinchPointY; + + // Point between the two touches + var centerPointEndX = (self.newPoints[0].x + self.newPoints[1].x) / 2 - $(window).scrollLeft(); + var centerPointEndY = (self.newPoints[0].y + self.newPoints[1].y) / 2 - $(window).scrollTop(); + + // And this is the translation due to translation of the centerpoint + // between the two fingers + var translateFromTranslatingX = centerPointEndX - self.centerPointStartX; + var translateFromTranslatingY = centerPointEndY - self.centerPointStartY; + + // The new offset is the old/current one plus the total translation + var newOffsetX = currentOffsetX + (translateFromZoomingX + translateFromTranslatingX); + var newOffsetY = currentOffsetY + (translateFromZoomingY + translateFromTranslatingY); + + var newPos = { + top: newOffsetY, + left: newOffsetX, + scaleX: pinchRatio, + scaleY: pinchRatio + }; + + self.canTap = false; + + self.newWidth = newWidth; + self.newHeight = newHeight; + + self.contentLastPos = newPos; + + if (self.requestId) { + cancelAFrame(self.requestId); + } + + self.requestId = requestAFrame(function() { + $.fancybox.setTranslate(self.$content, self.contentLastPos); + }); + }; + + Guestures.prototype.ontouchend = function(e) { + var self = this; + + var swiping = self.isSwiping; + var panning = self.isPanning; + var zooming = self.isZooming; + var scrolling = self.isScrolling; + + self.endPoints = getPointerXY(e); + self.dMs = Math.max(new Date().getTime() - self.startTime, 1); + + self.$container.removeClass("fancybox-is-grabbing"); + + $(document).off(".fb.touch"); + + document.removeEventListener("scroll", self.onscroll, true); + + if (self.requestId) { + cancelAFrame(self.requestId); + + self.requestId = null; + } + + self.isSwiping = false; + self.isPanning = false; + self.isZooming = false; + self.isScrolling = false; + + self.instance.isDragging = false; + + if (self.canTap) { + return self.onTap(e); + } + + self.speed = 100; + + // Speed in px/ms + self.velocityX = (self.distanceX / self.dMs) * 0.5; + self.velocityY = (self.distanceY / self.dMs) * 0.5; + + if (panning) { + self.endPanning(); + } else if (zooming) { + self.endZooming(); + } else { + self.endSwiping(swiping, scrolling); + } + + return; + }; + + Guestures.prototype.endSwiping = function(swiping, scrolling) { + var self = this, + ret = false, + len = self.instance.group.length, + distanceX = Math.abs(self.distanceX), + canAdvance = swiping == "x" && len > 1 && ((self.dMs > 130 && distanceX > 10) || distanceX > 50), + speedX = 300; + + self.sliderLastPos = null; + + // Close if swiped vertically / navigate if horizontally + if (swiping == "y" && !scrolling && Math.abs(self.distanceY) > 50) { + // Continue vertical movement + $.fancybox.animate( + self.instance.current.$slide, + { + top: self.sliderStartPos.top + self.distanceY + self.velocityY * 150, + opacity: 0 + }, + 200 + ); + ret = self.instance.close(true, 250); + } else if (canAdvance && self.distanceX > 0) { + ret = self.instance.previous(speedX); + } else if (canAdvance && self.distanceX < 0) { + ret = self.instance.next(speedX); + } + + if (ret === false && (swiping == "x" || swiping == "y")) { + self.instance.centerSlide(200); + } + + self.$container.removeClass("fancybox-is-sliding"); + }; + + // Limit panning from edges + // ======================== + Guestures.prototype.endPanning = function() { + var self = this, + newOffsetX, + newOffsetY, + newPos; + + if (!self.contentLastPos) { + return; + } + + if (self.opts.momentum === false || self.dMs > 350) { + newOffsetX = self.contentLastPos.left; + newOffsetY = self.contentLastPos.top; + } else { + // Continue movement + newOffsetX = self.contentLastPos.left + self.velocityX * 500; + newOffsetY = self.contentLastPos.top + self.velocityY * 500; + } + + newPos = self.limitPosition(newOffsetX, newOffsetY, self.contentStartPos.width, self.contentStartPos.height); + + newPos.width = self.contentStartPos.width; + newPos.height = self.contentStartPos.height; + + $.fancybox.animate(self.$content, newPos, 366); + }; + + Guestures.prototype.endZooming = function() { + var self = this; + + var current = self.instance.current; + + var newOffsetX, newOffsetY, newPos, reset; + + var newWidth = self.newWidth; + var newHeight = self.newHeight; + + if (!self.contentLastPos) { + return; + } + + newOffsetX = self.contentLastPos.left; + newOffsetY = self.contentLastPos.top; + + reset = { + top: newOffsetY, + left: newOffsetX, + width: newWidth, + height: newHeight, + scaleX: 1, + scaleY: 1 + }; + + // Reset scalex/scaleY values; this helps for perfomance and does not break animation + $.fancybox.setTranslate(self.$content, reset); + + if (newWidth < self.canvasWidth && newHeight < self.canvasHeight) { + self.instance.scaleToFit(150); + } else if (newWidth > current.width || newHeight > current.height) { + self.instance.scaleToActual(self.centerPointStartX, self.centerPointStartY, 150); + } else { + newPos = self.limitPosition(newOffsetX, newOffsetY, newWidth, newHeight); + + $.fancybox.animate(self.$content, newPos, 150); + } + }; + + Guestures.prototype.onTap = function(e) { + var self = this; + var $target = $(e.target); + + var instance = self.instance; + var current = instance.current; + + var endPoints = (e && getPointerXY(e)) || self.startPoints; + + var tapX = endPoints[0] ? endPoints[0].x - $(window).scrollLeft() - self.stagePos.left : 0; + var tapY = endPoints[0] ? endPoints[0].y - $(window).scrollTop() - self.stagePos.top : 0; + + var where; + + var process = function(prefix) { + var action = current.opts[prefix]; + + if ($.isFunction(action)) { + action = action.apply(instance, [current, e]); + } + + if (!action) { + return; + } + + switch (action) { + case "close": + instance.close(self.startEvent); + + break; + + case "toggleControls": + instance.toggleControls(); + + break; + + case "next": + instance.next(); + + break; + + case "nextOrClose": + if (instance.group.length > 1) { + instance.next(); + } else { + instance.close(self.startEvent); + } + + break; + + case "zoom": + if (current.type == "image" && (current.isLoaded || current.$ghost)) { + if (instance.canPan()) { + instance.scaleToFit(); + } else if (instance.isScaledDown()) { + instance.scaleToActual(tapX, tapY); + } else if (instance.group.length < 2) { + instance.close(self.startEvent); + } + } + + break; + } + }; + + // Ignore right click + if (e.originalEvent && e.originalEvent.button == 2) { + return; + } + + // Skip if clicked on the scrollbar + if (!$target.is("img") && tapX > $target[0].clientWidth + $target.offset().left) { + return; + } + + // Check where is clicked + if ($target.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container")) { + where = "Outside"; + } else if ($target.is(".fancybox-slide")) { + where = "Slide"; + } else if ( + instance.current.$content && + instance.current.$content + .find($target) + .addBack() + .filter($target).length + ) { + where = "Content"; + } else { + return; + } + + // Check if this is a double tap + if (self.tapped) { + // Stop previously created single tap + clearTimeout(self.tapped); + self.tapped = null; + + // Skip if distance between taps is too big + if (Math.abs(tapX - self.tapX) > 50 || Math.abs(tapY - self.tapY) > 50) { + return this; + } + + // OK, now we assume that this is a double-tap + process("dblclick" + where); + } else { + // Single tap will be processed if user has not clicked second time within 300ms + // or there is no need to wait for double-tap + self.tapX = tapX; + self.tapY = tapY; + + if (current.opts["dblclick" + where] && current.opts["dblclick" + where] !== current.opts["click" + where]) { + self.tapped = setTimeout(function() { + self.tapped = null; + + if (!instance.isAnimating) { + process("click" + where); + } + }, 500); + } else { + process("click" + where); + } + } + + return this; + }; + + $(document) + .on("onActivate.fb", function(e, instance) { + if (instance && !instance.Guestures) { + instance.Guestures = new Guestures(instance); + } + }) + .on("beforeClose.fb", function(e, instance) { + if (instance && instance.Guestures) { + instance.Guestures.destroy(); + } + }); +})(window, document, jQuery); + +// ========================================================================== +// +// SlideShow +// Enables slideshow functionality +// +// Example of usage: +// $.fancybox.getInstance().SlideShow.start() +// +// ========================================================================== +(function(document, $) { + "use strict"; + + $.extend(true, $.fancybox.defaults, { + btnTpl: { + slideShow: + '" + }, + slideShow: { + autoStart: false, + speed: 3000, + progress: true + } + }); + + var SlideShow = function(instance) { + this.instance = instance; + this.init(); + }; + + $.extend(SlideShow.prototype, { + timer: null, + isActive: false, + $button: null, + + init: function() { + var self = this, + instance = self.instance, + opts = instance.group[instance.currIndex].opts.slideShow; + + self.$button = instance.$refs.toolbar.find("[data-fancybox-play]").on("click", function() { + self.toggle(); + }); + + if (instance.group.length < 2 || !opts) { + self.$button.hide(); + } else if (opts.progress) { + self.$progress = $('
    ').appendTo(instance.$refs.inner); + } + }, + + set: function(force) { + var self = this, + instance = self.instance, + current = instance.current; + + // Check if reached last element + if (current && (force === true || current.opts.loop || instance.currIndex < instance.group.length - 1)) { + if (self.isActive && current.contentType !== "video") { + if (self.$progress) { + $.fancybox.animate(self.$progress.show(), {scaleX: 1}, current.opts.slideShow.speed); + } + + self.timer = setTimeout(function() { + if (!instance.current.opts.loop && instance.current.index == instance.group.length - 1) { + instance.jumpTo(0); + } else { + instance.next(); + } + }, current.opts.slideShow.speed); + } + } else { + self.stop(); + instance.idleSecondsCounter = 0; + instance.showControls(); + } + }, + + clear: function() { + var self = this; + + clearTimeout(self.timer); + + self.timer = null; + + if (self.$progress) { + self.$progress.removeAttr("style").hide(); + } + }, + + start: function() { + var self = this, + current = self.instance.current; + + if (current) { + self.$button + .attr("title", (current.opts.i18n[current.opts.lang] || current.opts.i18n.en).PLAY_STOP) + .removeClass("fancybox-button--play") + .addClass("fancybox-button--pause"); + + self.isActive = true; + + if (current.isComplete) { + self.set(true); + } + + self.instance.trigger("onSlideShowChange", true); + } + }, + + stop: function() { + var self = this, + current = self.instance.current; + + self.clear(); + + self.$button + .attr("title", (current.opts.i18n[current.opts.lang] || current.opts.i18n.en).PLAY_START) + .removeClass("fancybox-button--pause") + .addClass("fancybox-button--play"); + + self.isActive = false; + + self.instance.trigger("onSlideShowChange", false); + + if (self.$progress) { + self.$progress.removeAttr("style").hide(); + } + }, + + toggle: function() { + var self = this; + + if (self.isActive) { + self.stop(); + } else { + self.start(); + } + } + }); + + $(document).on({ + "onInit.fb": function(e, instance) { + if (instance && !instance.SlideShow) { + instance.SlideShow = new SlideShow(instance); + } + }, + + "beforeShow.fb": function(e, instance, current, firstRun) { + var SlideShow = instance && instance.SlideShow; + + if (firstRun) { + if (SlideShow && current.opts.slideShow.autoStart) { + SlideShow.start(); + } + } else if (SlideShow && SlideShow.isActive) { + SlideShow.clear(); + } + }, + + "afterShow.fb": function(e, instance, current) { + var SlideShow = instance && instance.SlideShow; + + if (SlideShow && SlideShow.isActive) { + SlideShow.set(); + } + }, + + "afterKeydown.fb": function(e, instance, current, keypress, keycode) { + var SlideShow = instance && instance.SlideShow; + + // "P" or Spacebar + if (SlideShow && current.opts.slideShow && (keycode === 80 || keycode === 32) && !$(document.activeElement).is("button,a,input")) { + keypress.preventDefault(); + + SlideShow.toggle(); + } + }, + + "beforeClose.fb onDeactivate.fb": function(e, instance) { + var SlideShow = instance && instance.SlideShow; + + if (SlideShow) { + SlideShow.stop(); + } + } + }); + + // Page Visibility API to pause slideshow when window is not active + $(document).on("visibilitychange", function() { + var instance = $.fancybox.getInstance(), + SlideShow = instance && instance.SlideShow; + + if (SlideShow && SlideShow.isActive) { + if (document.hidden) { + SlideShow.clear(); + } else { + SlideShow.set(); + } + } + }); +})(document, jQuery); + +// ========================================================================== +// +// FullScreen +// Adds fullscreen functionality +// +// ========================================================================== +(function(document, $) { + "use strict"; + + // Collection of methods supported by user browser + var fn = (function() { + var fnMap = [ + ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], + // new WebKit + [ + "webkitRequestFullscreen", + "webkitExitFullscreen", + "webkitFullscreenElement", + "webkitFullscreenEnabled", + "webkitfullscreenchange", + "webkitfullscreenerror" + ], + // old WebKit (Safari 5.1) + [ + "webkitRequestFullScreen", + "webkitCancelFullScreen", + "webkitCurrentFullScreenElement", + "webkitCancelFullScreen", + "webkitfullscreenchange", + "webkitfullscreenerror" + ], + [ + "mozRequestFullScreen", + "mozCancelFullScreen", + "mozFullScreenElement", + "mozFullScreenEnabled", + "mozfullscreenchange", + "mozfullscreenerror" + ], + ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"] + ]; + + var ret = {}; + + for (var i = 0; i < fnMap.length; i++) { + var val = fnMap[i]; + + if (val && val[1] in document) { + for (var j = 0; j < val.length; j++) { + ret[fnMap[0][j]] = val[j]; + } + + return ret; + } + } + + return false; + })(); + + if (fn) { + var FullScreen = { + request: function(elem) { + elem = elem || document.documentElement; + + elem[fn.requestFullscreen](elem.ALLOW_KEYBOARD_INPUT); + }, + exit: function() { + document[fn.exitFullscreen](); + }, + toggle: function(elem) { + elem = elem || document.documentElement; + + if (this.isFullscreen()) { + this.exit(); + } else { + this.request(elem); + } + }, + isFullscreen: function() { + return Boolean(document[fn.fullscreenElement]); + }, + enabled: function() { + return Boolean(document[fn.fullscreenEnabled]); + } + }; + + $.extend(true, $.fancybox.defaults, { + btnTpl: { + fullScreen: + '" + }, + fullScreen: { + autoStart: false + } + }); + + $(document).on(fn.fullscreenchange, function() { + var isFullscreen = FullScreen.isFullscreen(), + instance = $.fancybox.getInstance(); + + if (instance) { + // If image is zooming, then force to stop and reposition properly + if (instance.current && instance.current.type === "image" && instance.isAnimating) { + instance.isAnimating = false; + + instance.update(true, true, 0); + + if (!instance.isComplete) { + instance.complete(); + } + } + + instance.trigger("onFullscreenChange", isFullscreen); + + instance.$refs.container.toggleClass("fancybox-is-fullscreen", isFullscreen); + + instance.$refs.toolbar + .find("[data-fancybox-fullscreen]") + .toggleClass("fancybox-button--fsenter", !isFullscreen) + .toggleClass("fancybox-button--fsexit", isFullscreen); + } + }); + } + + $(document).on({ + "onInit.fb": function(e, instance) { + var $container; + + if (!fn) { + instance.$refs.toolbar.find("[data-fancybox-fullscreen]").remove(); + + return; + } + + if (instance && instance.group[instance.currIndex].opts.fullScreen) { + $container = instance.$refs.container; + + $container.on("click.fb-fullscreen", "[data-fancybox-fullscreen]", function(e) { + e.stopPropagation(); + e.preventDefault(); + + FullScreen.toggle(); + }); + + if (instance.opts.fullScreen && instance.opts.fullScreen.autoStart === true) { + FullScreen.request(); + } + + // Expose API + instance.FullScreen = FullScreen; + } else if (instance) { + instance.$refs.toolbar.find("[data-fancybox-fullscreen]").hide(); + } + }, + + "afterKeydown.fb": function(e, instance, current, keypress, keycode) { + // "F" + if (instance && instance.FullScreen && keycode === 70) { + keypress.preventDefault(); + + instance.FullScreen.toggle(); + } + }, + + "beforeClose.fb": function(e, instance) { + if (instance && instance.FullScreen && instance.$refs.container.hasClass("fancybox-is-fullscreen")) { + FullScreen.exit(); + } + } + }); +})(document, jQuery); + +// ========================================================================== +// +// Thumbs +// Displays thumbnails in a grid +// +// ========================================================================== +(function(document, $) { + "use strict"; + + var CLASS = "fancybox-thumbs", + CLASS_ACTIVE = CLASS + "-active"; + + // Make sure there are default values + $.fancybox.defaults = $.extend( + true, + { + btnTpl: { + thumbs: + '" + }, + thumbs: { + autoStart: false, // Display thumbnails on opening + hideOnClose: true, // Hide thumbnail grid when closing animation starts + parentEl: ".fancybox-container", // Container is injected into this element + axis: "y" // Vertical (y) or horizontal (x) scrolling + } + }, + $.fancybox.defaults + ); + + var FancyThumbs = function(instance) { + this.init(instance); + }; + + $.extend(FancyThumbs.prototype, { + $button: null, + $grid: null, + $list: null, + isVisible: false, + isActive: false, + + init: function(instance) { + var self = this, + group = instance.group, + enabled = 0; + + self.instance = instance; + self.opts = group[instance.currIndex].opts.thumbs; + + instance.Thumbs = self; + + self.$button = instance.$refs.toolbar.find("[data-fancybox-thumbs]"); + + // Enable thumbs if at least two group items have thumbnails + for (var i = 0, len = group.length; i < len; i++) { + if (group[i].thumb) { + enabled++; + } + + if (enabled > 1) { + break; + } + } + + if (enabled > 1 && !!self.opts) { + self.$button.removeAttr("style").on("click", function() { + self.toggle(); + }); + + self.isActive = true; + } else { + self.$button.hide(); + } + }, + + create: function() { + var self = this, + instance = self.instance, + parentEl = self.opts.parentEl, + list = [], + src; + + if (!self.$grid) { + // Create main element + self.$grid = $('
    ').appendTo( + instance.$refs.container + .find(parentEl) + .addBack() + .filter(parentEl) + ); + + // Add "click" event that performs gallery navigation + self.$grid.on("click", "a", function() { + instance.jumpTo($(this).attr("data-index")); + }); + } + + // Build the list + if (!self.$list) { + self.$list = $('
    ').appendTo(self.$grid); + } + + $.each(instance.group, function(i, item) { + src = item.thumb; + + if (!src && item.type === "image") { + src = item.src; + } + + list.push( + '" + ); + }); + + self.$list[0].innerHTML = list.join(""); + + if (self.opts.axis === "x") { + // Set fixed width for list element to enable horizontal scrolling + self.$list.width( + parseInt(self.$grid.css("padding-right"), 10) + + instance.group.length * + self.$list + .children() + .eq(0) + .outerWidth(true) + ); + } + }, + + focus: function(duration) { + var self = this, + $list = self.$list, + $grid = self.$grid, + thumb, + thumbPos; + + if (!self.instance.current) { + return; + } + + thumb = $list + .children() + .removeClass(CLASS_ACTIVE) + .filter('[data-index="' + self.instance.current.index + '"]') + .addClass(CLASS_ACTIVE); + + thumbPos = thumb.position(); + + // Check if need to scroll to make current thumb visible + if (self.opts.axis === "y" && (thumbPos.top < 0 || thumbPos.top > $list.height() - thumb.outerHeight())) { + $list.stop().animate( + { + scrollTop: $list.scrollTop() + thumbPos.top + }, + duration + ); + } else if ( + self.opts.axis === "x" && + (thumbPos.left < $grid.scrollLeft() || thumbPos.left > $grid.scrollLeft() + ($grid.width() - thumb.outerWidth())) + ) { + $list + .parent() + .stop() + .animate( + { + scrollLeft: thumbPos.left + }, + duration + ); + } + }, + + update: function() { + var that = this; + that.instance.$refs.container.toggleClass("fancybox-show-thumbs", this.isVisible); + + if (that.isVisible) { + if (!that.$grid) { + that.create(); + } + + that.instance.trigger("onThumbsShow"); + + that.focus(0); + } else if (that.$grid) { + that.instance.trigger("onThumbsHide"); + } + + // Update content position + that.instance.update(); + }, + + hide: function() { + this.isVisible = false; + this.update(); + }, + + show: function() { + this.isVisible = true; + this.update(); + }, + + toggle: function() { + this.isVisible = !this.isVisible; + this.update(); + } + }); + + $(document).on({ + "onInit.fb": function(e, instance) { + var Thumbs; + + if (instance && !instance.Thumbs) { + Thumbs = new FancyThumbs(instance); + + if (Thumbs.isActive && Thumbs.opts.autoStart === true) { + Thumbs.show(); + } + } + }, + + "beforeShow.fb": function(e, instance, item, firstRun) { + var Thumbs = instance && instance.Thumbs; + + if (Thumbs && Thumbs.isVisible) { + Thumbs.focus(firstRun ? 0 : 250); + } + }, + + "afterKeydown.fb": function(e, instance, current, keypress, keycode) { + var Thumbs = instance && instance.Thumbs; + + // "G" + if (Thumbs && Thumbs.isActive && keycode === 71) { + keypress.preventDefault(); + + Thumbs.toggle(); + } + }, + + "beforeClose.fb": function(e, instance) { + var Thumbs = instance && instance.Thumbs; + + if (Thumbs && Thumbs.isVisible && Thumbs.opts.hideOnClose !== false) { + Thumbs.$grid.hide(); + } + } + }); +})(document, jQuery); + +//// ========================================================================== +// +// Share +// Displays simple form for sharing current url +// +// ========================================================================== +(function(document, $) { + "use strict"; + + $.extend(true, $.fancybox.defaults, { + btnTpl: { + share: + '" + }, + share: { + url: function(instance, item) { + return ( + (!instance.currentHash && !(item.type === "inline" || item.type === "html") ? item.origSrc || item.src : false) || window.location + ); + }, + tpl: + '
    ' + + "

    {{SHARE}}

    " + + "

    " + + '' + + '' + + "Facebook" + + "" + + '' + + '' + + "Twitter" + + "" + + '' + + '' + + "Pinterest" + + "" + + "

    " + + '

    ' + + "
    " + } + }); + + function escapeHtml(string) { + var entityMap = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "/": "/", + "`": "`", + "=": "=" + }; + + return String(string).replace(/[&<>"'`=\/]/g, function(s) { + return entityMap[s]; + }); + } + + $(document).on("click", "[data-fancybox-share]", function() { + var instance = $.fancybox.getInstance(), + current = instance.current || null, + url, + tpl; + + if (!current) { + return; + } + + if ($.type(current.opts.share.url) === "function") { + url = current.opts.share.url.apply(current, [instance, current]); + } + + tpl = current.opts.share.tpl + .replace(/\{\{media\}\}/g, current.type === "image" ? encodeURIComponent(current.src) : "") + .replace(/\{\{url\}\}/g, encodeURIComponent(url)) + .replace(/\{\{url_raw\}\}/g, escapeHtml(url)) + .replace(/\{\{descr\}\}/g, instance.$caption ? encodeURIComponent(instance.$caption.text()) : ""); + + $.fancybox.open({ + src: instance.translate(instance, tpl), + type: "html", + opts: { + touch: false, + animationEffect: false, + afterLoad: function(shareInstance, shareCurrent) { + // Close self if parent instance is closing + instance.$refs.container.one("beforeClose.fb", function() { + shareInstance.close(null, 0); + }); + + // Opening links in a popup window + shareCurrent.$content.find(".fancybox-share__button").click(function() { + window.open(this.href, "Share", "width=550, height=450"); + return false; + }); + }, + mobile: { + autoFocus: false + } + } + }); + }); +})(document, jQuery); + +// ========================================================================== +// +// Hash +// Enables linking to each modal +// +// ========================================================================== +(function(window, document, $) { + "use strict"; + + // Simple $.escapeSelector polyfill (for jQuery prior v3) + if (!$.escapeSelector) { + $.escapeSelector = function(sel) { + var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; + var fcssescape = function(ch, asCodePoint) { + if (asCodePoint) { + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if (ch === "\0") { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }; + + return (sel + "").replace(rcssescape, fcssescape); + }; + } + + // Get info about gallery name and current index from url + function parseUrl() { + var hash = window.location.hash.substr(1), + rez = hash.split("-"), + index = rez.length > 1 && /^\+?\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1, + gallery = rez.join("-"); + + return { + hash: hash, + /* Index is starting from 1 */ + index: index < 1 ? 1 : index, + gallery: gallery + }; + } + + // Trigger click evnt on links to open new fancyBox instance + function triggerFromUrl(url) { + if (url.gallery !== "") { + // If we can find element matching 'data-fancybox' atribute, + // then triggering click event should start fancyBox + $("[data-fancybox='" + $.escapeSelector(url.gallery) + "']") + .eq(url.index - 1) + .focus() + .trigger("click.fb-start"); + } + } + + // Get gallery name from current instance + function getGalleryID(instance) { + var opts, ret; + + if (!instance) { + return false; + } + + opts = instance.current ? instance.current.opts : instance.opts; + ret = opts.hash || (opts.$orig ? opts.$orig.data("fancybox") || opts.$orig.data("fancybox-trigger") : ""); + + return ret === "" ? false : ret; + } + + // Start when DOM becomes ready + $(function() { + // Check if user has disabled this module + if ($.fancybox.defaults.hash === false) { + return; + } + + // Update hash when opening/closing fancyBox + $(document).on({ + "onInit.fb": function(e, instance) { + var url, gallery; + + if (instance.group[instance.currIndex].opts.hash === false) { + return; + } + + url = parseUrl(); + gallery = getGalleryID(instance); + + // Make sure gallery start index matches index from hash + if (gallery && url.gallery && gallery == url.gallery) { + instance.currIndex = url.index - 1; + } + }, + + "beforeShow.fb": function(e, instance, current, firstRun) { + var gallery; + + if (!current || current.opts.hash === false) { + return; + } + + // Check if need to update window hash + gallery = getGalleryID(instance); + + if (!gallery) { + return; + } + + // Variable containing last hash value set by fancyBox + // It will be used to determine if fancyBox needs to close after hash change is detected + instance.currentHash = gallery + (instance.group.length > 1 ? "-" + (current.index + 1) : ""); + + // If current hash is the same (this instance most likely is opened by hashchange), then do nothing + if (window.location.hash === "#" + instance.currentHash) { + return; + } + + if (firstRun && !instance.origHash) { + instance.origHash = window.location.hash; + } + + if (instance.hashTimer) { + clearTimeout(instance.hashTimer); + } + + // Update hash + instance.hashTimer = setTimeout(function() { + if ("replaceState" in window.history) { + window.history[firstRun ? "pushState" : "replaceState"]( + {}, + document.title, + window.location.pathname + window.location.search + "#" + instance.currentHash + ); + + if (firstRun) { + instance.hasCreatedHistory = true; + } + } else { + window.location.hash = instance.currentHash; + } + + instance.hashTimer = null; + }, 300); + }, + + "beforeClose.fb": function(e, instance, current) { + if (!current || current.opts.hash === false) { + return; + } + + clearTimeout(instance.hashTimer); + + // Goto previous history entry + if (instance.currentHash && instance.hasCreatedHistory) { + window.history.back(); + } else if (instance.currentHash) { + if ("replaceState" in window.history) { + window.history.replaceState({}, document.title, window.location.pathname + window.location.search + (instance.origHash || "")); + } else { + window.location.hash = instance.origHash; + } + } + + instance.currentHash = null; + } + }); + + // Check if need to start/close after url has changed + $(window).on("hashchange.fb", function() { + var url = parseUrl(), + fb = null; + + // Find last fancyBox instance that has "hash" + $.each( + $(".fancybox-container") + .get() + .reverse(), + function(index, value) { + var tmp = $(value).data("FancyBox"); + + if (tmp && tmp.currentHash) { + fb = tmp; + return false; + } + } + ); + + if (fb) { + // Now, compare hash values + if (fb.currentHash !== url.gallery + "-" + url.index && !(url.index === 1 && fb.currentHash == url.gallery)) { + fb.currentHash = null; + + fb.close(); + } + } else if (url.gallery !== "") { + triggerFromUrl(url); + } + }); + + // Check current hash and trigger click event on matching element to start fancyBox, if needed + setTimeout(function() { + if (!$.fancybox.getInstance()) { + triggerFromUrl(parseUrl()); + } + }, 50); + }); +})(window, document, jQuery); + +// ========================================================================== +// +// Wheel +// Basic mouse weheel support for gallery navigation +// +// ========================================================================== +(function(document, $) { + "use strict"; + + var prevTime = new Date().getTime(); + + $(document).on({ + "onInit.fb": function(e, instance, current) { + instance.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll", function(e) { + var current = instance.current, + currTime = new Date().getTime(); + + if (instance.group.length < 2 || current.opts.wheel === false || (current.opts.wheel === "auto" && current.type !== "image")) { + return; + } + + e.preventDefault(); + e.stopPropagation(); + + if (current.$slide.hasClass("fancybox-animated")) { + return; + } + + e = e.originalEvent || e; + + if (currTime - prevTime < 250) { + return; + } + + prevTime = currTime; + + instance[(-e.deltaY || -e.deltaX || e.wheelDelta || -e.detail) < 0 ? "next" : "previous"](); + }); + } + }); +})(document, jQuery); diff --git a/plugin/gallerypage/data.json b/plugin/gallerypage/data.json new file mode 100644 index 0000000..acb06bb --- /dev/null +++ b/plugin/gallerypage/data.json @@ -0,0 +1 @@ +[{"thumbnail":"https://images.unsplash.com/photo-1461529959205-ba7d61debd0b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=0653332e9c1498112a303c583c102f6a","enlarged":"https://images.unsplash.com/photo-1461529959205-ba7d61debd0b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=a74e25633c9c659c0778b71ca9aa33a0","title":"Antonio Ron ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":443.74009508716324,"tHeight":300,"eWidth":2800,"eHeight":1893},{"thumbnail":"https://images.unsplash.com/photo-1461511669078-d46bf351cd6e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=6c049f444a1102cffa9d6bbc79f33559","enlarged":"https://images.unsplash.com/photo-1461511669078-d46bf351cd6e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=1927bbe981f4f2f68683c6639673436f","title":"Marc Wieland ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":449.9390491670053,"tHeight":300,"eWidth":3691,"eHeight":2461},{"thumbnail":"https://images.unsplash.com/photo-1461511540000-cadab67b2b84?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=2aa8a0e35aaaae42a40f7bd8c83754bb","enlarged":"https://images.unsplash.com/photo-1461511540000-cadab67b2b84?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=c19919f27cd695d35a19f315024ebb5a","title":"Marc Wieland ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4581,"eHeight":3054},{"thumbnail":"https://images.unsplash.com/photo-1461503312594-019be44dd599?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=ee73f48df5fbd7e666a9c84ab0bef482","enlarged":"https://images.unsplash.com/photo-1461503312594-019be44dd599?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=e0681e8efba4b14e980e1491d76ce9b6","title":"Tim Marshall ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5184,"eHeight":3456},{"thumbnail":"https://images.unsplash.com/photo-1461499982595-c43c266c57bf?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=540c6145e21e4fcbb7506ee3cb2cc764","enlarged":"https://images.unsplash.com/photo-1461499982595-c43c266c57bf?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=9cbf99dba085124fbb297e17a83b79a8","title":"Pineapples , ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}},{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5337,"eHeight":3558},{"thumbnail":"https://images.unsplash.com/photo-1461489418981-38015d9f587c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=f32c075236a3cfcedd79cfae74b6b335","enlarged":"https://images.unsplash.com/photo-1461489418981-38015d9f587c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=ed035483917eeb50eaaa67beabf49a16","title":"Chris Lawton , ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":449.9613302397525,"tHeight":300,"eWidth":5818,"eHeight":3879},{"thumbnail":"https://images.unsplash.com/photo-1461484261293-7175bb44e871?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=5b6fed2c736faa3d60fb0d409b811001","enlarged":"https://images.unsplash.com/photo-1461484261293-7175bb44e871?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=5a0dd4668d1240cf726d6dfa16fff565","title":"Igor Lepilin ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4563,"eHeight":3042},{"thumbnail":"https://images.unsplash.com/photo-1461471007646-cb8d3837f93a?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=2d3afa94ea0af69a5da3d92cdc7df8e6","enlarged":"https://images.unsplash.com/photo-1461471007646-cb8d3837f93a?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=24aa071844a564c549303ad2b5db4a07","title":"Charles Yeager ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":400,"tHeight":300,"eWidth":4000,"eHeight":3000},{"thumbnail":"https://images.unsplash.com/photo-1461468611824-46457c0e11fd?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=6b062881920aa55ab8ea88f2cef4d4ce","enlarged":"https://images.unsplash.com/photo-1461468611824-46457c0e11fd?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=a035cc63ca5112addcce8399c7cd432a","title":"Artem Kovalev ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4104,"eHeight":2736},{"thumbnail":"https://images.unsplash.com/photo-1461441076521-862f137ed06c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=c97f9220bf4d6b3c3ef18615e689c5ef","enlarged":"https://images.unsplash.com/photo-1461441076521-862f137ed06c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=d4b5272fdde31f7a4f435154795315fa","title":"Crawford Ifland ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4401,"eHeight":2934},{"thumbnail":"https://images.unsplash.com/photo-1461440728156-f48806552a74?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=7f49cddb59dfec91406b294a07b2624a","enlarged":"https://images.unsplash.com/photo-1461440728156-f48806552a74?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=92135527fe6d11909e4172e7e2f3d9e6","title":"Crawford Ifland ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5637,"eHeight":3758},{"thumbnail":"https://images.unsplash.com/photo-1461439626172-c3b891456f2e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=77c364b6081b570c12c79ef9ae185ed3","enlarged":"https://images.unsplash.com/photo-1461439626172-c3b891456f2e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=b2270d362343e9e12f31353ccfb6ec19","title":"Pineapples ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":207.124148768989,"tHeight":300,"eWidth":3954,"eHeight":5727},{"thumbnail":"https://images.unsplash.com/photo-1461438820504-6d00ea0157a5?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=55db46ad358f287f1d603400ee04023e","enlarged":"https://images.unsplash.com/photo-1461438820504-6d00ea0157a5?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=53f469e5c224809ae75a911c646db180","title":"Thomas Martinsen ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4620,"eHeight":3080},{"thumbnail":"https://images.unsplash.com/photo-1461435218581-ff0972867e90?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=088db1dfd7a85e91beac09521778bf2b","enlarged":"https://images.unsplash.com/photo-1461435218581-ff0972867e90?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=3f451138693c9da24aaa32698bc15e87","title":"Mroux Bulikowska ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":451.6961130742049,"tHeight":300,"eWidth":4261,"eHeight":2830},{"thumbnail":"https://images.unsplash.com/photo-1461418749540-8c49a1d7369e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=10de789455ceacb3a74534bc2587172a","enlarged":"https://images.unsplash.com/photo-1461418749540-8c49a1d7369e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=5b4cf7a16623992d115c06e281e9bbd1","title":"Sophia Baboolal ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":214.275,"tHeight":300,"eWidth":2857,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461418559055-6f020c5a91e7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=063ac13bc4d372ee6edfabc5c6004f49","enlarged":"https://images.unsplash.com/photo-1461418559055-6f020c5a91e7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=ebfd5a4d5b5972c654656de886782157","title":"Sophia Baboolal ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":420.02100105005246,"tHeight":300,"eWidth":4000,"eHeight":2857},{"thumbnail":"https://images.unsplash.com/photo-1461418126083-a84e9ca935de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=eecc5cedafdcdc902655dce7528b1c28","enlarged":"https://images.unsplash.com/photo-1461418126083-a84e9ca935de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=afa1a3e52f2436f8f0aeb0d4296081b4","title":"Sophia Baboolal ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":420.02100105005246,"tHeight":300,"eWidth":4000,"eHeight":2857},{"thumbnail":"https://images.unsplash.com/photo-1461411250718-4b4a5c0b270a?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=dcc3baedcaff88febccf83e2f3c81e7e","enlarged":"https://images.unsplash.com/photo-1461411250718-4b4a5c0b270a?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=1a280e8c2d44eecfc5171665abe0cb86","title":"Paul Dufour ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":442.0794105607859,"tHeight":300,"eWidth":3600,"eHeight":2443},{"thumbnail":"https://images.unsplash.com/photo-1461409971633-aa0e46732112?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=cad7856b1f9a3d6953164078e4bdc188","enlarged":"https://images.unsplash.com/photo-1461409971633-aa0e46732112?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=bb401d13a08d6459b80bc63a0905a091","title":"Vladimir Chuchadeev ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":449.8781478472786,"tHeight":300,"eWidth":3692,"eHeight":2462},{"thumbnail":"https://images.unsplash.com/photo-1461407665364-25b173b7ffe2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=434fdbc1d6a1329f83389a914f422d74","enlarged":"https://images.unsplash.com/photo-1461407665364-25b173b7ffe2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=c3004e6a135d721a02fad9930754cb40","title":"Elisa Coluccia ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":400,"tHeight":300,"eWidth":3264,"eHeight":2448},{"thumbnail":"https://images.unsplash.com/photo-1461407253610-78178a3f453f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=29bcb358f46ad65829b34452bf42009e","enlarged":"https://images.unsplash.com/photo-1461407253610-78178a3f453f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=74a74fa42d3eb34f4cd67d5919ea6d55","title":"Yoal Desurmont ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":300,"tHeight":300,"eWidth":4000,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461407144084-2367f5f748de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=4148daebba1b6107877795b877dc0166","enlarged":"https://images.unsplash.com/photo-1461407144084-2367f5f748de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=dd400fec59cba48c23a5850c9706fba3","title":"Yoal Desurmont ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":6000,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461406721424-4b62507fcbfe?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=c2c9184da0078003bcd550bf6e7edeed","enlarged":"https://images.unsplash.com/photo-1461406721424-4b62507fcbfe?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=f1d961d07027d3d5b2618222865086c6","title":"Yoal Desurmont ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":449.9567598731623,"tHeight":300,"eWidth":5203,"eHeight":3469},{"thumbnail":"https://images.unsplash.com/photo-1461397932544-11132a69bf46?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=725b60a95bca6e2d6211c1f8a7798540","enlarged":"https://images.unsplash.com/photo-1461397932544-11132a69bf46?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=e463f9df8b36a869b0429d1d0ec03d84","title":"Susan Yin ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":449.60835509138377,"tHeight":300,"eWidth":4592,"eHeight":3064},{"thumbnail":"https://images.unsplash.com/photo-1461397821064-32d6b3c91b9f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=e594e2384b7952a31516ce161dfcb0c4","enlarged":"https://images.unsplash.com/photo-1461397821064-32d6b3c91b9f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=7d18e47fb76ec7bacdcff78d1f14d1c3","title":"Susan Yin ","categories":[],"tWidth":449.60835509138377,"tHeight":300,"eWidth":4592,"eHeight":3064},{"thumbnail":"https://images.unsplash.com/photo-1461374699149-b941f35a8689?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=cb552a18de5f07675f2a5e41581036ed","enlarged":"https://images.unsplash.com/photo-1461374699149-b941f35a8689?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=0eba6ef7771bbe390210c5602fe23c54","title":"Aaron Burden ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":399.53596287703016,"tHeight":300,"eWidth":4592,"eHeight":3448},{"thumbnail":"https://images.unsplash.com/photo-1461367463590-f58655179fd8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=1938e67601618517b8537ba4f5afed90","enlarged":"https://images.unsplash.com/photo-1461367463590-f58655179fd8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=6acc802812123e4948ba8cb77b832f91","title":"Matt Baxter , ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4272,"eHeight":2848},{"thumbnail":"https://images.unsplash.com/photo-1461365570812-b7d5ebe71766?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=ca9721e0848f7401018391e52eb22f40","enlarged":"https://images.unsplash.com/photo-1461365570812-b7d5ebe71766?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=3a9f9900bec3e2c9aa2804c2ca251c5b","title":"Matt Baxter ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":361.1519607843137,"tHeight":300,"eWidth":2947,"eHeight":2448},{"thumbnail":"https://images.unsplash.com/photo-1461360422312-048b738a1830?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=61de20047c038a96de1263001f7ec3fe","enlarged":"https://images.unsplash.com/photo-1461360422312-048b738a1830?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=4b542d1ff29e72fd6a33e7f1f4c13083","title":"Mr Cup / Fabien Barral ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":451.68874172185434,"tHeight":300,"eWidth":4547,"eHeight":3020},{"thumbnail":"https://images.unsplash.com/photo-1461360370896-922624d12aa1?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=fa90ca753f2727d4c706c8afffbc106c","enlarged":"https://images.unsplash.com/photo-1461360370896-922624d12aa1?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=36fb52f93b5b2bb8fddf253f0eb85ea2","title":"Mr Cup / Fabien Barral ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":451.68874172185434,"tHeight":300,"eWidth":4547,"eHeight":3020},{"thumbnail":"https://images.unsplash.com/photo-1461360276940-6603a02afc1c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=afd7ba7eb9187e9caf473694e39a07db","enlarged":"https://images.unsplash.com/photo-1461360276940-6603a02afc1c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=71e81eed4172954e24dd7318374d5517","title":"Mr Cup / Fabien Barral ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":451.68874172185434,"tHeight":300,"eWidth":4547,"eHeight":3020},{"thumbnail":"https://images.unsplash.com/photo-1461360228754-6e81c478b882?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=e7fd4d962830a66753f3b7b78d64e374","enlarged":"https://images.unsplash.com/photo-1461360228754-6e81c478b882?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=3b1793b5dbc9a73242f4164c74eaf7d8","title":"Mr Cup / Fabien Barral ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":451.6853932584269,"tHeight":300,"eWidth":4288,"eHeight":2848},{"thumbnail":"https://images.unsplash.com/photo-1461359618866-5a5bff23c9bd?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=e0d4879d98a5e47f5f8216437fcafa6e","enlarged":"https://images.unsplash.com/photo-1461359618866-5a5bff23c9bd?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=3ae97f51a9416a8a7a500124538bca16","title":"Mr Cup / Fabien Barral ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":450.04948861761795,"tHeight":300,"eWidth":4547,"eHeight":3031},{"thumbnail":"https://images.unsplash.com/photo-1461359658362-706d40e2ff90?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=f6422c5811a7887bdcd9cc571bac9348","enlarged":"https://images.unsplash.com/photo-1461359658362-706d40e2ff90?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=cb9636fd123c3b49347de599e2c9c73c","title":"Bantita Wongwai , ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":3648,"eHeight":2432},{"thumbnail":"https://images.unsplash.com/photo-1461357639531-7c8f25682119?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=f0fdd569f07f09c863ab98d706a913b1","enlarged":"https://images.unsplash.com/photo-1461357639531-7c8f25682119?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=8de4599c0bc691c773dc5fce3be56676","title":"Josh Clemence ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":400,"tHeight":300,"eWidth":2048,"eHeight":1536},{"thumbnail":"https://images.unsplash.com/photo-1461355986781-5762a09d3cd4?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=acb069f48a93750903456f0525529f32","enlarged":"https://images.unsplash.com/photo-1461355986781-5762a09d3cd4?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=c6bcba840664b4e59b2de2df46966524","title":"Josh Clemence ","categories":[],"tWidth":400,"tHeight":300,"eWidth":2048,"eHeight":1536},{"thumbnail":"https://images.unsplash.com/photo-1461355114145-016691c9ee69?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=6b3ea92227ca148050832c918cd922da","enlarged":"https://images.unsplash.com/photo-1461355114145-016691c9ee69?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=d7dc51908b2b22d285a690e29bb172c2","title":"Elaine Casap , , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5616,"eHeight":3744},{"thumbnail":"https://images.unsplash.com/photo-1461354464878-ad92f492a5a0?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=1b1e452d7f0ec311b922e64f3988f60b","enlarged":"https://images.unsplash.com/photo-1461354464878-ad92f492a5a0?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=4def94e120182691b7e5e2773dfcf13e","title":"Elaine Casap , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5616,"eHeight":3744},{"thumbnail":"https://images.unsplash.com/photo-1461354360854-e33a1d6f7905?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=2bce2bf66c9ced23f9a0f600e758be3a","enlarged":"https://images.unsplash.com/photo-1461354360854-e33a1d6f7905?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=7db70bdb6957ef8d1a19b6dba2d4775d","title":"Elaine Casap , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":492.46636771300444,"tHeight":300,"eWidth":5491,"eHeight":3345},{"thumbnail":"https://images.unsplash.com/photo-1461353789837-8eb180f968d2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=d6f7251b49bc0026e76baa2b7600e4e4","enlarged":"https://images.unsplash.com/photo-1461353789837-8eb180f968d2?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=9d7f11f90b51feab81d95597ef4a65f6","title":"Elaine Casap , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450.04594180704436,"tHeight":300,"eWidth":4898,"eHeight":3265},{"thumbnail":"https://images.unsplash.com/photo-1461353604973-1ed4a86c08ba?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=8cdd0155047e169b16303de448c0e0da","enlarged":"https://images.unsplash.com/photo-1461353604973-1ed4a86c08ba?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=5a0a599e3edbc969c58a0377e9be1a3b","title":"Andres Iga ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":533.1342345174473,"tHeight":300,"eWidth":5653,"eHeight":3181},{"thumbnail":"https://images.unsplash.com/photo-1461353567178-49dde8f6da50?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=258756969e49698714ac2d12ab17d63a","enlarged":"https://images.unsplash.com/photo-1461353567178-49dde8f6da50?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=c67db20018de0ade5965657654badaea","title":"Mat Weller , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":531.1195445920304,"tHeight":300,"eWidth":5598,"eHeight":3162},{"thumbnail":"https://images.unsplash.com/photo-1461352195749-fdba50b79c74?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=96f8bbd03cfaf873ca790f9c9247c2e1","enlarged":"https://images.unsplash.com/photo-1461352195749-fdba50b79c74?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=e4a220eb5664cd1931992b4886145e77","title":"Tobias van Schneider ","categories":[],"tWidth":449.7737556561086,"tHeight":300,"eWidth":7952,"eHeight":5304},{"thumbnail":"https://images.unsplash.com/photo-1461348265681-4cc0ee361861?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=d574894c3dd5b1a0ea86c9484c38786c","enlarged":"https://images.unsplash.com/photo-1461348265681-4cc0ee361861?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=d7626d3bb6be40d751effd1bbe3a959e","title":"Pineapples ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":6000,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461344577544-4e5dc9487184?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=58772356ba002c76aeced816f044b4a7","enlarged":"https://images.unsplash.com/photo-1461344577544-4e5dc9487184?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=3ca7c11c6868be9b0f75950841b9798e","title":"Alice Achterhof , ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":449.9428571428571,"tHeight":300,"eWidth":3937,"eHeight":2625},{"thumbnail":"https://images.unsplash.com/photo-1461342249744-29a57e9bd1cb?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=7f5ae0eaaed16367f09a91a500eee68d","enlarged":"https://images.unsplash.com/photo-1461342249744-29a57e9bd1cb?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=cddf7676d67a0ae7f2688535a1a8fcf7","title":"krystina rogers ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5184,"eHeight":3456},{"thumbnail":"https://images.unsplash.com/photo-1461337164761-2124f78ecc21?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=381ceeba3a9abcb1325fe7f81da7e31e","enlarged":"https://images.unsplash.com/photo-1461337164761-2124f78ecc21?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=fa4ccf8287f002251b725371e9cebdeb","title":"Myles Tan ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":200,"tHeight":300,"eWidth":4000,"eHeight":6000},{"thumbnail":"https://images.unsplash.com/photo-1461335353494-1b2290dca4a9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=d83f89f24b2eef9a3c2a1d59c1592fec","enlarged":"https://images.unsplash.com/photo-1461335353494-1b2290dca4a9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=c61ceb5ae8d4537978700a98f42a5d87","title":"Jordan Whitt ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":449.3478260869565,"tHeight":300,"eWidth":4823,"eHeight":3220},{"thumbnail":"https://images.unsplash.com/photo-1461332682233-b818af4c3a6e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=fe60c98eb05025035a1b01aa395116c8","enlarged":"https://images.unsplash.com/photo-1461332682233-b818af4c3a6e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=68a77cd4de2cf80e3f5175d1ad85d8b4","title":"Sebastian Unrau ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":455.8145625982189,"tHeight":300,"eWidth":5801,"eHeight":3818},{"thumbnail":"https://images.unsplash.com/photo-1461319914485-5cd8e9b682a8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=60d1be44a4fbd4b15d79436e8b672b69","enlarged":"https://images.unsplash.com/photo-1461319914485-5cd8e9b682a8?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=b4c2017594294b3ac237e53862506ae9","title":"Toa Heftiba ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":446.9135802469136,"tHeight":300,"eWidth":2896,"eHeight":1944},{"thumbnail":"https://images.unsplash.com/photo-1461319805560-d7d182e9fbbf?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=e2bfb38b13bdff7dcd8615747780641e","enlarged":"https://images.unsplash.com/photo-1461319805560-d7d182e9fbbf?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=7d12a5e594a1564e75b50a6bfa410fec","title":"Toa Heftiba ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":448.14814814814815,"tHeight":300,"eWidth":3872,"eHeight":2592},{"thumbnail":"https://images.unsplash.com/photo-1461315668227-3ca90f37290f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=a6af2bdb6f865376ccdced00b8e6a4d3","enlarged":"https://images.unsplash.com/photo-1461315668227-3ca90f37290f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=b3959e868cb1e2d19f63349b9315b9a9","title":"贝莉儿 NG ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":400,"tHeight":300,"eWidth":4000,"eHeight":3000},{"thumbnail":"https://images.unsplash.com/photo-1461314792533-a610f2aedeee?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=e217cc538af5d2eb1e982494c3df810c","enlarged":"https://images.unsplash.com/photo-1461314792533-a610f2aedeee?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=bccc5109811b4d1b91cd34186cdeddff","title":"贝莉儿 NG ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":225,"tHeight":300,"eWidth":3000,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461301214746-1e109215d6d3?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=4c8d66571305909d949a305c8a3c27d4","enlarged":"https://images.unsplash.com/photo-1461301214746-1e109215d6d3?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=66a699ebb1d245b991b093daec81b04d","title":"Kace Rodriguez ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":449.94738688179586,"tHeight":300,"eWidth":4276,"eHeight":2851},{"thumbnail":"https://images.unsplash.com/photo-1461300617643-0aeca186c805?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=24a38116d1a0fe6cb76b359d27165b36","enlarged":"https://images.unsplash.com/photo-1461300617643-0aeca186c805?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=7011b3ccc32ca00658108aae34b8f12e","title":"Kace Rodriguez ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4896,"eHeight":3264},{"thumbnail":"https://images.unsplash.com/photo-1461295025362-7547f63dbaea?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=7bcd717024dfb1d54ed16e3ade8638a1","enlarged":"https://images.unsplash.com/photo-1461295025362-7547f63dbaea?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=318b7818f0c30ca96c096fe8c6dce1be","title":"João Silas , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":449.9562809676479,"tHeight":300,"eWidth":5146,"eHeight":3431},{"thumbnail":"https://images.unsplash.com/photo-1461287159820-04de78c094e9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=ad0260211f35ede2b9b1c6e1a70f514b","enlarged":"https://images.unsplash.com/photo-1461287159820-04de78c094e9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=cd56f41da3691f3bc0ddbb53a9392151","title":"Qusai Akoud , ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":452.94117647058823,"tHeight":300,"eWidth":4928,"eHeight":3264},{"thumbnail":"https://images.unsplash.com/photo-1461280360983-bd93eaa5051b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=4b7aee3a2b6df8e319468b369893f8ba","enlarged":"https://images.unsplash.com/photo-1461280360983-bd93eaa5051b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=fe8e0978645decb4051484d33cd40488","title":"Alexis Brown ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5760,"eHeight":3840},{"thumbnail":"https://images.unsplash.com/photo-1461274504020-af995bc53281?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=d49bd8d2e5be8544bde27d6cf869e30b","enlarged":"https://images.unsplash.com/photo-1461274504020-af995bc53281?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=2d3ae9bf8cec3e9034e72f951a521868","title":"Colby Thomas , ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}},{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":479.94061365885847,"tHeight":300,"eWidth":4849,"eHeight":3031},{"thumbnail":"https://images.unsplash.com/photo-1461272395971-7c6ffaa435b7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=c5f3e759aee809b81652d2f17a8ea91f","enlarged":"https://images.unsplash.com/photo-1461272395971-7c6ffaa435b7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=83bc7feb10ecb9622a5b09ae5419060e","title":"adam morse ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":450.0396930404869,"tHeight":300,"eWidth":5669,"eHeight":3779},{"thumbnail":"https://images.unsplash.com/photo-1461268819612-35d5049e338b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=de2e4cee9662fd5601a8b78f960d5764","enlarged":"https://images.unsplash.com/photo-1461268819612-35d5049e338b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=b5da708aa3b9191115e2fc3457bba65f","title":"Vladimir Chuchadeev ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450.0734214390602,"tHeight":300,"eWidth":3065,"eHeight":2043},{"thumbnail":"https://images.unsplash.com/photo-1461268300564-666e9a3c88a5?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=efca9ce61e01202535ec457a71be809d","enlarged":"https://images.unsplash.com/photo-1461268300564-666e9a3c88a5?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=93b2549e25e270791d482ab89e870293","title":"Toby Wong ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450.11252813203305,"tHeight":300,"eWidth":2000,"eHeight":1333},{"thumbnail":"https://images.unsplash.com/photo-1461267447327-230b0259735e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=6ef363984b1ff78cf7b1d0a12d8d411c","enlarged":"https://images.unsplash.com/photo-1461267447327-230b0259735e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=be012ef399d06648ddd9f297d590ee83","title":"Rosan Harmens , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":451.6853932584269,"tHeight":300,"eWidth":4288,"eHeight":2848},{"thumbnail":"https://images.unsplash.com/photo-1461265924727-666f16b92ad7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=167af75120d4dc2f693ee4590cee2f87","enlarged":"https://images.unsplash.com/photo-1461265924727-666f16b92ad7?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=4e609ab83d72172b4e12b572246415a4","title":"Sweet Ice Cream Photography ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5760,"eHeight":3840},{"thumbnail":"https://images.unsplash.com/photo-1461263895214-7761d3a942de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=01cb5c31de186c1fc57e6c35da0369f2","enlarged":"https://images.unsplash.com/photo-1461263895214-7761d3a942de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=d2b03b1bf6c25dbda3d246ac5427961d","title":"Dino Reichmuth , ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":470.39460233081167,"tHeight":300,"eWidth":7669,"eHeight":4891},{"thumbnail":"https://images.unsplash.com/photo-1461263451864-520425af1f6e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=9fce0debfb0c5fdd4c6e06a5d7aa70cb","enlarged":"https://images.unsplash.com/photo-1461263451864-520425af1f6e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=527c9f2c0159b8a8277846a4ed206c52","title":"Jesse Bowser ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":374.94505494505495,"tHeight":300,"eWidth":3412,"eHeight":2730},{"thumbnail":"https://images.unsplash.com/photo-1461257906370-321a8ad92e6c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=1d771cc3aa045e8071b7c30905b79e6b","enlarged":"https://images.unsplash.com/photo-1461257906370-321a8ad92e6c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=26398cad7dc9fde01d491783db4b9790","title":"Nirzar Pangarkar ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":199.98,"tHeight":300,"eWidth":3333,"eHeight":5000},{"thumbnail":"https://images.unsplash.com/photo-1461253205884-5aa82520ee48?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=f74eaeb95c9ef3ec777e749459869d49","enlarged":"https://images.unsplash.com/photo-1461253205884-5aa82520ee48?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=587aebcf3a15e16a4eacd3a534497995","title":"Qusai Akoud ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}}],"tWidth":452.94117647058823,"tHeight":300,"eWidth":4928,"eHeight":3264},{"thumbnail":"https://images.unsplash.com/photo-1461250281059-4f83443edbdc?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=440a0494ffafddebb6df67a11990c2fb","enlarged":"https://images.unsplash.com/photo-1461250281059-4f83443edbdc?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=7bd51395deeda091079645b430a846f4","title":"Alexander Marinescu ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":533.175355450237,"tHeight":300,"eWidth":6000,"eHeight":3376},{"thumbnail":"https://images.unsplash.com/photo-1461248481170-e44894b0909c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=6887ac6bb6ee40a3850c48f9c8628c08","enlarged":"https://images.unsplash.com/photo-1461248481170-e44894b0909c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=fc4d2c02196114985e80ba5fbbcbf15e","title":"Abi Lewis ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":443.81057878703956,"tHeight":300,"eWidth":5342,"eHeight":3611},{"thumbnail":"https://images.unsplash.com/photo-1461243164308-a84b29bd06de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=38d6e55ffa13dfac1d08d08c0da6b9a1","enlarged":"https://images.unsplash.com/photo-1461243164308-a84b29bd06de?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=35e1fa3581a709c26dc8bf66fa08aba2","title":"Annie Spratt ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":199.7,"tHeight":300,"eWidth":1997,"eHeight":3000},{"thumbnail":"https://images.unsplash.com/photo-1461238661596-063815c4e633?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=82e25c9f50069a3ff47f41736beb9aa6","enlarged":"https://images.unsplash.com/photo-1461238661596-063815c4e633?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=93e2eec1df6456b1b8580fae21997cf0","title":"Vaida TamoÅ¡auskaitÄ— ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":451.2,"tHeight":300,"eWidth":6016,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461155264347-f1450307af27?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=40a09f597e6b220624bcd8c8849f6723","enlarged":"https://images.unsplash.com/photo-1461155264347-f1450307af27?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=4cbecd749d9d6d4655865d2d814ec684","title":"Oshomah Abubakar ","categories":[{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":5184,"eHeight":3456},{"thumbnail":"https://images.unsplash.com/photo-1461232247412-55dd149f13d6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=5779bcd0ea2770e52a2fd532305e0d35","enlarged":"https://images.unsplash.com/photo-1461232247412-55dd149f13d6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=9da0b08d292e7d850b8c9db7de331e50","title":"Brijesh Nirmal , ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":449.59999999999997,"tHeight":300,"eWidth":4496,"eHeight":3000},{"thumbnail":"https://images.unsplash.com/photo-1461229813543-5c214846bb3f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=6d3151010d6f444c0e7dc03bb0b285f5","enlarged":"https://images.unsplash.com/photo-1461229813543-5c214846bb3f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=a75eb896134d2641de7c08115a06394e","title":"Tim Marshall ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450.07038948850305,"tHeight":300,"eWidth":3197,"eHeight":2131},{"thumbnail":"https://images.unsplash.com/photo-1461220830992-5a8d6a54af75?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=bda601c329f11dc7687ffaa9ea7b84ad","enlarged":"https://images.unsplash.com/photo-1461220830992-5a8d6a54af75?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=5c2a9ce2c20f06591a9fb0c004ab61ff","title":"Wil Stewart ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":450,"tHeight":300,"eWidth":6000,"eHeight":4000},{"thumbnail":"https://images.unsplash.com/photo-1461218821725-ec98ac649fab?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=fbcb5dcbb2bf5c08dd1ae96718c57288","enlarged":"https://images.unsplash.com/photo-1461218821725-ec98ac649fab?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=bfb09b1bd0391773a25471c1b099e343","title":"Nirzar Pangarkar ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":450.04500450045003,"tHeight":300,"eWidth":5000,"eHeight":3333},{"thumbnail":"https://images.unsplash.com/photo-1461218779480-bb61b6be1924?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=cb39d14e0fec2cf9f0154464b7840035","enlarged":"https://images.unsplash.com/photo-1461218779480-bb61b6be1924?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=038eaef6408fa2b3638f8a53017ab78e","title":"Nirzar Pangarkar ","categories":[{"id":8,"title":"物品","photo_count":10414,"links":{"self":"https://api.unsplash.com/categories/8","photos":"https://api.unsplash.com/categories/8/photos"}}],"tWidth":450.04500450045003,"tHeight":300,"eWidth":5000,"eHeight":3333},{"thumbnail":"https://images.unsplash.com/photo-1461214626925-421f126d9f11?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=8838448219744ec8886e0be8e9ade7c9","enlarged":"https://images.unsplash.com/photo-1461214626925-421f126d9f11?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=04cf0394165fa9e3ec16db15b76e81ab","title":"Khara Woods , ","categories":[{"id":2,"title":"Buildings","photo_count":17424,"links":{"self":"https://api.unsplash.com/categories/2","photos":"https://api.unsplash.com/categories/2/photos"}},{"id":6,"title":"People","photo_count":13970,"links":{"self":"https://api.unsplash.com/categories/6","photos":"https://api.unsplash.com/categories/6/photos"}}],"tWidth":450,"tHeight":300,"eWidth":4500,"eHeight":3000},{"thumbnail":"https://images.unsplash.com/photo-1461209021041-7363279b9e05?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=400&fit=max&s=bce1c074c5b07ba7c56e6600675893fc","enlarged":"https://images.unsplash.com/photo-1461209021041-7363279b9e05?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=32603ad68eef4e5830a9008fe1d12801","title":"Laura Lefurgey-Smith ","categories":[{"id":4,"title":"自然风景","photo_count":41787,"links":{"self":"https://api.unsplash.com/categories/4","photos":"https://api.unsplash.com/categories/4/photos"}}],"tWidth":374.6130030959752,"tHeight":300,"eWidth":3630,"eHeight":2907},{"thumbnail":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/27.jpg","enlarged":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/27.jpg","title":"窗上女孩儿 ","categories":[{"id":9,"title":"窗上女孩儿","photo_count":41787,"links":{"self":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/27.jpg","photos":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/27.jpg"}}],"tWidth":800.6130030959752,"tHeight":500,"eWidth":4830,"eHeight":2907},{"thumbnail":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/106.jpg","enlarged":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/106.jpg","title":"窗上女孩儿 ","categories":[{"id":9,"title":"窗上女孩儿","photo_count":41787,"links":{"self":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/106.jpg","photos":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/106.jpg"}}],"tWidth":800.6130030959752,"tHeight":500,"eWidth":4830,"eHeight":2907},{"thumbnail":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/13.jpg","enlarged":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/13.jpg","title":"窗上女孩儿 ","categories":[{"id":9,"title":"窗上女孩儿","photo_count":41787,"links":{"self":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/13.jpg","photos":"https://annie-header-bg-1253939655.cos.ap-beijing.myqcloud.com/13.jpg"}}],"tWidth":800.6130030959752,"tHeight":500,"eWidth":4830,"eHeight":2907}] \ No newline at end of file diff --git a/plugin/gallerypage/images/default-skin.png b/plugin/gallerypage/images/default-skin.png new file mode 100644 index 0000000..97e73a1 Binary files /dev/null and b/plugin/gallerypage/images/default-skin.png differ diff --git a/plugin/gallerypage/images/default-skin.svg b/plugin/gallerypage/images/default-skin.svg new file mode 100644 index 0000000..b5edf51 --- /dev/null +++ b/plugin/gallerypage/images/default-skin.svg @@ -0,0 +1 @@ +default-skin 2 \ No newline at end of file diff --git a/plugin/gallerypage/images/preloader.gif b/plugin/gallerypage/images/preloader.gif new file mode 100644 index 0000000..b8faa69 Binary files /dev/null and b/plugin/gallerypage/images/preloader.gif differ diff --git a/plugin/gallerypage/natural-gallery.full.css b/plugin/gallerypage/natural-gallery.full.css new file mode 100644 index 0000000..4c49fee --- /dev/null +++ b/plugin/gallerypage/natural-gallery.full.css @@ -0,0 +1,1130 @@ + /*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */ + +.pswp { + display: none; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + overflow: hidden; + -ms-touch-action: none; + touch-action: none; + z-index: 1500px; + -webkit-text-size-adjust: 100%; + -webkit-backface-visibility: hidden; + outline: none +} + +.pswp * { + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.pswp img { + max-width: none +} + +.pswp--animate_opacity { + opacity: .001; + will-change: opacity; + -webkit-transition: opacity 333ms cubic-bezier(.4, 0, .22, 1); + transition: opacity 333ms cubic-bezier(.4, 0, .22, 1) +} + +.pswp--open { + display: block +} + +.pswp--zoom-allowed .pswp__img { + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in +} + +.pswp--zoomed-in .pswp__img { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab +} + +.pswp--dragging .pswp__img { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing +} + +.pswp__bg { + background: #000; + opacity: 0; + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden +} + +.pswp__bg, +.pswp__scroll-wrap { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100% +} + +.pswp__scroll-wrap { + overflow: hidden +} + +.pswp__container, +.pswp__zoom-wrap { + -ms-touch-action: none; + touch-action: none; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0 +} + +.pswp__container, +.pswp__img { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none +} + +.pswp__zoom-wrap { + position: absolute; + width: 100%; + -webkit-transform-origin: left top; + -ms-transform-origin: left top; + transform-origin: left top; + -webkit-transition: -webkit-transform 333ms cubic-bezier(.4, 0, .22, 1); + transition: transform 333ms cubic-bezier(.4, 0, .22, 1) +} + +.pswp__bg { + will-change: opacity; + -webkit-transition: opacity 333ms cubic-bezier(.4, 0, .22, 1); + transition: opacity 333ms cubic-bezier(.4, 0, .22, 1) +} + +.pswp--animated-in .pswp__bg, +.pswp--animated-in .pswp__zoom-wrap { + -webkit-transition: none; + transition: none +} + +.pswp__container, +.pswp__zoom-wrap { + -webkit-backface-visibility: hidden +} + +.pswp__item { + right: 0; + bottom: 0; + overflow: hidden +} + +.pswp__img, +.pswp__item { + position: absolute; + left: 0; + top: 0 +} + +.pswp__img { + width: auto; + height: auto +} + +.pswp__img--placeholder { + -webkit-backface-visibility: hidden +} + +.pswp__img--placeholder--blank { + background: #222 +} + +.pswp--ie .pswp__img { + width: 100%!important; + height: auto!important; + left: 0; + top: 0 +} + +.pswp__error-msg { + position: absolute; + left: 0; + top: 50%; + width: 100%; + text-align: center; + font-size: 14px; + line-height: 16px; + margin-top: -8px; + color: #ccc +} + +.pswp__error-msg a { + color: #ccc; + text-decoration: underline +} + + +/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */ + +.pswp__button { + width: 44px; + height: 44px; + position: relative; + background: none; + cursor: pointer; + overflow: visible; + -webkit-appearance: none; + display: block; + border: 0; + padding: 0; + margin: 0; + float: right; + opacity: .75; + -webkit-transition: opacity .2s; + transition: opacity .2s; + -webkit-box-shadow: none; + box-shadow: none +} + +.pswp__button:focus, +.pswp__button:hover { + opacity: 1 +} + +.pswp__button:active { + outline: none; + opacity: .9 +} + +.pswp__button::-moz-focus-inner { + padding: 0; + border: 0 +} + +.pswp__ui--over-close .pswp__button--close { + opacity: 1 +} + +.pswp__button, +.pswp__button--arrow--left:before, +.pswp__button--arrow--right:before { + background: url(images/default-skin.png) 0 0 no-repeat; + background-size: 264px 88px; + width: 44px; + height: 44px +} + +@media (-webkit-min-device-pixel-ratio:1.1), +(-webkit-min-device-pixel-ratio:1.09375), +(min-resolution:1.1dppx), +(min-resolution:105dpi) { + .pswp--svg .pswp__button, + .pswp--svg .pswp__button--arrow--left:before, + .pswp--svg .pswp__button--arrow--right:before { + background-image: url(images/default-skin.svg) + } + .pswp--svg .pswp__button--arrow--left, + .pswp--svg .pswp__button--arrow--right { + background: none + } +} + +.pswp__button--close { + background-position: 0 -44px +} + +.pswp__button--share { + background-position: -44px -44px +} + +.pswp__button--fs { + display: none +} + +.pswp--supports-fs .pswp__button--fs { + display: block +} + +.pswp--fs .pswp__button--fs { + background-position: -44px 0 +} + +.pswp__button--zoom { + display: none; + background-position: -88px 0 +} + +.pswp--zoom-allowed .pswp__button--zoom { + display: block +} + +.pswp--zoomed-in .pswp__button--zoom { + background-position: -132px 0 +} + +.pswp--touch .pswp__button--arrow--left, +.pswp--touch .pswp__button--arrow--right { + visibility: hidden +} + +.pswp__button--arrow--left, +.pswp__button--arrow--right { + background: none; + top: 50%; + margin-top: -50px; + width: 70px; + height: 100px; + position: absolute +} + +.pswp__button--arrow--left { + left: 0 +} + +.pswp__button--arrow--right { + right: 0 +} + +.pswp__button--arrow--left:before, +.pswp__button--arrow--right:before { + content: ""; + top: 35px; + background-color: rgba(0, 0, 0, .3); + height: 30px; + width: 32px; + position: absolute +} + +.pswp__button--arrow--left:before { + left: 6px; + background-position: -138px -44px +} + +.pswp__button--arrow--right:before { + right: 6px; + background-position: -94px -44px +} + +.pswp__counter, +.pswp__share-modal { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none +} + +.pswp__share-modal { + display: block; + background: rgba(0, 0, 0, .5); + width: 100%; + height: 100%; + top: 0; + left: 0; + padding: 10px; + position: absolute; + z-index: 1600; + opacity: 0; + -webkit-transition: opacity .25s ease-out; + transition: opacity .25s ease-out; + -webkit-backface-visibility: hidden; + will-change: opacity +} + +.pswp__share-modal--hidden { + display: none +} + +.pswp__share-tooltip { + z-index: 1620; + position: absolute; + background: #fff; + top: 56px; + border-radius: 2px; + display: block; + width: auto; + right: 44px; + -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, .25); + box-shadow: 0 2px 5px rgba(0, 0, 0, .25); + -webkit-transform: translateY(6px); + -ms-transform: translateY(6px); + transform: translateY(6px); + -webkit-transition: -webkit-transform .25s; + transition: transform .25s; + -webkit-backface-visibility: hidden; + will-change: transform +} + +.pswp__share-tooltip a { + display: block; + padding: 8px 12px; + font-size: 14px; + line-height: 18px +} + +.pswp__share-tooltip a, +.pswp__share-tooltip a:hover { + color: #000; + text-decoration: none +} + +.pswp__share-tooltip a:first-child { + border-radius: 2px 2px 0 0 +} + +.pswp__share-tooltip a:last-child { + border-radius: 0 0 2px 2px +} + +.pswp__share-modal--fade-in { + opacity: 1 +} + +.pswp__share-modal--fade-in .pswp__share-tooltip { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0) +} + +.pswp--touch .pswp__share-tooltip a { + padding: 16px 12px +} + +a.pswp__share--facebook:before { + content: ""; + display: block; + width: 0; + height: 0; + position: absolute; + top: -12px; + right: 15px; + border: 6px solid transparent; + border-bottom-color: #fff; + -webkit-pointer-events: none; + -moz-pointer-events: none; + pointer-events: none +} + +a.pswp__share--facebook:hover { + background: #3e5c9a; + color: #fff +} + +a.pswp__share--facebook:hover:before { + border-bottom-color: #3e5c9a +} + +a.pswp__share--twitter:hover { + background: #55acee; + color: #fff +} + +a.pswp__share--pinterest:hover { + background: #ccc; + color: #ce272d +} + +a.pswp__share--download:hover { + background: #ddd +} + +.pswp__counter { + position: absolute; + left: 0; + top: 0; + height: 44px; + font-size: 13px; + line-height: 44px; + color: #fff; + opacity: .75; + padding: 0 10px +} + +.pswp__caption { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + min-height: 44px +} + +.pswp__caption small { + font-size: 11px; + color: #bbb +} + +.pswp__caption__center { + text-align: left; + max-width: 420px; + margin: 0 auto; + font-size: 13px; + padding: 10px; + line-height: 20px; + color: #ccc +} + +.pswp__caption--empty { + display: none +} + +.pswp__caption--fake { + visibility: hidden +} + +.pswp__preloader { + width: 44px; + height: 44px; + position: absolute; + top: 0; + left: 50%; + margin-left: -22px; + opacity: 0; + -webkit-transition: opacity .25s ease-out; + transition: opacity .25s ease-out; + will-change: opacity; + direction: ltr +} + +.pswp__preloader__icn { + width: 20px; + height: 20px; + margin: 12px +} + +.pswp__preloader--active { + opacity: 1 +} + +.pswp__preloader--active .pswp__preloader__icn { + background: url(images/preloader.gif) 0 0 no-repeat +} + +.pswp--css_animation .pswp__preloader--active { + opacity: 1 +} + +.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn { + -webkit-animation: clockwise .5s linear infinite; + animation: clockwise .5s linear infinite +} + +.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut { + -webkit-animation: donut-rotate 1s cubic-bezier(.4, 0, .22, 1) infinite; + animation: donut-rotate 1s cubic-bezier(.4, 0, .22, 1) infinite +} + +.pswp--css_animation .pswp__preloader__icn { + background: none; + opacity: .75; + width: 14px; + height: 14px; + position: absolute; + left: 15px; + top: 15px; + margin: 0 +} + +.pswp--css_animation .pswp__preloader__cut { + position: relative; + width: 7px; + height: 14px; + overflow: hidden +} + +.pswp--css_animation .pswp__preloader__donut { + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 14px; + height: 14px; + border: 2px solid #fff; + border-radius: 50%; + border-left-color: transparent; + border-bottom-color: transparent; + position: absolute; + top: 0; + left: 0; + background: none; + margin: 0 +} + +@media screen and (max-width:1024px) { + .pswp__preloader { + position: relative; + left: auto; + top: auto; + margin: 0; + float: right + } +} + +@-webkit-keyframes clockwise { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg) + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn) + } +} + +@keyframes clockwise { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg) + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn) + } +} + +@-webkit-keyframes donut-rotate { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0) + } + 50% { + -webkit-transform: rotate(-140deg); + transform: rotate(-140deg) + } + to { + -webkit-transform: rotate(0); + transform: rotate(0) + } +} + +@keyframes donut-rotate { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0) + } + 50% { + -webkit-transform: rotate(-140deg); + transform: rotate(-140deg) + } + to { + -webkit-transform: rotate(0); + transform: rotate(0) + } +} + +.pswp__ui { + -webkit-font-smoothing: auto; + visibility: visible; + opacity: 1; + z-index: 1550 +} + +.pswp__top-bar { + position: absolute; + left: 0; + top: 0; + height: 44px; + width: 100% +} + +.pswp--has_mouse .pswp__button--arrow--left, +.pswp--has_mouse .pswp__button--arrow--right, +.pswp__caption, +.pswp__top-bar { + -webkit-backface-visibility: hidden; + will-change: opacity; + -webkit-transition: opacity 333ms cubic-bezier(.4, 0, .22, 1); + transition: opacity 333ms cubic-bezier(.4, 0, .22, 1) +} + +.pswp--has_mouse .pswp__button--arrow--left, +.pswp--has_mouse .pswp__button--arrow--right { + visibility: visible +} + +.pswp__caption, +.pswp__top-bar { + background-color: rgba(0, 0, 0, .5) +} + +.pswp__ui--fit .pswp__caption, +.pswp__ui--fit .pswp__top-bar { + background-color: rgba(0, 0, 0, .3) +} + +.pswp__ui--idle .pswp__button--arrow--left, +.pswp__ui--idle .pswp__button--arrow--right, +.pswp__ui--idle .pswp__top-bar { + opacity: 0 +} + +.pswp__ui--hidden .pswp__button--arrow--left, +.pswp__ui--hidden .pswp__button--arrow--right, +.pswp__ui--hidden .pswp__caption, +.pswp__ui--hidden .pswp__top-bar { + opacity: .001 +} + +.pswp__ui--one-slide .pswp__button--arrow--left, +.pswp__ui--one-slide .pswp__button--arrow--right, +.pswp__ui--one-slide .pswp__counter { + display: none +} + +.pswp__element--disabled { + display: none!important +} + +.pswp--minimal--dark .pswp__top-bar { + background: none +} + +.natural-gallery .natural-gallery-header { + margin: 0 0 10px +} + +.natural-gallery .natural-gallery-header:after { + content: ""; + display: block; + clear: both +} + +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm>svg { + width: 1.4em; + height: 1.4em; + top: .4em +} + +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input { + border: none; + background: none +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories input[type=checkbox] { + display: none +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories label { + position: relative; + cursor: pointer +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .label { + margin-left: 1.5em; + margin-right: 5px +} + +.natural-gallery .natural-gallery-header .sectionContainer { + margin-top: 30px; + position: relative +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories, +.natural-gallery .natural-gallery-header .natural-gallery-categories label, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm { + float: left; + margin-right: 5px +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .label>svg, +.natural-gallery .natural-gallery-header .natural-gallery-images>svg, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm>svg { + content: ""; + float: left; + position: absolute; + left: 5px; + font-size: 16px; + background-repeat: no-repeat +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .label>svg, +.natural-gallery .natural-gallery-header .natural-gallery-images>svg { + width: 1.2em; + height: 1.2em; + top: .5em +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .label, +.natural-gallery .natural-gallery-header .natural-gallery-images, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm .sectionName, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input { + display: block; + padding: 9px 5px 6px; + font-size: 16px; + line-height: 1.3em; + height: 35px +} + +.natural-gallery .natural-gallery-header .natural-gallery-images { + float: right; + margin-right: 0; + margin-left: 5px; + padding-left: 2em +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .label, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input { + font-weight: 400 +} + +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input { + width: 300px; + padding-left: 2em +} + +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:focus { + outline: none +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories label, +.natural-gallery .natural-gallery-header .sectionName { + margin-bottom: 0 +} + +.natural-gallery .natural-gallery-header .sectionName { + left: 5px; + top: 0; + margin-left: 1.5em; + font-size: 16px; + font-weight: 400; + position: absolute; + pointer-events: none; + -webkit-transition: all .2s ease; + transition: all .2s ease +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .sectionName, +.natural-gallery .natural-gallery-header .natural-gallery-images .sectionName, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm:hover .sectionName, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:focus~.sectionName, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:valid~.sectionName { + top: -2.2em; + font-size: 14px!important; + line-height: 1em; + padding: 0; + margin: 1.2em 0 0 +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories .sectionName:last-child { + display: none +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories label, +.natural-gallery .natural-gallery-header .natural-gallery-images, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm { + border: none; + border-bottom-width: 1px; + border-bottom-style: solid; + min-width: 125px; +} + +.natural-gallery .natural-gallery-header .bar { + position: relative; + display: block +} + +.natural-gallery .natural-gallery-header .bar:after, +.natural-gallery .natural-gallery-header .bar:before { + content: ""; + height: 3px; + width: 0; + bottom: -2px; + position: absolute; + -webkit-transition: all .2s ease; + transition: all .2s ease +} + +.natural-gallery .natural-gallery-header .bar:before { + left: 50% +} + +.natural-gallery .natural-gallery-header .bar:after { + right: 50% +} + +.natural-gallery .natural-gallery-header .natural-gallery-categories input[type=checkbox]:checked~.bar:after, +.natural-gallery .natural-gallery-header .natural-gallery-categories input[type=checkbox]:checked~.bar:before, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:focus~.bar:after, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:focus~.bar:before, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:valid~.bar:after, +.natural-gallery .natural-gallery-header .natural-gallery-searchTerm input:valid~.bar:before { + width: 50% +} + +.natural-gallery .natural-gallery-thumbnail img { + -webkit-box-shadow: 3px 3px 5px #999; + box-shadow: 3px 3px 5px #999; + text-align: center; + will-change: opacity +} + +.natural-gallery .link { + cursor: pointer +} + +.natural-gallery .button { + cursor: pointer; + margin: 10px; + -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, .5); + box-shadow: 0 2px 5px rgba(0, 0, 0, .5); + border-radius: 4px; + text-decoration: none +} + +.natural-gallery .zoomable { + /* + cursor: -webkit-zoom-in; + cursor: zoom-in; + */ + cursor: pointer; +} + +.natural-gallery .figure:not(.selected) .image.zoomable:not(.rotation):hover { + -webkit-transform: scale(1.3); + transform: scale(1.3) +} + +.natural-gallery .figure:not(.selected) .image.zoomable.rotation:hover { + -webkit-transform: rotate(2deg) scale(1.3); + transform: rotate(2deg) scale(1.3) +} + +.natural-gallery .figure:not(.selected) .image.zoomable:hover, +.natural-gallery .figure:not(.selected).zoomable:not(.rotation):hover .image { + -webkit-transform: scale(1.3); + transform: scale(1.3) +} + +.natural-gallery .figure:not(.selected).zoomable.rotation:hover .image { + -webkit-transform: rotate(2deg) scale(1.3); + transform: rotate(2deg) scale(1.3) +} + +.natural-gallery .figure.selected { + -webkit-transition-delay: initial; + transition-delay: 0s; + -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .7) inset; + box-shadow: inset 0 0 8px rgba(0, 0, 0, .7) +} + +.natural-gallery .figure.selected .selectBtn { + -webkit-transform: translateY(0); + transform: translateY(0); + top: 0; + left: 0 +} + +.natural-gallery .figure.selected .image { + margin: 10px; + -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .7); + box-shadow: 0 0 8px rgba(0, 0, 0, .7) +} + +.natural-gallery .figure { + left: 0; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + float: left; + overflow: hidden; + margin: 0; + -webkit-box-shadow: 0 0 8px transparent inset; + box-shadow: inset 0 0 8px transparent; + -webkit-transition: box-shadow .2s, background-color 1s; + transition: box-shadow .2s, background-color 1s; + -webkit-transition-delay: 1s; + transition-delay: 1s +} + +.natural-gallery .figure:hover .selectBtn, +.natural-gallery .figure:hover .title.hover { + -webkit-transform: translateY(0); + transform: translateY(0) +} + +.natural-gallery .figure.loaded.visible>.image { + opacity: 1; + -webkit-transition: opacity 1s ease-out, transform 1s ease-out, margin .2s ease-out; + transition: opacity 1s ease-out, transform 1s ease-out, margin .2s ease-out +} + +.natural-gallery .figure .image { + display: block; + position: relative; + margin: 0; + width: auto; + height: auto; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + /* + z-index: 100; + */ + opacity: 0; + background-repeat: no-repeat; + background-position: 50%; + background-size: cover; + -webkit-transition: all .2s ease; + transition: all .2s ease +} + +.natural-gallery .figure .selectBtn { + position: absolute; + z-index: 991; + top: 0; + left: 0; + padding: 10px; + width: 100%; + height: 48px; + -webkit-transition: all .2s ease; + transition: all .2s ease; + -webkit-transform: translateY(calc(-100% - 15px)); + transform: translateY(calc(-100% - 15px)); + color: hsla(0, 0%, 100%, .9); + fill: currentColor; + cursor: pointer; + background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .75)), to(transparent)); + background: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent) +} + +.natural-gallery .figure .selectBtn svg { + width: 28px +} + +.natural-gallery .figure .title { + position: absolute; + bottom: 0; + left: 0; + right: 0; + /* + z-index: 1100; + */ + background: rgba(0, 0, 0, .6); + text-align: center; + color: #fff; + font-size: 14px; + line-height: 2em; + font-weight: 400; + padding: 10px; + -webkit-transition: all .2s ease; + transition: all .2s ease; + overflow: hidden; + white-space: normal +} + +.natural-gallery .figure .title.hover { + padding: 10px; + -webkit-transform: translateY(calc(100% + 10px)); + transform: translateY(calc(100% + 10px)) +} + +.pswp { + z-index: 999 +} + +.pswp .pswp__caption__center { + text-align: center +} + +.natural-gallery { + position: relative +} + +.natural-gallery *, +.natural-gallery :after, +.natural-gallery :before { + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + padding: 0 +} + +.natural-gallery iframe { + position: absolute; + width: 100%; + height: 0; + top: 0; + left: 0; + background-color: transparent; + border: 0 +} + +.natural-gallery .natural-gallery-body { + padding: 0; + margin: 0 +} + +.natural-gallery .natural-gallery-body:after { + content: ""; + display: block; + clear: both +} + +.natural-gallery .natural-gallery-body[href] { + cursor: pointer +} + +.natural-gallery .natural-gallery-body .natural-gallery-noresults { + margin: 3em auto 2em; + width: 100px; + height: 100px; + text-align: center; + font-weight: 700; + font-size: 15px; + color: #888 +} + +.natural-gallery .natural-gallery-next { + display: block; + margin: 10px auto; + text-align: center; + height: 30px +} + +.natural-gallery .natural-gallery-next svg { + cursor: pointer; + font-size: 16px; + height: inherit +} + +.natural-gallery .natural-gallery-next:after { + content: ""; + display: block; + clear: both +} + +@-webkit-keyframes loading { + 0% { + -webkit-transform: scale(0); + transform: scale(0); + opacity: .3 + } + to { + -webkit-transform: scale(1); + transform: scale(1); + opacity: .05 + } +} + +@keyframes loading { + 0% { + -webkit-transform: scale(0); + transform: scale(0); + opacity: .3 + } + to { + -webkit-transform: scale(1); + transform: scale(1); + opacity: .05 + } \ No newline at end of file diff --git a/plugin/gallerypage/natural-gallery.full.js b/plugin/gallerypage/natural-gallery.full.js new file mode 100644 index 0000000..72acf23 --- /dev/null +++ b/plugin/gallerypage/natural-gallery.full.js @@ -0,0 +1,2720 @@ +(function(e, t) { + 'object' == typeof exports && 'object' == typeof module ? module.exports = t() : 'function' == typeof define && define.amd ? define('NaturalGallery', [], t) : 'object' == typeof exports ? exports.NaturalGallery = t() : e.NaturalGallery = t(); +})(this, function() { + var t = Math.round, + e = Math.max, + n = Math.floor; + return function(e) { + function t(i) { + if(n[i]) + return n[i].exports; + var o = n[i] = { + i: i, + l: !1, + exports: {} + }; + return e[i].call(o.exports, o, o.exports, t), o.l = !0, o.exports; + } + var n = {}; + return t.m = e, t.c = n, t.d = function(e, n, i) { + t.o(e, n) || Object.defineProperty(e, n, { + configurable: !1, + enumerable: !0, + get: i + }); + }, t.n = function(e) { + var n = e && e.__esModule ? function() { + return e['default']; + } : function() { + return e; + }; + return t.d(n, 'a', n), n; + }, t.o = function(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }, t.p = '', t(t.s = 2); + }([function(e, t) { + 'use strict'; + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var n; + (function(e) { + e.getIcon = function(e) { + var t = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + return t.setAttribute('viewBox', '0 0 100 100'), t.innerHTML = '', t; + }, e.toggleClass = function(e, t) { + e && t && (this.hasClass(e, t) ? this.removeClass(e, t) : this.addClass(e, t)); + }, e.removeClass = function(e, t) { + var n = new RegExp('(\\s|^)' + t + '(\\s|$)'); + e.className = e.className.replace(n, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + }, e.addClass = function(e, t) { + this.hasClass(t) || (e.className += (e.className ? ' ' : '') + t); + }, e.hasClass = function(e, t) { + return e.className && new RegExp('(^|\\s)' + t + '(\\s|$)').test(e.className); + }, e.uniqBy = function(e, t) { + var n = []; + return e.forEach(function(e) { + var i = n.some(function(n) { + return e[t] === n[t]; + }); + i || n.push(e); + }), n; + }, e.differenceBy = function(e, t, n) { + var i = []; + return e.forEach(function(e) { + var o = t.some(function(t) { + return e[n] === t[n]; + }); + o || i.push(e); + }), i; + }, e.intersectionBy = function(e, t, n) { + var i = []; + return e.forEach(function(e) { + var o = t.some(function(t) { + return e[n] === t[n]; + }); + o && i.push(e); + }), i; + }; + var t = [{ + base: 'A', + letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g + }, { + base: 'AA', + letters: /[\uA732]/g + }, { + base: 'AE', + letters: /[\u00C6\u01FC\u01E2]/g + }, { + base: 'AO', + letters: /[\uA734]/g + }, { + base: 'AU', + letters: /[\uA736]/g + }, { + base: 'AV', + letters: /[\uA738\uA73A]/g + }, { + base: 'AY', + letters: /[\uA73C]/g + }, { + base: 'B', + letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g + }, { + base: 'C', + letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g + }, { + base: 'D', + letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g + }, { + base: 'DZ', + letters: /[\u01F1\u01C4]/g + }, { + base: 'Dz', + letters: /[\u01F2\u01C5]/g + }, { + base: 'E', + letters: /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g + }, { + base: 'F', + letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g + }, { + base: 'G', + letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g + }, { + base: 'H', + letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g + }, { + base: 'I', + letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g + }, { + base: 'J', + letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g + }, { + base: 'K', + letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g + }, { + base: 'L', + letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g + }, { + base: 'LJ', + letters: /[\u01C7]/g + }, { + base: 'Lj', + letters: /[\u01C8]/g + }, { + base: 'M', + letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g + }, { + base: 'N', + letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g + }, { + base: 'NJ', + letters: /[\u01CA]/g + }, { + base: 'Nj', + letters: /[\u01CB]/g + }, { + base: 'O', + letters: /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g + }, { + base: 'OI', + letters: /[\u01A2]/g + }, { + base: 'OO', + letters: /[\uA74E]/g + }, { + base: 'OU', + letters: /[\u0222]/g + }, { + base: 'P', + letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g + }, { + base: 'Q', + letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g + }, { + base: 'R', + letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g + }, { + base: 'S', + letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g + }, { + base: 'T', + letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g + }, { + base: 'TZ', + letters: /[\uA728]/g + }, { + base: 'U', + letters: /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g + }, { + base: 'V', + letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g + }, { + base: 'VY', + letters: /[\uA760]/g + }, { + base: 'W', + letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g + }, { + base: 'X', + letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g + }, { + base: 'Y', + letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g + }, { + base: 'Z', + letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g + }, { + base: 'a', + letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g + }, { + base: 'aa', + letters: /[\uA733]/g + }, { + base: 'ae', + letters: /[\u00E6\u01FD\u01E3]/g + }, { + base: 'ao', + letters: /[\uA735]/g + }, { + base: 'au', + letters: /[\uA737]/g + }, { + base: 'av', + letters: /[\uA739\uA73B]/g + }, { + base: 'ay', + letters: /[\uA73D]/g + }, { + base: 'b', + letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g + }, { + base: 'c', + letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g + }, { + base: 'd', + letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g + }, { + base: 'dz', + letters: /[\u01F3\u01C6]/g + }, { + base: 'e', + letters: /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g + }, { + base: 'f', + letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g + }, { + base: 'g', + letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g + }, { + base: 'h', + letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g + }, { + base: 'hv', + letters: /[\u0195]/g + }, { + base: 'i', + letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g + }, { + base: 'j', + letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g + }, { + base: 'k', + letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g + }, { + base: 'l', + letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g + }, { + base: 'lj', + letters: /[\u01C9]/g + }, { + base: 'm', + letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g + }, { + base: 'n', + letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g + }, { + base: 'nj', + letters: /[\u01CC]/g + }, { + base: 'o', + letters: /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g + }, { + base: 'oi', + letters: /[\u01A3]/g + }, { + base: 'ou', + letters: /[\u0223]/g + }, { + base: 'oo', + letters: /[\uA74F]/g + }, { + base: 'p', + letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g + }, { + base: 'q', + letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g + }, { + base: 'r', + letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g + }, { + base: 's', + letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g + }, { + base: 't', + letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g + }, { + base: 'tz', + letters: /[\uA729]/g + }, { + base: 'u', + letters: /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g + }, { + base: 'v', + letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g + }, { + base: 'vy', + letters: /[\uA761]/g + }, { + base: 'w', + letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g + }, { + base: 'x', + letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g + }, { + base: 'y', + letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g + }, { + base: 'z', + letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g + }]; + e.removeDiacritics = function(e) { + for(var n = 0; n < t.length; n++) + e = e.replace(t[n].letters, t[n].base); + return e; + }; + })(n = t.Utility || (t.Utility = {})); + }, function(e, t) { + 'use strict'; + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var n = function() { + function e(e) { + this.header = e, this._collection = null; + } + return e.prototype.isActive = function() { + return null !== this.collection; + }, Object.defineProperty(e.prototype, 'collection', { + get: function() { + return this._collection; + }, + set: function(e) { + this._collection = e; + }, + enumerable: !0, + configurable: !0 + }), e; + }(); + t.AbstractFilter = n; + }, function(e, t, n) { + 'use strict'; + Object.defineProperty(t, '__esModule', { + value: !0 + }), n(3), n(4); + var i = n(5); + t.Gallery = i.Gallery; + }, function() {}, function() {}, function(t, i, o) { + 'use strict'; + Object.defineProperty(i, '__esModule', { + value: !0 + }); + var l = o(6), + a = o(9), + r = o(10), + s = o(11), + d = o(0), + p = o(13), + c = function() { + function t(e, t, i, o) { + for(var l in void 0 === o && (o = null), this.scrollElement = o, this._options = { + rowHeight: 350, + format: 'natural', + round: 3, + margin: 3, + limit: 0, + showLabels: 'hover', + lightbox: !0, + minRowsAtStart: 2, + showCount: !1, + searchFilter: !1, + categoriesFilter: !1, + showNone: !1, + showOthers: !1, + labelCategories: 'Category', + labelNone: 'None', + labelOthers: 'Others', + labelSearch: 'Search', + labelImages: 'Images', + selectable: !1, + zoomRotation: !0, + infiniteScrollOffset: 0 + }, this._events = {}, this.old_scroll_top = 0, this._pswpContainer = [], this._collection = [], this._categories = [], this._selected = [], this.defaultImageRatio = .7, this.pswpElement = t, this.options) + 'undefined' == typeof i.options[l] && (i.options[l] = this.options[l]); + this.options = i.options, this.categories = i.categories ? i.categories : [], this.rootElement = e, d.Utility.addClass(this.rootElement, 'natural-gallery'), this._events = i.events ? i.events : {}, this._events.select && (this.options.selectable = !0), (this.options.searchFilter || this.options.categoriesFilter || this.options.showCount) && (this.header = new a.Header(this), this.options.searchFilter && this.header.addFilter(new r.SearchFilter(this.header)), this.options.categoriesFilter && this.header.addFilter(new s.CategoryFilter(this.header))), this.render(), this.bodyWidth = n(this.bodyElement.getBoundingClientRect().width), i.images ? this.collection = i.images : this.pagination(), 0 === this.options.limit && this.bindScroll(null === o ? document : o); + } + return t.prototype.render = function() { + var t = this; + this.noResults = document.createElement('div'), d.Utility.addClass(this.noResults, 'natural-gallery-noresults'), this.noResults.appendChild(d.Utility.getIcon('icon-noresults')), this.noResults.style.display = 'block', this.nextButton = document.createElement('div'), d.Utility.addClass(this.nextButton, 'natural-gallery-next'), this.nextButton.appendChild(d.Utility.getIcon('icon-next')), this.nextButton.style.display = 'none', this.nextButton.addEventListener('click', function(n) { + n.preventDefault(); + var e = t.getRowsPerPage(); + t.addElements(e), t.pagination(e); + }); + var e = document.createElement('iframe'); + this.rootElement.appendChild(e); + var n = null; + e.contentWindow.addEventListener('resize', function() { + clearTimeout(n), n = setTimeout(function() { + t.resize(); + }, 100); + }), this.bodyElement = document.createElement('div'), d.Utility.addClass(this.bodyElement, 'natural-gallery-body'), this.bodyElement.appendChild(this.noResults), this.header && this.rootElement.appendChild(this.header.render()), this.rootElement.appendChild(this.bodyElement), this.rootElement.appendChild(this.nextButton); + }, t.prototype.addItems = function(e) { + if(e.constructor === Array && e.length) { + var t = 0 === this.collection.length || this.collection.length === this.pswpContainer.length; + e.forEach(function(e) { + this._collection.push(new l.Item(e, this)); + }, this), p.Organizer.organize(this), this.header && this.header.refresh(), t && this.addElements(this.getRowsPerPage()); + } + }, t.prototype.style = function() { + this.collection.forEach(function(e) { + e.style(); + }); + }, t.prototype.addElements = function(e) { + void 0 === e && (e = null); + var t = this.collection; + if(this.nextButton.style.display = 'block', this.pswpContainer.length === t.length) + return this.nextButton.style.display = 'none', void(0 === t.length && (this.noResults.style.display = 'block', this.rootElement.getElementsByClassName('natural-gallery-images')[0].style.display = 'none')); + for(var n, o = this.pswpContainer.length, l = this.pswpContainer.length ? t[o].row + e : e, a = o; a < t.length; a++) + n = t[a], n.row < l && (this.pswpContainer.push(n.getPswpItem()), this.bodyElement.appendChild(n.loadElement()), n.bindClick(), n.flash()), this.pswpContainer.length === t.length && (this.nextButton.style.display = 'none'); + this.noResults.style.display = 'none'; + var i = this.rootElement.getElementsByClassName('natural-gallery-images')[0]; + i && (i.style.display = 'block'); + var r = this.rootElement.getElementsByClassName('natural-gallery-visible')[0]; + r && (r.textContent = this.pswpContainer.length + ''); + var s = this.rootElement.getElementsByClassName('natural-gallery-total')[0]; + s && (s.textContent = t.length + ''); + }, t.prototype.getRowsPerPage = function() { + if(this.options.limit) + return this.options.limit; + var e = this.scrollElement ? this.scrollElement.clientHeight : document.documentElement.clientHeight, + t = e - this.bodyElement.offsetTop, + i = n(t / (0.55 * this.options.rowHeight)); + return i < this.options.minRowsAtStart ? this.options.minRowsAtStart : i; + }, t.prototype.resize = function() { + var e = n(this.bodyElement.getBoundingClientRect().width); + if(e !== this.bodyWidth) { + this.bodyWidth = e, p.Organizer.organize(this); + var t = this.collection[this.pswpContainer.length - 1], + i = t ? t.row + 1 : this.getRowsPerPage(); + this.reset(), this.addElements(i); + } + }, t.prototype.refresh = function() { + this.reset(), p.Organizer.organize(this), this.addElements(this.getRowsPerPage()); + }, t.prototype.reset = function() { + this.pswpContainer = [], this._collection.forEach(function(e) { + e.remove(); + }), this.noResults.style.display = 'block'; + }, t.prototype.bindScroll = function(e) { + var t = this, + n = null; + n = e instanceof Document ? e.documentElement : e, e.addEventListener('scroll', function() { + var e = t.rootElement.offsetTop + t.rootElement.offsetHeight + t.options.infiniteScrollOffset, + i = n.scrollTop - (n.clientTop || 0), + o = n.clientHeight, + l = i - t.old_scroll_top; + t.old_scroll_top = i, 0 < l && i + o >= e && (t.addElements(1), t.pagination(1)); + }); + }, t.prototype.pagination = function(e) { + if(void 0 === e && (e = 1), this.events.pagination) + if(this.collection.length) { + var t = this.getMaxImagesPerRow(); + this._events.pagination(this.collection.length, t * e); + } + else { + var n = p.Organizer.simulatePagination(this); + this._events.pagination(this.collection.length, 2 * (n * this.getRowsPerPage())); + } + }, t.prototype.getMaxImagesPerRow = function() { + return e.apply(null, function(e) { + return e.reduce(function(t, n) { + return t[n.row] = -1 < t[n.row] ? t[n.row] + 1 : 1, t; + }, []); + }(this.collection)); + }, t.prototype.select = function(e) { + var t = this._selected.indexOf(e); - + 1 === t && (this._selected.push(e), this._events.select(this._selected.map(function(e) { + return e.fields; + }))); + }, t.prototype.unselect = function(e) { + var t = this._selected.indexOf(e); - + 1 < t && (this._selected.splice(t, 1), this._events.select(this._selected.map(function(e) { + return e.fields; + }))); + }, t.prototype.unselectAll = function() { + for(var e = this._selected.length - 1; 0 <= e; e--) + this._selected[e].toggleSelect(); + this._selected = []; + }, Object.defineProperty(t.prototype, 'events', { + get: function() { + return this._events; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'id', { + get: function() { + return this._id; + }, + set: function(e) { + this._id = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'pswpContainer', { + get: function() { + return this._pswpContainer; + }, + set: function(e) { + this._pswpContainer = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'collection', { + get: function() { + return this.header && this.header.isFiltered() ? this.header.collection : this._collection; + }, + set: function(e) { + this.reset(), this._collection = [], this.addItems(e); + }, + enumerable: !0, + configurable: !0 + }), t.prototype.getOriginalCollection = function() { + return this._collection; + }, Object.defineProperty(t.prototype, 'bodyWidth', { + get: function() { + return this._bodyWidth; + }, + set: function(e) { + this._bodyWidth = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'bodyElement', { + get: function() { + return this._bodyElement; + }, + set: function(e) { + this._bodyElement = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'rootElement', { + get: function() { + return this._rootElement; + }, + set: function(e) { + this._rootElement = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'pswpApi', { + get: function() { + return this._pswpApi; + }, + set: function(e) { + this._pswpApi = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'pswpElement', { + get: function() { + return this._pswpElement; + }, + set: function(e) { + this._pswpElement = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'options', { + get: function() { + return this._options; + }, + set: function(e) { + this._options = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'header', { + get: function() { + return this._header; + }, + set: function(e) { + this._header = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'categories', { + get: function() { + return this._categories; + }, + set: function(e) { + this._categories = e; + }, + enumerable: !0, + configurable: !0 + }), t; + }(); + i.Gallery = c; + }, function(e, t, n) { + 'use strict'; + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var i = n(0), + o = n(7), + l = n(8), + a = function() { + function e(e, t) { + this.gallery = t, this._binded = !1, this.selected = !1, this._fields = e, this.id = e.id, this.thumbnail = e.thumbnail, this.enlarged = e.enlarged, this.title = this.getTitle(e), this.link = this.getLink(e), this.linkTarget = this.getLinkTarget(e), this.tWidth = e.tWidth, this.tHeight = e.tHeight, this.eWidth = e.eWidth, this.eHeight = e.eHeight, this.categories = e.categories, this.last = e.last, this.createElement(); + } + return e.prototype.getTitle = function(e) { + return e.title ? this.getTitleDetails(e.title).title : null; + }, e.prototype.getLink = function(e) { + return e.link ? e.link : this.getTitleDetails(e.title).link; + }, e.prototype.getLinkTarget = function(e) { + return e.linkTarget ? e.linkTarget : this.getTitleDetails(e.title).linkTarget; + }, e.prototype.getTitleDetails = function(e) { + var t = document.createElement('div'); + t.innerHTML = e; + var n = t.getElementsByTagName('a'), + i = { + title: t.textContent, + link: null, + linkTarget: null + }; + return n[0] && (i.link = n[0].getAttribute('href'), i.linkTarget = n[0].getAttribute('target')), i; + }, e.prototype.createElement = function() { + var t = this, + e = this.gallery.options, + n = null; + this.title && -1 < ['true', 'hover'].indexOf(e.showLabels) && (n = !0); + var o = document.createElement('div'), + l = document.createElement('div'), + a = this.getLinkElement(), + r = null; + if(e.lightbox && n && a ? (n = a, i.Utility.addClass(n, 'button'), r = l) : e.lightbox && n && !a ? (n = document.createElement('div'), r = o) : e.lightbox && !n ? r = o : !e.lightbox && n && a ? (o = a, n = document.createElement('div'), n.classList.add('button')) : e.lightbox || !n || a ? !e.lightbox && !n && a && (o = a) : n = document.createElement('div'), r && (i.Utility.addClass(r, 'zoomable'), e.zoomRotation && i.Utility.addClass(r, 'rotation')), i.Utility.addClass(l, 'image'), i.Utility.addClass(o, 'figure loading visible'), l.style.backgroundImage = 'url(' + this.thumbnail + ')', o.appendChild(l), e.round) { + var s = e.round + 'px'; + o.style.borderRadius = s, l.style.borderRadius = s; + } + if(this.element = o, this.image = l, n && (n.textContent = this.title, i.Utility.addClass(n, 'title'), 'hover' === e.showLabels && i.Utility.addClass(n, 'hover'), o.appendChild(n)), this.gallery.options.selectable) { + this.selectBtn = document.createElement('div'); + var d = i.Utility.getIcon('icon-select'); + this.selectBtn.appendChild(d), this.selectBtn.classList.add('selectBtn'), d.addEventListener('click', function(n) { + n.stopPropagation(), t.toggleSelect(); + }), this.element.appendChild(this.selectBtn); + } + }, e.prototype.toggleSelect = function() { + this.selected = !this.selected, this.selected ? (this.element.classList.add('selected'), this.gallery.select(this)) : (this.element.classList.remove('selected'), this.gallery.unselect(this)); + }, e.prototype.getLinkElement = function() { + var e = this, + t = null; + return this.link && (t = document.createElement('a'), this.gallery.events.link ? t.addEventListener('click', function(t) { + e.gallery.events.link.preventDefault && t.preventDefault(), e.gallery.events.link.callback(e._fields); + }) : (t.setAttribute('href', this.link), i.Utility.addClass(t, 'link'), this.linkTarget && t.setAttribute('target', this.linkTarget))), t; + }, e.prototype.style = function() { + i.Utility.removeClass(this.element, 'visible'), this.element.style.width = this.width + 'px', this.element.style.height = this.height + 'px', this.element.style.marginRight = this.gallery.options.margin + 'px', this.element.style.marginBottom = this.gallery.options.margin + 'px', this.last && (this.element.style.marginRight = '0'); + var e = this; + window.setTimeout(function() { + i.Utility.addClass(e.element, 'visible'); + }, 0); + }, e.prototype.flash = function() { + var e = this; + i.Utility.removeClass(this.element, 'visible'), window.setTimeout(function() { + i.Utility.addClass(e.element, 'visible'); + }, 0); + }, e.prototype.bindClick = function() { + if(this.gallery.options.lightbox) { + var t = this; + if(!this.binded) { + this.binded = !0; + var e = function(n) { + t.openPhotoSwipe.call(t, n, t.element); + }, + n = null; + n = this.link ? this.image : this.element, n.addEventListener('click', e); + } + } + }, e.prototype.openPhotoSwipe = function(t, e) { + t.preventDefault(); + var n = this; + if(this.gallery.options.lightbox) { + var i = Array.prototype.slice.call(e.parentNode.children), + a = i.indexOf(e) - 1, + r = new o(this.gallery.pswpElement, l, this.gallery.pswpContainer, { + index: a, + bgOpacity: 0.85, + showHideOpacity: !0, + loop: !1 + }); + this.gallery.pswpApi = r, r.init(); + var s = null; + r.listen('beforeChange', function(e) { + 0 < e && r.getCurrentIndex() === r.items.length - 1 ? n.gallery.addElements() : e === -1 * (r.items.length - 1) && (s = r.items.length, n.gallery.addElements()); + }), r.listen('afterChange', function() { + s && (r.goTo(s), s = null); + }); + } + }, e.prototype.getPswpItem = function() { + return { + src: this._enlarged, + w: this._eWidth, + h: this._eHeight, + title: this._title + }; + }, e.prototype.getElement = function() { + return this.element; + }, e.prototype.loadElement = function() { + var e = this, + t = document.createElement('img'); + return t.setAttribute('src', this.thumbnail), t.addEventListener('load', function() { + i.Utility.removeClass(e.element, 'loading'), i.Utility.addClass(e.element, 'loaded'); + }), t.addEventListener('error', function() { + i.Utility.addClass(e.element, 'errored'); + }), this.element; + }, e.prototype.remove = function() { + this.getElement().parentNode && this.getElement().parentNode.removeChild(this.getElement()); + }, Object.defineProperty(e.prototype, 'id', { + get: function() { + return this._id; + }, + set: function(e) { + this._id = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'thumbnail', { + get: function() { + return this._thumbnail; + }, + set: function(e) { + this._thumbnail = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'enlarged', { + get: function() { + return this._enlarged; + }, + set: function(e) { + this._enlarged = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'title', { + get: function() { + return this._title; + }, + set: function(e) { + this._title = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'tWidth', { + get: function() { + return this._tWidth; + }, + set: function(e) { + this._tWidth = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'tHeight', { + get: function() { + return this._tHeight; + }, + set: function(e) { + this._tHeight = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'eWidth', { + get: function() { + return this._eWidth; + }, + set: function(e) { + this._eWidth = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'eHeight', { + get: function() { + return this._eHeight; + }, + set: function(e) { + this._eHeight = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'last', { + get: function() { + return this._last; + }, + set: function(e) { + this._last = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'categories', { + get: function() { + return this._categories; + }, + set: function(e) { + this._categories = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'row', { + get: function() { + return this._row; + }, + set: function(e) { + this._row = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'height', { + get: function() { + return this._height; + }, + set: function(e) { + this._height = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'width', { + get: function() { + return this._width; + }, + set: function(e) { + this._width = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'description', { + get: function() { + return this._description; + }, + set: function(e) { + this._description = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'binded', { + get: function() { + return this._binded; + }, + set: function(e) { + this._binded = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'link', { + get: function() { + return this._link; + }, + set: function(e) { + this._link = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'linkTarget', { + get: function() { + return this._linkTarget; + }, + set: function(e) { + this._linkTarget = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'fields', { + get: function() { + return this._fields; + }, + enumerable: !0, + configurable: !0 + }), e; + }(); + t.Item = a; + }, function(n, i, o) { + var l, a; + (function(e, t) { + l = t, a = 'function' == typeof l ? l.call(i, o, i, n) : l, !(a !== void 0 && (n.exports = a)); + })(this, function() { + 'use strict'; + return function(n, o, i, l) { + var a = Math.min, + r = Math.abs, + s = Math.PI, + d = { + features: null, + bind: function(e, t, n, o) { + var l = (o ? 'remove' : 'add') + 'EventListener'; + t = t.split(' '); + for(var a = 0; a < t.length; a++) + t[a] && e[l](t[a], n, !1); + }, + isArray: function(e) { + return e instanceof Array; + }, + createEl: function(e, t) { + var n = document.createElement(t || 'div'); + return e && (n.className = e), n; + }, + getScrollY: function() { + var e = window.pageYOffset; + return void 0 === e ? document.documentElement.scrollTop : e; + }, + unbind: function(e, t, n) { + d.bind(e, t, n, !0); + }, + removeClass: function(e, t) { + var n = new RegExp('(\\s|^)' + t + '(\\s|$)'); + e.className = e.className.replace(n, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + }, + addClass: function(e, t) { + d.hasClass(e, t) || (e.className += (e.className ? ' ' : '') + t); + }, + hasClass: function(e, t) { + return e.className && new RegExp('(^|\\s)' + t + '(\\s|$)').test(e.className); + }, + getChildByClass: function(e, t) { + for(var n = e.firstChild; n;) { + if(d.hasClass(n, t)) + return n; + n = n.nextSibling; + } + }, + arraySearch: function(e, t, n) { + for(var o = e.length; o--;) + if(e[o][n] === t) + return o; + return -1; + }, + extend: function(e, t, n) { + for(var i in t) + if(t.hasOwnProperty(i)) { + if(n && e.hasOwnProperty(i)) + continue; + e[i] = t[i]; + } + }, + easing: { + sine: { + out: function(e) { + return Math.sin(e * (s / 2)); + }, + inOut: function(e) { + return -(Math.cos(s * e) - 1) / 2; + } + }, + cubic: { + out: function(e) { + return --e * e * e + 1; + } + } + }, + detectFeatures: function() { + if(d.features) + return d.features; + var t = d.createEl(), + n = t.style, + o = '', + l = {}; + if(l.oldIE = document.all && !document.addEventListener, l.touch = 'ontouchstart' in window, window.requestAnimationFrame && (l.raf = window.requestAnimationFrame, l.caf = window.cancelAnimationFrame), l.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled, !l.pointerEvent) { + var r = navigator.userAgent; + if(/iP(hone|od)/.test(navigator.platform)) { + var s = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); + s && 0 < s.length && (s = parseInt(s[1], 10), 1 <= s && 8 > s && (l.isOldIOSPhone = !0)); + } + var p = r.match(/Android\s([0-9\.]*)/), + c = p ? p[1] : 0; + c = parseFloat(c), 1 <= c && (4.4 > c && (l.isOldAndroid = !0), l.androidVersion = c), l.isMobileOpera = /opera mini|opera mobi/i.test(r); + } + for(var m, u, g = ['transform', 'perspective', 'animationName'], h = ['', 'webkit', 'Moz', 'ms', 'O'], y = 0; 4 > y; y++) { + o = h[y]; + for(var i = 0; 3 > i; i++) + m = g[i], u = o + (o ? m.charAt(0).toUpperCase() + m.slice(1) : m), !l[m] && u in n && (l[m] = u); + o && !l.raf && (o = o.toLowerCase(), l.raf = window[o + 'RequestAnimationFrame'], l.raf && (l.caf = window[o + 'CancelAnimationFrame'] || window[o + 'CancelRequestAnimationFrame'])); + } + if(!l.raf) { + var a = 0; + l.raf = function(t) { + var n = new Date().getTime(), + i = e(0, 16 - (n - a)), + o = window.setTimeout(function() { + t(n + i); + }, i); + return a = n + i, o; + }, l.caf = function(e) { + clearTimeout(e); + }; + } + return l.svg = !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect, d.features = l, l; + } + }; + d.detectFeatures(), d.features.oldIE && (d.bind = function(e, t, n, o) { + t = t.split(' '); + for(var l, a = (o ? 'detach' : 'attach') + 'Event', r = function() { + n.handleEvent.call(n); + }, s = 0; s < t.length; s++) + if(l = t[s], l) + if('object' == typeof n && n.handleEvent) { + if(!o) + n['oldIE' + l] = r; + else if(!n['oldIE' + l]) + return !1; + e[a]('on' + l, n['oldIE' + l]); + } + else + e[a]('on' + l, n); + }); + var c = this, + m = 25, + u = 3, + g = { + allowPanToNext: !0, + spacing: 0.12, + bgOpacity: 1, + mouseUsed: !1, + loop: !0, + pinchToClose: !0, + closeOnScroll: !0, + closeOnVerticalDrag: !0, + verticalDragRange: 0.75, + hideAnimationDuration: 333, + showAnimationDuration: 333, + showHideOpacity: !1, + focus: !0, + escKey: !0, + arrowKeys: !0, + mainScrollEndFriction: 0.35, + panEndFriction: 0.35, + isClickableElement: function(e) { + return 'A' === e.tagName; + }, + getDoubleTapZoom: function(e, t) { + return e ? 1 : 0.7 > t.initialZoomLevel ? 1 : 1.33; + }, + maxSpreadZoom: 1.33, + modal: !0, + scaleMode: 'fit' + }; + d.extend(g, l); + var h, y, f, b, w, x, C, _, v, E, I, k, P, T, S, O, A, D, R, F, L, z, U, N, Z, B, M, H, W, K, q, G, Y, V, X, j, $, J, Q, ee, te, ne, ie, oe, le, ae, re, se, de, pe, ce, me, ue, ge, he, ye, fe, be = function() { + return { + x: 0, + y: 0 + }; + }, + xe = be(), + we = be(), + Ce = be(), + _e = {}, + ve = 0, + Ee = {}, + Ie = be(), + ke = 0, + Pe = !0, + Te = [], + Se = {}, + Oe = !1, + Ae = function(e, t) { + d.extend(c, t.publicMethods), Te.push(e); + }, + De = function(e) { + var t = ln(); + if(e > t - 1) + return e - t; + return 0 > e ? t + e : e; + }, + Re = {}, + Fe = function(e, t) { + return Re[e] || (Re[e] = []), Re[e].push(t); + }, + Le = function(e) { + var t = Re[e]; + if(t) { + var n = Array.prototype.slice.call(arguments); + n.shift(); + for(var o = 0; o < t.length; o++) + t[o].apply(c, n); + } + }, + ze = function() { + return new Date().getTime(); + }, + Ue = function(e) { + he = e, c.bg.style.opacity = e * g.bgOpacity; + }, + Ne = function(e, t, n, i, o) { + (!Oe || o && o !== c.currItem) && (i /= o ? o.fitRatio : c.currItem.fitRatio), e[z] = k + t + 'px, ' + n + 'px' + P + ' scale(' + i + ')'; + }, + Ze = function(e) { + pe && (e && (E > c.currItem.fitRatio ? !Oe && (fn(c.currItem, !1, !0), Oe = !0) : Oe && (fn(c.currItem), Oe = !1)), Ne(pe, Ce.x, Ce.y, E)); + }, + Be = function(e) { + e.container && Ne(e.container.style, e.initialPosition.x, e.initialPosition.y, e.initialZoomLevel, e); + }, + Me = function(e, t) { + t[z] = k + e + 'px, 0px' + P; + }, + He = function(e, n) { + if(!g.loop && n) { + var i = b + (Ie.x * ve - e) / Ie.x, + o = t(e - vt.x); + (0 > i && 0 < o || i >= ln() - 1 && 0 > o) && (e = vt.x + o * g.mainScrollEndFriction); + } + vt.x = e, Me(e, w); + }, + We = function(e, t) { + var n = Et[e] - Ee[e]; + return we[e] + xe[e] + n - n * (t / I); + }, + Ke = function(e, t) { + e.x = t.x, e.y = t.y, t.id && (e.id = t.id); + }, + qe = function(e) { + e.x = t(e.x), e.y = t(e.y); + }, + Ge = null, + Ye = function() { + Ge && (d.unbind(document, 'mousemove', Ye), d.addClass(n, 'pswp--has_mouse'), g.mouseUsed = !0, Le('mouseUsed')), Ge = setTimeout(function() { + Ge = null; + }, 100); + }, + Ve = function() { + d.bind(document, 'keydown', c), q.transform && d.bind(c.scrollWrap, 'click', c), g.mouseUsed || d.bind(document, 'mousemove', Ye), d.bind(window, 'resize scroll orientationchange', c), Le('bindEvents'); + }, + Xe = function() { + d.unbind(window, 'resize scroll orientationchange', c), d.unbind(window, 'scroll', v.scroll), d.unbind(document, 'keydown', c), d.unbind(document, 'mousemove', Ye), q.transform && d.unbind(c.scrollWrap, 'click', c), Q && d.unbind(window, C, c), clearTimeout(G), Le('unbindEvents'); + }, + je = function(e, t) { + var n = un(c.currItem, _e, e); + return t && (de = n), n; + }, + $e = function(e) { + return e || (e = c.currItem), e.initialZoomLevel; + }, + Je = function(e) { + return e || (e = c.currItem), 0 < e.w ? g.maxSpreadZoom : 1; + }, + Qe = function(e, t, n, i) { + return i === c.currItem.initialZoomLevel ? (n[e] = c.currItem.initialPosition[e], !0) : (n[e] = We(e, i), n[e] > t.min[e]) ? (n[e] = t.min[e], !0) : !!(n[e] < t.max[e]) && (n[e] = t.max[e], !0); + }, + et = function() { + if(z) { + var e = q.perspective && !N; + return k = 'translate' + (e ? '3d(' : '('), void(P = q.perspective ? ', 0px)' : ')'); + } + z = 'left', d.addClass(n, 'pswp--ie'), Me = function(e, t) { + t.left = e + 'px'; + }, Be = function(e) { + var t = 1 < e.fitRatio ? 1 : e.fitRatio, + n = e.container.style, + i = t * e.w, + o = t * e.h; + n.width = i + 'px', n.height = o + 'px', n.left = e.initialPosition.x + 'px', n.top = e.initialPosition.y + 'px'; + }, Ze = function() { + if(pe) { + var e = pe, + t = c.currItem, + n = 1 < t.fitRatio ? 1 : t.fitRatio, + i = n * t.w, + o = n * t.h; + e.width = i + 'px', e.height = o + 'px', e.left = Ce.x + 'px', e.top = Ce.y + 'px'; + } + }; + }, + tt = function(t) { + var e = ''; + g.escKey && 27 === t.keyCode ? e = 'close' : g.arrowKeys && (37 === t.keyCode ? e = 'prev' : 39 === t.keyCode && (e = 'next')), !e || t.ctrlKey || t.altKey || t.shiftKey || t.metaKey || (t.preventDefault ? t.preventDefault() : t.returnValue = !1, c[e]()); + }, + nt = function(t) { + !t || (ne || te || ce || $) && (t.preventDefault(), t.stopPropagation()); + }, + it = function() { + c.setScrollOffset(0, d.getScrollY()); + }, + ot = {}, + lt = 0, + at = function(e) { + ot[e] && (ot[e].raf && B(ot[e].raf), lt--, delete ot[e]); + }, + rt = function(e) { + ot[e] && at(e), ot[e] || (lt++, ot[e] = {}); + }, + st = function() { + for(var e in ot) + ot.hasOwnProperty(e) && at(e); + }, + dt = function(e, n, i, o, l, a, r) { + var s, t = ze(); + rt(e); + var d = function() { + if(ot[e]) { + if(s = ze() - t, s >= o) + return at(e), a(i), void(r && r()); + a((i - n) * l(s / o) + n), ot[e].raf = Z(d); + } + }; + d(); + }, + pt = 30, + ct = 10, + mt = {}, + p = {}, + ut = {}, + gt = {}, + ht = {}, + yt = [], + ft = {}, + bt = [], + xt = {}, + wt = 0, + Ct = be(), + _t = 0, + vt = be(), + Et = be(), + It = be(), + kt = function(e, t) { + return e.x === t.x && e.y === t.y; + }, + Pt = function(e, t) { + return r(e.x - t.x) < m && r(e.y - t.y) < m; + }, + Tt = function(e, t) { + return xt.x = r(e.x - t.x), xt.y = r(e.y - t.y), Math.sqrt(xt.x * xt.x + xt.y * xt.y); + }, + St = function() { + ie && (B(ie), ie = null); + }, + Ot = function() { + Q && (ie = Z(Ot), Gt()); + }, + At = function() { + return 'fit' !== g.scaleMode || E !== c.currItem.initialZoomLevel; + }, + Dt = function(e, t) { + return e && e !== document && (e.getAttribute('class') && -1 < e.getAttribute('class').indexOf('pswp__scroll-wrap') ? !1 : t(e) ? e : Dt(e.parentNode, t)); + }, + Rt = {}, + Ft = function(t, e) { + return Rt.prevent = !Dt(t.target, g.isClickableElement), Le('preventDragEvent', t, e, Rt), Rt.prevent; + }, + Lt = function(e, t) { + return t.x = e.pageX, t.y = e.pageY, t.id = e.identifier, t; + }, + zt = function(e, t, n) { + n.x = 0.5 * (e.x + t.x), n.y = 0.5 * (e.y + t.y); + }, + Ut = function(e, t, n) { + if(50 < e - V) { + var i = 2 < bt.length ? bt.shift() : {}; + i.x = t, i.y = n, bt.push(i), V = e; + } + }, + Nt = function() { + var e = Ce.y - c.currItem.initialPosition.y; + return 1 - r(e / (_e.y / 2)); + }, + Zt = {}, + Bt = {}, + Mt = [], + Ht = function(t) { + for(; 0 < Mt.length;) + Mt.pop(); + return U ? (fe = 0, yt.forEach(function(e) { + 0 === fe ? Mt[0] = e : 1 === fe && (Mt[1] = e), fe++; + })) : -1 < t.type.indexOf('touch') ? t.touches && 0 < t.touches.length && (Mt[0] = Lt(t.touches[0], Zt), 1 < t.touches.length && (Mt[1] = Lt(t.touches[1], Bt))) : (Zt.x = t.pageX, Zt.y = t.pageY, Zt.id = '', Mt[0] = Zt), Mt; + }, + Wt = function(e, t) { + var n, i, o, l, a = 0, + r = Ce[e] + t[e], + s = 0 < t[e], + d = vt.x + t.x, + p = vt.x - ft.x; + return n = r > de.min[e] || r < de.max[e] ? g.panEndFriction : 1, r = Ce[e] + t[e] * n, (g.allowPanToNext || E === c.currItem.initialZoomLevel) && (pe ? 'h' === me && 'x' === e && !te && (s ? (r > de.min[e] && (n = g.panEndFriction, a = de.min[e] - r, i = de.min[e] - we[e]), (0 >= i || 0 > p) && 1 < ln() ? (l = d, 0 > p && d > ft.x && (l = ft.x)) : de.min.x !== de.max.x && (o = r)) : (r < de.max[e] && (n = g.panEndFriction, a = r - de.max[e], i = we[e] - de.max[e]), (0 >= i || 0 < p) && 1 < ln() ? (l = d, 0 < p && d < ft.x && (l = ft.x)) : de.min.x !== de.max.x && (o = r))) : l = d, 'x' === e) ? (void 0 !== l && (He(l, !0), oe = l !== ft.x), de.min.x !== de.max.x && (void 0 === o ? !oe && (Ce.x += t.x * n) : Ce.x = o), void 0 !== l) : void(!ce && !oe && E > c.currItem.fitRatio && (Ce[e] += t[e] * n)); + }, + Kt = function(t) { + if(!('mousedown' === t.type && 0 < t.button)) { + if(nn) + return void t.preventDefault(); + if(!(J && 'mousedown' === t.type)) { + if(Ft(t, !0) && t.preventDefault(), Le('pointerDown'), U) { + var e = d.arraySearch(yt, t.pointerId, 'id'); + 0 > e && (e = yt.length), yt[e] = { + x: t.pageX, + y: t.pageY, + id: t.pointerId + }; + } + var n = Ht(t), + i = n.length; + le = null, st(), Q && 1 !== i || (Q = ue = !0, d.bind(window, C, c), j = ye = ge = $ = oe = ne = ee = te = !1, me = null, Le('firstTouchStart', n), Ke(we, Ce), xe.x = xe.y = 0, Ke(gt, n[0]), Ke(ht, gt), ft.x = Ie.x * ve, bt = [{ + x: gt.x, + y: gt.y + }], V = Y = ze(), je(E, !0), St(), Ot()), ae || !(1 < i) || ce || oe || (I = E, te = !1, ae = ee = !0, xe.y = xe.x = 0, Ke(we, Ce), Ke(mt, n[0]), Ke(p, n[1]), zt(mt, p, It), Et.x = r(It.x) - Ce.x, Et.y = r(It.y) - Ce.y, re = se = Tt(mt, p)); + } + } + }, + qt = function(t) { + if(t.preventDefault(), U) { + var e = d.arraySearch(yt, t.pointerId, 'id'); + if(-1 < e) { + var n = yt[e]; + n.x = t.pageX, n.y = t.pageY; + } + } + if(Q) { + var i = Ht(t); + if(me || ne || ae) + le = i; + else if(vt.x !== Ie.x * ve) + me = 'h'; + else { + var o = r(i[0].x - gt.x) - r(i[0].y - gt.y); + r(o) >= ct && (me = 0 < o ? 'h' : 'v', le = i); + } + } + }, + Gt = function() { + if(le) { + var e = le.length; + if(0 !== e) + if(Ke(mt, le[0]), ut.x = mt.x - gt.x, ut.y = mt.y - gt.y, ae && 1 < e) { + if(gt.x = mt.x, gt.y = mt.y, !ut.x && !ut.y && kt(le[1], p)) + return; + Ke(p, le[1]), te || (te = !0, Le('zoomGestureStarted')); + var t = Tt(mt, p), + n = $t(t); + n > c.currItem.initialZoomLevel + c.currItem.initialZoomLevel / 15 && (ye = !0); + var i = 1, + o = $e(), + l = Je(); + if(!(n < o)) + n > l && (i = (n - l) / (6 * o), 1 < i && (i = 1), n = l + i * o); + else if(g.pinchToClose && !ye && I <= c.currItem.initialZoomLevel) { + var a = o - n, + s = 1 - a / (o / 1.2); + Ue(s), Le('onPinchClose', s), ge = !0; + } else + i = (o - n) / o, 1 < i && (i = 1), n = o - i * (o / 3); + 0 > i && (i = 0), re = t, zt(mt, p, Ct), xe.x += Ct.x - It.x, xe.y += Ct.y - It.y, Ke(It, Ct), Ce.x = We('x', n), Ce.y = We('y', n), j = n > E, E = n, Ze(); + } + else { + if(!me) + return; + if(ue && (ue = !1, r(ut.x) >= ct && (ut.x -= le[0].x - ht.x), r(ut.y) >= ct && (ut.y -= le[0].y - ht.y)), gt.x = mt.x, gt.y = mt.y, 0 === ut.x && 0 === ut.y) + return; + if('v' === me && g.closeOnVerticalDrag && !At()) { + xe.y += ut.y, Ce.y += ut.y; + var d = Nt(); + return $ = !0, Le('onVerticalDrag', d), Ue(d), void Ze(); + } + Ut(ze(), mt.x, mt.y), ne = !0, de = c.currItem.bounds; + var m = Wt('x', ut); + m || (Wt('y', ut), qe(Ce), Ze()); + } + } + }, + Yt = function(t) { + if(q.isOldAndroid) { + if(J && 'mouseup' === t.type) + return; - + 1 < t.type.indexOf('touch') && (clearTimeout(J), J = setTimeout(function() { + J = 0; + }, 600)); + } + Le('pointerUp'), Ft(t, !1) && t.preventDefault(); + var e; + if(U) { + var n = d.arraySearch(yt, t.pointerId, 'id'); + if(-1 < n) + if(e = yt.splice(n, 1)[0], navigator.pointerEnabled) + e.type = t.pointerType || 'mouse'; + else { + e.type = { + 2: 'touch', + 3: 'pen', + 4: 'mouse' + }[t.pointerType], e.type || (e.type = t.pointerType || 'mouse'); + } + } + var i, o = Ht(t), + l = o.length; + if('mouseup' === t.type && (l = 0), 2 === l) + return le = null, !0; + 1 === l && Ke(ht, o[0]), 0 !== l || me || ce || (!e && ('mouseup' === t.type ? e = { + x: t.pageX, + y: t.pageY, + type: 'mouse' + } : t.changedTouches && t.changedTouches[0] && (e = { + x: t.changedTouches[0].pageX, + y: t.changedTouches[0].pageY, + type: 'touch' + })), Le('touchRelease', t, e)); + var a = -1; + if(0 === l && (Q = !1, d.unbind(window, C, c), St(), ae ? a = 0 : -1 != _t && (a = ze() - _t)), _t = 1 === l ? ze() : -1, i = -1 != a && 150 > a ? 'zoom' : 'swipe', ae && 2 > l && (ae = !1, 1 === l && (i = 'zoomPointerUp'), Le('zoomGestureEnded')), le = null, ne || te || ce || $) { + if(st(), X || (X = Vt()), X.calculateSwipeSpeed('x'), $) { + var r = Nt(); + if(r < g.verticalDragRange) + c.close(); + else { + var s = Ce.y, + p = he; + dt('verticalDrag', 0, 1, 300, d.easing.cubic.out, function(e) { + Ce.y = (c.currItem.initialPosition.y - s) * e + s, Ue((1 - p) * e + p), Ze(); + }), Le('onVerticalDrag', 1); + } + return; + } + if((oe || ce) && 0 === l) { + var m = jt(i, X); + if(m) + return; + i = 'zoomPointerUp'; + } + return ce ? void 0 : 'swipe' === i ? void(!oe && E > c.currItem.fitRatio && Xt(X)) : void Jt(); + } + }, + Vt = function() { + var e, n, i = { + lastFlickOffset: {}, + lastFlickDist: {}, + lastFlickSpeed: {}, + slowDownRatio: {}, + slowDownRatioReverse: {}, + speedDecelerationRatio: {}, + speedDecelerationRatioAbs: {}, + distanceOffset: {}, + backAnimDestination: {}, + backAnimStarted: {}, + calculateSwipeSpeed: function(t) { + 1 < bt.length ? (e = ze() - V + 50, n = bt[bt.length - 2][t]) : (e = ze() - Y, n = ht[t]), i.lastFlickOffset[t] = gt[t] - n, i.lastFlickDist[t] = r(i.lastFlickOffset[t]), i.lastFlickSpeed[t] = 20 < i.lastFlickDist[t] ? i.lastFlickOffset[t] / e : 0, 0.1 > r(i.lastFlickSpeed[t]) && (i.lastFlickSpeed[t] = 0), i.slowDownRatio[t] = 0.95, i.slowDownRatioReverse[t] = 1 - i.slowDownRatio[t], i.speedDecelerationRatio[t] = 1; + }, + calculateOverBoundsAnimOffset: function(e, t) { + i.backAnimStarted[e] || (Ce[e] > de.min[e] ? i.backAnimDestination[e] = de.min[e] : Ce[e] < de.max[e] && (i.backAnimDestination[e] = de.max[e]), i.backAnimDestination[e] !== void 0 && (i.slowDownRatio[e] = 0.7, i.slowDownRatioReverse[e] = 1 - i.slowDownRatio[e], 0.05 > i.speedDecelerationRatioAbs[e] && (i.lastFlickSpeed[e] = 0, i.backAnimStarted[e] = !0, dt('bounceZoomPan' + e, Ce[e], i.backAnimDestination[e], t || 300, d.easing.sine.out, function(t) { + Ce[e] = t, Ze(); + })))); + }, + calculateAnimOffset: function(e) { + i.backAnimStarted[e] || (i.speedDecelerationRatio[e] *= i.slowDownRatio[e] + i.slowDownRatioReverse[e] - i.slowDownRatioReverse[e] * i.timeDiff / 10, i.speedDecelerationRatioAbs[e] = r(i.lastFlickSpeed[e] * i.speedDecelerationRatio[e]), i.distanceOffset[e] = i.lastFlickSpeed[e] * i.speedDecelerationRatio[e] * i.timeDiff, Ce[e] += i.distanceOffset[e]); + }, + panAnimLoop: function() { + if(ot.zoomPan && (ot.zoomPan.raf = Z(i.panAnimLoop), i.now = ze(), i.timeDiff = i.now - i.lastNow, i.lastNow = i.now, i.calculateAnimOffset('x'), i.calculateAnimOffset('y'), Ze(), i.calculateOverBoundsAnimOffset('x'), i.calculateOverBoundsAnimOffset('y'), 0.05 > i.speedDecelerationRatioAbs.x && 0.05 > i.speedDecelerationRatioAbs.y)) + return Ce.x = t(Ce.x), Ce.y = t(Ce.y), Ze(), void at('zoomPan'); + } + }; + return i; + }, + Xt = function(e) { + return e.calculateSwipeSpeed('y'), de = c.currItem.bounds, e.backAnimDestination = {}, e.backAnimStarted = {}, 0.05 >= r(e.lastFlickSpeed.x) && 0.05 >= r(e.lastFlickSpeed.y) ? (e.speedDecelerationRatioAbs.x = e.speedDecelerationRatioAbs.y = 0, e.calculateOverBoundsAnimOffset('x'), e.calculateOverBoundsAnimOffset('y'), !0) : void(rt('zoomPan'), e.lastNow = ze(), e.panAnimLoop()); + }, + jt = function(t, n) { + var i; + ce || (wt = b); + var o; + if('swipe' === t) { + var l = gt.x - ht.x, + s = 10 > n.lastFlickDist.x; + l > pt && (s || 20 < n.lastFlickOffset.x) ? o = -1 : l < -pt && (s || -20 > n.lastFlickOffset.x) && (o = 1); + } + var p; + o && (b += o, 0 > b ? (b = g.loop ? ln() - 1 : 0, p = !0) : b >= ln() && (b = g.loop ? 0 : ln() - 1, p = !0), (!p || g.loop) && (ke += o, ve -= o, i = !0)); + var m, u = Ie.x * ve, + h = r(u - vt.x); + return i || u > vt.x == 0 < n.lastFlickSpeed.x ? (m = 0 < r(n.lastFlickSpeed.x) ? h / r(n.lastFlickSpeed.x) : 333, m = a(m, 400), m = e(m, 250)) : m = 333, wt === b && (i = !1), ce = !0, Le('mainScrollAnimStart'), dt('mainScroll', vt.x, u, m, d.easing.cubic.out, He, function() { + st(), ce = !1, wt = -1, (i || wt !== b) && c.updateCurrItem(), Le('mainScrollAnimComplete'); + }), i && c.updateCurrItem(!0), i; + }, + $t = function(e) { + return 1 / se * e * I; + }, + Jt = function() { + var e = E, + t = $e(), + n = Je(); + E < t ? e = t : E > n && (e = n); + var i, o = he; + return ge && !j && !ye && E < t ? (c.close(), !0) : (ge && (i = function(e) { + Ue((1 - o) * e + o); + }), c.zoomTo(e, 0, 200, d.easing.cubic.out, i), !0); + }; + Ae('Gestures', { + publicMethods: { + initGestures: function() { + var e = function(e, t, n, i, o) { + D = e + t, R = e + n, F = e + i, L = o ? e + o : ''; + }; + U = q.pointerEvent, U && q.touch && (q.touch = !1), U ? navigator.pointerEnabled ? e('pointer', 'down', 'move', 'up', 'cancel') : e('MSPointer', 'Down', 'Move', 'Up', 'Cancel') : q.touch ? (e('touch', 'start', 'move', 'end', 'cancel'), N = !0) : e('mouse', 'down', 'move', 'up'), C = R + ' ' + F + ' ' + L, _ = D, U && !N && (N = 1 < navigator.maxTouchPoints || 1 < navigator.msMaxTouchPoints), c.likelyTouchDevice = N, v[D] = Kt, v[R] = qt, v[F] = Yt, L && (v[L] = v[F]), q.touch && (_ += ' mousedown', C += ' mousemove mouseup', v.mousedown = v[D], v.mousemove = v[R], v.mouseup = v[F]), N || (g.allowPanToNext = !1); + } + } + }); + var Qt, en, tn, nn, on, ln, an, rn = function(e, t, i, o) { + Qt && clearTimeout(Qt), nn = !0, tn = !0; + var l; + e.initialLayout ? (l = e.initialLayout, e.initialLayout = null) : l = g.getThumbBoundsFn && g.getThumbBoundsFn(b); + var a = i ? g.hideAnimationDuration : g.showAnimationDuration, + r = function() { + at('initialZoom'), i ? (c.template.removeAttribute('style'), c.bg.removeAttribute('style')) : (Ue(1), t && (t.style.display = 'block'), d.addClass(n, 'pswp--animated-in'), Le('initialZoom' + (i ? 'OutEnd' : 'InEnd'))), o && o(), nn = !1; + }; + if(!a || !l || void 0 === l.x) + return Le('initialZoom' + (i ? 'Out' : 'In')), E = e.initialZoomLevel, Ke(Ce, e.initialPosition), Ze(), n.style.opacity = i ? 0 : 1, Ue(1), void(a ? setTimeout(function() { + r(); + }, a) : r()); + (function() { + var t = f, + o = !c.currItem.src || c.currItem.loadError || g.showHideOpacity; + e.miniImg && (e.miniImg.style.webkitBackfaceVisibility = 'hidden'), i || (E = l.w / e.w, Ce.x = l.x, Ce.y = l.y - H, c[o ? 'template' : 'bg'].style.opacity = 1e-3, Ze()), rt('initialZoom'), i && !t && d.removeClass(n, 'pswp--animated-in'), o && (i ? d[(t ? 'remove' : 'add') + 'Class'](n, 'pswp--animate_opacity') : setTimeout(function() { + d.addClass(n, 'pswp--animate_opacity'); + }, 30)), Qt = setTimeout(function() { + if(Le('initialZoom' + (i ? 'Out' : 'In')), !i) + E = e.initialZoomLevel, Ke(Ce, e.initialPosition), Ze(), Ue(1), o ? n.style.opacity = 1 : Ue(1), Qt = setTimeout(r, a + 20); + else { + var s = l.w / e.w, + p = { + x: Ce.x, + y: Ce.y + }, + c = E, + m = he, + u = function(e) { + 1 === e ? (E = s, Ce.x = l.x, Ce.y = l.y - K) : (E = (s - c) * e + c, Ce.x = (l.x - p.x) * e + p.x, Ce.y = (l.y - K - p.y) * e + p.y), Ze(), o ? n.style.opacity = 1 - e : Ue(m - e * m); + }; + t ? dt('initialZoom', 0, 1, a, d.easing.cubic.out, u, r) : (u(1), Qt = setTimeout(r, a + 20)); + } + }, i ? 25 : 90); + })(); + }, + sn = {}, + dn = [], + pn = { + index: 0, + errorMsg: '
    The image could not be loaded.
    ', + forceProgressiveLoading: !1, + preload: [1, 1], + getNumItemsFn: function() { + return en.length; + } + }, + cn = function() { + return { + center: { + x: 0, + y: 0 + }, + max: { + x: 0, + y: 0 + }, + min: { + x: 0, + y: 0 + } + }; + }, + mn = function(e, n, i) { + var o = e.bounds; + o.center.x = t((sn.x - n) / 2), o.center.y = t((sn.y - i) / 2) + e.vGap.top, o.max.x = n > sn.x ? t(sn.x - n) : o.center.x, o.max.y = i > sn.y ? t(sn.y - i) + e.vGap.top : o.center.y, o.min.x = n > sn.x ? 0 : o.center.x, o.min.y = i > sn.y ? e.vGap.top : o.center.y; + }, + un = function(e, t, n) { + if(e.src && !e.loadError) { + var i = !n; + if(i && (!e.vGap && (e.vGap = { + top: 0, + bottom: 0 + }), Le('parseVerticalMargin', e)), sn.x = t.x, sn.y = t.y - e.vGap.top - e.vGap.bottom, i) { + var o = sn.x / e.w, + l = sn.y / e.h; + e.fitRatio = o < l ? o : l; + var a = g.scaleMode; + 'orig' === a ? n = 1 : 'fit' === a && (n = e.fitRatio), 1 < n && (n = 1), e.initialZoomLevel = n, e.bounds || (e.bounds = cn()); + } + return n ? (mn(e, e.w * n, e.h * n), i && n === e.initialZoomLevel && (e.initialPosition = e.bounds.center), e.bounds) : void 0; + } + return e.w = e.h = 0, e.initialZoomLevel = e.fitRatio = 1, e.bounds = cn(), e.initialPosition = e.bounds.center, e.bounds; + }, + gn = function(e, t, n, i, o, l) { + t.loadError || i && (t.imageAppended = !0, fn(t, i, t === c.currItem && Oe), n.appendChild(i), l && setTimeout(function() { + t && t.loaded && t.placeholder && (t.placeholder.style.display = 'none', t.placeholder = null); + }, 500)); + }, + hn = function(e) { + e.loading = !0, e.loaded = !1; + var t = e.img = d.createEl('pswp__img', 'img'), + n = function() { + e.loading = !1, e.loaded = !0, e.loadComplete ? e.loadComplete(e) : e.img = null, t.onload = t.onerror = null, t = null; + }; + return t.onload = n, t.onerror = function() { + e.loadError = !0, n(); + }, t.src = e.src, t; + }, + yn = function(e, t) { + if(e.src && e.loadError && e.container) + return t && (e.container.innerHTML = ''), e.container.innerHTML = g.errorMsg.replace('%url%', e.src), !0; + }, + fn = function(e, n, i) { + if(e.src) { + n || (n = e.container.lastChild); + var o = i ? e.w : t(e.w * e.fitRatio), + l = i ? e.h : t(e.h * e.fitRatio); + e.placeholder && !e.loaded && (e.placeholder.style.width = o + 'px', e.placeholder.style.height = l + 'px'), n.style.width = o + 'px', n.style.height = l + 'px'; + } + }, + bn = function() { + if(dn.length) { + for(var e, t = 0; t < dn.length; t++) + e = dn[t], e.holder.index === e.index && gn(e.index, e.item, e.baseDiv, e.img, !1, e.clearPlaceholder); + dn = []; + } + }; + Ae('Controller', { + publicMethods: { + lazyLoadItem: function(e) { + e = De(e); + var t = on(e); + t && (!t.loaded && !t.loading || S) && (Le('gettingData', e, t), t.src && hn(t)); + }, + initController: function() { + d.extend(g, pn, !0), c.items = en = i, on = c.getItemAt, ln = g.getNumItemsFn, an = g.loop, 3 > ln() && (g.loop = !1), Fe('beforeChange', function(e) { + var t, n = g.preload, + i = !(null !== e) || 0 <= e, + o = a(n[0], ln()), + l = a(n[1], ln()); + for(t = 1; t <= (i ? l : o); t++) + c.lazyLoadItem(b + t); + for(t = 1; t <= (i ? o : l); t++) + c.lazyLoadItem(b - t); + }), Fe('initialLayout', function() { + c.currItem.initialLayout = g.getThumbBoundsFn && g.getThumbBoundsFn(b); + }), Fe('mainScrollAnimComplete', bn), Fe('initialZoomInEnd', bn), Fe('destroy', function() { + for(var e, t = 0; t < en.length; t++) + e = en[t], e.container && (e.container = null), e.placeholder && (e.placeholder = null), e.img && (e.img = null), e.preloader && (e.preloader = null), e.loadError && (e.loaded = e.loadError = !1); + dn = null; + }); + }, + getItemAt: function(e) { + return !!(0 <= e) && void 0 !== en[e] && en[e]; + }, + allowProgressiveImg: function() { + return g.forceProgressiveLoading || !N || g.mouseUsed || 1200 < screen.width; + }, + setContent: function(e, t) { + g.loop && (t = De(t)); + var n = c.getItemAt(e.index); + n && (n.container = null); + var i, o = c.getItemAt(t); + if(!o) + return void(e.el.innerHTML = ''); + Le('gettingData', t, o), e.index = t, e.item = o; + var l = o.container = d.createEl('pswp__zoom-wrap'); + if(!o.src && o.html && (o.html.tagName ? l.appendChild(o.html) : l.innerHTML = o.html), yn(o), un(o, _e), o.src && !o.loadError && !o.loaded) { + if(o.loadComplete = function(n) { + if(h) { + if(e && e.index === t) { + if(yn(n, !0)) + return n.loadComplete = n.img = null, un(n, _e), Be(n), void(e.index === b && c.updateCurrZoomItem()); + n.imageAppended ? !nn && n.placeholder && (n.placeholder.style.display = 'none', n.placeholder = null) : q.transform && (ce || nn) ? dn.push({ + item: n, + baseDiv: l, + img: n.img, + index: t, + holder: e, + clearPlaceholder: !0 + }) : gn(t, n, l, n.img, ce || nn, !0); + } + n.loadComplete = null, n.img = null, Le('imageLoadComplete', t, n); + } + }, d.features.transform) { + var a = 'pswp__img pswp__img--placeholder'; + a += o.msrc ? '' : ' pswp__img--placeholder--blank'; + var r = d.createEl(a, o.msrc ? 'img' : ''); + o.msrc && (r.src = o.msrc), fn(o, r), l.appendChild(r), o.placeholder = r; + } + o.loading || hn(o), c.allowProgressiveImg() && (!tn && q.transform ? dn.push({ + item: o, + baseDiv: l, + img: o.img, + index: t, + holder: e + }) : gn(t, o, l, o.img, !0, !0)); + } else + o.src && !o.loadError && (i = d.createEl('pswp__img', 'img'), i.style.opacity = 1, i.src = o.src, fn(o, i), gn(t, o, l, i, !0)); + tn || t !== b ? Be(o) : (pe = l.style, rn(o, i || o.img)), e.el.innerHTML = '', e.el.appendChild(l); + }, + cleanSlide: function(e) { + e.img && (e.img.onload = e.img.onerror = null), e.loaded = e.loading = e.img = e.imageAppended = !1; + } + } + }); + var xn, wn = {}, + Cn = function(t, n, i) { + var o = document.createEvent('CustomEvent'), + e = { + origEvent: t, + target: t.target, + releasePoint: n, + pointerType: i || 'touch' + }; + o.initCustomEvent('pswpTap', !0, !0, e), t.target.dispatchEvent(o); + }; + Ae('Tap', { + publicMethods: { + initTap: function() { + Fe('firstTouchStart', c.onTapStart), Fe('touchRelease', c.onTapRelease), Fe('destroy', function() { + wn = {}, xn = null; + }); + }, + onTapStart: function(e) { + 1 < e.length && (clearTimeout(xn), xn = null); + }, + onTapRelease: function(t, e) { + if(e && !ne && !ee && !lt) { + var n = e; + if(xn && (clearTimeout(xn), xn = null, Pt(n, wn))) + return void Le('doubleTap', n); + if('mouse' === e.type) + return void Cn(t, e, 'mouse'); + var i = t.target.tagName.toUpperCase(); + if('BUTTON' === i || d.hasClass(t.target, 'pswp__single-tap')) + return void Cn(t, e); + Ke(wn, n), xn = setTimeout(function() { + Cn(t, e), xn = null; + }, 300); + } + } + } + }); + var _n; + Ae('DesktopZoom', { + publicMethods: { + initDesktopZoom: function() { + W || (N ? Fe('mouseUsed', function() { + c.setupDesktopZoom(); + }) : c.setupDesktopZoom(!0)); + }, + setupDesktopZoom: function(e) { + _n = {}; + var t = 'wheel mousewheel DOMMouseScroll'; + Fe('bindEvents', function() { + d.bind(n, t, c.handleMouseWheel); + }), Fe('unbindEvents', function() { + _n && d.unbind(n, t, c.handleMouseWheel); + }), c.mouseZoomedIn = !1; + var i, o = function() { + c.mouseZoomedIn && (d.removeClass(n, 'pswp--zoomed-in'), c.mouseZoomedIn = !1), 1 > E ? d.addClass(n, 'pswp--zoom-allowed') : d.removeClass(n, 'pswp--zoom-allowed'), l(); + }, + l = function() { + i && (d.removeClass(n, 'pswp--dragging'), i = !1); + }; + Fe('resize', o), Fe('afterChange', o), Fe('pointerDown', function() { + c.mouseZoomedIn && (i = !0, d.addClass(n, 'pswp--dragging')); + }), Fe('pointerUp', l), e || o(); + }, + handleMouseWheel: function(t) { + if(E <= c.currItem.fitRatio) + return g.modal && (!g.closeOnScroll || lt || Q ? t.preventDefault() : z && 2 < r(t.deltaY) && (f = !0, c.close())), !0; + if(t.stopPropagation(), _n.x = 0, 'deltaX' in t) + 1 === t.deltaMode ? (_n.x = 18 * t.deltaX, _n.y = 18 * t.deltaY) : (_n.x = t.deltaX, _n.y = t.deltaY); + else if('wheelDelta' in t) + t.wheelDeltaX && (_n.x = -0.16 * t.wheelDeltaX), _n.y = t.wheelDeltaY ? -0.16 * t.wheelDeltaY : -0.16 * t.wheelDelta; + else if('detail' in t) + _n.y = t.detail; + else + return; + je(E, !0); + var e = Ce.x - _n.x, + n = Ce.y - _n.y; + (g.modal || e <= de.min.x && e >= de.max.x && n <= de.min.y && n >= de.max.y) && t.preventDefault(), c.panTo(e, n); + }, + toggleDesktopZoom: function(e) { + e = e || { + x: _e.x / 2 + Ee.x, + y: _e.y / 2 + Ee.y + }; + var t = g.getDoubleTapZoom(!0, c.currItem), + i = E === t; + c.mouseZoomedIn = !i, c.zoomTo(i ? c.currItem.initialZoomLevel : t, e, 333), d[(i ? 'remove' : 'add') + 'Class'](n, 'pswp--zoomed-in'); + } + } + }); + var vn, En, In, kn, Pn, Tn, Sn, On, An, Dn, Rn, Fn, Ln = { + history: !0, + galleryUID: 1 + }, + zn = function() { + return Rn.hash.substring(1); + }, + Un = function() { + vn && clearTimeout(vn), In && clearTimeout(In); + }, + Nn = function() { + var e = zn(), + t = {}; + if(5 > e.length) + return t; + var n, i = e.split('&'); + for(n = 0; n < i.length; n++) + if(i[n]) { + var o = i[n].split('='); + 2 > o.length || (t[o[0]] = o[1]); + } + if(g.galleryPIDs) { + var l = t.pid; + for(t.pid = 0, n = 0; n < en.length; n++) + if(en[n].pid === l) { + t.pid = n; + break; + } + } else + t.pid = parseInt(t.pid, 10) - 1; + return 0 > t.pid && (t.pid = 0), t; + }, + Zn = function() { + if(In && clearTimeout(In), lt || Q) + return void(In = setTimeout(Zn, 500)); + kn ? clearTimeout(En) : kn = !0; + var e = b + 1, + t = on(b); + t.hasOwnProperty('pid') && (e = t.pid); + var n = Sn + '&gid=' + g.galleryUID + '&pid=' + e; + On || -1 !== Rn.hash.indexOf(n) || (Dn = !0); + var i = Rn.href.split('#')[0] + '#' + n; + Fn ? '#' + n !== window.location.hash && history[On ? 'replaceState' : 'pushState']('', document.title, i) : On ? Rn.replace(i) : Rn.hash = n, On = !0, En = setTimeout(function() { + kn = !1; + }, 60); + }; + Ae('History', { + publicMethods: { + initHistory: function() { + if(d.extend(g, Ln, !0), !!g.history) { + Rn = window.location, Dn = !1, An = !1, On = !1, Sn = zn(), Fn = 'pushState' in history, -1 < Sn.indexOf('gid=') && (Sn = Sn.split('&gid=')[0], Sn = Sn.split('?gid=')[0]), Fe('afterChange', c.updateURL), Fe('unbindEvents', function() { + d.unbind(window, 'hashchange', c.onHashChange); + }); + var e = function() { + Tn = !0, An || (Dn ? history.back() : Sn ? Rn.hash = Sn : Fn ? history.pushState('', document.title, Rn.pathname + Rn.search) : Rn.hash = ''), Un(); + }; + Fe('unbindEvents', function() { + f && e(); + }), Fe('destroy', function() { + Tn || e(); + }), Fe('firstUpdate', function() { + b = Nn().pid; + }); + var t = Sn.indexOf('pid='); - + 1 < t && (Sn = Sn.substring(0, t), '&' === Sn.slice(-1) && (Sn = Sn.slice(0, -1))), setTimeout(function() { + h && d.bind(window, 'hashchange', c.onHashChange); + }, 40); + } + }, + onHashChange: function() { + return zn() === Sn ? (An = !0, void c.close()) : void(!kn && (Pn = !0, c.goTo(Nn().pid), Pn = !1)); + }, + updateURL: function() { + Un(); + Pn || (On ? vn = setTimeout(Zn, 800) : Zn()); + } + } + }), d.extend(c, { + shout: Le, + listen: Fe, + viewportSize: _e, + options: g, + isMainScrollAnimating: function() { + return ce; + }, + getZoomLevel: function() { + return E; + }, + getCurrentIndex: function() { + return b; + }, + isDragging: function() { + return Q; + }, + isZooming: function() { + return ae; + }, + setScrollOffset: function(e, t) { + Ee.x = e, K = Ee.y = t, Le('updateScrollOffset', Ee); + }, + applyZoomPan: function(e, t, n, i) { + Ce.x = t, Ce.y = n, E = e, Ze(i); + }, + init: function() { + if(!(h || y)) { + var e; + c.framework = d, c.template = n, c.bg = d.getChildByClass(n, 'pswp__bg'), M = n.className, h = !0, q = d.detectFeatures(), Z = q.raf, B = q.caf, z = q.transform, W = q.oldIE, c.scrollWrap = d.getChildByClass(n, 'pswp__scroll-wrap'), c.container = d.getChildByClass(c.scrollWrap, 'pswp__container'), w = c.container.style, c.itemHolders = O = [{ + el: c.container.children[0], + wrap: 0, + index: -1 + }, { + el: c.container.children[1], + wrap: 0, + index: -1 + }, { + el: c.container.children[2], + wrap: 0, + index: -1 + }], O[0].el.style.display = O[2].el.style.display = 'none', et(), v = { + resize: c.updateSize, + orientationchange: function() { + clearTimeout(G), G = setTimeout(function() { + _e.x !== c.scrollWrap.clientWidth && c.updateSize(); + }, 500); + }, + scroll: it, + keydown: tt, + click: nt + }; + var t = q.isOldIOSPhone || q.isOldAndroid || q.isMobileOpera; + for(q.animationName && q.transform && !t || (g.showAnimationDuration = g.hideAnimationDuration = 0), e = 0; e < Te.length; e++) + c['init' + Te[e]](); + if(o) { + var i = c.ui = new o(c, d); + i.init(); + } + Le('firstUpdate'), b = b || g.index || 0, (isNaN(b) || 0 > b || b >= ln()) && (b = 0), c.currItem = on(b), (q.isOldIOSPhone || q.isOldAndroid) && (Pe = !1), n.setAttribute('aria-hidden', 'false'), g.modal && (Pe ? n.style.position = 'fixed' : (n.style.position = 'absolute', n.style.top = d.getScrollY() + 'px')), void 0 === K && (Le('initialLayout'), K = H = d.getScrollY()); + var l = 'pswp--open '; + for(g.mainClass && (l += g.mainClass + ' '), g.showHideOpacity && (l += 'pswp--animate_opacity '), l += N ? 'pswp--touch' : 'pswp--notouch', l += q.animationName ? ' pswp--css_animation' : '', l += q.svg ? ' pswp--svg' : '', d.addClass(n, l), c.updateSize(), x = -1, ke = null, e = 0; e < u; e++) + Me((e + x) * Ie.x, O[e].el.style); + W || d.bind(c.scrollWrap, _, c), Fe('initialZoomInEnd', function() { + c.setContent(O[0], b - 1), c.setContent(O[2], b + 1), O[0].el.style.display = O[2].el.style.display = 'block', g.focus && n.focus(), Ve(); + }), c.setContent(O[1], b), c.updateCurrItem(), Le('afterInit'), Pe || (T = setInterval(function() { + lt || Q || ae || E !== c.currItem.initialZoomLevel || c.updateSize(); + }, 1e3)), d.addClass(n, 'pswp--visible'); + } + }, + close: function() { + h && (h = !1, y = !0, Le('close'), Xe(), rn(c.currItem, null, !0, c.destroy)); + }, + destroy: function() { + Le('destroy'), Qt && clearTimeout(Qt), n.setAttribute('aria-hidden', 'true'), n.className = M, T && clearInterval(T), d.unbind(c.scrollWrap, _, c), d.unbind(window, 'scroll', c), St(), st(), Re = null; + }, + panTo: function(e, t, n) { + n || (e > de.min.x ? e = de.min.x : e < de.max.x && (e = de.max.x), t > de.min.y ? t = de.min.y : t < de.max.y && (t = de.max.y)), Ce.x = e, Ce.y = t, Ze(); + }, + handleEvent: function(t) { + t = t || window.event, v[t.type] && v[t.type](t); + }, + goTo: function(e) { + e = De(e); + var t = e - b; + ke = t, b = e, c.currItem = on(b), ve -= t, He(Ie.x * ve), st(), ce = !1, c.updateCurrItem(); + }, + next: function() { + c.goTo(b + 1); + }, + prev: function() { + c.goTo(b - 1); + }, + updateCurrZoomItem: function(e) { + if(e && Le('beforeChange', 0), O[1].el.children.length) { + var t = O[1].el.children[0]; + pe = d.hasClass(t, 'pswp__zoom-wrap') ? t.style : null; + } else + pe = null; + de = c.currItem.bounds, I = E = c.currItem.initialZoomLevel, Ce.x = de.center.x, Ce.y = de.center.y, e && Le('afterChange'); + }, + invalidateCurrItems: function() { + S = !0; + for(var e = 0; e < u; e++) + O[e].item && (O[e].item.needsUpdate = !0); + }, + updateCurrItem: function(e) { + if(0 !== ke) { + var t, n = r(ke); + if(!(e && 2 > n)) { + c.currItem = on(b), Oe = !1, Le('beforeChange', ke), n >= u && (x += ke + (0 < ke ? -u : u), n = u); + for(var o = 0; o < n; o++) + 0 < ke ? (t = O.shift(), O[u - 1] = t, x++, Me((x + 2) * Ie.x, t.el.style), c.setContent(t, b - n + o + 1 + 1)) : (t = O.pop(), O.unshift(t), x--, Me(x * Ie.x, t.el.style), c.setContent(t, b + n - o - 1 - 1)); + if(pe && 1 === r(ke)) { + var i = on(A); + i.initialZoomLevel !== E && (un(i, _e), fn(i), Be(i)); + } + ke = 0, c.updateCurrZoomItem(), A = b, Le('afterChange'); + } + } + }, + updateSize: function(e) { + if(!Pe && g.modal) { + var o = d.getScrollY(); + if(K !== o && (n.style.top = o + 'px', K = o), !e && Se.x === window.innerWidth && Se.y === window.innerHeight) + return; + Se.x = window.innerWidth, Se.y = window.innerHeight, n.style.height = Se.y + 'px'; + } + if(_e.x = c.scrollWrap.clientWidth, _e.y = c.scrollWrap.clientHeight, it(), Ie.x = _e.x + t(_e.x * g.spacing), Ie.y = _e.y, He(Ie.x * ve), Le('beforeResize'), void 0 !== x) { + for(var l, a, r, s = 0; s < u; s++) + l = O[s], Me((s + x) * Ie.x, l.el.style), r = b + s - 1, g.loop && 2 < ln() && (r = De(r)), a = on(r), a && (S || a.needsUpdate || !a.bounds) ? (c.cleanSlide(a), c.setContent(l, r), 1 === s && (c.currItem = a, c.updateCurrZoomItem(!0)), a.needsUpdate = !1) : -1 === l.index && 0 <= r && c.setContent(l, r), a && a.container && (un(a, _e), fn(a), Be(a)); + S = !1; + } + I = E = c.currItem.initialZoomLevel, de = c.currItem.bounds, de && (Ce.x = de.center.x, Ce.y = de.center.y, Ze(!0)), Le('resize'); + }, + zoomTo: function(e, t, n, i, o) { + t && (I = E, Et.x = r(t.x) - Ce.x, Et.y = r(t.y) - Ce.y, Ke(we, Ce)); + var l = je(e, !1), + a = {}; + Qe('x', l, a, e), Qe('y', l, a, e); + var s = E, + p = { + x: Ce.x, + y: Ce.y + }; + qe(a); + var c = function(t) { + 1 === t ? (E = e, Ce.x = a.x, Ce.y = a.y) : (E = (e - s) * t + s, Ce.x = (a.x - p.x) * t + p.x, Ce.y = (a.y - p.y) * t + p.y), o && o(t), Ze(1 === t); + }; + n ? dt('customZoomTo', 0, 1, n, i || d.easing.sine.inOut, c) : c(1); + } + }); + }; + }); + }, function(e, n, i) { + var o, l; + (function(t, a) { + o = a, l = 'function' == typeof o ? o.call(n, i, n, e) : o, !(l !== void 0 && (e.exports = l)); + })(this, function() { + 'use strict'; + return function(n, o) { + var i, l, e, a, r, s, d, p, c, m, u, g, h, y, f, b, x, w, C = this, + _ = !1, + v = !0, + E = !0, + I = { + barsSize: { + top: 44, + bottom: 'auto' + }, + closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'], + timeToIdle: 4e3, + timeToIdleOutside: 1e3, + loadingIndicatorDelay: 1e3, + addCaptionHTMLFn: function(e, t) { + return e.title ? (t.children[0].innerHTML = e.title, !0) : (t.children[0].innerHTML = '', !1); + }, + closeEl: !0, + captionEl: !0, + fullscreenEl: !0, + zoomEl: !0, + shareEl: !0, + counterEl: !0, + arrowEl: !0, + preloaderEl: !0, + tapToClose: !1, + tapToToggleControls: !0, + clickToCloseNonZoomable: !0, + shareButtons: [{ + id: 'facebook', + label: 'Share on Facebook', + url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}' + }, { + id: 'twitter', + label: 'Tweet', + url: 'https://twitter.com/intent/tweet?text={{text}}&url={{url}}' + }, { + id: 'pinterest', + label: 'Pin it', + url: 'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}' + }, { + id: 'download', + label: 'Download image', + url: '{{raw_image_url}}', + download: !0 + }], + getImageURLForShare: function() { + return n.currItem.src || ''; + }, + getPageURLForShare: function() { + return window.location.href; + }, + getTextForShare: function() { + return n.currItem.title || ''; + }, + indexIndicatorSep: ' / ', + fitControlsWidth: 1200 + }, + k = function(t) { + if(b) + return !0; + t = t || window.event, f.timeToIdle && f.mouseUsed && !c && z(); + for(var e, n, l = t.target || t.srcElement, a = l.getAttribute('class') || '', r = 0; r < K.length; r++) + e = K[r], e.onTap && -1 < a.indexOf('pswp__' + e.name) && (e.onTap(), n = !0); + if(n) { + t.stopPropagation && t.stopPropagation(), b = !0; + var i = o.features.isOldAndroid ? 600 : 30; + setTimeout(function() { + b = !1; + }, i); + } + }, + P = function() { + return !n.likelyTouchDevice || f.mouseUsed || screen.width > f.fitControlsWidth; + }, + T = function(e, t, n) { + o[(n ? 'add' : 'remove') + 'Class'](e, 'pswp__' + t); + }, + S = function() { + var e = 1 === f.getNumItemsFn(); + e !== y && (T(l, 'ui--one-slide', e), y = e); + }, + O = function() { + T(d, 'share-modal--hidden', E); + }, + A = function() { + return E = !E, E ? (o.removeClass(d, 'pswp__share-modal--fade-in'), setTimeout(function() { + E && O(); + }, 300)) : (O(), setTimeout(function() { + E || o.addClass(d, 'pswp__share-modal--fade-in'); + }, 30)), E || R(), !1; + }, + D = function(i) { + i = i || window.event; + var e = i.target || i.srcElement; + return(n.shout('shareLinkClick', i, e), !!e.href) && (!!e.hasAttribute('download') || (window.open(e.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=' + (window.screen ? t(screen.width / 2 - 275) : 100)), E || A(), !1)); + }, + R = function() { + for(var e, t, n, o, l, a = '', r = 0; r < f.shareButtons.length; r++) + e = f.shareButtons[r], n = f.getImageURLForShare(e), o = f.getPageURLForShare(e), l = f.getTextForShare(e), t = e.url.replace('{{url}}', encodeURIComponent(o)).replace('{{image_url}}', encodeURIComponent(n)).replace('{{raw_image_url}}', n).replace('{{text}}', encodeURIComponent(l)), a += '', f.parseShareButtonOut && (a = f.parseShareButtonOut(e, a)); + d.children[0].innerHTML = a, d.children[0].onclick = D; + }, + F = function(e) { + for(var t = 0; t < f.closeElClasses.length; t++) + if(o.hasClass(e, 'pswp__' + f.closeElClasses[t])) + return !0; + }, + L = 0, + z = function() { + clearTimeout(w), L = 0, c && C.setIdle(!1); + }, + U = function(t) { + t = t ? t : window.event; + var e = t.relatedTarget || t.toElement; + e && 'HTML' !== e.nodeName || (clearTimeout(w), w = setTimeout(function() { + C.setIdle(!0); + }, f.timeToIdleOutside)); + }, + N = function() { + f.fullscreenEl && !o.features.isOldAndroid && (!i && (i = C.getFullscreenAPI()), i ? (o.bind(document, i.eventK, C.updateFullscreen), C.updateFullscreen(), o.addClass(n.template, 'pswp--supports-fs')) : o.removeClass(n.template, 'pswp--supports-fs')); + }, + Z = function() { + f.preloaderEl && (B(!0), m('beforeChange', function() { + clearTimeout(h), h = setTimeout(function() { + n.currItem && n.currItem.loading ? (!n.allowProgressiveImg() || n.currItem.img && !n.currItem.img.naturalWidth) && B(!1) : B(!0); + }, f.loadingIndicatorDelay); + }), m('imageLoadComplete', function(e, t) { + n.currItem === t && B(!0); + })); + }, + B = function(e) { + g !== e && (T(u, 'preloader--active', !e), g = e); + }, + M = function(t) { + var n = t.vGap; + if(P()) { + var i = f.barsSize; + if(!(f.captionEl && 'auto' === i.bottom)) + n.bottom = 'auto' === i.bottom ? 0 : i.bottom; + else if(a || (a = o.createEl('pswp__caption pswp__caption--fake'), a.appendChild(o.createEl('pswp__caption__center')), l.insertBefore(a, e), o.addClass(l, 'pswp__ui--fit')), f.addCaptionHTMLFn(t, a, !0)) { + var r = a.clientHeight; + n.bottom = parseInt(r, 10) || 44; + } else + n.bottom = i.top; + n.top = i.top; + } else + n.top = n.bottom = 0; + }, + H = function() { + f.timeToIdle && m('mouseUsed', function() { + o.bind(document, 'mousemove', z), o.bind(document, 'mouseout', U), x = setInterval(function() { + L++, 2 == L && C.setIdle(!0); + }, f.timeToIdle / 2); + }); + }, + W = function() { + m('onVerticalDrag', function(e) { + v && 0.95 > e ? C.hideControls() : !v && 0.95 <= e && C.showControls(); + }); + var e; + m('onPinchClose', function(t) { + v && 0.9 > t ? (C.hideControls(), e = !0) : e && !v && 0.9 < t && C.showControls(); + }), m('zoomGestureEnded', function() { + e = !1, e && !v && C.showControls(); + }); + }, + K = [{ + name: 'caption', + option: 'captionEl', + onInit: function(t) { + e = t; + } + }, { + name: 'share-modal', + option: 'shareEl', + onInit: function(e) { + d = e; + }, + onTap: function() { + A(); + } + }, { + name: 'button--share', + option: 'shareEl', + onInit: function(e) { + s = e; + }, + onTap: function() { + A(); + } + }, { + name: 'button--zoom', + option: 'zoomEl', + onTap: n.toggleDesktopZoom + }, { + name: 'counter', + option: 'counterEl', + onInit: function(e) { + r = e; + } + }, { + name: 'button--close', + option: 'closeEl', + onTap: n.close + }, { + name: 'button--arrow--left', + option: 'arrowEl', + onTap: n.prev + }, { + name: 'button--arrow--right', + option: 'arrowEl', + onTap: n.next + }, { + name: 'button--fs', + option: 'fullscreenEl', + onTap: function() { + i.isFullscreen() ? i.exit() : i.enter(); + } + }, { + name: 'preloader', + option: 'preloaderEl', + onInit: function(e) { + u = e; + } + }], + q = function() { + var e, t, n, i = function(r) { + if(r) + for(var s = r.length, l = 0; l < s; l++) { + e = r[l], t = e.className; + for(var i = 0; i < K.length; i++) + n = K[i], -1 < t.indexOf('pswp__' + n.name) && (f[n.option] ? (o.removeClass(e, 'pswp__element--disabled'), n.onInit && n.onInit(e)) : o.addClass(e, 'pswp__element--disabled')); + } + }; + i(l.children); + var a = o.getChildByClass(l, 'pswp__top-bar'); + a && i(a.children); + }; + C.init = function() { + o.extend(n.options, I, !0), f = n.options, l = o.getChildByClass(n.scrollWrap, 'pswp__ui'), m = n.listen, W(), m('beforeChange', C.update), m('doubleTap', function(e) { + var t = n.currItem.initialZoomLevel; + n.getZoomLevel() === t ? n.zoomTo(f.getDoubleTapZoom(!1, n.currItem), e, 333) : n.zoomTo(t, e, 333); + }), m('preventDragEvent', function(n, e, i) { + var o = n.target || n.srcElement; + o && o.getAttribute('class') && -1 < n.type.indexOf('mouse') && (0 < o.getAttribute('class').indexOf('__caption') || /(SMALL|STRONG|EM)/i.test(o.tagName)) && (i.prevent = !1); + }), m('bindEvents', function() { + o.bind(l, 'pswpTap click', k), o.bind(n.scrollWrap, 'pswpTap', C.onGlobalTap), n.likelyTouchDevice || o.bind(n.scrollWrap, 'mouseover', C.onMouseOver); + }), m('unbindEvents', function() { + E || A(), x && clearInterval(x), o.unbind(document, 'mouseout', U), o.unbind(document, 'mousemove', z), o.unbind(l, 'pswpTap click', k), o.unbind(n.scrollWrap, 'pswpTap', C.onGlobalTap), o.unbind(n.scrollWrap, 'mouseover', C.onMouseOver), i && (o.unbind(document, i.eventK, C.updateFullscreen), i.isFullscreen() && (f.hideAnimationDuration = 0, i.exit()), i = null); + }), m('destroy', function() { + f.captionEl && (a && l.removeChild(a), o.removeClass(e, 'pswp__caption--empty')), d && (d.children[0].onclick = null), o.removeClass(l, 'pswp__ui--over-close'), o.addClass(l, 'pswp__ui--hidden'), C.setIdle(!1); + }), f.showAnimationDuration || o.removeClass(l, 'pswp__ui--hidden'), m('initialZoomIn', function() { + f.showAnimationDuration && o.removeClass(l, 'pswp__ui--hidden'); + }), m('initialZoomOut', function() { + o.addClass(l, 'pswp__ui--hidden'); + }), m('parseVerticalMargin', M), q(), f.shareEl && s && d && (E = !0), S(), H(), N(), Z(); + }, C.setIdle = function(e) { + c = e, T(l, 'ui--idle', e); + }, C.update = function() { + v && n.currItem ? (C.updateIndexIndicator(), f.captionEl && (f.addCaptionHTMLFn(n.currItem, e), T(e, 'caption--empty', !n.currItem.title)), _ = !0) : _ = !1, E || A(), S(); + }, C.updateFullscreen = function(t) { + t && setTimeout(function() { + n.setScrollOffset(0, o.getScrollY()); + }, 50), o[(i.isFullscreen() ? 'add' : 'remove') + 'Class'](n.template, 'pswp--fs'); + }, C.updateIndexIndicator = function() { + f.counterEl && (r.innerHTML = n.getCurrentIndex() + 1 + f.indexIndicatorSep + f.getNumItemsFn()); + }, C.onGlobalTap = function(t) { + t = t || window.event; + var e = t.target || t.srcElement; + if(!b) + if(t.detail && 'mouse' === t.detail.pointerType) { + if(F(e)) + return void n.close(); + o.hasClass(e, 'pswp__img') && (1 === n.getZoomLevel() && n.getZoomLevel() <= n.currItem.fitRatio ? f.clickToCloseNonZoomable && n.close() : n.toggleDesktopZoom(t.detail.releasePoint)); + } + else if(f.tapToToggleControls && (v ? C.hideControls() : C.showControls()), f.tapToClose && (o.hasClass(e, 'pswp__img') || F(e))) + return void n.close(); + }, C.onMouseOver = function(t) { + t = t || window.event; + var e = t.target || t.srcElement; + T(l, 'ui--over-close', F(e)); + }, C.hideControls = function() { + o.addClass(l, 'pswp__ui--hidden'), v = !1; + }, C.showControls = function() { + v = !0, _ || C.update(), o.removeClass(l, 'pswp__ui--hidden'); + }, C.supportsFullscreen = function() { + var e = document; + return !!(e.exitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen || e.msExitFullscreen); + }, C.getFullscreenAPI = function() { + var e, t = document.documentElement, + i = 'fullscreenchange'; + return t.requestFullscreen ? e = { + enterK: 'requestFullscreen', + exitK: 'exitFullscreen', + elementK: 'fullscreenElement', + eventK: i + } : t.mozRequestFullScreen ? e = { + enterK: 'mozRequestFullScreen', + exitK: 'mozCancelFullScreen', + elementK: 'mozFullScreenElement', + eventK: 'moz' + i + } : t.webkitRequestFullscreen ? e = { + enterK: 'webkitRequestFullscreen', + exitK: 'webkitExitFullscreen', + elementK: 'webkitFullscreenElement', + eventK: 'webkit' + i + } : t.msRequestFullscreen && (e = { + enterK: 'msRequestFullscreen', + exitK: 'msExitFullscreen', + elementK: 'msFullscreenElement', + eventK: 'MSFullscreenChange' + }), e && (e.enter = function() { + return p = f.closeOnScroll, f.closeOnScroll = !1, 'webkitRequestFullscreen' === this.enterK ? void n.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT) : n.template[this.enterK](); + }, e.exit = function() { + return f.closeOnScroll = p, document[this.exitK](); + }, e.isFullscreen = function() { + return document[this.elementK]; + }), e; + }; + }; + }); + }, function(e, t, n) { + 'use strict'; + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var i = n(0), + o = function() { + function e(e) { + this._collection = null, this._filters = [], this.gallery = e; + } + return e.prototype.addFilter = function(e) { + this.filters.push(e); + }, e.prototype.refresh = function() { + this.filters.forEach(function(e) { + e.render(); + }); + }, e.prototype.render = function() { + var e = document.createElement('div'); + i.Utility.addClass(e, 'natural-gallery-images sectionContainer'), e.appendChild(i.Utility.getIcon('icon-pict')); + var t = document.createElement('div'); + i.Utility.addClass(t, 'sectionName'), t.textContent = this.gallery.options.labelImages, e.appendChild(t); + var n = document.createElement('span'); + e.appendChild(n), i.Utility.addClass(n, 'natural-gallery-visible'); + var o = document.createElement('span'); + o.textContent = ' / ', e.appendChild(o); + var l = document.createElement('span'); + return i.Utility.addClass(l, 'natural-gallery-total'), e.appendChild(l), this.element = document.createElement('div'), this.filters.forEach(function(e) { + this.element.appendChild(e.render()); + }, this), i.Utility.addClass(this.element, 'natural-gallery-header'), this.element.appendChild(e), this.element; + }, e.prototype.isFiltered = function() { + return null !== this.collection; + }, e.prototype.filter = function() { + var e = null; + this.filters.forEach(function(t) { + t.isActive() && (null == e ? e = t.collection : e = i.Utility.intersectionBy(e, t.collection, 'id')); + }), this.collection = e, this.gallery.refresh(); + }, Object.defineProperty(e.prototype, 'collection', { + get: function() { + return this._collection; + }, + set: function(e) { + this._collection = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'element', { + get: function() { + return this._element; + }, + set: function(e) { + this._element = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'gallery', { + get: function() { + return this._gallery; + }, + set: function(e) { + this._gallery = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'filters', { + get: function() { + return this._filters; + }, + set: function(e) { + this._filters = e; + }, + enumerable: !0, + configurable: !0 + }), e; + }(); + t.Header = o; + }, function(e, t, n) { + 'use strict'; + var i = this && this.__extends || function() { + var e = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(e, t) { + e.__proto__ = t; + } || function(e, t) { + for(var n in t) + t.hasOwnProperty(n) && (e[n] = t[n]); + }; + return function(t, n) { + function i() { + this.constructor = t; + } + e(t, n), t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i); + }; + }(); + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var o = n(0), + l = n(1), + a = function(e) { + function t() { + return null !== e && e.apply(this, arguments) || this; + } + return i(t, e), t.prototype.render = function() { + var e = document.createElement('div'); + o.Utility.addClass(e, 'natural-gallery-searchTerm sectionContainer'), e.appendChild(o.Utility.getIcon('icon-search')), e.appendChild(this.getInput()); + var t = document.createElement('label'); + o.Utility.addClass(t, 'sectionName'), t.textContent = this.header.gallery.options.labelSearch, e.appendChild(t); + var n = document.createElement('span'); + return o.Utility.addClass(n, 'bar'), e.appendChild(n), e; + }, t.prototype.getInput = function() { + var e = this, + t = document.createElement('input'); + return t.setAttribute('required', ''), t.addEventListener('keyup', function(t) { + var n = this; + 27 === t.keyCode && (n.value = ''), e.filter(n.value); + }), t; + }, t.prototype.filter = function(e) { + this.collection = null; + var t = o.Utility.removeDiacritics(e).toLowerCase(); + 0 < t.length && (this.collection = [], this.header.gallery.getOriginalCollection().forEach(function(e) { + var n = o.Utility.removeDiacritics(e.title + ' ' + (e.description ? e.description : '')).toLowerCase(); - + 1 !== n.search(t) && this.collection.push(e); + }, this)), this.header.filter(); + }, t; + }(l.AbstractFilter); + t.SearchFilter = a; + }, function(e, t, n) { + 'use strict'; + var i = this && this.__extends || function() { + var e = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(e, t) { + e.__proto__ = t; + } || function(e, t) { + for(var n in t) + t.hasOwnProperty(n) && (e[n] = t[n]); + }; + return function(t, n) { + function i() { + this.constructor = t; + } + e(t, n), t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i); + }; + }(); + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var o = n(1), + l = n(12), + a = n(0), + r = function(e) { + function t(t) { + var n = e.call(this, t) || this; + return n.header = t, n._categories = [], n; + } + return i(t, e), Object.defineProperty(t.prototype, 'element', { + get: function() { + return this._element; + }, + set: function(e) { + this._element = e; + }, + enumerable: !0, + configurable: !0 + }), t.prototype.render = function() { + if(this.prepare(), !this.element) { + this.element = document.createElement('div'), a.Utility.addClass(this.element, 'natural-gallery-categories sectionContainer'); + var e = document.createElement('div'); + a.Utility.addClass(e, 'sectionName'), e.textContent = this.header.gallery.options.labelCategories, this.element.appendChild(e); + } else + for(var t = this.element.getElementsByTagName('label'), n = t.length - 1; 0 < n; n--) + this.element.removeChild(t.item(n)); + var i = this.element.getElementsByTagName('label')[0]; + return i && i.parentNode.removeChild(i), this.categories.forEach(function(e) { + this.element.appendChild(e.render()); + }, this), this.element; + }, t.prototype.prepare = function() { + var e = []; + this.header.gallery.categories.forEach(function(t) { + e.push(new l.Category(t.id, t.title, this)); + }, this), this.none = new l.Category(-1, this.header.gallery.options.labelNone, this), this.others = new l.Category(-2, this.header.gallery.options.labelOthers, this), this.header.gallery.options.showNone && e.length && e.push(this.none), this.header.gallery.options.showOthers && e.length && e.push(this.others); + var t = []; + this.header.gallery.getOriginalCollection().forEach(function(n) { + (!n.categories || n.categories && 0 === n.categories.length && this.header.gallery.options.showNone) && (n.categories = [this.none]), e.length && a.Utility.differenceBy(n.categories, e, 'id').length === n.categories.length && this.header.gallery.options.showOthers && (n.categories = [this.others]), n.categories.forEach(function(e) { + t.push(new l.Category(e.id, e.title, this)); + }, this); + }, this), e = a.Utility.uniqBy(e, 'id'), t = a.Utility.uniqBy(t, 'id'), this.categories = e.length ? a.Utility.intersectionBy(e, t, 'id') : t; + }, t.prototype.filter = function() { + var e = this.categories.filter(function(e) { + return e.isActive; + }); + if(e.length === this.categories.length) + this.collection = null; + else if(0 === e.length) + this.collection = []; + else { + var t = []; + this.header.gallery.getOriginalCollection().forEach(function(n) { + !n.categories || n.categories && 0 === n.categories.length ? this.none && t.push(n) : n.categories.some(function(i) { + var o = e.some(function(e) { + return i.id === e.id; + }); + if(o) + return t.push(n), !0; + }); + }, this), this.collection = t; + } + this.header.filter(); + }, Object.defineProperty(t.prototype, 'categories', { + get: function() { + return this._categories; + }, + set: function(e) { + this._categories = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'others', { + get: function() { + return this._others; + }, + set: function(e) { + this._others = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t.prototype, 'none', { + get: function() { + return this._none; + }, + set: function(e) { + this._none = e; + }, + enumerable: !0, + configurable: !0 + }), t; + }(o.AbstractFilter); + t.CategoryFilter = r; + }, function(e, t, n) { + 'use strict'; + Object.defineProperty(t, '__esModule', { + value: !0 + }); + var i = n(0), + o = function() { + function e(e, t, n) { + this.filter = n, this._isActive = !0, this.id = e, this.title = t; + } + return e.prototype.render = function() { + var e = this; + this.element = document.createElement('label'); + var t = document.createElement('input'); + t.setAttribute('type', 'checkbox'), t.setAttribute('checked', 'checked'), t.addEventListener('change', function() { + e.isActive = !e.isActive, e.filter.filter(); + }), this.element.appendChild(t); + var n = document.createElement('span'); + n.textContent = this.title; + var o = document.createElement('span'); + i.Utility.addClass(o, 'label'), o.appendChild(i.Utility.getIcon('icon-category')), o.appendChild(n), this.element.appendChild(o); + var l = document.createElement('span'); + return i.Utility.addClass(l, 'bar'), this.element.appendChild(l), this.element; + }, Object.defineProperty(e.prototype, 'id', { + get: function() { + return this._id; + }, + set: function(e) { + this._id = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'title', { + get: function() { + return this._title; + }, + set: function(e) { + this._title = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'isActive', { + get: function() { + return this._isActive; + }, + set: function(e) { + this._isActive = e; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(e.prototype, 'element', { + get: function() { + return this._element; + }, + set: function(e) { + this._element = e; + }, + enumerable: !0, + configurable: !0 + }), e; + }(); + t.Category = o; + }, function(e, i) { + 'use strict'; + Object.defineProperty(i, '__esModule', { + value: !0 + }); + var o; + (function(e) { + var o = Math.ceil; + e.organize = function(e) { + 'natural' === e.options.format ? this.organizeNatural(e.collection, e.bodyWidth, e.options.rowHeight, e.options.margin) : 'square' === e.options.format && e.options.imagesPerRow ? this.organizeSquareByImagesPerRow(e.collection, e.bodyWidth, e.options.imagesPerRow, e.options.margin) : 'square' === e.options.format && e.options.rowHeight && this.organizeSquareByRowHeight(e.collection, e.bodyWidth, e.options.rowHeight, e.options.margin), e.style(); + }, e.simulatePagination = function(e) { + var t = e.options.margin ? e.options.margin : 0, + n = o(e.options.rowHeight * e.defaultImageRatio + t), + i = (e.bodyWidth + t) / (n + t); + return o(i); + }, e.organizeSquareByRowHeight = function(e, l, a, r) { + r || (r = 0); + for(var s, d = o((l + r) / (a + r)), p = t((l + r - d * r) / d), c = l - d * p - (d - 1) * r, m = 0; m < e.length; m++) + s = e[m], s.last = m % d == d - 1, s.row = n(m / d), s.width = n(p), s.height = n(p), s.last && (s.width = n(p + c)); + }, e.organizeSquareByImagesPerRow = function(e, t, o, l) { + l || (l = 0), o || (o = 4); + for(var a, r = (t - (o - 1) * l) / o, s = 0; s < e.length; s++) + a = e[s], a.width = n(r), a.height = n(r), a.last = s % o == o - 1, a.row = n(s / o); + }, e.organizeNatural = function(e, t, n, i, o) { + void 0 === o && (o = null), o || (o = 0), i || (i = 0), n || (n = 300); + for(var l = 1; l <= e.length; l++) { + var a = e.slice(0, l), + r = this.getRowWidth(n, i, a); + if(r >= t) { + this.computeSizes(a, t, i, o), this.organizeNatural(e.slice(l), t, n, i, o + 1); + break; + } else if(l === e.length) { + this.computeSizes(a, null, i, o, n); + break; + } + } + }, e.computeSizes = function(e, o, l, a, r) { + void 0 === r && (r = null); + for(var s = o ? this.getRowHeight(o, l, e) : r, d = this.getRowWidth(s, l, e), p = o ? this.apportionExcess(e, o, d) : 0, c = 0, m = 0; m < e.length; m++) { + var i = e[m], + u = this.getImageRatio(i) * s - p; + c += u - n(u), u = n(u), (1 <= c || m === e.length - 1 && 1 === t(c)) && (u++, c--), i.width = u, i.height = n(s), i.row = a, i.last = m === e.length - 1; + } + }, e.getRowWidth = function(e, t, n) { + return t * (n.length - 1) + this.getRatios(n) * e; + }, e.getRowHeight = function(e, t, n) { + return e / this.getRatios(n) + t * (n.length - 1); + }, e.getRatios = function(e) { + for(var t = this, n = 0, o = 0; o < e.length; o++) + n += t.getImageRatio(e[o]); + return n; + }, e.getImageRatio = function(e) { + return +e.tWidth / +e.tHeight; + }, e.apportionExcess = function(e, t, n) { + var i = (n - t) / e.length; + return i; + }; + })(o = i.Organizer || (i.Organizer = {})); + }]); +}); \ No newline at end of file diff --git a/plugin/gallerypage/natural.css b/plugin/gallerypage/natural.css new file mode 100644 index 0000000..c6aaed8 --- /dev/null +++ b/plugin/gallerypage/natural.css @@ -0,0 +1,81 @@ +.natural-gallery .natural-gallery-body .figure.loading { + background-color: rgba(0, 137, 224, 0.1); +} + +.natural-gallery .bar::before, +.natural-gallery .bar::after { + /*background-color: rgb(0, 137, 224) !important;*/ +} + +.natural-gallery .natural-gallery-body .figure.errored { + background-color: rgba(255, 0, 0, 0.1); +} + + +/* Inactive */ + +.natural-gallery .natural-gallery-searchTerm, +.natural-gallery .natural-gallery-categories label, +.natural-gallery .natural-gallery-images { + border-bottom-color: #999999 !important; +} + + +/* Disabled */ + +.natural-gallery .sectionName, +.natural-gallery .natural-gallery-categories .label, +.natural-gallery .natural-gallery-categories input[type=checkbox]~.label svg, +.natural-gallery .natural-gallery-noresults svg { + color: #999999 !important; + fill: currentColor !important; +} + + +/* Normal */ + +.natural-gallery .natural-gallery-searchTerm input, +.natural-gallery .natural-gallery-categories input[type=checkbox]:checked~.label { + color: #444444 !important; +} + + +/* Highlighted */ + +.natural-gallery .natural-gallery-next svg, +.natural-gallery .natural-gallery-header svg, +.natural-gallery .natural-gallery-categories input[type=checkbox]:checked, +.natural-gallery .natural-gallery-categories label:hover .label, +.natural-gallery .natural-gallery-categories:hover .sectionName, +.natural-gallery .natural-gallery-searchTerm:hover .sectionName, +.natural-gallery .natural-gallery-searchTerm:hover input, +.natural-gallery .natural-gallery-searchTerm:hover .sectionName, +.natural-gallery .natural-gallery-images:hover .sectionName { + /*color: rgb(0, 137, 224) !important;*/ + fill: currentColor !important; +} + +.natural-gallery .natural-gallery-categories input[type=checkbox]:checked~.label svg { + fill: rgb(0, 137, 224) !important; +} + +.natural-gallery .natural-gallery-next { + width: 50px; +} + +.natural-gallery .natural-gallery-next:hover { + background-color: #eeeeee !important; +} + +.natural-gallery .figure.selected .selectBtn { + color: orange !important; +} + +.natural-gallery .button { + background: rgb(0, 137, 224) !important; + border-top: 1px solid #45a8e0; +} + +.natural-gallery .button:hover { + background: rgb(0, 103, 187) !important; +} \ No newline at end of file diff --git a/plugin/imgLazyLoader/yall.min.js b/plugin/imgLazyLoader/yall.min.js new file mode 100644 index 0000000..d13efba --- /dev/null +++ b/plugin/imgLazyLoader/yall.min.js @@ -0,0 +1 @@ +var yall=function(){"use strict";return function(e){var n=(e=e||{}).lazyClass||"lazy",o=e.lazyBackgroundClass||"lazy-bg",t="idleLoadTimeout"in e?e.idleLoadTimeout:200,r=e.observeChanges||!1,i=e.events||{},a=window,s="requestIdleCallback",c="IntersectionObserver",u=["srcset","src","poster"],d=[],l=function(e,t){return d.slice.call((t||document).querySelectorAll(e||"img."+n+",video."+n+",iframe."+n+",."+o))},f=function(n){var t,r,i=n.parentNode;for(var a in"PICTURE"==i.nodeName&&(r=i),"VIDEO"==n.nodeName&&(r=n),t=l("source",r))b(t[a]);b(n),n.autoplay&&n.load();var s=n.classList;s.contains(o)&&(s.remove(o),s.add(e.lazyBackgroundLoaded||"lazy-bg-loaded"))},v=function(e){for(var n in i)e.addEventListener(n,i[n].listener||i[n],i[n].options||void 0);h.observe(e)},b=function(e){u.forEach(function(n){n in e.dataset&&a.requestAnimationFrame(function(){e[n]=e.dataset[n]})})},g=l();if(/baidu|(?:google|bing|yandex|duckduck)bot/i.test(navigator.userAgent))for(var m in g)f(g[m]);else if(c in a&&c+"Entry"in a){var h=new a[c](function(e,o){e.forEach(function(e){if(e.intersectionRatio){var i=e.target;s in a&&t?a[s](function(){f(i)},{timeout:t}):f(i),i.classList.remove(n),o.unobserve(i),(g=g.filter(function(e){return e!=i})).length||r||h.disconnect()}})},{rootMargin:("threshold"in e?e.threshold:200)+"px 0%"});for(var y in g)v(g[y]);r&&new MutationObserver(function(){l().forEach(function(e){g.indexOf(e)<0&&(g.push(e),v(e))})}).observe(l(e.observeRootSelector||"body")[0],e.mutationObserverOptions||{childList:!0,subtree:!0})}}}(); diff --git a/plugin/imgResize/jquery.resizeimagetoparent.min.js b/plugin/imgResize/jquery.resizeimagetoparent.min.js new file mode 100644 index 0000000..bb00484 --- /dev/null +++ b/plugin/imgResize/jquery.resizeimagetoparent.min.js @@ -0,0 +1,8 @@ +/* + * Plugin Name: Resize Image to Parent Container + * + * Author: Christian Varga + * Author URI: http://christianvarga.com + * + */ +(function(a){a.fn.resizeToParent=function(c){var e={parent:"div",delay:100};var c=a.extend(e,c);function f(n){n.css({width:"",height:"","margin-left":"","margin-top":""});var k=n.parents(c.parent).width();var j=n.parents(c.parent).height();var h=n.width();var g=n.height();var m=h/k;if((g/m)是狼是人,日久见心。
    -
    小饭其中的14为期号. +*/ +var mingyan=new Array(); +mingyan.push("{'index':1165,'content':'失眠就像是,一个无人认领的梦,一段言无所向的人生,和一场明知故犯的恋情。你不愿这些发生,但你也清楚这些早晚要发生,就像终于盼来了困意,却也迎来了黎明。
    -
    郑执'}"); +mingyan.push("{'index':1212,'content':'道路虽然拥挤,却是寂寞的,因为它不是被爱的。
    -
    《像个孩子》'}"); +mingyan.push("{'index':563,'content':'如果我不想被悲伤和怀疑打倒,就非得好好吃饭不可。
    -
    方悄悄'}"); +mingyan.push("{'index':1291,'content':'每个人都是孤独发光的星体,至亲、爱人、朋友,构成了我们的星系。星辰会陨落,轨道会迁移,或许再也见不到你。我会记得,你的光芒温暖过我的眼睛。而我,也曾闪耀在你的夜空里。
    -
    路明'}"); +mingyan.push("{'index':855,'content':'我觉得世界上所有事情都在你没有准备好的时候,就开始;在你准备好的时候,就结束了。
    -
    《年华似水》'}"); +mingyan.push("{'index':1068,'content':'天青色等烟雨,而我在等你。
    -
    方文山'}"); +mingyan.push("{'index':435,'content':'不能一直踮着脚爱一个人,重心不稳,撑不了太久的。
    -
    佚名'}"); +mingyan.push("{'index':342,'content':'没有深夜痛哭过的人,不足以谈人生。
    -
    高秉涵'}"); +mingyan.push("{'index':918,'content':'毁掉我们的不是我们所憎恨的东西,而恰恰是我们所热爱的东西。
    -
    尼尔·波兹曼'}"); +mingyan.push("{'index':1258,'content':'信任这种东西有时候挺奇怪的,就是那种你在我背后开了一枪,我依然觉得是枪走了火的感觉。
    -
    暖小团'}"); +mingyan.push("{'index':889,'content':'原来生命从头到尾都是一场浪费,你需要判断的仅仅在于,这次浪费是否是“美好”的。后来,当我每做一件事情的时候,我便问自己,你认为它是美好的吗?如果是,那就去做吧,从这里出发,我们去抵抗命运,享受生活。
    -
    吴晓波'}"); +mingyan.push("{'index':449,'content':'世上只有一种真正的英雄主义,那就是认清生活的真相后依然热爱生活。
    -
    罗曼·罗兰'}"); +mingyan.push("{'index':1164,'content':'有时候我们认为生活背叛了我们,但是很久以后我们才发现,其实是我们自己背叛了自己。
    -
    《西伯利亚的理发师》'}"); +mingyan.push("{'index':717,'content':'所有的悲伤,总会留下一丝欢乐的线索。所有的遗憾,总会留下一处完美的角落。我在冰封的深海,找寻希望的缺口。却在午夜惊醒时,蓦然瞥见绝美的月光。
    -
    《缺口》'}"); +mingyan.push("{'index':1048,'content':'我要一步一步往上爬,在最高点乘着叶片往前飞。小小的天留过的泪和汗,总有一天我有属于我的天。
    -
    周杰伦《蜗牛》'}"); +mingyan.push("{'index':834,'content':'如今的天空空空如也,仿佛被拭去了一切,但那时银河像尘土一样常见。星光让一切都成了迷人的黑白电影。无论你处于人生中的什么位置,无论你心情如何,倘若夜里有一片布满星斗的天空,你就会觉得自己很富有。
    -
    托妮·莫里森'}"); +mingyan.push("{'index':151,'content':'人生唯一可以肯定的失败和最大的悲哀,莫过于从不敢冒险。
    -
    肯恩·格林伍德'}"); +mingyan.push("{'index':1199,'content':'有些人选择先戒备,收到足够关爱之后再友善;我却天生热情爱讨好,一味付出直到受伤害了才学乖。很难讲究竟哪种方式更高明,他们或许杜绝了未知的伤心,我却遇见了你。
    -
    八月长安'}"); +mingyan.push("{'index':235,'content':'很多事不用问值不值得,只用问,它对你来说,是不是有如珍宝。
    -
    柴静'}"); +mingyan.push("{'index':1299,'content':'很想打一个不说话的电话,只要你在电话那端,我可以枕着电话筒就好。
    -
    《蒙马特遗书》'}"); +mingyan.push("{'index':1128,'content':'我喜新厌旧到什么程度呢,每见到你一次就觉得你又新了一点。
    -
    乌冬'}"); +mingyan.push("{'index':876,'content':'那些可以轻而易举伤害我们的人,那些一再以痛楚和挫败试探我们的人,那些举起旗子引导我们走入迷途深林的人,那些在削弱我们的力量的人,那些让我们深深触动和粉碎自我的人,他们才是生命中最有力量的老师。
    -
    安妮宝贝'}"); +mingyan.push("{'index':213,'content':'每一个不曾起舞的日子,都是对生命的辜负。
    -
    尼采'}"); +mingyan.push("{'index':1340,'content':'每当两个人相遇时,实际上有六个人存在。那就是各自眼中的自己,各自在对方眼中的自己和各自真实的自我。
    -
    劳伦斯·彼得'}"); +mingyan.push("{'index':861,'content':'我爱你,不光因为你的样子,还因为,和你在一起时,我的样子。
    -
    罗伊·克利夫特'}"); +mingyan.push("{'index':1251,'content':'失去一个人最伤悲的是,那个人带走了一部分其他人都不认识的你。
    -
    郑执'}"); +mingyan.push("{'index':148,'content':'爱情能够体现一个人的最高智慧和最低道德。
    -
    赵丽华'}"); +mingyan.push("{'index':468,'content':'和很多人告别时,我都会说后会无期,我总觉得有期只是约好了一个久远的时间,而无期也许就会是下一分钟相见。
    -
    韩寒'}"); +mingyan.push("{'index':623,'content':'有时候当一个渺小的人,他不知道自己渺小,他就能做大事。
    -
    《奔腾年代》'}"); +mingyan.push("{'index':1064,'content':'这个世界上,从来就没有最好的,只有最合适的。比如云朵和天空,微风和草地,比如我眼中的你,以及,你眼中的我。
    -
    烟波人长安《我有个恋爱想和你谈下》'}"); +mingyan.push("{'index':303,'content':'我亦只有一个一生,不能慷慨赠与我不爱的人。
    -
    网络'}"); +mingyan.push("{'index':176,'content':'孤独有时是最好的交际。
    -
    约翰·弥尔顿'}"); +mingyan.push("{'index':221,'content':'时空日日过,何曾停留过,猛回头,时光难再回。
    -
    麒麟法师'}"); +mingyan.push("{'index':277,'content':'如果没有老师,学校会是世界上最美好的地方。
    -
    《我们都是坏孩子》'}"); +mingyan.push("{'index':368,'content':'再如何对你细述心事呢,你就是心事。
    -
    叶三'}"); +mingyan.push("{'index':1175,'content':'唯一让我不对自己年少无知生气的方法,就是安慰自己还好不是年老无知。
    -
    贾彬彬'}"); +mingyan.push("{'index':649,'content':'我不会讨人喜欢,我从小就不会讨人喜欢,后来我知道了如何讨人喜欢,我决定就不讨人喜欢。
    -
    崔永元'}"); +mingyan.push("{'index':963,'content':'心里有就有,心里没有才是真的没有了。
    -
    《周渔的火车》'}"); +mingyan.push("{'index':658,'content':'生命是华丽错觉,时间是贼偷走一切,七岁的那一年抓住那只蝉,以为能抓住夏天,十七岁的那年吻过他的脸,就以为和他能永远。
    -
    五月天《如烟》'}"); +mingyan.push("{'index':1239,'content':'改变是为了更好地陪伴。
    -
    韩寒'}"); +mingyan.push("{'index':190,'content':'不到园林,怎知春色几许?
    -
    《牡丹亭》'}"); +mingyan.push("{'index':955,'content':'知足,知爱,才能知生命的朴质本源。人心都满是破洞。洞外是暖腻的浮光,洞内是隐忍的真相。
    -
    王臣'}"); +mingyan.push("{'index':755,'content':'这世界只有一种乡愁,是你不在身边的时候。
    -
    my little airport'}"); +mingyan.push("{'index':329,'content':'人如果总逃避的话,眼神会先于生命失去光彩的。
    -
    《尽管如此,也要活下去》'}"); +mingyan.push("{'index':1201,'content':'我生活在妙不可言的等待中,等待随便哪种未来。
    -
    安德烈·纪德'}"); +mingyan.push("{'index':1138,'content':'爱是一念之差,最幸福的不过是,你曾温柔呼唤,而我恰好有过应答。
    -
    朝小诚'}"); +mingyan.push("{'index':562,'content':'小小羚羊过山冈,九根马尾渡江。想想大地上一石一鸟都不可乱放。有人喊过一嗓。
    -
    张子选《藏北三行诗》'}"); +mingyan.push("{'index':644,'content':'什么都不是爱的对手,除了爱。
    -
    王小波'}"); +mingyan.push("{'index':582,'content':'你呀,你别再关心灵魂了,那是神明的事。你所能做的,是些小事情,诸如热爱时间,思念母亲,静悄悄地做人,像早晨一样清白。
    -
    《我是你流浪过的一个地方》'}"); +mingyan.push("{'index':969,'content':'我想体会螺旋般下降的命运,想将自己置于无解也没有退路之地,在不断的主动放弃中握出一个拳头的自我。
    -
    淡豹'}"); +mingyan.push("{'index':18,'content':'台下谁看到了童年,台上谁虚构了童年,爸爸妈妈说,唇红齿白真让人爱怜。
    -
    金丹华'}"); +mingyan.push("{'index':523,'content':'一弦是酸楚的泪,二弦是方糖,三弦点燃篝火,四弦黑色的光,五弦那么的忧伤,六弦有山一般的信仰。
    -
    大冰'}"); +mingyan.push("{'index':1050,'content':'人生就是一列开往坟墓的列车,路途上会有很多站,很难有人可以自始至终陪着走完。当陪你的人要下车时,即使不舍也该心存感激,然后挥手道别。
    -
    宫崎骏'}"); +mingyan.push("{'index':1220,'content':'今年的我们已与去年不同,我们的爱人亦是如此。如果变化中的我们依旧爱着那个变化中的人,这可真是个令人欣喜的意外。
    -
    毛姆'}"); +mingyan.push("{'index':39,'content':'兄弟曾离去,似在公元前。今日归故里,不知是何年。
    -
    老树画画'}"); +mingyan.push("{'index':689,'content':'愿你比别人更不怕一个人独处,愿日后谈起时你会被自己感动。
    -
    刘同《你的孤独,虽败犹荣》'}"); +mingyan.push("{'index':1079,'content':'这个世界上最痛苦的离别方式是,从你们分开的那一刻开始,你没有办法再次走进他的生活,他却仍在你的生活中无处不在。
    -
    王宇昆'}"); +mingyan.push("{'index':1065,'content':'我是个平常的人,我不能盼望在人海中值得你一转眼的注意。
    -
    《爱的灵感》'}"); +mingyan.push("{'index':90,'content':'风雨雷电,日月星辰,他们一定只是为了赶来迎接你的到来。
    -
    一言'}"); +mingyan.push("{'index':1343,'content':'人总有想哭的欲望,读什么故事、听什么歌、看什么电影,只是在找一个借口。
    -
    苏更生'}"); +mingyan.push("{'index':739,'content':'恋爱的纪念物,从来就不是那些你送给我的手表和项链,甚至也不是那些甜蜜的短信和合照。恋爱最珍贵的纪念物,是你留在我身上的,如同河川留给地形的,那些你对我造成的改变。
    -
    蔡康永'}"); +mingyan.push("{'index':590,'content':'不要忘记人生是要战斗到死。
    -
    芥川龙之介'}"); +mingyan.push("{'index':1038,'content':'一个人做的梦,就只能是个梦;一群人怀着同一个梦想,便是真实。
    -
    约翰·列侬'}"); +mingyan.push("{'index':69,'content':'今年没几个梦了,每个都必须做好。
    -
    史航'}"); +mingyan.push("{'index':236,'content':'旅行的一大益处是:客中种种辛苦不便,叫人回家觉得平时住厌了的家挺好。
    -
    思果'}"); +mingyan.push("{'index':166,'content':'我今晨坐在窗前,世界如一个路人似的,停留了一会,向我点点头又走过去了。
    -
    泰戈尔《飞鸟集》'}"); +mingyan.push("{'index':965,'content':'大部分人在二三十岁就已经死去了,因为过了这个年龄,他们只是自己的影子,此后的余生则是在模仿自己中度过,更机械,更装腔作势地重复他们在有生之年的所作所为,所思所想,所爱所恨。
    -
    罗曼·罗兰'}"); +mingyan.push("{'index':87,'content':'大脑的速度一定是超时间的,所以做梦才可以梦到一生。
    -
    察察'}"); +mingyan.push("{'index':1254,'content':'在我看来,一个人仿佛是一个包得紧紧的蓓蕾。一个人所读的书或所做的事,在大多数情况下,对他毫无作用。然而,有些事情对一个人来说确实具有一种特殊意义,这些具有特殊意义的事情使得蓓蕾绽开一片花瓣,花瓣一片片接连开放,最后便开成一朵鲜花。
    -
    毛姆'}"); +mingyan.push("{'index':682,'content':'我喜爱你忽然捂住我喋喋不休的口,教我沉默。
    -
    张定浩'}"); +mingyan.push("{'index':733,'content':'九月里,平淡无聊,一切都好,只缺烦恼。
    -
    王菲《浮躁》'}"); +mingyan.push("{'index':292,'content':'红尘滚滚,我们这种小人物也就靠着爱过让自己光辉伟岸了。
    -
    张晓晗《刺青》'}"); +mingyan.push("{'index':54,'content':'不管黑猪白猪,都是猪。不管笨猪蠢猪,在一起就不孤独。
    -
    韩寒'}"); +mingyan.push("{'index':201,'content':'我们即使发了一千次短信,心与心之间大概也只能靠近一厘米。
    -
    《秒速五厘米》'}"); +mingyan.push("{'index':486,'content':'有些人,才遇见一下子,就好像认识了很久似的,什么事都想和他说。
    -
    《你好,陌生人》'}"); +mingyan.push("{'index':152,'content':'我们要占有这个世界干什么呢?它本就是我们。
    -
    何禾'}"); +mingyan.push("{'index':666,'content':'“为什么我和我爱的人,都选择了不在乎我们的人?”“因为我们只接受自己认为配得上的爱。”
    -
    《壁花少年》'}"); +mingyan.push("{'index':1108,'content':'我开始学会逢场作戏,虽然很多都是露水情缘,不过没关系,哪来那么多一生一世。
    -
    《2046》'}"); +mingyan.push("{'index':697,'content':'这世间有一种使我们感到幸福的可能性:在最遥远的、最陌生的地方发现一个故乡,并对那些似乎极隐秘和最难接近的东西产生热爱。
    -
    赫尔曼·黑塞'}"); +mingyan.push("{'index':73,'content':'开始终结总是没变改,天边的你漂泊在白云外。
    -
    《一生所爱》'}"); +mingyan.push("{'index':225,'content':'每个人都在自己的生命中,孤独地过冬。
    -
    刘亮程'}"); +mingyan.push("{'index':583,'content':'我为你翻山越岭,却无心看风景。
    -
    林夕'}"); +mingyan.push("{'index':406,'content':'今天将要结束,明天也将结束,难以结束的是昨天。
    -
    安东尼奥·波契亚'}"); +mingyan.push("{'index':973,'content':'如今虽然自甘寂寞,远避山上,但却依然时常会有些身不由己的悲哀。可是最近我已经懂了,人生本来就是这样子的。
    -
    古龙'}"); +mingyan.push("{'index':1000,'content':'很奇怪,我们不屑与他人为伍,却害怕自己与众不同。
    -
    保罗·柯艾略'}"); +mingyan.push("{'index':947,'content':'诚实的生活方式,其实是按照自己身体的意愿行事,饿的时候才吃饭,爱的时候不必撒谎。
    -
    《霍乱时期的爱情》'}"); +mingyan.push("{'index':957,'content':'我们花了很多时间来找寻最便捷的沟通方式,却忘了面对面的一个眼神一句话才是最贴心的交流。
    -
    《不过,一场生活》'}"); +mingyan.push("{'index':1334,'content':'祝你遇到那个对的人和那件对的事,让之前种种狼狈不堪都成伏笔。
    -
    方慧'}"); +mingyan.push("{'index':853,'content':'不管全世界所有人怎么说,我都认为自己的感受才是正确的。无论别人怎么看,我绝不打乱自己的节奏。喜欢的事自然可以坚持,不喜欢怎么也长久不了。
    -
    村上春树'}"); +mingyan.push("{'index':109,'content':'世间所有的相遇,都是久别重逢。
    -
    《一代宗师》'}"); +mingyan.push("{'index':667,'content':'如果你自己没有改变,那么你在任何地方都是痛苦的。如果你没有什么地方要去,那么你就到达了。
    -
    《去印度学倒立》'}"); +mingyan.push("{'index':436,'content':'生活和电影不一样,生活难多了。
    -
    《天堂电影院》'}"); +mingyan.push("{'index':524,'content':'我这半世未算赶,何妨迷路看风光。
    -
    黄伟文'}"); +mingyan.push("{'index':1373,'content':'时光驯服一切,我与往事之间,像回声,再怎么千回百转,终究消失在山谷。
    -
    七堇年'}"); +mingyan.push("{'index':790,'content':'我一直以为最糟糕的情况是你离开我,其实最令我难过的,是你不快乐。
    -
    《怪物旅社》'}"); +mingyan.push("{'index':580,'content':'爱情里最需要的,是想象力。每个人必须用尽全力和全部的想象力形塑对方,并丝毫不向现实低头。那么,当双方的幻想相遇,就再也没有比这更美的景象了。
    -
    罗曼·加里'}"); +mingyan.push("{'index':1072,'content':'一个远行的人要寻找什么呢?可能他自己也不知道,他只是寻找,张望,直到最后,寻找成了他的命运。就像我在你身上,寻找我的命运,那不能把握没法参透的一部分,就是我们的真爱。
    -
    田艺苗《旅人》'}"); +mingyan.push("{'index':613,'content':'你是什么人便会遇上什么人;你是什么人便会选择什么人。总是挂在嘴上的人生,就是你的人生,人总是很容易被自己说出的话所催眠。我多怕你总是挂在嘴上的许多抱怨,将会成为你所有的人生。
    -
    竹久梦二'}"); +mingyan.push("{'index':936,'content':'夜里不睡的人,白天多多少少总有什么逃避掩饰的吧。白昼解不开的结,黑夜慢慢耗。
    -
    雷蒙德·卡佛'}"); +mingyan.push("{'index':1154,'content':'有多少场失恋是由你喜欢上一个不喜欢你的人而开始的。
    -
    暖小团'}"); +mingyan.push("{'index':432,'content':'我还年轻,我渴望上路。
    -
    杰克·凯鲁亚克《在路上》'}"); +mingyan.push("{'index':578,'content':'真正的绝望跟痛苦、跟悲伤、跟惨痛都没有什么关系,真正的绝望让人心平气和。
    -
    刘瑜《适应孤独,就像适应一种残疾》'}"); +mingyan.push("{'index':896,'content':'你跳不出这个世界,是因为你不知道这个世界有多大,一旦你知道了,你就超出了它。
    -
    今何在'}"); +mingyan.push("{'index':1267,'content':'旷日持久不容易,一切物事的美好在于没时间变坏。
    -
    李碧华'}"); +mingyan.push("{'index':1097,'content':'在无处落脚的人海里,你的停靠成为岛屿,成为陆地,成为具体。
    -
    陈粒《远辰》'}"); +mingyan.push("{'index':798,'content':'生命里第一个爱恋的对象应该是自己,写诗给自己,与自己对话,在一个空间里安静下来,聆听自己的心跳与呼吸,我相信,这个生命走出去时不会慌张。相反的,一个在外面如无头苍蝇乱闯的生命,最怕孤独。
    -
    蒋勋'}"); +mingyan.push("{'index':1152,'content':'应该的事有很多,牙刷应该放在牙缸里,枕头应该放在床上,西瓜应该切开再吃,炒菜应该最后放盐,可是,在一起,却未必。
    -
    烟波人长安'}"); +mingyan.push("{'index':466,'content':'一个人工作,一个人看书,一个人吃饭,一个人看着电视乐,一个人睡觉。感觉寂寞难耐的,定会找个人同住吧。但我并没觉得寂寞难耐。要说难耐的,反倒是想一个人的时候无法一个人。
    -
    山本文绪'}"); +mingyan.push("{'index':1030,'content':'很久以后我才明白,想让你记住我,并不是需要在告别的时候大声念三遍我的名字,而是拼命向上与你等高,让你一侧过头一转过身就会知道,我是谁。
    -
    张瑞琪'}"); +mingyan.push("{'index':44,'content':'每当和自己擦不出火花,就开始痛恨太安逸。
    -
    金怡玉玲'}"); +mingyan.push("{'index':1136,'content':'星星发亮是为了让每一个人有一天都能找到属于自己的星星。
    -
    《小王子》'}"); +mingyan.push("{'index':718,'content':'我和这个世界不熟,这并非是我虚假的原因。我依旧有很多真诚,离不开,放不下,活下去,爱得起。
    -
    等待如果'}"); +mingyan.push("{'index':593,'content':'你是我温暖的手套,冰冷的啤酒,带着阳光味道的衬衫,日复一日的梦想。
    -
    《恋爱的犀牛》'}"); +mingyan.push("{'index':422,'content':'所谓孤独,就是你面对的那个人,他的情绪和你自己的情绪不在同一个频率。
    -
    理查德·耶茨'}"); +mingyan.push("{'index':332,'content':'每天呆在这里,会把这里当成是全世界,不再追寻,不再拥有。你得离开一阵子。
    -
    《天堂电影院》'}"); +mingyan.push("{'index':1371,'content':'当我7岁时,我感到我父亲是天底下最聪明的人;当我14岁时,我感到我父亲是天底下最不通情达理的人;当我21岁时,我忽然发现我父亲还是很聪明的。
    -
    马克·吐温'}"); +mingyan.push("{'index':502,'content':'多和家人聊聊天吧,别老玩我们。
    -
    手机和电视'}"); +mingyan.push("{'index':570,'content':'我所认为最深沉的爱,莫过于分开以后,我将自己,活成了你的样子。
    -
    《这个杀手不太冷》'}"); +mingyan.push("{'index':1377,'content':'使我们视而不见的光亮,对于我们就是黑暗。当我们清醒时,曙光才会破晓。来日方长,太阳只是颗启明星。
    -
    《瓦尔登湖》'}"); +mingyan.push("{'index':347,'content':'你不能把这个世界,让给你所鄙视的人。
    -
    安·兰德《源泉》'}"); +mingyan.push("{'index':392,'content':'什么都无法舍弃的人,什么都无法改变。
    -
    《进击的巨人》'}"); +mingyan.push("{'index':530,'content':'当我爱你时,风中的松树,要以他们丝线般的叶子唱你的名字。
    -
    聂鲁达'}"); +mingyan.push("{'index':862,'content':'我拒绝更好更圆的月亮,拒绝未知的疯狂,拒绝声色的张扬,不拒绝你。
    -
    陈粒'}"); +mingyan.push("{'index':243,'content':'旅行是为了迷路,迷路是为了遇上美好。
    -
    马家辉'}"); +mingyan.push("{'index':553,'content':'我们都是白痴,才会这样钻牛角尖。不管是什么狗屁事,我们总是,总是,总是忘不了我们那点叫人作呕的、微不足道的自我。
    -
    塞林格'}"); +mingyan.push("{'index':278,'content':'我的妻子很不成熟。当我在浴缸里洗澡的时候,她会走进来弄沉我的船。
    -
    伍迪·艾伦'}"); +mingyan.push("{'index':1194,'content':'我们曾如此渴望命运的波澜,到最后才发现,人生最曼妙的风景,竟是内心的淡定与从容。我们曾如此期盼外界的认可,到最后才知道,世界是自己的,与他人毫无关系。
    -
    网络'}"); +mingyan.push("{'index':609,'content':'不介意孤独,比爱你舒服。
    -
    林夕'}"); +mingyan.push("{'index':573,'content':'这便是爱情:大概一千万人之中,才有一双梁祝,才可以化蝶。其他的只化为蛾、蟑螂、蚊蚋、苍蝇、金龟子……就是化不成蝶,并无想象中的美丽。
    -
    《胭脂扣》'}"); +mingyan.push("{'index':218,'content':'对于苹果来说,被大口吃掉才是最重要的。
    -
    郭小寒'}"); +mingyan.push("{'index':70,'content':'远行前,请随我在纷乱的岁月,再羁留一会儿吧。
    -
    钟鸣'}"); +mingyan.push("{'index':1069,'content':'跟爱过的人,如果对方已不再爱,即便你还有情,也要永远保持一个合适的距离。这是一种对已然逝去之爱的尊重,也是你们之间,最好的结局。
    -
    《不婚女王》'}"); +mingyan.push("{'index':1018,'content':'你那么擅长安慰他人,一定度过了很多自己安慰自己的日子吧。
    -
    陈亚豪'}"); +mingyan.push("{'index':421,'content':'你知道雪为什么是白色的吗?因为它忘记了自己曾经的颜色。
    -
    《叛逆的鲁鲁修》'}"); +mingyan.push("{'index':1324,'content':'作为一个平凡人,无论多辛苦的事,对外人都是不足道的。所以爱人啊,要有爱人,也要成为被爱的人。要创造魔法,要让微不足道变得重若千钧,要让细枝末节变成缠盘硕枝。
    -
    大斯'}"); +mingyan.push("{'index':776,'content':'到死之前,我们都是需要发育的孩子,从未长大,也从未停止生长。就算改变不了这个世界,这个世界也别想将我们改变。
    -
    大冰'}"); +mingyan.push("{'index':793,'content':'不要愁老之将至,你老了一定很可爱。而且,假如你老了十岁,我当然也同样老了十岁,世界也老了十岁,上帝也老了十岁,一切都是一样。
    -
    朱生豪'}"); +mingyan.push("{'index':427,'content':'春天还没有来,我怎么能先你老去。
    -
    剃度尘欢'}"); +mingyan.push("{'index':1312,'content':'很多人觉得“爱”是比“喜欢”严重的事,不能轻易说出口。但我就是要说,我爱你。如果不能让你动心,起码吓吓你,让你无法忘记。
    -
    乌冬'}"); +mingyan.push("{'index':926,'content':'你若咬定了人只活一次,便更没有随波逐流的理由。
    -
    帕蒂·史密斯'}"); +mingyan.push("{'index':796,'content':'如果全世界都对你恶语相加,我就对你说上一世情话。
    -
    马頔《傲寒》'}"); +mingyan.push("{'index':635,'content':'我何尝不想设计自己的命运,但仅凭这点任性,是撑不过余生的。
    -
    陶立夏'}"); +mingyan.push("{'index':906,'content':'这是应该听到爱情瞬间的时刻,因为我们在彼此的眼睛里看到了故乡。
    -
    拉斯克许勒《致米尔》'}"); +mingyan.push("{'index':1131,'content':'十二年来,有笑泪,有阴晴,相伴一场,人来人往,只是日常。
    -
    蔡康永'}"); +mingyan.push("{'index':138,'content':'人类之所以有进步的主要原因是下一代不听上一代的话。
    -
    倪匡'}"); +mingyan.push("{'index':1219,'content':'你讨厌的人我绝不和他做朋友,你说别人坏话我也附和,你分手的男友我见一次打一次。别问为什么。这就是女生之间的友情,我不知道能陪你多久,看你嫁人成家当妈妈。愚笨的我,持之以恒地做这些愚笨的事,为了那句逃课后漫不经心说出“一辈子做朋友”的承诺。
    -
    张晓晗'}"); +mingyan.push("{'index':1089,'content':'抱紧你的我,比国王富有。失去你的我,比乞丐落魄。
    -
    《国王与乞丐》'}"); +mingyan.push("{'index':630,'content':'头脑可以接受劝告,但心却不能,而爱,因为没学地理,所以不识边界。
    -
    卡波特'}"); +mingyan.push("{'index':1058,'content':'我不知道世间有什么是确定不变的,我只知道,只要一看到星星,我就会开始做梦。
    -
    文森特·梵高'}"); +mingyan.push("{'index':595,'content':'一生至少该有一次,为了某个人而忘了自己,不求有结果,不求同行,不求曾经拥有,甚至不求你爱我,只求在我最美的年华里,遇到你。
    -
    徐志摩'}"); +mingyan.push("{'index':323,'content':'萍水相逢的滋味很难受,我们成了好朋友,却不可避免要永远分手。
    -
    《中央车站》'}"); +mingyan.push("{'index':854,'content':'每个人的眼泪不一样,但想哭的念头是一样的。
    -
    《推拿》'}"); +mingyan.push("{'index':137,'content':'交流是通往爱的唯一途径。
    -
    卡森·麦卡勒斯'}"); +mingyan.push("{'index':161,'content':'如果你是条船,漂泊就是你的命运,可别靠岸。
    -
    北岛'}"); +mingyan.push("{'index':1027,'content':'其实从未迷路,只是有人孤独。
    -
    《远在天边》'}"); +mingyan.push("{'index':223,'content':'我们一路奋战,不是为了改变世界,而是不让世界改变我们。
    -
    《熔炉》'}"); +mingyan.push("{'index':673,'content':'你一直在练习微笑,倒不是说变成了自己讨厌的人,而是在世故中变得沉稳,总不能累了就放弃,痛了就喊疼。相信别人不如依赖自己,他人报以伤害,时光会给你温暖。
    -
    张皓宸'}"); +mingyan.push("{'index':746,'content':'童年是漫无边际的,劳动是光荣的,长大成人是迫切的。
    -
    李娟'}"); +mingyan.push("{'index':1286,'content':'如果你过得不幸福,我所做的一切才是徒劳。
    -
    东野圭吾'}"); +mingyan.push("{'index':484,'content':'这世间,唯有梦想与好姑娘不可辜负。
    -
    郭斯特'}"); +mingyan.push("{'index':1133,'content':'风可以吹起一大张白纸,却无法吹走一只蝴蝶,因为生命的力量在于不顺从。
    -
    冯骥才'}"); +mingyan.push("{'index':488,'content':'不管你了不了解这个世界,这个世界都不会让着你。
    -
    《来自星星的你》'}"); +mingyan.push("{'index':1226,'content':'当你不够强大的时候,你想要一个小小的机会,都没有。当你足够牛逼的时候,你的面前有一万个机会,你挡都挡不住。当你足够优秀的时候,你想要的一切都会主动来找你。
    -
    咪蒙'}"); +mingyan.push("{'index':261,'content':'在薄情的世界里深情地活着,胜之不武。
    -
    曾奇峰'}"); +mingyan.push("{'index':629,'content':'我不要孤独,孤独是丑的,令人作呕的,灰色的。我要和你相通,共存,还有你的温暖,都是迷人的啊!可惜我不漂亮。
    -
    王小波《爱你就像爱生命》'}"); +mingyan.push("{'index':1177,'content':'因为遇到你,我开始觉得孤单了。原来这世界上依旧有我想要得到的东西,一念之间,意识到自己活着。活着,真是寂寞。
    -
    陶立夏'}"); +mingyan.push("{'index':200,'content':'一个人拥有此生此世是不够的,他还应该拥有诗意的世界。
    -
    王小波'}"); +mingyan.push("{'index':88,'content':'不如我们猜一猜,末日和明天哪个先到来。
    -
    「一个」工作室全体'}"); +mingyan.push("{'index':404,'content':'哪里会有人喜欢孤独,不过是不喜欢失望罢了。
    -
    村上春树'}"); +mingyan.push("{'index':299,'content':'海明威说,这是个美好的世界,值得我们为之奋斗。我同意后半句。
    -
    《七宗罪》'}"); +mingyan.push("{'index':495,'content':'是谁把空中明月,捻得如钩?待我来抟钩作镜,看永久团圆,能否?
    -
    刘大白'}"); +mingyan.push("{'index':224,'content':'我们的小缺点让我们找到对的人。
    -
    《心灵捕手》'}"); +mingyan.push("{'index':534,'content':'听到一些事,明明不相干的,也会在心中拐好几个弯,想到你。
    -
    张爱玲'}"); +mingyan.push("{'index':129,'content':'但愿爱像割过的草地一样会重新长出来。应该以别样的方式生长,好比小孩子换牙,好比头发,好比指甲。它应该按自己的意愿生长。
    -
    赫塔·米勒'}"); +mingyan.push("{'index':1017,'content':'我为自己分分秒秒地疏漏万物向时间致歉。我为将新欢视为初恋向旧爱致歉。
    -
    辛波斯卡《在一颗小星星下》'}"); +mingyan.push("{'index':738,'content':'越是低谷的时候,越能看出一个人的本质。最差的结果无非是失败,有人等着失败,有人骂着失败,有人尽了力仍然失败。在这样的环境里,心态就是每个人自身的光,你颓唐就是颓唐,你顽强就是顽强。
    -
    刘同'}"); +mingyan.push("{'index':504,'content':'唯一有效的安慰方式,就是你在我身边。
    -
    张嘉佳'}"); +mingyan.push("{'index':794,'content':'人们在狭小的生活圈里互相模仿。为什么他们不尽量远离些,做个真实的自己呢?
    -
    大卫·梭罗《远行》'}"); +mingyan.push("{'index':1070,'content':'也许,机遇不会出现在前进的路上,但返回不是我们的方向。
    -
    长期新'}"); +mingyan.push("{'index':1248,'content':'我们都是一群多么可怜的人,喜欢的人得不到,得到的不珍惜,在一起的怀疑,失去的怀念,怀念的想相见,相见的恨晚,终其一生,都满是遗憾。
    -
    牛轰轰'}"); +mingyan.push("{'index':714,'content':'当我沉默地面对着你,你又怎么知道我曾在心里对你说了多少话。当我一成不变地站在你面前,你又怎么知道我内心早已为你千回百转。
    -
    里则林'}"); +mingyan.push("{'index':1174,'content':'其实我希望你对我说谎,因为人只会为了非常害怕失去一样东西才说谎。
    -
    奥尔罕·帕慕克'}"); +mingyan.push("{'index':1295,'content':'我渴望能见你一面,但请你记得,我不会开口要求见你。这不是因为骄傲,你知道我在你面前毫无骄傲可言,而是因为,唯有你也想见我的时候,我们见面才有意义。
    -
    《越洋情书》'}"); +mingyan.push("{'index':498,'content':'我唯一锲而不舍,愿意以自己的生命去努力的,只不过是保守我个人的心怀意念,在我有生之日,做一个真诚的人,不放弃对生活的热爱和执着。
    -
    三毛'}"); +mingyan.push("{'index':968,'content':'你的谎言,其实往往就是你的梦想。
    -
    大冰'}"); +mingyan.push("{'index':850,'content':'草在结它的种子,风在摇它的叶子。我们站着,不说话,就十分美好。
    -
    顾城《门前》'}"); +mingyan.push("{'index':589,'content':'生命里面很多事情,沉重婉转至不可说。我想你明白。正如我想我明白你。
    -
    黄碧云'}"); +mingyan.push("{'index':753,'content':'那时你还是一个孩子,你认为你拥有了许多朋友,但事实上,你拥有的仅仅是伙伴而已。所谓的伙伴就是那些站在你身边,看着你长大成人,然后又渐渐淡出你的生活的人。于是,你开始了新的生活。
    -
    朱利安·巴恩斯'}"); +mingyan.push("{'index':1311,'content':'一个尊重商业和科技的社会总是会进步的。
    -
    韩寒 有事相告上海发布会'}"); +mingyan.push("{'index':624,'content':'我要花一生的精力去忘记,去与想念与希望斗争;事情从来都不公平,我在玩一场必输的赌局,赔上一生的情动。
    -
    黄碧云'}"); +mingyan.push("{'index':1170,'content':'回忆会从内侧温暖你的身体,同时又从内侧剧烈切割你的身体。
    -
    《海边的卡夫卡》'}"); +mingyan.push("{'index':713,'content':'爱是一颗幸福的子弹,没有爱就没有伤害。
    -
    汪峰《爱是一颗幸福的子弹》'}"); +mingyan.push("{'index':41,'content':'世界荆棘,无鹿可逃。
    -
    张冠仁'}"); +mingyan.push("{'index':81,'content':'十分羡慕那些算盘打得特别精的人,而我却连计算器都会按错。
    -
    徐大发'}"); +mingyan.push("{'index':68,'content':'这世界上不合理的事太多了。浴缸洗完我,我还要洗浴缸。
    -
    周云哲'}"); +mingyan.push("{'index':645,'content':'在失去你的风景里面,你却占据了每一条街。
    -
    《步步》'}"); +mingyan.push("{'index':1274,'content':'愿生活里有热汤和甜食,背包里有纸,笔,书。书里故事如迷宫,迷宫通向海。沟通使误解消除,善意如星辰。枝头常有喜鹊歇脚,目明心亮。走很远的路回家,混沌中生出新的自己。
    -
    吕彦妮'}"); +mingyan.push("{'index':519,'content':'所有花都为你开,所有景物也为了你安排,我们是如此的不同,肯定前世就已经深爱过。
    -
    伍佰'}"); +mingyan.push("{'index':1132,'content':'如果我能少喜欢你一点,你会发现我是个特别好的人。有时候,爱会让人面目可憎。
    -
    八月长安'}"); +mingyan.push("{'index':195,'content':'我们要飞到那遥远地方,看一看,这世界并非那么凄凉。
    -
    《张三的歌》'}"); +mingyan.push("{'index':1230,'content':'你看,浪漫的海绵体生物会交媾,冰冷海湾的生蚝、鳕鱼、水母都分男女,电鳗忍着相互电击的痛接吻。如果可以只徇着荷尔蒙恋爱,我和你一定比现在更快乐。
    -
    木村夏'}"); +mingyan.push("{'index':207,'content':'朋友知道我心中的歌,在我忘记时唱给我听。
    -
    多娜·罗伯茨'}"); +mingyan.push("{'index':779,'content':'我一生中最幸运的两件事,一件是时间终于将我对你的爱消耗殆尽。一件是很久很久以前有一天,遇见你。
    -
    顾漫'}"); +mingyan.push("{'index':1180,'content':'当一首歌跟你的某段经历某场感情纠缠在一起的时候,你就再也没法自主地控制情绪。只要这个旋律响起,你都可能会掉眼泪。咖啡馆听到会哭出来,商场里逛街会哭出来,甚至在家里洗澡放歌都可能会掉眼泪。不是忘不掉什么人,只是始终对自己那场无果的付出和被浪费的太炽热的爱耿耿于怀。
    -
    暖小团'}"); +mingyan.push("{'index':140,'content':'旧年山中知雪重,新春世间觉情浓。「一个」工作室祝大家春节快乐!'}"); +mingyan.push("{'index':390,'content':'旅行是消除无知和仇恨的最好方法。
    -
    马克·吐温'}"); +mingyan.push("{'index':1277,'content':'我们人生中最艰巨的任务就是自我分析、试图领悟我们的人性并化解其中的一切纷争。
    -
    罗伯特·麦基《故事》'}"); +mingyan.push("{'index':1316,'content':'树在。山在。大地在。岁月在。我在。你还要怎样更好的世界?
    -
    《我在》'}"); +mingyan.push("{'index':537,'content':'所有的爱情都是悲哀的,可尽管悲哀,依然是我们知道的最美好的事。
    -
    廖一梅'}"); +mingyan.push("{'index':52,'content':'长假结束,万物复苏。今日宜开张。
    -
    小饭'}"); +mingyan.push("{'index':545,'content':'我发现一个人在放弃给别人留下好印象的负担之后,原来心里会如此踏实。一个人不必再讨人欢喜,就可以像我此刻这样,停止受累。
    -
    严歌苓'}"); +mingyan.push("{'index':56,'content':'秋日渐短,木马来袭,请翼装飞行,勿电话会议。
    -
    蔡蕾'}"); +mingyan.push("{'index':256,'content':'我在人生道路上迷失了方向。
    -
    《火影忍者》'}"); +mingyan.push("{'index':193,'content':'不乱于心,不困于情,不畏将来,不念过往,如此,安好。
    -
    丰子恺'}"); +mingyan.push("{'index':369,'content':'我并不是每次吃完饭就看电视,有时我边吃边看电视,生活中有些改变会增加乐趣。
    -
    《加菲猫》'}"); +mingyan.push("{'index':319,'content':'这世界不只有眼前的苟且,还有诗与远方。
    -
    高晓松'}"); +mingyan.push("{'index':53,'content':'再见,再次见到。嘿,朋友,我们又见面了。
    -
    小饭'}"); +mingyan.push("{'index':209,'content':'爱是这么短,遗忘是这么长。
    -
    巴勃鲁•聂鲁达'}"); +mingyan.push("{'index':63,'content':'如果你想让人们羡慕你,那么你就应表现出一副为你的悲哀和羞惭感到自豪的样子。
    -
    列夫·舍斯托夫'}"); +mingyan.push("{'index':1375,'content':'自学者和学生的区别,不在于知识的广度,而在于生命力和自信心的差异。
    -
    米兰·昆德拉'}"); +mingyan.push("{'index':429,'content':'大部分的痛苦,都是不肯离场的结果,没有命定的不幸,只有死不放手的执着。
    -
    素黑'}"); +mingyan.push("{'index':910,'content':'我好久没有以小步紧跑去迎接一个人的那种快乐了。
    -
    木心《琼美卡随想录》'}"); +mingyan.push("{'index':1142,'content':'一个人生活,觉得日子都变长了。
    -
    小津安二郎'}"); +mingyan.push("{'index':531,'content':'这世界不会被那些作恶多端的人毁灭,而是冷眼旁观、选择保持缄默的人。
    -
    爱因斯坦'}"); +mingyan.push("{'index':418,'content':'生活总会给你答案,但不会马上把一切都告诉你。
    -
    马德'}"); +mingyan.push("{'index':1186,'content':'我们共同经历过的每一件小事,在当时看来也许毫无意义,但注定会成为彼此毕生的秘密,因为在未来的日子里,哪怕各自努力想要诉说给任何一个外人听,都必然无法还原当时的景状,即使能说得清眼里曾看到的,也说不清心里曾掠过的。
    -
    郑执'}"); +mingyan.push("{'index':1333,'content':'人,即使活到八九十岁,有母亲便可以多少还有点孩子气。失了慈母便像花插在瓶子里,虽然还有色有香,却失去了根。有母亲的人,心里是安定的。
    -
    老舍'}"); +mingyan.push("{'index':1135,'content':'我们的爱若是错误,愿你我没有白白受苦。
    -
    《领悟》'}"); +mingyan.push("{'index':1007,'content':'美貌、青春、财富、甚至爱情本身,都不能让深得上帝恩宠的人免于焦虑和痛苦,远离哀愁,也无法让他们避免失去自己最爱的东西。因为,一生中,有些雨必然得下。
    -
    《小妇人》'}"); +mingyan.push("{'index':676,'content':'如果我又遇见你,隔着岁月悠长。我将如何向你致意?以眼泪,以沉默。
    -
    拜伦。'}"); +mingyan.push("{'index':355,'content':'生命里的VIP,总是让你甘愿把自己的原则一再打折。
    -
    一蚊丁'}"); +mingyan.push("{'index':923,'content':'旅行的乐趣是什么,就是即使到了几乎一无所知的地方,那里也必定有耀眼之处,而自己要亲自将这些光芒一个个拾起、收集起来。
    -
    松浦弥太郎'}"); +mingyan.push("{'index':465,'content':'这世界不是那么好,也不是那么坏。2013,白白。
    -
    「一个」工作室'}"); +mingyan.push("{'index':1023,'content':'错误的开始,未必不能走到完美的结束,人生没有什么事是一定的。都是在碰,在等,在慢慢寻找。
    -
    《流苏与娜拉》'}"); +mingyan.push("{'index':174,'content':'我们今天在此是因为这是匹永不投降的马,就算命运以毫厘之差击败了它。
    -
    《奔腾年代》'}"); +mingyan.push("{'index':980,'content':'阳光照耀大地,绿叶涌出树枝,犹如电影镜头中万物飞快生长。那熟悉的信念又回到我的心中,夏日来临,新生活开始了。
    -
    《了不起的盖茨比》'}"); +mingyan.push("{'index':450,'content':'离全年结束还有18天。
    -
    「一个」工作室'}"); +mingyan.push("{'index':1221,'content':'一个人吃饭也没有什么不好,不过是空出来一个座,邀请了寂寞。
    -
    周宏翔'}"); +mingyan.push("{'index':1290,'content':'读书多了,容颜自然改变,许多时候,自己可能以为许多看过的书籍都成了过眼云烟,不复记忆,其实他们仍是潜在的。在气质里,在谈吐上,在胸襟的无涯,当然也可能显露在生活和文字里。
    -
    三毛'}"); +mingyan.push("{'index':222,'content':'小时候,谁都觉得自己的未来闪闪发光,不是吗?
    -
    《被嫌弃的松子的一生》'}"); +mingyan.push("{'index':64,'content':'英雄会成为英雄,总是因为想被人记住。
    -
    夜X'}"); +mingyan.push("{'index':339,'content':'遗忘是小丑的使命。
    -
    《悲情城市》'}"); +mingyan.push("{'index':1059,'content':'喜欢一个人怎么会是这样,前一秒钟你恨不得撕碎了他,下一秒却蹲在地上边哭边捡,不知道该怎么拼起来。
    -
    八月长安'}"); +mingyan.push("{'index':116,'content':'生命短促,没有时间可以再浪费,一切随心自由才是应该努力去追求的,别人如何想我便是那么的无足轻重了。
    -
    三毛'}"); +mingyan.push("{'index':1367,'content':'人情世故的阻路栅栏无外乎两个词:回头、改天。一回头就是杳无音信,一改天就没了下文。
    -
    大冰'}"); +mingyan.push("{'index':485,'content':'我们居住的地球是好是坏,全取决于我们变好还是变坏。
    -
    《牧羊少年奇幻之旅》'}"); +mingyan.push("{'index':1332,'content':'喜欢坐火车,喜欢一站一站的慢慢南下或者北上,喜欢在旅途中间的我。只因为,在旅途的中间,我就可以不属于起点或者终点,不属于任何地方和任何人,在这个单独的时刻里,我只需要属于我自己就够了。
    -
    席慕蓉'}"); +mingyan.push("{'index':433,'content':'我只希望,祈祷,我的心境不要再粗糙下去,荒芜下去,这就是我的最大愿望。
    -
    周作人'}"); +mingyan.push("{'index':927,'content':'世界上的任何东西,都能轻而易举地背叛你,哪怕是一片阿司匹林也可以在你生龙活虎的日子里默默过期,在你头疼欲裂的时候失去作用。唯独记忆太过忠诚。
    -
    张晓晗'}"); +mingyan.push("{'index':460,'content':'每当我找不到存在的意义,每当我迷失在黑夜里,夜空中最亮的星,请照亮我前行。
    -
    逃跑计划《夜空中最亮的星》'}"); +mingyan.push("{'index':696,'content':'喜欢就会评论,但爱就是转发。
    -
    方慧'}"); +mingyan.push("{'index':661,'content':'别人给的从来不叫安全感,勉强算是廉价的依赖。安全感基于独立,你赞扬一棵树迎风挺拔,却忘了它年复一年形单影只的孤苦。
    -
    乔小囧'}"); +mingyan.push("{'index':579,'content':'像一朵向日葵,在夜里默默地坚持,一直爱着你,用我自己的方式。
    -
    蓝又时《孤单心事》'}"); +mingyan.push("{'index':914,'content':'有些人快乐地施与,这快乐就是他们的回报。有些人痛苦地施与,这痛苦就是他们的洗礼。
    -
    纪伯伦《先知》'}"); +mingyan.push("{'index':622,'content':'我知道,那些夏天就像你一样回不来,我也不会再对谁满怀期待。我知道,这个世界每天都有太多遗憾。所以,你好,再见。
    -
    宋冬野《安和桥》'}"); +mingyan.push("{'index':275,'content':'青春就是不停地告别,告别就是死亡一点点。
    -
    赵西栋'}"); +mingyan.push("{'index':826,'content':'愿生活可以如诗般自由,吃想吃的饭,见想见的人,看喜欢的风景,做可以做的事。心不老,有人一起胡闹,你还在,我依然。
    -
    张皓宸'}"); +mingyan.push("{'index':1150,'content':'有时觉得“如约而至”是个多么美好的词。等的很苦,却从不辜负。
    -
    路明'}"); +mingyan.push("{'index':304,'content':'历史一直企图把所有人用黑色和白色来区分。可这世界从来都没有单纯的黑色与白色。
    -
    释戒嗔《张邦昌说》'}"); +mingyan.push("{'index':909,'content':'有一种鸟,最擅长恋爱。自己是自己的情人,跳着刚刚发明的舞蹈,跳着跳着就忘了睡觉。
    -
    万晓利《孤独鸟》'}"); +mingyan.push("{'index':467,'content':'为过去的相遇说再见,为现在的相处说感谢。为未来的相助说拜托,为无间的友谊说永存。
    -
    《小小事件》'}"); +mingyan.push("{'index':210,'content':'梦里出现的人,醒来时就该去见他,生活就是那么简单。
    -
    《新桥恋人》'}"); +mingyan.push("{'index':434,'content':'当世界年纪还小的时候,洋葱、萝卜和西红柿,不相信世界上有南瓜这种东西。它们认为那是一种空想。南瓜不说话,默默地成长着。
    -
    《当世界年纪还小的时候》'}"); +mingyan.push("{'index':239,'content':'如果你再走近一些,我就不会再让你走了。
    -
    《爱情无线牵》'}"); +mingyan.push("{'index':535,'content':'她那时候还太年轻,不知道所有命运赠送的礼物,早已在暗中标好了价格。
    -
    茨威格'}"); +mingyan.push("{'index':1015,'content':'一件事无论太晚或者太早,都不会阻拦你成为你想成为的那个人,这个过程没有时间的期限,只要你想,随时都可以开始。
    -
    《返老还童》'}"); +mingyan.push("{'index':1035,'content':'你背对着山河一步步走向我,你脚踏着山河一步步走近我,你打开了我的躯壳,你唤醒了我的耳朵,带走我。
    -
    陈粒'}"); +mingyan.push("{'index':26,'content':'跟我去北方吧,逃离爱情的肤浅,南方的江山太妩媚,腐蚀了我的热血。
    -
    左小祖咒《爱情的枪》'}"); +mingyan.push("{'index':775,'content':'最理想的情况是,所有人必须将人生的每个瞬间视为最后一瞬间。 如果下一个瞬间就是最后一瞬间,那么任何瞬间都将是最闪耀的极致时光。
    -
    白石一文'}"); +mingyan.push("{'index':61,'content':'我把我的人生看作是一次长假。
    -
    孙甘露'}"); +mingyan.push("{'index':858,'content':'人们爱的是一些人,与之结婚生子的,又是另外一些人。
    -
    亦舒'}"); +mingyan.push("{'index':532,'content':'如果当初我勇敢,结局是不是不一样。如果当时你坚持,回忆会不会不一般。最终我还是没说,你还是忽略。
    -
    岩井俊二'}"); +mingyan.push("{'index':411,'content':'记得是最好的原谅,原谅是最美的遗忘。
    -
    迟遇'}"); +mingyan.push("{'index':808,'content':'每片海,沉浮着不同的景致,也翻滚着各自的危险。生活也是、人的欲望也是。以前以为节制或者自我用逻辑框住,甚至掩耳盗铃地掩藏住,是最好的方法,然而,无论如何,它终究永远在那躁动起伏。
    -
    蔡崇达《皮囊》'}"); +mingyan.push("{'index':1046,'content':'你让我觉得,面对这个世界只是观看而不试图去理解,是种莫大的浪费。
    -
    陶立夏《如果没有你》'}"); +mingyan.push("{'index':1110,'content':'我假装无情,其实是痛恨自己的深情。
    -
    卡尔维诺'}"); +mingyan.push("{'index':425,'content':'我们领教了世界是何等凶顽,同时又得知世界也可以变得温存和美好。
    -
    村上春树'}"); +mingyan.push("{'index':1102,'content':'你知道吗?如果我明天就死掉的话,我会因为今天见到你,而觉得无憾。
    -
    《不再让你孤单》'}"); +mingyan.push("{'index':572,'content':'在这不长的生命中可以遇见一个闪闪发光的人,是多好的事吧,就算你们没有在一起,也至少把他当成信仰一般遥远地爱过,这青春就无悔了吧。
    -
    张皓宸'}"); +mingyan.push("{'index':92,'content':'无所谓从哪儿来,也无所谓到哪儿去。 为活着找个理由,只为更好的活着。From 史铁生《命若琴弦》'}"); +mingyan.push("{'index':1093,'content':'后来我把很多人都称作老师,但是像你一样担心我的,没有一个。
    -
    乌冬'}"); +mingyan.push("{'index':995,'content':'过去都是假的,回忆是一条没有归途的路。
    -
    《百年孤独》'}"); +mingyan.push("{'index':1235,'content':'当人们说“我爱你”,喜悦的有很多,悲伤的不是没有。世间这两句话,总是那样意味深长:“我爱你”、“好久不见”。
    -
    Letich'}"); +mingyan.push("{'index':575,'content':'当时的他是最好的他,后来的我是最好的我,可是最好的我们之间,隔了一整个青春。怎么奔跑也跨不过的青春,只好伸出手道别。
    -
    八月长安'}"); +mingyan.push("{'index':305,'content':'挫折,是老天在帮你规划更长远的东西,只是现在还不能告诉你。
    -
    周杰伦'}"); +mingyan.push("{'index':84,'content':'繁华世界里孤独的人,就像咖啡杯里怎么搅拌也融化不掉的那支小调羹。
    -
    金丹华。'}"); +mingyan.push("{'index':967,'content':'别跟我说人生海海,我只想认识你,然后留下一段热泪盈眶的回忆。
    -
    《向阳处的她》'}"); +mingyan.push("{'index':1190,'content':'一个人没有信心,第二天都不想起床。
    -
    康德'}"); +mingyan.push("{'index':1189,'content':'什么是爱情里的甜?是相看两不厌。即使吵架即使委屈,但想想那是你,便也是心甘情愿的。
    -
    咸贵人'}"); +mingyan.push("{'index':185,'content':'你想没想过,你越装聪明,别人越骗你。
    -
    暖小团'}"); +mingyan.push("{'index':752,'content':'不知不觉就长到了要爱要哀愁要纠结要迟疑要理性要偷泣要分别的年龄。
    -
    野夫《1980年代的爱情》'}"); +mingyan.push("{'index':1307,'content':'少女心是永远不会老的,等到了七十岁,八十岁,还可以为年轻的壮举发笑,还可以继续热爱世界,像十七八岁时热爱自己一样。
    -
    陈大力'}"); +mingyan.push("{'index':1114,'content':'我们交换彼此的故乡,在陌生中获得短暂的精彩,然后回到各自的城市,扛起熟悉的一切。我爱你。
    -
    熊德启'}"); +mingyan.push("{'index':214,'content':'如果还有明天,你想怎样装扮你的脸。
    -
    刘伟仁'}"); +mingyan.push("{'index':1029,'content':'你不珍惜那个人,命运就会给他安排更好的人。
    -
    苑子豪'}"); +mingyan.push("{'index':33,'content':'很多人可以走进你的生活,很少人可以走进你的生命。
    -
    朱威廉'}"); +mingyan.push("{'index':489,'content':'什么是爱?这其实很简单。凡是提高、充实、丰富我们生活的东西就是爱。通向一切高度和深度的东西就是爱。
    -
    卡夫卡'}"); +mingyan.push("{'index':892,'content':'还记得你说世界美好事情真的特别多,只是很容易擦肩而过。
    -
    《吟游诗人》'}"); +mingyan.push("{'index':415,'content':'通常百年也难出一个伽利略或爱因斯坦,凡夫俗子最好安分点,别老想吃天鹅肉。
    -
    阿瑟·克拉克'}"); +mingyan.push("{'index':417,'content':'口是心非的人,总是在夜里翻来覆去的。
    -
    《电车计划》'}"); +mingyan.push("{'index':971,'content':'我不想再拘泥于一种颜色了,而是想去了解更多的颜色。
    -
    《暗杀教室》'}"); +mingyan.push("{'index':996,'content':'把你的影子,加点盐,腌起来,风干。老的时候,下酒。
    -
    《甜蜜的复仇》'}"); +mingyan.push("{'index':1098,'content':'感情最怕的就是自私,可是人心不像纸箱,会被逐渐填满,如果你爱得更多,心的容量也会变得越来越大。
    -
    《她》'}"); +mingyan.push("{'index':251,'content':'在我小时候,我极力装得像个大人,当我已经不再是小孩的时候,我又希望像个孩子。
    -
    列夫·托尔斯泰'}"); +mingyan.push("{'index':1224,'content':'“爱情”的定义,简单到不能再简单——只要在一起就好。附加的形容词越多,离它的本意就越远。
    -
    灰鸽'}"); +mingyan.push("{'index':559,'content':'但凡未得到,但凡是过去,总是最登对 。
    -
    《似是故人来》'}"); +mingyan.push("{'index':1010,'content':'夏天要是一直这样就好了,一会儿梨花带雨,一会儿晚来风急,空气濡湿清洌,一头撞进风里像撞进什么人怀里。
    -
    郭大侠'}"); +mingyan.push("{'index':801,'content':'任何人都是这样,处理别人的事情总是大刀阔斧一把抓住主要问题,轮到自己却沉浸在细枝末节不肯放手。
    -
    《橘生淮南·暗恋》'}"); +mingyan.push("{'index':868,'content':'我知,日后,路上或没有更美的邂逅。但当你智慧都酿成红酒,仍可一醉自救。
    -
    《葡萄成熟时》'}"); +mingyan.push("{'index':671,'content':'总以为爱不过是逢场作戏。谁都以为自己可以是观众席中的一位,结果灯光亮起,还不都是戏假情真落了泪。
    -
    张晓晗'}"); +mingyan.push("{'index':831,'content':'命运就是,无论怎么重来,我们依然会义无反顾相爱和分开。但我感谢这安排。
    -
    琦殿'}"); +mingyan.push("{'index':961,'content':'你那么爱谈恋爱,爱错几个人又如何。
    -
    魏天一'}"); +mingyan.push("{'index':983,'content':'我们都是寂寞惯了的人。
    -
    《十八春》'}"); +mingyan.push("{'index':799,'content':'别因为一句话爱一个人,别因为一件事恨一个人。
    -
    李志'}"); +mingyan.push("{'index':549,'content':'就这样我慢慢等待,等待你的身影破雾走来。
    -
    安德雷森'}"); +mingyan.push("{'index':674,'content':'旅行的意义就在于,它允许我错误地理解生活,在这种生活里,我们都是毋需承担的过客,是心情轻松的旁观者,是满心期待的异乡人。
    -
    陶立夏'}"); +mingyan.push("{'index':372,'content':'时间一天天过去,好像什么都没变,但当你某天回首,却发现一切怎么都不同了。
    -
    《生活大爆炸》'}"); +mingyan.push("{'index':1278,'content':'我们以为,惊喜是刻意制造的浪漫,但很多时候,惊喜可能只是一个温暖的小发现。惊喜就是,你用你独有的方式,爱着我。
    -
    咪蒙'}"); +mingyan.push("{'index':462,'content':'如果我们不争取,如果我们不配拥有未来,我们就得永远活在现状。或者更糟,得活在过去。我想爱的用意大概就在这里,爱是争取未来的方式。
    -
    格里高利·大卫·罗伯兹'}"); +mingyan.push("{'index':693,'content':'时间是熟睡的脸,说着梦的语言。我小心地翻译着一字一句,原来它说,重复地说,是爱你让我的时间停留,停留。
    -
    陈绮贞《时间的歌》'}"); +mingyan.push("{'index':22,'content':'爱是:看到你就开心,跟你睡在一起就满足。
    -
    小饭'}"); +mingyan.push("{'index':247,'content':'从前的日色变得慢。车,马,邮件都慢。一生只够爱一个人。
    -
    木心'}"); +mingyan.push("{'index':1287,'content':'感情这个东西,你爱我,我就更爱你。你讨厌我,我就自觉别过头去。
    -
    小饭'}"); +mingyan.push("{'index':766,'content':'为了一个不知能否实现的愿望,人有时会豁出一辈子的。笑其愚蠢的人,毕竟只是人生中的过客而已。
    -
    芥川龙之介'}"); +mingyan.push("{'index':702,'content':'多活十年又如何。你最多能比别人多活80或90岁那十年。不能多活20岁这十年。
    -
    三坨土'}"); +mingyan.push("{'index':916,'content':'任何不能杀了我的,只会令我更强。
    -
    尼采'}"); +mingyan.push("{'index':416,'content':'明白在情爱的范畴中是决无韬略可施的,为王,为奴,都是虚空,都是捕风。
    -
    木心'}"); +mingyan.push("{'index':959,'content':'那些无足轻重的人,那些听任自己变得无足轻重的人,在世界上没有位置。
    -
    《河湾》'}"); +mingyan.push("{'index':1313,'content':'世界就像个巨大的马戏团,它让你兴奋,却让我惶恐,因为我知道散场永远是——有限温存,无限辛酸。
    -
    卓别林'}"); +mingyan.push("{'index':352,'content':'我爱你,爱了整整一个曾经。
    -
    佚名'}"); +mingyan.push("{'index':508,'content':'告白的力量非常强大,那个勇气会左右对方的心理。喜欢的心理得胜过怕被拒绝而害怕的心理,才能叫做告白。
    -
    《恋爱操作团》'}"); +mingyan.push("{'index':680,'content':'所谓成功,就是按你自己喜欢的方式,过你的一生。
    -
    佚名'}"); +mingyan.push("{'index':469,'content':'一粒麦子不落在地里死了,仍旧是一粒麦子;若是死了,就结出许多粒子来。
    -
    《圣经》'}"); +mingyan.push("{'index':726,'content':'希望死后的墓志铭可以有底气刻上:一生努力,一生被爱。想要的都拥有,得不到的都释怀。
    -
    八月长安'}"); +mingyan.push("{'index':1104,'content':'人生何必如初见,但求相看两不厌。
    -
    蔡康永'}"); +mingyan.push("{'index':1339,'content':'希望我们都是只争朝夕,计较的人。永远不会说,来日方长。
    -
    张晓晗'}"); +mingyan.push("{'index':867,'content':'每个人的心里,有多么长的一个清单,这些清单里写着多少美好的事,可是,它们总是被推迟,被搁置,在时间的阁楼上腐烂。为什么勇气的问题总是被误以为是时间的问题,而那些沉重、抑郁的、不得已的,总是被叫做生活本身。
    -
    《被搁置的生活》'}"); +mingyan.push("{'index':631,'content':'今夜我不关心人类,我只想你。
    -
    海子'}"); +mingyan.push("{'index':1176,'content':'此刻,我多想拥抱你,可惜时光之里山南水北,可惜你我中间人来人往。
    -
    鸢喜'}"); +mingyan.push("{'index':364,'content':'真的,单单你的名字就够我爱一世了。
    -
    王小波'}"); +mingyan.push("{'index':72,'content':'五楼那只蓝胖子居然还没来表白?为什么!
    -
    张冠仁'}"); +mingyan.push("{'index':158,'content':'人的眼睛所看到的事情,不是唯一的。因为有时候你一辈子记住的事,不是眼睛看到的事。
    -
    吴明益'}"); +mingyan.push("{'index':625,'content':'按自己希望的方式生活不叫自私,要求別人按照自己希望的方式生活才叫自私。
    -
    鲁斯·伦德尔'}"); +mingyan.push("{'index':687,'content':'全世界好像只有我疲惫,但愿绝望和无奈远走高飞。
    -
    《世界末日》'}"); +mingyan.push("{'index':496,'content':'我们只是一直学着笑嘻嘻地面对荒谬古怪的浮世,因为如果真能学会这样生活,艰辛的步伐有时也能成为小小的舞蹈。
    -
    蔡康永'}"); +mingyan.push("{'index':1005,'content':'有些人对时间的流逝,感到遗憾;有些人则深陷其中,永远也逃不出来。
    -
    《沉睡的青春》'}"); +mingyan.push("{'index':230,'content':'很高兴见到你。还是去你家玩吧。'}"); +mingyan.push("{'index':1021,'content':'最美的不是下雨天,是曾与你躲过雨的屋檐。
    -
    方文山'}"); +mingyan.push("{'index':707,'content':'你等的不是那个还没出现的人,而是忘不掉的人。
    -
    《摩斯探长前传》'}"); +mingyan.push("{'index':366,'content':'这个世界上唯有两样东西能让我们的心灵感到深深的震撼:一是我们头顶上灿烂的星云,二是我们心中崇高的道德法则。
    -
    康德'}"); +mingyan.push("{'index':356,'content':'我们遗憾的并不是错过了最好的人,而是遇到再好的人,却已经把最好的自己用完了。
    -
    张晓晗'}"); +mingyan.push("{'index':1231,'content':'如果真有一段可以称之为青春的岁月,我想,那指的并非某段期间的一般状态,而是一段通过青涩内在,在阳光照射下轻飘摇晃、接近透明而无为的时间吧。也是被丢进自我意识泛滥之大海时所遭遇的瞬间陶醉。换句话说,那是一种光荣的贫瘠、伟大的缺席。
    -
    森山大道'}"); +mingyan.push("{'index':1139,'content':'去过的地方越多,越知道自己想回到什么地方去。见过的人越多,越知道自己真正想待在什么人身边。
    -
    夏正正'}"); +mingyan.push("{'index':818,'content':'有些事,只能一个人做。有些关,只能一个人过。有些路啊,只能一个人走。
    -
    龙应台'}"); +mingyan.push("{'index':233,'content':'你没有如期归来,而这正是离别的意义。
    -
    北岛'}"); +mingyan.push("{'index':76,'content':'人生就是不断地放下,但痛心的是我还没来得及与他们好好告别。
    -
    《少年Pi的奇幻漂流》'}"); +mingyan.push("{'index':308,'content':'我们生来就是孤独。
    -
    李志《梵高先生》'}"); +mingyan.push("{'index':620,'content':'小孩儿说话大人不要插嘴。
    -
    蔡蕾'}"); +mingyan.push("{'index':281,'content':'与你年轻时的面貌相比,我更爱你现在备受摧残的容颜。
    -
    杜拉斯《情人》'}"); +mingyan.push("{'index':875,'content':'我要和你在一起,直到我不爱你。宝贝,人和人一场游戏。
    -
    李志'}"); +mingyan.push("{'index':792,'content':'如果别人让你感到不满或者不快,或者他们的行为不如意,你需要理解,不是每个人都像你这样,受到了良好的教育。
    -
    菲茨杰拉德'}"); +mingyan.push("{'index':446,'content':'钱没了可以挣回来,今天过了就再也没有了。
    -
    《无人区》'}"); +mingyan.push("{'index':1111,'content':'说谎和沉默可以说是现在人类社会里日渐蔓延的两大罪恶。事实上,我们经常说谎,动不动就沉默不语。
    -
    村上春树《且听风吟》'}"); +mingyan.push("{'index':146,'content':'用一颗浏览的心,去看待人生,一切的得与失,隐与显,都是风景与风情。
    -
    扎西拉姆多多'}"); +mingyan.push("{'index':336,'content':'你会等我的。因为,我让自己等了你很久。
    -
    《去年在马里昂巴德》'}"); +mingyan.push("{'index':317,'content':'我想用我的双手把我的爱人紧紧地拥在怀中,哪怕只有一次。
    -
    《剪刀手爱德华》'}"); +mingyan.push("{'index':748,'content':'或许你还会想起我,就像想起一朵不重开的花朵。
    -
    叶赛宁'}"); +mingyan.push("{'index':893,'content':'你在我身边也好,在天边也罢,想到世界的角落有一个你,觉得整个世界也变得温柔安定了。
    -
    琦殿'}"); +mingyan.push("{'index':1234,'content':'沉默寡言的人,也许是不愿意被粗暴拆开的礼物;复杂难解的心,其实在等待一个耐心打磨钥匙的人。
    -
    乌冬'}"); +mingyan.push("{'index':772,'content':'也许你我时常出现在彼此梦里,可醒来后又要重新调整距离。
    -
    窦唯'}"); +mingyan.push("{'index':567,'content':'抱歉,现在不流行感人肺腑,只求刀枪不入。
    -
    李宇春《酷》'}"); +mingyan.push("{'index':1328,'content':'幸福是每一个微小的生活愿望达成。当你想吃的时候有得吃,想被爱的时候有人来爱你。
    -
    《飞屋环游记》'}"); +mingyan.push("{'index':1276,'content':'所有的懦弱都出自于没有爱,或者爱得不彻底,这两者都一样。
    -
    《午夜巴黎》'}"); +mingyan.push("{'index':276,'content':'这辈子决定你悲欢的就是你身边的几个人。
    -
    柴静'}"); +mingyan.push("{'index':58,'content':'即使头上长出鹿角,口琴的魔力依然无法停止。今日宜留齐刘海,忌独立小桥。
    -
    张冠仁'}"); +mingyan.push("{'index':899,'content':'无论男女,作为动物活在世上,一粒果子迸溅在嘴里的滋味是一样的,为对方梳理皮毛的眷恋是一样的,被命运碾过的痛苦是一样的,生之狂喜和死之无可奈何也是一样的。
    -
    柴静'}"); +mingyan.push("{'index':295,'content':'当然要迷失方向,才能到达一个无人能找到的地方。
    -
    《加勒比海盗》'}"); +mingyan.push("{'index':805,'content':'对面走过来一个人,你撞上去了,那是爱情;对面开过来一辆车,你撞上去了,是车祸。但是呢,车和车总是撞,人和人总是让。
    -
    《推拿》'}"); +mingyan.push("{'index':1289,'content':'那些男人们觉得超无趣的小事,就是女人的爱情。
    -
    傅首尔'}"); +mingyan.push("{'index':1055,'content':'有些乐趣和人生际遇或许我们永远不会有。然而正是在这些“得不到”和“有所得”之间,我们确立了自己在这个世界上的位置。
    -
    荞麦'}"); +mingyan.push("{'index':987,'content':'所谓人生,就是为了后悔而过的。
    -
    《Dr.伦太郎》'}"); +mingyan.push("{'index':1205,'content':'而到如今,我明白过来,无论怎样肆无忌惮地去过这一场青春,都不可能在白发苍苍时觉得这一切无愧于心。所有故事都会有遗憾,这才是实实在在的人生,值得被想起,庆幸曾经历。
    -
    猫力'}"); +mingyan.push("{'index':1253,'content':'世界上没有什么东西能拿我们怎么样,可是我们自己老是想恢复失去的东西,老想着过去,就会毁了我们自己。
    -
    玛格丽特·米切尔'}"); +mingyan.push("{'index':1120,'content':'我也不懂为什么世界上就是有这种感情,因为第一眼的一点点动心,赌上一生的羁绊。我很瞧不起,却也不过就是活成这样的人。
    -
    张晓晗'}"); +mingyan.push("{'index':343,'content':'我想在大地上画满窗子,让所有习惯黑暗的眼睛都习惯光明。
    -
    顾城'}"); +mingyan.push("{'index':37,'content':'我们喜欢哪门课,考哪所大学,学什么专业,想成为什么样的自己,都可能是某个老师修改后的结果。
    -
    咪蒙'}"); +mingyan.push("{'index':492,'content':'人生最糟糕的事,一个是饥饿 ,一个是孤独。
    -
    《夏日大作战》'}"); +mingyan.push("{'index':379,'content':'没有足够的勇气去冒险的人,人生将一事无成。
    -
    拳王阿里'}"); +mingyan.push("{'index':785,'content':'幸福就是,生活中不必时时恐惧。幸福就是,寻常的人儿依旧。幸福就是,早上挥手说“再见”的人,晚上又平平常常地回来了,书包丢在同一个角落,臭球鞋塞在同一张椅下。
    -
    龙应台'}"); +mingyan.push("{'index':1173,'content':'爱情就是罗生门,我们各自解释,没人知道真相。
    -
    薛诗汉'}"); +mingyan.push("{'index':463,'content':'可不可以买你的不快乐,我们一起唱歌、一起牵手、一起听音乐,把你的不快乐卖给我,然后抱一下,好不好?
    -
    魏如萱'}"); +mingyan.push("{'index':29,'content':'仓廪实而知礼节,衣食足而知荣辱。
    -
    《管子·牧民》'}"); +mingyan.push("{'index':1301,'content':'梦想不是挂在嘴边炫耀的空气,而是需要认真的实践,等到对的风,我们展翅翱翔。
    -
    九把刀'}"); +mingyan.push("{'index':548,'content':'我觉得生命是最重要的,所以在我心里,没有事情是解决不了的。不是每一个人都可以幸运地过自己理想中的生活,有楼有车当然好了,没有难道哭吗?所以呢,我们一定要享受我们所过的生活。
    -
    《新不了情》'}"); +mingyan.push("{'index':979,'content':'人生既不能延长,也没有赞美。既然这样,就觉得不如做些想都没想过的事,当做回忆也好啊。
    -
    伊坂幸太郎'}"); +mingyan.push("{'index':395,'content':'有些人能清楚地听到自己内心深处的声音,并以此行事。这些人要么变成了疯子,要么成为传奇。
    -
    《燃情岁月》'}"); +mingyan.push("{'index':633,'content':'你都如何回忆我,带着笑或是很沉默,这些年来有没有人能让你不寂寞。
    -
    《后来》'}"); +mingyan.push("{'index':473,'content':'宇宙间只有一个永不改变的法则,那就是一切都在改变,一切都是无常。
    -
    佛陀'}"); +mingyan.push("{'index':334,'content':'你们一直抱怨这个地方,但是你们却没有勇气走出这里。
    -
    《飞越疯人院》'}"); +mingyan.push("{'index':155,'content':'痛苦分两种,一种让你变得更强;另一种则毫无价值,只是徒增折磨。
    -
    《纸牌屋》'}"); +mingyan.push("{'index':616,'content':'我渴望一种爱情,不会因为爱的卑微而心生疲惫,也不会因爱的无耻而滋生轻蔑。他与我棋逢对手见招拆招,他看穿我的轮廓、亲吻我的奋勇,然后原谅我的无耻,和那些无法启齿的卑贱。
    -
    孙小美'}"); +mingyan.push("{'index':85,'content':'其实任何人,在经历时,都不会知道自己正在经历一生中最幸福的时刻。
    -
    奥尔罕·帕慕克'}"); +mingyan.push("{'index':1143,'content':'我们生活中所拥有的恐慌,绝大多数都是来源于陌生,而大部分不能言说的伤痛,常来自于失去,我们很难了解彼此,或者说,感同身受本身就是一个伪命题。
    -
    杨幂'}"); +mingyan.push("{'index':838,'content':'人生若无悔,那该多无趣啊。
    -
    《一代宗师》'}"); +mingyan.push("{'index':701,'content':'他不羁的脸,像天色将晚。她洗过的发,像心中火焰。短暂的狂欢,以为一生绵延。漫长的告别,是青春盛宴。
    -
    《致青春》'}"); +mingyan.push("{'index':706,'content':'你在南方的艳阳里,大雪纷飞,我在北方的寒夜里,四季如春,如果天黑之前来得及,我要忘了你的眼睛,穷极一生,做不完一场梦。
    -
    马頔《南山南》'}"); +mingyan.push("{'index':1067,'content':'幸运的人会知道,幸运并不是富贵成功,抑或毫无痛苦地快乐着,而是无论喜怒哀乐,都被爱着。
    -
    熊德启'}"); +mingyan.push("{'index':525,'content':'亲爱的小孩,今天有没有哭?是否朋友都已经离去,留下了带不走的孤独?
    -
    苏芮《亲爱的小孩》'}"); +mingyan.push("{'index':162,'content':'毕竟只是太短的梦,彼此终于退回陌生,我加上你两个人并不等于我们。
    -
    王力宏《两个人并不等于我们》'}"); +mingyan.push("{'index':917,'content':'人生一世,有许多缘分,有些缘分是一辈子,有些却只是短短一程,即使仅仅同行一段、赏过同一处风景,亦是缘分。缘来珍惜,缘尽离去。是为随缘。
    -
    蒋晓云'}"); +mingyan.push("{'index':647,'content':'世界小得像一条街的布景,我们相遇了,你点点头,省略了所有的往事,省略了问候。 也许欢乐只是一个过程,一切都已经结束。
    -
    北岛'}"); +mingyan.push("{'index':1315,'content':'书这种东西,买了就等于读了。衣服这种东西,没拍照就等于没穿过。但拍过两次照就等于快没衣服穿了。
    -
    狠狠红'}"); +mingyan.push("{'index':331,'content':'人间最大的不快乐无非源于两件事,一是受限,二是变迁。
    -
    「一个」读者 小武'}"); +mingyan.push("{'index':1264,'content':'你是烧烤摊的啤酒,秋凉里的露脐新装,能把头发染成大红色的药水,半夜冰箱里的浓巧克力蛋糕,读了一半通宵才能看完的推理小说。欲罢不能不宜身体健康,是风是雨不是倦鸟归处。
    -
    刘音希'}"); +mingyan.push("{'index':297,'content':'如果额头终将刻上皱纹,你只能做到不让皱纹刻在你的心上。
    -
    《中国合伙人》'}"); +mingyan.push("{'index':998,'content':'时间也许不会给你答案,但一定会让你忘记曾经问过什么。
    -
    飞行官小北'}"); +mingyan.push("{'index':843,'content':'你因欲望在这个世界所受的苦,不要算到梦想头上。
    -
    花大钱'}"); +mingyan.push("{'index':1360,'content':'你不要以为手中拿着枪就是勇敢,真正的勇敢是你知道什么是正义,并坚持不做不义的事。
    -
    苏更生'}"); +mingyan.push("{'index':1378,'content':'我们太容易把生活视作线性的、前进的、向上的过程。但生活恰恰是螺旋的、有进有退、迂回曲折的。所以,尽情享受没有答案的人生,未尝不是一项优雅而高贵的事业。
    -
    赫恩曼尼'}"); +mingyan.push("{'index':611,'content':'我跑上门,打开楼梯。说完睡衣,穿上祷告,关上床,钻进灯。所有这一切都是因为,道晚安时你给我的一吻。
    -
    《吻》'}"); +mingyan.push("{'index':837,'content':'让今天把明天变特殊,未必因为幸福,因为我们努力不服输,尽管失误。
    -
    《明天的记忆》'}"); +mingyan.push("{'index':228,'content':'如果每一个混蛋的内心都住着一个天使该有多好。
    -
    《菊次郎的夏天》'}"); +mingyan.push("{'index':454,'content':'一个人的心房要承载多少毁灭,才会遇到另一颗复活它的心。
    -
    bonpan'}"); +mingyan.push("{'index':690,'content':'每当觉得跟世界格格不入,你会不会躲进角落里?或者找个树洞倾诉?没关系,知道出来就好。
    -
    几米'}"); +mingyan.push("{'index':113,'content':'那时我们有梦,关于文学,关于爱情,关于穿越世界的旅行。如今我们深夜饮酒,杯子碰到一起,都是梦破碎的声音。
    -
    北岛'}"); +mingyan.push("{'index':640,'content':'每一个拥抱,都是疲倦时的一张床。
    -
    颜茹玉'}"); +mingyan.push("{'index':351,'content':'不要和总是不接电话的人交朋友。
    -
    丁丁张'}"); +mingyan.push("{'index':1218,'content':'终有一天会出现一个人,让你像流沙,像落雪,那些别人在上面划了又划的痕迹,他轻轻一抹,就平了。
    -
    陈亚豪'}"); +mingyan.push("{'index':781,'content':'决定去做一件事情,或是去养成一种习惯,甚至是去爱一个人;开始这些事情最好的时机,一般都是——此时此刻。
    -
    里则林'}"); +mingyan.push("{'index':1374,'content':'梦想的伏线如此之长,不以月计、不以年计,而动辄十年。更年轻时,梦想对于我们,是奢侈品;如今,梦想是一个朴素的事情,需要你同样朴素踏实地完成。
    -
    绿妖'}"); +mingyan.push("{'index':479,'content':'你有没有一个感觉,我们的十七岁,好像不过才是去年的事。
    -
    《我可能不会爱你》'}"); +mingyan.push("{'index':943,'content':'人们总说要怎么抓住时间,你知道吗?我觉得恰恰相反,是时间抓住了我们。
    -
    《少年时代》'}"); +mingyan.push("{'index':797,'content':'慢慢,也就明白文字语言无非求个明白。若找不到明白的人,你识的字便没有意义;若有一个明白的人在,你所说的什么也就有了意义。我想,生活的意义也许就是这样,就是要找到这样的一个人。
    -
    《突然十年便过去》'}"); +mingyan.push("{'index':810,'content':'人生如此无意义,只能想尽一切办法,用爱把无聊的日子填满。
    -
    《有一个地方只有我们知道》'}"); +mingyan.push("{'index':588,'content':'我爱你是以悲剧形式肯定人生。
    -
    《恋人絮语》'}"); +mingyan.push("{'index':1376,'content':'察觉你喜欢怎样的我,就送给你怎样的我。因为我想做你生命中的礼物。伪装不好吗?那是我可爱的包装纸啊。
    -
    乌冬'}"); +mingyan.push("{'index':400,'content':'我们别无选择,只能从这个流感盛行的世界出发。
    -
    宫崎骏'}"); +mingyan.push("{'index':921,'content':'如果一艘船不知道该驶去哪个港口,那么任何方向吹来的风都不会是顺风。
    -
    《塔木德》'}"); +mingyan.push("{'index':1195,'content':'“爱你”二字说出口时多是真心话,后来却无一例外沦为大冒险。
    -
    齐鸣宇'}"); +mingyan.push("{'index':655,'content':'一个人下定决心实现愿望,总是有办法的,可是大多数人终其一生都未尝过愿望成真的滋味。人们假装没有钱,没有时间,没有愿望,没有不顾一切的决心,直到真的一无所有。
    -
    《藏地情人》'}"); +mingyan.push("{'index':511,'content':'情到深处人孤独。
    -
    《是否》'}"); +mingyan.push("{'index':1153,'content':'对异地恋的人来说,失去联系就是人口失踪,就是世界末日,就是一切可以想到的最坏的事。
    -
    方慧'}"); +mingyan.push("{'index':556,'content':'但愿我可以没成长,完全凭直觉觅对象,模糊地迷恋你一场。
    -
    张国荣《有心人》'}"); +mingyan.push("{'index':770,'content':'我喜欢你,我不难过;我希望你也喜欢我,我才难过。
    -
    八月长安'}"); +mingyan.push("{'index':685,'content':'只怕爱情的箴言听太多,用脑筋多于用情。经验是钥匙而不是枷锁。每一次恋爱都好像没受伤过,像孩子天真地享受花火,想做什么就做。
    -
    林夕'}"); +mingyan.push("{'index':186,'content':'我本不该在世界上生活,我第一次打开小方盒,鸟就飞了,飞向阴暗的火焰,我第一次打开。
    -
    顾城'}"); +mingyan.push("{'index':273,'content':'寂寞,多半是假寂寞。
    -
    木心'}"); +mingyan.push("{'index':1076,'content':'其实活着还真是件美好的事,不在于风景多美多壮观,而是在于遇见了谁,被温暖了一下,然后希望有一天自己也成为一个小太阳,去温暖别人。
    -
    三毛'}"); +mingyan.push("{'index':747,'content':'我知道这世上有人在等我,尽管我不知道他是谁。但是因为这样,我每天都非常快乐。
    -
    《返老还童》'}"); +mingyan.push("{'index':500,'content':'爱一个人最好的方式,是经营好自己,给对方一个优质的爱人。
    -
    苏岑'}"); +mingyan.push("{'index':743,'content':'现在的我,并不是真实的我,只要活在这个世上,每个人都在扮演着某个角色,我成为别人时,是最为自然的,请给这样的我,取一个新名字。
    -
    《不求上进的玉子》'}"); +mingyan.push("{'index':679,'content':'任何事物的美都源于一个事实:它们终将消失。
    -
    《特丽丝苔莎》'}"); +mingyan.push("{'index':1054,'content':'我很像你,你也没有爱的能力,否则你怎么能把爱作为一种技艺来从事呢。可能我们这样的人都没有爱的能力。天真的人们能够爱,这是他们的秘密。
    -
    《悉达多》'}"); +mingyan.push("{'index':678,'content':'我这一生遇到过很多人,他们如同指间的烟火,忽明忽暗,最后只沦为一抹灰烬,而你不同,你如北斗,闪耀在我的整个人生。
    -
    扶南'}"); +mingyan.push("{'index':1304,'content':'当你的笑容给我礼貌的招呼,当我想诉说这些年来的感触,你却点了满桌我最爱的食物,介绍我看一本天文学的书。若无其事,原来是最狠的报复。
    -
    《想哭》'}"); +mingyan.push("{'index':670,'content':'我曾经像你像他像那野草野花,绝望着渴望着哭着笑着平凡着。
    -
    《平凡之路》'}"); +mingyan.push("{'index':108,'content':'懂越多就越像这世界的孤儿,走越远就越明白世界本是孤儿院。
    -
    韩寒'}"); +mingyan.push("{'index':441,'content':'以后还有很漫长很漫长的路途,都要一个人走完。都要靠自己。凭借自己的能力去完成,而不是依靠谁。
    -
    《千与千寻》'}"); +mingyan.push("{'index':346,'content':'时间是亳不留情的,它真使人在自己制造的镜子里照见自己的真相。
    -
    季羡林'}"); +mingyan.push("{'index':988,'content':'你是你自己的裁决者。你过去和现在做得有多好,由你自己说了算。别人永远不能审判你,就算是神。
    -
    《与神对话》'}"); +mingyan.push("{'index':932,'content':'生活的最好状态是冷冷清清的风风火火。
    -
    木心'}"); +mingyan.push("{'index':378,'content':'爱就是永远不必说对不起。
    -
    《爱情故事》'}"); +mingyan.push("{'index':1351,'content':'我倒宁愿你“怕”的事情越来越多,怕老怕丑怕出洋相,唯有这样自制,才能真正成长为体面的、顶天立地的人。
    -
    陈大力'}"); +mingyan.push("{'index':626,'content':'情感的发生一定能找得出缘由吗?喜欢就是一个坏掉的水龙头,理智告诉你不值得,可怎么拧紧都是徒劳,感情覆水难收。
    -
    八月长安'}"); +mingyan.push("{'index':314,'content':'世上有两样东西不可直视,一是太阳,二是人心。
    -
    东野圭吾'}"); +mingyan.push("{'index':114,'content':'太平盛时,人易为乐。
    -
    《马伶传》'}"); +mingyan.push("{'index':424,'content':'别轻蔑少年时期感动过的东西。
    -
    黄永玉'}"); +mingyan.push("{'index':712,'content':'若不问来路与去程,人生就容易得多。
    -
    陶立夏'}"); +mingyan.push("{'index':954,'content':'我想保有爱的神与魂,使之存活在我的肉体中,熬过那副肉体蒙受屈辱的漫长岁月。
    -
    《自深深处》'}"); +mingyan.push("{'index':1236,'content':'或许思念和肌肉一样,长久不动就可以缓缓消失在身体里。
    -
    韩今谅'}"); +mingyan.push("{'index':897,'content':'我愿意把时间给你,你也愿意把时间给我,我们愿意一起玩,这是一切爱的原型。
    -
    连岳'}"); +mingyan.push("{'index':407,'content':'每个人都会死,但不是每个人都真正活过。
    -
    《勇敢的心》'}"); +mingyan.push("{'index':789,'content':'那些与你毫无关系的人,就是毫无关系的,永远是毫无关系的。从认识的第一天开始,其实你就知道。就算是笑得甜甜蜜蜜,就算是有过无关痒痛的来往,就算你努力经营这段关系。而那些与你有关的,就是与你有关的,是逃也逃不掉的,就算你们只见过三次,就算你们三年彼此才搭理一次,就算是你简直想不起他或者她的样子,就算是你们隔着十万八千里。
    -
    《送你一颗子弹》'}"); +mingyan.push("{'index':1130,'content':'也许喜欢怀念你多于看见你,也许喜欢想象你多于得到你。
    -
    王菲《怀念》'}"); +mingyan.push("{'index':539,'content':'你的本性在阻碍你,是时候赶走她,释放你自己。
    -
    《黑天鹅》'}"); +mingyan.push("{'index':1366,'content':'人天生就懂得忠于自己,拒绝自己是一件痛苦的事情。如果你经常性地违背自己的意愿行事,也就是不得不抛弃本真而对自己虚伪,就只有一种情况,那就是你还未强大到能不依赖于任何人。
    -
    蔡垒磊'}"); +mingyan.push("{'index':283,'content':'我同情所有不想上床睡觉的人,同情所有夜里要有亮光的人。
    -
    海明威'}"); +mingyan.push("{'index':1250,'content':'一无所知的人什么都不爱,一无所能的人什么都不懂。什么都不懂的人是毫无价值的。但是懂得很多的人,却能爱,有见识,有眼光……对一件事了解得越深,爱的程度也越深。如果有人以为,所有的水果都同草莓一起成熟,那他对葡萄就一无所知。
    -
    《爱的艺术》'}"); +mingyan.push("{'index':175,'content':'我来不及认真地年轻,待明白过来时,只能选择认真地老去。
    -
    三毛'}"); +mingyan.push("{'index':181,'content':'不管你拥有了多么惊人的武器,也不管你操纵着多少可怜的机器人,只要离开土地就无法生存。
    -
    《天空之城》'}"); +mingyan.push("{'index':603,'content':'人生总有这么一个阶段,一个做什么也快乐的阶段,一个说什么也真诚的阶段。笑他们,皆因我们曾经荒唐过,爱他们,皆因我们曾经甜蜜过。
    -
    《六楼后座》'}"); +mingyan.push("{'index':405,'content':'世界上有那么多的城镇,城镇中有那么多的酒馆,她却偏偏走进了我的。
    -
    《卡萨布兰卡》'}"); +mingyan.push("{'index':1271,'content':'我们似乎总会在某一年,爆发性地长大,爆发性地觉悟,爆发性地知道某个真相,让原本没有什么意义的时间的刻度,成了一道分界线。
    -
    《老灵魂》'}"); +mingyan.push("{'index':704,'content':'回来,本身就是充满悲情色彩的一个词,因为无论最终他有没有回来,都说明他曾经离开过你。
    -
    马思纯'}"); +mingyan.push("{'index':78,'content':'我不知道庆典之后的日子该怎么过。
    -
    村上龙'}"); +mingyan.push("{'index':974,'content':'醉过才知酒浓,爱过才知情重。你不能做我的诗,正如我不能做你的梦。
    -
    胡适《梦与诗》'}"); +mingyan.push("{'index':1156,'content':'“一瞬,一剎,一弹指,一须臾”不是形容时间的。是形容快乐的。
    -
    郭大侠'}"); +mingyan.push("{'index':442,'content':'永远不要认为我们可以逃避,我们的每一步都决定着最后的结局,我们的脚正在走向我们自己选定的终点。
    -
    米兰·昆德拉'}"); +mingyan.push("{'index':128,'content':'暴躁是人类卑劣天性之一,发脾气就等于在人类进步的阶梯上倒退一步。
    -
    达尔文【往期精选】'}"); +mingyan.push("{'index':23,'content':'不主动的人是好人的概率大于坏人。
    -
    何禾'}"); +mingyan.push("{'index':730,'content':'人们说当你遇上你的挚爱时,时间会暂停,那是真的。但人们没有告诉你,当时针再度恢复转动,它会无比飞快,让人无法赶上。《大鱼》'}"); +mingyan.push("{'index':902,'content':'完美和不完美都是我,对自己,我总是说Yes。
    -
    凯特·布兰切特'}"); +mingyan.push("{'index':75,'content':'任何一个地方都不比另一个地方拥有更多的天空。
    -
    辛波斯卡'}"); +mingyan.push("{'index':639,'content':'为什么要挣扎?倘若那正是我要到的去处,用不着使力挣扎的。我一定放弃任何抵抗愿望。一直向下沉。不管它是带咸味的海水,还是带苦味的人生,我要沉到底为止。这才像是生活,是生命。
    -
    沈从文'}"); +mingyan.push("{'index':857,'content':'一年三百六十五天分了四季,五谷是花生红枣眼泪和小米,想一想邻居女儿听听收音机,看一看我的理想还埋在土里。
    -
    张楚《蚂蚁蚂蚁》'}"); +mingyan.push("{'index':989,'content':'小时候大人说,做噩梦了掐一下自己,如果不痛就说明在做梦,那都是假的,也就不用害怕。后来她在噩梦里过了一辈子,正因为不痛,便不容易醒来。
    -
    嚜子'}"); +mingyan.push("{'index':173,'content':'醒在梦境上,梦在清晨上,晨在川流上,流在船岛下。
    -
    苏打绿《日光》'}"); +mingyan.push("{'index':1200,'content':'世界上最美妙的莫过于此,在不谙世事的年纪,对生活的全部期待就是绚烂的理想本身。
    -
    赫恩曼尼'}"); +mingyan.push("{'index':322,'content':'你相信么,在这样一个世界里,用脑子想过的事情,你总是以为你已经做过了。
    -
    《1988:我想和这个世界谈谈》'}"); +mingyan.push("{'index':546,'content':'初恋就是和自己谈恋爱,之后的每次恋爱都是被伤害。
    -
    姬霄'}"); +mingyan.push("{'index':38,'content':'今日无事。
    -
    路易十六'}"); +mingyan.push("{'index':780,'content':'我只愿蓬勃生活在此时此刻,无所谓去哪,无所谓见谁,那些我将要去的地方,都是我从未谋面的故乡;那些我将要见的人,都会成为我的朋友。我不能选择怎么生,怎么死,但我能决定怎么爱,怎么活。
    -
    《黄金时代》'}"); +mingyan.push("{'index':757,'content':'成长就是将你哭声调成静音的过程。
    -
    读解人生'}"); +mingyan.push("{'index':344,'content':'童年就是让你能够忍受暮年的那股力量。
    -
    阿多尼斯'}"); +mingyan.push("{'index':117,'content':'没有不可治愈的伤痛,没有不能结束的沉沦,所有失去的,会以另一种方式归来。
    -
    约翰•肖尔斯'}"); +mingyan.push("{'index':1193,'content':'作为一名真正的强者,有的时候你要允许那些比你弱的人吹牛,有的时候对别人宽容一点,幸运就会从天而降。
    -
    恶棍天使·莫非里'}"); +mingyan.push("{'index':167,'content':'你锋芒太露,这是你的弱点,你像把无鞘刀,锋利,但好刀应在刀鞘里。
    -
    黑泽明《穿心剑》'}"); +mingyan.push("{'index':652,'content':'罐头是在1810年发明出来的,可是开罐器却在1858年才被发明出来,很奇怪吧。可有时候就是这样的,重要的东西有时也会迟来一步,无论是爱情还是生活。
    -
    《Saikou no Rikon》'}"); +mingyan.push("{'index':456,'content':'每个人做任何事,都只是为了自己,虽然有人会说,我希望能为哪个人做些什么,但事实上,也只不过是希望看到别人幸福时,自己也有份幸福感罢了。
    -
    《东京巴比伦》'}"); +mingyan.push("{'index':80,'content':'我们最深的恐惧,就好像是龙,护卫着我们内心最深处的珍宝。
    -
    里尔克'}"); +mingyan.push("{'index':241,'content':'做一个世界的水手,游遍每一个港口。
    -
    沃尔特•惠特曼'}"); +mingyan.push("{'index':659,'content':'人需要有真爱,真爱得是真的爱,爱她感受她,从自己的小世界里跳出来,一起创造一个大的世界。而这个大世界可以给你很多启发,让你进步,让你得到不傻不二的幸福。
    -
    那可'}"); +mingyan.push("{'index':100,'content':'好吃好睡,新年快乐。
    -
    「一个」工作室'}"); +mingyan.push("{'index':325,'content':'有一天你会遇到一个彩虹般绚丽的人,从此以后,其他人就不过是匆匆浮云。
    -
    《怦然心动》'}"); +mingyan.push("{'index':1033,'content':'和朋友最舒服的相处模式不是无话不说,而是可以不说话。
    -
    姬霄'}"); +mingyan.push("{'index':600,'content':'那一年我二十一岁,在我一生的黄金时代,我有好多奢望。我想爱,想吃,还想在一瞬间变成天上半明半暗的云。
    -
    王小波'}"); +mingyan.push("{'index':105,'content':'生活总像是个把我们击倒的敌人。但也许它更可以成为让我们倾倒的情人。
    -
    金丹华 今日「一个」工作室专辑'}"); +mingyan.push("{'index':1284,'content':'不应该一味地追求安稳,能够扼杀两人关系的恰恰是缺少任何挑战,是那种了无新意的感觉。我们需要时刻让对方在我们身上看到惊喜,找到新鲜的感觉。
    -
    《背叛》'}"); +mingyan.push("{'index':1370,'content':'人生的困扰大抵来自四个方面:不可避免的死亡,内心深处的孤独感,我们追求的自由以及生活并无显而易见的意义可言。
    -
    欧文·亚隆'}"); +mingyan.push("{'index':445,'content':'「一个」官网(wufazhuce.com)今日上线。「一个」论坛(wufazhuce.org)开放注册中。(测试版)'}"); +mingyan.push("{'index':856,'content':'要想面对一个新的开始,一个人必须有梦想、有希望、有对未来的憧憬。如果没有这些,就不叫新的开始,而叫逃亡。
    -
    玛丽亚·杜埃尼亚斯《时间的针脚》'}"); +mingyan.push("{'index':1320,'content':'鸡汤常讲人要学会失去,遗憾才是完整,伤害是成长最宝贵的一课……那是因为我们别无选择。已经发生的一切,如果不给它一个温暖的意义,你又能怎样?强装欢笑的大人不必嘲讽痛哭的小孩不懂事,当我们一起对流星许愿时,都只祈祷健康快乐应有尽有。我祝愿你学会接受,也祝愿这项技能,永远没有用武之地。
    -
    八月长安'}"); +mingyan.push("{'index':324,'content':'我不想谋生,我想生活。
    -
    奥斯卡·王尔德'}"); +mingyan.push("{'index':35,'content':'孤独是关上灯,与发光的灵魂为伴。
    -
    贺伊曼'}"); +mingyan.push("{'index':48,'content':'疼痛是这个世界对你的挽留。
    -
    何禾'}"); +mingyan.push("{'index':538,'content':'当一个人爱着你,他说你名字的方式都跟别人不一样。你知道你的名字放在他嘴里是最安全的。
    -
    比利'}"); +mingyan.push("{'index':388,'content':'在幻变的生命里,岁月,原是最大的小偷。
    -
    《岁月神偷》'}"); +mingyan.push("{'index':179,'content':'孤独是我们自找的,因为我们太珍惜自我。
    -
    宗萨蒋扬钦哲'}"); +mingyan.push("{'index':803,'content':'我们有时候,感觉眼前的山谷好深,迎面刮来的风好强,我们忽然有了鹰的觉悟,于是,对爱展开羽翅,纵身跃去,放手一搏。
    -
    蔡康永'}"); +mingyan.push("{'index':1298,'content':'一辈子,有多少真心话,是以玩笑的方式说了出去?
    -
    佚名'}"); +mingyan.push("{'index':134,'content':'一个人假装开心,但声音就装不了。细心一听就知道了。
    -
    《春光乍泄》'}"); +mingyan.push("{'index':472,'content':'当你在深夜醒来,发现自己因为想念某人而胸口发疼,你,把它叫做什么?
    -
    《冷山》'}"); +mingyan.push("{'index':1063,'content':'眼睛为她下着雨,心却为她打着伞,这就是爱情。
    -
    泰戈尔'}"); +mingyan.push("{'index':617,'content':'做你自己,因为别人都有人做了。
    -
    奥斯卡·王尔德'}"); +mingyan.push("{'index':1192,'content':'旧的坏日子已经过去,新的坏日子还在赶来的路上,而所谓的幸福就是这两种日子中间的那段时光吧。
    -
    夏正正'}"); +mingyan.push("{'index':832,'content':'没有什么比时间更具有说服力了,因为时间无需通知我们就可以改变一切。
    -
    余华《活着》'}"); +mingyan.push("{'index':759,'content':'相聚离开都有时候,没有什么会永垂不朽。
    -
    林夕'}"); +mingyan.push("{'index':1268,'content':'总有那么一些时年。怀揣着急切被他人检阅的悲伤和激情,对路途有过分单纯的幻想和过分执拗的回忆。
    -
    七堇年'}"); +mingyan.push("{'index':835,'content':'有些人注定是你生命里的癌症,而有些人只是一个喷嚏而已。这一切,据说都是“因了冥冥中的缘分”。
    -
    刘瑜'}"); +mingyan.push("{'index':1211,'content':'18岁爱的那个人,爱我爱得那样少的一个人。我不同意,我不甘心,我问了自己一百次“怎么回事”,但我至今仍然觉得这个可恨的人,有一点点迷人。
    -
    乌冬'}"); +mingyan.push("{'index':1087,'content':'这世界是如此喧哗,让沉默的人显得有点傻。
    -
    李宗盛'}"); +mingyan.push("{'index':67,'content':'在我眼里没有好人坏人,只有暂时被情绪左右的未觉醒的圣人。
    -
    陈坤'}"); +mingyan.push("{'index':220,'content':'回首往事,不过是虚惊一场。
    -
    李樯'}"); +mingyan.push("{'index':255,'content':'我们都生活在阴沟里,但仍有人仰望星空。
    -
    王尔德'}"); +mingyan.push("{'index':1172,'content':'遇见是一场阴差阳错的好运气,恰好路口遇到你。能陪伴在身边,就没辜负你在遇见之前的那一路奔袭。
    -
    卢思浩'}"); +mingyan.push("{'index':286,'content':'留下来,或者我跟你走。
    -
    《海角七号》'}"); +mingyan.push("{'index':259,'content':'每一段无法继续的爱情,都有负责保存它的人,才能让另一个人安心往前。
    -
    九把刀'}"); +mingyan.push("{'index':1223,'content':'人要么就是好看,要么就是丑陋,中间不美不丑的,只能说可爱。
    -
    《年轻气盛》'}"); +mingyan.push("{'index':529,'content':'被爱的人也许不知道,他的一句晚安可媲美满天星光。
    -
    十三空'}"); +mingyan.push("{'index':49,'content':'志望幼海,东望榑木。无草木,多风。是山也,广员百里。
    -
    《山海经》'}"); +mingyan.push("{'index':32,'content':'万圣谢幕,百鬼犹存。
    -
    贺伊曼'}"); +mingyan.push("{'index':1151,'content':'真正能证明你是谁的,只有正在做的事和正爱着的人。往事只是往事,不再刻有你的名字。
    -
    姬霄'}"); +mingyan.push("{'index':408,'content':'在那些夜晚,照亮我们黑暗的心,究竟是什么。
    -
    万能青年旅店《秦皇岛》'}"); +mingyan.push("{'index':878,'content':'正如故乡是用来怀念的,青春是用来追忆的,当你怀揣着它时,它一文不值,只有将它耗尽后再回过头看,一切才有意义,爱过我们的人和伤害过我们的人,都是我们青春存在的意义。
    -
    《致我们终将逝去的青春》'}"); +mingyan.push("{'index':804,'content':'我生命里最大的突破之一,就是我不再为别人对我的看法而担忧。此后,我真的能自由地去做我认为对自己最好的事。只有在我们不需要外来的赞许时,才会变得自由。
    -
    罗伊·马丁纳'}"); +mingyan.push("{'index':1244,'content':'价值混乱,钱就会变成尺度。
    -
    陈丹青'}"); +mingyan.push("{'index':212,'content':'爱情就像一条河,谁不是摸着石头过河呢。
    -
    《致我们终将逝去的青春》'}"); +mingyan.push("{'index':952,'content':'命运像深广河流,就算曲折也会最终去往它该去的地方。不要为做错的决定懊悔,我们没有如果。
    -
    陶立夏'}"); +mingyan.push("{'index':206,'content':'了解一个人并不代表什么,今天他喜欢凤梨,明天他可以喜欢别的。
    -
    《重庆森林》'}"); +mingyan.push("{'index':751,'content':'兴高采烈地迎接每一场空欢喜,是我最少年的事。
    -
    哈德门烟头'}"); +mingyan.push("{'index':729,'content':'等你到了一定的年龄,彼此的过去已经不再重要,那些曾经令你无比在乎的东西就好像半途而退的潮汐一般似乎没有了提及的必要。这个世上没有命运这回事,同时也没有意外。
    -
    西蒙·范·布伊'}"); +mingyan.push("{'index':930,'content':'痛苦这东西,天生应该用来藏在心底,悲伤天生是要被努力节制的,受到的伤害和欺骗总得去原谅,满不在乎的人不是无情的人。最安静与最孤独的成长,也是能使人踏实、自信、强大、善良的,大不了,吐吐舌头而已。
    -
    李娟《我的阿勒泰》'}"); +mingyan.push("{'index':1047,'content':'当所有等待都变成曾经,我会说好多精彩的故事给你听。
    -
    《远行》'}"); +mingyan.push("{'index':1187,'content':'诀别诗烈酒入喉,生死与共情意重,再聚首。
    -
    陈坤'}"); +mingyan.push("{'index':1126,'content':'我觉得我爱了你了,从此以后,不管什么时候我都不能对你无动于衷。
    -
    王小波'}"); +mingyan.push("{'index':521,'content':'恋爱有时真的很随机,早点晚点多爱点少爱点勇敢点怂点,一念之差就是另一个不同的人生。
    -
    赵小姐失眠中'}"); +mingyan.push("{'index':196,'content':'二十丽姝,请来吻我,衰草枯杨,青春易过。
    -
    莎士比亚'}"); +mingyan.push("{'index':564,'content':'人不只有一种颜色,有很多种颜色,真正的颜色,自己的颜色,谁也不知道。多姿多彩就行,请多姿多彩地活下去吧。
    -
    《意外的幸运签》'}"); +mingyan.push("{'index':507,'content':'陆上的人喜欢寻根究底,虚度很多的光阴。冬天忧虑夏天的迟来,夏天担心冬天的将至。所以你们不停到处去追求一个遥不可及、四季如夏的地方——我并不羡慕。
    -
    《海上钢琴师》'}"); +mingyan.push("{'index':720,'content':'有些感情纠缠久了,到后来你已经分不清楚,到底你是要爱,还是要赢。
    -
    独木舟葛婉仪'}"); +mingyan.push("{'index':814,'content':'给喜欢的人发每一条消息都是冒险,赌注是接下来一整天的心情好坏。
    -
    方慧'}"); +mingyan.push("{'index':1129,'content':'别嫉妒成功,别怜悯失败,因为你不知道在灵魂的权衡中,什么算成功,什么算失败。
    -
    《与神对话》'}"); +mingyan.push("{'index':819,'content':'时间并不能淡化一切。事实上,一个曾经占据过你生活的人不是别的,他是你的蓝天,你的阳光,你的空气。一旦失去,没有什么可以取代,可以弥补。他将覆盖你的生命,直到永远。
    -
    《半生为人》'}"); +mingyan.push("{'index':594,'content':'即使没有人为你鼓掌,也要优雅地谢幕,并感谢自己的认真付出。
    -
    权志龙'}"); +mingyan.push("{'index':1364,'content':'极不切实际的梦想即使没有实际权力做后盾,一样可以让人产生最大无畏的胆气。这是因为,怀有大希望者的力量可以有最荒谬的来源:一个口号、一句话或一枚徽章。
    -
    《狂热分子》'}"); +mingyan.push("{'index':641,'content':'我们每个人来到世界上,都是独自旅行,即使有人相伴,终究各奔东西。
    -
    《练习曲》'}"); +mingyan.push("{'index':1052,'content':'你最可爱,我说时来不及思索,但思索之后,还是这样说。
    -
    普希金'}"); +mingyan.push("{'index':1157,'content':'你不用重现生命中的每一秒,每次欲求的细节,每个委曲求全的过程,那么多看电视、等公车、挖鼻屎的时间。那些不过是用来填补空白的。只有少数瞬间才有价值,才能构建和定义人生。
    -
    杰夫•戴尔'}"); +mingyan.push("{'index':1270,'content':'爱情,其实是一种姿态,就像一个人的时间,你可以用感觉把它拉长,也可以把它缩短。
    -
    蒋一谈'}"); +mingyan.push("{'index':94,'content':'只要想起一生中后悔的事,梅花就落满了南山。
    -
    张枣'}"); +mingyan.push("{'index':1348,'content':'大概是小学写作文的时候,把“最开心的一天”和“最难过的一天”份额都用光了,后来的人生才会显得如此平淡而无趣吧。
    -
    花大钱'}"); +mingyan.push("{'index':703,'content':'你从来不讲真心话,叫我如何大冒险。
    -
    袁远'}"); +mingyan.push("{'index':192,'content':'今日送别赵长天先生(1947-2013)。'}"); +mingyan.push("{'index':1040,'content':'有时想想,独居斗室和天涯浪迹好像是一件事情,身处寂寞和身处喧嚣其实也没什么两样,身外的整个世界都是镜子,我们必须自己认得自己。
    -
    马良《人间卧底》'}"); +mingyan.push("{'index':1101,'content':'我们暂时拥有,随后失去。从每一段失去中,我越来越懂得人生究竟是怎么一回事。
    -
    荞麦《当一切在我们周围暗下来》'}"); +mingyan.push("{'index':951,'content':'这么多年我一个人一直在走,走过了人性的背后和白云苍狗。总以为答案会出现在下一个车站,随后的事情我不说你也能明白。
    -
    李志'}"); +mingyan.push("{'index':890,'content':'感谢我不可以拥抱你的背影,所以才能变成你的背影。躲在安静角落,如果你回头看,不用在意。
    -
    《背影》'}"); +mingyan.push("{'index':288,'content':'为了记住你的笑容,我拼命按下心中的快门。
    -
    《美丽人生》'}"); +mingyan.push("{'index':483,'content':'你相信孤独,也相信隐退;你浪漫得起,因为你自给自足。
    -
    《一轮月亮与六颗星星》'}"); +mingyan.push("{'index':491,'content':'当你无精打采的时候,人们总是会说到兴头上。
    -
    《麦田里的守望者》'}"); +mingyan.push("{'index':614,'content':'遇到好事坏事我都当作是注定,注定遇到这些课程让我来学习。如果逃避不久之后又得再来一次,唯有看透面对做人会遇到的问题。
    -
    范晓萱《你》'}"); +mingyan.push("{'index':981,'content':'再好的朋友也应该保持一点距离,因为人最应该学会相处的那个人不是别人,而是自己。
    -
    王乌乌'}"); +mingyan.push("{'index':171,'content':'我去过很多地方,但我只遇到过很少的我们。
    -
    卡森·麦卡勒斯'}"); +mingyan.push("{'index':20,'content':'活出你的文艺。今日送上编辑部作品特辑。
    -
    《一个》全体'}"); +mingyan.push("{'index':1171,'content':'你要来了,我对谁都微笑,对讨厌的人也有礼貌。恨不得把每一个等待你的黄昏都蘸了糖吃掉。
    -
    宋小君'}"); +mingyan.push("{'index':864,'content':'让以前的事都过去吧,和以前的世界一刀两断,再不想听到它的任何情况,任何消息,到一个新的世界,新的地方去,从此不再回头!
    -
    陀思妥耶夫斯基'}"); +mingyan.push("{'index':1331,'content':'少年的情感由不得人来控制,自由得像湖面的风,此刻忽然想见了,如果见不到,便沮丧起来。沮丧之中,才隐约懂得些人生的道理。
    -
    熊德启'}"); +mingyan.push("{'index':1338,'content':'多年前飞走的那只鸽子,你在每个下雨的黄昏还是会习惯性担惊受怕片刻,毕竟所有怀念都源于世事更迭的不再拥有。不知需要多久你才能明白,对往日虔诚默哀,远比缅怀有力。
    -
    张瑞琪'}"); +mingyan.push("{'index':127,'content':'珍惜黄昏的村庄,珍惜雨水的村庄,万里无云如同我永恒的悲伤。
    -
    海子《村庄》'}"); +mingyan.push("{'index':543,'content':'如果有一天,我们之间的记忆被删除掉,你还会不会像从前一样爱我,就像我们之间没有彼此伤害过一样?
    -
    《美丽心灵的永恒阳光》'}"); +mingyan.push("{'index':376,'content':'把心事留在那堆喝空的酒瓶子里,然后,生活将继续,将异乡当作故乡,将流放当作远航。
    -
    老六'}"); +mingyan.push("{'index':846,'content':'别太依赖任何一个人,等哪天他不找你不陪你不哄你了,你会很难受的。
    -
    佚名'}"); +mingyan.push("{'index':1303,'content':'反正人生不是在此处失败,就是在彼处失败。失败者才不管别的有多重要。任性一回,不然一辈子都憋屈。
    -
    毛利'}"); +mingyan.push("{'index':1049,'content':'自以为了解对方的阶段是一段感情关系中最美好的时光。
    -
    蔡蕾'}"); +mingyan.push("{'index':240,'content':'每个只记住仇恨的人,过得都不快乐。
    -
    张晶'}"); +mingyan.push("{'index':458,'content':'你的青春就像摆在货架上的罐头,添加再多的防腐剂,也难逃下架的命运。超市老板根本不给你反应的时间,一夜之间,你依旧穿着二十岁的衣服,留着二十岁的刘海,还是像二十岁那年一无所有,但是你再也说不出“我到了一百岁还可爱”这句话。
    -
    《女王乔安》'}"); +mingyan.push("{'index':420,'content':'故事的主人走了,不过,故事还在。
    -
    yuqingtk'}"); +mingyan.push("{'index':1261,'content':'差一年一个月一天一个时辰都不算一辈子。
    -
    《霸王别姬》'}"); +mingyan.push("{'index':310,'content':'把我们带到过去的是回忆,将我们带向未来的是梦想。
    -
    《时间机器》'}"); +mingyan.push("{'index':628,'content':'如果你留在这里,这里就变成你的现在,不久以后,你就会开始想象另一个时代才是黄金时代,这才是现实,不尽如人意,因为生活本来就是不尽如人意的。
    -
    《午夜巴黎》'}"); +mingyan.push("{'index':1006,'content':'我如此依赖城市,依赖一切陌生的事物。我不停地去适应一场又一场变故,随波逐流,顺从一切,接受一切。但是我心里有秘密。
    -
    李娟'}"); +mingyan.push("{'index':881,'content':'你的晚安是一根灯绳,轻轻一拉,“咔嗒”一声,就熄灭了整个城市的灯,然后夜晚才真的到来。
    -
    玍几'}"); +mingyan.push("{'index':550,'content':'和所有以梦为马的诗人一样,我借此火得度一生的茫茫黑夜。
    -
    海子《以梦为马》'}"); +mingyan.push("{'index':813,'content':'过一个平凡无趣的人生实在太容易了,你可以不读书,不冒险,不运动,不写作,不外出,不折腾……但是,人生最后悔的事情就是:我本可以。
    -
    陈素封'}"); +mingyan.push("{'index':268,'content':'如果世界上曾经有那个人出现过,其他人都会变成将就。
    -
    顾漫'}"); +mingyan.push("{'index':481,'content':'关于郑州我想的全是你,想来想去都是忏悔和委屈。
    -
    《关于郑州的记忆》'}"); +mingyan.push("{'index':1259,'content':'时间是让人猝不及防的东西,晴时有风阴有时雨,争不过朝夕,又念着往昔。偷走了青丝却留住一个你。
    -
    《岁月神偷》'}"); +mingyan.push("{'index':383,'content':'所谓的世间,不就是你吗?
    -
    太宰治《人间失格》'}"); +mingyan.push("{'index':627,'content':'我在千寻之下等你。水来我在水中等你,火来我在灰烬中等你。
    -
    洛夫'}"); +mingyan.push("{'index':544,'content':'人经常会感受到内心的召唤,如果不去回应它,人就始终不能平静下来,如果去回应它,就意味着必须放弃很多心爱的人和物。
    -
    《碧海蓝天》'}"); +mingyan.push("{'index':1209,'content':'你可以去做一切事情,但前提是不会为结果伤悲。一个人的强大,并非看他能做什么,而是看他能承担什么。
    -
    石田衣良'}"); +mingyan.push("{'index':197,'content':'时间才不管谁跑得多快多慢呢。
    -
    刘亮程'}"); +mingyan.push("{'index':817,'content':'别为不属于你的观众,演不擅长的人生。
    -
    姬霄'}"); +mingyan.push("{'index':172,'content':'伤感就要在满的时候倒掉。
    -
    刀刀'}"); +mingyan.push("{'index':938,'content':'每个人都想把手伸向夜空,去捕捉那属于自己的星星。但却极少有人能正确地知道自己的星星在哪一个位置。
    -
    田中芳树'}"); +mingyan.push("{'index':459,'content':'真爱的第一个征兆,在男孩身上是胆怯,在女孩身上是大胆。
    -
    《悲惨世界》'}"); +mingyan.push("{'index':229,'content':'如果我多一张船票,你会不会跟我一起走?
    -
    《花样年华》'}"); +mingyan.push("{'index':1024,'content':'当我对所有事情都厌倦的时候,我就会想到你,想到你在世界某个地方生活着、存在着,我就愿意去承受一切。你的存在对我很重要。
    -
    《美国往事》'}"); +mingyan.push("{'index':728,'content':'心里有个人放在那里,是件收藏,如此才填充了生命的空白,太阳尚远,但必有太阳。
    -
    七堇年《蓝颜》'}"); +mingyan.push("{'index':1045,'content':'我们每个人好像一直都在跑,却总觉得自己把心和最后一点安全感落在了千里之遥的家乡。
    -
    暖小团'}"); +mingyan.push("{'index':677,'content':'说什么王权富贵,怕什么戒律清规,只愿天长地久,与我意中人儿紧相随。
    -
    《女儿情》'}"); +mingyan.push("{'index':393,'content':'有天变成了被对抗的大人,也别忘记今晚。
    -
    1976乐团《撒野俱乐部》'}"); +mingyan.push("{'index':453,'content':'生命有如渡过一重大海,我们相遇在这同一狭船里。死时,我们同登彼岸,又向不同的世界各奔前程。
    -
    泰戈尔'}"); +mingyan.push("{'index':1140,'content':'梦想破碎是没有声音的,它只是缓慢又沉默地离开了。
    -
    苏更生'}"); +mingyan.push("{'index':1134,'content':'总有一些人,他们伤害过你,把你推入万劫不复,可真正面对面,是依旧恨不起来的。他们是命里的劫,也是恩赐。
    -
    自由极光'}"); +mingyan.push("{'index':821,'content':'偶尔我们就像黄昏和黎明,在某些时刻是如此相似,但中间却隔了一整个黑夜。
    -
    里则林'}"); +mingyan.push("{'index':604,'content':'此生,是为了发现自己而来。此生,是为了与自己相见而来。
    -
    河井宽次郎'}"); +mingyan.push("{'index':267,'content':'如果我用他的原子笔,一直写他的名字,把水写干了,他就会爱上我。
    -
    《蓝色大门》'}"); +mingyan.push("{'index':141,'content':'心也甘情也愿,才叫不浪费生命。
    -
    小饭'}"); +mingyan.push("{'index':1082,'content':'当我忘了你的时候,我就忘了我自己。
    -
    《呼啸山庄》'}"); +mingyan.push("{'index':348,'content':'生而为人,我很抱歉。
    -
    《被嫌弃的松子的一生》'}"); +mingyan.push("{'index':750,'content':'人总是在接近幸福时倍感幸福,在幸福进行时却患得患失。
    -
    张爱玲'}"); +mingyan.push("{'index':391,'content':'我们要不就让自己悲伤,要不就让自己强大,其所需要的工作量是一样的。
    -
    卡洛斯·卡斯塔尼达'}"); +mingyan.push("{'index':1306,'content':'生命中任何一天的结束,便永不重来。
    -
    《诱僧》'}"); +mingyan.push("{'index':102,'content':'记忆往往是靠苦难建立起来的。
    -
    黄崇凯'}"); +mingyan.push("{'index':131,'content':'以外表选朋友,以智慧选敌人。你太聪明,不能当朋友。
    -
    《天堂电影院》'}"); +mingyan.push("{'index':1105,'content':'我最爱你的一刹那给你打电话你没接,等你看到来电提醒再打回来的时候很可能我就不爱你了。
    -
    暖小团'}"); +mingyan.push("{'index':1345,'content':'初恋就是一点点笨拙外加许许多多好奇。
    -
    萧伯纳'}"); +mingyan.push("{'index':1285,'content':'所以,要好好努力然后多挣钱,才养得起自己这个爱吃的胃,爱玩儿的心,爱逛爱买的习惯。一个人往,一个人来,也能生活得很好。
    -
    德卡先生'}"); +mingyan.push("{'index':688,'content':'在这个城市里,我坚持的相信一定会有那么一个人,想着同样的事情,怀着相似的频率,在某站寂寞的出口,安排好了与我相遇。
    -
    《写给城市的诗》'}"); +mingyan.push("{'index':40,'content':'我们记得应该勇敢,但承受不了这个不善良不友好不负责的世界加诸勇敢者的额外损失。
    -
    夜X'}"); +mingyan.push("{'index':912,'content':'我曾做过一个小梦,怪他一声不响地忽然走了。他现在故意慢慢走,让我一程一程送,尽量多聚聚,把一个小梦拉成一个万里长梦。这我愿意。送一程,说一声再见,又能见到一面。离别拉得长,是增加痛苦还是减少痛苦呢?我算不清。但是我陪他走的愈远,愈怕从此不见。
    -
    杨绛'}"); +mingyan.push("{'index':1275,'content':'年轻的朋友,我们总是这样太慌张,满天的星光是我的家。你要去哪里,我去哪里,我也不在意。以后我们各自还有一生的奇迹。
    -
    后海大鲨鱼乐队'}"); +mingyan.push("{'index':231,'content':'汶川大地震5周年。'}"); +mingyan.push("{'index':494,'content':'过年了,你们都能吃肉,而我还是得吃草。
    -
    马'}"); +mingyan.push("{'index':423,'content':'相呴以湿,相濡以沫,不若相忘于江湖。
    -
    《庄子》'}"); +mingyan.push("{'index':1090,'content':'你不了解真正的失去。唯有爱别人胜过爱自己才能体会。
    -
    《心灵捕手》'}"); +mingyan.push("{'index':1203,'content':'真正爱一个人,是不需要坚持的。而是自然而然,想要一直去爱。
    -
    咪蒙'}"); +mingyan.push("{'index':168,'content':'酒进到嘴里,爱进到眼里,这就是在衰朽和死亡之前,我们应该学会的全部真理。
    -
    叶芝'}"); +mingyan.push("{'index':177,'content':'我行过许多地方的桥,看过许多次的云,喝过许多种类的酒,却只爱过一个正当最好年龄的人。
    -
    沈从文'}"); +mingyan.push("{'index':581,'content':'如果有天我们湮没在人潮之中,庸碌一生,那是因为我们没有努力要活得丰盛。
    -
    黄碧云'}"); +mingyan.push("{'index':571,'content':'你来人间一趟,你要看看太阳,和你的心上人,一起走在街上。
    -
    海子《夏天的太阳》'}"); +mingyan.push("{'index':886,'content':'觉得以前美好,是因为那时想着慢慢来还有好长的日子,现在觉着疲惫,是因为已经少了那样的耐心,想要极速赶往未来美好的样子,殊不知,一个不小心的当下,便会造就一个不复从前的未来 。
    -
    德卡先生'}"); +mingyan.push("{'index':298,'content':'忘掉一个女人最好的办法就是把她变成文学。
    -
    《和莎莫的500天》'}"); +mingyan.push("{'index':1107,'content':'如果我们有机会重返青春现场,一定发现,那个青春,与我们相携终身,不断怀念,惊鸿照影的青春有异,我们对它的怀念,是一种刻骨的高估。
    -
    韩松落'}"); +mingyan.push("{'index':311,'content':'欢迎来到现实世界,它糟糕得要命,但你会爱上它的。
    -
    《老友记》'}"); +mingyan.push("{'index':153,'content':'我们的本质,就如同梦一般虚幻不实,而我们渺小的生命,以一场睡眠圆满落幕。
    -
    莎士比亚'}"); +mingyan.push("{'index':823,'content':'我避开无事时过分热络的友谊,这使我少些负担和承诺。我不多说无谓的闲言,这使我觉得清畅。我尽可能不去缅怀往事,因为来时的路不可能回头。我当心地去爱别人,因为比较不会泛滥。我爱哭的时候便哭,想笑的时候便笑,只要这一切出于自然。
    -
    《送你一匹马》'}"); +mingyan.push("{'index':28,'content':'这世界也并不是非白即黑,做一个属于红白蓝的梦吧。
    -
    贺伊曼'}"); +mingyan.push("{'index':1281,'content':'一个人生气蓬勃的时候决不问为什么生活,只是为生活而生活——为了生活是桩美妙的事而生活。
    -
    《约翰·克里斯朵夫》'}"); +mingyan.push("{'index':1149,'content':'时间飞逝,人生百味杂陈,无法言说。仿佛一个人写了长长的信,但未等到那个可以投递的人。
    -
    《一封信》'}"); +mingyan.push("{'index':266,'content':'年轻的时候,我也曾经以为自己是风。可是最后遍体鳞伤,我才知道我们原来都只是草。
    -
    《艋舺》'}"); +mingyan.push("{'index':118,'content':'我就是我。如果必须以头撞墙来真实待己,那么我愿意。
    -
    马龙·白兰度'}"); +mingyan.push("{'index':648,'content':'如果有一天海枯石烂,有一匹斑马向我奔来,轻柔的呼吸将我召唤,给我无边的温暖。
    -
    简·迷离 《结冰的女孩儿》'}"); +mingyan.push("{'index':692,'content':'男女之间,最难的不是情爱的发生,不是熊熊烈火的燃起,而是能将这烈火隐忍成清明的星光,照耀各自一生或繁华或寂寥的长夜。
    -
    张定浩'}"); +mingyan.push("{'index':1109,'content':'不管以什么名义,毁灭个性的做法就是专制。
    -
    约翰·斯图尔特·穆勒'}"); +mingyan.push("{'index':1144,'content':'感情最沉重的一步:我仍愿意听,你却不愿讲。
    -
    咸贵人'}"); +mingyan.push("{'index':732,'content':'有些人恐惧父母离去,或者江郎才尽还有衰老。我比较恐惧的是怕以后会埋怨自己,就是在力所能及时没有努力做一件事,当没有机会再去做时,会责备年轻的自己。
    -
    李娜'}"); +mingyan.push("{'index':1094,'content':'那些曾让你哭的事有一天你会笑着讲出来。
    -
    《我们都是坏孩子》'}"); +mingyan.push("{'index':638,'content':'水滴的特别之处在于,它们总能找到阻力最小的道路,对人类而言,情况刚刚相反。
    -
    《少年斯派维的奇异旅行》'}"); +mingyan.push("{'index':948,'content':'我们要像月光一样,通宵守着静静的春天之夜,我们要像两个儿童。你把我用你的生命裹住,教我像你一样展开笑容。
    -
    拉斯克·许勒《春天》'}"); +mingyan.push("{'index':542,'content':'我离你很远,我没有什么可以跟你说的,可是我就在这里,而且我知道你在那里。
    -
    米兰·昆德拉'}"); +mingyan.push("{'index':178,'content':'认识一个城市的最好办法,就是去认识里面的人们如何工作、如何相爱、以及如何死亡。
    -
    阿尔贝·加缪'}"); +mingyan.push("{'index':740,'content':'爱不是我们要去的方向,而是我们出发的地方。
    -
    徐超斌'}"); +mingyan.push("{'index':316,'content':'那些沉默的人,往往藏着特别大的梦。
    -
    李宇春'}"); +mingyan.push("{'index':765,'content':'我们拼命划桨,奋力与波浪抗争,最终却被冲回到我们的往昔。
    -
    菲茨杰拉德《了不起的盖茨比》'}"); +mingyan.push("{'index':187,'content':'就像一碗热汤的关怀,不可能随身携带。
    -
    王菲《蝴蝶》'}"); +mingyan.push("{'index':1146,'content':'你有太多我艳羡不及的能力,然而其中最让我咬牙嫉妒的,就是能够如此轻易得到我的真心。
    -
    张瑞琪'}"); +mingyan.push("{'index':1112,'content':'当对幸福的憧憬过于急切,那痛苦就在人的心灵深处升起。
    -
    加缪'}"); +mingyan.push("{'index':1362,'content':'只有在夜晚我们才能像个孩子那样天真地入睡,然而天亮后,仍旧必须像个大人那样认真地醒来。
    -
    周一周二'}"); +mingyan.push("{'index':121,'content':'你看过了许多美景,你看过了许多美女,你迷失在地图上每一道短暂的光阴。
    -
    陈绮贞《旅行的意义》'}"); +mingyan.push("{'index':1356,'content':'不懂的事情,你自然会多加小心,惹祸上身的是你自以为懂的事。
    -
    马克·吐温'}"); +mingyan.push("{'index':1330,'content':'有时候一天长得像一生,有时候一生短得像一天。世界上没有两个相同的一天,但每一天都适合开始,适合离别,适合爱。
    -
    周一周二'}"); +mingyan.push("{'index':1247,'content':'当你老了,回顾一生,就会发觉:什么时候出国读书,什么时候决定做第一份职业、何时选定了对象而恋爱、什么时候结婚,其实都是命运的巨变。只是当时站在三岔路口,眼见风云千樯,你作出选择的那一日,在日记上,相当沉闷和平凡,当时还以为是生命中普通的一天。
    -
    陶杰'}"); +mingyan.push("{'index':16,'content':'很高兴见到你。
    -
    韩寒'}"); +mingyan.push("{'index':513,'content':'如果你很肯定了就去行动吧,说出自己的感受是很重要的。
    -
    《听见天堂》'}"); +mingyan.push("{'index':1086,'content':'人们说的荒唐,却是我的心中的天堂。
    -
    五月天'}"); +mingyan.push("{'index':787,'content':'仰望星空时,我们知道这些星星距离我们成百上千光年,有些甚至已经不存在了。它们的光花了很长很长时间才到达地球,而在此期间,他们本身已经消失或爆炸瓦解成红矮星了。这些事实会让人觉得自己很渺小,如果生活中遇到了困难,不妨想想这些,你就会明白什么叫微不足道。
    -
    马克·哈登'}"); +mingyan.push("{'index':764,'content':'你连想改变别人的念头都不要有。要学习太阳一样,只是发出光和热,每个人接收阳光的反应有所不同,有人觉得刺眼有人觉得温暖,有人甚至躲开阳光。种子破土发芽前没有任何的迹象,是因为没到那个时间点。只有自己才是自己的拯救者。
    -
    荣格'}"); +mingyan.push("{'index':360,'content':'每一个生命都有灵魂,只是怎样唤醒他们。
    -
    《百年孤独》'}"); +mingyan.push("{'index':566,'content':'人,要么庸俗,要么孤独。
    -
    叔本华'}"); +mingyan.push("{'index':451,'content':'每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。
    -
    《挪威的森林》'}"); +mingyan.push("{'index':320,'content':'如果忘了,就不重要。
    -
    张大春'}"); +mingyan.push("{'index':47,'content':'有人翩翩求记住,有人起舞求忘记。
    -
    《加州旅馆》'}"); +mingyan.push("{'index':340,'content':'25岁的我,也许什么也没有,但命运就在我手中。
    -
    马克·塞雷纳'}"); +mingyan.push("{'index':1159,'content':'当我陈列出你的缺点,却发现自己,已成为一座想念的博物馆。
    -
    吴青峰'}"); +mingyan.push("{'index':439,'content':'万千心语,谁知其详?唯尔寂静,轻声永传。
    -
    《寂静之声》'}"); +mingyan.push("{'index':144,'content':'爱可以抵御风雪,爱可以挽救一切。「一个」工作室祝天下有情人终成眷属!'}"); +mingyan.push("{'index':1088,'content':'跟你注定要斗一辈子的那个敌人,是你自己。
    -
    马徐骏'}"); +mingyan.push("{'index':1061,'content':'战士不会去煽情战争,他们只是战斗。致敬消防战士们。
    -
    韩寒'}"); +mingyan.push("{'index':258,'content':'爱情像鲜花,它总不开放,欲望像野草,疯狂地生长。
    -
    许巍《在别处》'}"); +mingyan.push("{'index':307,'content':'当你爱一个人的时候你就应该说出来。生命只是时间中的一个停顿,一切的意义都只在它发生的那一时刻。不要等。
    -
    珍妮特·温特森'}"); +mingyan.push("{'index':945,'content':'上学后,人们问我长大了要做什么,我写下“快乐”。他们告诉我,我理解错了题目,我告诉他们,他们理解错了人生。
    -
    约翰·列侬'}"); +mingyan.push("{'index':1305,'content':'谁可相依?近处,要有可以依傍的亲人朋友,远处,要有神或者佛;实处,要有金钱,虚处,要有信仰。远近都有,虚实结合,才能填补人生的各种窟窿,抵挡生命中各种不妥,不至于凄云惨雾。
    -
    韩松落'}"); +mingyan.push("{'index':25,'content':'很多人并非喜欢文艺,而是享受当一个“喜欢文艺”的人。
    -
    贺伊曼'}"); +mingyan.push("{'index':382,'content':'太阳出来,为了生活出去,太阳落了,为了爱情回去。
    -
    周云蓬《鱼相忘于江湖》'}"); +mingyan.push("{'index':727,'content':'一个人也要好好吃饭。
    -
    《一人食》'}"); +mingyan.push("{'index':1141,'content':'人类的一个大麻烦,在于我们无法拥有说一不二的感情,敌人身上总有让我们喜欢的地方,我们的爱人身上总会有让我们讨厌之处。
    -
    叶芝'}"); +mingyan.push("{'index':705,'content':'人总是不得不跟那些庞大或细微的痛苦战斗,输掉也是英雄。每个人的痛苦,都是所有人的痛苦。每个人的失败,都是所有人的失败。每个人离去,都是为所有人牺牲。
    -
    荞麦'}"); +mingyan.push("{'index':271,'content':'我们所得到的一切,只是将我们送回童年。
    -
    《午夜牛郎》'}"); +mingyan.push("{'index':330,'content':'浪荡天涯的孩子,忽晴忽雨的江湖,祝你有梦为马,永远随处可栖。
    -
    大冰'}"); +mingyan.push("{'index':1100,'content':'是谁说伟大才值得被歌颂,乘风破浪后也不一定成功。生命只能向前,坚定信念的人都是英雄。
    -
    《Reloaded I》'}"); +mingyan.push("{'index':1263,'content':'洗手台上并排着的牙刷,被窝中碰到的脚,不知何时消失掉的冰箱中的布丁,先下楼梯,和在你的后面上楼梯……恋爱总有一天会变成生活,生活会变成喜悦。
    -
    《最完美的离婚》'}"); +mingyan.push("{'index':350,'content':'幸好不是你, 陪我到最后。
    -
    蔡康永'}"); +mingyan.push("{'index':79,'content':'正因为痛苦难以回避,你更要在它到来时仔细端详。
    -
    何禾'}"); +mingyan.push("{'index':1041,'content':'我们都曾失去过,也知道失去并不代表什么,得到也是。
    -
    血条禾'}"); +mingyan.push("{'index':762,'content':'不要那么孤独,请相信,这个世界上真的有人在过着你想要的生活。
    -
    大冰'}"); +mingyan.push("{'index':944,'content':'远离,不是放弃你,只是无法再接受你以我不愿意、不适合的方式来对待我。不愿意待在一个一点都不美丽,一点都不符合我本性的关系里。
    -
    《蒙马特遗书》'}"); +mingyan.push("{'index':370,'content':'二十几岁坠入爱河,结婚生子,三十几岁买下了房子,又突然间意识到:我不要再这样生活下去了。
    -
    《美食,祈祷,恋爱》'}"); +mingyan.push("{'index':1073,'content':'一个人,没有同类。
    -
    《刺客聂隐娘》'}"); +mingyan.push("{'index':1358,'content':'即使在清贫的岁月,也不能失去对幸福美好的向往,那些摆脱平庸的梦总能编制我们简单的生活,为我们简单的时光点缀希望。不能说我们总要多热爱生活,但总要有一颗懂得欣赏和珍惜的心。
    -
    《布鲁克林有棵树》'}"); +mingyan.push("{'index':1310,'content':'很多少年刚开始的时候多么的特立独行啊,最后都要为一个女孩而平庸。
    -
    孔龙'}"); +mingyan.push("{'index':514,'content':'世界上本没有路,有了腿便有了路。
    -
    《让子弹飞》'}"); +mingyan.push("{'index':1197,'content':'人生不只是坐着等待,好运就会从天而降。就算命中注定,也要自己去把它找出来。
    -
    李安'}"); +mingyan.push("{'index':672,'content':'“你知道人类最大的武器是什么吗?”“是豁出去的决心。”
    -
    伊坂幸太郎'}"); +mingyan.push("{'index':328,'content':'钻牛角尖的过程是琐碎无趣的,但钻出头就是一个新世界了。
    -
    马良'}"); +mingyan.push("{'index':1185,'content':'没人可以永远的活在青春里,但还好,如若有心,我们能见证一代又一代的年轻。这种见证,也便成了一种参与。
    -
    自由极光'}"); +mingyan.push("{'index':291,'content':'我经常卖萌,可是从没人买。
    -
    李瑶瑶'}"); +mingyan.push("{'index':1196,'content':'从来就没有跨不过去的坎,但总有人要重蹈覆辙。周而复始,愈演愈烈。
    -
    张瑞琪'}"); +mingyan.push("{'index':1053,'content':'我曾听人说过,当你不能够再拥有,你唯一可以做的,就是令自己不要忘记。
    -
    《东邪西毒》'}"); +mingyan.push("{'index':1288,'content':'我们最终都要远行,最终都要跟稚嫩的自己告别。
    -
    海子'}"); +mingyan.push("{'index':643,'content':'我依赖大海,并且信仰高山,最好你经过我身旁,你也喜欢我这一种简单。
    -
    张楚《到达》'}"); +mingyan.push("{'index':598,'content':'五月是残忍的。所有的猫都在叫春,而我爱的你还在冬眠。520。
    -
    「好多条短裤」'}"); +mingyan.push("{'index':430,'content':'在地图上,标记你到过的地方,勾画你途经的路线,看你我究竟相隔多少河流山川,多少湖泊海洋,多少草原沙漠。最后计算距离时才恍悟,也不过心上一步之遥。
    -
    -我是这海底的咸鱼-'}"); +mingyan.push("{'index':795,'content':'谁会真正帮助你,谁会真正陪在你身边,谁会说一声“我马上就到”。纵使知道孤独是常态人生总要自己面对,当确确实实有这样的人出现在身边,你突然发现,他们从来就不是那群天天说爱你爱得要死的人。
    -
    琦殿'}"); +mingyan.push("{'index':586,'content':'生命来到窗前,不吭一声,拎走了我们,谁为情所困,谁为爱牺牲,谁比谁深刻。
    -
    吴青峰'}"); +mingyan.push("{'index':272,'content':'记住这每天每夜,你要永远感到你很自由。
    -
    《随心所欲》'}"); +mingyan.push("{'index':501,'content':'两条道路分散在树林里,而我选择的那条更少人迹,从此决定了我人生的迥异。
    -
    罗伯特·弗罗斯特'}"); +mingyan.push("{'index':215,'content':'你那能叫活着么?你那只能叫没死。
    -
    《疯狂原始人》'}"); +mingyan.push("{'index':1322,'content':'爱情是现代社会唯一的狩猎活动,而猎物只有回忆。
    -
    苏更生'}"); +mingyan.push("{'index':1215,'content':'如果人生丧失欲望,在生活面前几乎等同于束手就擒。
    -
    巴伐利亚酒神'}"); +mingyan.push("{'index':962,'content':'有时我想,所有人都是一样的。在各自粉饰的外表下都有千疮百孔的人生和一个暗黑的深渊。如果了知这些,不会觉得自己特别,也不会觉得自己无辜。
    -
    安妮宝贝《一封信》'}"); +mingyan.push("{'index':877,'content':'有时候,你对人生所有的规划,抵不过命运一次不怀好意的安排。
    -
    扶南'}"); +mingyan.push("{'index':1246,'content':'多想和你一样臭不要脸,墨镜和表情都挂在脸上,穿什么吃什么玩什么都可以,今天爱他明天恨他也可以。
    -
    《定西》'}"); +mingyan.push("{'index':1282,'content':'世间最好的默契,并非有人懂你的言外之意,而是有人懂你的欲言又止。
    -
    瑞卡斯'}"); +mingyan.push("{'index':1020,'content':'这里没有陌路,你从不曾孤独。
    -
    韩寒'}"); +mingyan.push("{'index':681,'content':'好的时光是哪一段并无太大意义,因为所有的时光都是被辜负被浪费的,也只有在辜负浪费之后,才能从记忆里将某一段拎出,拍拍上面沉积的灰尘,感叹它是最好的时光。
    -
    《最好的时光》'}"); +mingyan.push("{'index':569,'content':'世界无论如何混乱肮脏,坚定的理想主义者也能胜出。
    -
    连岳'}"); +mingyan.push("{'index':1297,'content':'你知道这世界本就是欠缺激情与逻辑的,我们才不甘心平淡,所以我们发疯的姿态才会那么好看。爱你的时候,错的也是对的。爱你的时候,只有我愿意,没有不可以。
    -
    郑执'}"); +mingyan.push("{'index':464,'content':'即使以为自己的感情已经干涸得无法给予,也总会有一个时刻一样东西能拨动心灵深处的弦。我们毕竟不是生来就享受孤独的。
    -
    加西亚·马尔克斯'}"); +mingyan.push("{'index':431,'content':'我理解的爱情,似乎要有些惊心动魄伤筋动骨的东西。如果没有痛感,而只有快感,那就是成年人的一种两性关系而已。
    -
    《1980年代的爱情》'}"); +mingyan.push("{'index':731,'content':'来年陌生的,是昨日最亲的某某。
    -
    黄伟文'}"); +mingyan.push("{'index':401,'content':'年华似水匆匆一瞥,多少岁月轻描淡写。
    -
    黄磊'}"); +mingyan.push("{'index':359,'content':'爱是想触碰又收回手。
    -
    塞林格《破碎故事之心》'}"); +mingyan.push("{'index':1125,'content':'满以为这些年我们终于跑赢了时间,却再也追不回最初的种种遇见。那些不断在岁月里翻滚颠簸、看起来割舍不掉的耿耿于怀,也不过是寂寞十足的内心戏。
    -
    张瑞琪'}"); +mingyan.push("{'index':1122,'content':'我们无法做到完美,所以我评价一个人就看他在做不可能完成的事情时,失败得有多精彩。
    -
    威廉·福克纳'}"); +mingyan.push("{'index':66,'content':'人生一大憾事是其始也至善,一日不如一日,至其终则坏无可坏。
    -
    马克·吐温'}"); +mingyan.push("{'index':135,'content':'没有“生活”,从来只有“忍耐”。
    -
    贺伊曼'}"); +mingyan.push("{'index':15,'content':'如果快乐是一种发明,它很容易被一再发明。
    -
    小饭'}"); +mingyan.push("{'index':592,'content':'我觉得中国需要一些非常彪悍的个性的人,彪悍到可以独立的与这个时代共舞,参与到里面,改变它,影响它。而不是穿上盔甲,说我是独立的,眼睁睁看着所有的事情覆水难收。
    -
    贾樟柯'}"); +mingyan.push("{'index':59,'content':'他不在了,不再存在,进入他根本不知道的乌有乡。正如他当初的恐惧。
    -
    菲利普·罗斯'}"); +mingyan.push("{'index':1019,'content':'说过很多潇洒的话,做过很多打脸的事。
    -
    许灵子'}"); +mingyan.push("{'index':1380,'content':'人永远都无法知道自己该要什么,因为人只能活一次,既不能拿它跟前世相比,也不能在来生加以修正。没有任何方法可以检验哪种抉择是好的,因为不存在任何比较。一切都是马上经历,仅此一次,不能准备。
    -
    《不能承受的生命之轻》'}"); +mingyan.push("{'index':1014,'content':'人与人的缘分总是长长短短,像削铅笔。越是适切,消耗越是大。
    -
    张怡微《哀眠》'}"); +mingyan.push("{'index':1329,'content':'不再迷恋时光机这种存在,因为已经明白,无论再给我多少次机会,我还是会把一切搞砸的;因为我怕万一选了别的路,就无法遇见你了。
    -
    李珊珊'}"); +mingyan.push("{'index':50,'content':'你知道么,青春可短暂了。
    -
    《与青春有关的日子》'}"); +mingyan.push("{'index':1302,'content':'生活哪里是一层一层上台阶或下台阶,生活分明是踩着一块浮冰去另一块浮冰,却永不知岸在何处。
    -
    吕彦妮'}"); +mingyan.push("{'index':560,'content':'让我感谢你,赠我空欢喜。
    -
    林夕'}"); +mingyan.push("{'index':721,'content':'活得匆忙,来不及感受。
    -
    维亚塞姆斯基'}"); +mingyan.push("{'index':345,'content':'多余的财富只能购买多余的东西,人的灵魂必需的东西,是不需要花钱买的。
    -
    亨利·戴维·梭罗'}"); +mingyan.push("{'index':1222,'content':'青春期的小姑娘对于爱情幻想的太满,往往因为得到的太寥寥而攒下失望。但是我从未后悔。直到现在我也觉得那些我日复一日写的关于他的日记,牵手时的汗滴,拥抱过后的别离,都是青春给我为数不多的糖。
    -
    山支'}"); +mingyan.push("{'index':607,'content':'你们必须努力寻找自己的声音,因为你越迟开始寻找,找到的可能性就越小。
    -
    《死亡诗社》'}"); +mingyan.push("{'index':960,'content':'你有时会站在自己的那座孤独山丘,以为风尘滚滚也会比别人高瞻远瞩。
    -
    编号223'}"); +mingyan.push("{'index':1034,'content':'生命的复杂,就在于不可预期,不容解释,不能厘清。好像走在迷雾里,看不见任何方向,没有人可以判别前面是否断崖或绝路。生命只能持续走下去,直到雾散了,答案才终得明白。
    -
    《谁在暗中眨眼睛》'}"); +mingyan.push("{'index':476,'content':'你既有所求,便要拿天真来换。
    -
    翟永明'}"); +mingyan.push("{'index':1121,'content':'为了给遗憾找个借口,我们从一开始就把一些人放在了等待怀念的位置。
    -
    郑执'}"); +mingyan.push("{'index':825,'content':'我们为什么如此热爱未来,是因为我们将生活在那里。
    -
    短裤君'}"); +mingyan.push("{'index':907,'content':'初见你时你给我你的心,里面是一个春天的早晨。再见你时你给我你的话,说不出的是炽烈的火夏。三次见你你给我你的手,里面藏着个叶落的深秋。最后见你是我做的短梦,梦里有你还有一群冬风。
    -
    邵洵美《季候》'}"); +mingyan.push("{'index':541,'content':'我遇见你,我记得你,这座城市天生就适合恋爱,你天生就适合我的灵魂。
    -
    杜拉斯'}"); +mingyan.push("{'index':908,'content':'所谓生活的滋味不一定是在你住在高级酒店的一刻,也不一定都是你一览众山小时的感慨,而是我们乏味似水的时时刻刻。
    -
    朱白'}"); +mingyan.push("{'index':725,'content':'听过冬雪夏蝉,不管说了什么总有什么说不出。尝过悲欢离合,不管留下什么总有什么留不住。就算一路走来,不管是好是坏只怕都是不归路。就算一步一步一步的走下去,只怕走不到最初。
    -
    《最初》'}"); +mingyan.push("{'index':1003,'content':'我可以锁住笔,为什么却锁不住爱和忧伤。在长长的一生里,为什么欢乐总是乍现就凋落。走得最急的都是最美的时光。
    -
    席慕蓉《为什么》'}"); +mingyan.push("{'index':516,'content':'父母总是以为我不会长大,他们错了。我总是以为父母不会变老,我也错了。
    -
    《蓝鱼手绘日记》'}"); +mingyan.push("{'index':844,'content':'当时间到来,我们不得不挥手告别熟悉的世界,告别我们深知的一切,告别认为会永不抛弃我们的人,当这些改变最终发生的时候,当熟悉远离而陌生来临的时候,我们所能做到的,就是说声“你好,欢迎”。
    -
    《绝望的主妇》'}"); +mingyan.push("{'index':65,'content':'世界上那么多纷纷扰扰,能真正和你产生关系的不多;外面那么冷,你更要记住那个帮你暖被窝的。
    -
    韩寒'}"); +mingyan.push("{'index':1188,'content':'自由自在地思想,自由自在地瞎想,自由自在地少想,自由自在地选择我自己的生活,选择我自身。
    -
    弗朗索瓦丝·萨冈'}"); +mingyan.push("{'index':1228,'content':'对任何的异地恋来说,也许关怀与温暖鞭长莫及,但是冷漠与疏离却可以翻山越岭而来。
    -
    金国栋'}"); +mingyan.push("{'index':994,'content':'初恋就像一壶白开水,不管当初多么沸腾,放得久了,终究是一壶凉白开。
    -
    午歌'}"); +mingyan.push("{'index':1123,'content':'和云朵相比,生活牢固多了。经久不变,近乎永恒。
    -
    辛波斯卡'}"); +mingyan.push("{'index':668,'content':'你选择和谁在一起,就是选择了一种生活方式和价值观。
    -
    佚名'}"); +mingyan.push("{'index':683,'content':'我想很多人都有这种经验。你不能主动,你不能做任何事,你只能等他心血来潮问候几句的时候平淡和缓不慌地应答,你不该成为逼迫的力量,你是一株等待季节性阵雨的沙漠植物。
    -
    梁文道'}"); +mingyan.push("{'index':337,'content':'冒一次想冒的险,带着全心理好的花朵或礼物,在途上送给自己。
    -
    杨宗纬'}"); +mingyan.push("{'index':1372,'content':'人的出场顺序很重要,陪你喝醉的人注定没办法送你回家。
    -
    暖小团'}"); +mingyan.push("{'index':381,'content':'我们周年纪念只是为了提醒大家,又一年了,别拖延了。
    -
    韩寒'}"); +mingyan.push("{'index':1028,'content':'有很多事 ,不用解释,时间会让我懂事;傻瓜才在年轻时候不做傻事,羡慕别人有故事。
    -
    邵夷贝'}"); +mingyan.push("{'index':306,'content':'大学就像养老院,而且事实上,更多人死在了大学里。
    -
    鲍勃·迪伦'}"); +mingyan.push("{'index':845,'content':'需要很多力量,很多傲气,或者很多爱,才能相信人的行动是有价值的,相信生命胜过死亡。
    -
    西蒙娜·德·波伏娃'}"); +mingyan.push("{'index':31,'content':'人世间,不离骚。
    -
    小饭'}"); +mingyan.push("{'index':949,'content':'心,生来就是要碎的。
    -
    王尔德'}"); +mingyan.push("{'index':318,'content':'300击。
    -
    韩寒'}"); +mingyan.push("{'index':198,'content':'冬天以后,我们就都要张开双手,让风吹过童年的无忧。
    -
    《Michelle的第一天》'}"); +mingyan.push("{'index':341,'content':'有时候,一个人的业余活动也许比他的职业还更重要。
    -
    胡适'}"); +mingyan.push("{'index':1042,'content':'爱恋不过是一场高烧,思念是紧跟着的好不了的咳。
    -
    李宗盛'}"); +mingyan.push("{'index':587,'content':'时间会带你去最正确的人身边。请先好好爱着自己。然后那个还不知道在哪里的人,会来接你。
    -
    《岁月的童话》'}"); +mingyan.push("{'index':93,'content':'聪明从来都是把事情归纳得更简单。
    -
    何禾'}"); +mingyan.push("{'index':993,'content':'所谓教育,也许就是这样,爱与耐心,加上孩子能明白的方式。这世界不是那么好,也不是那么坏,但这世界上的很多东西不能只用好或者坏来形容。
    -
    《这里会长出一朵花》'}"); +mingyan.push("{'index':1210,'content':'你要等的人,也许并不是和你在人群中谈笑嬉闹,把酒言欢的那一个,而是能在安静的时光里,与你认真分享彼此孤独的人。
    -
    午歌'}"); +mingyan.push("{'index':260,'content':'最近几年的经历教会我一个道理,那就是,只要你努力,世界上没有什么事是搞不砸的。
    -
    尼克·霍恩比'}"); +mingyan.push("{'index':475,'content':'多少人,以朋友的名义,爱着一个人。
    -
    《One Day》'}"); +mingyan.push("{'index':184,'content':'在你恋爱的地方,所有的家具都得清除出房间,所有的树木,所有的山脉,所有的海洋。这世界太狭窄了。
    -
    耶胡达·阿米亥'}"); +mingyan.push("{'index':132,'content':'没有以前的过去,就不会成就现在的自己。
    -
    萧敬腾'}"); +mingyan.push("{'index':242,'content':'不能忍受无聊的一代人,将是平庸的一代人。
    -
    罗素'}"); +mingyan.push("{'index':232,'content':'应该像一只鸟儿那样轻,而不是像一根羽毛。
    -
    保尔•瓦莱里'}"); +mingyan.push("{'index':716,'content':'我所理解的生活,就是和喜欢的一切在一起。
    -
    韩寒'}"); +mingyan.push("{'index':773,'content':'小孩子才问你为什么不理我了,是不是不喜欢我了,成年人都是默契地相互疏远。
    -
    玍几'}"); +mingyan.push("{'index':217,'content':'你最好不要爱上我,因为游侠是不需要女人的,游侠非常孤独。
    -
    《森林好小子》'}"); +mingyan.push("{'index':526,'content':'你以为挑起生活的担子是勇气,其实去过自己真正想要的生活才更需要勇气。
    -
    《革命之路》'}"); +mingyan.push("{'index':36,'content':'心事是很难隐藏的,把嘴巴捂住它就会从眼睛里冒出来。
    -
    飞机'}"); +mingyan.push("{'index':863,'content':'城市是一个几百万人一起孤独地生活的地方。
    -
    梭罗'}"); +mingyan.push("{'index':452,'content':'每个人都会经过这个阶段,看见一座山,就想知道山后面是什么。我很想告诉他,可能翻过去山后面,你会发觉没有什么特别。
    -
    《东邪西毒》'}"); +mingyan.push("{'index':1099,'content':'这么多年过去,你依然是我愿意绕很远很远的路去接近的人。
    -
    花大钱'}"); +mingyan.push("{'index':410,'content':'我什么也没忘,但有些事只适合收藏。
    -
    史铁生'}"); +mingyan.push("{'index':101,'content':'游子的心是风霜剥蚀的残碑,碑上已经漶漫了家乡的字迹。
    -
    闻一多'}"); +mingyan.push("{'index':363,'content':'长的是磨难,短的是人生。
    -
    张爱玲'}"); +mingyan.push("{'index':163,'content':'曾感到过寂寞,也曾被别人冷落 ,却从未有感觉我无地自容。
    -
    黑豹《无地自容》'}"); +mingyan.push("{'index':656,'content':'继续跑,带着赤子的骄傲,生命的闪耀不坚持到底怎能看到,与其苟延残喘不如纵情燃烧,为了心中的美好,不妥协直到变老。
    -
    《追梦赤子心》'}"); +mingyan.push("{'index':497,'content':'我们必须在爱中成长,为此我们必须不停地去爱,去给予,直至成伤。
    -
    特蕾莎修女'}"); +mingyan.push("{'index':956,'content':'人就是这样,一旦有了信仰,他就有决心与毅力去浪费时光。
    -
    《推拿》'}"); +mingyan.push("{'index':1145,'content':'你要做一个不动声色的大人了。不准情绪化,不准偷偷想念,不准回头看。去过自己另外的生活。
    -
    村上春树'}"); +mingyan.push("{'index':851,'content':'不知何时起,我们开始不惮以最坏的恶意推测爱情,拷问它的不堪一击,讥讽它的变质过期,却发现泪水反而更加四溢,当爱情再度来临,仍然奋不顾身前去。那并没有什么丢脸。因为爱,即是人性。
    -
    蒋话《杀手的礼物》'}"); +mingyan.push("{'index':361,'content':'我经常有种奇特的感觉,我觉得自己仿佛是一个躺在床上垂死的老妇人,而我的一生就是她的回忆。
    -
    《爱在黎明破晓前》'}"); +mingyan.push("{'index':95,'content':'我把我整个的灵魂都给你,连同它的怪癖,耍小脾气,忽明忽暗,一千八百种坏毛病。它真讨厌,只有一点好,爱你。
    -
    王小波'}"); +mingyan.push("{'index':941,'content':'把微笑放在,眼泪干枯了的地方。
    -
    小沙弥'}"); +mingyan.push("{'index':1216,'content':'过去理解的爱情,不过是相互纠缠撕扯的一次晕头转向。而真正对的那个人,应该有势均力敌的气力,让彼此看到生活的平静与欣喜。
    -
    残小雪'}"); +mingyan.push("{'index':448,'content':'人啊,根据重新振作的方法,大概可以分为两种:一种是看着比自己卑微的东西,找寻垫底的借以自慰;另一种是看着比自己伟大的东西,狠狠地踢醒毫无气度的自己。
    -
    《银魂》'}"); +mingyan.push("{'index':457,'content':'人充满劳绩,但还诗意地安居于这块大地之上。
    -
    荷尔德林'}"); +mingyan.push("{'index':191,'content':'爱上一匹野马,可我的家里没有草原。
    -
    宋冬野《董小姐》'}"); +mingyan.push("{'index':14,'content':'是狼是人,日久见心。
    -
    小饭'}"); +mingyan.push("{'index':1160,'content':'真正的爱,就是两份孤独,相护,相抚,喜相逢。
    -
    聂华苓'}"); +mingyan.push("{'index':901,'content':'我愿意深深地扎入生活,吮尽生活的骨髓,过得扎实,简单,把一切不属于生活的内容剔除得干净利落,把生活逼到绝处,简单最基本的形式,简单,简单,再简单。
    -
    《瓦尔登湖》'}"); +mingyan.push("{'index':42,'content':'走开,让一个单身胖子悲伤一会儿。
    -
    张冠仁'}"); +mingyan.push("{'index':1369,'content':'“夏令营”这个词此后在我的生活里再没有出现过,有些词在人生里是有时态的,过一定的年纪之后,这个词便和你无关了。
    -
    马良'}"); +mingyan.push("{'index':935,'content':'知道么,心有灵犀,倾盖如故。我想,你和我是很多年很多年前,宇宙爆炸时,同一个灵魂的两枚碎片。
    -
    庄雅婷'}"); +mingyan.push("{'index':1202,'content':'爱的反义词不是恨,是厌倦 。人生的反义词也不是死亡,而是别人的人生。
    -
    贾彬彬'}"); +mingyan.push("{'index':665,'content':'人一老,对于自己是不是被别人多余最为敏感,他们整天都在看儿女们甚至孙儿孙女们的脸色,看看自己在他们生活里的定位错了没有,错了就是多余。没有比发现自己多余更凄惨的事。
    -
    严歌苓《陆犯焉识》'}"); +mingyan.push("{'index':1217,'content':'暧昧的美妙在于彼此试探、相互猜忌、想前进又后退了几步,在情意中兜转,但它的坏处是,最后你不是输给了爱不爱,而是败在了狠不狠。
    -
    苏更生'}"); +mingyan.push("{'index':882,'content':'切记不要与自身的平凡为敌,也没有必要把自己变得不像自己。
    -
    许钧'}"); +mingyan.push("{'index':470,'content':'你好,2014。
    -
    「一个」工作室'}"); +mingyan.push("{'index':1181,'content':'灵魂只能独行,陪伴不是把别人拉到你的生活轨迹上,或者强行进入别人的世界找到一个位置,陪伴是一种心灵的在场,就好像我不用问候一声,也知道你一定随时会回应我的召唤。
    -
    大将军郭'}"); +mingyan.push("{'index':599,'content':'我有太多的方向,以至于总是习惯回头看,看见我只有一个出发的地方,这就是我去哪里都不怕错的理由了。
    -
    陈绮贞'}"); +mingyan.push("{'index':321,'content':'忠诚的意义在于我们不应该忘记爱过的每一个人。
    -
    《忠犬八公》'}"); +mingyan.push("{'index':929,'content':'永远要记得,被命运打趴下的时候,我们还是要爬起来,拍拍身上的土说,来,咱们三局两胜。
    -
    八月长安'}"); +mingyan.push("{'index':975,'content':'你始终不明白,一万个美丽的未来,抵不上一个温暖的现在。
    -
    《关于现在关于未来》'}"); +mingyan.push("{'index':440,'content':'爱吃东西的人,都是好人。因为他们拼命追求美食,没有时间去害人。
    -
    网络'}"); +mingyan.push("{'index':180,'content':'谁会坚强与我并肩同行?某时某地,越过街垒,是否有个你渴求的新世界?
    -
    《悲惨世界》'}"); +mingyan.push("{'index':884,'content':'出发总是美丽的,尤其是在一个阳光普照的清晨上路。
    -
    三毛'}"); +mingyan.push("{'index':1075,'content':'我在快乐这两个字都不知道怎么写的年纪最快乐。
    -
    夏正正'}"); +mingyan.push("{'index':394,'content':'什么叫多余?夏天的棉袄,冬天的蒲扇,还有等我已经心冷后你的殷勤。
    -
    李碧华'}"); +mingyan.push("{'index':1117,'content':'深思熟虑的结果往往就是说不清楚。
    -
    王小波'}"); +mingyan.push("{'index':1056,'content':'两个人之间最好的感觉就是,表面相互嫌弃,心中不离不弃。
    -
    李云龙'}"); +mingyan.push("{'index':156,'content':'你一天只吃3顿饭,睡1张床,要那么多钱干嘛?
    -
    温格'}"); +mingyan.push("{'index':357,'content':'这个城市有八百万个故事在上演,这只是其中一个。
    -
    《裸露城市》'}"); +mingyan.push("{'index':254,'content':'这是一个很悲伤的故事。
    -
    走走《孟加拉虎》'}"); +mingyan.push("{'index':27,'content':'想拥有更爱这个世界的能力。天冷了,请各位注意保暖。
    -
    《一个》全体'}"); +mingyan.push("{'index':282,'content':'我喜欢这种暴风雨前短暂的平静。
    -
    《这个杀手不太冷》'}"); +mingyan.push("{'index':327,'content':'每个人都有失恋的时候,而每一次我失恋,我都会去跑步。
    -
    《重庆森林》'}"); +mingyan.push("{'index':136,'content':'我们是夏天的爱人,冬天只是一个童话。
    -
    顾城'}"); +mingyan.push("{'index':1191,'content':'孤独与生俱来,谈恋爱只是有个人陪你孤独,不代表就能幸免于难。
    -
    贾彬彬'}"); +mingyan.push("{'index':887,'content':'生活的真实情况很简单。最初我们什么都怕,怕动物、天气、树木、夜空,但就是不怕同类。如今我们怕同类,却几乎不怕其他东西。
    -
    《项塔兰》'}"); +mingyan.push("{'index':1036,'content':'错的事只会在最对的时候发生。
    -
    《杀破狼2》'}"); +mingyan.push("{'index':1363,'content':'相互欺骗,却又令人惊奇地不受到任何伤害,甚至于就好象没有察觉到彼此在欺骗似的,这种不加掩饰从而显得清冽、豁达的互不信任的例子,在人类生活中比比皆是。
    -
    太宰治'}"); +mingyan.push("{'index':43,'content':'万人如海只身藏, 你和世界的距离感决定了你能得到什么。
    -
    马一木'}"); +mingyan.push("{'index':413,'content':'“大丈夫何患无妻。”
    -
    「一个」工作室'}"); +mingyan.push("{'index':1326,'content':'我劝大家口味不要太窄,什么都要尝尝,不管是古代的还是异地的食物,比如葵和薤,都吃一点。一个一年到头吃大白菜的人是没有口福的。
    -
    汪曾祺'}"); +mingyan.push("{'index':591,'content':'我从出生那天起就是我自己。如果你不能理解,那是你的失败,不是我的。
    -
    《大鱼》'}"); +mingyan.push("{'index':412,'content':'若非心里有人,怎会暗里有光。
    -
    Sandy King'}"); +mingyan.push("{'index':719,'content':'青春是人生的实验课,错也错得很值得。
    -
    《笑忘歌》'}"); +mingyan.push("{'index':1012,'content':'先变成更喜欢的自己,然后遇到一个不需要取悦的人。
    -
    卢思浩 《愿有人陪你颠沛流离》'}"); +mingyan.push("{'index':741,'content':'从今以后,别再过你应该过的人生,去过你想过的人生吧!
    -
    梭罗'}"); +mingyan.push("{'index':695,'content':'这世上有成千上万种爱,但从来没有一种爱可以重来。
    -
    菲茨杰拉德'}"); +mingyan.push("{'index':953,'content':'命运是任何人也无法改变的,但他可以决定是等死还是面对。
    -
    《幽灵公主》'}"); +mingyan.push("{'index':767,'content':'关于爱情的路,我们都曾经走过,关于爱情的歌,我们已听的太多,关于我们的事,他们统统都猜错,关于心中的话,只对你一个人说。
    -
    《生命中的精灵》'}"); +mingyan.push("{'index':997,'content':'人生不仅要能享受那些成功时刻让人激情澎湃的成名天下扬,也要能承受之前若干年漫长岁月里寂寞冷淡带来的寒窗无人问。
    -
    暖小团'}"); +mingyan.push("{'index':1106,'content':'男女之间不可能存在友谊,有的只是爱恨情仇。
    -
    王尔德'}"); +mingyan.push("{'index':1013,'content':'如果我真的存在,也是因为你需要我。
    -
    克莱尔•麦克福尔'}"); +mingyan.push("{'index':122,'content':'你不会失去从来就没占有过的东西。
    -
    托妮·莫里森'}"); +mingyan.push("{'index':568,'content':'在吗?在干嘛?想你了。晚安。搅乱你的生活,这四句足矣。
    -
    十三空'}"); +mingyan.push("{'index':461,'content':'最端正的杯子,是橘子,它在树上跳舞,一滴水也不洒出来。
    -
    顾城'}"); +mingyan.push("{'index':1241,'content':'老了之后才懂得一些最质朴的人生真谛,比如:茫茫人海中,就数讨厌我的人最讨厌。
    -
    咪蒙'}"); +mingyan.push("{'index':536,'content':'人们总是喜欢用“如果”去勾勒一些莫须有的奇迹。可大部分“如果”都不可兑现,不过是从希望到绝望的一个缓冲地带。
    -
    《阿司匹林》'}"); +mingyan.push("{'index':924,'content':'重要的事往往最难以启齿,因为言语会缩小其重要性;要让素昧平生的人在意你生命中的美好事物,原本就不容易。
    -
    斯蒂芬·金'}"); +mingyan.push("{'index':885,'content':'一望可相见,一步如重城。所爱隔山海,山海不可平。
    -
    Littlesen'}"); +mingyan.push("{'index':551,'content':'没有玩具的孩子最落寞,可是没有梦的男人是什么。
    -
    《关于男人》'}"); +mingyan.push("{'index':778,'content':'从来都无法得知,人们是究竟为什么会爱上另一个人。我猜也许我们心上都有一个缺口,呼呼往灵魂里灌着寒风,我们急切需要一个正好形状的心来填上它,就算你是太阳一样完美正圆形,可是我心里的缺口,或许恰恰是个歪歪扭扭的锯齿形,你填不了。
    -
    毛姆《面纱》'}"); +mingyan.push("{'index':505,'content':'不怕路长,只怕心老。
    -
    佚名'}"); +mingyan.push("{'index':522,'content':'杯中的水是亮闪闪的,海里的水是黑沉沉的。小道理可用文字说清楚,大道理却只有伟大的沉默。
    -
    泰戈尔'}"); +mingyan.push("{'index':1296,'content':'每一次身心俱疲的恋情后,总会尾随着下一次的爱与被爱。心永远没有用完的那天。就像小时候哭得停不下来,那时以为是一场喘不上气的灾难,哪会知道,原来还有一辈子的眼泪要流。
    -
    贾彬彬'}"); +mingyan.push("{'index':333,'content':'虽然花会零落,但会重开。
    -
    《一生所爱》'}"); +mingyan.push("{'index':684,'content':'生活嘛,慢慢去做好了。更多的变化会在更短的时间里涤荡这片大地,然而哪怕是世界翻了个个儿,古老的心灵仍然耐心地走在命运的道路上。
    -
    李娟《走夜路请放声歌唱》'}"); +mingyan.push("{'index':1179,'content':'你要学会克制,因为只有这样,放纵起来才会更好玩儿呢。
    -
    花大钱'}"); +mingyan.push("{'index':1077,'content':'我知道在我将命运的改变希冀在幸运上的时候,我就是一个失败者。
    -
    乔诗伟'}"); +mingyan.push("{'index':833,'content':'这城市真他妈痛苦,但她越痛苦我就越爱她。活着,是主旋律,我们像一粒石子,打磨着这个世界,也被这个世界打磨。认真活着,吃饭,喝茶,做爱,做爱做的事,永远选择难走的路。
    -
    Aly Song'}"); +mingyan.push("{'index':130,'content':'真正重要的东西,总是没有的人比拥有的人更清楚,所以,可要好好珍惜啊。
    -
    《银魂》'}"); +mingyan.push("{'index':371,'content':'我爱你却更爱自由。
    -
    汪峰《旅途》'}"); +mingyan.push("{'index':654,'content':'一举一动,都是承诺,会被另一个人看在眼里,记在心上的。
    -
    《悬崖上的金鱼姬》'}"); +mingyan.push("{'index':1365,'content':'有的时候我真觉得全世界都像海上撞沉了船,最要紧的还是救出自己。
    -
    易卜生'}"); +mingyan.push("{'index':783,'content':'如果没有那么多的感动,那么多的痛苦,在狂喜和绝望的两极来来回回,活着还有什么意思呢?
    -
    《恋爱的犀牛》'}"); +mingyan.push("{'index':119,'content':'一枝枯萎的鲜花,不会再盛开。人、鸟、虫……光辉的星星都只有一次生命。
    -
    白银圣斗士奥路菲'}"); +mingyan.push("{'index':880,'content':'在我生命中曾有过那么一个时刻,那时我多年轻啊,早上睁开眼睛,会想,这是一个开始,未来的一切都会更好,这是所有幸福的开始。现在我才明白,其实那就是幸福了。
    -
    《时时刻刻》'}"); +mingyan.push("{'index':1044,'content':'只恨我当时年纪小,看不懂她那小小花招背后的一片柔情。
    -
    《小王子》'}"); +mingyan.push("{'index':188,'content':'没有你,良辰美景可与何人说。
    -
    《天使爱美丽》'}"); +mingyan.push("{'index':1166,'content':'我喜欢在大街上闲逛,无所事事。在成人的世界中有一种被忽略的安全感。只要不仰视,看到的都是胸以下的部分,不必为长得太丑的人难过,也不必为人间喜怒哀乐分心。
    -
    北岛《城门开》'}"); +mingyan.push("{'index':777,'content':'世间最痛苦之事,莫过于泯然众人,默默无闻。
    -
    佚名'}"); +mingyan.push("{'index':606,'content':'真心对你好的人不会很多,一个也别弄丢了。
    -
    张嘉佳'}"); +mingyan.push("{'index':51,'content':'是谁来自山川湖海,却囿于昼夜、厨房与爱。
    -
    《揪心的玩笑与漫长的白日梦》'}"); +mingyan.push("{'index':265,'content':'人生如路,须在荒凉中走出繁华的风景来。
    -
    七堇年'}"); +mingyan.push("{'index':169,'content':'成熟这个过程是那么必然,果实总会落地。
    -
    何禾'}"); +mingyan.push("{'index':262,'content':'眼泪的存在,是为了证明悲伤不是一场幻觉。
    -
    《恋人絮语》'}"); +mingyan.push("{'index':335,'content':'活着就意味必须要做点什么,请好好努力。
    -
    村上春树《地下》'}"); +mingyan.push("{'index':17,'content':'有比孤独更紧迫的事,云存储的使用空间到期了。
    -
    蔡蕾'}"); +mingyan.push("{'index':1327,'content':'努力改变不了命运,苦难也不会变成财富,真正能改变命运的是你的状态。同样的粗茶淡饭起早摸黑,有人如饮毒酒也有人奋起直追。你的努力不能决定未来,但可以决定当下你是充满朝气和期望的侠客。你要知道,命运从不是未来的那个结果,而是此时此刻。
    -
    姬霄'}"); +mingyan.push("{'index':120,'content':'谁陪你一起长大,谁就是你的朋友。
    -
    小饭【往期精选】'}"); +mingyan.push("{'index':493,'content':'信仰是沉重的负担,你知道吗?就像一个躲在黑暗中的爱人,无论你怎样呼唤,她都不会出现。
    -
    《第七封印》'}"); +mingyan.push("{'index':950,'content':'象棋比生活好。在这个世界上,根本没有全身而退这种事情。
    -
    《一切破碎,一切成灰》'}"); +mingyan.push("{'index':1118,'content':'我知道你眼中的我不是我自己。
    -
    《冒险乐园》'}"); +mingyan.push("{'index':999,'content':'爱上一个人,会亢奋,爱着一个人,会沉溺,爱错一个人,会痛,而爱过的那个人,最有理由去遗忘。
    -
    王云超'}"); +mingyan.push("{'index':375,'content':'人一生会遇到约2920万人,两个人相爱的概率是0.000049,所以你不爱我,我不怪你。
    -
    佚名'}"); +mingyan.push("{'index':499,'content':'人们常常会欺骗你,是为了让你明白,有时候,你唯一应该相信的人就是你自己。
    -
    《千与千寻》'}"); +mingyan.push("{'index':1243,'content':'你不是人,你是天使,遇到你是我这辈子最大的狗屎运。
    -
    《美人鱼》'}"); +mingyan.push("{'index':226,'content':'来啊,快活啊,反正有,大把时光。
    -
    《痒》'}"); +mingyan.push("{'index':636,'content':'一些人想要改变世界,而另外一些人想要保护她。
    -
    NASA中文'}"); +mingyan.push("{'index':1314,'content':'时间决定你会在生命中遇见谁,你的心决定你想要谁出现在你的生命里,而你的行为决定最后谁能留下。
    -
    《瓦尔登湖》'}"); +mingyan.push("{'index':107,'content':'热忱之心不可泯灭,相互帮助,体恤弱者,无论哪国人都可能成为朋友。不要放弃感情,纵使它被背叛过千百回。
    -
    某个奥特曼'}"); +mingyan.push("{'index':1321,'content':'人总是老得太快,而又聪明得太慢。
    -
    《与神为友》'}"); +mingyan.push("{'index':824,'content':'爱任何事物的方法,就是要意识到你可能会失去它。
    -
    G.K.切斯特顿'}"); +mingyan.push("{'index':802,'content':'生活总是让我们遍体鳞伤,但到后来,那些受伤的地方一定会变成我们最强壮的地方。
    -
    《老人与海》'}"); +mingyan.push("{'index':605,'content':'当赤道留住雪花,眼泪融掉细沙,你肯珍惜我吗?
    -
    《当这地球没有花》'}"); +mingyan.push("{'index':1293,'content':'即使热恋者的情感是错觉、幻象或自恋行为,那又何妨,所谓人生就是一段不断追求情爱的路程。
    -
    森山大道'}"); +mingyan.push("{'index':353,'content':'决定我们成为什么样人的,不是我们的能力,而是我们的选择。
    -
    《哈利波特》'}"); +mingyan.push("{'index':478,'content':'有些人,我们把他留在回忆里,是为了要藉由他们,来怀念当时的自己。
    -
    蔡康永'}"); +mingyan.push("{'index':374,'content':'我拥有的都是侥幸,失去的都是人生。
    -
    张悬《关于我爱你》'}"); +mingyan.push("{'index':216,'content':'要是没有你,今天的心情只是昨天的头皮屑。
    -
    《天使爱美丽》'}"); +mingyan.push("{'index':723,'content':'长大后谁不是离家出走,茫茫人海里游。
    -
    《大人中》'}"); +mingyan.push("{'index':984,'content':'所有你们不相信的事情我都要一一地去做一遍,亲自体验一下不可理喻的成功,或早已注定的失败。
    -
    《坦白书》'}"); +mingyan.push("{'index':165,'content':'感情的世界里,越是索取,便越是贫瘠。所有的迫不及待,都等不来期待。
    -
    《冷山》'}"); +mingyan.push("{'index':1096,'content':'使人觉得遥远的不是时间长,而是两三件不可挽回的事。
    -
    博尔赫斯《等待》'}"); +mingyan.push("{'index':205,'content':'该记得的不会忘记,会忘记的应该就是不重要的东西。
    -
    吴念真'}"); +mingyan.push("{'index':873,'content':'我说不出为什么,特别喜欢跟这种冷静平和的人待在一起。热情让我害怕,一是怕让我要回报相同的热情,那是件很辛苦的事情,承不起来,让人虚脱;二是害怕热情总是快速褪去,因为差距而更加落寞。
    -
    《时间不老,我们不散》'}"); +mingyan.push("{'index':338,'content':'我一点都不遗憾没有在最好的时光遇到你,因为遇到你之后最好的时光才开始。
    -
    杜小明'}"); +mingyan.push("{'index':784,'content':'每个人在他的人生发轫之初,总有一段时光,没有什么可留恋,只有抑制不住的梦想,没有什么可凭仗,只有他的好身体,没有地方可去,只想到处流浪。
    -
    E·B·怀特'}"); +mingyan.push("{'index':398,'content':'在所有人事已非的景色里,我最喜欢你。
    -
    张悬《喜欢》'}"); +mingyan.push("{'index':660,'content':'他们彼此深信,是瞬间迸发的热情让他们相遇,这样的确定是美丽的,但变幻无常更为美丽。
    -
    《一见钟情》'}"); +mingyan.push("{'index':202,'content':'这个环里,没有入口没有出口,只有喜怒哀乐循环往复。
    -
    何禾'}"); +mingyan.push("{'index':557,'content':'生为冰山,就该淡淡地爱海流、爱风,并且在偶然接触时,全心全意地爱另一块冰山。
    -
    王小波《似水柔情》'}"); +mingyan.push("{'index':399,'content':'你一直希望自己勇敢而真实,那么现在做个深呼吸,用猛烈的孤独,开始你伟大的历险。
    -
    莱昂纳德·科恩'}"); +mingyan.push("{'index':879,'content':'我需要你的时候,你不是不在,而是不在意。所以你需要我的时候,我不是不想,而是不想理。
    -
    刘同'}"); +mingyan.push("{'index':786,'content':'每个优秀的人都有一段沉默的时光。那一段时光是付出了很多努力,忍受孤独和寂寞,不抱怨不诉苦,日后说起时,连自己都能被感动的日子。
    -
    《关于这个世界,你不快乐什么》'}"); +mingyan.push("{'index':211,'content':'犯不着千辛万苦求新,无论衣服还是朋友。
    -
    《瓦尔登湖》'}"); +mingyan.push("{'index':699,'content':'爱是一个长久的诺言,平淡的故事要用一生讲完,光阴的眼中你我只是一段插曲。
    -
    《诺言》'}"); +mingyan.push("{'index':985,'content':'小时候我们的城市像郊外,我们的脚步很轻快,那时天空很蓝心很小路很宽,长大后我们的存在像尘埃,我们的距离被拉开。
    -
    吴青峰'}"); +mingyan.push("{'index':294,'content':'我们若声称喜欢与孤独为伴,是为关照骄傲和自私的本性。
    -
    「一个」读者丁书奇'}"); +mingyan.push("{'index':1294,'content':'我们用味道搭讪,用一块蛋糕说你好。我们用味道疗伤,用一杯烈酒说再见。唇齿是连接生命个体与世界的大门,味道是钥匙。
    -
    吴惠子'}"); +mingyan.push("{'index':182,'content':'一个人需要隐藏多少秘密,才能巧妙地度过一生。
    -
    仓央嘉措'}"); +mingyan.push("{'index':1260,'content':'没有一点儿疯狂,生活就不值得过。听凭内心呼声的引导吧,为什么要把我们的每一个行动像一块饼似的在理智的煎锅上翻来覆去地煎呢?
    -
    米兰·昆德拉'}"); +mingyan.push("{'index':396,'content':'白色的野鹤啊,请将飞的本领借我一用。
    -
    仓央嘉措'}"); +mingyan.push("{'index':1325,'content':'我从不把活着和对生活的期待混为一谈。我对生命无所期待。我没有预先想过要什么。生活本身就够激动人心的了。
    -
    萨冈'}"); +mingyan.push("{'index':124,'content':'温柔要有,但不是妥协,我们要在安静中,不慌不忙地坚强。
    -
    林徽因'}"); +mingyan.push("{'index':57,'content':'你想要一个熊,还是一个熊抱?这问题没那么简单。今日宜系怀旧红领巾。
    -
    蔡蕾'}"); +mingyan.push("{'index':248,'content':'要有礼貌。不管他是不是坏人,真正的妖侠要有妖侠的风度。
    -
    《魁拔II》'}"); +mingyan.push("{'index':1352,'content':'你还年轻,肯定记得自己犯过这种毛病:某人的缺席反而使他在你心里完美无缺。
    -
    《寄居者》'}"); +mingyan.push("{'index':920,'content':'读一些无用的书,做一些无用的事,花一些无用的时间,都是为了在一切已知之外,保留一个超越自己的机会,人生中一些很了不起的变化,就是来自这种时刻。
    -
    梁文道'}"); +mingyan.push("{'index':722,'content':'生命中总会有那么一段时光,充满不安,可是除了勇敢面对,我们别无选择。
    -
    佚名'}"); +mingyan.push("{'index':437,'content':'我们在同一个世界里入睡,却在不同的世界里醒来。
    -
    《尤利西斯的凝视》'}"); +mingyan.push("{'index':966,'content':'在有生的瞬间能遇到你,竟花光所有运气。
    -
    《明年今日》'}"); +mingyan.push("{'index':520,'content':'有些事情我不看透,不是我太笨,只是我太善良。
    -
    《樱桃小丸子》'}"); +mingyan.push("{'index':1022,'content':'这世上多一个人笑,就少一个人哭。
    -
    《煎饼侠》'}"); +mingyan.push("{'index':883,'content':'很多年后我再度归来,终于又见到了你,我从前的情人。那些你的容颜散发出的光芒,那些被掩饰的甜蜜的微笑,那些深夜时分对坐在咖啡馆里加速的心跳,那些伤心的记忆,全都回来了。你应该知道的,我永远不可能忘记你。
    -
    帕慕克'}"); +mingyan.push("{'index':763,'content':'生活不可能像你想象的那么好,但也不会像你想象的那么糟。我觉得人的脆弱和坚强都超乎自己的想象。有时,我可能脆弱得一句话就泪流满面;有时,也发现自己咬着牙走了很长的路。
    -
    莫泊桑'}"); +mingyan.push("{'index':992,'content':'世间也需要没用的东西,如果一切事物都必须有其意义,会让人喘不过气来。
    -
    是枝裕和'}"); +mingyan.push("{'index':806,'content':'人在面临幸福时会突然变得胆怯,抓住幸福其实比忍受痛苦更需要勇气。
    -
    《下妻物语》'}"); +mingyan.push("{'index':1344,'content':'不管你用什么方式活着,我们只有一个目的,别违心,以及别后悔,还有,去他的人言可畏。
    -
    暖小团'}"); +mingyan.push("{'index':1011,'content':'前方蜿蜒无边的路再漫长,也比不上你我之间的记忆。
    -
    披头士'}"); +mingyan.push("{'index':664,'content':'愿你我可以带着最微薄的行李和最丰盛的自己在世间流浪。
    -
    大冰'}"); +mingyan.push("{'index':737,'content':'某天,你无端想起一个人,她曾让你对明天有所期许,但却完全没有出现在你的明天里。
    -
    《再见金华站》'}"); +mingyan.push("{'index':815,'content':'没人能挽留你在这个世界,就像没人能阻止你来到这个世界。如果非要说害怕什么,我只是害怕上帝丢给我太多理想,却忘了给我完成理想的时间。
    -
    《站在两个世界的边缘》'}"); +mingyan.push("{'index':246,'content':'我们注定要失去我们所爱的人,要不然我们怎么会知道他们对我们多么的重要。
    -
    《本杰明巴顿奇事》'}"); +mingyan.push("{'index':480,'content':'你带来欢笑,我有幸得到。
    -
    《野鹅敢死队》'}"); +mingyan.push("{'index':490,'content':'你的过去我不愿过问,那是你的事情。你的未来我希望参与,这是我的荣幸。
    -
    《神探夏洛克》'}"); +mingyan.push("{'index':1245,'content':'长期以来,我一直期望着过上真正的生活,可手头总有做不完的事、不断发生的混乱、毫无头绪的忙碌,后来我才知道,这些就是生活呀。
    -
    苏更生'}"); +mingyan.push("{'index':1214,'content':'我们终其一生,就是要摆脱别人的期待,找到真正的自己。
    -
    《无声告白》'}"); +mingyan.push("{'index':1308,'content':'爱情是一种偏见。你爱你需要的,你爱使你感觉好的,你爱使你感觉方便的。当你知道只要有机会认识,世界上还有一万个人可以让你更爱,怎么能说你只爱一个人?只不过你永远无法认识他们。
    -
    《苦水音乐》'}"); +mingyan.push("{'index':618,'content':'哪怕最不幸的人生也会有阳光明媚的时光,也会在沙砾石缝中长出小小的幸福之花。
    -
    赫尔曼·黑塞'}"); +mingyan.push("{'index':978,'content':'时常想到过去的自己,羞耻到无法自拔。所以顺带着,便原谅了很多人。仿佛原谅了他们,也就原谅了过去的那个自己。
    -
    自由极光'}"); +mingyan.push("{'index':734,'content':'或许我们犯的错误,造就我们的命运。没有错误,哪来的人生。如果不偏离轨道,或许就不会坠入爱河。毕竟,季节会更换,城市也会,有人走进你的生命,有人离开。但令人欣慰的是,我们爱的人永远会在我们心里,够幸运的话,一趟飞机就可以见面了。
    -
    《欲望都市》'}"); +mingyan.push("{'index':1342,'content':'我们总喜欢回忆往事,但不一定真想去重复。
    -
    陈染'}"); +mingyan.push("{'index':1001,'content':'从我做了家长以后,不幸是我立即发现我老,老到寻不见一丝不负责任的赤子之心了。
    -
    李健吾'}"); +mingyan.push("{'index':21,'content':'终点当然是存在的,只是和最初的想象不一样而已。
    -
    蔡蕾'}"); +mingyan.push("{'index':903,'content':'让我们决定彼此靠近的,是表面的阳光;但让我们决定彼此亲近的,却是内心的脆弱。
    -
    里则林'}"); +mingyan.push("{'index':471,'content':'长长的路上我想我们是朋友,如果有期待我想最好是不说。
    -
    阿信《纯真》'}"); +mingyan.push("{'index':194,'content':'你知道,有些鸟儿是注定不会被关在牢笼里的,它们的每一片羽毛都闪耀着自由的光辉。
    -
    《肖申克的救赎》'}"); +mingyan.push("{'index':74,'content':'朋友多年不见,手里一张照片。看着旧日样子,心中跟他聊天。
    -
    老树画画'}"); +mingyan.push("{'index':608,'content':'做你最喜欢的,其他都他妈是扯淡。
    -
    《阳光小美女》'}"); +mingyan.push("{'index':760,'content':'有时你期待一切如新,有时候你希望,一切如常。
    -
    丁丁张'}"); +mingyan.push("{'index':183,'content':'当你年轻时,以为什么都有答案,可是老了的时候,你可能又觉得其实人生并没有所谓的答案。
    -
    《堕落天使》'}"); +mingyan.push("{'index':1178,'content':'童年是不会死去的,它藏在每个人的心中小声喊着:让我出去玩会儿吧!
    -
    乌冬'}"); +mingyan.push("{'index':809,'content':'你知道,一个配不上你的世界的最简单标志就是一些配不上你的人总想跟你共饮一杯啤酒。
    -
    《佛祖在一号线》'}"); +mingyan.push("{'index':698,'content':'年轻时无数次心急火燎地说“我能”,只不过是为了此刻能够风轻云淡地说声“我可以”。
    -
    姬霄'}"); +mingyan.push("{'index':691,'content':'现在回头看过去,不快乐总是很长的一段时候,而快乐都只是在某个时刻,是稍纵即逝的点缀,是蛋糕上的水果。如果碰到能让你快乐的人,一定要一口一口慢慢吃。
    -
    颜茹玉'}"); +mingyan.push("{'index':768,'content':'世界上最厉害的本领是什么?是以愉悦的心情老去,是在想工作的时候能选择休息,是在想说话的时候保持沉默,是在失望的时候又燃起希望。
    -
    《使者》'}"); +mingyan.push("{'index':312,'content':'不管世界变得怎样,只要能和你在一起,哪怕是悲伤也会闪闪发亮。
    -
    江国香织'}"); +mingyan.push("{'index':1113,'content':'其实分别也没有这么可怕。65万个小时后,当我们氧化成风,就能变成同一杯啤酒上两朵相邻的泡沫,就能变成同一盏路灯下两粒依偎的尘埃。宇宙中的原子并不会湮灭,而我们,也终究会在一起。
    -
    花大钱'}"); +mingyan.push("{'index':596,'content':'饥饿是最好的调味,孤独是最强的催眠。
    -
    五月天《夜访吸血鬼》'}"); +mingyan.push("{'index':1257,'content':'正因为老了。没有更多时间可以挥霍,我才要更珍惜现在,极致专注,爱我所爱,做我所想。因为我深信,最痛苦的事,不是失败,是我本可以。
    -
    咪蒙'}"); +mingyan.push("{'index':849,'content':'有些爱,只能止于唇齿,掩于岁月。
    -
    《甜蜜蜜》'}"); +mingyan.push("{'index':1252,'content':'也许孤独是爱的最意味深长的赠品,受此赠礼的人从此学会了爱自己,也学会了理解别的孤独的灵魂和深藏于它们之中的深透的爱。
    -
    《爱与孤独》'}"); +mingyan.push("{'index':71,'content':'长跑前要记得检查鞋带。
    -
    《一个》编辑部'}"); +mingyan.push("{'index':651,'content':'如果年轻凝成泪水,很快就会吹干,青春正是长长的风,来自无垠,去向无踪。
    -
    《风柜来的人》'}"); +mingyan.push("{'index':89,'content':'当喜悦飞去而吻别它的人,将活在永恒的朝阳之中。
    -
    威廉·布莱克'}"); +mingyan.push("{'index':219,'content':'逻辑会把你从A带到B,想象力能带你去任何地方。
    -
    爱因斯坦'}"); +mingyan.push("{'index':1240,'content':'我想知道的是,我们是否真的能够互相懂得。不是包容、不是照看,也不是原谅或宠爱,而是懂得,像解一道数学题那样,经过曲折和明暗去明白一个人的内心。
    -
    陶立夏'}"); +mingyan.push("{'index':601,'content':'在我看来这无情世界,因为有热情的蠢货,才有些浪漫。
    -
    马良'}"); +mingyan.push("{'index':1127,'content':'你该知道此刻我正在想念着你,回想我们拥有的美好的回忆。一切欢乐和不如意瞬间逝去,现在只是孤单的我和遥远的你。
    -
    窦唯'}"); +mingyan.push("{'index':533,'content':'如果你要驯服一个人,就要冒着掉眼泪的危险。
    -
    《小王子》'}"); +mingyan.push("{'index':709,'content':'你走了,此座城市就是拔掉牙齿的牙床,舔时痛,不舔时空荡。你归来,又如新镶的假牙,忐忑陌生,好久才能亲近。总之你记得,离别是不对的。
    -
    叶三'}"); +mingyan.push("{'index':860,'content':'死亡是,你加上这个世界再减去你。
    -
    卡尔维诺'}"); +mingyan.push("{'index':438,'content':'你怎么就不明白呢?这个世界是不会为你而改变的。我和这个世界一样,是不会为你而改变的。
    -
    《牯岭街少年杀人事件》'}"); +mingyan.push("{'index':872,'content':'我只是你生活里的一个影子,你却在我的生命里占有重要地位。如果我只是个单纯的过客,为何要让我闯入你的生活?我千百次想过要离开你,但仅凭一己之力我做不到。
    -
    《偷影子的人》'}"); +mingyan.push("{'index':1355,'content':'人有一种可怕的欲望,想窥探别人内心,传递自己的恐慌,为别人同自己一样悲伤恐惧而感到安慰,想要操纵别人,在得知别人受到自己影响时的自鸣得意。这些都是难以启齿的,我们心中的恶魔。
    -
    帕慕克'}"); +mingyan.push("{'index':111,'content':'有时候生活会送你一张幸运彩票,能拿到它当然很棒,但也就是如此了。
    -
    大卫·米切尔'}"); +mingyan.push("{'index':584,'content':'在天黑以后,往热闹地方躲,跟着别人努力快活, 可惜心里头,有定时的闹钟,提醒你有多寂寞。
    -
    《迷失东京》'}"); +mingyan.push("{'index':1318,'content':'生命是因为一次又一次的等待才显得漫长的,如果有谁一生中都没有等待过谁,那他一定是个短命鬼。
    -
    夏正正'}"); +mingyan.push("{'index':1051,'content':'告别时都爱强装洒脱,告别后都在强忍想念,躲得了对酒当歌的夜,躲不了四下无人的街。
    -
    卢思浩 《离开前请叫醒我》'}"); +mingyan.push("{'index':976,'content':'一个不成熟男子的标志是他愿意为某种事业英勇地死去,一个成熟男子的标志是他愿意为某种事业卑贱地活着。
    -
    《麦田守望者》'}"); +mingyan.push("{'index':309,'content':'为你,千千万万遍。
    -
    《追风筝的人》'}"); +mingyan.push("{'index':160,'content':'我们都是伟大的,因为我们重复自己是很难的。
    -
    韩寒'}"); +mingyan.push("{'index':646,'content':'其实你知道,烦恼会解决烦恼,新的刚来到,旧的就忘掉。
    -
    陈奕迅《你给我听好》'}"); +mingyan.push("{'index':866,'content':'雨声潺潺,像住在溪边。宁愿天天下雨,以为你是因为下雨不来。
    -
    《小团圆》'}"); +mingyan.push("{'index':1147,'content':'他说他爱她就像拳击手爱蝴蝶,歌唱家爱沉寂,强盗爱上了村里的小学老师,他说他爱她就像屠夫爱上小牛犊那惊惧的眼神,闪电爱上了屋顶的宁静。
    -
    《生活在别处》'}"); +mingyan.push("{'index':986,'content':'没有任何一种逃避能得到赞赏,喜欢就去追,饿了就吃饭,管它失败或是发胖。
    -
    长期新新'}"); +mingyan.push("{'index':1242,'content':'过去、现在、未来的每一天,组成了我们的故事。每一个认真对待的日子,都是美的一天。
    -
    过去的每一天'}"); +mingyan.push("{'index':891,'content':'如今我终于明白,会说话并不是件必须的事情。生活之海,长风击浪固然风流,在水下深潜也是件美妙的事情。一直很怀念自己口不能言一个人沉在水底的青春岁月,后悔太早挣扎着想浮上来。
    -
    《坦白书》'}"); +mingyan.push("{'index':1167,'content':'后来明白,我们永远无法成为别人满意的那个自己,可如果坚持做喜欢的自己,终会遇见喜欢你的人。其实到最后,我们都是在寻找同类,就像溪流汇入江海,光束拥抱彩虹。
    -
    陈亚豪'}"); +mingyan.push("{'index':547,'content':'世界那么微妙,有那么多种不可思议,你却把自己定义在那里,杀死了所有的可能性。
    -
    仲尼Johnny'}"); +mingyan.push("{'index':1008,'content':'生活是世上最罕见的事情,大多数人只是存在,仅此而已。
    -
    王尔德'}"); +mingyan.push("{'index':296,'content':'如果以后再也见不到你,那祝你早安,午安,晚安。
    -
    《楚门的世界》'}"); +mingyan.push("{'index':377,'content':'你永远也不晓得自己有多喜欢一个人,除非你看见他和别的人在一起。
    -
    《天使爱美丽》'}"); +mingyan.push("{'index':653,'content':'在这可恶的世界,什么也无法长久,哪怕是我们的烦恼。
    -
    查理·卓别林'}"); +mingyan.push("{'index':528,'content':'如果,有醒不了的梦,我一定去做;如果,有走不完的路,我一定去走;如果,有变不了的爱,我一定去求。让懂的人懂,让不懂的人不懂;让世界是世界,我甘心是我的茧。
    -
    《美丽的茧》'}"); +mingyan.push("{'index':487,'content':'我们习惯逃避选择,因为答案太多;我们不得不面对选择,因为生活所迫。于是,我们在选择中纠结,在纠结中选择。后来,纠结变成了一种病,在这个城市很流行。
    -
    番茄女王'}"); +mingyan.push("{'index':576,'content':'我最快乐那一年,是你陪我经历一切。
    -
    《最快乐那一年》'}"); +mingyan.push("{'index':1039,'content':'错误的人什么都没有留下,只教会了我们惩罚对的人的方法。比如一段突如其来的倔强,比如一场没有终结的冷漠,比如一次轻而易举的离开。
    -
    飞行官小北'}"); +mingyan.push("{'index':1262,'content':'好的爱情是不需要刻意创造什么新的东西,而是把古老而久已熟悉的事情一桩桩清晰化,现实化。听到一首老歌不由自主地哼唱起来,干枯了一整个冬天的树枝重新抽出嫩芽,回到久别的故乡,邻居见你都欢喜地喊你的小名。爱是不需要发出请求,它让你原形毕露,做一切该做的事情。
    -
    吕彦妮'}"); +mingyan.push("{'index':865,'content':'每个人心中都有一团火,但路过的人只看到烟。但是总有一个人,总有那么一个人能看到这团火,然后走过来,陪我一起……从你叫什么名字开始,后来,有了一切。
    -
    梵高'}"); +mingyan.push("{'index':782,'content':'你曾经对我说你永远爱着我。爱情这东西我明白,但永远是什么?
    -
    《恋曲1980》'}"); +mingyan.push("{'index':1183,'content':'世上大体分成好坏两种人,好人晚上睡得踏实,而坏人更享受醒着的时间。
    -
    伍迪·艾伦'}"); +mingyan.push("{'index':847,'content':'有一个可以想念的人,就是幸福。
    -
    《情书》'}"); +mingyan.push("{'index':1078,'content':'越想敲的门,叩的声越轻。
    -
    张怡微'}"); +mingyan.push("{'index':694,'content':'你看,在野蛮的战场上还是有些文明的微光在闪动,那就是人性所在,确实,那就是我们仅有的谦卑的温和的方式。
    -
    《布达佩斯大饭店》'}"); +mingyan.push("{'index':510,'content':'我一直在想,我到底是喜欢你, 还是需要一个影子,放在心里,让我喜欢。
    -
    佚名'}"); +mingyan.push("{'index':574,'content':'如果有一刹那,上帝忘记我是一只布偶并赋予我片刻生命,我可能不会说出我心中的一切所想,但我必定会思考我所说的一切。
    -
    马尔克斯《告别信》'}"); +mingyan.push("{'index':280,'content':'如果你不能应付我最差的一面,那么你也不值得拥有我最好的一面。
    -
    玛丽莲·梦露'}"); +mingyan.push("{'index':871,'content':'我想和你互相浪费,一起虚度短的沉默,长的无意义,一起消磨精致而苍老的宇宙。
    -
    李元胜'}"); +mingyan.push("{'index':852,'content':'每个人都有自己的世界,这个世界不是你想进就能进来的。进不来的就别硬闯了,还不如客客气气的当个客人,敲门敲不开就算了,可能别处更适合你。
    -
    痞人日记'}"); +mingyan.push("{'index':1249,'content':'年轻的时候,我认为我肯定能成为伟大的艺术家,但我现在并不是。我有我的局限性。但是你知道,即便你自身有局限性,只要你尽了全力,只要你不出卖自己,不被不值得的东西收买,你仍然可以过上美好的生活。你不必一生都鞭挞自己,你又不是达芬奇,我也不是。
    -
    伍迪·艾伦'}"); +mingyan.push("{'index':387,'content':'等一个不爱你的人,就像在机场等一艘船。
    -
    佚名'}"); +mingyan.push("{'index':807,'content':'脚步不能达到的地方,眼光可以到达;眼光不能到达的地方,精神可以飞到。
    -
    《悲惨世界》'}"); +mingyan.push("{'index':104,'content':'我要赚钱建一个自己的小木屋,余生就在那度过……我要定个规矩,谁都不能在这做什么虚伪的事,谁要做谁就滚。
    -
    《麦田里的守望者》'}"); +mingyan.push("{'index':150,'content':'对生活可以谈得很多。对幸福没什么好谈的,否则它就不再是幸福了。
    -
    赫塔·米勒'}"); +mingyan.push("{'index':426,'content':'我越是逃离,却越是靠近你,我越是背过脸,却越是看见你。我是一座孤岛,处在相思之水中,四面八方,隔绝我通向你。一千零一面镜子,转映着你的容颜,我从你开始,我在你结束。
    -
    埃姆朗·萨罗希'}"); +mingyan.push("{'index':1361,'content':'如果雨之后还是雨,如果忧伤之后仍是忧伤,请让我从容面对这别离之后的别离。微笑地继续去寻找,一个不可能再出现的你。
    -
    《雨中的了悟》'}"); +mingyan.push("{'index':1381,'content':'如果有一天,你想起了一个人,以及和他在一起吃的食物。那个时候,你就知道,孤独的味道尝起来是如何的。
    -
    村上龙'}"); +mingyan.push("{'index':1350,'content':'生活的担子从来都是一样重,你觉得轻松时,不过是多了个人替你扛,当一个选择离开,剩下的那个还得继续扛,而且还要扛住。所以,那个人来了或是没来,或是来过又走了,都没区别,你永远要时刻做好一个人扛着的准备。
    -
    郑执'}"); +mingyan.push("{'index':650,'content':'年轻时总以为能遇上许许多多的人。而后你就明白,所谓机缘,其实也不过那么几次。
    -
    《爱在日落黄昏时》'}"); +mingyan.push("{'index':745,'content':'我们终究都会和别人过上我们本来想要一起过的生活。分手是我们一步步走出彼此的梦。
    -
    淡豹'}"); +mingyan.push("{'index':958,'content':'我不知将去向何方,但我已在路上。
    -
    宫崎骏'}"); +mingyan.push("{'index':1137,'content':'你的人生永远不会辜负你的。那些转错的弯,那些走错的路,那些流下的泪水,那些滴下的汗水,那些留下的伤痕,全都让你成为独一无二的自己。
    -
    朱学恒'}"); +mingyan.push("{'index':1148,'content':'把光鲜的道理、礼貌的寒暄留给别人,把琐碎的废话都留给你。
    -
    陶立夏'}"); +mingyan.push("{'index':301,'content':'我想,恋爱的最佳年龄大概在十六岁到二十一岁之间。
    -
    村上春树'}"); +mingyan.push("{'index':373,'content':'爱得不够,才借口多多。
    -
    亦舒'}"); +mingyan.push("{'index':761,'content':'人越长大越会明白,世界上有种最好的东西,叫得不到。
    -
    九夜茴《匆匆那年》'}"); +mingyan.push("{'index':634,'content':'我不希望有一天发现自己是在为了别人活,我愿意承担后果,就算偶尔寂寞甚至孤独而终,我都能接受。
    -
    《走出非洲》'}"); +mingyan.push("{'index':1009,'content':'爱一人,有时候甚至可以为他去死,但是却好像不可能从不怀疑、动摇、猜忌、怨恨,人天生就是反复多疑,这就注定了,很多事情往往只在一念之间。
    -
    《朔云飞渡》'}"); +mingyan.push("{'index':474,'content':'你和那些好东西,总有一天会相遇。
    -
    环玥'}"); +mingyan.push("{'index':112,'content':'风拍小帘灯晕舞,对闲影,冷清清,忆旧游。 旧游旧游今在不?花外楼,柳下舟。梦也梦也,梦不到,寒水空流。
    -
    蒋捷《梅花引·荆溪阻雪》'}"); +mingyan.push("{'index':577,'content':'听着,依我说,最靠谱的事情是去找这么个人,他爱真实的你,好心情,坏心情,丑点儿,美点儿,帅点儿,放个屁他都找出点灿烂来,这样的人才值得你去跟。
    -
    《朱诺》'}"); +mingyan.push("{'index':170,'content':'既不能被安慰,也不能被夸,会尴尬。
    -
    沈大成'}"); +mingyan.push("{'index':642,'content':'仍然自由自我,永远高唱我歌,走遍千里。
    -
    《海阔天空》'}"); +mingyan.push("{'index':1092,'content':'在年轻的时候,在那些充满了阳光的长长的下午,我无所事事,也无所惧怕,只因为我知道,在我的生命里有一种永远的等待。挫折会来,也会过去,热泪会流下,也会收起。没有什么可以让我气馁,因为,我有着长长的一生,而你,你一定会来。
    -
    席慕容《写给幸福》'}"); +mingyan.push("{'index':133,'content':'世上的人可以分为两大类:一种人有朋友,另一种人很寂寞。
    -
    《黄金三镖客》'}"); +mingyan.push("{'index':386,'content':'真实的世界使我感兴趣,因为它是可塑的。
    -
    纪德'}"); +mingyan.push("{'index':1066,'content':'有走的理由,却愿意停留,才是爱的最好理由。
    -
    姚若龙'}"); +mingyan.push("{'index':238,'content':'世上只有一件事比被人议论更糟糕,那就是没有人议论你。
    -
    王尔德'}"); +mingyan.push("{'index':245,'content':'人一切的痛苦,本质上都是对自己的无能的愤怒。
    -
    王小波'}"); +mingyan.push("{'index':503,'content':'我今天才知道,我之所以漂泊就是在向你靠近。
    -
    《廊桥遗梦》'}"); +mingyan.push("{'index':1309,'content':'人有振作奋斗的时候,也有应该放弃的时候。一切已成事实,只有傻子才会执迷不悟,但事实上,我一直都是个傻子。
    -
    《大鱼》'}"); +mingyan.push("{'index':455,'content':'一个彻底诚实的人是从不面对选择的,那条路永远会清楚无二地呈现在你面前,这和你的憧憬无关,就像你是一棵苹果树,你憧憬结橘子,但是你还是诚实地结出苹果一样。
    -
    顾城'}"); +mingyan.push("{'index':45,'content':'我们容易被“孤零零”的意象吸引,却不愿和它们沾上半点关系。
    -
    贺伊曼'}"); +mingyan.push("{'index':791,'content':'“说,你除了吃还会什么?” “还会饿。”
    -
    夏正正'}"); +mingyan.push("{'index':669,'content':'没有秘密,我们就不是自己。
    -
    《纸牌屋》'}"); +mingyan.push("{'index':428,'content':'你从远方来,我到远方去,遥远的路程经过这里。天空一无所有,为何给我安慰?
    -
    海子《黑夜的献诗》'}"); +mingyan.push("{'index':1161,'content':'我钢筋铁骨,我刀枪不入,我杀出一条血路。不是我成熟了,是我知道“救命”喊得再大声,你都不会出现了。
    -
    张晓晗'}"); +mingyan.push("{'index':990,'content':'想得却不可得,你奈人生何。该舍的舍不得,只顾着跟往事瞎扯。
    -
    李宗盛'}"); +mingyan.push("{'index':928,'content':'我们称之为路的,其实不过是彷徨。
    -
    卡夫卡'}"); +mingyan.push("{'index':1335,'content':'生活不是我们活过的日子,而是我们记住的日子,我们为了讲述而在记忆中重现的日子。
    -
    《活着为了讲述》'}"); +mingyan.push("{'index':982,'content':'喜欢你的理由,因为是你,那就是你。除了这个还有别的理由吗?如果我能知道原因的话就好了,那就能找到不喜欢你的办法了。
    -
    《请回答1997》'}"); +mingyan.push("{'index':1269,'content':'现在想想,最美妙的时刻不是热恋,而是有人忽然闯进你心里的那一瞬间。仿佛拥有了新的世界,叫人相信所有的剧本都是为你我而写。
    -
    蒋话'}"); +mingyan.push("{'index':800,'content':'一见钟情的感觉是这样的:我们在很久以前就已经相爱,只是在相识的那一刻才刚刚见面。
    -
    曹畅洲'}"); +mingyan.push("{'index':663,'content':'人生没有什么事情是给别人做的。工作不是为了老板,是为了自己长本事赚钱。变美不是为了另一半,是为了自己得瑟摇摆。所有的努力都是你自己的选择,所有的荣耀和耻辱、成长和眼泪都由自己来担。
    -
    琦殿'}"); +mingyan.push("{'index':362,'content':'对爱的人说心里话,不要等太久。
    -
    《双雄》'}"); +mingyan.push("{'index':788,'content':'有些人的生命没有风景,是因为他只在别人造好的、最方便的水管里流过来流过去。你不要理那些水管,你要真的流经一个又一个风景,你才会是一条河。
    -
    《有一天啊,宝宝》'}"); +mingyan.push("{'index':397,'content':'那些想看又没看的书,在心里摆满一座图书馆。
    -
    一蚊丁'}"); +mingyan.push("{'index':269,'content':'我们都是戏子,在别人的故事里,流着自己的眼泪。
    -
    席慕容'}"); +mingyan.push("{'index':970,'content':'我们都喜欢这光,虽然转瞬即逝。但你还是你,有我一喊就心颤的名字。
    -
    《风吹》'}"); +mingyan.push("{'index':894,'content':'以前总是担心自己长大后会怎么样。赚多少钱。会不会有一天出人头地。有时候你最是盼星星盼月亮的事儿就是不会发生,可意想不到的那些却自然而然地来了。我说不清楚为什么,你遇见过千百个人,而他们只不过是匆匆过客。接着你就邂逅了那么一个人,改变了你的生命直到永远。
    -
    《爱情与灵药》'}"); +mingyan.push("{'index':34,'content':'“喂,我还在路上。”
    -
    韩春萍'}"); +mingyan.push("{'index':77,'content':'我喜欢你是寂静的,仿佛你消失了一样。
    -
    聂鲁达'}"); +mingyan.push("{'index':1206,'content':'要脸别谈心,自卑别谈情。
    -
    大斯'}"); +mingyan.push("{'index':1359,'content':'当你身无分文时经历的世界更彻底。
    -
    《巴黎伦敦落魄记》'}"); +mingyan.push("{'index':1071,'content':'你的快乐一直不缺观众,也愿你的无邪有人真懂。
    -
    张晓晗'}"); +mingyan.push("{'index':888,'content':'答案在最需要的时候总是不肯出现,而很多时候唯一可能的答案却是,你必须耐心等待。
    -
    若泽·萨拉马戈'}"); +mingyan.push("{'index':82,'content':'命运的事情我管不了,它干它的,我干我的,不过是相逢一笑泯恩仇。
    -
    周云蓬'}"); +mingyan.push("{'index':1116,'content':'爱应该有着诸多的条件和限制,爱需要双方无时无刻保持完美状态。无条件的爱是一种散漫无纪的爱,正如大家眼见的那样,散漫无纪的爱是一场灾难。
    -
    《消失的爱人》'}"); +mingyan.push("{'index':285,'content':'如果不想浪费光阴的话,要么静下心来读点书,要么去赚点钱。
    -
    熊培云'}"); +mingyan.push("{'index':1002,'content':'我想当一个人的时候,我就失去了我自己。在你什么都不想要的时候,一切如期而至。
    -
    《执者失之》'}"); +mingyan.push("{'index':253,'content':'我一直以为人是慢慢变老的。其实不是,人是一瞬间变老的。
    -
    村上春树'}"); +mingyan.push("{'index':710,'content':'我的勇气和你的勇气加起来,对付这个世界总够了吧?去向世界发出我们的声音,我一个人是不敢的,有了你,我就敢。
    -
    《爱你就像爱生命》'}"); +mingyan.push("{'index':934,'content':'一个人至少拥有一个梦想,有一个理由去坚强。心若没有栖息的地方,到哪里都是在流浪。
    -
    三毛'}"); +mingyan.push("{'index':585,'content':'人总会离开也总会在意想不到的时刻与某个人相遇,唯一不曾变的是我们刻意夸大了的心情,刻意宣泄的曾经。
    -
    吴念真'}"); +mingyan.push("{'index':1032,'content':'任性的人大多都幸福,所以才敢挥霍无度。
    -
    刘同'}"); +mingyan.push("{'index':365,'content':'我没有时间讨厌你。
    -
    可可·香奈儿'}"); +mingyan.push("{'index':126,'content':'世界上有207个主权国家,大概有180个是自由的。
    -
    《新闻编辑室》'}"); +mingyan.push("{'index':1208,'content':'回忆都会褪色,平凡不时与我们相遇,但是总会有闪光的时刻让我们变得与众不同,让过去变得有迹可循,我愿意在那些时刻到来之时,放下日复一日和循规蹈矩,让庸常破功,赦免自己的孤独。
    -
    大将军郭'}"); +mingyan.push("{'index':552,'content':'当我们相信自己对这个世界已经相当重要的时候,其实这个世界才刚准备原谅我们的幼稚。
    -
    《青春梦工场》'}"); +mingyan.push("{'index':293,'content':'比活着更可怕的是成熟,它用成功学这剂甜蜜的毒药让社会的大多数安静地腐烂。
    -
    内陆飞鱼'}"); +mingyan.push("{'index':55,'content':'今日东风西渡,文曲星闪烁。宜论功过,不宜下注。
    -
    马一木'}"); +mingyan.push("{'index':1319,'content':'最迷人的不是路,是被禁锢的自我与未知撞击的声音。
    -
    陈坤·狂禅'}"); +mingyan.push("{'index':637,'content':'希望你可以记住我,记住我这样活过,这样在你身边呆过。
    -
    《挪威的森林》'}"); +mingyan.push("{'index':384,'content':'这个世界上肯定有另一个我,做着我不敢做的事,过着我想过的生活。
    -
    《蓝,另一种蓝》'}"); +mingyan.push("{'index':367,'content':'我一直觉得,自己同时在两个地方,既在这里,又在那里。
    -
    《维罗妮卡的双重生命》'}"); +mingyan.push("{'index':1057,'content':'相爱就是,无论是一米八还是两米二宽的床,我们都只睡一米。
    -
    肖诗瑶'}"); +mingyan.push("{'index':1317,'content':'所有爱情都需要有人注视它,承认它,赋予它价值,否则,它就可能被当作一个误会。
    -
    《黑与银》'}"); +mingyan.push("{'index':315,'content':'青涩的岁月常常是一生人最缅念的岁月。
    -
    董桥'}"); +mingyan.push("{'index':836,'content':'真没想到我们在这样一个地方告别,但跟人告别的时候吧,还是得用力一点,因为你多说一句,说不定就是最后一句,多看一眼,弄不好就是最后一眼。
    -
    《后会无期》'}"); +mingyan.push("{'index':558,'content':'风还是一样地吹,花还是一样地开,太阳还是一样地升起,可是有些事情已经变得不一样了。
    -
    几米'}"); +mingyan.push("{'index':284,'content':'你学过的每一样东西,你遭受的每一次苦难,都会在你一生中某个时候派上用场。
    -
    菲茨杰拉德'}"); +mingyan.push("{'index':686,'content':'一个人就像一支队伍,对着自己的头脑和心灵招兵买马,不气馁,有召唤,爱自由。
    -
    刘瑜《送你一颗子弹》'}"); +mingyan.push("{'index':715,'content':'你觉得“我们从未在一起过”和“最后我们没有在一起”哪个更遗憾?
    -
    插班生杜明明'}"); +mingyan.push("{'index':1095,'content':'生命很短暂。在游戏,幻梦,谎言,戏剧,妄想之中,活在当下,这是唯一的意义。然后应该忘记,继续往前走。
    -
    安妮宝贝'}"); +mingyan.push("{'index':264,'content':'只有不快乐的人才想知道未来。
    -
    凯特·莫顿'}"); +mingyan.push("{'index':414,'content':'天真的人们能够爱——这就是他们的秘密。
    -
    赫尔曼•黑塞'}"); +mingyan.push("{'index':103,'content':'我愿意把我所有的科技去换取和苏格拉底相处的一个下午。
    -
    史蒂夫·乔布斯'}"); +mingyan.push("{'index':1169,'content':'当你昭告天下乞求关心的时候,得先做好受到冷遇的准备。人真正要学习的,是如何与冷遇相处。
    -
    王路'}"); +mingyan.push("{'index':816,'content':'不要停止奔跑,不要回顾来路,来路无可眷恋,值得期待的只有前方。
    -
    《马男波杰克》'}"); +mingyan.push("{'index':1204,'content':'但愿你的旅途漫长,但愿你拥抱的人正泪流不止。但愿你付出的爱,有着某种恰到好处的形状,恰能完好地镶嵌在她的灵魂空缺处,毫厘不差。但愿你心底的关怀,杯满四溢,又正在被另一个孤独的灵魂渴望着。
    -
    七堇年'}"); +mingyan.push("{'index':1346,'content':'我所理解的美好生活是,不做礼貌的禽兽,不做自由的走狗。
    -
    马頔'}"); +mingyan.push("{'index':1280,'content':'人生不就是先进攻再撤退,中间夹上一句我爱你。
    -
    菲茨杰拉德'}"); +mingyan.push("{'index':540,'content':'我一直急着想学会骑车,我以为学会以后,爱去哪里就去哪里。现在会骑了,又不知道要去哪里了。
    -
    《光阴的故事·指望》'}"); +mingyan.push("{'index':24,'content':'有些人什么都不想给我,但我什么都想要。我是一个女儿。
    -
    张晓晗'}"); +mingyan.push("{'index':736,'content':'相爱的人们,上辈子大概只见过一面,所以这辈子要不断地再见,再见,直到不再见。
    -
    田艺苗'}"); +mingyan.push("{'index':326,'content':'回顾我有生以来的岁月,发现还是孤独的时间最多。我对世界呼喊了那么久,才知道自己的声带有问题,喊声的频率不对,没有人能听到。人生不就是如此吗?
    -
    和菜头'}"); +mingyan.push("{'index':1026,'content':'你曾经是一整个时代,事实上你永远是,那段生命历程永远属于你,为你发光,但我不再怀有难抑的热情、倾注我所有梦想地,想去征服你。
    -
    贾彬彬'}"); +mingyan.push("{'index':244,'content':'只在尘世上走了一遭,我们既不能和前世相比,也无法对来世加以完善。
    -
    米兰•昆德拉'}"); +mingyan.push("{'index':106,'content':'花开堪折直须折,莫待无花空折枝。
    -
    杜秋娘'}"); +mingyan.push("{'index':1060,'content':'我是你夜里的太阳,也是你,影子里的悲伤。
    -
    陈绮贞'}"); +mingyan.push("{'index':911,'content':'在隆冬,我终于知道,我身上有一个不可战胜的夏天。
    -
    加缪'}"); +mingyan.push("{'index':898,'content':'失去一个女人,就是这样。当你失去一个女人时,就好似失去了所有女人。
    -
    《没有女人的男人们》'}"); +mingyan.push("{'index':922,'content':'除掉睡眠,人的一辈子只有一万多天。人与人的不同在于:你是真的活了一万多天,还是仅仅生活了一天,却重复了一万多次。
    -
    费尔南多·佩索阿'}"); +mingyan.push("{'index':199,'content':'我爱你,但我更爱说谎。
    -
    飞机'}"); +mingyan.push("{'index':1349,'content':'大部分时候,所谓生活的抉择,无非就是选择要在一场古典悲剧里演一个执迷不悔的小丑,或是在一出肥皂剧里演一个愚蠢的没有悬念的英雄。
    -
    马良'}"); +mingyan.push("{'index':840,'content':'我们自己心里的痛苦不会因为这个世界有更大或者更“值得”的痛苦而变得微不足道;它对别人也许微不足道,对我们自己,每一次痛苦都是绝对的,真实的,很重大,很痛。
    -
    龙应台'}"); +mingyan.push("{'index':749,'content':'无论你怎么与他人控制距离,你依然会失去控制,因为这个世界上总有人能让你乖乖交心和伤心。
    -
    韩寒《告白与告别》'}"); +mingyan.push("{'index':517,'content':'人生的一大挑战是,在一个丧失自我的世界中保持自我。
    -
    佚名'}"); +mingyan.push("{'index':1225,'content':'要进入另一个人的孤独,是不可能的。如果我们真的可以逐渐认识另一个人,即使是很少的程度,也只能到他愿意被了解的程度为止。
    -
    保罗·奥斯特'}"); +mingyan.push("{'index':512,'content':'似水流年才是一个人的一切,其余的全是片刻的欢娱和不幸。
    -
    王小波'}"); +mingyan.push("{'index':632,'content':'结局很美妙的事情,开头并非如此。
    -
    佚名'}"); +mingyan.push("{'index':227,'content':'世界上最容易的事,就是和别人失去联系。
    -
    张彤禾'}"); +mingyan.push("{'index':1074,'content':'漂洋过海的来看你,为了这次相聚,我连见面时的呼吸,都曾反复练习,言语从来没能将我的情意,表达千万分之一。
    -
    李宗盛'}"); +mingyan.push("{'index':279,'content':'说出来会被嘲笑的梦想,才有实现的价值。
    -
    九把刀'}"); +mingyan.push("{'index':1383,'content':'不为一段关系消磨和损耗,无论爱是多么值得歌颂的美德,都不值得你为此变成另一个人。答应我,要留住灵气,轻盈,要随时可以独自一人,暗夜里走路回家心里还哼着歌。答应我,要善待自己。
    -
    吕彦妮'}"); +mingyan.push("{'index':250,'content':'等到达彼岸,至少我们知道曾并肩走过。
    -
    加思·斯坦'}"); +mingyan.push("{'index':1237,'content':'有时觉得,自己正在经历人生中最幸福的岁月,但只把这种感觉存放在脑海的一个角落里,因为担心,如果总想着自己幸福,就可能失去它。
    -
    《我脑袋里的怪东西》'}"); +mingyan.push("{'index':735,'content':'用我一生,再换你十年天真无邪。
    -
    南派三叔'}"); +mingyan.push("{'index':933,'content':'我们共用的那个太阳,已经很老了吧;我们共用的风,却是新鲜的。
    -
    张怡微'}"); +mingyan.push("{'index':925,'content':'自从我们相遇的那一刻, 你是我白天黑夜不落的星。
    -
    莱蒙托夫《乌黑的眼睛》'}"); +mingyan.push("{'index':1229,'content':'飘零做归宿,爱无法解读,有些话不说因为于事无补。
    -
    傅首尔'}"); +mingyan.push("{'index':1158,'content':'我们的唇必定是一朵梅花的两半,所以你该来吻我,或者我该去吻你。没人能把一朵梅花劈开,再让她孤零零落在土里。
    -
    骆瑞生'}"); +mingyan.push("{'index':841,'content':'月亏了能再盈,花谢了能再开。可是,人别了,能否再见却未可知。
    -
    周国平'}"); +mingyan.push("{'index':1341,'content':'也许我们终其一生要做的并非是为了占有什么或者赢得什么,而是为了克服,克服自己,克服时代,或是克服自身天性中的局限。好好谈一场情是为了认清自己,努力做一件事是想要冲破限制。某种程度上来说,克服,即是意义。
    -
    吕彦妮'}"); +mingyan.push("{'index':98,'content':'孤独守着看不见的你,或者孤独失去守不住的你。爱情,怎么可能会没有悲伤。
    -
    金丹华。'}"); +mingyan.push("{'index':1155,'content':'我要在你平庸无奇的回忆里,做一个闪闪发光的神经病。
    -
    马良'}"); +mingyan.push("{'index':234,'content':'在这一小段时空里,我们交付了彼此的孤独,又用信任填补了它。
    -
    帕蒂•史密斯'}"); +mingyan.push("{'index':742,'content':'在这世上,有些东西是石头无法刻成的,在我们心里,有一块地方是无法锁住的,那块地方叫做希望。
    -
    《肖申克的救赎》'}"); +mingyan.push("{'index':380,'content':'如果爱必须用言语表达,那么哑巴如何相爱?
    -
    《比悲伤更悲伤的故事》'}"); +mingyan.push("{'index':675,'content':'很多人害怕独处,一旦不处于热闹中,便觉得整个世界要抛弃他去寻欢作乐。那是一种自我逃避。有时候,人越多反而越寂寞,那是一种折磨。善待自己,只有傻瓜才煞费苦心地自虐。
    -
    祝小兔'}"); +mingyan.push("{'index':515,'content':'爱就是一个你压根找不到优点的人,在你心里迷了路,自说自话地停在了最柔软的那个地方。
    -
    张晓晗'}"); +mingyan.push("{'index':123,'content':'你要知道,你的头脑,你的内心,不是酒店的厨房,可以把里面的东西像旧罐头一样扔掉。它更像是一条河流,每时每刻都在流动和变化。你无法矫直一条河流。
    -
    伊恩·麦克尤恩'}"); +mingyan.push("{'index':1292,'content':'与其因为泯然众人而惶恐不已,不如在众生中觅得自我,学会接受最普通的生活。
    -
    傅踢踢'}"); +mingyan.push("{'index':1162,'content':'说一辈子简单,过一辈子太难。年轻的嘴唇说出天长地久,如此的美好与荒唐。
    -
    路明'}"); +mingyan.push("{'index':204,'content':'在那做梦的人的梦中,被梦见的人醒了。
    -
    博尔赫斯'}"); +mingyan.push("{'index':1091,'content':'我觉得最大的孤独是:行走在如此密集的人群中却没有一个人可以倾诉。
    -
    俞敏洪'}"); +mingyan.push("{'index':919,'content':'我要在你身上做,春天对樱桃树做的事。
    -
    聂鲁达'}"); +mingyan.push("{'index':1119,'content':'三年了。
    -
    一个工作室'}"); +mingyan.push("{'index':744,'content':'任何一种环境或一个人,初次见面就预感到离别的隐痛时,你必定是爱上他了。
    -
    《沿着塞纳河到翡冷翠》'}"); +mingyan.push("{'index':555,'content':'得到了再失去,总比从来就没有得到更伤人。
    -
    《追风筝的人》'}"); +mingyan.push("{'index':249,'content':'你欢笑,这世界陪你一起欢笑;你哭泣,却只能独自黯然神伤。
    -
    埃拉·惠勒·威尔科克斯'}"); +mingyan.push("{'index':385,'content':'我常常思考为何鸟儿拥有整片天空,却老是停留在一个地方。然后我问了自己同样的问题。
    -
    Harun Yahya'}"); +mingyan.push("{'index':149,'content':'如果你反复被人需要,你基本是一个善良的人。
    -
    小饭'}"); +mingyan.push("{'index':619,'content':'我们听过无数的道理,却仍旧过不好这一生。
    -
    《后会无期》'}"); +mingyan.push("{'index':110,'content':'每个人都是自己的神,爱你者的神,你所支配的世界里的神。
    -
    《我所理解的生活》'}"); +mingyan.push("{'index':827,'content':'我曾赤诚天真地爱过你,除了伤心难过,一无所得。若干年后我想起,能够说出“我曾赤诚天真地爱过一个人”,这是一生之中,我最为安慰的事情。
    -
    葛婉仪'}"); +mingyan.push("{'index':444,'content':'所有漂泊的人生都梦想着平静、童年、杜鹃花,正如所有平静的人生都幻想伏特加、乐队和醉生梦死。
    -
    萨冈'}"); +mingyan.push("{'index':91,'content':'男人也好,女人也好,如果没有自己过好日子的能力,那他也没有和别人过好日子的能力。
    -
    梁文道'}"); +mingyan.push("{'index':189,'content':'如果看不清自己,就看看身边的人。你只是你周围的事物。
    -
    《亲爱的野兽先生》'}"); +mingyan.push("{'index':1037,'content':'高兴就又跑又跳,悲伤就又哭又喊,那是上野动物园猴子干的事。笑在脸上,哭在心里,说出心里相反的语言,做出心里相反的脸色,这才叫人哪。
    -
    小津安二郎'}"); +mingyan.push("{'index':1043,'content':'分别是,从此就一个人站在茫茫人群中,一个人站在世界上。我的每句话、每件事,都不能再说给你听。
    -
    苏更生'}"); +mingyan.push("{'index':1379,'content':'爱情大概是这世上最变化多端也最循规蹈矩的存在,一开始只想多看你一眼,于是想每天看你很多遍,于是只想一个人看你很多遍,于是占有,争执,绑架,歇斯底里,于是我们都忘了,一开始我只想多看你一眼。
    -
    郑执'}"); +mingyan.push("{'index':900,'content':'我终于感到,我们之间的全部通信只是一个大大的幻影,我们每人只是在给自己写信。我深刻地爱着你,但却绝望地不得不承认:当你远离我时,我爱你更深。
    -
    纪德《窄门》'}"); +mingyan.push("{'index':946,'content':'现在过的每一天,都是余生中最年轻的一天。
    -
    佚名'}"); +mingyan.push("{'index':554,'content':'我爱你不是因为你是谁,而是我在你面前可以是谁。
    -
    《剪刀手爱德华》'}"); +mingyan.push("{'index':565,'content':'在硝烟中想起冰棒汽水的味道,和那些无所事事一整个夏天的年少。
    -
    《最后的战役》'}"); +mingyan.push("{'index':942,'content':'所以要等,所以要忍,一直要到春天过去,到灿烂平息,到雷霆把他们轻轻放过,到幸福不请自来,才笃定,才坦然,才能在街头淡淡一笑。春有春的好,春天过去,有过去的好。
    -
    韩松落 《我们的她们》'}"); +mingyan.push("{'index':939,'content':'冰啤酒只有第一口好喝,香烟只有第一口好闻,人生若只如初见俗套而准确,你该把我扔掉,在序幕结束,在所有量多的第二天。
    -
    嚜子'}"); +mingyan.push("{'index':972,'content':'仰望星空,我想知道:有人正从世界的某个地方朝我走来吗? 像光那样,从一颗星达到另外一颗星。
    -
    几米'}"); +mingyan.push("{'index':97,'content':'地震时天空很安全,伴侣很安全,喝醉时酒杯很安全,心很安全。
    -
    海子'}"); +mingyan.push("{'index':290,'content':'你每天都在做很多看起来毫无意义的决定,但某天你的某个决定就能改变你的一生。
    -
    《西雅图夜未眠》'}"); +mingyan.push("{'index':662,'content':'这是一个流行离开的世界,但是我们都不擅长告别。
    -
    米兰·昆德拉'}"); +mingyan.push("{'index':389,'content':'回忆本来是非常美好的,只要你能让过去的都过去。
    -
    《爱在黄昏日落时》'}"); +mingyan.push("{'index':358,'content':'所有的光鲜亮丽都敌不过时间,并且一去不复返。
    -
    《了不起的盖茨比》'}"); +mingyan.push("{'index':1103,'content':'我们过得不快乐,一部分原因是我们不够诚恳。敢爱敢恨不容易,跨过人潮拥抱你和不顾一切撕破脸皮都需要勇气。
    -
    咸贵人'}"); +mingyan.push("{'index':1031,'content':'我们都爱过注定不会爱我们的人,这没什么,因为总有那么一天,我们会突然发现原来自己这么多年不过是钻牛角尖而已,我们对往事的种种不忿,只是觉得自己受了委屈。
    -
    王云超'}"); +mingyan.push("{'index':419,'content':'等待的姿势里,人们模样各不相同。而我倒情愿你能带着笑坐在长椅上,剥一颗橘子,哼一段曲,不必忧虑,不必前后张望。因为你知道,等的那列火车一定会来,纵使满身尘嚣,纵使山高水长。
    -
    段劈柴'}"); +mingyan.push("{'index':874,'content':'那些固然很好,可我不想要,你不必劝;这些我不喜欢,但你心仪,我绝不出言扫兴。
    -
    八月长安'}"); +mingyan.push("{'index':828,'content':'不在任何东西面前失去自我,哪怕是教条,哪怕是别人的目光,哪怕是爱情。
    -
    《成为简·奥斯汀》'}"); +mingyan.push("{'index':1016,'content':'并不顾忌表达不开心,才算得上真的过得开心。
    -
    方慧'}"); +mingyan.push("{'index':349,'content':'我们能做的,仅仅是在这条路上走得更远,绝不能回头。天堂未必在前方,但地狱一定在身后。
    -
    程浩'}"); +mingyan.push("{'index':1182,'content':'一无所知的人什么都不爱。一无所能的人什么都不懂。什么都不懂的人是毫无价值的。但是懂得很多的人,却能爱,有见识,有眼光……对一件事了解得越深,爱的程度也越深。
    -
    巴拉塞尔士'}"); +mingyan.push("{'index':1273,'content':'我想爱情里最残忍的部分是,在狂热的时候,觉得可以为他做一切,摘星星射太阳赚大钱跳悬崖,但总有一天,你发现自己并不能。所有嘴上的我爱你,变成了心里的凭什么。
    -
    张晓晗'}"); +mingyan.push("{'index':154,'content':'我从没被谁知道,所以也没被谁忘记。在别人的回忆中生活,并不是我的目的。
    -
    顾城'}"); +mingyan.push("{'index':157,'content':'坏情绪是打不死的,但摸摸他的头,他就会安静地睡过去。
    -
    琦殿'}"); +mingyan.push("{'index':1062,'content':'成熟意味着看到差异,但又意识到差异并不重要。
    -
    特德·姜'}"); +mingyan.push("{'index':830,'content':'人不曾老去,直到悔恨取代了梦想。
    -
    约翰·巴里摩'}"); +mingyan.push("{'index':1004,'content':'我愿意舍弃一切,以想念你终此一生。
    -
    朱生豪'}"); +mingyan.push("{'index':869,'content':'你最愿意做的那件事,才是你真正的天赋所在。
    -
    摩西奶奶'}"); +mingyan.push("{'index':60,'content':'世界上最强有力的人就是那最孤立的人。
    -
    胡适'}"); +mingyan.push("{'index':724,'content':'秋天该很好,你若尚在场。
    -
    张国荣《春夏秋冬》'}"); +mingyan.push("{'index':139,'content':'岁月掩不住爹娘淳朴的笑容,梦中的姑娘依然长发迎空。
    -
    罗大佑《鹿港小镇》'}"); +mingyan.push("{'index':252,'content':'青春是一个短暂的美梦,当你醒来时,它早已消失无踪。
    -
    莎士比亚'}"); +mingyan.push("{'index':1283,'content':'小时候收到人家送的巧克力总是小心翼翼地藏在口袋里 ,最后全都融化。长大后见多了不经意间路过的风景,无意间抿到的美酒,没有留下电话号码的人。学会了从第一眼到最后一眼,好好享用,把人爱够,把酒喝光,不去瞻前顾后。学会了在最快乐时说,我们干了这杯,不为什么,就现在。
    -
    张晓晗'}"); +mingyan.push("{'index':1198,'content':'我从小就怕热闹,现在也依然,因为热闹之后必有冷清,它们格外的会令我感到人生如梦。
    -
    朱天心'}"); +mingyan.push("{'index':1163,'content':'无论听来多么平凡的爱情,那都是属于他们的、独一无二的史诗,是他们自己的桃花源传说。
    -
    张佳玮《爱情故事》'}"); +mingyan.push("{'index':313,'content':'别让心房沾染尘埃,要一种干净的相爱。
    -
    王菲《云端》'}"); +mingyan.push("{'index':657,'content':'你发现说真话容易犯错,便不再说话;你发现愤怒、轻视与得意时都会影响人际关系,便省略表情;你发现手舞足蹈会影响形象,便不再做任何夸张动作——你终于活得如同一部人类学行为规范,去掉了表情,隐藏了情绪,不带一丝人气,成了橡皮人。
    -
    《我的病就是没有感觉》'}"); +mingyan.push("{'index':859,'content':'别灰心啦,人生不就是这样吗?起起落落落落落落落落落落落落的。
    -
    丁丁张'}"); +mingyan.push("{'index':754,'content':'如果有更美的风景,更多不需要妥协的选择,如果能这样热切地过每一天。
    -
    陈绮贞'}"); +mingyan.push("{'index':164,'content':'没有比远去的苦难更甜蜜的事了。
    -
    铁头'}"); +mingyan.push("{'index':237,'content':'抛弃你的逻辑,跟随你的感受。
    -
    《星际迷航》'}"); +mingyan.push("{'index':19,'content':'“正常”就是一种缺陷。很多例子都告诫我,有点问题比没有问题好很多。
    -
    何禾'}"); +mingyan.push("{'index':142,'content':'与人相处,或许参考天体力学是一个好办法,因为天上的星星们一直很融洽。
    -
    何禾'}"); +mingyan.push("{'index':506,'content':'长日尽处,我站在你的面前,你将看到我的伤痕,知道我曾经受伤,也曾经痊愈。
    -
    泰戈尔'}"); +mingyan.push("{'index':1337,'content':'在我们的一生中,遇到爱,遇到性都不稀罕,稀罕的是遇到了解。
    -
    廖一梅'}"); +mingyan.push("{'index':1184,'content':'后来我不再去谈论理想和现实,因为我相信对于真正优秀的人来说,它们是一样的。
    -
    熊德启'}"); +mingyan.push("{'index':409,'content':'世界以痛吻我,要我报之以歌。
    -
    泰戈尔'}"); +mingyan.push("{'index':1323,'content':'所谓青春就是尚未得到某种东西的状态,就是渴望的状态,憧憬的状态,也是具有可能性的状态。他们眼前展现着人生广袤的原野和恐惧,尽管他们还一无所有,但他们偶尔也能在幻想中具有一种拥有一切的感觉。
    -
    三岛由纪夫'}"); +mingyan.push("{'index':1353,'content':'我们总是喜欢拿“顺其自然”来敷衍人生道路上的荆棘坎坷,却很少承认,真正的顺其自然,其实是竭尽所能之后的不强求,而非两手一摊的不作为。
    -
    瑞卡斯'}"); +mingyan.push("{'index':447,'content':'这世上一定还藏着很多很多只要坚持寻找,就能找到的东西。
    -
    小川糸'}"); +mingyan.push("{'index':62,'content':'残酷有一颗人的心,嫉妒有一张人的脸。
    -
    威廉•布莱克'}"); +mingyan.push("{'index':1255,'content':'你说世界很大,总有展翅的地方,那是游乐场,那里有梦想。我说世界再大,没有你在的地方,不过是寂寞,寂寞的流浪。
    -
    《只怕不够时间看你白头》'}"); +mingyan.push("{'index':125,'content':'当头发已斑白的时候,你是否还依然能牢记我。
    -
    陈升《然而》'}"); +mingyan.push("{'index':870,'content':'在这个世界上,再也没有比置身于人群之中,却又得孤独生活更可怕的事了。
    -
    斯蒂芬·茨威格'}"); +mingyan.push("{'index':711,'content':'你涉世未深,所以你与众不同。
    -
    叶辰'}"); +mingyan.push("{'index':839,'content':'所有你乐于挥霍的时间都不能算作是浪费。
    -
    约翰·列侬'}"); +mingyan.push("{'index':482,'content':'等待亦是约会的一部分。
    -
    古贺春华'}"); +mingyan.push("{'index':931,'content':'一个人对幸福的全部的感受,就蕴藏在一个吻和一次散步,就在对晚餐和读一本书的期待之中。
    -
    迈克尔·坎宁安'}"); +mingyan.push("{'index':756,'content':'我心中已经听到来自远方的呼唤,再不需要回过头去关心身后的种种是非与议论。我已无暇顾及过去,我要向前走。
    -
    米兰·昆德拉'}"); +mingyan.push("{'index':147,'content':'破的城市,平淡日子,他要不停寻找着,生活的刺。
    -
    韩寒《空城计》'}"); +mingyan.push("{'index':615,'content':'从来,爱不知道自己的深度,直到别离的时刻。
    -
    纪伯伦'}"); +mingyan.push("{'index':758,'content':'一个人逛街,一个人吃饭,一个人旅行,一个人做很多事。一个人的日子固然寂寞,但更多时候是因寂寞而快乐。极致的幸福,存在于孤独的深海。在这样日复一日的生活里,我逐渐与自己达成和解。
    -
    《然后,我就一个人了》'}"); +mingyan.push("{'index':964,'content':'我妈妈总有办法搞定一切,我总有办法搞砸一切。
    -
    《麦兜我和我妈妈》'}"); +mingyan.push("{'index':1025,'content':'用笔写一句我爱你,胜过一万个微信表情。
    -
    ONE BOX 《无用之诗》'}"); +mingyan.push("{'index':904,'content':'那些真正发生过的事,或许不在这世上而在我们内心。
    -
    陶立夏'}"); +mingyan.push("{'index':402,'content':'希望是件好东西,也许是世上最好的东西。好东西从来不会流逝。
    -
    《肖申克的救赎》'}"); +mingyan.push("{'index':1115,'content':'世界让我挫败,我还舍不得离开。
    -
    《奥丽芙·基特里奇》'}"); +mingyan.push("{'index':1207,'content':'谁都不要告诉好吗?清晨庭院的角落里,花儿悄悄掉眼泪的事。
    -
    《给孩子读诗》'}"); +mingyan.push("{'index':1256,'content':'用可以想到的一切方法都无法取悦一个人,那只能放弃,这就是最好的取悦。
    -
    《自由》'}"); +mingyan.push("{'index':895,'content':'我宁愿因做自己而招人厌恶,也不愿为了迎合他人而伪装自己。
    -
    科特·柯本'}"); +mingyan.push("{'index':1272,'content':'有时候女人买衣服、买鞋子、买包包,买的就是对自己的幻想。
    -
    苏更生'}"); +mingyan.push("{'index':203,'content':'如何让一滴水永不干涸,答案是让它流入大海。
    -
    释迦牟尼'}"); +mingyan.push("{'index':937,'content':'所谓幸福,是在于认识一个人的界限而爱这个界限。
    -
    《约翰·克里斯朵夫》'}"); +mingyan.push("{'index':30,'content':'很高兴又见到你。
    -
    韩寒'}"); +mingyan.push("{'index':270,'content':'愿你被很多人爱,如果没有,愿你在寂寞中学会宽容。
    -
    刘瑜'}"); +mingyan.push("{'index':977,'content':'真正的输家是那些害怕失败,连尝试都不敢尝试的人。
    -
    《阳光小美女》'}"); +mingyan.push("{'index':257,'content':'时间从来不回答,生命从来不喧哗。
    -
    吴青峰'}"); +mingyan.push("{'index':612,'content':'曾经以为生命中最糟糕的事,就是孤独终老。其实不是。最糟糕的是与那些让你感到孤独的人一起终老。
    -
    《世界上最伟大的父亲》'}"); +mingyan.push("{'index':443,'content':'人之所以悲哀,是因为我们留不住岁月,更无法不承认,青春,有一日是要这么自然的消失过去。
    -
    三毛'}"); +mingyan.push("{'index':1354,'content':'人虽然渺小,人生虽然短促,但是人能学,人能修身,人能自我完善,人的可贵在人自身。
    -
    杨绛'}"); +mingyan.push("{'index':1266,'content':'有时候我在清晨醒来,我的灵魂甚至还是湿的,远远的,海洋鸣响并且发出回声,这是一个港口,我在这里爱你。
    -
    聂鲁达'}"); +mingyan.push("{'index':1238,'content':'永远都不要为了目的而忘了初衷。就像给风命名的,不是它要去的方向,而是它来时的方向。
    -
    夏正正'}"); +mingyan.push("{'index':621,'content':'我们知道他们在演戏,他们也知道自己在演戏,他们也知道我们知道他们在演戏,我们也知道他们知道我们知道他们在演戏。
    -
    佚名'}"); +mingyan.push("{'index':597,'content':'每个孩子来到世上都有自己的使命,其中之一,就是帮助父母成长为更好的生命。
    -
    《下乡养儿》'}"); +mingyan.push("{'index':274,'content':'我们曾经互相拥抱,认为能忘记世界的荒芜。
    -
    安妮宝贝'}"); +mingyan.push("{'index':708,'content':'人生最可怕的事,是一边后悔一边生活。
    -
    《55岁开始的Hello Life》'}"); +mingyan.push("{'index':1382,'content':'只有少数特别幸运的人生来就自信满满,多数的你我,一辈子,最幸运的事,就是遇见个把赏识你的人,把你于不自信的苍茫之中叫醒,让你发现,原来我也并非一无是处。
    -
    《男人相对论》'}"); +mingyan.push("{'index':302,'content':'好的爱情是你通过一个人看到整个世界,坏的爱情是你为了一个人舍弃世界。
    -
    《两小无猜》'}"); +mingyan.push("{'index':1368,'content':'喜欢就是,夏天可真棒,可以吃冰玩水,坐在海边看书打发时光,一刀劈开一个西瓜一人一半,吹着晚上七八点钟的风闲逛在街上,那么开心,谁也找不到散场回家的理由。而爱呢,是我和夏天挥手告别,小声告诉它,我爱上一个人,纵然如此喜欢你,我还是想陪他去秋冬春看一看。
    -
    张晓晗'}"); +mingyan.push("{'index':403,'content':'每一个黄昏,都有我爱你的影子。
    -
    jaycee'}"); +mingyan.push("{'index':527,'content':'很久很久没你的消息,就像很久很久没晴朗的城市。
    -
    薛诗汉'}"); +mingyan.push("{'index':115,'content':'尽管有天我们会变老,老得可能都模糊了眼睛,但是我要写出人间最美丽的歌送给你。
    -
    陈升《不再让你孤单》【往期精选】'}"); +mingyan.push("{'index':1265,'content':'在这世界上我不想占有任何东西,我知道没有一个人值得我嫉妒。
    -
    米沃什'}"); +mingyan.push("{'index':940,'content':'春风沉醉的夜晚,遇见过你,从此东西南北风一样了,清晨也是夜晚了,不想你也是想你了。
    -
    郑执'}"); +mingyan.push("{'index':848,'content':'等你发现时间是贼了,它早已偷光你的选择。
    -
    李宗盛'}"); +mingyan.push("{'index':143,'content':'我们的生命是不朽的,我们所说的话,所做的事,将会影响我们的每一次人生。
    -
    《云图》'}"); +mingyan.push("{'index':518,'content':'你走,我不送你。你来,无论多大风多大雨,我要去接你。
    -
    梁实秋'}"); +mingyan.push("{'index':477,'content':'没有任何事物能被遗忘,能被丢失。宇宙本身就是一个巨大的记忆系统。往回看,你能发现世界的开端。
    -
    珍妮特·温特森'}"); +mingyan.push("{'index':771,'content':'努力想得到什么东西,其实只要沉着镇静、实事求是,就可以轻易地、神不知鬼不觉地达到目的。而如果过于使劲,闹得太凶,太幼稚,太没有经验,就哭啊,抓啊,拉啊,像一个小孩扯桌布,结果却是一无所获,只不过把桌上的好东西都扯到地上,永远也得不到了。
    -
    卡夫卡'}"); +mingyan.push("{'index':300,'content':'人常犯的错,就是花费时间去在乎不怎么在乎你的人。
    -
    吴青峰'}"); +mingyan.push("{'index':811,'content':'对相爱的人来说,对方的心才是最好的房子。
    -
    村上春树'}"); +mingyan.push("{'index':509,'content':'我们不远万里去寻求的东西,常常就在我们触手可及的地方。
    -
    卡莉娜·斯蒂芬诺娃'}"); +mingyan.push("{'index':208,'content':'有很长的路要走的时候,反倒不能太用力。
    -
    老古竹斋'}"); +mingyan.push("{'index':46,'content':'敏感而拙言的人们,盈积了全宇宙的辛酸与秘密。
    -
    张冠仁'}"); +mingyan.push("{'index':991,'content':'我们命中注定要失去所爱之人,不然我们怎么知道,他们在我们生命中有多重要?
    -
    《返老还童》'}"); +mingyan.push("{'index':96,'content':'我注意过,即使是那些声称“一切都是命中注定的,而且我们无力改变”的人,在过马路前都会左右看。
    -
    史蒂芬·霍金'}"); +mingyan.push("{'index':263,'content':'人的自由并不仅仅在于做他愿意做的事,而在于永远不做他不愿意做的事。
    -
    卢梭'}"); +mingyan.push("{'index':354,'content':'所谓父女母子一场,只不过意味着,你和他的缘分就是今生今世不断地在目送他的背影渐行渐远。
    -
    龙应台'}"); +mingyan.push("{'index':1083,'content':'我们都是突然长大。那个瞬间,在无可挽回的事实前,学会了从容不迫;在大势所趋时,学会了不动声色。开始保守地给予,迅速地放弃,游刃有余地周旋。在那些众口一辞的节日里,将最好的情感夹杂在寻常祝福中,试图蒙蔽隐秘的初衷。
    -
    姬霄'}"); +mingyan.push("{'index':145,'content':'虽然我不是主打歌,但我是B面第一首。
    -
    《女朋友·男朋友》'}"); +mingyan.push("{'index':774,'content':'所有的大人都曾经是小孩,虽然,只有少数的人记得。
    -
    《小王子》'}"); +mingyan.push("{'index':86,'content':'当你年轻时,以为什么都有答案,可是老了的时候,你可能又觉得其实人生并没有所谓的答案。
    -
    《堕落天使》'}"); +mingyan.push("{'index':289,'content':'如果我们没有才华,那努力就足以使我们幸福了。
    -
    朱肖影《喜欢,就继续下去》'}"); +mingyan.push("{'index':700,'content':'不管你曾经被伤害得有多深,总会有一个人的出现,让你原谅之前生活对你所有的刁难。
    -
    宫崎骏《幽灵公主》'}"); +mingyan.push("{'index':99,'content':'人的注意力是一把匕首,不是插在别人的胸膛就是揣在自己的腰间。
    -
    何禾'}"); +mingyan.push("{'index':1168,'content':'此刻当你陷入黑暗的绝境,才懂光明多遥不可及。
    -
    何洁'}"); +mingyan.push("{'index':812,'content':'如果我们能接着进化,进化到不用说话,就可以知道对方的心思,头顶上的红、蓝箭头一目了然,那该有多好。说到一半的话,也能知道什么意思。 可是,我们都太不成熟,互相伤害,只能带着一脸生涩的笑容天真地走下去。
    -
    市川拓司'}"); +mingyan.push("{'index':1300,'content':'自以为用这颗小小的心脏包裹住了波澜壮阔,给这片山川湖海围上了栅栏,不放出那匹脱缰野马,这样就不会有人从我假意的冷淡里,拎出些滚烫的秘密。
    -
    陈大力'}"); +mingyan.push("{'index':1347,'content':'未曾身临绝境,真是不知道爱究竟是什么样的东西。它可以让你那么温暖,也可以让你那么锋利,可以让你那么宽容,也可以让你那么自私。
    -
    《四幕戏》'}"); +mingyan.push("{'index':1124,'content':'如果没有天赋的话,其实好人比坏人好做。
    -
    张怡微'}"); +mingyan.push("{'index':159,'content':'生活总在不经意的时候泼你满头满脸的狗血,没关系,我还是会回你一个血色狰狞的笑。
    -
    Double青'}"); +mingyan.push("{'index':561,'content':'你一直是我生命中永远都不可能重复的一场遭遇。
    -
    安·兰德'}"); +mingyan.push("{'index':905,'content':'爱是一种力量,让我们超越时空的维度感知它的存在。
    -
    《星际穿越》'}"); +mingyan.push("{'index':1357,'content':'世界没有悲剧和喜剧之分,如果你能从悲剧中走出来,那就是喜剧;如果你沉缅于喜剧之中,那它就是悲剧。
    -
    上德若谷'}"); +mingyan.push("{'index':1233,'content':'明知分离苦,相遇也难挡得住。难在不愿放弃遇见,难在没有勇气道别,这就是人生。
    -
    符嘉超'}"); +mingyan.push("{'index':610,'content':'你爱上一个人的那个瞬间,是会永远永远留在心里的,这瞬间,便是生活的勇气,便是黑夜里点亮的一盏明灯。
    -
    《东京爱情故事》'}"); +mingyan.push("{'index':829,'content':'人世就是这样,会静静地突然想到忽略了极熟的东西。我有个朋友一天忽然说,好久没有吃醋了,当即到小铺里买了一瓶山西老陈醋,坐在街边喝,喝得眼泪流出来。
    -
    阿城'}"); +mingyan.push("{'index':769,'content':'人不应该是插在花瓶里供人观赏的静物,而是蔓延在草原上随风起舞的韵律。生命不是安排,而是追求,人生的意义也许永远没有答案,但也要尽情感受这种没有答案的人生。
    -
    弗吉尼亚·伍尔芙'}"); +mingyan.push("{'index':842,'content':'你在乎谁,你说了算。谁在乎你,你说了不算,时间说了算。
    -
    郑执'}"); +mingyan.push("{'index':1227,'content':'时光因为在你眼中流过而显得不再那样面目可憎,因为我从你眼中看到的不是苍老,是自己年轻但有限的生命被人紧紧抓牢。
    -
    郑执'}"); +mingyan.push("{'index':1279,'content':'不管怎么费尽心力,人会受伤的时候就会受伤。
    -
    村上春树'}"); +mingyan.push("{'index':913,'content':'有人说:真正的爱情,背后没有秘密。说这话的人,既不明白爱情,也不明白秘密。
    -
    《北京乐与路》'}"); + +/** + 随机获取名言. + + 直接调用此函数即可. +*/ +function getMingYan(){ + return (mingyan[parseInt(Math.random()*(mingyan.length-1)+1)]); +} + +/* + 获取名言,并链接至One. +*/ +function getMingYanHref(){ + var item = getItem(); + return ""+item.content+""; +} + +function getItem(){ + return eval('(' +(mingyan[parseInt(Math.random()*(mingyan.length-1)+1)])+ ')'); +} + +/* + 只获取内容. +*/ +function getMingYanContent(){ + var item = getItem(); + return item['content']; +} \ No newline at end of file diff --git a/plugin/nicescroll/jquery.nicescroll.js b/plugin/nicescroll/jquery.nicescroll.js new file mode 100644 index 0000000..bf4a29d --- /dev/null +++ b/plugin/nicescroll/jquery.nicescroll.js @@ -0,0 +1,3729 @@ +/* jquery.nicescroll +-- version 3.7.6 +-- copyright 2017-07-19 InuYaksa*2017 +-- licensed under the MIT +-- +-- https://nicescroll.areaaperta.com/ +-- https://github.com/inuyaksa/jquery.nicescroll +-- +*/ + +/* jshint expr: true */ + +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS. + module.exports = factory(require('jquery')); + } else { + // Browser globals. + factory(jQuery); + } +}(function (jQuery) { + + "use strict"; + + // globals + var domfocus = false, + mousefocus = false, + tabindexcounter = 0, + ascrailcounter = 2000, + globalmaxzindex = 0; + + var $ = jQuery, // sandbox + _doc = document, + _win = window, + $window = $(_win); + + var delegatevents = []; + + // http://stackoverflow.com/questions/2161159/get-script-path + function getScriptPath() { + var scripts = _doc.currentScript || (function () { var s = _doc.getElementsByTagName('script'); return (s.length) ? s[s.length - 1] : false; })(); + var path = scripts ? scripts.src.split('?')[0] : ''; + return (path.split('/').length > 0) ? path.split('/').slice(0, -1).join('/') + '/' : ''; + } + + // based on code by Paul Irish https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ + var setAnimationFrame = _win.requestAnimationFrame || _win.webkitRequestAnimationFrame || _win.mozRequestAnimationFrame || false; + var clearAnimationFrame = _win.cancelAnimationFrame || _win.webkitCancelAnimationFrame || _win.mozCancelAnimationFrame || false; + + if (!setAnimationFrame) { + var anilasttime = 0; + setAnimationFrame = function (callback, element) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - anilasttime)); + var id = _win.setTimeout(function () { callback(currTime + timeToCall); }, + timeToCall); + anilasttime = currTime + timeToCall; + return id; + }; + clearAnimationFrame = function (id) { + _win.clearTimeout(id); + }; + } else { + if (!_win.cancelAnimationFrame) clearAnimationFrame = function (id) { }; + } + + var ClsMutationObserver = _win.MutationObserver || _win.WebKitMutationObserver || false; + + var now = Date.now || function () { return new Date().getTime(); }; + + var _globaloptions = { + zindex: "auto", + cursoropacitymin: 0, + cursoropacitymax: 1, + cursorcolor: "#424242", + cursorwidth: "6px", + cursorborder: "1px solid #fff", + cursorborderradius: "5px", + scrollspeed: 40, + mousescrollstep: 9 * 3, + touchbehavior: false, // deprecated + emulatetouch: false, // replacing touchbehavior + hwacceleration: true, + usetransition: true, + boxzoom: false, + dblclickzoom: true, + gesturezoom: true, + grabcursorenabled: true, + autohidemode: true, + background: "", + iframeautoresize: true, + cursorminheight: 32, + preservenativescrolling: true, + railoffset: false, + railhoffset: false, + bouncescroll: true, + spacebarenabled: true, + railpadding: { + top: 0, + right: 0, + left: 0, + bottom: 0 + }, + disableoutline: true, + horizrailenabled: true, + railalign: "right", + railvalign: "bottom", + enabletranslate3d: true, + enablemousewheel: true, + enablekeyboard: true, + smoothscroll: true, + sensitiverail: true, + enablemouselockapi: true, + // cursormaxheight:false, + cursorfixedheight: false, + directionlockdeadzone: 6, + hidecursordelay: 400, + nativeparentscrolling: true, + enablescrollonselection: true, + overflowx: true, + overflowy: true, + cursordragspeed: 0.3, + rtlmode: "auto", + cursordragontouch: false, + oneaxismousemode: "auto", + scriptpath: getScriptPath(), + preventmultitouchscrolling: true, + disablemutationobserver: false, + enableobserver: true, + scrollbarid: false, + scrollCLass: false + }; + + var browserdetected = false; + + var getBrowserDetection = function () { + + if (browserdetected) return browserdetected; + + var _el = _doc.createElement('DIV'), + _style = _el.style, + _agent = navigator.userAgent, + _platform = navigator.platform, + d = {}; + + d.haspointerlock = "pointerLockElement" in _doc || "webkitPointerLockElement" in _doc || "mozPointerLockElement" in _doc; + + d.isopera = ("opera" in _win); // 12- + d.isopera12 = (d.isopera && ("getUserMedia" in navigator)); + d.isoperamini = (Object.prototype.toString.call(_win.operamini) === "[object OperaMini]"); + + d.isie = (("all" in _doc) && ("attachEvent" in _el) && !d.isopera); //IE10- + d.isieold = (d.isie && !("msInterpolationMode" in _style)); // IE6 and older + d.isie7 = d.isie && !d.isieold && (!("documentMode" in _doc) || (_doc.documentMode === 7)); + d.isie8 = d.isie && ("documentMode" in _doc) && (_doc.documentMode === 8); + d.isie9 = d.isie && ("performance" in _win) && (_doc.documentMode === 9); + d.isie10 = d.isie && ("performance" in _win) && (_doc.documentMode === 10); + d.isie11 = ("msRequestFullscreen" in _el) && (_doc.documentMode >= 11); // IE11+ + + d.ismsedge = ("msCredentials" in _win); // MS Edge 14+ + + d.ismozilla = ("MozAppearance" in _style); + + d.iswebkit = !d.ismsedge && ("WebkitAppearance" in _style); + + d.ischrome = d.iswebkit && ("chrome" in _win); + d.ischrome38 = (d.ischrome && ("touchAction" in _style)); // behavior changed in touch emulation + d.ischrome22 = (!d.ischrome38) && (d.ischrome && d.haspointerlock); + d.ischrome26 = (!d.ischrome38) && (d.ischrome && ("transition" in _style)); // issue with transform detection (maintain prefix) + + d.cantouch = ("ontouchstart" in _doc.documentElement) || ("ontouchstart" in _win); // with detection for Chrome Touch Emulation + d.hasw3ctouch = (_win.PointerEvent || false) && ((navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)); //IE11 pointer events, following W3C Pointer Events spec + d.hasmstouch = (!d.hasw3ctouch) && (_win.MSPointerEvent || false); // IE10 pointer events + + d.ismac = /^mac$/i.test(_platform); + + d.isios = d.cantouch && /iphone|ipad|ipod/i.test(_platform); + d.isios4 = d.isios && !("seal" in Object); + d.isios7 = d.isios && ("webkitHidden" in _doc); //iOS 7+ + d.isios8 = d.isios && ("hidden" in _doc); //iOS 8+ + d.isios10 = d.isios && _win.Proxy; //iOS 10+ + + d.isandroid = (/android/i.test(_agent)); + + d.haseventlistener = ("addEventListener" in _el); + + d.trstyle = false; + d.hastransform = false; + d.hastranslate3d = false; + d.transitionstyle = false; + d.hastransition = false; + d.transitionend = false; + + d.trstyle = "transform"; + d.hastransform = ("transform" in _style) || (function () { + var check = ['msTransform', 'webkitTransform', 'MozTransform', 'OTransform']; + for (var a = 0, c = check.length; a < c; a++) { + if (_style[check[a]] !== undefined) { + d.trstyle = check[a]; + break; + } + } + d.hastransform = (!!d.trstyle); + })(); + + if (d.hastransform) { + _style[d.trstyle] = "translate3d(1px,2px,3px)"; + d.hastranslate3d = /translate3d/.test(_style[d.trstyle]); + } + + d.transitionstyle = "transition"; + d.prefixstyle = ''; + d.transitionend = "transitionend"; + + d.hastransition = ("transition" in _style) || (function () { + + d.transitionend = false; + var check = ['webkitTransition', 'msTransition', 'MozTransition', 'OTransition', 'OTransition', 'KhtmlTransition']; + var prefix = ['-webkit-', '-ms-', '-moz-', '-o-', '-o', '-khtml-']; + var evs = ['webkitTransitionEnd', 'msTransitionEnd', 'transitionend', 'otransitionend', 'oTransitionEnd', 'KhtmlTransitionEnd']; + for (var a = 0, c = check.length; a < c; a++) { + if (check[a] in _style) { + d.transitionstyle = check[a]; + d.prefixstyle = prefix[a]; + d.transitionend = evs[a]; + break; + } + } + if (d.ischrome26) d.prefixstyle = prefix[1]; // always use prefix + + d.hastransition = (d.transitionstyle); + + })(); + + function detectCursorGrab() { + var lst = ['grab', '-webkit-grab', '-moz-grab']; + if ((d.ischrome && !d.ischrome38) || d.isie) lst = []; // force setting for IE returns false positive and chrome cursor bug + for (var a = 0, l = lst.length; a < l; a++) { + var p = lst[a]; + _style.cursor = p; + if (_style.cursor == p) return p; + } + return 'url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize'; // thanks to https://cdnjs.com/ for the openhand cursor! + } + d.cursorgrabvalue = detectCursorGrab(); + + d.hasmousecapture = ("setCapture" in _el); + + d.hasMutationObserver = (ClsMutationObserver !== false); + + _el = null; //memory released + + browserdetected = d; + + return d; + }; + + var NiceScrollClass = function (myopt, me) { + + var self = this; + + this.version = '3.7.6'; + this.name = 'nicescroll'; + + this.me = me; + + var $body = $("body"); + + var opt = this.opt = { + doc: $body, + win: false + }; + + $.extend(opt, _globaloptions); // clone opts + + // Options for internal use + opt.snapbackspeed = 80; + + if (myopt || false) { + for (var a in opt) { + if (myopt[a] !== undefined) opt[a] = myopt[a]; + } + } + + if (opt.disablemutationobserver) ClsMutationObserver = false; + + this.doc = opt.doc; + this.iddoc = (this.doc && this.doc[0]) ? this.doc[0].id || '' : ''; + this.ispage = /^BODY|HTML/.test((opt.win) ? opt.win[0].nodeName : this.doc[0].nodeName); + this.haswrapper = (opt.win !== false); + this.win = opt.win || (this.ispage ? $window : this.doc); + this.docscroll = (this.ispage && !this.haswrapper) ? $window : this.win; + this.body = $body; + this.viewport = false; + + this.isfixed = false; + + this.iframe = false; + this.isiframe = ((this.doc[0].nodeName == 'IFRAME') && (this.win[0].nodeName == 'IFRAME')); + + this.istextarea = (this.win[0].nodeName == 'TEXTAREA'); + + this.forcescreen = false; //force to use screen position on events + + this.canshowonmouseevent = (opt.autohidemode != "scroll"); + + // Events jump table + this.onmousedown = false; + this.onmouseup = false; + this.onmousemove = false; + this.onmousewheel = false; + this.onkeypress = false; + this.ongesturezoom = false; + this.onclick = false; + + // Nicescroll custom events + this.onscrollstart = false; + this.onscrollend = false; + this.onscrollcancel = false; + + this.onzoomin = false; + this.onzoomout = false; + + // Let's start! + this.view = false; + this.page = false; + + this.scroll = { + x: 0, + y: 0 + }; + this.scrollratio = { + x: 0, + y: 0 + }; + this.cursorheight = 20; + this.scrollvaluemax = 0; + + // http://dev.w3.org/csswg/css-writing-modes-3/#logical-to-physical + // http://dev.w3.org/csswg/css-writing-modes-3/#svg-writing-mode + if (opt.rtlmode == "auto") { + var target = this.win[0] == _win ? this.body : this.win; + var writingMode = target.css("writing-mode") || target.css("-webkit-writing-mode") || target.css("-ms-writing-mode") || target.css("-moz-writing-mode"); + + if (writingMode == "horizontal-tb" || writingMode == "lr-tb" || writingMode === "") { + this.isrtlmode = (target.css("direction") == "rtl"); + this.isvertical = false; + } else { + this.isrtlmode = (writingMode == "vertical-rl" || writingMode == "tb" || writingMode == "tb-rl" || writingMode == "rl-tb"); + this.isvertical = (writingMode == "vertical-rl" || writingMode == "tb" || writingMode == "tb-rl"); + } + } else { + this.isrtlmode = (opt.rtlmode === true); + this.isvertical = false; + } + // this.checkrtlmode = false; + + this.scrollrunning = false; + + this.scrollmom = false; + + this.observer = false; // observer div changes + this.observerremover = false; // observer on parent for remove detection + this.observerbody = false; // observer on body for position change + + if (opt.scrollbarid !== false) { + this.id = opt.scrollbarid; + } else { + do { + this.id = "ascrail" + (ascrailcounter++); + } while (_doc.getElementById(this.id)); + } + + this.rail = false; + this.cursor = false; + this.cursorfreezed = false; + this.selectiondrag = false; + + this.zoom = false; + this.zoomactive = false; + + this.hasfocus = false; + this.hasmousefocus = false; + + //this.visibility = true; + this.railslocked = false; // locked by resize + this.locked = false; // prevent lost of locked status sets by user + this.hidden = false; // rails always hidden + this.cursoractive = true; // user can interact with cursors + + this.wheelprevented = false; //prevent mousewheel event + + this.overflowx = opt.overflowx; + this.overflowy = opt.overflowy; + + this.nativescrollingarea = false; + this.checkarea = 0; + + this.events = []; // event list for unbind + + this.saved = {}; // style saved + + this.delaylist = {}; + this.synclist = {}; + + this.lastdeltax = 0; + this.lastdeltay = 0; + + this.detected = getBrowserDetection(); + + var cap = $.extend({}, this.detected); + + this.canhwscroll = (cap.hastransform && opt.hwacceleration); + this.ishwscroll = (this.canhwscroll && self.haswrapper); + + if (!this.isrtlmode) { + this.hasreversehr = false; + } else if (this.isvertical) { // RTL mode with reverse horizontal axis + this.hasreversehr = !(cap.iswebkit || cap.isie || cap.isie11); + } else { + this.hasreversehr = !(cap.iswebkit || (cap.isie && !cap.isie10 && !cap.isie11)); + } + + this.istouchcapable = false; // desktop devices with touch screen support + + //## Check WebKit-based desktop with touch support + //## + Firefox 18 nightly build (desktop) false positive (or desktop with touch support) + + if (!cap.cantouch && (cap.hasw3ctouch || cap.hasmstouch)) { // desktop device with multiple input + this.istouchcapable = true; + } else if (cap.cantouch && !cap.isios && !cap.isandroid && (cap.iswebkit || cap.ismozilla)) { + this.istouchcapable = true; + } + + //## disable MouseLock API on user request + if (!opt.enablemouselockapi) { + cap.hasmousecapture = false; + cap.haspointerlock = false; + } + + this.debounced = function (name, fn, tm) { + if (!self) return; + var dd = self.delaylist[name] || false; + if (!dd) { + self.delaylist[name] = { + h: setAnimationFrame(function () { + self.delaylist[name].fn.call(self); + self.delaylist[name] = false; + }, tm) + }; + fn.call(self); + } + self.delaylist[name].fn = fn; + }; + + + this.synched = function (name, fn) { + if (self.synclist[name]) self.synclist[name] = fn; + else { + self.synclist[name] = fn; + setAnimationFrame(function () { + if (!self) return; + self.synclist[name] && self.synclist[name].call(self); + self.synclist[name] = null; + }); + } + }; + + this.unsynched = function (name) { + if (self.synclist[name]) self.synclist[name] = false; + }; + + this.css = function (el, pars) { // save & set + for (var n in pars) { + self.saved.css.push([el, n, el.css(n)]); + el.css(n, pars[n]); + } + }; + + this.scrollTop = function (val) { + return (val === undefined) ? self.getScrollTop() : self.setScrollTop(val); + }; + + this.scrollLeft = function (val) { + return (val === undefined) ? self.getScrollLeft() : self.setScrollLeft(val); + }; + + // derived by by Dan Pupius www.pupius.net + var BezierClass = function (st, ed, spd, p1, p2, p3, p4) { + + this.st = st; + this.ed = ed; + this.spd = spd; + + this.p1 = p1 || 0; + this.p2 = p2 || 1; + this.p3 = p3 || 0; + this.p4 = p4 || 1; + + this.ts = now(); + this.df = ed - st; + }; + BezierClass.prototype = { + B2: function (t) { + return 3 * (1 - t) * (1 - t) * t; + }, + B3: function (t) { + return 3 * (1 - t) * t * t; + }, + B4: function (t) { + return t * t * t; + }, + getPos: function () { + return (now() - this.ts) / this.spd; + }, + getNow: function () { + var pc = (now() - this.ts) / this.spd; + var bz = this.B2(pc) + this.B3(pc) + this.B4(pc); + return (pc >= 1) ? this.ed : this.st + (this.df * bz) | 0; + }, + update: function (ed, spd) { + this.st = this.getNow(); + this.ed = ed; + this.spd = spd; + this.ts = now(); + this.df = this.ed - this.st; + return this; + } + }; + + //derived from http://stackoverflow.com/questions/11236090/ + function getMatrixValues() { + var tr = self.doc.css(cap.trstyle); + if (tr && (tr.substr(0, 6) == "matrix")) { + return tr.replace(/^.*\((.*)\)$/g, "$1").replace(/px/g, '').split(/, +/); + } + return false; + } + + if (this.ishwscroll) { // hw accelerated scroll + + this.doc.translate = { + x: 0, + y: 0, + tx: "0px", + ty: "0px" + }; + + //this one can help to enable hw accel on ios6 http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/ + if (cap.hastranslate3d && cap.isios) this.doc.css("-webkit-backface-visibility", "hidden"); // prevent flickering http://stackoverflow.com/questions/3461441/ + + this.getScrollTop = function (last) { + if (!last) { + var mtx = getMatrixValues(); + if (mtx) return (mtx.length == 16) ? -mtx[13] : -mtx[5]; //matrix3d 16 on IE10 + if (self.timerscroll && self.timerscroll.bz) return self.timerscroll.bz.getNow(); + } + return self.doc.translate.y; + }; + + this.getScrollLeft = function (last) { + if (!last) { + var mtx = getMatrixValues(); + if (mtx) return (mtx.length == 16) ? -mtx[12] : -mtx[4]; //matrix3d 16 on IE10 + if (self.timerscroll && self.timerscroll.bh) return self.timerscroll.bh.getNow(); + } + return self.doc.translate.x; + }; + + this.notifyScrollEvent = function (el) { + var e = _doc.createEvent("UIEvents"); + e.initUIEvent("scroll", false, false, _win, 1); + e.niceevent = true; + el.dispatchEvent(e); + }; + + var cxscrollleft = (this.isrtlmode) ? 1 : -1; + + if (cap.hastranslate3d && opt.enabletranslate3d) { + this.setScrollTop = function (val, silent) { + self.doc.translate.y = val; + self.doc.translate.ty = (val * -1) + "px"; + self.doc.css(cap.trstyle, "translate3d(" + self.doc.translate.tx + "," + self.doc.translate.ty + ",0)"); + if (!silent) self.notifyScrollEvent(self.win[0]); + }; + this.setScrollLeft = function (val, silent) { + self.doc.translate.x = val; + self.doc.translate.tx = (val * cxscrollleft) + "px"; + self.doc.css(cap.trstyle, "translate3d(" + self.doc.translate.tx + "," + self.doc.translate.ty + ",0)"); + if (!silent) self.notifyScrollEvent(self.win[0]); + }; + } else { + this.setScrollTop = function (val, silent) { + self.doc.translate.y = val; + self.doc.translate.ty = (val * -1) + "px"; + self.doc.css(cap.trstyle, "translate(" + self.doc.translate.tx + "," + self.doc.translate.ty + ")"); + if (!silent) self.notifyScrollEvent(self.win[0]); + }; + this.setScrollLeft = function (val, silent) { + self.doc.translate.x = val; + self.doc.translate.tx = (val * cxscrollleft) + "px"; + self.doc.css(cap.trstyle, "translate(" + self.doc.translate.tx + "," + self.doc.translate.ty + ")"); + if (!silent) self.notifyScrollEvent(self.win[0]); + }; + } + } else { // native scroll + + this.getScrollTop = function () { + return self.docscroll.scrollTop(); + }; + this.setScrollTop = function (val) { + self.docscroll.scrollTop(val); + }; + + this.getScrollLeft = function () { + var val; + if (!self.hasreversehr) { + val = self.docscroll.scrollLeft(); + } else if (self.detected.ismozilla) { + val = self.page.maxw - Math.abs(self.docscroll.scrollLeft()); + } else { + val = self.page.maxw - self.docscroll.scrollLeft(); + } + return val; + }; + this.setScrollLeft = function (val) { + return setTimeout(function () { + if (!self) return; + if (self.hasreversehr) { + if (self.detected.ismozilla) { + val = -(self.page.maxw - val); + } else { + val = self.page.maxw - val; + } + } + return self.docscroll.scrollLeft(val); + }, 1); + }; + } + + this.getTarget = function (e) { + if (!e) return false; + if (e.target) return e.target; + if (e.srcElement) return e.srcElement; + return false; + }; + + this.hasParent = function (e, id) { + if (!e) return false; + var el = e.target || e.srcElement || e || false; + while (el && el.id != id) { + el = el.parentNode || false; + } + return (el !== false); + }; + + function getZIndex() { + var dom = self.win; + if ("zIndex" in dom) return dom.zIndex(); // use jQuery UI method when available + while (dom.length > 0) { + if (dom[0].nodeType == 9) return false; + var zi = dom.css('zIndex'); + if (!isNaN(zi) && zi !== 0) return parseInt(zi); + dom = dom.parent(); + } + return false; + } + + //inspired by http://forum.jquery.com/topic/width-includes-border-width-when-set-to-thin-medium-thick-in-ie + var _convertBorderWidth = { + "thin": 1, + "medium": 3, + "thick": 5 + }; + + function getWidthToPixel(dom, prop, chkheight) { + var wd = dom.css(prop); + var px = parseFloat(wd); + if (isNaN(px)) { + px = _convertBorderWidth[wd] || 0; + var brd = (px == 3) ? ((chkheight) ? (self.win.outerHeight() - self.win.innerHeight()) : (self.win.outerWidth() - self.win.innerWidth())) : 1; //DON'T TRUST CSS + if (self.isie8 && px) px += 1; + return (brd) ? px : 0; + } + return px; + } + + this.getDocumentScrollOffset = function () { + return { + top: _win.pageYOffset || _doc.documentElement.scrollTop, + left: _win.pageXOffset || _doc.documentElement.scrollLeft + }; + }; + + this.getOffset = function () { + if (self.isfixed) { + var ofs = self.win.offset(); // fix Chrome auto issue (when right/bottom props only) + var scrl = self.getDocumentScrollOffset(); + ofs.top -= scrl.top; + ofs.left -= scrl.left; + return ofs; + } + var ww = self.win.offset(); + if (!self.viewport) return ww; + var vp = self.viewport.offset(); + return { + top: ww.top - vp.top, + left: ww.left - vp.left + }; + }; + + this.updateScrollBar = function (len) { + var pos, off; + if (self.ishwscroll) { + self.rail.css({ + height: self.win.innerHeight() - (opt.railpadding.top + opt.railpadding.bottom) + }); + if (self.railh) self.railh.css({ + width: self.win.innerWidth() - (opt.railpadding.left + opt.railpadding.right) + }); + } else { + var wpos = self.getOffset(); + pos = { + top: wpos.top, + left: wpos.left - (opt.railpadding.left + opt.railpadding.right) + }; + pos.top += getWidthToPixel(self.win, 'border-top-width', true); + pos.left += (self.rail.align) ? self.win.outerWidth() - getWidthToPixel(self.win, 'border-right-width') - self.rail.width : getWidthToPixel(self.win, 'border-left-width'); + + off = opt.railoffset; + if (off) { + if (off.top) pos.top += off.top; + if (off.left) pos.left += off.left; + } + + if (!self.railslocked) self.rail.css({ + top: pos.top, + left: pos.left, + height: ((len) ? len.h : self.win.innerHeight()) - (opt.railpadding.top + opt.railpadding.bottom) + }); + + if (self.zoom) { + self.zoom.css({ + top: pos.top + 1, + left: (self.rail.align == 1) ? pos.left - 20 : pos.left + self.rail.width + 4 + }); + } + + if (self.railh && !self.railslocked) { + pos = { + top: wpos.top, + left: wpos.left + }; + off = opt.railhoffset; + if (off) { + if (off.top) pos.top += off.top; + if (off.left) pos.left += off.left; + } + var y = (self.railh.align) ? pos.top + getWidthToPixel(self.win, 'border-top-width', true) + self.win.innerHeight() - self.railh.height : pos.top + getWidthToPixel(self.win, 'border-top-width', true); + var x = pos.left + getWidthToPixel(self.win, 'border-left-width'); + self.railh.css({ + top: y - (opt.railpadding.top + opt.railpadding.bottom), + left: x, + width: self.railh.width + }); + } + + } + }; + + this.doRailClick = function (e, dbl, hr) { + var fn, pg, cur, pos; + + if (self.railslocked) return; + + self.cancelEvent(e); + + if (!("pageY" in e)) { + e.pageX = e.clientX + _doc.documentElement.scrollLeft; + e.pageY = e.clientY + _doc.documentElement.scrollTop; + } + + if (dbl) { + fn = (hr) ? self.doScrollLeft : self.doScrollTop; + cur = (hr) ? ((e.pageX - self.railh.offset().left - (self.cursorwidth / 2)) * self.scrollratio.x) : ((e.pageY - self.rail.offset().top - (self.cursorheight / 2)) * self.scrollratio.y); + self.unsynched("relativexy"); + fn(cur|0); + } else { + fn = (hr) ? self.doScrollLeftBy : self.doScrollBy; + cur = (hr) ? self.scroll.x : self.scroll.y; + pos = (hr) ? e.pageX - self.railh.offset().left : e.pageY - self.rail.offset().top; + pg = (hr) ? self.view.w : self.view.h; + fn((cur >= pos) ? pg : -pg); + } + + }; + + self.newscrolly = self.newscrollx = 0; + + self.hasanimationframe = ("requestAnimationFrame" in _win); + self.hascancelanimationframe = ("cancelAnimationFrame" in _win); + + self.hasborderbox = false; + + this.init = function () { + + self.saved.css = []; + + if (cap.isoperamini) return true; // SORRY, DO NOT WORK! + if (cap.isandroid && !("hidden" in _doc)) return true; // Android 3- SORRY, DO NOT WORK! + + opt.emulatetouch = opt.emulatetouch || opt.touchbehavior; // mantain compatibility with "touchbehavior" + + self.hasborderbox = _win.getComputedStyle && (_win.getComputedStyle(_doc.body)['box-sizing'] === "border-box"); + + var _scrollyhidden = { 'overflow-y': 'hidden' }; + if (cap.isie11 || cap.isie10) _scrollyhidden['-ms-overflow-style'] = 'none'; // IE 10 & 11 is always a world apart! + + if (self.ishwscroll) { + this.doc.css(cap.transitionstyle, cap.prefixstyle + 'transform 0ms ease-out'); + if (cap.transitionend) self.bind(self.doc, cap.transitionend, self.onScrollTransitionEnd, false); //I have got to do something usefull!! + } + + self.zindex = "auto"; + if (!self.ispage && opt.zindex == "auto") { + self.zindex = getZIndex() || "auto"; + } else { + self.zindex = opt.zindex; + } + + if (!self.ispage && self.zindex != "auto" && self.zindex > globalmaxzindex) { + globalmaxzindex = self.zindex; + } + + if (self.isie && self.zindex === 0 && opt.zindex == "auto") { // fix IE auto == 0 + self.zindex = "auto"; + } + + if (!self.ispage || !cap.isieold) { + + var cont = self.docscroll; + if (self.ispage) cont = (self.haswrapper) ? self.win : self.doc; + + self.css(cont, _scrollyhidden); + + if (self.ispage && (cap.isie11 || cap.isie)) { // IE 7-11 + self.css($("html"), _scrollyhidden); + } + + if (cap.isios && !self.ispage && !self.haswrapper) self.css($body, { + "-webkit-overflow-scrolling": "touch" + }); //force hw acceleration + + var cursor = $(_doc.createElement('div')); + cursor.css({ + position: "relative", + top: 0, + "float": "right", + width: opt.cursorwidth, + height: 0, + 'background-color': opt.cursorcolor, + border: opt.cursorborder, + 'background-clip': 'padding-box', + '-webkit-border-radius': opt.cursorborderradius, + '-moz-border-radius': opt.cursorborderradius, + 'border-radius': opt.cursorborderradius + }); + + cursor.addClass('nicescroll-cursors'); + + self.cursor = cursor; + + var rail = $(_doc.createElement('div')); + rail.attr('id', self.id); + rail.addClass('nicescroll-rails nicescroll-rails-vr'); + + if (opt.scrollCLass) { + rail.addClass(opt.scrollCLass); + } + + var v, a, kp = ["left", "right", "top", "bottom"]; //** + for (var n in kp) { + a = kp[n]; + v = opt.railpadding[a] || 0; + v && rail.css("padding-" + a, v + "px"); + } + + rail.append(cursor); + + rail.width = Math.max(parseFloat(opt.cursorwidth), cursor.outerWidth()); + rail.css({ + width: rail.width + "px", + zIndex: self.zindex, + background: opt.background, + cursor: "default" + }); + + rail.visibility = true; + rail.scrollable = true; + + rail.align = (opt.railalign == "left") ? 0 : 1; + + self.rail = rail; + + self.rail.drag = false; + + var zoom = false; + if (opt.boxzoom && !self.ispage && !cap.isieold) { + zoom = _doc.createElement('div'); + + self.bind(zoom, "click", self.doZoom); + self.bind(zoom, "mouseenter", function () { + self.zoom.css('opacity', opt.cursoropacitymax); + }); + self.bind(zoom, "mouseleave", function () { + self.zoom.css('opacity', opt.cursoropacitymin); + }); + + self.zoom = $(zoom); + self.zoom.css({ + cursor: "pointer", + zIndex: self.zindex, + backgroundImage: 'url(' + opt.scriptpath + 'zoomico.png)', + height: 18, + width: 18, + backgroundPosition: '0 0' + }); + if (opt.dblclickzoom) self.bind(self.win, "dblclick", self.doZoom); + if (cap.cantouch && opt.gesturezoom) { + self.ongesturezoom = function (e) { + if (e.scale > 1.5) self.doZoomIn(e); + if (e.scale < 0.8) self.doZoomOut(e); + return self.cancelEvent(e); + }; + self.bind(self.win, "gestureend", self.ongesturezoom); + } + } + + // init HORIZ + + self.railh = false; + var railh; + + if (opt.horizrailenabled) { + + self.css(cont, { + overflowX: 'hidden' + }); + + cursor = $(_doc.createElement('div')); + cursor.css({ + position: "absolute", + top: 0, + height: opt.cursorwidth, + width: 0, + backgroundColor: opt.cursorcolor, + border: opt.cursorborder, + backgroundClip: 'padding-box', + '-webkit-border-radius': opt.cursorborderradius, + '-moz-border-radius': opt.cursorborderradius, + 'border-radius': opt.cursorborderradius + }); + + if (cap.isieold) cursor.css('overflow', 'hidden'); //IE6 horiz scrollbar issue + + cursor.addClass('nicescroll-cursors'); + + self.cursorh = cursor; + + railh = $(_doc.createElement('div')); + railh.attr('id', self.id + '-hr'); + railh.addClass('nicescroll-rails nicescroll-rails-hr'); + if (opt.scrollCLass) { + railh.addClass(opt.scrollCLass); + } + + railh.height = Math.max(parseFloat(opt.cursorwidth), cursor.outerHeight()); + railh.css({ + height: railh.height + "px", + 'zIndex': self.zindex, + "background": opt.background + }); + + railh.append(cursor); + + railh.visibility = true; + railh.scrollable = true; + + railh.align = (opt.railvalign == "top") ? 0 : 1; + + self.railh = railh; + + self.railh.drag = false; + + } + + if (self.ispage) { + + rail.css({ + position: "fixed", + top: 0, + height: "100%" + }); + + rail.css((rail.align) ? { right: 0 } : { left: 0 }); + + self.body.append(rail); + if (self.railh) { + railh.css({ + position: "fixed", + left: 0, + width: "100%" + }); + + railh.css((railh.align) ? { bottom: 0 } : { top: 0 }); + + self.body.append(railh); + } + } else { + if (self.ishwscroll) { + if (self.win.css('position') == 'static') self.css(self.win, { 'position': 'relative' }); + var bd = (self.win[0].nodeName == 'HTML') ? self.body : self.win; + $(bd).scrollTop(0).scrollLeft(0); // fix rail position if content already scrolled + if (self.zoom) { + self.zoom.css({ + position: "absolute", + top: 1, + right: 0, + "margin-right": rail.width + 4 + }); + bd.append(self.zoom); + } + rail.css({ + position: "absolute", + top: 0 + }); + rail.css((rail.align) ? { right: 0 } : { left: 0 }); + bd.append(rail); + if (railh) { + railh.css({ + position: "absolute", + left: 0, + bottom: 0 + }); + railh.css((railh.align) ? { bottom: 0 } : { top: 0 }); + bd.append(railh); + } + } else { + self.isfixed = (self.win.css("position") == "fixed"); + var rlpos = (self.isfixed) ? "fixed" : "absolute"; + + if (!self.isfixed) self.viewport = self.getViewport(self.win[0]); + if (self.viewport) { + self.body = self.viewport; + if (!(/fixed|absolute/.test(self.viewport.css("position")))) self.css(self.viewport, { + "position": "relative" + }); + } + + rail.css({ + position: rlpos + }); + if (self.zoom) self.zoom.css({ + position: rlpos + }); + self.updateScrollBar(); + self.body.append(rail); + if (self.zoom) self.body.append(self.zoom); + if (self.railh) { + railh.css({ + position: rlpos + }); + self.body.append(railh); + } + } + + if (cap.isios) self.css(self.win, { + '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', + '-webkit-touch-callout': 'none' + }); // prevent grey layer on click + + if (opt.disableoutline) { + if (cap.isie) self.win.attr("hideFocus", "true"); // IE, prevent dotted rectangle on focused div + if (cap.iswebkit) self.win.css('outline', 'none'); // Webkit outline + } + + } + + if (opt.autohidemode === false) { + self.autohidedom = false; + self.rail.css({ + opacity: opt.cursoropacitymax + }); + if (self.railh) self.railh.css({ + opacity: opt.cursoropacitymax + }); + } else if ((opt.autohidemode === true) || (opt.autohidemode === "leave")) { + self.autohidedom = $().add(self.rail); + if (cap.isie8) self.autohidedom = self.autohidedom.add(self.cursor); + if (self.railh) self.autohidedom = self.autohidedom.add(self.railh); + if (self.railh && cap.isie8) self.autohidedom = self.autohidedom.add(self.cursorh); + } else if (opt.autohidemode == "scroll") { + self.autohidedom = $().add(self.rail); + if (self.railh) self.autohidedom = self.autohidedom.add(self.railh); + } else if (opt.autohidemode == "cursor") { + self.autohidedom = $().add(self.cursor); + if (self.railh) self.autohidedom = self.autohidedom.add(self.cursorh); + } else if (opt.autohidemode == "hidden") { + self.autohidedom = false; + self.hide(); + self.railslocked = false; + } + + if (cap.cantouch || self.istouchcapable || opt.emulatetouch || cap.hasmstouch) { + + self.scrollmom = new ScrollMomentumClass2D(self); + + var delayedclick = null; + + self.ontouchstart = function (e) { + + if (self.locked) return false; + + //if (e.pointerType && e.pointerType != 2 && e.pointerType != "touch") return false; + if (e.pointerType && (e.pointerType === 'mouse' || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return false; // need test on surface!! + + self.hasmoving = false; + + if (self.scrollmom.timer) { + self.triggerScrollEnd(); + self.scrollmom.stop(); + } + + if (!self.railslocked) { + var tg = self.getTarget(e); + + if (tg) { + var skp = (/INPUT/i.test(tg.nodeName)) && (/range/i.test(tg.type)); + if (skp) return self.stopPropagation(e); + } + + var ismouse = (e.type === "mousedown"); + + if (!("clientX" in e) && ("changedTouches" in e)) { + e.clientX = e.changedTouches[0].clientX; + e.clientY = e.changedTouches[0].clientY; + } + + if (self.forcescreen) { + var le = e; + e = { + "original": (e.original) ? e.original : e + }; + e.clientX = le.screenX; + e.clientY = le.screenY; + } + + self.rail.drag = { + x: e.clientX, + y: e.clientY, + sx: self.scroll.x, + sy: self.scroll.y, + st: self.getScrollTop(), + sl: self.getScrollLeft(), + pt: 2, + dl: false, + tg: tg + }; + + if (self.ispage || !opt.directionlockdeadzone) { + + self.rail.drag.dl = "f"; + + } else { + + var view = { + w: $window.width(), + h: $window.height() + }; + + var page = self.getContentSize(); + + var maxh = page.h - view.h; + var maxw = page.w - view.w; + + if (self.rail.scrollable && !self.railh.scrollable) self.rail.drag.ck = (maxh > 0) ? "v" : false; + else if (!self.rail.scrollable && self.railh.scrollable) self.rail.drag.ck = (maxw > 0) ? "h" : false; + else self.rail.drag.ck = false; + + } + + if (opt.emulatetouch && self.isiframe && cap.isie) { + var wp = self.win.position(); + self.rail.drag.x += wp.left; + self.rail.drag.y += wp.top; + } + + self.hasmoving = false; + self.lastmouseup = false; + self.scrollmom.reset(e.clientX, e.clientY); + + if (tg&&ismouse) { + + var ip = /INPUT|SELECT|BUTTON|TEXTAREA/i.test(tg.nodeName); + if (!ip) { + if (cap.hasmousecapture) tg.setCapture(); + if (opt.emulatetouch) { + if (tg.onclick && !(tg._onclick || false)) { // intercept DOM0 onclick event + tg._onclick = tg.onclick; + tg.onclick = function (e) { + if (self.hasmoving) return false; + tg._onclick.call(this, e); + }; + } + return self.cancelEvent(e); + } + return self.stopPropagation(e); + } + + if (/SUBMIT|CANCEL|BUTTON/i.test($(tg).attr('type'))) { + self.preventclick = { + "tg": tg, + "click": false + }; + } + + } + } + + }; + + self.ontouchend = function (e) { + + if (!self.rail.drag) return true; + + if (self.rail.drag.pt == 2) { + //if (e.pointerType && e.pointerType != 2 && e.pointerType != "touch") return false; + if (e.pointerType && (e.pointerType === 'mouse' || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return false; + + self.rail.drag = false; + + var ismouse = (e.type === "mouseup"); + + if (self.hasmoving) { + self.scrollmom.doMomentum(); + self.lastmouseup = true; + self.hideCursor(); + if (cap.hasmousecapture) _doc.releaseCapture(); + if (ismouse) return self.cancelEvent(e); + } + + } + else if (self.rail.drag.pt == 1) { + return self.onmouseup(e); + } + + }; + + var moveneedoffset = (opt.emulatetouch && self.isiframe && !cap.hasmousecapture); + + var locktollerance = opt.directionlockdeadzone * 0.3 | 0; + + self.ontouchmove = function (e, byiframe) { + + if (!self.rail.drag) return true; + + if (e.targetTouches && opt.preventmultitouchscrolling) { + if (e.targetTouches.length > 1) return true; // multitouch + } + + //if (e.pointerType && e.pointerType != 2 && e.pointerType != "touch") return false; + if (e.pointerType && (e.pointerType === 'mouse' || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) return true; + + if (self.rail.drag.pt == 2) { + + if (("changedTouches" in e)) { + e.clientX = e.changedTouches[0].clientX; + e.clientY = e.changedTouches[0].clientY; + } + + var ofy, ofx; + ofx = ofy = 0; + + if (moveneedoffset && !byiframe) { + var wp = self.win.position(); + ofx = -wp.left; + ofy = -wp.top; + } + + var fy = e.clientY + ofy; + var my = (fy - self.rail.drag.y); + var fx = e.clientX + ofx; + var mx = (fx - self.rail.drag.x); + + var ny = self.rail.drag.st - my; + + if (self.ishwscroll && opt.bouncescroll) { + if (ny < 0) { + ny = Math.round(ny / 2); + } else if (ny > self.page.maxh) { + ny = self.page.maxh + Math.round((ny - self.page.maxh) / 2); + } + } else { + if (ny < 0) { + ny = 0; + fy = 0; + } + else if (ny > self.page.maxh) { + ny = self.page.maxh; + fy = 0; + } + if (fy === 0 && !self.hasmoving) { + if (!self.ispage) self.rail.drag = false; + return true; + } + } + + var nx = self.getScrollLeft(); + + if (self.railh && self.railh.scrollable) { + nx = (self.isrtlmode) ? mx - self.rail.drag.sl : self.rail.drag.sl - mx; + + if (self.ishwscroll && opt.bouncescroll) { + if (nx < 0) { + nx = Math.round(nx / 2); + } else if (nx > self.page.maxw) { + nx = self.page.maxw + Math.round((nx - self.page.maxw) / 2); + } + } else { + if (nx < 0) { + nx = 0; + fx = 0; + } + if (nx > self.page.maxw) { + nx = self.page.maxw; + fx = 0; + } + } + + } + + + if (!self.hasmoving) { + + if (self.rail.drag.y === e.clientY && self.rail.drag.x === e.clientX) return self.cancelEvent(e); // prevent first useless move event + + var ay = Math.abs(my); + var ax = Math.abs(mx); + var dz = opt.directionlockdeadzone; + + if (!self.rail.drag.ck) { + if (ay > dz && ax > dz) self.rail.drag.dl = "f"; + else if (ay > dz) self.rail.drag.dl = (ax > locktollerance) ? "f" : "v"; + else if (ax > dz) self.rail.drag.dl = (ay > locktollerance) ? "f" : "h"; + } + else if (self.rail.drag.ck == "v") { + if (ax > dz && ay <= locktollerance) { + self.rail.drag = false; + } + else if (ay > dz) self.rail.drag.dl = "v"; + + } + else if (self.rail.drag.ck == "h") { + + if (ay > dz && ax <= locktollerance) { + self.rail.drag = false; + } + else if (ax > dz) self.rail.drag.dl = "h"; + + } + + if (!self.rail.drag.dl) return self.cancelEvent(e); + + self.triggerScrollStart(e.clientX, e.clientY, 0, 0, 0); + self.hasmoving = true; + } + + if (self.preventclick && !self.preventclick.click) { + self.preventclick.click = self.preventclick.tg.onclick || false; + self.preventclick.tg.onclick = self.onpreventclick; + } + + if (self.rail.drag.dl) { + if (self.rail.drag.dl == "v") nx = self.rail.drag.sl; + else if (self.rail.drag.dl == "h") ny = self.rail.drag.st; + } + + self.synched("touchmove", function () { + if (self.rail.drag && (self.rail.drag.pt == 2)) { + if (self.prepareTransition) self.resetTransition(); + if (self.rail.scrollable) self.setScrollTop(ny); + self.scrollmom.update(fx, fy); + if (self.railh && self.railh.scrollable) { + self.setScrollLeft(nx); + self.showCursor(ny, nx); + } else { + self.showCursor(ny); + } + if (cap.isie10) _doc.selection.clear(); + } + }); + + return self.cancelEvent(e); + + } + else if (self.rail.drag.pt == 1) { // drag on cursor + return self.onmousemove(e); + } + + }; + + self.ontouchstartCursor = function (e, hronly) { + if (self.rail.drag && self.rail.drag.pt != 3) return; + if (self.locked) return self.cancelEvent(e); + self.cancelScroll(); + self.rail.drag = { + x: e.touches[0].clientX, + y: e.touches[0].clientY, + sx: self.scroll.x, + sy: self.scroll.y, + pt: 3, + hr: (!!hronly) + }; + var tg = self.getTarget(e); + if (!self.ispage && cap.hasmousecapture) tg.setCapture(); + if (self.isiframe && !cap.hasmousecapture) { + self.saved.csspointerevents = self.doc.css("pointer-events"); + self.css(self.doc, { "pointer-events": "none" }); + } + return self.cancelEvent(e); + }; + + self.ontouchendCursor = function (e) { + if (self.rail.drag) { + if (cap.hasmousecapture) _doc.releaseCapture(); + if (self.isiframe && !cap.hasmousecapture) self.doc.css("pointer-events", self.saved.csspointerevents); + if (self.rail.drag.pt != 3) return; + self.rail.drag = false; + return self.cancelEvent(e); + } + }; + + self.ontouchmoveCursor = function (e) { + if (self.rail.drag) { + if (self.rail.drag.pt != 3) return; + + self.cursorfreezed = true; + + if (self.rail.drag.hr) { + self.scroll.x = self.rail.drag.sx + (e.touches[0].clientX - self.rail.drag.x); + if (self.scroll.x < 0) self.scroll.x = 0; + var mw = self.scrollvaluemaxw; + if (self.scroll.x > mw) self.scroll.x = mw; + } else { + self.scroll.y = self.rail.drag.sy + (e.touches[0].clientY - self.rail.drag.y); + if (self.scroll.y < 0) self.scroll.y = 0; + var my = self.scrollvaluemax; + if (self.scroll.y > my) self.scroll.y = my; + } + + self.synched('touchmove', function () { + if (self.rail.drag && (self.rail.drag.pt == 3)) { + self.showCursor(); + if (self.rail.drag.hr) self.doScrollLeft(Math.round(self.scroll.x * self.scrollratio.x), opt.cursordragspeed); + else self.doScrollTop(Math.round(self.scroll.y * self.scrollratio.y), opt.cursordragspeed); + } + }); + + return self.cancelEvent(e); + } + + }; + + } + + self.onmousedown = function (e, hronly) { + if (self.rail.drag && self.rail.drag.pt != 1) return; + if (self.railslocked) return self.cancelEvent(e); + self.cancelScroll(); + self.rail.drag = { + x: e.clientX, + y: e.clientY, + sx: self.scroll.x, + sy: self.scroll.y, + pt: 1, + hr: hronly || false + }; + var tg = self.getTarget(e); + + if (cap.hasmousecapture) tg.setCapture(); + if (self.isiframe && !cap.hasmousecapture) { + self.saved.csspointerevents = self.doc.css("pointer-events"); + self.css(self.doc, { + "pointer-events": "none" + }); + } + self.hasmoving = false; + return self.cancelEvent(e); + }; + + self.onmouseup = function (e) { + if (self.rail.drag) { + if (self.rail.drag.pt != 1) return true; + + if (cap.hasmousecapture) _doc.releaseCapture(); + if (self.isiframe && !cap.hasmousecapture) self.doc.css("pointer-events", self.saved.csspointerevents); + self.rail.drag = false; + self.cursorfreezed = false; + if (self.hasmoving) self.triggerScrollEnd(); + return self.cancelEvent(e); + } + }; + + self.onmousemove = function (e) { + if (self.rail.drag) { + if (self.rail.drag.pt !== 1) return; + + if (cap.ischrome && e.which === 0) return self.onmouseup(e); + + self.cursorfreezed = true; + + if (!self.hasmoving) self.triggerScrollStart(e.clientX, e.clientY, 0, 0, 0); + + self.hasmoving = true; + + if (self.rail.drag.hr) { + self.scroll.x = self.rail.drag.sx + (e.clientX - self.rail.drag.x); + if (self.scroll.x < 0) self.scroll.x = 0; + var mw = self.scrollvaluemaxw; + if (self.scroll.x > mw) self.scroll.x = mw; + } else { + self.scroll.y = self.rail.drag.sy + (e.clientY - self.rail.drag.y); + if (self.scroll.y < 0) self.scroll.y = 0; + var my = self.scrollvaluemax; + if (self.scroll.y > my) self.scroll.y = my; + } + + self.synched('mousemove', function () { + + if (self.cursorfreezed) { + self.showCursor(); + + if (self.rail.drag.hr) { + self.scrollLeft(Math.round(self.scroll.x * self.scrollratio.x)); + } else { + self.scrollTop(Math.round(self.scroll.y * self.scrollratio.y)); + } + + } + }); + + return self.cancelEvent(e); + } + else { + self.checkarea = 0; + } + }; + + if (cap.cantouch || opt.emulatetouch) { + + self.onpreventclick = function (e) { + if (self.preventclick) { + self.preventclick.tg.onclick = self.preventclick.click; + self.preventclick = false; + return self.cancelEvent(e); + } + }; + + self.onclick = (cap.isios) ? false : function (e) { // it needs to check IE11 ??? + if (self.lastmouseup) { + self.lastmouseup = false; + return self.cancelEvent(e); + } else { + return true; + } + }; + + if (opt.grabcursorenabled && cap.cursorgrabvalue) { + self.css((self.ispage) ? self.doc : self.win, { + 'cursor': cap.cursorgrabvalue + }); + self.css(self.rail, { + 'cursor': cap.cursorgrabvalue + }); + } + + } else { + + var checkSelectionScroll = function (e) { + if (!self.selectiondrag) return; + + if (e) { + var ww = self.win.outerHeight(); + var df = (e.pageY - self.selectiondrag.top); + if (df > 0 && df < ww) df = 0; + if (df >= ww) df -= ww; + self.selectiondrag.df = df; + } + if (self.selectiondrag.df === 0) return; + + var rt = -(self.selectiondrag.df*2/6)|0; + self.doScrollBy(rt); + + self.debounced("doselectionscroll", function () { + checkSelectionScroll(); + }, 50); + }; + + if ("getSelection" in _doc) { // A grade - Major browsers + self.hasTextSelected = function () { + return (_doc.getSelection().rangeCount > 0); + }; + } else if ("selection" in _doc) { //IE9- + self.hasTextSelected = function () { + return (_doc.selection.type != "None"); + }; + } else { + self.hasTextSelected = function () { // no support + return false; + }; + } + + self.onselectionstart = function (e) { + // More testing - severe chrome issues + /* + if (!self.haswrapper&&(e.which&&e.which==2)) { // fool browser to manage middle button scrolling + self.win.css({'overflow':'auto'}); + setTimeout(function(){ + self.win.css({'overflow':'hidden'}); + },10); + return true; + } + */ + if (self.ispage) return; + self.selectiondrag = self.win.offset(); + }; + + self.onselectionend = function (e) { + self.selectiondrag = false; + }; + self.onselectiondrag = function (e) { + if (!self.selectiondrag) return; + if (self.hasTextSelected()) self.debounced("selectionscroll", function () { + checkSelectionScroll(e); + }, 250); + }; + } + + if (cap.hasw3ctouch) { //IE11+ + self.css((self.ispage) ? $("html") : self.win, { 'touch-action': 'none' }); + self.css(self.rail, { + 'touch-action': 'none' + }); + self.css(self.cursor, { + 'touch-action': 'none' + }); + self.bind(self.win, "pointerdown", self.ontouchstart); + self.bind(_doc, "pointerup", self.ontouchend); + self.delegate(_doc, "pointermove", self.ontouchmove); + } else if (cap.hasmstouch) { //IE10 + self.css((self.ispage) ? $("html") : self.win, { '-ms-touch-action': 'none' }); + self.css(self.rail, { + '-ms-touch-action': 'none' + }); + self.css(self.cursor, { + '-ms-touch-action': 'none' + }); + self.bind(self.win, "MSPointerDown", self.ontouchstart); + self.bind(_doc, "MSPointerUp", self.ontouchend); + self.delegate(_doc, "MSPointerMove", self.ontouchmove); + self.bind(self.cursor, "MSGestureHold", function (e) { + e.preventDefault(); + }); + self.bind(self.cursor, "contextmenu", function (e) { + e.preventDefault(); + }); + } else if (cap.cantouch) { // smartphones/touch devices + self.bind(self.win, "touchstart", self.ontouchstart, false, true); + self.bind(_doc, "touchend", self.ontouchend, false, true); + self.bind(_doc, "touchcancel", self.ontouchend, false, true); + self.delegate(_doc, "touchmove", self.ontouchmove, false, true); + } + + if (opt.emulatetouch) { + self.bind(self.win, "mousedown", self.ontouchstart, false, true); + self.bind(_doc, "mouseup", self.ontouchend, false, true); + self.bind(_doc, "mousemove", self.ontouchmove, false, true); + } + + if (opt.cursordragontouch || (!cap.cantouch && !opt.emulatetouch)) { + + self.rail.css({ + cursor: "default" + }); + self.railh && self.railh.css({ + cursor: "default" + }); + + self.jqbind(self.rail, "mouseenter", function () { + if (!self.ispage && !self.win.is(":visible")) return false; + if (self.canshowonmouseevent) self.showCursor(); + self.rail.active = true; + }); + self.jqbind(self.rail, "mouseleave", function () { + self.rail.active = false; + if (!self.rail.drag) self.hideCursor(); + }); + + if (opt.sensitiverail) { + self.bind(self.rail, "click", function (e) { + self.doRailClick(e, false, false); + }); + self.bind(self.rail, "dblclick", function (e) { + self.doRailClick(e, true, false); + }); + self.bind(self.cursor, "click", function (e) { + self.cancelEvent(e); + }); + self.bind(self.cursor, "dblclick", function (e) { + self.cancelEvent(e); + }); + } + + if (self.railh) { + self.jqbind(self.railh, "mouseenter", function () { + if (!self.ispage && !self.win.is(":visible")) return false; + if (self.canshowonmouseevent) self.showCursor(); + self.rail.active = true; + }); + self.jqbind(self.railh, "mouseleave", function () { + self.rail.active = false; + if (!self.rail.drag) self.hideCursor(); + }); + + if (opt.sensitiverail) { + self.bind(self.railh, "click", function (e) { + self.doRailClick(e, false, true); + }); + self.bind(self.railh, "dblclick", function (e) { + self.doRailClick(e, true, true); + }); + self.bind(self.cursorh, "click", function (e) { + self.cancelEvent(e); + }); + self.bind(self.cursorh, "dblclick", function (e) { + self.cancelEvent(e); + }); + } + + } + + } + + if (opt.cursordragontouch && (this.istouchcapable || cap.cantouch)) { + self.bind(self.cursor, "touchstart", self.ontouchstartCursor); + self.bind(self.cursor, "touchmove", self.ontouchmoveCursor); + self.bind(self.cursor, "touchend", self.ontouchendCursor); + self.cursorh && self.bind(self.cursorh, "touchstart", function (e) { + self.ontouchstartCursor(e, true); + }); + self.cursorh && self.bind(self.cursorh, "touchmove", self.ontouchmoveCursor); + self.cursorh && self.bind(self.cursorh, "touchend", self.ontouchendCursor); + } + +// if (!cap.cantouch && !opt.emulatetouch) { + if (!opt.emulatetouch && !cap.isandroid && !cap.isios) { + + self.bind((cap.hasmousecapture) ? self.win : _doc, "mouseup", self.onmouseup); + self.bind(_doc, "mousemove", self.onmousemove); + if (self.onclick) self.bind(_doc, "click", self.onclick); + + self.bind(self.cursor, "mousedown", self.onmousedown); + self.bind(self.cursor, "mouseup", self.onmouseup); + + if (self.railh) { + self.bind(self.cursorh, "mousedown", function (e) { + self.onmousedown(e, true); + }); + self.bind(self.cursorh, "mouseup", self.onmouseup); + } + + if (!self.ispage && opt.enablescrollonselection) { + self.bind(self.win[0], "mousedown", self.onselectionstart); + self.bind(_doc, "mouseup", self.onselectionend); + self.bind(self.cursor, "mouseup", self.onselectionend); + if (self.cursorh) self.bind(self.cursorh, "mouseup", self.onselectionend); + self.bind(_doc, "mousemove", self.onselectiondrag); + } + + if (self.zoom) { + self.jqbind(self.zoom, "mouseenter", function () { + if (self.canshowonmouseevent) self.showCursor(); + self.rail.active = true; + }); + self.jqbind(self.zoom, "mouseleave", function () { + self.rail.active = false; + if (!self.rail.drag) self.hideCursor(); + }); + } + + } else { + + self.bind((cap.hasmousecapture) ? self.win : _doc, "mouseup", self.ontouchend); + if (self.onclick) self.bind(_doc, "click", self.onclick); + + if (opt.cursordragontouch) { + self.bind(self.cursor, "mousedown", self.onmousedown); + self.bind(self.cursor, "mouseup", self.onmouseup); + self.cursorh && self.bind(self.cursorh, "mousedown", function (e) { + self.onmousedown(e, true); + }); + self.cursorh && self.bind(self.cursorh, "mouseup", self.onmouseup); + } else { + self.bind(self.rail, "mousedown", function (e) { e.preventDefault(); }); // prevent text selection + self.railh && self.bind(self.railh, "mousedown", function (e) { e.preventDefault(); }); + } + + } + + + if (opt.enablemousewheel) { + if (!self.isiframe) self.mousewheel((cap.isie && self.ispage) ? _doc : self.win, self.onmousewheel); + self.mousewheel(self.rail, self.onmousewheel); + if (self.railh) self.mousewheel(self.railh, self.onmousewheelhr); + } + + if (!self.ispage && !cap.cantouch && !(/HTML|^BODY/.test(self.win[0].nodeName))) { + if (!self.win.attr("tabindex")) self.win.attr({ + "tabindex": ++tabindexcounter + }); + + self.bind(self.win, "focus", function (e) { // better using native events + domfocus = (self.getTarget(e)).id || self.getTarget(e) || false; + self.hasfocus = true; + if (self.canshowonmouseevent) self.noticeCursor(); + }); + self.bind(self.win, "blur", function (e) { // * + domfocus = false; + self.hasfocus = false; + }); + + self.bind(self.win, "mouseenter", function (e) { // * + mousefocus = (self.getTarget(e)).id || self.getTarget(e) || false; + self.hasmousefocus = true; + if (self.canshowonmouseevent) self.noticeCursor(); + }); + self.bind(self.win, "mouseleave", function (e) { // * + mousefocus = false; + self.hasmousefocus = false; + if (!self.rail.drag) self.hideCursor(); + }); + + } + + + //Thanks to http://www.quirksmode.org !! + self.onkeypress = function (e) { + if (self.railslocked && self.page.maxh === 0) return true; + + e = e || _win.event; + var tg = self.getTarget(e); + if (tg && /INPUT|TEXTAREA|SELECT|OPTION/.test(tg.nodeName)) { + var tp = tg.getAttribute('type') || tg.type || false; + if ((!tp) || !(/submit|button|cancel/i.tp)) return true; + } + + if ($(tg).attr('contenteditable')) return true; + + if (self.hasfocus || (self.hasmousefocus && !domfocus) || (self.ispage && !domfocus && !mousefocus)) { + var key = e.keyCode; + + if (self.railslocked && key != 27) return self.cancelEvent(e); + + var ctrl = e.ctrlKey || false; + var shift = e.shiftKey || false; + + var ret = false; + switch (key) { + case 38: + case 63233: //safari + self.doScrollBy(24 * 3); + ret = true; + break; + case 40: + case 63235: //safari + self.doScrollBy(-24 * 3); + ret = true; + break; + case 37: + case 63232: //safari + if (self.railh) { + (ctrl) ? self.doScrollLeft(0) : self.doScrollLeftBy(24 * 3); + ret = true; + } + break; + case 39: + case 63234: //safari + if (self.railh) { + (ctrl) ? self.doScrollLeft(self.page.maxw) : self.doScrollLeftBy(-24 * 3); + ret = true; + } + break; + case 33: + case 63276: // safari + self.doScrollBy(self.view.h); + ret = true; + break; + case 34: + case 63277: // safari + self.doScrollBy(-self.view.h); + ret = true; + break; + case 36: + case 63273: // safari + (self.railh && ctrl) ? self.doScrollPos(0, 0) : self.doScrollTo(0); + ret = true; + break; + case 35: + case 63275: // safari + (self.railh && ctrl) ? self.doScrollPos(self.page.maxw, self.page.maxh) : self.doScrollTo(self.page.maxh); + ret = true; + break; + case 32: + if (opt.spacebarenabled) { + (shift) ? self.doScrollBy(self.view.h) : self.doScrollBy(-self.view.h); + ret = true; + } + break; + case 27: // ESC + if (self.zoomactive) { + self.doZoom(); + ret = true; + } + break; + } + if (ret) return self.cancelEvent(e); + } + }; + + if (opt.enablekeyboard) self.bind(_doc, (cap.isopera && !cap.isopera12) ? "keypress" : "keydown", self.onkeypress); + + self.bind(_doc, "keydown", function (e) { + var ctrl = e.ctrlKey || false; + if (ctrl) self.wheelprevented = true; + }); + self.bind(_doc, "keyup", function (e) { + var ctrl = e.ctrlKey || false; + if (!ctrl) self.wheelprevented = false; + }); + self.bind(_win, "blur", function (e) { + self.wheelprevented = false; + }); + + self.bind(_win, 'resize', self.onscreenresize); + self.bind(_win, 'orientationchange', self.onscreenresize); + + self.bind(_win, "load", self.lazyResize); + + if (cap.ischrome && !self.ispage && !self.haswrapper) { //chrome void scrollbar bug - it persists in version 26 + var tmp = self.win.attr("style"); + var ww = parseFloat(self.win.css("width")) + 1; + self.win.css('width', ww); + self.synched("chromefix", function () { + self.win.attr("style", tmp); + }); + } + + + // Trying a cross-browser implementation - good luck! + + self.onAttributeChange = function (e) { + self.lazyResize(self.isieold ? 250 : 30); + }; + + if (opt.enableobserver) { + + if ((!self.isie11) && (ClsMutationObserver !== false)) { // IE11 crashes #568 + self.observerbody = new ClsMutationObserver(function (mutations) { + mutations.forEach(function (mut) { + if (mut.type == "attributes") { + return ($body.hasClass("modal-open") && $body.hasClass("modal-dialog") && !$.contains($('.modal-dialog')[0], self.doc[0])) ? self.hide() : self.show(); // Support for Bootstrap modal; Added check if the nice scroll element is inside a modal + } + }); + if (self.me.clientWidth != self.page.width || self.me.clientHeight != self.page.height) return self.lazyResize(30); + }); + self.observerbody.observe(_doc.body, { + childList: true, + subtree: true, + characterData: false, + attributes: true, + attributeFilter: ['class'] + }); + } + + if (!self.ispage && !self.haswrapper) { + + var _dom = self.win[0]; + + // redesigned MutationObserver for Chrome18+/Firefox14+/iOS6+ with support for: remove div, add/remove content + if (ClsMutationObserver !== false) { + self.observer = new ClsMutationObserver(function (mutations) { + mutations.forEach(self.onAttributeChange); + }); + self.observer.observe(_dom, { + childList: true, + characterData: false, + attributes: true, + subtree: false + }); + self.observerremover = new ClsMutationObserver(function (mutations) { + mutations.forEach(function (mo) { + if (mo.removedNodes.length > 0) { + for (var dd in mo.removedNodes) { + if (!!self && (mo.removedNodes[dd] === _dom)) return self.remove(); + } + } + }); + }); + self.observerremover.observe(_dom.parentNode, { + childList: true, + characterData: false, + attributes: false, + subtree: false + }); + } else { + self.bind(_dom, (cap.isie && !cap.isie9) ? "propertychange" : "DOMAttrModified", self.onAttributeChange); + if (cap.isie9) _dom.attachEvent("onpropertychange", self.onAttributeChange); //IE9 DOMAttrModified bug + self.bind(_dom, "DOMNodeRemoved", function (e) { + if (e.target === _dom) self.remove(); + }); + } + } + + } + + // + + if (!self.ispage && opt.boxzoom) self.bind(_win, "resize", self.resizeZoom); + if (self.istextarea) { + self.bind(self.win, "keydown", self.lazyResize); + self.bind(self.win, "mouseup", self.lazyResize); + } + + self.lazyResize(30); + + } + + if (this.doc[0].nodeName == 'IFRAME') { + var oniframeload = function () { + self.iframexd = false; + var doc; + try { + doc = 'contentDocument' in this ? this.contentDocument : this.contentWindow._doc; + var a = doc.domain; + } catch (e) { + self.iframexd = true; + doc = false; + } + + if (self.iframexd) { + if ("console" in _win) console.log('NiceScroll error: policy restriced iframe'); + return true; //cross-domain - I can't manage this + } + + self.forcescreen = true; + + if (self.isiframe) { + self.iframe = { + "doc": $(doc), + "html": self.doc.contents().find('html')[0], + "body": self.doc.contents().find('body')[0] + }; + self.getContentSize = function () { + return { + w: Math.max(self.iframe.html.scrollWidth, self.iframe.body.scrollWidth), + h: Math.max(self.iframe.html.scrollHeight, self.iframe.body.scrollHeight) + }; + }; + self.docscroll = $(self.iframe.body); + } + + if (!cap.isios && opt.iframeautoresize && !self.isiframe) { + self.win.scrollTop(0); // reset position + self.doc.height(""); //reset height to fix browser bug + var hh = Math.max(doc.getElementsByTagName('html')[0].scrollHeight, doc.body.scrollHeight); + self.doc.height(hh); + } + self.lazyResize(30); + + self.css($(self.iframe.body), _scrollyhidden); + + if (cap.isios && self.haswrapper) { + self.css($(doc.body), { + '-webkit-transform': 'translate3d(0,0,0)' + }); // avoid iFrame content clipping - thanks to http://blog.derraab.com/2012/04/02/avoid-iframe-content-clipping-with-css-transform-on-ios/ + } + + if ('contentWindow' in this) { + self.bind(this.contentWindow, "scroll", self.onscroll); //IE8 & minor + } else { + self.bind(doc, "scroll", self.onscroll); + } + + if (opt.enablemousewheel) { + self.mousewheel(doc, self.onmousewheel); + } + + if (opt.enablekeyboard) self.bind(doc, (cap.isopera) ? "keypress" : "keydown", self.onkeypress); + + if (cap.cantouch) { + self.bind(doc, "touchstart", self.ontouchstart); + self.bind(doc, "touchmove", self.ontouchmove); + } + else if (opt.emulatetouch) { + self.bind(doc, "mousedown", self.ontouchstart); + self.bind(doc, "mousemove", function (e) { + return self.ontouchmove(e, true); + }); + if (opt.grabcursorenabled && cap.cursorgrabvalue) self.css($(doc.body), { + 'cursor': cap.cursorgrabvalue + }); + } + + self.bind(doc, "mouseup", self.ontouchend); + + if (self.zoom) { + if (opt.dblclickzoom) self.bind(doc, 'dblclick', self.doZoom); + if (self.ongesturezoom) self.bind(doc, "gestureend", self.ongesturezoom); + } + }; + + if (this.doc[0].readyState && this.doc[0].readyState === "complete") { + setTimeout(function () { + oniframeload.call(self.doc[0], false); + }, 500); + } + self.bind(this.doc, "load", oniframeload); + + } + + }; + + this.showCursor = function (py, px) { + if (self.cursortimeout) { + clearTimeout(self.cursortimeout); + self.cursortimeout = 0; + } + if (!self.rail) return; + if (self.autohidedom) { + self.autohidedom.stop().css({ + opacity: opt.cursoropacitymax + }); + self.cursoractive = true; + } + + if (!self.rail.drag || self.rail.drag.pt != 1) { + if (py !== undefined && py !== false) { + self.scroll.y = (py / self.scrollratio.y) | 0; + } + if (px !== undefined) { + self.scroll.x = (px / self.scrollratio.x) | 0; + } + } + + self.cursor.css({ + height: self.cursorheight, + top: self.scroll.y + }); + if (self.cursorh) { + var lx = (self.hasreversehr) ? self.scrollvaluemaxw - self.scroll.x : self.scroll.x; + self.cursorh.css({ + width: self.cursorwidth, + left: (!self.rail.align && self.rail.visibility) ? lx + self.rail.width : lx + }); + self.cursoractive = true; + } + + if (self.zoom) self.zoom.stop().css({ + opacity: opt.cursoropacitymax + }); + }; + + this.hideCursor = function (tm) { + if (self.cursortimeout) return; + if (!self.rail) return; + if (!self.autohidedom) return; + + if (self.hasmousefocus && opt.autohidemode === "leave") return; + self.cursortimeout = setTimeout(function () { + if (!self.rail.active || !self.showonmouseevent) { + self.autohidedom.stop().animate({ + opacity: opt.cursoropacitymin + }); + if (self.zoom) self.zoom.stop().animate({ + opacity: opt.cursoropacitymin + }); + self.cursoractive = false; + } + self.cursortimeout = 0; + }, tm || opt.hidecursordelay); + }; + + this.noticeCursor = function (tm, py, px) { + self.showCursor(py, px); + if (!self.rail.active) self.hideCursor(tm); + }; + + this.getContentSize = + (self.ispage) ? + function () { + return { + w: Math.max(_doc.body.scrollWidth, _doc.documentElement.scrollWidth), + h: Math.max(_doc.body.scrollHeight, _doc.documentElement.scrollHeight) + }; + } : (self.haswrapper) ? + function () { + return { + w: self.doc[0].offsetWidth, + h: self.doc[0].offsetHeight + }; + } : function () { + return { + w: self.docscroll[0].scrollWidth, + h: self.docscroll[0].scrollHeight + }; + }; + + this.onResize = function (e, page) { + + if (!self || !self.win) return false; + + var premaxh = self.page.maxh, + premaxw = self.page.maxw, + previewh = self.view.h, + previeww = self.view.w; + + self.view = { + w: (self.ispage) ? self.win.width() : self.win[0].clientWidth, + h: (self.ispage) ? self.win.height() : self.win[0].clientHeight + }; + + self.page = (page) ? page : self.getContentSize(); + + self.page.maxh = Math.max(0, self.page.h - self.view.h); + self.page.maxw = Math.max(0, self.page.w - self.view.w); + + if ((self.page.maxh == premaxh) && (self.page.maxw == premaxw) && (self.view.w == previeww) && (self.view.h == previewh)) { + // test position + if (!self.ispage) { + var pos = self.win.offset(); + if (self.lastposition) { + var lst = self.lastposition; + if ((lst.top == pos.top) && (lst.left == pos.left)) return self; //nothing to do + } + self.lastposition = pos; + } else { + return self; //nothing to do + } + } + + if (self.page.maxh === 0) { + self.hideRail(); + self.scrollvaluemax = 0; + self.scroll.y = 0; + self.scrollratio.y = 0; + self.cursorheight = 0; + self.setScrollTop(0); + if (self.rail) self.rail.scrollable = false; + } else { + self.page.maxh -= (opt.railpadding.top + opt.railpadding.bottom); + self.rail.scrollable = true; + } + + if (self.page.maxw === 0) { + self.hideRailHr(); + self.scrollvaluemaxw = 0; + self.scroll.x = 0; + self.scrollratio.x = 0; + self.cursorwidth = 0; + self.setScrollLeft(0); + if (self.railh) { + self.railh.scrollable = false; + } + } else { + self.page.maxw -= (opt.railpadding.left + opt.railpadding.right); + if (self.railh) self.railh.scrollable = (opt.horizrailenabled); + } + + self.railslocked = (self.locked) || ((self.page.maxh === 0) && (self.page.maxw === 0)); + if (self.railslocked) { + if (!self.ispage) self.updateScrollBar(self.view); + return false; + } + + if (!self.hidden) { + if (!self.rail.visibility) self.showRail(); + if (self.railh && !self.railh.visibility) self.showRailHr(); + } + + if (self.istextarea && self.win.css('resize') && self.win.css('resize') != 'none') self.view.h -= 20; + + self.cursorheight = Math.min(self.view.h, Math.round(self.view.h * (self.view.h / self.page.h))); + self.cursorheight = (opt.cursorfixedheight) ? opt.cursorfixedheight : Math.max(opt.cursorminheight, self.cursorheight); + + self.cursorwidth = Math.min(self.view.w, Math.round(self.view.w * (self.view.w / self.page.w))); + self.cursorwidth = (opt.cursorfixedheight) ? opt.cursorfixedheight : Math.max(opt.cursorminheight, self.cursorwidth); + + self.scrollvaluemax = self.view.h - self.cursorheight - (opt.railpadding.top + opt.railpadding.bottom); + if (!self.hasborderbox) self.scrollvaluemax -= self.cursor[0].offsetHeight - self.cursor[0].clientHeight; + + if (self.railh) { + self.railh.width = (self.page.maxh > 0) ? (self.view.w - self.rail.width) : self.view.w; + self.scrollvaluemaxw = self.railh.width - self.cursorwidth - (opt.railpadding.left + opt.railpadding.right); + } + + if (!self.ispage) self.updateScrollBar(self.view); + + self.scrollratio = { + x: (self.page.maxw / self.scrollvaluemaxw), + y: (self.page.maxh / self.scrollvaluemax) + }; + + var sy = self.getScrollTop(); + if (sy > self.page.maxh) { + self.doScrollTop(self.page.maxh); + } else { + self.scroll.y = (self.getScrollTop() / self.scrollratio.y) | 0; + self.scroll.x = (self.getScrollLeft() / self.scrollratio.x) | 0; + if (self.cursoractive) self.noticeCursor(); + } + + if (self.scroll.y && (self.getScrollTop() === 0)) self.doScrollTo((self.scroll.y * self.scrollratio.y)|0); + + return self; + }; + + this.resize = self.onResize; + + var hlazyresize = 0; + + this.onscreenresize = function(e) { + clearTimeout(hlazyresize); + + var hiderails = (!self.ispage && !self.haswrapper); + if (hiderails) self.hideRails(); + + hlazyresize = setTimeout(function () { + if (self) { + if (hiderails) self.showRails(); + self.resize(); + } + hlazyresize=0; + }, 120); + }; + + this.lazyResize = function (tm) { // event debounce + + clearTimeout(hlazyresize); + + tm = isNaN(tm) ? 240 : tm; + + hlazyresize = setTimeout(function () { + self && self.resize(); + hlazyresize=0; + }, tm); + + return self; + + }; + + // derived by MDN https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/wheel + function _modernWheelEvent(dom, name, fn, bubble) { + self._bind(dom, name, function (e) { + e = e || _win.event; + var event = { + original: e, + target: e.target || e.srcElement, + type: "wheel", + deltaMode: e.type == "MozMousePixelScroll" ? 0 : 1, + deltaX: 0, + deltaZ: 0, + preventDefault: function () { + e.preventDefault ? e.preventDefault() : e.returnValue = false; + return false; + }, + stopImmediatePropagation: function () { + (e.stopImmediatePropagation) ? e.stopImmediatePropagation() : e.cancelBubble = true; + } + }; + + if (name == "mousewheel") { + e.wheelDeltaX && (event.deltaX = -1 / 40 * e.wheelDeltaX); + e.wheelDeltaY && (event.deltaY = -1 / 40 * e.wheelDeltaY); + !event.deltaY && !event.deltaX && (event.deltaY = -1 / 40 * e.wheelDelta); + } else { + event.deltaY = e.detail; + } + + return fn.call(dom, event); + }, bubble); + } + + + + this.jqbind = function (dom, name, fn) { // use jquery bind for non-native events (mouseenter/mouseleave) + self.events.push({ + e: dom, + n: name, + f: fn, + q: true + }); + $(dom).on(name, fn); + }; + + this.mousewheel = function (dom, fn, bubble) { // bind mousewheel + var el = ("jquery" in dom) ? dom[0] : dom; + if ("onwheel" in _doc.createElement("div")) { // Modern browsers support "wheel" + self._bind(el, "wheel", fn, bubble || false); + } else { + var wname = (_doc.onmousewheel !== undefined) ? "mousewheel" : "DOMMouseScroll"; // older Webkit+IE support or older Firefox + _modernWheelEvent(el, wname, fn, bubble || false); + if (wname == "DOMMouseScroll") _modernWheelEvent(el, "MozMousePixelScroll", fn, bubble || false); // Firefox legacy + } + }; + + var passiveSupported = false; + + if (cap.haseventlistener) { // W3C standard event model + + // thanks to https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener + try { var options = Object.defineProperty({}, "passive", { get: function () { passiveSupported = !0; } }); _win.addEventListener("test", null, options); } catch (err) { } + + this.stopPropagation = function (e) { + if (!e) return false; + e = (e.original) ? e.original : e; + e.stopPropagation(); + return false; + }; + + this.cancelEvent = function(e) { + if (e.cancelable) e.preventDefault(); + e.stopImmediatePropagation(); + if (e.preventManipulation) e.preventManipulation(); // IE10+ + return false; + }; + + } else { + + // inspired from https://gist.github.com/jonathantneal/2415137 + + Event.prototype.preventDefault = function () { + this.returnValue = false; + }; + + Event.prototype.stopPropagation = function () { + this.cancelBubble = true; + }; + + _win.constructor.prototype.addEventListener = _doc.constructor.prototype.addEventListener = Element.prototype.addEventListener = function (type, listener, useCapture) { + this.attachEvent("on" + type, listener); + }; + _win.constructor.prototype.removeEventListener = _doc.constructor.prototype.removeEventListener = Element.prototype.removeEventListener = function (type, listener, useCapture) { + this.detachEvent("on" + type, listener); + }; + + // Thanks to http://www.switchonthecode.com !! + this.cancelEvent = function (e) { + e = e || _win.event; + if (e) { + e.cancelBubble = true; + e.cancel = true; + e.returnValue = false; + } + return false; + }; + + this.stopPropagation = function (e) { + e = e || _win.event; + if (e) e.cancelBubble = true; + return false; + }; + + } + + this.delegate = function (dom, name, fn, bubble, active) { + + var de = delegatevents[name] || false; + + if (!de) { + + de = { + a: [], + l: [], + f: function (e) { + var lst = de.l, l = lst.length - 1; + var r = false; + for (var a = l; a >= 0; a--) { + r = lst[a].call(e.target, e); + if (r === false) return false; + } + return r; + } + }; + + self.bind(dom, name, de.f, bubble, active); + + delegatevents[name] = de; + + } + + if (self.ispage) { + de.a = [self.id].concat(de.a); + de.l = [fn].concat(de.l); + } else { + de.a.push(self.id); + de.l.push(fn); + } + + }; + + this.undelegate = function (dom, name, fn, bubble, active) { + var de = delegatevents[name]||false; + if (de&&de.l) { // quick fix #683 + for (var a=0,l=de.l.length;a 0) return dd; + dom = (dom.parentNode) ? dom.parentNode : false; + } + return false; + }; + + this.triggerScrollStart = function (cx, cy, rx, ry, ms) { + + if (self.onscrollstart) { + var info = { + type: "scrollstart", + current: { + x: cx, + y: cy + }, + request: { + x: rx, + y: ry + }, + end: { + x: self.newscrollx, + y: self.newscrolly + }, + speed: ms + }; + self.onscrollstart.call(self, info); + } + + }; + + this.triggerScrollEnd = function () { + if (self.onscrollend) { + + var px = self.getScrollLeft(); + var py = self.getScrollTop(); + + var info = { + type: "scrollend", + current: { + x: px, + y: py + }, + end: { + x: px, + y: py + } + }; + + self.onscrollend.call(self, info); + + } + + }; + + var scrolldiry = 0, scrolldirx = 0, scrolltmr = 0, scrollspd = 1; + + function doScrollRelative(px, py, chkscroll, iswheel) { + + if (!self.scrollrunning) { + self.newscrolly = self.getScrollTop(); + self.newscrollx = self.getScrollLeft(); + scrolltmr = now(); + } + + var gap = (now() - scrolltmr); + scrolltmr = now(); + + if (gap > 350) { + scrollspd = 1; + } else { + scrollspd += (2 - scrollspd) / 10; + } + + px = px * scrollspd | 0; + py = py * scrollspd | 0; + + if (px) { + + if (iswheel) { // mouse-only + if (px < 0) { // fix apple magic mouse swipe back/forward + if (self.getScrollLeft() >= self.page.maxw) return true; + } else { + if (self.getScrollLeft() <= 0) return true; + } + } + + var dx = px > 0 ? 1 : -1; + + if (scrolldirx !== dx) { + if (self.scrollmom) self.scrollmom.stop(); + self.newscrollx = self.getScrollLeft(); + scrolldirx = dx; + } + + self.lastdeltax -= px; + + } + + if (py) { + + var chk = (function () { + var top = self.getScrollTop(); + if (py < 0) { + if (top >= self.page.maxh) return true; + } else { + if (top <= 0) return true; + } + })(); + + if (chk) { + if (opt.nativeparentscrolling && chkscroll && !self.ispage && !self.zoomactive) return true; + var ny = self.view.h >> 1; + if (self.newscrolly < -ny) { self.newscrolly = -ny; py = -1; } + else if (self.newscrolly > self.page.maxh + ny) { self.newscrolly = self.page.maxh + ny; py = 1; } + else py = 0; + } + + var dy = py > 0 ? 1 : -1; + + if (scrolldiry !== dy) { + if (self.scrollmom) self.scrollmom.stop(); + self.newscrolly = self.getScrollTop(); + scrolldiry = dy; + } + + self.lastdeltay -= py; + + } + + if (py || px) { + self.synched("relativexy", function () { + + var dty = self.lastdeltay + self.newscrolly; + self.lastdeltay = 0; + + var dtx = self.lastdeltax + self.newscrollx; + self.lastdeltax = 0; + + if (!self.rail.drag) self.doScrollPos(dtx, dty); + + }); + } + + } + + var hasparentscrollingphase = false; + + function execScrollWheel(e, hr, chkscroll) { + var px, py; + + if (!chkscroll && hasparentscrollingphase) return true; + + if (e.deltaMode === 0) { // PIXEL + px = -(e.deltaX * (opt.mousescrollstep / (18 * 3))) | 0; + py = -(e.deltaY * (opt.mousescrollstep / (18 * 3))) | 0; + } else if (e.deltaMode === 1) { // LINE + px = -(e.deltaX * opt.mousescrollstep * 50 / 80) | 0; + py = -(e.deltaY * opt.mousescrollstep * 50 / 80) | 0; + } + + if (hr && opt.oneaxismousemode && (px === 0) && py) { // classic vertical-only mousewheel + browser with x/y support + px = py; + py = 0; + + if (chkscroll) { + var hrend = (px < 0) ? (self.getScrollLeft() >= self.page.maxw) : (self.getScrollLeft() <= 0); + if (hrend) { // preserve vertical scrolling + py = px; + px = 0; + } + } + + } + + // invert horizontal direction for rtl mode + if (self.isrtlmode) px = -px; + + var chk = doScrollRelative(px, py, chkscroll, true); + + if (chk) { + if (chkscroll) hasparentscrollingphase = true; + } else { + hasparentscrollingphase = false; + e.stopImmediatePropagation(); + return e.preventDefault(); + } + + } + + this.onmousewheel = function (e) { + if (self.wheelprevented||self.locked) return false; + if (self.railslocked) { + self.debounced("checkunlock", self.resize, 250); + return false; + } + if (self.rail.drag) return self.cancelEvent(e); + + if (opt.oneaxismousemode === "auto" && e.deltaX !== 0) opt.oneaxismousemode = false; // check two-axis mouse support (not very elegant) + + if (opt.oneaxismousemode && e.deltaX === 0) { + if (!self.rail.scrollable) { + if (self.railh && self.railh.scrollable) { + return self.onmousewheelhr(e); + } else { + return true; + } + } + } + + var nw = now(); + var chk = false; + if (opt.preservenativescrolling && ((self.checkarea + 600) < nw)) { + self.nativescrollingarea = self.isScrollable(e); + chk = true; + } + self.checkarea = nw; + if (self.nativescrollingarea) return true; // this isn't my business + var ret = execScrollWheel(e, false, chk); + if (ret) self.checkarea = 0; + return ret; + }; + + this.onmousewheelhr = function (e) { + if (self.wheelprevented) return; + if (self.railslocked || !self.railh.scrollable) return true; + if (self.rail.drag) return self.cancelEvent(e); + + var nw = now(); + var chk = false; + if (opt.preservenativescrolling && ((self.checkarea + 600) < nw)) { + self.nativescrollingarea = self.isScrollable(e); + chk = true; + } + self.checkarea = nw; + if (self.nativescrollingarea) return true; // this is not my business + if (self.railslocked) return self.cancelEvent(e); + + return execScrollWheel(e, true, chk); + }; + + this.stop = function () { + self.cancelScroll(); + if (self.scrollmon) self.scrollmon.stop(); + self.cursorfreezed = false; + self.scroll.y = Math.round(self.getScrollTop() * (1 / self.scrollratio.y)); + self.noticeCursor(); + return self; + }; + + this.getTransitionSpeed = function (dif) { + + return 80 + (dif / 72) * opt.scrollspeed |0; + + }; + + if (!opt.smoothscroll) { + this.doScrollLeft = function (x, spd) { //direct + var y = self.getScrollTop(); + self.doScrollPos(x, y, spd); + }; + this.doScrollTop = function (y, spd) { //direct + var x = self.getScrollLeft(); + self.doScrollPos(x, y, spd); + }; + this.doScrollPos = function (x, y, spd) { //direct + var nx = (x > self.page.maxw) ? self.page.maxw : x; + if (nx < 0) nx = 0; + var ny = (y > self.page.maxh) ? self.page.maxh : y; + if (ny < 0) ny = 0; + self.synched('scroll', function () { + self.setScrollTop(ny); + self.setScrollLeft(nx); + }); + }; + this.cancelScroll = function () { }; // direct + + } else if (self.ishwscroll && cap.hastransition && opt.usetransition && !!opt.smoothscroll) { + + var lasttransitionstyle = ''; + + this.resetTransition = function () { + lasttransitionstyle = ''; + self.doc.css(cap.prefixstyle + 'transition-duration', '0ms'); + }; + + this.prepareTransition = function (dif, istime) { + var ex = (istime) ? dif : self.getTransitionSpeed(dif); + var trans = ex + 'ms'; + if (lasttransitionstyle !== trans) { + lasttransitionstyle = trans; + self.doc.css(cap.prefixstyle + 'transition-duration', trans); + } + return ex; + }; + + this.doScrollLeft = function (x, spd) { //trans + var y = (self.scrollrunning) ? self.newscrolly : self.getScrollTop(); + self.doScrollPos(x, y, spd); + }; + + this.doScrollTop = function (y, spd) { //trans + var x = (self.scrollrunning) ? self.newscrollx : self.getScrollLeft(); + self.doScrollPos(x, y, spd); + }; + + this.cursorupdate = { + running: false, + start: function () { + var m = this; + + if (m.running) return; + m.running = true; + + var loop = function () { + if (m.running) setAnimationFrame(loop); + self.showCursor(self.getScrollTop(), self.getScrollLeft()); + self.notifyScrollEvent(self.win[0]); + }; + + setAnimationFrame(loop); + }, + stop: function () { + this.running = false; + } + }; + + this.doScrollPos = function (x, y, spd) { //trans + + var py = self.getScrollTop(); + var px = self.getScrollLeft(); + + if (((self.newscrolly - py) * (y - py) < 0) || ((self.newscrollx - px) * (x - px) < 0)) self.cancelScroll(); //inverted movement detection + + if (!opt.bouncescroll) { + if (y < 0) y = 0; + else if (y > self.page.maxh) y = self.page.maxh; + if (x < 0) x = 0; + else if (x > self.page.maxw) x = self.page.maxw; + } else { + if (y < 0) y = y / 2 | 0; + else if (y > self.page.maxh) y = self.page.maxh + (y - self.page.maxh) / 2 | 0; + if (x < 0) x = x / 2 | 0; + else if (x > self.page.maxw) x = self.page.maxw + (x - self.page.maxw) / 2 | 0; + } + + if (self.scrollrunning && x == self.newscrollx && y == self.newscrolly) return false; + + self.newscrolly = y; + self.newscrollx = x; + + var top = self.getScrollTop(); + var lft = self.getScrollLeft(); + + var dst = {}; + dst.x = x - lft; + dst.y = y - top; + + var dd = Math.sqrt((dst.x * dst.x) + (dst.y * dst.y)) | 0; + + var ms = self.prepareTransition(dd); + + if (!self.scrollrunning) { + self.scrollrunning = true; + self.triggerScrollStart(lft, top, x, y, ms); + self.cursorupdate.start(); + } + + self.scrollendtrapped = true; + + if (!cap.transitionend) { + if (self.scrollendtrapped) clearTimeout(self.scrollendtrapped); + self.scrollendtrapped = setTimeout(self.onScrollTransitionEnd, ms); // simulate transitionend event + } + + self.setScrollTop(self.newscrolly); + self.setScrollLeft(self.newscrollx); + + }; + + this.cancelScroll = function () { + if (!self.scrollendtrapped) return true; + var py = self.getScrollTop(); + var px = self.getScrollLeft(); + self.scrollrunning = false; + if (!cap.transitionend) clearTimeout(cap.transitionend); + self.scrollendtrapped = false; + self.resetTransition(); + self.setScrollTop(py); // fire event onscroll + if (self.railh) self.setScrollLeft(px); + if (self.timerscroll && self.timerscroll.tm) clearInterval(self.timerscroll.tm); + self.timerscroll = false; + + self.cursorfreezed = false; + + self.cursorupdate.stop(); + self.showCursor(py, px); + return self; + }; + + this.onScrollTransitionEnd = function () { + + if (!self.scrollendtrapped) return; + + var py = self.getScrollTop(); + var px = self.getScrollLeft(); + + if (py < 0) py = 0; + else if (py > self.page.maxh) py = self.page.maxh; + if (px < 0) px = 0; + else if (px > self.page.maxw) px = self.page.maxw; + if ((py != self.newscrolly) || (px != self.newscrollx)) return self.doScrollPos(px, py, opt.snapbackspeed); + + if (self.scrollrunning) self.triggerScrollEnd(); + self.scrollrunning = false; + + self.scrollendtrapped = false; + self.resetTransition(); + self.timerscroll = false; + self.setScrollTop(py); // fire event onscroll + if (self.railh) self.setScrollLeft(px); // fire event onscroll left + + self.cursorupdate.stop(); + self.noticeCursor(false, py, px); + + self.cursorfreezed = false; + + }; + + } else { + + this.doScrollLeft = function (x, spd) { //no-trans + var y = (self.scrollrunning) ? self.newscrolly : self.getScrollTop(); + self.doScrollPos(x, y, spd); + }; + + this.doScrollTop = function (y, spd) { //no-trans + var x = (self.scrollrunning) ? self.newscrollx : self.getScrollLeft(); + self.doScrollPos(x, y, spd); + }; + + this.doScrollPos = function (x, y, spd) { //no-trans + + var py = self.getScrollTop(); + var px = self.getScrollLeft(); + + if (((self.newscrolly - py) * (y - py) < 0) || ((self.newscrollx - px) * (x - px) < 0)) self.cancelScroll(); //inverted movement detection + + var clipped = false; + + if (!self.bouncescroll || !self.rail.visibility) { + if (y < 0) { + y = 0; + clipped = true; + } else if (y > self.page.maxh) { + y = self.page.maxh; + clipped = true; + } + } + if (!self.bouncescroll || !self.railh.visibility) { + if (x < 0) { + x = 0; + clipped = true; + } else if (x > self.page.maxw) { + x = self.page.maxw; + clipped = true; + } + } + + if (self.scrollrunning && (self.newscrolly === y) && (self.newscrollx === x)) return true; + + self.newscrolly = y; + self.newscrollx = x; + + self.dst = {}; + self.dst.x = x - px; + self.dst.y = y - py; + self.dst.px = px; + self.dst.py = py; + + var dd = Math.sqrt((self.dst.x * self.dst.x) + (self.dst.y * self.dst.y)) | 0; + var ms = self.getTransitionSpeed(dd); + + self.bzscroll = {}; + + var p3 = (clipped) ? 1 : 0.58; + self.bzscroll.x = new BezierClass(px, self.newscrollx, ms, 0, 0, p3, 1); + self.bzscroll.y = new BezierClass(py, self.newscrolly, ms, 0, 0, p3, 1); + + var loopid = now(); + + var loop = function () { + + if (!self.scrollrunning) return; + var x = self.bzscroll.y.getPos(); + + self.setScrollLeft(self.bzscroll.x.getNow()); + self.setScrollTop(self.bzscroll.y.getNow()); + + if (x <= 1) { + self.timer = setAnimationFrame(loop); + } else { + self.scrollrunning = false; + self.timer = 0; + self.triggerScrollEnd(); + } + + }; + + if (!self.scrollrunning) { + self.triggerScrollStart(px, py, x, y, ms); + self.scrollrunning = true; + self.timer = setAnimationFrame(loop); + } + + }; + + this.cancelScroll = function () { + if (self.timer) clearAnimationFrame(self.timer); + self.timer = 0; + self.bzscroll = false; + self.scrollrunning = false; + return self; + }; + + } + + this.doScrollBy = function (stp, relative) { + doScrollRelative(0, stp); + }; + + this.doScrollLeftBy = function (stp, relative) { + doScrollRelative(stp, 0); + }; + + this.doScrollTo = function (pos, relative) { + var ny = (relative) ? Math.round(pos * self.scrollratio.y) : pos; + if (ny < 0) ny = 0; + else if (ny > self.page.maxh) ny = self.page.maxh; + self.cursorfreezed = false; + self.doScrollTop(pos); + }; + + this.checkContentSize = function () { + var pg = self.getContentSize(); + if ((pg.h != self.page.h) || (pg.w != self.page.w)) self.resize(false, pg); + }; + + self.onscroll = function (e) { + if (self.rail.drag) return; + if (!self.cursorfreezed) { + self.synched('scroll', function () { + self.scroll.y = Math.round(self.getScrollTop() / self.scrollratio.y); + if (self.railh) self.scroll.x = Math.round(self.getScrollLeft() / self.scrollratio.x); + self.noticeCursor(); + }); + } + }; + self.bind(self.docscroll, "scroll", self.onscroll); + + this.doZoomIn = function (e) { + if (self.zoomactive) return; + self.zoomactive = true; + + self.zoomrestore = { + style: {} + }; + var lst = ['position', 'top', 'left', 'zIndex', 'backgroundColor', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight']; + var win = self.win[0].style; + for (var a in lst) { + var pp = lst[a]; + self.zoomrestore.style[pp] = (win[pp] !== undefined) ? win[pp] : ''; + } + + self.zoomrestore.style.width = self.win.css('width'); + self.zoomrestore.style.height = self.win.css('height'); + + self.zoomrestore.padding = { + w: self.win.outerWidth() - self.win.width(), + h: self.win.outerHeight() - self.win.height() + }; + + if (cap.isios4) { + self.zoomrestore.scrollTop = $window.scrollTop(); + $window.scrollTop(0); + } + + self.win.css({ + position: (cap.isios4) ? "absolute" : "fixed", + top: 0, + left: 0, + zIndex: globalmaxzindex + 100, + margin: 0 + }); + var bkg = self.win.css("backgroundColor"); + if ("" === bkg || /transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(bkg)) self.win.css("backgroundColor", "#fff"); + self.rail.css({ + zIndex: globalmaxzindex + 101 + }); + self.zoom.css({ + zIndex: globalmaxzindex + 102 + }); + self.zoom.css('backgroundPosition', '0 -18px'); + self.resizeZoom(); + + if (self.onzoomin) self.onzoomin.call(self); + + return self.cancelEvent(e); + }; + + this.doZoomOut = function (e) { + if (!self.zoomactive) return; + self.zoomactive = false; + + self.win.css("margin", ""); + self.win.css(self.zoomrestore.style); + + if (cap.isios4) { + $window.scrollTop(self.zoomrestore.scrollTop); + } + + self.rail.css({ + "z-index": self.zindex + }); + self.zoom.css({ + "z-index": self.zindex + }); + self.zoomrestore = false; + self.zoom.css('backgroundPosition', '0 0'); + self.onResize(); + + if (self.onzoomout) self.onzoomout.call(self); + + return self.cancelEvent(e); + }; + + this.doZoom = function (e) { + return (self.zoomactive) ? self.doZoomOut(e) : self.doZoomIn(e); + }; + + this.resizeZoom = function () { + if (!self.zoomactive) return; + + var py = self.getScrollTop(); //preserve scrolling position + self.win.css({ + width: $window.width() - self.zoomrestore.padding.w + "px", + height: $window.height() - self.zoomrestore.padding.h + "px" + }); + self.onResize(); + + self.setScrollTop(Math.min(self.page.maxh, py)); + }; + + this.init(); + + $.nicescroll.push(this); + + }; + + // Inspired by the work of Kin Blas + // http://webpro.host.adobe.com/people/jblas/momentum/includes/jquery.momentum.0.7.js + var ScrollMomentumClass2D = function (nc) { + var self = this; + this.nc = nc; + + this.lastx = 0; + this.lasty = 0; + this.speedx = 0; + this.speedy = 0; + this.lasttime = 0; + this.steptime = 0; + this.snapx = false; + this.snapy = false; + this.demulx = 0; + this.demuly = 0; + + this.lastscrollx = -1; + this.lastscrolly = -1; + + this.chkx = 0; + this.chky = 0; + + this.timer = 0; + + this.reset = function (px, py) { + self.stop(); + self.steptime = 0; + self.lasttime = now(); + self.speedx = 0; + self.speedy = 0; + self.lastx = px; + self.lasty = py; + self.lastscrollx = -1; + self.lastscrolly = -1; + }; + + this.update = function (px, py) { + var tm = now(); + self.steptime = tm - self.lasttime; + self.lasttime = tm; + var dy = py - self.lasty; + var dx = px - self.lastx; + var sy = self.nc.getScrollTop(); + var sx = self.nc.getScrollLeft(); + var newy = sy + dy; + var newx = sx + dx; + self.snapx = (newx < 0) || (newx > self.nc.page.maxw); + self.snapy = (newy < 0) || (newy > self.nc.page.maxh); + self.speedx = dx; + self.speedy = dy; + self.lastx = px; + self.lasty = py; + }; + + this.stop = function () { + self.nc.unsynched("domomentum2d"); + if (self.timer) clearTimeout(self.timer); + self.timer = 0; + self.lastscrollx = -1; + self.lastscrolly = -1; + }; + + this.doSnapy = function (nx, ny) { + var snap = false; + + if (ny < 0) { + ny = 0; + snap = true; + } else if (ny > self.nc.page.maxh) { + ny = self.nc.page.maxh; + snap = true; + } + + if (nx < 0) { + nx = 0; + snap = true; + } else if (nx > self.nc.page.maxw) { + nx = self.nc.page.maxw; + snap = true; + } + + (snap) ? self.nc.doScrollPos(nx, ny, self.nc.opt.snapbackspeed) : self.nc.triggerScrollEnd(); + }; + + this.doMomentum = function (gp) { + var t = now(); + var l = (gp) ? t + gp : self.lasttime; + + var sl = self.nc.getScrollLeft(); + var st = self.nc.getScrollTop(); + + var pageh = self.nc.page.maxh; + var pagew = self.nc.page.maxw; + + self.speedx = (pagew > 0) ? Math.min(60, self.speedx) : 0; + self.speedy = (pageh > 0) ? Math.min(60, self.speedy) : 0; + + var chk = l && (t - l) <= 60; + + if ((st < 0) || (st > pageh) || (sl < 0) || (sl > pagew)) chk = false; + + var sy = (self.speedy && chk) ? self.speedy : false; + var sx = (self.speedx && chk) ? self.speedx : false; + + if (sy || sx) { + var tm = Math.max(16, self.steptime); //timeout granularity + + if (tm > 50) { // do smooth + var xm = tm / 50; + self.speedx *= xm; + self.speedy *= xm; + tm = 50; + } + + self.demulxy = 0; + + self.lastscrollx = self.nc.getScrollLeft(); + self.chkx = self.lastscrollx; + self.lastscrolly = self.nc.getScrollTop(); + self.chky = self.lastscrolly; + + var nx = self.lastscrollx; + var ny = self.lastscrolly; + + var onscroll = function () { + var df = ((now() - t) > 600) ? 0.04 : 0.02; + + if (self.speedx) { + nx = Math.floor(self.lastscrollx - (self.speedx * (1 - self.demulxy))); + self.lastscrollx = nx; + if ((nx < 0) || (nx > pagew)) df = 0.10; + } + + if (self.speedy) { + ny = Math.floor(self.lastscrolly - (self.speedy * (1 - self.demulxy))); + self.lastscrolly = ny; + if ((ny < 0) || (ny > pageh)) df = 0.10; + } + + self.demulxy = Math.min(1, self.demulxy + df); + + self.nc.synched("domomentum2d", function () { + + if (self.speedx) { + var scx = self.nc.getScrollLeft(); + // if (scx != self.chkx) self.stop(); + self.chkx = nx; + self.nc.setScrollLeft(nx); + } + + if (self.speedy) { + var scy = self.nc.getScrollTop(); + // if (scy != self.chky) self.stop(); + self.chky = ny; + self.nc.setScrollTop(ny); + } + + if (!self.timer) { + self.nc.hideCursor(); + self.doSnapy(nx, ny); + } + + }); + + if (self.demulxy < 1) { + self.timer = setTimeout(onscroll, tm); + } else { + self.stop(); + self.nc.hideCursor(); + self.doSnapy(nx, ny); + } + }; + + onscroll(); + + } else { + self.doSnapy(self.nc.getScrollLeft(), self.nc.getScrollTop()); + } + + }; + + }; + + + // override jQuery scrollTop + var _scrollTop = jQuery.fn.scrollTop; // preserve original function + + jQuery.cssHooks.pageYOffset = { + get: function (elem, computed, extra) { + var nice = $.data(elem, '__nicescroll') || false; + return (nice && nice.ishwscroll) ? nice.getScrollTop() : _scrollTop.call(elem); + }, + set: function (elem, value) { + var nice = $.data(elem, '__nicescroll') || false; + (nice && nice.ishwscroll) ? nice.setScrollTop(parseInt(value)) : _scrollTop.call(elem, value); + return this; + } + }; + + jQuery.fn.scrollTop = function (value) { + if (value === undefined) { + var nice = (this[0]) ? $.data(this[0], '__nicescroll') || false : false; + return (nice && nice.ishwscroll) ? nice.getScrollTop() : _scrollTop.call(this); + } else { + return this.each(function () { + var nice = $.data(this, '__nicescroll') || false; + (nice && nice.ishwscroll) ? nice.setScrollTop(parseInt(value)) : _scrollTop.call($(this), value); + }); + } + }; + + // override jQuery scrollLeft + var _scrollLeft = jQuery.fn.scrollLeft; // preserve original function + + $.cssHooks.pageXOffset = { + get: function (elem, computed, extra) { + var nice = $.data(elem, '__nicescroll') || false; + return (nice && nice.ishwscroll) ? nice.getScrollLeft() : _scrollLeft.call(elem); + }, + set: function (elem, value) { + var nice = $.data(elem, '__nicescroll') || false; + (nice && nice.ishwscroll) ? nice.setScrollLeft(parseInt(value)) : _scrollLeft.call(elem, value); + return this; + } + }; + + jQuery.fn.scrollLeft = function (value) { + if (value === undefined) { + var nice = (this[0]) ? $.data(this[0], '__nicescroll') || false : false; + return (nice && nice.ishwscroll) ? nice.getScrollLeft() : _scrollLeft.call(this); + } else { + return this.each(function () { + var nice = $.data(this, '__nicescroll') || false; + (nice && nice.ishwscroll) ? nice.setScrollLeft(parseInt(value)) : _scrollLeft.call($(this), value); + }); + } + }; + + var NiceScrollArray = function (doms) { + var self = this; + this.length = 0; + this.name = "nicescrollarray"; + + this.each = function (fn) { + $.each(self, fn); + return self; + }; + + this.push = function (nice) { + self[self.length] = nice; + self.length++; + }; + + this.eq = function (idx) { + return self[idx]; + }; + + if (doms) { + for (var a = 0; a < doms.length; a++) { + var nice = $.data(doms[a], '__nicescroll') || false; + if (nice) { + this[this.length] = nice; + this.length++; + } + } + } + + return this; + }; + + function mplex(el, lst, fn) { + for (var a = 0, l = lst.length; a < l; a++) fn(el, lst[a]); + } + mplex( + NiceScrollArray.prototype, ['show', 'hide', 'toggle', 'onResize', 'resize', 'remove', 'stop', 'doScrollPos'], + function (e, n) { + e[n] = function () { + var args = arguments; + return this.each(function () { + this[n].apply(this, args); + }); + }; + } + ); + + jQuery.fn.getNiceScroll = function (index) { + if (index === undefined) { + return new NiceScrollArray(this); + } else { + return this[index] && $.data(this[index], '__nicescroll') || false; + } + }; + + var pseudos = jQuery.expr.pseudos || jQuery.expr[':']; // jQuery 3 migration + pseudos.nicescroll = function (a) { + return $.data(a, '__nicescroll') !== undefined; + }; + + $.fn.niceScroll = function (wrapper, _opt) { + if (_opt === undefined && typeof wrapper == "object" && !("jquery" in wrapper)) { + _opt = wrapper; + wrapper = false; + } + + var ret = new NiceScrollArray(); + + this.each(function () { + var $this = $(this); + + var opt = $.extend({}, _opt); // cloning + + if (wrapper || false) { + var wrp = $(wrapper); + opt.doc = (wrp.length > 1) ? $(wrapper, $this) : wrp; + opt.win = $this; + } + var docundef = !("doc" in opt); + if (!docundef && !("win" in opt)) opt.win = $this; + + var nice = $this.data('__nicescroll') || false; + if (!nice) { + opt.doc = opt.doc || $this; + nice = new NiceScrollClass(opt, $this); + $this.data('__nicescroll', nice); + } + ret.push(nice); + }); + + return (ret.length === 1) ? ret[0] : ret; + }; + + _win.NiceScroll = { + getjQuery: function () { + return jQuery; + } + }; + + if (!$.nicescroll) { + $.nicescroll = new NiceScrollArray(); + $.nicescroll.options = _globaloptions; + } + +})); \ No newline at end of file diff --git a/plugin/search/search.js b/plugin/search/search.js new file mode 100644 index 0000000..141e75b --- /dev/null +++ b/plugin/search/search.js @@ -0,0 +1,344 @@ +var themeLocalSearch = function({search_path, zip_Path, version_Path, input_Trigger, top_N}) { + // Popup Window; + var isfetched = false, + isXml = true; + + // Search DB path; + if (search_path.length === 0) { + search_path = "search.xml"; + } else if (/json$/i.test(search_path)) { + isXml = false; + } + + // monitor main search box; + var onPopupClose = function(e) { + $('.popup').fadeOut(300); + $('body').removeClass('body-fixed') + $('#local-search-input').val(''); + $('.search-result-list').remove(); + $('#no-result').remove(); + $('.search-result-number').remove(); + } + + function proceedsearch() { + $('.popup').fadeIn(300); + $('body').addClass('body-fixed'); + var $localSearchInput = $('#local-search-input'); + $localSearchInput.attr("autocapitalize", "none"); + $localSearchInput.attr("autocorrect", "off"); + $localSearchInput.focus(); + } + + // get search zip version and initialize the search zip; + $.get(version_Path + '?t=' + (+new Date()), function(res) { + if (localStorage.getItem('searchVersion') !== res) { + localStorage.setItem('searchVersion', res); + initSearchJson(); + } + }); + + function initSearchJson() { + initLoad([zip_Path], { + loadOptions: { + success: function(obj) { + localStorage.setItem('searchJson', obj[search_path]) + }, + error: function(e) { + return console.log(e) + } + }, + returnOptions: { + 'json': TYPE_TEXT + }, + mimeOptions: { + 'json': 'application/json' + } + }) + } + + function fixedInputWhenScrolling() { + var searchContainerId = '.local-search-popup', + searchInputId = '#local-search-input', + searchInputPromptH = $(".input-prompt").outerHeight(); + + $(searchContainerId).scroll(function() { + var scrollTop = $(searchContainerId).scrollTop(); + + if(scrollTop >= searchInputPromptH/2) { + $(searchInputId).addClass('input-fixed'); + } else { + $(searchInputId).removeClass('input-fixed'); + } + }).trigger('scroll'); + } + + + function clearScroll() { + var searchContainerId = '.local-search-popup', + scrollSpeed = 5; //shoud be small value! + + $(searchContainerId).animate({ + scrollTop: 0 + }, scrollSpeed); + } + + + // search function; + var searchFunc = function(search_id, content_id) { + + 'use strict'; + isfetched = true; + var datas = JSON.parse(localStorage.getItem('searchJson')); + console.log(search_id) + var input = document.getElementById(search_id); + var resultContent = document.getElementById(content_id); + var inputEventFunction = function() { + // TODO + clearScroll(); + + var searchText = input.value.trim().toLowerCase(); + var keywords = searchText.split(/[\s\-]+/); + if (keywords.length > 1) { + keywords.push(searchText); + } + var resultItems = []; + if (searchText.length > 0) { + // perform local searching + datas.forEach(function(data) { + var isMatch = false; + var hitCount = 0; + var searchTextCount = 0; + var title = data.title ? data.title.trim() : ''; + var titleInLowerCase = title.toLowerCase(); + var content = data.content ? data.content.trim().replace(/<[^>]+>/g, "") : ''; + var contentInLowerCase = content.toLowerCase(); + var articleUrl = decodeURIComponent(data.url); + var indexOfTitle = []; + var indexOfContent = []; + // only match articles with not empty titles + keywords.forEach(function(keyword) { + function getIndexByWord(word, text, caseSensitive) { + var wordLen = word.length; + if (wordLen === 0) { + return []; + } + var startPosition = 0, + position = [], + index = []; + if (!caseSensitive) { + text = text.toLowerCase(); + word = word.toLowerCase(); + } + while ((position = text.indexOf(word, startPosition)) > -1) { + index.push({ + position: position, + word: word + }); + startPosition = position + wordLen; + } + return index; + } + + indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false)); + indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false)); + }); + if (indexOfTitle.length > 0 || indexOfContent.length > 0) { + isMatch = true; + hitCount = indexOfTitle.length + indexOfContent.length; + } + + // show search results + if (isMatch) { + // sort index by position of keyword + [indexOfTitle, indexOfContent].forEach(function(index) { + index.sort(function(itemLeft, itemRight) { + if (itemRight.position !== itemLeft.position) { + return itemRight.position - itemLeft.position; + } else { + return itemLeft.word.length - itemRight.word.length; + } + }); + }); + + // merge hits into slices + function mergeIntoSlice(text, start, end, index) { + var item = index[index.length - 1]; + var position = item.position; + var word = item.word; + var hits = []; + var searchTextCountInSlice = 0; + while (position + word.length <= end && index.length != 0) { + if (word === searchText) { + searchTextCountInSlice++; + } + hits.push({ + position: position, + length: word.length + }); + var wordEnd = position + word.length; + + // move to next position of hit + index.pop(); + while (index.length != 0) { + item = index[index.length - 1]; + position = item.position; + word = item.word; + if (wordEnd > position) { + index.pop(); + } else { + break; + } + } + } + searchTextCount += searchTextCountInSlice; + return { + hits: hits, + start: start, + end: end, + searchTextCount: searchTextCountInSlice + }; + } + + var slicesOfTitle = []; + if (indexOfTitle.length != 0) { + slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle)); + } + + var slicesOfContent = []; + while (indexOfContent.length != 0) { + var item = indexOfContent[indexOfContent.length - 1]; + var position = item.position; + var word = item.word; + // cut out 100 characters + var start = position - 20; + var end = position + 80; + if (start < 0) { + start = 0; + } + if (end < position + word.length) { + end = position + word.length; + } + if (end > content.length) { + end = content.length; + } + slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent)); + } + + // sort slices in content by search text's count and hits' count + slicesOfContent.sort(function(sliceLeft, sliceRight) { + if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) { + return sliceRight.searchTextCount - sliceLeft.searchTextCount; + } else if (sliceLeft.hits.length !== sliceRight.hits.length) { + return sliceRight.hits.length - sliceLeft.hits.length; + } else { + return sliceLeft.start - sliceRight.start; + } + }); + + // select top N slices in content + var upperBound = parseInt(top_N); + if (upperBound >= 0) { + slicesOfContent = slicesOfContent.slice(0, upperBound); + } + + // highlight title and content + function highlightKeyword(text, slice) { + var result = ''; + var prevEnd = slice.start; + slice.hits.forEach(function(hit) { + result += text.substring(prevEnd, hit.position); + var end = hit.position + hit.length; + result += '' + text.substring(hit.position, end) + ''; + prevEnd = end; + }); + result += text.substring(prevEnd, slice.end); + return result; + } + + var resultItem = ''; + + if (slicesOfTitle.length != 0) { + resultItem += "
  • " + highlightKeyword(title, slicesOfTitle[0]) + ""; + } else { + resultItem += "
  • " + title + ""; + } + + slicesOfContent.forEach(function(slice) { + resultItem += "" + + "

    " + highlightKeyword(content, slice) + + "...

    " + "
    "; + }); + + resultItem += "
  • "; + resultItems.push({ + item: resultItem, + searchTextCount: searchTextCount, + hitCount: hitCount, + id: resultItems.length + }); + } + }) + }; + if (keywords.length === 1 && keywords[0] === "") { + resultContent.innerHTML = '
    ' + } else if (resultItems.length === 0) { + resultContent.innerHTML = '
    ' + } else { + resultItems.sort(function(resultLeft, resultRight) { + if (resultLeft.searchTextCount !== resultRight.searchTextCount) { + return resultRight.searchTextCount - resultLeft.searchTextCount; + } else if (resultLeft.hitCount !== resultRight.hitCount) { + return resultRight.hitCount - resultLeft.hitCount; + } else { + return resultRight.id - resultLeft.id; + } + }); + var searchResultList = '
    ' + resultItems.length + ' results at total!
    ' + '
      '; + resultItems.forEach(function(result) { + searchResultList += result.item; + }) + searchResultList += "
    "; + resultContent.innerHTML = searchResultList; + } + } + + if ('auto' === input_Trigger) { + input.addEventListener('input', inputEventFunction); + } else { + //$('.search-icon').click(inputEventFunction); + input.addEventListener('keypress', function(event) { + if (event.keyCode === 13) { + inputEventFunction(); + } + }); + } + + proceedsearch(); + } + + // handle and trigger popup window; + $('.popup-trigger').click(function(e) { + e.stopPropagation(); + if (isfetched === false) { + $('.sb-close').click(); + searchFunc('local-search-input', 'local-search-output'); + } else { + proceedsearch(); + }; + }); + + $('.popup-btn-close').click(onPopupClose); + $('.popup').click(function(e) { + e.stopPropagation(); + }); + $(document).on('keyup', function(event) { + var shouldDismissSearchPopup = event.which === 27 && + $('.search-popup').is(':visible'); + if (shouldDismissSearchPopup) { + onPopupClose(); + } + }); + + // TODO + fixedInputWhenScrolling(); +}; \ No newline at end of file diff --git a/plugin/search/ziploader.js b/plugin/search/ziploader.js new file mode 100644 index 0000000..1d6e399 --- /dev/null +++ b/plugin/search/ziploader.js @@ -0,0 +1,681 @@ +/* eslint-disable */ + +(function() {'use strict';function l(a){throw a;}var r=void 0,t,aa=this;function v(a,b){var c=a.split("."),d=aa;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==r?d[f]=b:d=d[f]?d[f]:d[f]={}};var y="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;new (y?Uint8Array:Array)(256);var z;for(z=0;256>z;++z)for(var B=z,ba=7,B=B>>>1;B;B>>>=1)--ba;var ca=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759, + +2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977, + +2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755, + +2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956, + +3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270, + +936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],C=y?new Uint32Array(ca):ca;if(aa.Uint8Array!==r)try{eval("String.fromCharCode.apply(null, new Uint8Array([0]));")}catch(ea){String.fromCharCode.apply=function(a){return function(b,c){return a.call(String.fromCharCode,b,Array.prototype.slice.call(c))}}(String.fromCharCode.apply)};function D(a){var b=a.length,c=0,d=Number.POSITIVE_INFINITY,f,h,k,e,g,m,p,s,q,x;for(s=0;sc&&(c=a[s]),a[s]>=1;x=k<<16|s;for(q=m;qG;G++)switch(!0){case 143>=G:F.push([G+48,8]);break;case 255>=G:F.push([G-144+400,9]);break;case 279>=G:F.push([G-256+0,7]);break;case 287>=G:F.push([G-280+192,8]);break;default:l("invalid literal: "+G)} + +var fa=function(){function a(a){switch(!0){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272, + +a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:l("invalid length: "+a)}}var b=[],c,d;for(c=3;258>=c;c++)d=a(c),b[c]=d[2]<<24|d[1]<< + +16|d[0];return b}();y&&new Uint32Array(fa);function I(a,b){this.l=[];this.m=32768;this.d=this.f=this.c=this.t=0;this.input=y?new Uint8Array(a):a;this.u=!1;this.n=J;this.K=!1;if(b||!(b={}))b.index&&(this.c=b.index),b.bufferSize&&(this.m=b.bufferSize),b.bufferType&&(this.n=b.bufferType),b.resize&&(this.K=b.resize);switch(this.n){case ga:this.a=32768;this.b=new (y?Uint8Array:Array)(32768+this.m+258);break;case J:this.a=0;this.b=new (y?Uint8Array:Array)(this.m);this.e=this.W;this.B=this.R;this.q=this.V;break;default:l(Error("invalid inflate mode"))}} + +var ga=0,J=1; + +I.prototype.r=function(){for(;!this.u;){var a=K(this,3);a&1&&(this.u=!0);a>>>=1;switch(a){case 0:var b=this.input,c=this.c,d=this.b,f=this.a,h=b.length,k=r,e=r,g=d.length,m=r;this.d=this.f=0;c+1>=h&&l(Error("invalid uncompressed block header: LEN"));k=b[c++]|b[c++]<<8;c+1>=h&&l(Error("invalid uncompressed block header: NLEN"));e=b[c++]|b[c++]<<8;k===~e&&l(Error("invalid uncompressed block header: length verify"));c+k>b.length&&l(Error("input buffer is broken"));switch(this.n){case ga:for(;f+k>d.length;){m= + +g-f;k-=m;if(y)d.set(b.subarray(c,c+m),f),f+=m,c+=m;else for(;m--;)d[f++]=b[c++];this.a=f;d=this.e();f=this.a}break;case J:for(;f+k>d.length;)d=this.e({H:2});break;default:l(Error("invalid inflate mode"))}if(y)d.set(b.subarray(c,c+k),f),f+=k,c+=k;else for(;k--;)d[f++]=b[c++];this.c=c;this.a=f;this.b=d;break;case 1:this.q(ha,ia);break;case 2:for(var p=K(this,5)+257,s=K(this,5)+1,q=K(this,4)+4,x=new (y?Uint8Array:Array)(L.length),u=r,n=r,E=r,A=r,X=r,O=r,H=r,w=r,da=r,w=0;w=R?8:255>=R?9:279>=R?7:8;var ha=D(Q),S=new (y?Uint8Array:Array)(30),T,ra;T=0;for(ra=S.length;T=k&&l(Error("input buffer is broken")),c|=f[h++]<>>b;a.d=d-b;a.c=h;return e} + +function M(a,b){for(var c=a.f,d=a.d,f=a.input,h=a.c,k=f.length,e=b[0],g=b[1],m,p;d=k);)c|=f[h++]<>>16;p>d&&l(Error("invalid code length: "+p));a.f=c>>p;a.d=d-p;a.c=h;return m&65535}t=I.prototype; + +t.q=function(a,b){var c=this.b,d=this.a;this.C=a;for(var f=c.length-258,h,k,e,g;256!==(h=M(this,a));)if(256>h)d>=f&&(this.a=d,c=this.e(),d=this.a),c[d++]=h;else{k=h-257;g=la[k];0=f&&(this.a=d,c=this.e(),d=this.a);for(;g--;)c[d]=c[d++-e]}for(;8<=this.d;)this.d-=8,this.c--;this.a=d}; + +t.V=function(a,b){var c=this.b,d=this.a;this.C=a;for(var f=c.length,h,k,e,g;256!==(h=M(this,a));)if(256>h)d>=f&&(c=this.e(),f=c.length),c[d++]=h;else{k=h-257;g=la[k];0f&&(c=this.e(),f=c.length);for(;g--;)c[d]=c[d++-e]}for(;8<=this.d;)this.d-=8,this.c--;this.a=d}; + +t.e=function(){var a=new (y?Uint8Array:Array)(this.a-32768),b=this.a-32768,c,d,f=this.b;if(y)a.set(f.subarray(32768,a.length));else{c=0;for(d=a.length;cc;++c)f[c]=f[b+c];this.a=32768;return f}; + +t.W=function(a){var b,c=this.input.length/this.c+1|0,d,f,h,k=this.input,e=this.b;a&&("number"===typeof a.H&&(c=a.H),"number"===typeof a.P&&(c+=a.P));2>c?(d=(k.length-this.c)/this.C[2],h=258*(d/2)|0,f=hb&&(this.b.length=b),a=this.b);return this.buffer=a};function U(a){a=a||{};this.files=[];this.v=a.comment}U.prototype.L=function(a){this.j=a};U.prototype.s=function(a){var b=a[2]&65535|2;return b*(b^1)>>8&255};U.prototype.k=function(a,b){a[0]=(C[(a[0]^b)&255]^a[0]>>>8)>>>0;a[1]=(6681*(20173*(a[1]+(a[0]&255))>>>0)>>>0)+1>>>0;a[2]=(C[(a[2]^a[1]>>>24)&255]^a[2]>>>8)>>>0};U.prototype.T=function(a){var b=[305419896,591751049,878082192],c,d;y&&(b=new Uint32Array(b));c=0;for(d=a.length;c>>0;this.z=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.J=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.h=a[b++]|a[b++]<< + +8;this.g=a[b++]|a[b++]<<8;this.F=a[b++]|a[b++]<<8;this.ea=a[b++]|a[b++]<<8;this.ga=a[b++]|a[b++]<<8;this.fa=a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24;this.$=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.filename=String.fromCharCode.apply(null,y?a.subarray(b,b+=this.h):a.slice(b,b+=this.h));this.X=y?a.subarray(b,b+=this.g):a.slice(b,b+=this.g);this.v=y?a.subarray(b,b+this.F):a.slice(b,b+this.F);this.length=b-this.offset};function ua(a,b){this.input=a;this.offset=b}var va={N:1,ca:8,da:2048}; + +ua.prototype.parse=function(){var a=this.input,b=this.offset;(a[b++]!==Y[0]||a[b++]!==Y[1]||a[b++]!==Y[2]||a[b++]!==Y[3])&&l(Error("invalid local file header signature"));this.Z=a[b++]|a[b++]<<8;this.I=a[b++]|a[b++]<<8;this.A=a[b++]|a[b++]<<8;this.time=a[b++]|a[b++]<<8;this.U=a[b++]|a[b++]<<8;this.p=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.z=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.J=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.h=a[b++]|a[b++]<<8;this.g=a[b++]|a[b++]<<8;this.filename= + +String.fromCharCode.apply(null,y?a.subarray(b,b+=this.h):a.slice(b,b+=this.h));this.X=y?a.subarray(b,b+=this.g):a.slice(b,b+=this.g);this.length=b-this.offset}; + +function $(a){var b=[],c={},d,f,h,k;if(!a.i){if(a.o===r){var e=a.input,g;if(!a.D)a:{var m=a.input,p;for(p=m.length-12;0>>0;a.o=(e[g++]| + +e[g++]<<8|e[g++]<<16|e[g++]<<24)>>>0;a.w=e[g++]|e[g++]<<8;a.v=y?e.subarray(g,g+a.w):e.slice(g,g+a.w)}d=a.o;h=0;for(k=a.aa;h>>8^C[(n^m[u])&255];for(E=A>>3;E--;u+=8)n=n>>>8^C[(n^m[u])&255],n=n>>>8^C[(n^m[u+1])&255],n=n>>>8^C[(n^m[u+2])&255],n=n>>>8^C[(n^m[u+3])&255],n=n>>>8^C[(n^m[u+4])&255],n=n>>>8^C[(n^m[u+5])&255],n=n>>>8^C[(n^m[u+6])&255],n=n>>>8^C[(n^m[u+7])&255];p=(n^4294967295)>>>0;k.p!==p&&l(Error("wrong crc: file=0x"+ + +k.p.toString(16)+", data=0x"+p.toString(16)))}return m};t.L=function(a){this.j=a};function wa(a,b,c){c^=a.s(b);a.k(b,c);return c}t.k=U.prototype.k;t.S=U.prototype.T;t.s=U.prototype.s;v("Zlib.Unzip",V);v("Zlib.Unzip.prototype.decompress",V.prototype.r);v("Zlib.Unzip.prototype.getFilenames",V.prototype.Y);v("Zlib.Unzip.prototype.setPassword",V.prototype.L);}).call(window); + + + +function requestArrayBuffer(url, success, error) { + + var xhr + + if (window.FormData && window.ArrayBuffer) { + + xhr = new XMLHttpRequest() + + xhr.addEventListener('load', function() { + + var successd = xhr.status >= 200 && xhr.status < 300 || xhr.status === 304; + + if (success&&successd) { + + success(xhr.response) + + } else { + + error(xhr.statusText); + + } + + }) + + xhr.addEventListener('progress',progressSegment) + + xhr.open('GET', url, true); + + xhr.responseType = 'arraybuffer' + + xhr.send(null) + + return xhr; + + } + +} + + + +//return types + +var TYPE_TEXT = 1; + +var TYPE_URL = 2; + +var TYPE_BLOB = 3; + +var TYPE_RAW = 5; + +var TYPE_FILES = 6; + + + +var progressList = {}; + +var progressCb; + +// the map of file extensions and return types + +var DEFAULT_RETURN_OPTIONS = { + + 'css': TYPE_TEXT, + + 'html': TYPE_TEXT, + + 'folder': TYPE_FILES, + +} + + + +// default callbacks if not specified + +var DEFAULT_LOAD_OPTIONS = { + + success: function(e) { + + console.log(e) + + }, + + error: function(e) { + + console.error(e); + + }, + + progress: function(e) { + + console.log('loaded: ' + e * 100 + '%') + + } + +} + + + +// mime map used by blob + +var MIME_MAP = { + + 'js': 'text/javascript', + + 'jpg': 'image/jpeg', + + 'png': 'image/png', + +} + + + +// load entry + +function initLoad(urls, options) { + + + + // overwrite default options + + var loadOption = $.extend({}, DEFAULT_LOAD_OPTIONS, options.loadOptions) + + var success = loadOption.success; + + var error = loadOption.error; + + progressCb = loadOption.progress; + + + + // overwrite default return types + + var returnOption = $.extend({}, DEFAULT_RETURN_OPTIONS, options.returnOptions) + + MIME_MAP = $.extend(MIME_MAP, options.mimeOptions) + + + + // parse Uint8Array based on file extension or specific type + + function getType(name, rawData, type) { + + var fileType = getFileExt(name) + + var returnType = type || returnOption[fileType]; + + switch (returnType) { + + case TYPE_TEXT: + + return Utf8ArrayToStr(rawData); + + break; + + case TYPE_BLOB: + + return getBlob(rawData, MIME_MAP[fileType]) + + break; + + case TYPE_RAW: + + return rawData; + + break; + + case TYPE_URL: + + default: + + return getBlobUrl(rawData, MIME_MAP[fileType]); + + } + + + + } + + + + urls.map(function(v) { + + + + // handle cros problems + + var crosTail = btoa(window.location.origin) + + if (/\#/.test(v)) { + + v = v.split('#')[0] + + } + + if (/\?/.test(v)) { + + crosTail = '&' + crosTail + + } else { + + crosTail = '?' + crosTail + + } + + return v + crosTail; + + }).forEach(function(url) { + + requestArrayBuffer(url,function(data){ + + // wrap arrayBuffer with Uint8Array buffer view + + var bufferView = new Uint8Array(data) + + //record execute start time + + // var now = performance.now() + + //create unzip object + + var unzip = new Zlib.Unzip(bufferView) + + + + //get file names from zip + + var files = unzip.getFilenames() + + + + //parse all files outside folders + + var baseFiles = files.filter(function(v) { + + return !/\/|\\/g.test(v) + + }).reduce(function(pre, cur) { + + var rawData = unzip.decompress(cur); + + pre[cur] = getType(cur, rawData); + + return pre; + + }, {}) + + + + //parse files inside folders, only ONE level of folder tree supported + + var baseFolders = files.filter(function(v) { + + return /^[^\/|\\]+(\/|\\)$/.test(v) + + }).reduce(function(pre, cur) { + + if (returnOption['folder'] == TYPE_FILES) { + + + + // return each file inside the folder based on its type + + pre[cur] = files.filter(function(v) { + + return v != cur && v.indexOf(cur) == 0; + + }).map(function(v) { + + return v.replace(cur, '') + + }).reduce(function(pre, cur2) { + + pre[cur2] = getType(cur2, unzip.decompress(cur + cur2)) + + return pre; + + }, {}) + + } else { + + + + // return all files inside the folder based on a specific type + + var type = returnOption['folder'] + + pre[cur] = files.filter(function(v) { + + return v != cur && v.indexOf(cur) == 0; + + }).map(function(v) { + + return v.replace(cur, '') + + }).reduce(function(pre, cur2) { + + pre[cur2] = getType(cur2, unzip.decompress(cur + cur2), type) + + return pre; + + }, {}) + + } + + return pre; + + }, {}) + + // console.log(baseFiles) + + // console.log(baseFolders) + + success($.extend({}, baseFiles, baseFolders)) + + progressSegment(url,true) + + + + // console.log(performance.now() - now) + + },function(errorText){ + + error(errorText) + + }) + + }) + + + +} + + + +function getFileExt(name) { + + return name.split('.').slice(-1).join('').toLowerCase() + +} + + + +function Utf8ArrayToStr(array) { + + var out, i, len, c; + + var char2, char3; + + + + out = ""; + + len = array.length; + + i = 0; + + while (i < len) { + + c = array[i++]; + + switch (c >> 4) { + + case 0: + + case 1: + + case 2: + + case 3: + + case 4: + + case 5: + + case 6: + + case 7: + + // 0xxxxxxx + + out += String.fromCharCode(c); + + break; + + case 12: + + case 13: + + // 110x xxxx 10xx xxxx + + char2 = array[i++]; + + out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); + + break; + + case 14: + + // 1110 xxxx 10xx xxxx 10xx xxxx + + char2 = array[i++]; + + char3 = array[i++]; + + out += String.fromCharCode(((c & 0x0F) << 12) | + + ((char2 & 0x3F) << 6) | + + ((char3 & 0x3F) << 0)); + + break; + + } + + } + + + + return out; + +} + + + +function getBlob(uit8ary, mime) { + + try { + + var hasBlob = window.Blob + + var hasBlobBuilder = window.BlobBuilder || window.webkieBlobBuilder || window.mozBlobBuilder + + var file + + if (hasBlob) { + + file = new Blob([uit8ary], { type: mime || 'text/plain' }) + + } + + if (!hasBlob && hasBlobBuilder) { + + var builder = new hasBlobBuilder() + + builder.append(uit8ary) + + file = builder.getBlob(mime) + + } + + if (file) { + + return file + + } else { + + return '' + + } + + } catch (e) { + + alert('No Blob API Avilable') + + return '' + + } + +} + + + +function getBlobUrl(uit8ary, mime) { + + try { + + var hasBlob = window.Blob + + var hasBlobBuilder = window.BlobBuilder || window.webkieBlobBuilder || window.mozBlobBuilder + + var file + + if (hasBlob) { + + file = new Blob([uit8ary], { type: mime || 'text/plain' }) + + } + + if (!hasBlob && hasBlobBuilder) { + + var builder = new hasBlobBuilder() + + builder.append(uit8ary) + + file = builder.getBlob() + + } + + if (file) { + + return (URL.createObjectURL || URL.webkitCreateObjectURL)(file) + + } else { + + return '' + + } + + } catch (e) { + + alert('No Blob API or createObjectURL Method Avilable') + + return '' + + } + +} + +function progressSegment(e,isSuccess){ + + if(isSuccess){ + + progressList[e] = { + + total:1, + + loaded:1, + + progress:1 + + } + + return; + + } + + var xhr = e.target; + + var id = xhr.id; + + if(!e.lengthComputable){ + + progressList[id] = { + + total:1, + + loaded:0, + + progress:0 + + } + + return; + + } + + if(progressList[id]){ + + progressList[id].loaded = e.loaded; + + progressList[id].progress = e.loaded / e.total; + + }else{ + + progressList[id] = { + + total:e.total, + + loaded:e.loaded, + + progress:e.loaded / e.total + + } + + } + + + + var total = 0; + + var loaded = 0; + + for(var i in progressList){ + + total += progressList[i].total; + + loaded += progressList[i].loaded; + + } + + progressCb(loaded/total) + +} + + + +/* + +module.exports = { + + TYPE_URL:TYPE_URL, + + TYPE_FILES:TYPE_FILES, + + TYPE_TEXT:TYPE_TEXT, + + TYPE_RAW:TYPE_RAW, + + TYPE_BLOB:TYPE_BLOB, + + initLoad:initLoad + +} + +*/ \ No newline at end of file diff --git a/plugin/toc/katelog.min.js b/plugin/toc/katelog.min.js new file mode 100644 index 0000000..b2fa47a --- /dev/null +++ b/plugin/toc/katelog.min.js @@ -0,0 +1,147 @@ +"use strict"; +var y = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return typeof e +} : function(e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e +}; +! function(e, t) { + "function" == typeof define && define.amd ? define(function() { + return t + }) : "object" === ("undefined" == typeof exports ? "undefined" : y(exports)) ? module.exports = t : e.katelog = t +}(window, function(e) { + function f(e, t) { + return !!e.className && e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)")) + } + + function u(e, t) { + if(f(e, t)) { + var n = new RegExp("(\\s|^)" + t + "(\\s|$)"); + e.className = e.className.replace(n, " ") + } + } + + function t(e) { + for(var t, n = void 0, o = [], i = {}, a = { + id: -1 + }, l = null, r = void 0, c = 0; c < e.length; c++) r = "heading-" + c, i = { + name: e[c].innerText || e[c].textContent, + tagName: n = e[c].tagName, + id: e[c].id = r, + level: (t = n, t ? t.slice(1) : 0), + parent: a + }, l && (d(i.tagName) < d(l.tagName) ? i.parent = l : i.parent = s(i, l)), l = i, o.push(i); + return o + } + + function s(e, t) { + for(var n = t.parent; n && d(e.tagName) >= d(n.tagName);) n = n.parent; + return n || { + id: -1 + } + } + + function d(e) { + var t = 0; + if(e) switch(e.toLowerCase()) { + case "h1": + t = 6; + break; + case "h2": + t = 5; + break; + case "h3": + t = 4; + break; + case "h4": + t = 3; + break; + case "h5": + t = 2; + break; + case "h6": + t = 1 + } + return t + } + + function n(e, t, n) { + e && (e.attachEvent ? (e["e" + t + n] = n, e[t + n] = function() { + e["e" + t + n](window.event) + }, e.attachEvent("on" + t, e[t + n])) : e.addEventListener(t, n, !1)) + } + + function r(e, t) { + var n, o, i = void 0, + a = !1; + if(e) { + i = "
      "; + for(var l = 0; l < e.length; l++) n = e[l].parent, o = t, n && o && "object" === (void 0 === n ? "undefined" : y(n)) && "object" === (void 0 === o ? "undefined" : y(o)) && n.id === o.id && (a = !0, i += '
    • ' + e[l].name + "
      ", i += r(e, e[l]), i += "
    • "); + i += "
    " + } + return a ? i : "" + } + "function" != typeof Object.assign && Object.defineProperty(Object, "assign", { + value: function(e, t) { + if(null == e) throw new TypeError("Cannot convert undefined or null to object"); + for(var n = Object(e), o = 1; o < arguments.length; o++) { + var i = arguments[o]; + if(null != i) + for(var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]) + } + return n + }, + writable: !0, + configurable: !0 + }); + var p = Object.assign({}, { + linkClass: "k-catelog-link", + linkActiveClass: "k-catelog-link-active", + supplyTop: 0, + selector: ["h1", "h2", "h3", "h4", "h5", "h6"], + active: null + }, e), + o = this.contentEl = document.getElementById(p.contentEl), + g = document.getElementById(p.catelogEl), + i = o.querySelectorAll(p.selector.join()), + a = t(i), + l = !1; + g.innerHTML = r(a, { + id: -1 + }); + var c = "\n .k-catelog-list { overflow: hidden !important; }\n .k-catelog-list > ul { position: relative; } \n ", + h = document.createElement("style"); + + function v(e) { + var t, n = g.querySelectorAll("[data-target]"); + t = n, n = Array.prototype.slice.call(t); + for(var o, i, a, l, r = null, c = void 0, s = 0; s < n.length; s++) c = n[s], l = "target", ((a = c).dataset ? a.dataset[l] : a.getAttribute("data-" + l)) === e ? (o = c, i = p.linkActiveClass, f(o, i) || (o.className += " " + i), r = c, g.children[0].offsetHeight > g.offsetHeight && (c.offsetTop > g.offsetHeight / 2 ? g.children[0].offsetHeight - c.offsetTop - c.offsetHeight < g.offsetHeight / 2 ? g.children[0].style.marginTop = -g.children[0].offsetHeight + g.offsetHeight + "px" : g.children[0].style.marginTop = g.offsetHeight / 2 - c.offsetTop + "px" : g.children[0].style.marginTop = "0px")) : u(c, p.linkActiveClass); + "function" == typeof p.active && p.active.call(this, r) + } + + function m(e) { + for(var t = e.offsetTop; e = e.offsetParent;) t += e.offsetTop; + return t + } + h.type = "text/css", h.styleSheet ? h.styleSheet.cssText = c : h.innerHTML = c, document.getElementsByTagName("head")[0].appendChild(h), n(g, "click", function(e) { + var t = (e.target || e.srcElement).getAttribute("data-target"); + if(t) { + var n = document.getElementById(t); + l = !0, window.scrollTo(0, n.offsetTop - p.supplyTop), v(t) + } + }), n(window, "scroll", function(e) { + if(!l) { + for(var t = (document.documentElement.scrollTop || document.body.scrollTop) + p.supplyTop, n = null, o = i.length - 1; 0 <= o; o--) + if(m(i[o]) <= t) { + n = i[o]; + break + } + v(n ? n.id : null) + } + l = !1 + }), this.rebuild = function() { + var e = t(i = o.querySelectorAll(p.selector.join())); + g.innerHTML = r(e, { + id: -1 + }) + } +}); \ No newline at end of file diff --git a/plugin/vibrant/vibrant.js b/plugin/vibrant/vibrant.js new file mode 100644 index 0000000..94f2c5e --- /dev/null +++ b/plugin/vibrant/vibrant.js @@ -0,0 +1,872 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o b) ? 1 : 0); + }, + sum: function(array, f) { + var o = {}; + return array.reduce(f ? function(p, d, i) { + o.index = i; + return p + f.call(o, d); + } : function(p, d) { + return p + d; + }, 0); + }, + max: function(array, f) { + return Math.max.apply(null, f ? pv.map(array, f) : array); + } + } +} + +/** + * Basic Javascript port of the MMCQ (modified median cut quantization) + * algorithm from the Leptonica library (http://www.leptonica.com/). + * Returns a color map you can use to map original pixels to the reduced + * palette. Still a work in progress. + * + * @author Nick Rabinowitz + * @example + +// array of pixels as [R,G,B] arrays +var myPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207] + // etc + ]; +var maxColors = 4; + +var cmap = MMCQ.quantize(myPixels, maxColors); +var newPalette = cmap.palette(); +var newPixels = myPixels.map(function(p) { + return cmap.map(p); +}); + + */ +var MMCQ = (function() { + // private constants + var sigbits = 5, + rshift = 8 - sigbits, + maxIterations = 1000, + fractByPopulations = 0.75; + + // get reduced-space color index for a pixel + + function getColorIndex(r, g, b) { + return (r << (2 * sigbits)) + (g << sigbits) + b; + } + + // Simple priority queue + + function PQueue(comparator) { + var contents = [], + sorted = false; + + function sort() { + contents.sort(comparator); + sorted = true; + } + + return { + push: function(o) { + contents.push(o); + sorted = false; + }, + peek: function(index) { + if (!sorted) sort(); + if (index === undefined) index = contents.length - 1; + return contents[index]; + }, + pop: function() { + if (!sorted) sort(); + return contents.pop(); + }, + size: function() { + return contents.length; + }, + map: function(f) { + return contents.map(f); + }, + debug: function() { + if (!sorted) sort(); + return contents; + } + }; + } + + // 3d color space box + + function VBox(r1, r2, g1, g2, b1, b2, histo) { + var vbox = this; + vbox.r1 = r1; + vbox.r2 = r2; + vbox.g1 = g1; + vbox.g2 = g2; + vbox.b1 = b1; + vbox.b2 = b2; + vbox.histo = histo; + } + VBox.prototype = { + volume: function(force) { + var vbox = this; + if (!vbox._volume || force) { + vbox._volume = ((vbox.r2 - vbox.r1 + 1) * (vbox.g2 - vbox.g1 + 1) * (vbox.b2 - vbox.b1 + 1)); + } + return vbox._volume; + }, + count: function(force) { + var vbox = this, + histo = vbox.histo; + if (!vbox._count_set || force) { + var npix = 0, + i, j, k; + for (i = vbox.r1; i <= vbox.r2; i++) { + for (j = vbox.g1; j <= vbox.g2; j++) { + for (k = vbox.b1; k <= vbox.b2; k++) { + index = getColorIndex(i, j, k); + npix += (histo[index] || 0); + } + } + } + vbox._count = npix; + vbox._count_set = true; + } + return vbox._count; + }, + copy: function() { + var vbox = this; + return new VBox(vbox.r1, vbox.r2, vbox.g1, vbox.g2, vbox.b1, vbox.b2, vbox.histo); + }, + avg: function(force) { + var vbox = this, + histo = vbox.histo; + if (!vbox._avg || force) { + var ntot = 0, + mult = 1 << (8 - sigbits), + rsum = 0, + gsum = 0, + bsum = 0, + hval, + i, j, k, histoindex; + for (i = vbox.r1; i <= vbox.r2; i++) { + for (j = vbox.g1; j <= vbox.g2; j++) { + for (k = vbox.b1; k <= vbox.b2; k++) { + histoindex = getColorIndex(i, j, k); + hval = histo[histoindex] || 0; + ntot += hval; + rsum += (hval * (i + 0.5) * mult); + gsum += (hval * (j + 0.5) * mult); + bsum += (hval * (k + 0.5) * mult); + } + } + } + if (ntot) { + vbox._avg = [~~(rsum / ntot), ~~ (gsum / ntot), ~~ (bsum / ntot)]; + } else { + //console.log('empty box'); + vbox._avg = [~~(mult * (vbox.r1 + vbox.r2 + 1) / 2), ~~ (mult * (vbox.g1 + vbox.g2 + 1) / 2), ~~ (mult * (vbox.b1 + vbox.b2 + 1) / 2)]; + } + } + return vbox._avg; + }, + contains: function(pixel) { + var vbox = this, + rval = pixel[0] >> rshift; + gval = pixel[1] >> rshift; + bval = pixel[2] >> rshift; + return (rval >= vbox.r1 && rval <= vbox.r2 && + gval >= vbox.g1 && gval <= vbox.g2 && + bval >= vbox.b1 && bval <= vbox.b2); + } + }; + + // Color map + + function CMap() { + this.vboxes = new PQueue(function(a, b) { + return pv.naturalOrder( + a.vbox.count() * a.vbox.volume(), + b.vbox.count() * b.vbox.volume() + ) + });; + } + CMap.prototype = { + push: function(vbox) { + this.vboxes.push({ + vbox: vbox, + color: vbox.avg() + }); + }, + palette: function() { + return this.vboxes.map(function(vb) { + return vb.color + }); + }, + size: function() { + return this.vboxes.size(); + }, + map: function(color) { + var vboxes = this.vboxes; + for (var i = 0; i < vboxes.size(); i++) { + if (vboxes.peek(i).vbox.contains(color)) { + return vboxes.peek(i).color; + } + } + return this.nearest(color); + }, + nearest: function(color) { + var vboxes = this.vboxes, + d1, d2, pColor; + for (var i = 0; i < vboxes.size(); i++) { + d2 = Math.sqrt( + Math.pow(color[0] - vboxes.peek(i).color[0], 2) + + Math.pow(color[1] - vboxes.peek(i).color[1], 2) + + Math.pow(color[2] - vboxes.peek(i).color[2], 2) + ); + if (d2 < d1 || d1 === undefined) { + d1 = d2; + pColor = vboxes.peek(i).color; + } + } + return pColor; + }, + forcebw: function() { + // XXX: won't work yet + var vboxes = this.vboxes; + vboxes.sort(function(a, b) { + return pv.naturalOrder(pv.sum(a.color), pv.sum(b.color)) + }); + + // force darkest color to black if everything < 5 + var lowest = vboxes[0].color; + if (lowest[0] < 5 && lowest[1] < 5 && lowest[2] < 5) + vboxes[0].color = [0, 0, 0]; + + // force lightest color to white if everything > 251 + var idx = vboxes.length - 1, + highest = vboxes[idx].color; + if (highest[0] > 251 && highest[1] > 251 && highest[2] > 251) + vboxes[idx].color = [255, 255, 255]; + } + }; + + // histo (1-d array, giving the number of pixels in + // each quantized region of color space), or null on error + + function getHisto(pixels) { + var histosize = 1 << (3 * sigbits), + histo = new Array(histosize), + index, rval, gval, bval; + pixels.forEach(function(pixel) { + rval = pixel[0] >> rshift; + gval = pixel[1] >> rshift; + bval = pixel[2] >> rshift; + index = getColorIndex(rval, gval, bval); + histo[index] = (histo[index] || 0) + 1; + }); + return histo; + } + + function vboxFromPixels(pixels, histo) { + var rmin = 1000000, + rmax = 0, + gmin = 1000000, + gmax = 0, + bmin = 1000000, + bmax = 0, + rval, gval, bval; + // find min/max + pixels.forEach(function(pixel) { + rval = pixel[0] >> rshift; + gval = pixel[1] >> rshift; + bval = pixel[2] >> rshift; + if (rval < rmin) rmin = rval; + else if (rval > rmax) rmax = rval; + if (gval < gmin) gmin = gval; + else if (gval > gmax) gmax = gval; + if (bval < bmin) bmin = bval; + else if (bval > bmax) bmax = bval; + }); + return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, histo); + } + + function medianCutApply(histo, vbox) { + if (!vbox.count()) return; + + var rw = vbox.r2 - vbox.r1 + 1, + gw = vbox.g2 - vbox.g1 + 1, + bw = vbox.b2 - vbox.b1 + 1, + maxw = pv.max([rw, gw, bw]); + // only one pixel, no split + if (vbox.count() == 1) { + return [vbox.copy()] + } + /* Find the partial sum arrays along the selected axis. */ + var total = 0, + partialsum = [], + lookaheadsum = [], + i, j, k, sum, index; + if (maxw == rw) { + for (i = vbox.r1; i <= vbox.r2; i++) { + sum = 0; + for (j = vbox.g1; j <= vbox.g2; j++) { + for (k = vbox.b1; k <= vbox.b2; k++) { + index = getColorIndex(i, j, k); + sum += (histo[index] || 0); + } + } + total += sum; + partialsum[i] = total; + } + } else if (maxw == gw) { + for (i = vbox.g1; i <= vbox.g2; i++) { + sum = 0; + for (j = vbox.r1; j <= vbox.r2; j++) { + for (k = vbox.b1; k <= vbox.b2; k++) { + index = getColorIndex(j, i, k); + sum += (histo[index] || 0); + } + } + total += sum; + partialsum[i] = total; + } + } else { /* maxw == bw */ + for (i = vbox.b1; i <= vbox.b2; i++) { + sum = 0; + for (j = vbox.r1; j <= vbox.r2; j++) { + for (k = vbox.g1; k <= vbox.g2; k++) { + index = getColorIndex(j, k, i); + sum += (histo[index] || 0); + } + } + total += sum; + partialsum[i] = total; + } + } + partialsum.forEach(function(d, i) { + lookaheadsum[i] = total - d + }); + + function doCut(color) { + var dim1 = color + '1', + dim2 = color + '2', + left, right, vbox1, vbox2, d2, count2 = 0; + for (i = vbox[dim1]; i <= vbox[dim2]; i++) { + if (partialsum[i] > total / 2) { + vbox1 = vbox.copy(); + vbox2 = vbox.copy(); + left = i - vbox[dim1]; + right = vbox[dim2] - i; + if (left <= right) + d2 = Math.min(vbox[dim2] - 1, ~~ (i + right / 2)); + else d2 = Math.max(vbox[dim1], ~~ (i - 1 - left / 2)); + // avoid 0-count boxes + while (!partialsum[d2]) d2++; + count2 = lookaheadsum[d2]; + while (!count2 && partialsum[d2 - 1]) count2 = lookaheadsum[--d2]; + // set dimensions + vbox1[dim2] = d2; + vbox2[dim1] = vbox1[dim2] + 1; + // console.log('vbox counts:', vbox.count(), vbox1.count(), vbox2.count()); + return [vbox1, vbox2]; + } + } + + } + // determine the cut planes + return maxw == rw ? doCut('r') : + maxw == gw ? doCut('g') : + doCut('b'); + } + + function quantize(pixels, maxcolors) { + // short-circuit + if (!pixels.length || maxcolors < 2 || maxcolors > 256) { + // console.log('wrong number of maxcolors'); + return false; + } + + // XXX: check color content and convert to grayscale if insufficient + + var histo = getHisto(pixels), + histosize = 1 << (3 * sigbits); + + // check that we aren't below maxcolors already + var nColors = 0; + histo.forEach(function() { + nColors++ + }); + if (nColors <= maxcolors) { + // XXX: generate the new colors from the histo and return + } + + // get the beginning vbox from the colors + var vbox = vboxFromPixels(pixels, histo), + pq = new PQueue(function(a, b) { + return pv.naturalOrder(a.count(), b.count()) + }); + pq.push(vbox); + + // inner function to do the iteration + + function iter(lh, target) { + var ncolors = 1, + niters = 0, + vbox; + while (niters < maxIterations) { + vbox = lh.pop(); + if (!vbox.count()) { /* just put it back */ + lh.push(vbox); + niters++; + continue; + } + // do the cut + var vboxes = medianCutApply(histo, vbox), + vbox1 = vboxes[0], + vbox2 = vboxes[1]; + + if (!vbox1) { + // console.log("vbox1 not defined; shouldn't happen!"); + return; + } + lh.push(vbox1); + if (vbox2) { /* vbox2 can be null */ + lh.push(vbox2); + ncolors++; + } + if (ncolors >= target) return; + if (niters++ > maxIterations) { + // console.log("infinite loop; perhaps too few pixels!"); + return; + } + } + } + + // first set of colors, sorted by population + iter(pq, fractByPopulations * maxcolors); + // console.log(pq.size(), pq.debug().length, pq.debug().slice()); + + // Re-sort by the product of pixel occupancy times the size in color space. + var pq2 = new PQueue(function(a, b) { + return pv.naturalOrder(a.count() * a.volume(), b.count() * b.volume()) + }); + while (pq.size()) { + pq2.push(pq.pop()); + } + + // next set - generate the median cuts using the (npix * vol) sorting. + iter(pq2, maxcolors - pq2.size()); + + // calculate the actual colors + var cmap = new CMap(); + while (pq2.size()) { + cmap.push(pq2.pop()); + } + + return cmap; + } + + return { + quantize: quantize + } +})(); + +module.exports = MMCQ.quantize + +},{}],2:[function(require,module,exports){ + +/* + Vibrant.js + by Jari Zwarts + + Color algorithm class that finds variations on colors in an image. + + Credits + -------- + Lokesh Dhakar (http://www.lokeshdhakar.com) - Created ColorThief + Google - Palette support library in Android + */ + +(function() { + var CanvasImage, Swatch, Vibrant, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + slice = [].slice; + + window.Swatch = Swatch = (function() { + Swatch.prototype.hsl = void 0; + + Swatch.prototype.rgb = void 0; + + Swatch.prototype.population = 1; + + Swatch.yiq = 0; + + function Swatch(rgb, population) { + this.rgb = rgb; + this.population = population; + } + + Swatch.prototype.getHsl = function() { + if (!this.hsl) { + return this.hsl = Vibrant.rgbToHsl(this.rgb[0], this.rgb[1], this.rgb[2]); + } else { + return this.hsl; + } + }; + + Swatch.prototype.getPopulation = function() { + return this.population; + }; + + Swatch.prototype.getRgb = function() { + return this.rgb; + }; + + Swatch.prototype.getHex = function() { + return "#" + ((1 << 24) + (this.rgb[0] << 16) + (this.rgb[1] << 8) + this.rgb[2]).toString(16).slice(1, 7); + }; + + Swatch.prototype.getTitleTextColor = function() { + this._ensureTextColors(); + if (this.yiq < 200) { + return "#fff"; + } else { + return "#000"; + } + }; + + Swatch.prototype.getBodyTextColor = function() { + this._ensureTextColors(); + if (this.yiq < 150) { + return "#fff"; + } else { + return "#000"; + } + }; + + Swatch.prototype._ensureTextColors = function() { + if (!this.yiq) { + return this.yiq = (this.rgb[0] * 299 + this.rgb[1] * 587 + this.rgb[2] * 114) / 1000; + } + }; + + return Swatch; + + })(); + + window.Vibrant = Vibrant = (function() { + Vibrant.prototype.quantize = require('quantize'); + + Vibrant.prototype._swatches = []; + + Vibrant.prototype.TARGET_DARK_LUMA = 0.26; + + Vibrant.prototype.MAX_DARK_LUMA = 0.45; + + Vibrant.prototype.MIN_LIGHT_LUMA = 0.55; + + Vibrant.prototype.TARGET_LIGHT_LUMA = 0.74; + + Vibrant.prototype.MIN_NORMAL_LUMA = 0.3; + + Vibrant.prototype.TARGET_NORMAL_LUMA = 0.5; + + Vibrant.prototype.MAX_NORMAL_LUMA = 0.7; + + Vibrant.prototype.TARGET_MUTED_SATURATION = 0.3; + + Vibrant.prototype.MAX_MUTED_SATURATION = 0.4; + + Vibrant.prototype.TARGET_VIBRANT_SATURATION = 1; + + Vibrant.prototype.MIN_VIBRANT_SATURATION = 0.35; + + Vibrant.prototype.WEIGHT_SATURATION = 3; + + Vibrant.prototype.WEIGHT_LUMA = 6; + + Vibrant.prototype.WEIGHT_POPULATION = 1; + + Vibrant.prototype.VibrantSwatch = void 0; + + Vibrant.prototype.MutedSwatch = void 0; + + Vibrant.prototype.DarkVibrantSwatch = void 0; + + Vibrant.prototype.DarkMutedSwatch = void 0; + + Vibrant.prototype.LightVibrantSwatch = void 0; + + Vibrant.prototype.LightMutedSwatch = void 0; + + Vibrant.prototype.HighestPopulation = 0; + + function Vibrant(sourceImage, colorCount, quality) { + this.swatches = bind(this.swatches, this); + var a, allPixels, b, cmap, g, i, image, imageData, offset, pixelCount, pixels, r; + if (typeof colorCount === 'undefined') { + colorCount = 64; + } + if (typeof quality === 'undefined') { + quality = 5; + } + image = new CanvasImage(sourceImage); + imageData = image.getImageData(); + pixels = imageData.data; + pixelCount = image.getPixelCount(); + allPixels = []; + i = 0; + while (i < pixelCount) { + offset = i * 4; + r = pixels[offset + 0]; + g = pixels[offset + 1]; + b = pixels[offset + 2]; + a = pixels[offset + 3]; + if (a >= 125) { + if (!(r > 250 && g > 250 && b > 250)) { + allPixels.push([r, g, b]); + } + } + i = i + quality; + } + cmap = this.quantize(allPixels, colorCount); + this._swatches = cmap.vboxes.map((function(_this) { + return function(vbox) { + return new Swatch(vbox.color, vbox.vbox.count()); + }; + })(this)); + this.maxPopulation = this.findMaxPopulation; + this.generateVarationColors(); + this.generateEmptySwatches(); + image.removeCanvas(); + } + + Vibrant.prototype.generateVarationColors = function() { + this.VibrantSwatch = this.findColorVariation(this.TARGET_NORMAL_LUMA, this.MIN_NORMAL_LUMA, this.MAX_NORMAL_LUMA, this.TARGET_VIBRANT_SATURATION, this.MIN_VIBRANT_SATURATION, 1); + this.LightVibrantSwatch = this.findColorVariation(this.TARGET_LIGHT_LUMA, this.MIN_LIGHT_LUMA, 1, this.TARGET_VIBRANT_SATURATION, this.MIN_VIBRANT_SATURATION, 1); + this.DarkVibrantSwatch = this.findColorVariation(this.TARGET_DARK_LUMA, 0, this.MAX_DARK_LUMA, this.TARGET_VIBRANT_SATURATION, this.MIN_VIBRANT_SATURATION, 1); + this.MutedSwatch = this.findColorVariation(this.TARGET_NORMAL_LUMA, this.MIN_NORMAL_LUMA, this.MAX_NORMAL_LUMA, this.TARGET_MUTED_SATURATION, 0, this.MAX_MUTED_SATURATION); + this.LightMutedSwatch = this.findColorVariation(this.TARGET_LIGHT_LUMA, this.MIN_LIGHT_LUMA, 1, this.TARGET_MUTED_SATURATION, 0, this.MAX_MUTED_SATURATION); + return this.DarkMutedSwatch = this.findColorVariation(this.TARGET_DARK_LUMA, 0, this.MAX_DARK_LUMA, this.TARGET_MUTED_SATURATION, 0, this.MAX_MUTED_SATURATION); + }; + + Vibrant.prototype.generateEmptySwatches = function() { + var hsl; + if (this.VibrantSwatch === void 0) { + if (this.DarkVibrantSwatch !== void 0) { + hsl = this.DarkVibrantSwatch.getHsl(); + hsl[2] = this.TARGET_NORMAL_LUMA; + this.VibrantSwatch = new Swatch(Vibrant.hslToRgb(hsl[0], hsl[1], hsl[2]), 0); + } + } + if (this.DarkVibrantSwatch === void 0) { + if (this.VibrantSwatch !== void 0) { + hsl = this.VibrantSwatch.getHsl(); + hsl[2] = this.TARGET_DARK_LUMA; + return this.DarkVibrantSwatch = new Swatch(Vibrant.hslToRgb(hsl[0], hsl[1], hsl[2]), 0); + } + } + }; + + Vibrant.prototype.findMaxPopulation = function() { + var j, len, population, ref, swatch; + population = 0; + ref = this._swatches; + for (j = 0, len = ref.length; j < len; j++) { + swatch = ref[j]; + population = Math.max(population, swatch.getPopulation()); + } + return population; + }; + + Vibrant.prototype.findColorVariation = function(targetLuma, minLuma, maxLuma, targetSaturation, minSaturation, maxSaturation) { + var j, len, luma, max, maxValue, ref, sat, swatch, value; + max = void 0; + maxValue = 0; + ref = this._swatches; + for (j = 0, len = ref.length; j < len; j++) { + swatch = ref[j]; + sat = swatch.getHsl()[1]; + luma = swatch.getHsl()[2]; + if (sat >= minSaturation && sat <= maxSaturation && luma >= minLuma && luma <= maxLuma && !this.isAlreadySelected(swatch)) { + value = this.createComparisonValue(sat, targetSaturation, luma, targetLuma, swatch.getPopulation(), this.HighestPopulation); + if (max === void 0 || value > maxValue) { + max = swatch; + maxValue = value; + } + } + } + return max; + }; + + Vibrant.prototype.createComparisonValue = function(saturation, targetSaturation, luma, targetLuma, population, maxPopulation) { + return this.weightedMean(this.invertDiff(saturation, targetSaturation), this.WEIGHT_SATURATION, this.invertDiff(luma, targetLuma), this.WEIGHT_LUMA, population / maxPopulation, this.WEIGHT_POPULATION); + }; + + Vibrant.prototype.invertDiff = function(value, targetValue) { + return 1 - Math.abs(value - targetValue); + }; + + Vibrant.prototype.weightedMean = function() { + var i, sum, sumWeight, value, values, weight; + values = 1 <= arguments.length ? slice.call(arguments, 0) : []; + sum = 0; + sumWeight = 0; + i = 0; + while (i < values.length) { + value = values[i]; + weight = values[i + 1]; + sum += value * weight; + sumWeight += weight; + i += 2; + } + return sum / sumWeight; + }; + + Vibrant.prototype.swatches = function() { + return { + Vibrant: this.VibrantSwatch, + Muted: this.MutedSwatch, + DarkVibrant: this.DarkVibrantSwatch, + DarkMuted: this.DarkMutedSwatch, + LightVibrant: this.LightVibrantSwatch, + LightMuted: this.LightMuted + }; + }; + + Vibrant.prototype.isAlreadySelected = function(swatch) { + return this.VibrantSwatch === swatch || this.DarkVibrantSwatch === swatch || this.LightVibrantSwatch === swatch || this.MutedSwatch === swatch || this.DarkMutedSwatch === swatch || this.LightMutedSwatch === swatch; + }; + + Vibrant.rgbToHsl = function(r, g, b) { + var d, h, l, max, min, s; + r /= 255; + g /= 255; + b /= 255; + max = Math.max(r, g, b); + min = Math.min(r, g, b); + h = void 0; + s = void 0; + l = (max + min) / 2; + if (max === min) { + h = s = 0; + } else { + d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch (max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + case g: + h = (b - r) / d + 2; + break; + case b: + h = (r - g) / d + 4; + } + h /= 6; + } + return [h, s, l]; + }; + + Vibrant.hslToRgb = function(h, s, l) { + var b, g, hue2rgb, p, q, r; + r = void 0; + g = void 0; + b = void 0; + hue2rgb = function(p, q, t) { + if (t < 0) { + t += 1; + } + if (t > 1) { + t -= 1; + } + if (t < 1 / 6) { + return p + (q - p) * 6 * t; + } + if (t < 1 / 2) { + return q; + } + if (t < 2 / 3) { + return p + (q - p) * (2 / 3 - t) * 6; + } + return p; + }; + if (s === 0) { + r = g = b = l; + } else { + q = l < 0.5 ? l * (1 + s) : l + s - (l * s); + p = 2 * l - q; + r = hue2rgb(p, q, h + 1 / 3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - (1 / 3)); + } + return [r * 255, g * 255, b * 255]; + }; + + return Vibrant; + + })(); + + + /* + CanvasImage Class + Class that wraps the html image element and canvas. + It also simplifies some of the canvas context manipulation + with a set of helper functions. + Stolen from https://github.com/lokesh/color-thief + */ + + window.CanvasImage = CanvasImage = (function() { + function CanvasImage(image) { + this.canvas = document.createElement('canvas'); + this.context = this.canvas.getContext('2d'); + document.body.appendChild(this.canvas); + this.width = this.canvas.width = image.width; + this.height = this.canvas.height = image.height; + this.context.drawImage(image, 0, 0, this.width, this.height); + } + + CanvasImage.prototype.clear = function() { + return this.context.clearRect(0, 0, this.width, this.height); + }; + + CanvasImage.prototype.update = function(imageData) { + return this.context.putImageData(imageData, 0, 0); + }; + + CanvasImage.prototype.getPixelCount = function() { + return this.width * this.height; + }; + + CanvasImage.prototype.getImageData = function() { + return this.context.getImageData(0, 0, this.width, this.height); + }; + + CanvasImage.prototype.removeCanvas = function() { + return this.canvas.parentNode.removeChild(this.canvas); + }; + + return CanvasImage; + + })(); + +}).call(this); + +},{"quantize":1}]},{},[2]); diff --git a/tags/index.html b/tags/index.html new file mode 100644 index 0000000..d3857c3 --- /dev/null +++ b/tags/index.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + tags | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +
    + + + +
    +
    + +
    + + + +
    + + +
    + +

    + +
    + + + +
    +
    + + + + + + + +
    + +
    +
    + +
    + + + + Total 3 ge tag + + + +
    + + + + + + +
    + + + +
    +
    +
    +
    + +
    + +
    + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/tags/\345\255\227\344\275\223\347\257\207\351\227\256\351\242\230/index.html" "b/tags/\345\255\227\344\275\223\347\257\207\351\227\256\351\242\230/index.html" new file mode 100644 index 0000000..fdd0134 --- /dev/null +++ "b/tags/\345\255\227\344\275\223\347\257\207\351\227\256\351\242\230/index.html" @@ -0,0 +1,525 @@ + + + + + + + + + + + + tag: 字体篇问题 | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +
    + + + +
    +
    + +
    + + + +
    + + +
    + +

    + +
    + + + +
    +
    + + + + + + + +
    + +
    +
    + + + + + + 字体篇问题 1 pian + + + +
    + + + + + + + + + + + + + + +
    +
    + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/tags/\346\212\200\345\267\247/index.html" "b/tags/\346\212\200\345\267\247/index.html" new file mode 100644 index 0000000..ef7d00a --- /dev/null +++ "b/tags/\346\212\200\345\267\247/index.html" @@ -0,0 +1,547 @@ + + + + + + + + + + + + tag: 技巧 | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +
    + + + +
    +
    + +
    + + + +
    + + +
    + +

    + +
    + + + +
    +
    + + + + + + + +
    + +
    +
    + + + + + + 技巧 2 pian + + + +
    + + + + + + + + + + + + + + +
    +
    + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/tags/\347\247\273\345\212\250\347\253\257\351\227\256\351\242\230/index.html" "b/tags/\347\247\273\345\212\250\347\253\257\351\227\256\351\242\230/index.html" new file mode 100644 index 0000000..ce8a9eb --- /dev/null +++ "b/tags/\347\247\273\345\212\250\347\253\257\351\227\256\351\242\230/index.html" @@ -0,0 +1,525 @@ + + + + + + + + + + + + tag: 移动端问题 | 向着光亮的地方 + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +
    + + + +
    +
    + +
    + + + +
    + + +
    + +

    + +
    + + + +
    +
    + + + + + + + +
    + +
    +
    + + + + + + 移动端问题 1 pian + + + +
    + + + + + + + + + + + + + + +
    +
    + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file