diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e700cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +Thumbs.db +db.json +*.log +node_modules/ +public/ +.deploy*/ +image/ \ No newline at end of file diff --git a/2019/12/Hi-Im-Cortana/index.html b/2019/12/Hi-Im-Cortana/index.html deleted file mode 100644 index 5f2b4ff..0000000 --- a/2019/12/Hi-Im-Cortana/index.html +++ /dev/null @@ -1,632 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hi, I'm Cortana. | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- Hi, I'm Cortana. -

- - -
- - - - -
- - -

2020即将来临了,作为群贫困人口,在2019年再来看各位群友最后一面

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/2020gaokaojiayou/index.html b/2020/02/2020gaokaojiayou/index.html deleted file mode 100644 index 13da33b..0000000 --- a/2020/02/2020gaokaojiayou/index.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2020 高考加油 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 2020 高考加油 -

- - -
- - - - -
- - -

2020-02-28,距离 2020高考还有100天。

- - - - - - - - -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/access-google-from-nothing/index.html b/2020/02/access-google-from-nothing/index.html deleted file mode 100644 index 4113c2e..0000000 --- a/2020/02/access-google-from-nothing/index.html +++ /dev/null @@ -1,754 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 无中生有访问 Google | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 无中生有访问 Google -

- - -
- - - - -
- - -

由于众所周知的原因,[数据删除] 。并且在搜索引擎方面,Google 也是搜索知识的一个优秀工具。

-

关于搜索引擎之间的瓜葛,Baidu、Bing、Google 究竟谁优谁劣,以后我有空的话再来谈这个话题,欢迎和我 issue 交流。

-

今天就来介绍一下如何“无中生有访问 Google”。

-

一个“不存在的” chrome 插件

能访问 Google,当然是多亏了一个插件,名字叫做“谷歌上网助手”,它大概长这个样子:

-

image-20191113170312

-

可以在 Google 网上应用点搜索到,然后点击“添加至Chrome”按钮就可以添加插件了

-

https://chrome.google.com/webstore/detail/谷歌上网助手/nonmafimegllfoonjgplbabhmgfanaka

-

它的介绍文字是:

-
-

专门为科研、外贸、跨境电商、海淘人员、开发人员服务的上网加速工具,chrome内核浏览器专用!可以解决chrome扩展无法自动更新的问题,同时可>以访问谷歌google搜索,gmail邮箱,google+等谷歌产品

-

简单易用的《谷歌上网助手》,可以解决chrome扩展无法自动更新的问题,同时可以访问谷歌google搜索,gmail邮箱,google+等谷歌服务。

-

《谷歌上网助手》一键安装,无需其他配置,即可访问谷歌。

-

使用本插件可以免费上:

-
    -
  • google.com 谷歌搜索
  • -
  • mail.google.com gmail邮箱
  • -
  • chrome商店访问
  • -
-
-

当然,以上链接是不存在的。

-

无中生有?

chrome 的插件是一个后缀名为 .crx 的文件,文件结构与 zip 相同,这意味着,你可以用压缩软件打开 .crx 文件。

-

我们有了 crx 文件,就可以添加到 chrome 浏览器了。

-

从哪儿去得到 crx 文件?从 Google 应用商店。当然,Google 应用商店是不存在的。

-

更新:插件官网也可以下载,快速下载方式请直接翻到文尾“#写在后面”部分,再从此处继续阅读。

-

这里介绍一个网站,可以看作 Google应用商店翻版,也就是镜像站。https://www.gugeapps.net/

-

我的网站也提供了一个副本(划掉)谷歌上网助手.zip ,如果添加 chrome 失败请转至下面方法下载,

-

bing 搜索 gugeapps.net,第一个链接是 www.gugeapps.net 就是了

-

打开是长这个样子的:

-

image-20191114102230

-

我们可以在这里的搜索框搜索谷歌上网助手,回车搜索,或者在 bing 搜索 谷歌上网助手 site:gugeapps.net 第一个就是对应的页面了。

-

image-20191114102822

-

这里不能直接安装到 chrome ,点击下载按钮,转到页面底端开始下载。

-

下载完成后会出现红色提示,保留就可以了
image-20191114102910

-

Ps:最新的下载下来好像后缀名是 zip ,不过不影响后续操作。

-

然后在文件夹中打开,可以看到文件夹里面有个 .crx 文件了

-

image-20191114103010

-

导入

一般来说,crx 可以直接拖入 chrome 的扩展程序页面,会提示是否添加插件,确定添加就可以添加,不过,对于自己下载的插件,大多数是不行的,会提示“程序包无效”,

-

image-20191114103110

-

不能导入?

这里需要通过 chrome 的开发者模式,添加插件。

-

首先打开 chrome 的扩展程序页面:chrome://extensions ,开启页面右上方的“开发者模式”开关。

-

然后点左边的“加载已解压的扩展程序”

-

image-20191114103117

-

切换到刚才的下载文件夹,复制一份 crx 文件,后缀名改为 zip ,随后解压到压缩文件同名文件夹。

-

如果看不到后缀名,在查看这里把文件扩展名选项勾选。

-

image-20191114103616

-

切换到 chrome 的选择文件夹窗口,打开刚才的文件夹,可以看到文件夹里面的结构是

-
1
2
3
_locales
_metadata
assets
- -

然后添加文件夹。

-

image-20191114103357

-

回到 chrome ,就可以看到新插件添加成功,

-

可以看到有提示错误,但是可以用,

-

可以看到, chrome 右上方增加了一个插件的图标了

-

同时可以看到图标下面有一个标志,鼠标悬浮提示:“未封装的扩展程序”。

-

另外,如果关闭 chrome 再打开,会提示移除插件,所以正常使用起来的话,还是有一些麻烦的

-

image-20191114104215

-

点击右上角图标,会弹出插件菜单,首次需要注册登录,在登录页面找到新用户注册,填入邮箱和新账户密码注册

-

image-20191114104439

-

然后进入插件 控制面板 ,有红色提示“邮箱未激活”,此时前往邮箱,点击新收到的邮件激活账户即可

-

image-20191114104528

-

再点开插件菜单,把开关打开即可

-image-20191114104755 - -

然后 www.google.com 可以访问了。

-

image-20191114104855

-

后续操作

关闭浏览器再打开就会提示“请停用以开发者模式添加的插件”,影响使用,所以需要再“操作”一下

-

Ps:如果没有注册登录插件,现在的新版浏览器是直接移除插件,影响使用,所以需要再“操作”一下

-

image-20200213214020573

-

这个提示框每次打开 chrome 都会弹出,极其 讨厌。

-

我们可以通过:从 Google 应用商店安装正规插件,的方式,替换这个插件,就不会再提示辣

-

打开 Google网上应用店 https://chrome.google.com/webstore/category/extensions

-

搜索 谷歌上网助手 ,找到第一个就是正规插件(开发版也可以用),点“添加至 chrome”按钮就可以添加,点添加扩展程序 按钮

-

image-20200213214703542

-

接着我们可以看到 chrome 左下方出现了一个 crx 下载进度条,但是这个下载完之后并不会提示下载完成,会自动消失(在下载记录也不会留下记录),而是自动安装

-

image-20200213214909741

-

然后会看到页面里面“谷歌上网助手”变成了“已添加”,“添加至chrome”变成了“评分”,就是安装完成了

-

image-20200213215254798

-

然后需要删除旧插件,打开插件管理页面,chrome://extensions/

-

也可以在右上角插件图标处鼠标右键,管理扩展程序,然后返回按钮

-

找到刚才提示“未封装的扩展程序”的插件,删除,

-

image-20200213215852988

-

点击右上角新安装的插件的图标,弹出登陆页面,进去再用刚注册的账号登陆一次就可以了

-

至此,全部安装完成!

-

写在后面

插件官网:http://googlehelper.net/ ,也可以在这里下载 zip 然后按上述方法导入

-

image-20200213221452052

-

点击 download ,下载此网站最新插件压缩包,也可以下载我保存的副本, Ghelper2.0.4.all.zip

-

压缩包解压之后可以看到:

-
1
2
3
ghelper_source
Ghelper2.0.5.crx
中国大陆安装方法.txt
- -

其中 ghelper_source 和上文提到的解压后文件夹是一样的,

-

其中的 crx 文件可以用于直接拖拽导入插件(2020/02/13测试这个crx可以直接导入没有问题)

-

点击此处回到 “无中生有?” 部分继续阅读

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/getting-start-52pojie/index.html b/2020/02/getting-start-52pojie/index.html deleted file mode 100644 index 4134754..0000000 --- a/2020/02/getting-start-52pojie/index.html +++ /dev/null @@ -1,788 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 吾爱破解入门帖子 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 吾爱破解入门帖子 -

- - -
- - - - -
- - -

今日探索吾爱破解论坛,整理了两篇入门指导文章,当备忘录了

-

内容来自:吾爱破解 论坛

-
-

吾爱破解论坛官方入门教学培训第一期开始啦!【已更新到第十课】

培训课表–讲师:

《吾爱破解培训第一课:破解基础知识之介绍常见工具和壳的特征》

-

讲师:Hmily,链接:http://www.52pojie.cn/thread-378612-1-1.html

-

《吾爱破解培训第二课:实战去广告、弹窗及主页锁定》

-

讲师:Kido,链接:http://www.52pojie.cn/thread-384195-1-1.html

-

《吾爱破解培训第三课:改头换面之修改版权和资源》

-

讲师:Kido,链接:http://www.52pojie.cn/thread-389996-1-1.html

-

《吾爱破解培训第四课:击破程序最坚固的堡垒–实战去程序自校验》

-

讲师:小生我怕怕,链接:http://www.52pojie.cn/thread-392395-1-1.html

-

《吾爱破解培训第五课:反击作者的挑衅–实战解除程序重启验证》

-

讲师:我是用户,链接:http://www.52pojie.cn/thread-396068-1-1.html

-

《吾爱破解培训第六课:潜伏在程序身边的黑影–实战给程序补丁》

-

讲师:我是用户,链接:http://www.52pojie.cn/thread-405758-1-1.html

-

《吾爱破解培训第七课:手把手教你从实例看如何攻破常见的网络验证》

-

讲师:珈蓝夜雨,链接:http://www.52pojie.cn/thread-408475-1-1.html

-

《吾爱破解培训第八课:短兵相接–深入浅出探讨脱壳细节(上)》

-

讲师:L4Nce,链接:http://www.52pojie.cn/thread-411104-1-1.html

-

《吾爱破解培训第九课:短兵相接–深入浅出探讨脱壳细节(下)》

-

讲师:L4Nce,链接:http://www.52pojie.cn/thread-411104-1-1.html

-

《吾爱破解培训第十课:探寻逆向新航标—x64平台脱壳与破解实战》

-

讲师:Kido,链接:http://www.52pojie.cn/thread-422192-1-1.html

-

视频下载:

-

360云盘下载:
https://yunpan.360.cn/surl_y3GCKpiI2fX 提取码:7693

-

百度网盘下载:
链接: https://pan.baidu.com/s/1z9WQeYgUGxcurVD2lKfNeg 提取码: e2su

-

爱盘下载:
http://down.52pojie.cn/吾爱破解视频教程/吾爱破解论坛官方入门教学培训第一期/

-
-
-

解压密码(请使用新版7z解压缩):
www.52pojie.cn

-
-
- -
- -
- -
- -
- -
- -
- -
- -

零基础新手破解学习指导教程

吾爱破解论坛官方入门培训:http://www.52pojie.cn/thread-349073-1-1.html
整理一些论坛脱壳破解相关入门教程及需要用到的相关工具,方便新手同学查看学习

-

工欲善其事必先利其器,下面是破解需要用到的工具

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OllyDbg(OD):http://www.52pojie.cn/thread-350397-1-1.html
PEIDhttp://www.52pojie.cn/thread-170387-1-1.html
Exeinfo PEhttp://www.52pojie.cn/thread-169779-1-1.html
樱花补丁制作工具:http://www.52pojie.cn/thread-62307-1-1.html
内存补丁生成器:http://www.52pojie.cn/thread-162411-1-1.html
注册机生成器:http://www.52pojie.cn/thread-159470-1-1.html
IDA Pro v6.5:http://www.52pojie.cn/thread-284145-1-1.html
破解工具包http://www.52pojie.cn/thread-190698-1-1.html
吾爱云盘【最牛逼的在线工具包】:http://down.52pojie.cn/Tools/
-

也可以点击下面的连接进去逆向资源区寻找工具哦

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Android | Tools安卓程序逆向所用到的相关工具
Debuggers动态调试工具
Disassemblers反编译工具(静态分析为主)
PEtoolsPE文件分析相关工具
Packers给程序加壳相关工具
Patchers给程序做补丁相关工具
Editors程序资源编辑、文本操作相关工具
Crptography算法相关工具
Unpackers脱壳机相关
Dongle加密狗相关
.NET微软.Net程序逆向相关工具
OllyDbg | 1.x | Plugin动态调试工具OllyDbg | 1.x的插件程序
OllyDbg | 2.x | Plugin动态调试工具OllyDbg | 2.x的插件程序
IDA | Plugin反编译工具IDA的插件程序
Other其他相关程序
-

NO.1

Hmily 【初学者教程】破解基础知识之认识壳与程序的特征。
新手一看教程就在说程序破解应该先脱壳,那到底程序有没有加壳?加了什么壳?看看大H的文章你就懂了!
http://www.52pojie.cn/thread-234739-1-1.html

-

NO.2

ximo 脱壳教程(24集全)
http://pan.baidu.com/s/1cebVOU 密码: fxia
http://down.52pojie.cn/吾爱破解视频教程/ximo脱壳基础.7z
来自吾爱破解论坛LCG组织成员也是VMP脱壳插件作者ximo做的脱壳教程,堪称经典,入门脱壳必学!
压缩包为7Z格式,7Z官方网站

-

NO.3

小生我怕怕 脱壳练习系列附带对应文章的动画视频教程,方便学习交流脱壳知识。
教程对应动画视频:http://www.52pojie.cn/thread-11642-1-1.html

-

[编者注]:视频爱盘下载地址:https://down.52pojie.cn/吾爱破解视频教程/吾爱破解脱壳练习系列动画/

-

吾爱专题脱壳练习一—-压缩壳练习之一:http://www.52pojie.cn/thread-10496-1-1.html
吾爱专题脱壳练习二—-压缩壳练习之二:http://www.52pojie.cn/thread-10607-1-1.html
吾爱专题脱壳练习三—-压缩壳练习之三:http://www.52pojie.cn/thread-10688-1-1.html
吾爱破解脱壳练习四——简单加密壳:http://www.52pojie.cn/thread-10850-1-1.html
吾爱专题脱壳练习五—-upx壳:http://www.52pojie.cn/thread-10990-1-1.html
吾爱专题脱壳练习六—-TElock V0.99 :http://www.52pojie.cn/thread-11112-1-1.html
吾爱专题脱壳练习七—-ORiEN:http://www.52pojie.cn/thread-11244-1-1.html
吾爱专题脱壳练习八—-MoleBox V2.6.5:http://www.52pojie.cn/thread-11306-1-1.html
吾爱专题脱壳练习九—-CRYPToCRACk’s PE Protector:http://www.52pojie.cn/thread-11446-1-1.html
吾爱专题脱壳练习十—-PESpin 1.32:http://www.52pojie.cn/thread-11585-1-1.html
吾爱专题脱壳练习十一—-VB自效验的处理:http://www.52pojie.cn/thread-11747-1-1.html
吾爱专题脱壳练习十二—-delphi自效验的处理:http://www.52pojie.cn/thread-11883-1-1.html
吾爱专题脱壳练习十三—-GHF Protector V1.0:http://www.52pojie.cn/thread-12011-1-1.html
吾爱专题脱壳练习十四—-Armadillo 6.04:http://www.52pojie.cn/thread-12135-1-1.html
吾爱专题脱壳练习十五—-ACProtector系列保护:http://www.52pojie.cn/thread-12279-1-1.html
吾爱专题脱壳练习十六—-ACProtector系列保护:http://www.52pojie.cn/thread-12362-1-1.html
吾爱专题脱壳练习十七—-PEBundle 2.0b5 - 3.0x:http://www.52pojie.cn/thread-12498-1-1.html
吾爱专题脱壳练习十八—-Armadillo 4.40:http://www.52pojie.cn/thread-12620-1-1.html
吾爱专题脱壳练习十九—-PUNiSHER 1.5:http://www.52pojie.cn/thread-12822-1-1.html
吾爱专题脱壳练习二十—-未知壳一:http://www.52pojie.cn/thread-12936-1-1.html
吾爱专题脱壳练习二十一—-未知壳二:http://www.52pojie.cn/thread-13494-1-1.html
吾爱专题脱壳练习二十二—-未知壳三:http://www.52pojie.cn/thread-13770-1-1.html

-

NO.4

我是用户 破解实战(10集全)
破解实战演练教程
第一战:http://www.52pojie.cn/thread-197281-1-1.html
第二战:http://www.52pojie.cn/thread-197598-1-1.html
第三战:http://www.52pojie.cn/thread-197957-1-1.html
第四战:http://www.52pojie.cn/thread-198203-1-1.html
第五战:http://www.52pojie.cn/thread-198365-1-1.html
第六战:http://www.52pojie.cn/thread-198930-1-1.html
第七战:http://www.52pojie.cn/thread-199459-1-1.html
第八战:http://www.52pojie.cn/thread-199834-1-1.html
第九战:http://www.52pojie.cn/thread-200655-1-1.html
第十战:http://www.52pojie.cn/thread-200798-1-1.html

-

NO.5

Blue .NET系列教程(4集全)
图文教程分析.net程序!
第一课 http://www.52pojie.cn/thread-248348-1-1.html
第二课 http://www.52pojie.cn/thread-249034-1-1.html
第三课 http://www.52pojie.cn/thread-250626-1-1.html
第四课 http://www.52pojie.cn/thread-250633-1-1.html

-

NO.6

去软件弹窗系列教程(共两集)
第一课 http://www.52pojie.cn/thread-316180-1-1.html
第二课 http://www.52pojie.cn/thread-323346-1-1.html

-

NO.7

R4ndom破解教程全文翻译(共七集)
第一课 http://www.52pojie.cn/thread-344925-1-1.html
第二课 http://www.52pojie.cn/thread-345839-1-1.html
第三课 http://www.52pojie.cn/thread-346455-1-1.html
第四课 http://www.52pojie.cn/thread-350727-1-1.html
第五课 http://www.52pojie.cn/thread-352818-1-1.html
第六课 http://www.52pojie.cn/thread-354029-1-1.html
第七课 http://www.52pojie.cn/thread-355207-1-1.html

-

希望大家在本论坛发现新手容易理解的系列教程通知我,我会陆续加进来。(转载的朋友请标注:吾爱破解原创作品)

- -
- - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/hexo-changes/index.html b/2020/02/hexo-changes/index.html deleted file mode 100644 index 80eacfb..0000000 --- a/2020/02/hexo-changes/index.html +++ /dev/null @@ -1,714 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hexo 大换血 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- hexo 大换血 -

- - -
- - - - -
- - -

今天闲来无事,折腾博客(其实是写 gdb 结果得更新一下 hexo ),然后这个博客就大换血了。

-

我干了啥呢:

-
-

Typora 的图片存放路径

Typora 的图片存放路径和文章图片 URL 的问题

- -

hexo 添加主页页面,tags等

hexo 主页上的 tags、categories、archive、about 等页面,手动添加。

- -

hexo 打赏

设置 next 主题配置下的 reward_settings,但和文章中说的有些小不同

- -

hexo 添加版权

这里我遵循知识共享(Creative Commons) 署名 4.0 协议国际版,可以在next主题的 config.yml 里面的 creative_commons 配置

- -

hexo 添加版权后链接错误问题

本来应该是 http:// blog.tcpsoft.app/2020/02/06/hexo-changes/,

-

但是变成了 /http:/blog.tcpsoft.app/2020/02/06/hexo-changes/

-

所以就手动写了个 js 脚本,添加到 source/js 文件夹,并修改 next 的一个配置文件。

-
1
2
3
4
5
6
//添加<script>到 \themes\next\layout\_scripts\index.swig
//<script src="/js/diy.js"></script>

link = document.getElementsByClassName("post-copyright-link")[0].children[1];
href = link.getAttribute("href").replace("/http:/","http://");
link.setAttribute("href",href);
- -

解决了显示混乱问题

我之前的博客迁移,导致了显示混乱问题(即我已有 css 而 hexo 又给我加上一套主题的显示方案),此处用 hexo 的 skip_render 设置即可,不过要匹配文件文件夹还是有点小坑的 [坑爹预警]

- -

博客 CDN 加速

看了百度云加速,知道创宇云加速,cloud flare,暂时还是不弄了,现阶段博客是基于 GitHub Pages + Hexo ,图片使用腾讯云存储。后期可能考虑加 CDN 或整站迁移腾讯云存储(因域名无法备案及COS网站的处理问题已放弃此方案)

-

sitemap 功能

hexo、next 主题的 sitemap 功能,帮助搜索引擎收录站点(不用修改 hexo 配置文件)
注:这些 npm 命令都是在本地博客根目录下执行,下同

-
1
2
npm install hexo-generator-sitemap --save
npm install hexo-generator-baidu-sitemap --save
- - -

RSS 订阅功能

(不用修改 hexo 配置文件)(修改next主题配置以显示按钮)

-
1
npm install hexo-generator-feed --save
-
1
2
3
4
"/themes/next/_config.yml"
menu:
......
rss: /atom.xml
- -

站点搜索功能

安装插件,然后修改 next 配置文件,,,

-
1
npm install hexo-generator-searchdb --save
- - -

相关文章推荐

同样的,安装插件,修改配置

-
1
npm install hexo-related-popular-posts --save
- -

参考链接1: Hexo+NexT(v7.0+) 搭建博客:功能强化 | Chingow’s Blog

-

文章字数统计和阅读时间估计

1
npm install hexo-symbols-count-time --save
- -

参考链接1: o(五):个性化 next theme | 执行者的博客

-

社交按钮

参考链接1: o(五):个性化 next theme | 执行者的博客

-

阅读进度

设置 next 主题配置:

-
1
2
reading_progress:
enable: true
- -

hexo 设置阅读全文

其实也和文章的有点不一样,可能是因为 next 版本不一样,我设置的是 next 配置文件

-
1
2
3
4
5
6
# Automatically excerpt description in homepage as preamble text.
excerpt_description: true

# Read more button
# If true, the read more button will be displayed in excerpt section.
read_more_btn: true
- -

参考链接1: Hexo-设置阅读全文 - 简书

-

修改标签样式

只需要修改模板/themes/next/layout/_macro/post.swig,搜索 rel="tag">#,将 # 换成<i class="fa fa-tag"></i> 。(好像改了更丑了,后来改回来了)

-

参考链接1: Hexo博客优化之Next主题美化_huangpiao-CSDN博客

-

设置博客底部布局

参考链接1: Hexo博客优化之Next主题美化_huangpiao-CSDN博客

-

设置代码样式

没有改,后面需要再说

-

参考链接1: Hexo博客优化之Next主题美化_huangpiao-CSDN博客

-

结语

终于配置完了,要死,(其实我是想写点 gdb 的来着?)

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/hexo-seo/index.html b/2020/02/hexo-seo/index.html deleted file mode 100644 index 7faa79b..0000000 --- a/2020/02/hexo-seo/index.html +++ /dev/null @@ -1,731 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hexo seo 优化 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- hexo seo 优化 -

- - -
- - - - -
- - -

害呀,hexo 都做了这么多了,干脆把google 统计一起加上去得了。Google Analytics、Google添加站点,baidu 添加站点、bing 添加站点,通通加上!

- - -

google analytics

    -
  • 访问Google Analytics,需要科学上网并用google账号登录,之后按照提示填写网站信息开通GA服务,获取统计ID。

    -
  • -
  • 编辑主题配置文件, 找到关键字google_analytics , 删除注释#并填写获取到的统计ID

    -
    1
    2
    google_analytics:
    tracking_id: UA-XXXXXXXXX-X # <app_id>
    - -
  • -
-

robots.txt

在 source 目录下添加 robots.txt ,编写爬虫规则,下面是我的 robots.txt

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
User-agent: *
Allow: /
Allow: /archives/
Allow: /tags/
Allow: /categories/

Disallow: /vendors/
Disallow: /js/
Disallow: /lib/
Disallow: /css/
Disallow: /fonts/
Disallow: /vendors/
Disallow: /fancybox/
Disallow: /old/

Sitemap: http://blog.tcpsoft.app/sitemap.xml
Sitemap: http://blog.tcpsoft.app/baidusitemap.xml
- -

Google Search Console

image-20200209180807809

-

提交整个域名或者某个子域名到 google,我这里提交“网域”即整个域名。

-

输入tcpsoft.app,点继续,会开始验证。

-

image-20200209181014294

-

在域名购买处修改 DNS 记录或者自己的 DNS 托管商处修改,添加一条特定的 TXT 记录。

-

小贴士 用 linux 命令dig hostnamenslookup -q=TXT hostname可查询DNS是否生效(后者windows也可用)

-

这个地方有一点坑的是需要设置 name 为 @,值为 google-site-verification=XXXXXX ,而不是 name 为 google-site-verification

-

image-20200209184813570

-

设置记录,稍等片刻(或者等半天)记录生效之后,点击验证,验证成功

-

image-20200209184707276

-

之后就可以进行管理辣。

-

接下来提交 sitemap,站点地图,帮助机器人抓取网站

-

之后就可以通过 google 搜索命令 site:blog.tcpsoft.app 查看站点收录情况

-

image-20200209185519286

-

Baidu搜索资源平台

打开Baidu搜索资源平台,添加网站

-

image-20200209201555631

-

填入主域名 https://tcpsoft.app 选择网站分类,准备验证,可通过文件验证,html 标签验证,CNAME 验证,此处我选择 CNAME 验证,将 H9JpujyZsP.tcpsoft.app 使用 CNAME 解析到 ziyuan.baidu.com。和之前一样,在托管商添加DNS记录。

-

小贴士 可用 dig hostnamenslookup -q=CNAME hostname 可查看DNS是否生效,同上文。

-

image-20200209202629054

-

添加记录生效后就点击完成验证,稍等一会儿,提示验证成功,可以选择批量添加子站。

-

和 google 不同,这里的需要手动一条条添加。(还有一点隐私保护的味道呢 [滑稽] )手动填入子域名即可。

-

image-20200209203148808

-

通过 html 标签验证添加,会要求 head 中添加标签,此处 hexo 有集成,在 hexo 修改配置就可。

-

image-20200209204126442

-

复制 baidu 提供的 content,在 next 主题的 _config.yml中搜索 baidu_site_verification: 填入,然后再 hexo g -d 发布一次,检查有标签后,点击完成验证。

-

验证完成 ,就可以查看站点,我等了半天 Baidu 也抓不到站点,到处看了一圈发现是 github 屏蔽了Baidu 爬虫,所以需要其他方式。

-

首先是把根目录下的 baidusitemap.xml 提交给Baidu平台,不多介绍,自己摸索

-

Baidu 自动推送

于是就手动提交 sitemap 并且开启 hexo next 集成的自动推送链接功能,打开站点主题theme/next/_config.yml文件:

-
1
2
# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
baidu_push: true
- -

however~,貌似 uBlock Origin 会拦截 Google Analytics 和 Baidu 自动提交,这就比较悲催了

-

hexo 自动提交 Baidu

1
npm install hexo-baidu-url-submit --save
- -

然后修改 hexo 的配置文件,添加 baidu_url_submit: ,并修改 deploy

-

注意:本插件的配置文件中包含秘钥, 如果要把 hexo 博客整体放在 github ,需要放在私有仓库。

-

注意:这里 host 里填入的域名是在 Baidu站长平台 添加好的域名

-
1
2
3
4
5
6
7
8
baidu_url_submit:
count: 5 ## 提交最新的5个链接
host: blog.tcpsoft.app ## 在百度站长平台中注册的域名
token: your_token ## 请注意这是您的秘钥, 请不要发布在公众仓库里!
path: baidu_urls.txt ## 文本文档的地址, 新链接会保存在此文本文档里
# xz_appid: 'xxxxxx' ## 你的熊掌号 appid
# xz_token: 'xxxxxx' ## 你的熊掌号 token
# xz_count: 10 ## 从所有的提交的数据当中选取最新的10条,该数量跟你的熊掌号而定
- -

不过我认为熊掌号没什么用,需要的话可以添加

-
1
2
3
4
5
deploy:
- type: git
repository: https://github.com/XXXX/XXXX
- type: baidu_url_submitter # 百度
# - type: baidu_xz_url_submitter # 百度熊掌号
- -

执行hexo deploy的时候,新的链接就会被推送了。

-

当你 hexo g -d,看到这个的时候,说明配置成功了

-

image-20200209224126611

-

其他的中国特色搜索引擎

不说了,想设置Sougou、360、神马可以参考这篇: Hexo-NexT 博客提交搜索引擎收录 | 小丁的个人博客

-

Bing

搜索并打开 Bing - Webmaster Tools,Bing网站搜索管理。然后登陆微软账号或者 google 账号,看起来像这样:

-

image-20200209235529136

-

由于我已经有了 Google Search Console(第三条提到的),就直接绑定 Google 账号同步数据就可以了。

-

image-20200209235651847

-

点击“继续访问”之后会跳转到 google 登陆,登录之后授权 Bing 就可以了。读取到站点数据,导入。

-

image-20200209235919325

-

然后也需要向 Bing 提交sitemap,同上 Google。

-

修改 url 格式

-

seo搜索引擎优化认为,网站的最佳结构是用户从首页点击三次就可以到达任何一个页面

-
-

但是我们使用hexo编译的站点打开文章的url是:sitename/year/mounth/day/title四层的结构,这样的url结构很不利于seo,爬虫就会经常爬不到我们的文章,所以我把url格式改为 sitename/year/mounth/title。

-

修改 hexo 配置文件:

-
1
permalink: :year/:month/:title/
- -

出站链接 “nofollow”

外链越多,搜索引擎给此站点的权重就越低,即排位越后。为了提高权重,可以禁止搜索引擎跟进外链,添加 nofollow 属性就可以做到。一个一个页面添加跟定是不现实的,当然是选择用插件。

-

先在 hexo 博客根目录安装插件,插件有hexo-autonofollowhexo-filter-nofollow ,filter要好用一些,他们两个的差别可以参考作者的博客:hexo-filter-nofollow - Hexo 官方的 nofollow 插件 | Sukka’s Blog

-
1
npm install hexo-filter-nofollow --save
- -

编辑 hexo 配置文件,添加:

-
1
2
3
4
5
6
nofollow:
enable: true
field: post # post:仅处理文章内容,site:处理全站所有页面
exclude:
- 'exclude1.com'
- 'exclude2.com'
- - -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/hexo-with-cloudflare/index.html b/2020/02/hexo-with-cloudflare/index.html deleted file mode 100644 index a086bfe..0000000 --- a/2020/02/hexo-with-cloudflare/index.html +++ /dev/null @@ -1,704 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hexo + CloudFlare = 速度飞起 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- hexo + CloudFlare = 速度飞起 -

- - -
- - - - -
- - -

昨天配置了 Google、Baidu、Bing搜索引擎提交,不过比较悲催的是 Github Pages 服务器拒绝 BaiduSpider ,整个站点根本不能出现在 Baidu 里面好么!! 另一方面,速度过慢,github pages 在国内速度,不太理想,所以用 CloudFlare 老牌 cdn 加速整站,还可以被 BaiduSpider 收录。

-

参考了这篇文章: 基于 Hexo 的 GitHub Pages 配置 CloudFlare CDN_qhh0205-CSDN博客

-

准备好 GitHub 和 CloudFlare

有一个 github 账户,添加 username.github.io 库,把 hexo 发布到存储库,不多说了。

-

注册 CloudFlare 账号并登录。

-

在 CloudFlare 添加站点

在 CloudFlare 添加站点,并检查 DNS 记录,确认导入 CloudFlare 中。

-

在域名购买商处修改 DNS 服务器为 CloudFlare 提供的两个 DNS 服务器,等待生效之后继续操作

-

注意 :修改 DNS 服务器可能会导致某些记录丢失(像 Google 域名验证、letsencrypt 域名验证)(因为不是全部同步过去),所以在更改之前可以在旧 DNS 控制台,记录下各个 DNS 记录(截屏或手抄),后期可再写入新纪录

-

Ps:实验表明: CloudFlare 会同步大部分DNS记录,但是还是有部分子域名会漏掉,看个人情况是否手动记录原 DNS

-

image-20200210152724656

-

image-20200210112341702

-

修改 DNS 服务器:

-

image-20200210112513410

-

等待生效,可用 nslookup -q=ns tcpsoft.app 查询 DNS 解析服务器情况(本地的好像更新有点慢),其实 CloudFlare 在检测到 DNS 服务器修改成功之后会发邮件通知的。

-

然后在 CloudFlare 检查域名服务器,进行下一步操作,设置一些网站的自定义选项,包括是否开启浏览器到CF

-

的安全连接,是否开启CF到源服务器的安全连接,是否启用 Brotli 压缩来传输数据等。

-

然后就可以查看 DNS 设置,有黄色云图标的就是 CloudFlare 开启代理的

-

image-20200210120918605

-

我们可以用 dig (linux)或 nslookup (linux、Windows)查看域名解析情况。

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
root@Mi-CP /m/c/U/CP# dig blog.tcpsoft.app

; <<>> DiG 9.10.3-P4-Ubuntu <<>> blog.tcpsoft.app
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45170
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;blog.tcpsoft.app. IN A

;; ANSWER SECTION:
blog.tcpsoft.app. 900 IN CNAME tcpsoftware.github.io.
tcpsoftware.github.io. 900 IN A 185.199.110.153
tcpsoftware.github.io. 900 IN A 185.199.108.153
tcpsoftware.github.io. 900 IN A 185.199.111.153
tcpsoftware.github.io. 900 IN A 185.199.109.153

;; Query time: 1990 msec
;; SERVER: 223.5.5.5#53(223.5.5.5)
;; WHEN: Mon Feb 10 12:12:47 CST 2020
;; MSG SIZE rcvd: 133

root@Mi-CP /m/c/U/CP# nslookup blog.tcpsoft.app
Server: 223.5.5.5
Address: 223.5.5.5#53

Non-authoritative answer:
blog.tcpsoft.app canonical name = tcpsoftware.github.io.
Name: tcpsoftware.github.io
Address: 185.199.110.153
Name: tcpsoftware.github.io
Address: 185.199.108.153
Name: tcpsoftware.github.io
Address: 185.199.109.153
Name: tcpsoftware.github.io
Address: 185.199.111.153

root@Mi-CP /m/c/U/CP#
- -

我们可以看到解析了四个 IP,而我的 DNS 设置只有一个 CNAME,查询这个 IP,发现是 CDN,设置成功。

-

开启DNSSEC,防止 DNS 劫持

在 CloudFlare 的 DNS 管理面板往下翻可以看到 DNSSEC 选项,DNSSEC 是 DNS 安全扩展,采用加密方式,防止 DNS 劫持

-

image-20200210122448916

-

CF 提供了十多个参数,转到域名注册商处,填入注册商要求的对应参数即可。

-

等待十多分钟至一个小时,CloudFlare 上的 DNSSEC 会检测到设置成功,提示 Success!

-

image-20200210125156256

-

又掉坑:“重定向次数过多”

刚才的配置好之后,满以为可以运行的飞起来了,结果,打 !不 !开 !了 !

-image-20200210143346231 - -

一番查询发现是:CloudFlare SSL 选项开的是 Flexible。

-

image-20200210143616798

-

下面文字摘自 参考链接:WordPress 网站使用 CloudFlare 后提示“将您重定向的次数过多” 的原因及解决办法 _WordPress智库

-

Cloudflare CDN 配置

-
    -
  • Off:不开启https。

    -
  • -
  • Flexible:当我们的源网站没有配置 HTTPS 支持时,启用这个选项,Cloudflare 会在回源的时候通过 HTTP 协议访问我们的网站。

    -
  • -
  • Full:当我们的源网站支持 HTTPS,但是 HTTPS 证书和域名不匹配或者是自签名证书时,Cloudflare 会通过 HTTPS 协议访问源网站,但不会验证证书,也就是说,即使我们的源网站提供的 HTTPS 证书不受浏览器信任,Cloudflare 也会通过 HTTPS 回源网站。

    -
  • -
  • Full(strict):当我们的源网站支持 HTTP ,并且证书有效时(未过期且受信任)。Cloudflare 会通过 HTTPS 协议访问源网站,并在每个请求过程中验证证书。

    -
  • -
-

了解了上面各个设置的功能,我们来看一下 Cloudflare 的循环重定向问题是怎么出现的,在 Cloudflare 中开启了 SSL 后,访问网站时出现循环重定向需满足下面两个条件:

-
    -
  1. SSL 中设置了 Flexible,CDN 以 HTTP 协议回源网站。
  2. -
  3. 源网站支持 HTTPS,并且设置了通过 HTTP 协议访问时,自动跳转到 HTTPS 协议。
  4. -
-

到这里,可能就有朋友发现问题了,我们访问 Cloudflare 的 CDN 服务器的时候,是通过 HTTPS 访问的,CDN 访问源网站的时候,是通过 HTTP 访问的,源网站上 HTTP 又自动跳转了 HTTPS,完美的一个循环重定向。重定向的次数多了,浏览器就撂挑子报出了 ERR_TOO_MANY_REDIRECTS 的错误。

-

CloudFlare 造成重定向的次数过多问题的解决办法

知道了循环重定向的原因,我们也就知道了怎么解决这个问题,通过测试,下面的两种设置方法都可以解决 Cloudflare 循环重定向的问题。

-
    -
  • SSL 中选择 Full 或者 Full(strict),让 CDN 回源的时候使用 HTTPS 的方式回源,没有 HTTP 什么事了,就不会跳来跳去了
  • -
  • 源网站不设置 HTTPS 支持或者 不设置 HTTP 跳转 HTTPS,让 Cloudflare 回源的时候使用 HTTP 方式获取资源。
  • -
-

修改了 CloudFlare 设置后,可能需要过几分钟或清理浏览器缓存后才能生效。

-

除了 Cloudflare,使用其他 CDN 提供商的时候,也可能会出现这个问题,如果设置了 CDN 后,遇到了 Chrome 报重定向次数过多的问题,可以通过上面的思路查找问题。

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/hexo-with-gitalk/index.html b/2020/02/hexo-with-gitalk/index.html deleted file mode 100644 index 710916a..0000000 --- a/2020/02/hexo-with-gitalk/index.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hexo + gitalk,满满的都是坑。 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- hexo + gitalk,满满的都是坑。 -

- - -
- - - - -
- - -

今日看到博客的评论功能,就想整一个,本以为跟前两天添加hexo插件查不多,结果,,爬坑,又掉坑,爬坑又掉坑……

-
-

安装gitalk

安装gitalk没什么,有很多博文有介绍,这里贴一篇就好,修改主题配置的部分很精简,我喜欢。

- -

注意域名是自己的 github pages 或者自定义域名就好。

-

注意每一次发布新文章之后都需要去博客登陆刷新一下评论,插件会在你的 repo 里面新建 issue。

-

我之前有篇文章叫《Hi, I’m Cortana.》,我点开这个做实验看能不能使用评论功能,原地址是

-
https://blog.tcpsoft.app/2019/12/29/Hi,%20I'm%20Cortana/
-
-

艰难爬坑

[ 以下多链接警告,请选择性阅读 ]

-

报错:redirect_uri_mismatch

-

看了感觉也没啥用,根据指示转到下面这篇,写的比较详细,但是是没有解决问题

- -

我看了看我的配置,根据前面的指导写的最初的配置是这样子的:

-

github-config

-

http https 的问题?

又看了看我的请求 url,确实是都是 https,没有问题啊

-

后来又找到这个 gitalk issue 115 和 162,貌似是个很“权威”的解答

- -

加 / ?

好像回调地址里面要加个 / ?加就加吧,然后

-
1
2
Authorization callback URL:
https://blog.tcpsoft.app/
- -

也不行。仍然跳回主页,并提示 redirect_uri_mismatch

-

后来我又尝试了:

-
1
2
3
4
5
6
7
8
9
10
11
12
http://tcpsoftware.github.io
https://tcpsoftware.github.io
http://tcpsoftware.github.io/
https://tcpsoftware.github.io/
http://blog.tcpsoft.app
https://blog.tcpsoft.app
http://blog.tcpsoft.app/
https://blog.tcpsoft.app/
tcpsoftware.github.io
tcpsoftware.github.io
blog.tcpsoft.app
blog.tcpsoft.app
- -

心累

-

然后忽然在 issue 162 翻到这个?

-

image-20200209140447713

-

中文??!

🤨

-

🤔

-

回头看了看我的 url,貌似并没有中文。

-
https://blog.tcpsoft.app/2019/12/29/Hi,%20I'm%20Cortana/
-

url 编码导致的问题?

-

我尝试换一个文章,在上一篇 hexo 里,可了!!它的链接是,

-
https://blog.tcpsoft.app/2020/02/06/hexo-changes/
-

呐,没有 url 编码,没有中文

-

🤔

-

issue

-

编码问题。

url 里面不要有特殊符号,刚才链接里面完美命中(而且链接看起来很丑可读性很差)

-

有特殊符号不能被匹配规则匹配到(像我刚才链接里面的 , '

-
-

解决方案

hexo new passage_name

-

新建文章的时候想好一个优雅的名字,如果遇到符号或者多单词,可以考虑用:

-
驼峰式命名法(小驼峰命名法)

hexo new helloImCortana

-
帕斯卡命名法(大驼峰命名法)

hexo new HelloImCortana

-
匈牙利命名法(本文无关)

hexo new sHelloImCortana

-

变量类型+变量名(逃)

-
下划线命名法

hexo new hello_Im_Cortana

-
短横线分隔(Github风格 编程必报错)

hexo new hello-Im-Cortana

-
-

再说一句

(其实上面尝试的那一大堆链接,除了最后四个没有 http https 协议的之外,其他的都是可以的)

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/let-git-fly-scientifically/index.html b/2020/02/let-git-fly-scientifically/index.html deleted file mode 100644 index 8e6cf34..0000000 --- a/2020/02/let-git-fly-scientifically/index.html +++ /dev/null @@ -1,693 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 科学地让 Git 飞,git clone 速度 5Mb/s | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 科学地让 Git 飞,git clone 速度 5Mb/s -

- - -
- - - - -
- - -

写本文原因:Git 太慢。看最后,14 KiB/s

-

image-20200214101358632

- - -

首先拥有一个代理服务器

代理分为正向代理和反向代理,

-

正向代理就是代理用户端,改变用户端的身份(IP)。

-

反向代理就是代理服务端,改变服务器的身份(IP)。

-

目前的代理大多数用的都是正向代理。

-

获得服务器方法很多,不讲了,然后你就可以通过软件转发流量来进行“代理”

-

这里使用 ShadowsocksR 配置一个本地 HTTP 代理。

-

然后,设置代理

运行SSR,在软件中添加已获得的服务器,然后进行一些常见的设置如 PAC 。

-

Tips:PAC:Proxy Auto Config

-

然后 Win + R ,输入 inetcpl.cpl 或是找到系统设置里面的代理设置,可以看到类似这样子的界面:

-

image-20200214104604088

-

这样子就是说明本地 1080 端口正在被代理软件使用。

-

然后,修改 Git 配置

git 客户端可以使用代理来改善连接速度,Git 的所有配置都是存储在一个文件中的,可以通过修改配置文件或者通过 Git 命令行来修改配置。

-

Git 命令行主要有几种存在形式:

-
    -
  • Windows命令行调用,主要是Windows安装版 Git 或在有 Git 的文件夹中运行 Git
  • -
  • 软件自带的 Git,这种多是在开发工具或 IDE 中,提供一个 Git 的命令行,如 Visual Studio、Git desktop 等,可能是自带了一份 Git 副本,可能是调用系统的 Git。
  • -
  • Linux 系统中的 Git ,Linux 系统大多自带 Git 命令
  • -
-

Git 的配置文件是一个名字叫 .gitconfig 的文件,上述的第1、3种的配置文件比较好找,第二种就存在不确定性。

-

在Windows中,.gitconfig%userprofile% 文件夹,即用户文件夹。用notepad++ 打开,看起来像这样子:

-image-20200214111535140 - -

在Linux中,.gitconfig~ 文件夹,即用户文件夹,看起来像这样子:(截图为 WSL Ubuntu16.04 + Windows Terminal )

-

image-20200214113002933

-

已知本地端口的情况下,(比如我的是1080),可以配置文件手动添加如下内容:

-
1
2
3
4
[http]
proxy = http://127.0.0.1:1080
[https]
proxy = http://127.0.0.1:1080
- -

注意修改后格式像图中即可

-

另一种方式是在 Git 命令行设置,上面的三种情况都可以使用。

-

打开命令行,输入:

-
1
2
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080
- -

如果要取消代理设置,输入:

-
1
2
git config --global --unset http.proxy
git config --global --unset https.proxy
- -

(打开配置文件会发现对应的也自动修改好了)

-

然后就可以打开命令行开始 git clone 辣。

-

请注意 Github 的两种 clone 方式的区别:

-

https 方式,是通过本地的 http 链接,是会通过代理软件的

-

ssh 方式,是通过 ssh.exe 收发流量,不会通过代理软件,所以依然很慢

-

(截图为我开始 ssh 方式 clone 的时候,网络防火墙提示 ssh.exe 联网)

-image-20200214125336775 - -

用 https 方式速度就会达到接近带宽的峰值。比如我们来 clone 一个 ctf-wiki

-

image-20200214133923497

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/02/wooyun-on-github/index.html b/2020/02/wooyun-on-github/index.html deleted file mode 100644 index d3108b7..0000000 --- a/2020/02/wooyun-on-github/index.html +++ /dev/null @@ -1,1069 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Wooyun.org lives on Github | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- Wooyun.org lives on Github -

- - -
- - - - -
- - -

翻阅 Wooyun ,然后找到了Github上。。。不得不说,Github 上确实有大量镜像资源

-

在这里做一个总结吧。按 Star 排序,把每个库的 Readme.md 剪辑到了这里。

-

文尾有彩蛋!

- - -
- -
- -

No.1 https://github.com/hanc00l/wooyun_public

-

Watch:224___Star:3586___Fork:1.8k

-

wooyun_public

乌云公开漏洞、知识库爬虫和搜索
crawl and search for wooyun.org public bug(vulnerability) and drops

-

1.wooyun公开漏洞爬虫版

index

-

search

-

源自2016年6月底使用scrapy爬虫爬取的4W公开漏洞和知识库,虚拟机为ubuntu14.04,采用python2+mongodb+flask(tornado)和Elasticsearch搜索引擎。

-

虚拟机下载地址:

-

https://pan.baidu.com/s/1HkR4ggvAwTikshsjcKYBuA ,提取密码:8wnb(2018.4.23更新)

-

安装、使用指南(点我)

-

2.wooyun公开漏洞纪念版

index_final

-

search_final

-

漏洞信息和代码来自于m0l1ce的wooyun_all_bugs_8.8W,包含8.8W漏洞信息(不含知识库);搜索和漏洞信息代码位于wooyun_final,对代码进行了部份修改:

-
    -
  • 修改了搜索功能,支持多关键字搜索和在漏洞详情中搜索
  • -
  • 修改了离线图片文件的位置,搜索结果直接使用虚拟机中的离线图片
  • -
  • 修改了代码以适应PHP5.6及更新版本
  • -
-

虚拟机为ubuntu16.04,PHP5.6+MySQL5.7+Apache2。虚拟机下载地址:
https://pan.baidu.com/s/1qYRqa3U 密码: w8vb (2017.7.4)

-

虚拟机用户名、密码为hancool/qwe123

-

3.其它

    -
  • 本程序只用于技术研究和个人使用,程序组件均为开源程序,漏洞和知识库来源于乌云公开漏洞,版权归wooyun.org。
  • -
-
- -
- -

No.2 https://github.com/Xyntax/1000php

-

Watch:31___Star:759___Fork:481

-

1000php

1000个PHP代码审计案例 (2016.7以前乌云公开漏洞)

-

说明

    -
  • 数据取自3.8W乌云已公开漏洞(截至2016.7)
  • -
  • 漏洞在./bugs,./upload保存了相关漏洞的图片资源
  • -
  • 使用特征匹配提取,杂质在5%以内,如遇其他非php漏洞自行删除即可
  • -
  • 愿乌云早日回归
  • -
-
- -
- -

No.3 https://github.com/starnightcyber/1000php

-

Watch:1___Star:759___Fork:481

-

1000php

1000个PHP代码审计案例 (2016.7以前乌云公开漏洞)

-

在原来的基础上Xyntax/1000php添加了简单的漏洞索引,并且加入了原css文件,方便查看

-

Sample

wooyun-index

-

点击其中某个漏洞,查看

-

bug

-

刚才试过了,直接打开index.html好像并不会简单按照我们的意愿显示,可以重新再执行一下代码:

-

python script.py

-

这样会重新生成index.html,在本地打开应该就没有问题,另外可能会出现乱码,可以用谷歌浏览器打开。

-

说明

    -
  • 数据取自3.8W乌云已公开漏洞(截至2016.7)
  • -
  • 漏洞在./bugs,./upload保存了相关漏洞的图片资源
  • -
  • 使用特征匹配提取,杂质在5%以内,如遇其他非php漏洞自行删除即可
  • -
  • 愿乌云早日回归
  • -
-
- -
- -

No.4 https://github.com/jiji262/wooyun_articles

-

Watch:27___Star:640___Fork:506

-

wooyun_articles

drops.wooyun.org 乌云Drops文章备份

-

(乌云网站已经离我们而去,可能再也不会回来了!谨以此纪念乌云!)

-

线上版本

(已更新图片)

-

https://wooyun.js.org/

-

线上版本源码

https://github.com/jiji262/wooyun_articles/tree/gh-pages

-

关于branches

gh-pages

https://wooyun.js.org/ 源码。

-

由于wooyun服务器已经无法访问,所以文章中图片已经无法显示。所幸,之前已经将图片抓取下来,可以在这里查看所有图片。

-

master

目录如下:

-

wooyun.js:用于抓取 drops.wooyun.org 上文章的脚本;

-

drops:抓取下来的文章原文;

-

image_download:单独下载文章中图片的方法, bagpipe_versionasync_version为多并发下载图片的解决方案。

-

Todo

[x]更新本地图片链接到文章中

-
- -
- -

No.5 https://github.com/boy-hack/wooyun-payload

-

Watch:12___Star:465___Fork:90

-

WooYun-Payload

从乌云漏洞库中提取的扫描规则,内容介绍: https://mp.weixin.qq.com/s/9RHVsw-HtAfo1UuPAqXZEw

-

Burpsuite 辅助插件

通过http请求包中域名,路径,参数等获取乌云历史漏洞中类似的数据。

-

wooyunpayload

-

数据说明

-
- -
- -

No.6 https://github.com/m0l1ce/wooyunallbugs

-

Watch:21___Star:398___Fork:154

-

wooyunallbugs

wooyun_all_bugs_8.8W

-
-

链接:https://pan.baidu.com/s/1htwVF3Q 密码:oskw

-

代码在bugs文件里
ps:php version 5.3
库解压到wooyun库里即可
ps:注意修改数据库连接密码 conn.php

-
-

ps:图片资源解压到根目录/upload/下 本地绑定下host 你的图片服务器 static.loner.fm
static.loner.fm 不会关掉的 大家可以放心使用

-

漏洞查询链接 www.loner.fm/bugs/

-
- -
- -

No.7 https://github.com/SuperKieran/WooyunDrops

-

Watch:13___Star:346___Fork:243

-

Wooyun Drops

DEMO: https://wooyun.kieran.top

-

静态版乌云 Drops

OPTIONS:
1.默认开启 https,如果不需要可以在 index.html 删掉
2.图片依赖于 https://github.com/SuperKieran/wooyun-img

-

全文搜索有想法还但没想好怎么做
最先想到的自然是写个后台,搜搜搜就完工了,但这不太方便
静态页面的搜索 我暂时没有好的方案,如果有好的想法的话可以在 issue 里提

-
- -
- -

No.8 https://github.com/SuperKieran/wooyun-img

-

Watch:0___Star:20___Fork:33

-

WooYun Drops 图片库

DEMO: https://superkieran.github.io/WooyunDrops
Github: https://github.com/SuperKieran/WooyunDrops
(编者注:图片在gh-pages分支)

-
- -
- -

No.9 https://github.com/grt1st/wooyun_search

-

Watch:22___Star:327___Fork:157

-

乌云公开漏洞、知识库搜索

-

index

-

search

-

author

-

0x00.介绍

    -
  • 灵感来源于hanc00l的github项目wooyun_public

    -
  • -
  • wooyun_public基于flask或者tornado,而本项目可以布置在apache、nginx等web服务器上。

    -
  • -
  • 如果你有wooyun的静态网页数据,那么我们可以开始了!

    -
  • -
  • 整个项目包括两个部分,第一部分是索引,将网页信息存储进数据库;第二部分是搜索,从数据库中查找信息。轻量级,支持进行二次开发。

    -
  • -
  • 静态网页网盘链接:

    -
    1
    2
    bugs   链接: https://pan.baidu.com/s/1n_kkUaZZxcTEa4-v6sGa9Q 密码: sg98 (20180707)
    drops 链接: https://pan.baidu.com/s/1r2Y7rfntwnjglX6HtzDk6w 密码: 738f (20180707)
    - -
  • -
-

0x01.依赖组件及说明

    -
  • python 2.7和pip

    -
  • -
  • python依赖:MySQLdb,lxml(推荐)

    -
  • -
  • mysql,php及任意web服务器(php需开启pdo-mysql模块

    -
  • -
  • 将本项目放进web服务器目录下,bugs目录下为漏洞库文件,drops目录下为知识库文件。

    -
    1
    2
    3
    4
    5
    6
    7
    8
    文件说明:
    app_bugs.py bugs的索引,依赖lxml
    app_drops.py drops的索引,依赖lxml
    index.html 搜索的主页
    search.php 执行搜索的页面
    config.php php配置文件
    ./bugs bugs静态文件的目录
    ./drops drops静态文件的目录
    - -
  • -
-

0x02.索引配置

    -
  • app_bugs.py为建立bugs索引的脚本,app_drops为建立drops索引的脚本。

    -
  • -
  • 因为python脚本中open()函数打开的文件名不能为中文,建议将drops目录下的中文文件名改为英文(例如,安全运维-xxxx.html=>safe-xxxx.html)

    -
  • -
  • python脚本运行前需要修改如下语句,更改参数如主机、端口号、用户名、密码。

    -
    1
    conn=MySQLdb.connect(host='localhost',port=3306,user='root',passwd='',db='wooyun',charset='utf8')
    -
  • -
  • 在mysql中建立数据库wooyun,数据表bugs、drops,分别建立字段title,dates,author,type,corp,doc与title,dates,author,type,doc。

    -
    1
    2
    3
    CREATE DATABASE `wooyun` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    create table bugs(title VARCHAR(500),dates DATETIME, author CHAR(255),type CHAR(255),corp CHAR(255),doc VARCHAR(200) PRIMARY KEY);
    create table drops(title VARCHAR(500),dates DATETIME, author CHAR(255),type CHAR(255),doc VARCHAR(200) PRIMARY KEY);
  • -
  • 注意mysql编码如下,需要为utf-8(character_set_server不为utf-8要修改mysql配置文件

    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    use wooyun;
    show variables like 'character%'; #查看编码
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | utf8 |
    | character_set_connection | utf8 |
    | character_set_database | utf8 |
    | character_set_filesystem | binary |
    | character_set_results | utf8 |
    | character_set_server | utf8 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    -

    如果编码错误会报错,比如:

    -
    1
    2
    Warning: Incorrect string value: '\xE5\xBB\xB6\xE9\x95\xBF...' for column 'title' at row 1
    cur.execute("INSERT INTO `drops`(`title`,`dates`,`author`,`type`,`doc`) VALUES(%s,%s,%s,%s,%s)", tmp)
    -

    在mysql里查看会发现有一堆???

    -
  • -
  • 之后就可以建立索引了

    -
    1
    2
    sudo python ./app_bugs.py
    sudo python ./app_drops.py
  • -
  • bugs数目为40280,drops数目为1264

    -
    1
    2
    3
    use wooyun;
    select count(*) from bugs;
    select count(*) from drops;
    - -
  • -
-

0x03.搜索配置

    -
  • 修改config.php中修改如下语句中参数,分别是主机、端口、用户名、密码与数据库。

    -
    1
    2
    3
    4
    5
    $config['host'] = '127.0.0.1';
    $config['port'] = '3306';
    $config['user'] = 'root';
    $config['passwd'] = '';
    $config['database'] = 'wooyun';
    -
  • -
  • index.html与search.php样式来自于前端静态资源托管库。f12进入开发者模式,如果样式文件访问不到可以使用本地或cdn的样式(bootstrap3.3.7、jquery3.1.0)。只需要更改两个网页里面的如下内容。

    -
  • -
-
1
2
3
<link href="//lib.baomitu.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="//lib.baomitu.com/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript" src="//lib.baomitu.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
- -
    -
  • 为了防止因为web服务器配置不正确,导致访问http(s)://example.link/bugs/或者http(s)://example.link/drops/而进入index of页面泄露所有文件,在目录下放置内容为空的index.html即可。

    -
  • -
  • linux下由于selinux可能会导致无法连接数据库,可以使用如下命令:

    -
    1
    2
    getenforce   //查看selinux状态
    setenforce 0 //暂时关闭selinux
    - -
  • -
-

0x04.问题

    -
  • drops很奇怪的会都需web目录下的js而不是本身目录里的js,所以drops的页面会有些乱。开发者模式看一下,缺少的js为web目录/static/drops/css与web目录/static/drops/js。新建目录再把drops下的css、js文件夹复制过去即可
  • -
-

0x05.更新日志

    -
  • 2016.10.08更新:上传了bugs.py。由于bugs部分页面(约143条)的author带有js,正则匹配出的信息出错,所以上传了bugs.py用于修正,在app.py后执行,python bugs.py。(2016.11.09已修正,无需执行bugs.py)

    -
  • -
  • 2016.10.10更新:重写了search.php和search.css,基本适配了各种浏览器和移动端。

    -
  • -
  • 2016.11.09更新:匹配索引将BeautifulSoup换成了lxml,运行速度更快。优化了匹配(感谢@tuola)。

    -
  • -
  • 2017.01.01更新:增加了作者搜索,优化了分页逻辑。

    -
  • -
  • 2017.3.7更新:重写了前端,优化了php代码。

    -
  • -
  • 欢迎反馈问题。可以提问issue也可以通过grt1stnull@gmail.com联系我。后续也会进行其他细节优化。

    -
  • -
-

0x06.后记

    -
  • 本来打算把wooyun_public布置在我的树莓派上,因为一些原因失败,所以萌生了自己搭建的念头

    -
  • -
  • 总共搭建了十天,接触了js、bootstarap、beautifulsoup、mysqldb、mysqli和pdo。虽然以前也会css与php,但这是第一次真正写一个动态网页,感觉很棒。

    -
  • -
-

0x07.其他

    -
  • 本程序只用于技术研究和个人使用,程序组件均为开源程序,漏洞和知识库来源于乌云公开漏洞,版权归wooyun.org。

    -
  • -
  • 新浪微博:http://weibo.com/grt1st

    -
  • -
  • 个人邮箱:grt1stnull@gmail.com

    -
  • -
-
- -
- -

No.10 https://github.com/LubyRuffy/wyquery

-

Watch:12___Star:109___Fork:92

-

wyquery

Wooyun公开的漏洞详情是一个很好的资源,但是没有提供很好的搜索引擎和排序功能来进行数据分析,所以,这个项目用户镜像wooyun上已经对外公开的漏洞详情,并提供更多搜索和排序的功能。

-

你有没有想完成如下功能?

-
    -
  • 我想只看给钱的漏洞
  • -
  • 我想只看带乌云标志的漏洞
  • -
  • 我想按照rank排序漏洞
  • -
-

如果有,那你跟我遇到的问题一样,不妨试试这个项目!线上已经搭建好的DEMO环境如下:http://120.27.41.90/

-

搭建环境

建议在Linux下运行,当然Windows下也可以。Ruby 2.0+

-
1
2
3
4
5
git clone https://github.com/LubyRuffy/wyquery.git
cd wyquery
bundle install
rake db:migrate
rails s
- -

然后访问http://0.0.0.0:3000

-

初次抓取数据

1
2
cd wyquery
ruby ./tools/import_bugs.rb
- -

同步数据

这时可以建立定时任务

-
1
2
crontab -e
*/10 * * * * <wyquery路径>/tools/import_bugs.rb
- -
- -
- -

No.11 https://github.com/jas502n/fuzz-wooyun-org

-

Watch:3___Star:96___Fork:49

-

fuzz-wooyun-org

WooYun Fuzz 库

-
- -
- -

No.12 https://github.com/xinali/wooyun

-

Watch:6___Star:95___Fork:42

-

wooyun

wooyun datasets

    -
  • usernames
  • -
  • passwords
  • -
  • URLs
  • -
  • sensitive data patterns
  • -
  • fuzzing payloads
  • -
  • web shells
  • -
-
- -
- -

No.13 https://github.com/l3m0n/wooyun-wiki

-

Watch:5___Star:75___Fork:55

-

wooyun-wiki

wiki.wooyun.org的部分快照网页

-
- -
- -

No.14 https://github.com/fxfactorial/wooyun.github.io

-

Watch:6___Star:44___Fork:33

-

【没有 Readme.md 介绍】


- -
- -

No.15 https://github.com/CaledoniaProject/wooyun_offline_ui

-

Watch:4___Star:40___Fork:19

-

说明

花了10分钟重做了一套乌云离线Web UI,重做总共有两个目的,

-
    -
  1. 没必要使用14GB的虚拟机,经过处理,40K漏洞只占用500MB mongodb 硬盘空间
  2. -
  3. 上述作者没有提取 关注数、是否为有奖励或者漏洞预警的漏洞 等几个关键字段
  4. -
-

特性

支持漏洞标题搜索、漏洞wooyun id搜索

-

screen

-

支持漏洞查看(删除了评论),原始 wooyun UI

-

screen2

-

安装

复制 src 到 web 目录,e.g

-
1
cp -R src ~/web/wooyun_offline
- -

安装 php-mongo 扩展

-

mongo 默认为 127.0.0.1:27017,如有不同,修改 src/config.php 即可

-
1
2
3
4
5
<?php
$config = array(
'mongodb' => 'mongodb://127.0.0.1:27017'
);
?>
- -

导入数据

导入到 wooyun 数据库,bugs 表即可

-

由于政策风险,我不能提供数据,可以用网上的14GB虚拟机导出

-

然后使用 src/scripts/minify.pl 精简 mongo 数据库

-

已知问题

    -
  1. 缺少 images/blood.png
  2. -
  3. 漏洞库不全,可惜没用高权限账号爬
  4. -
-
- -
- -

No.16 https://github.com/lxj616/DVWA-WooYun

-

Watch:1___Star:23___Fork:16

-

DVWA-WooYun

DVWA-WooYun is a plugin-set for DVWA , with plugins based on wooyun.org real bug reports

-

It should have been a fork of the RandomStorm/DVWA , But while I was coding it , I didn’t know a thing about github :(

-

And now I do , so scavenged old codes to github

-

And I modified lot of things , can’t remember why , just messed around , It seems to be not able to merge with the original DVWA now

-

DAMN VULNERABLE WEB APP

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.

-

WARNING!

Damn Vulnerable Web App is damn vulnerable! Do not upload it to your hosting provider’s public html folder or any working web
server as it will be hacked. I recommend downloading and installing XAMPP onto a local machine inside your LAN which is used solely for testing.

-

We do not take responsibility for the way in which any one uses Damn Vulnerable Web App (DVWA). We have made the purposes of the application clear and it should not be used maliciously. We have given warnings and taken measures to prevent users from installing DVWA on to live web servers. If your web server is compromised via an installation of DVWA it is not our responsibility it is the responsibility of the person/s who uploaded and installed it.

-

License

This file is part of Damn Vulnerable Web App (DVWA).

-

Damn Vulnerable Web App (DVWA) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

-

Damn Vulnerable Web App (DVWA) is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

-

You should have received a copy of the GNU General Public License
along with Damn Vulnerable Web App (DVWA). If not, see http://www.gnu.org/licenses/.

-

Download

DVWA is available either as a package that will run on your own web server or as a Live CD

-
    -
  • DVWA v1.0.8 (latest) - (1.3MB) Download
  • -
  • DVWA v1.0.7 LiveCD - (480MB) Download
  • -
-

Installation

Default username = admin

-

Default password = password

-

Installation video:
http://www.youtube.com/watch?v=GzIj07jt8rM

-

The easiest way to install DVWA is to download and install ‘XAMPP’ if you do not already have a web server setup.

-

XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

-

XAMPP can be downloaded from:
http://www.apachefriends.org/en/xampp.html

-

Simply unzip dvwa.zip, place the unzipped files in your public html folder, then point your browser to http://127.0.0.1/dvwa/index.php

-

Database Setup

To set up the database, simply click on the Setup button in the main menu, then click on the ‘Create / Reset Database’ button. This will create / reset the database for you with some data in.

-

If you receive an error while trying to create your database, make sure your database credentials are correct within /config/config.inc.php

-

The variables are set to the following by default:

-
1
2
3
$_DVWA[ 'db_user' ] = 'root';
$_DVWA[ 'db_password' ] = '';
$_DVWA[ 'db_database' ] = 'dvwa';
- -

Troubleshooting

For the latest troubleshooting information please visit:
http://code.google.com/p/dvwa/issues/list

-

+Q. SQL Injection wont work on PHP version 5.2.6.

-

-A.If you are using PHP version 5.2.6 you will need to do the following in order for SQL injection and other vulnerabilities to work.

-

In .htaccess:

-

Replace:

-
1
2
3
4
5
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
#php_flag allow_url_fopen on
#php_flag allow_url_include on
</IfModule>
-

With:

-
1
2
3
4
5
<IfModule mod_php5.c>
magic_quotes_gpc = Off
allow_url_fopen = On
allow_url_include = On
</IfModule>
-

+Q. Command execution won’t work.

-

-A. Apache may not have high enough priviledges to run commands on the web server. If you are running DVWA under linux make sure you are logged in as root. Under Windows log in as Administrator.

-

+Q. My XSS payload won’t run in IE.

-

-A. If your running IE8 or above IE actively filters any XSS. To disable the filter you can do so by setting the HTTP header ‘X-XSS-Protection: 0’ or disable it from internet options. There may also be ways to bypass the filter.

-

Homepage: http://www.dvwa.co.uk

-

Project Home: https://github.com/RandomStorm/DVWA

-

Created by the DVWA team

-
- -
- -

No.17 https://github.com/neargle/SecNewsBak

-

Watch:2___Star:20___Fork:17

-

README

该项目只用于备份Sec-News上Drops乌云知识库的失效文章,并非Drops整站文章。

-

文章列表如下:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
drops_arti_list = [
"SQL注入速查表(上)",
"WMI Attacks",
"攻击洋葱路由(Tor)匿名服务的一些综述",
"SQL注入速查表(下)与Oracle注入速查表",
"Hacking ipcam like Harold in POI",
"海豚浏览器与水星浏览器远程代码执行漏洞详解",
"WMI Backdoor",
"手把手教你当微信运动第一名 – 利用Android Hook进行微信运动作弊",
"WMI Defense",
"Tomcat安全配置",
"利用Weblogic进行入侵的一些总结",
"工控安全入门分析",
"利用被入侵的路由器获取网络流量",
"利用白名单绕过360实例",
"浅析大规模DDOS防御架构-应对T级攻防",
"XCode编译器里有鬼 – XCodeGhost样本分析",
"借用UAC完成的提权思路分享",
"TcpDump使用手册",
"被人遗忘的Memcached内存注射",
"利用被入侵的路由器迈入内网",
"Android sqlite load_extension漏洞解析",
"CTF主办方指南之对抗搅屎棍",
"域渗透的金之钥匙",
"比葫芦娃还可怕的百度全系APP SDK漏洞 - WormHole虫洞漏洞分析报告",
"那些年做过的ctf之加密篇",
"从一个锁主页木马里挖出的惊天“暗杀黑名单”",
"C&C控制服务的设计和侦测方法综述",
"Python安全编码指南",
"翻墙路由器的原理与实现",
"几期『三个白帽』小竞赛的writeup",
"拆分密码",
"变种XSS:持久控制",
"使用32位64位交叉编码混淆来打败静态和动态分析工具",
"給初學者的DLL Side Loading的UAC繞過",
"Joomla远程代码执行漏洞分析",
"网络小黑揭秘系列之黑色SEO初探",
"一步一步学ROP之Android ARM 32位篇",
"Linux入侵检测基础",
"Android WebView File域攻击杂谈",
"小议Linux安全防护(一)",
"Powershell 提权框架-Powerup",
"Android Linker学习笔记",
"MD5碰撞的演化之路",
"Android应用安全开发之源码安全",
"Ruby on Rails 动态渲染远程代码执行漏洞 (CVE-2016-0752)(翻译)",
"中间人攻击 -- Cookie喷发",
"域渗透——Security Support Provider",
"LUA脚本虚拟机逃逸技术分析",
"我的通行你的证",
"在不需要知道密码的情况下 Hacking MSSQL",
"代码审计入门总结",
"Linux服务器应急事件溯源报告",
"Head First FILE Stream Pointer Overflow",
"从 WTForm 的 URLXSS 谈开源组件的安全性",
"网络小黑揭秘系列之黑产江湖黑吃黑—中国菜刀的隐形把手",
"简单验证码识别及工具编写思路",
"中国菜刀仿冒官网三百万箱子爆菊记",
"Rails Security (上) ",
"富文本存储型XSS的模糊测试之道",
"主机被入侵分析过程报告",
"Exploring SSTI in Flask/Jinja2 | WooYun知识库",
"0ctf writeup",
"一个支付宝木马的分析溯源之旅",
"QQ模拟登录实现后篇",
"渗透技巧——通过cmd上传文件的N种方法",
"通过ELF动态装载构造ROP链 ( Return-to-dl-resolve)",
"Mysql报错注入原理分析(count()、rand()、group by)",
"利用反射型XSS二次注入绕过CSP form-action限制",
"渗透Hacking Team过程",
"“信任“之殇――安全软件的“白名单”将放大恶意威胁",
"百脑虫之hook技术",
"内网渗透中转发工具总结",
"TCP安全测试指南-魔兽3找联机0day",
"CVE-2016-3714 - ImageMagick 命令执行分析",
"CVE-2016-1897/8 - FFMpeg漏洞分析",
"漫谈流量劫持",
"新姿势之Docker Remote API未授权访问漏洞分析和利用",
"利用CouchDB未授权访问漏洞执行任意系统命令",
"利用环境变量LD_PRELOAD来绕过php disable_function执行系统命令",
"CTF中比较好玩的stego",
"linux下tomcat安全配置",
"MySQL和PostgreSQL数据库安全配置",
"内网渗透思路探索之新思路的探索与验证",
"小窥TeslaCrypt密钥设计",
"Do Evil Things with gopher://",
"三个白帽条条大路通罗马系列2之二进制题分析",
"Android安全开发之Provider组件安全",
"漏洞检测的那些事儿 ",
"QQ浏览器隐私泄露报告",
"三个白帽之从pwn me调试到Linux攻防学习",
"渗透中寻找突破口的那些事",
"Struts2 S033与最新S037详细分析",
"DB2在渗透中的应用",
"Python urllib HTTP头注入漏洞 (中文翻译)",
"SQL注入关联分析",
"Anti-debugging Skills in APK",
"玩转Metasploit之Automated Persistent Backdoor",
"Uber渗透案例:我们是如何发现你是谁,你在哪,你要打车去哪!",
"玩转Metasploit之Automated Persistent Backdoor",
"Docker安全那些事 ",
"Use bitsadmin to maintain persistence and bypass Autoruns ",
"CTF中那些脑洞大开的编码和加密 ",
"Jenkins RCE 2(CVE-2016-0788)分析及利用",
"小议安卓定位伪造-实战足不出户畅玩pokemon go",
"三个白帽挑战赛之[续集]火币网2W大挑战Writeup"
]
- -
- -
- -

No.18 https://github.com/acgpiano/wooyun-node

-

Watch:2___Star:9___Fork:8

-

wooyun-node

这是wooyun.org镜像的node.js版本,用的mysql,支持标题,作者,类型,厂商检索。
方便新手小白使用,搭建方法非常简单。
首先需要安装mysql,要把数据库语言设置成utf8(非常重要,不然会出错)。由于各个系统设置方法不同,需自行百度。检测是否成功可以登进数据库,执行

-
1
status;
-

如果是以下状态,就代表可以下一步了。
把该项目克隆到本地

-
1
git clone https://github.com/acgpiano/wooyun-node.git
-

修改config.js里面的用户名和密码,改为你的mysql的用户名和密码,port是服务的端口,可以自行修改。
下载wooyun的静态资源:
链接: 百度网盘 密码: mqnp
需要解压到wooyun-node/static/bugs/
文件夹下面(自行新建bugs文件夹)
接下来安装node.js,去官网下载就好了。
接下来安装cnpm(如果可以连Internet这一步可以忽略,以下命令的cnpm全都可以用npm代替)

-
1
npm install -g cnpm --registry=https://registry.npm.taobao.org
-

然后在wooyun-node里执行

-
1
cnpm install
-

等所有的依赖装完再执行

-
1
npm run db
-

等数据库建表完后,共40293条,再执行

-
1
npm start
-

默认port端口是9999,可以在config.js里面修改
打开浏览器 http://127.0.0.1:9999就可以使用了。

-

仅供自学使用,如果要部署到公网可以自己改用orm,修改表结构加速查询,防注入。

-
- -
- -

当然是彩蛋辣~

上面提到的 Baidu网盘 链接整理:

-

https://github.com/hanc00l/wooyun_public
Watch:224___Star:3586___Fork:1.8k

-
-
1
2
3
4
5
6
7
虚拟机下载地址:
https://pan.baidu.com/s/1HkR4ggvAwTikshsjcKYBuA ,提取密码:8wnb(2018.4.23更新)
【文件名:ooyun_vmware_201606_es】

虚拟机下载地址: https://pan.baidu.com/s/1qYRqa3U 密码: w8vb (2017.7.4)
【文件名:wooyun_final】
虚拟机用户名、密码为hancool/qwe123
-
-

https://github.com/m0l1ce/wooyunallbugs
Watch:21___Star:398___Fork:154

-
-
1
2
链接:https://pan.baidu.com/s/1htwVF3Q 密码:oskw
【文件名:wooyun-15-a.zip等】
- -
-

https://github.com/grt1st/wooyun_search
Watch:22___Star:327___Fork:157

-
-
1
2
3
4
5
静态网页网盘链接:
bugs 链接: https://pan.baidu.com/s/1n_kkUaZZxcTEa4-v6sGa9Q 密码: sg98 (20180707)
【文件名:WooYun_Bugs(漏洞库)】
drops 链接: https://pan.baidu.com/s/1r2Y7rfntwnjglX6HtzDk6w 密码: 738f (20180707)
【文件名:WooYun_Drops(知识库)】
- -
-

https://github.com/acgpiano/wooyun-node
Watch:2___Star:9___Fork:8

-
-
1
2
链接: https://pan.baidu.com/share/init?shareid=3613354206&uk=4113422303 密码: mqnp
【文件名:WooYun_Bugs(漏洞库)】
- -
- -
- -

当然还有彩蛋辣~

新建一个文件夹,在里面打开终端,复制粘贴下面代码,或者保存为 .sh (linux)、 .bat (Windows),命令行调用辣

-

注意:最后三个库特别大,如果网络不好,可能出现 git 连接超时,可以连接更优网络,或参考我的文章

- -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
echo .
git clone https://github.com/hanc00l/wooyun_public
echo .
git clone https://github.com/boy-hack/wooyun-payload
echo .
git clone https://github.com/m0l1ce/wooyunallbugs
echo .
git clone https://github.com/SuperKieran/WooyunDrops
echo .
git clone https://github.com/SuperKieran/wooyun-img
echo .
git clone https://github.com/grt1st/wooyun_search
echo .
git clone https://github.com/LubyRuffy/wyquery
echo .
git clone https://github.com/jas502n/fuzz-wooyun-org
echo .
git clone https://github.com/xinali/wooyun
echo .
git clone https://github.com/l3m0n/wooyun-wiki
echo .
git clone https://github.com/fxfactorial/wooyun.github.io
echo .
git clone https://github.com/CaledoniaProject/wooyun_offline_ui
echo .
git clone https://github.com/lxj616/DVWA-WooYun
echo .
git clone https://github.com/neargle/SecNewsBak
echo .
git clone https://github.com/acgpiano/wooyun-node
echo .
git clone https://github.com/Xyntax/1000php 1000php-Xyntax
echo .
git clone https://github.com/starnightcyber/1000php 1000php-starnightcyber
echo .
git clone https://github.com/jiji262/wooyun_articles
echo .
- - -
- - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/03/cpp-with-Visual-Studio-2019/index.html b/2020/03/cpp-with-Visual-Studio-2019/index.html deleted file mode 100644 index 33893c1..0000000 --- a/2020/03/cpp-with-Visual-Studio-2019/index.html +++ /dev/null @@ -1,669 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 用 Visual Studio 2019 写 C++ 基础代码 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 用 Visual Studio 2019 写 C++ 基础代码 -

- - -
- - - - -
- - -

什么?你不会用VS?

-

准备工作

安装 Visual Studio2019 Community,不多说了,虽然可能出现很多问题。这里假定你已经有安装好的 VS2019。

-

打开VS,创建项目

打开VS2019,看到如下界面。

-

image-20200306134632068

-

选择C++,Windows,选择控制台应用。

-

image-20200306134730096

-

填写项目名称和存储位置,点击创建。

-

image-20200306134821590

-

然后就会打开工程界面,在右边的解决方案资源管理器,源文件,可以找到刚才填写的名字的cpp文件,双击打开(默认会打开的),在左边正常编写代码,按 F5 运行,或点击上面绿色三角形,“本地Windows调试器”,(可以直接点也可以菜单栏选择调试,开始执行不调试(快捷键Ctrl+F5))

-

image-20200306134954770

-

没有“控制台应用”选项?

创建项目窗口,拉到最下面,找到安装

-

image-20200306135632223

-

在打开的窗口,勾选安装这三个。(其他的可以根据需要添加)(如果你确实不用VS开发高级应用,只勾选“使用C++的桌面开发”也就可以了)

-

image-20200306135706897

-

另外需要注意的是,如果想要图形化设计程序界面,(即MFC),需要在勾选“使用C++的桌面开发”之后,勾选右边的 C++ MFC v142

-

image-20200306135751221

-

,然后开始安装即可。可以选择下载时安装(下载一个安装一个),下载完成安装(全部下载完再一起装),我个人偏好后一种

-

(等待巨长时间,安装完成后再同理创建项目。)

-

用VS进行简单调试

断点

在需要暂停的代码这一行前面灰色区域鼠标单击,出现一个红色圆点,就是下断点。

-

image-20200306141237786

-

F5 开始调试,或点上方“本地Windows调试器”或菜单栏调试,开始调试。

-

VS界面会发生变化,且之前下断点位置会变成橙色箭头,表示程序当前正在执行这一行代码。此时程序暂停,可以查看变量值和一行一行运行程序。

-
    -
  • 鼠标悬停在变量上,可以查看变量值。

    -
  • -
  • 选中变量,右键,添加监视,可以在下方监视面板自动显示变量值

    -
  • -
  • 在代码里鼠标右键,快速监视,输入变量名,可以添加多个变量监视,也可以添加表达式监视,比如a+b+c

    -
  • -
-

image-20200306142152438

-

单步运行

图示的四个按钮。

-
    -
  • 显示下一条语句
  • -
  • 逐语句
  • -
  • 逐过程
  • -
  • 跳出
  • -
-

image-20200306142607239

- -
- - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/03/how-to-ask-in-group-chat/index.html b/2020/03/how-to-ask-in-group-chat/index.html deleted file mode 100644 index 82c4266..0000000 --- a/2020/03/how-to-ask-in-group-chat/index.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 群里提问的艺术 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 群里提问的艺术 -

- - -
- - - - -
- - -

现在互联网发达的时代,大家都会有很多的群,xxx 交流群、xxx 技术交流、xxx开发群、xxx技术学习群等,大家的初心可能都是想交流的,遇到点问题然后就可以在群里问。

-

然而很多时候你问的问题没人回答;也有时候问了半天还是没找到答案;也有时候当你把问题发出来了,别人正准备回答你的时候,你说知道了;然后刚开始群里很活跃,慢慢的就死了。

-

其实以上问题,都是大家不想看到的,然而在群里提问是我们加入群的初心,但是很多人做不好,最终导致你的问题无人解答,群慢慢的失去意义。

-

今天我所谈的就是群里提问的艺术,让你的问题快速得到解决。

-

我将今天的问题分成以下三部分进行介绍:

-
    -
  • 提问之前
  • -
  • 提问之时,怎么提问
  • -
  • 注意事项
  • -
-

提问之前

在群里提问之前首先我们应该做好功课,看自己是否完成以下步骤,否则你的提问将一塌糊涂,大概率得不到想要 的答案。

-
    -
  1. 尝试自己解决
  2. -
  3. 不能自己解决应该准备的哪些
  4. -
-

尝试自己解决

尝试自己解决是非常重要的一步,这也是我们能否经过这个问题能够成长的关键所在。

-
    -
  1. 通过搜索引擎搜索:baidu 或者 google(推荐),搜索结果中前三页如果找不到你想要的信息,就进行下一步吧。对于成熟的开源项目,你遇到的问题,很可能别人也遇到过。这时通过 Google、StackOverflow 等网站的搜索服务,可以帮你快速定位并解决问题。永远记住,地球上的你并不孤单,包括你遇到的问题。
  2. -
  3. 查阅手册/文档:确保自己阅读过至少一次官方文档。这样在遇到问题时,如果能回忆起只言片语,就可以再去读一遍相关文档,问题往往也就解决了。
  4. -
  5. 查阅社区/论坛:阅读常见问题文件(FAQ)或者开源项目的 issue,或者论坛(类似 react china)
  6. -
  7. 询问朋友:如果你使用的开源软件,在朋友圈或同事圈里也有人使用,那么抬起你的脚、或拿起你的电话,真挚诚恳的探讨不会遭遇拒绝,而会增进友谊。不要犹豫,你的内心渴望面对面交流,你的朋友也是。
  8. -
  9. 自检并不断测试:试自己检查或试验以找到答案。
  10. -
  11. 阅读源码(这步非必须):如果你是程序开发者,尽量尝试阅读源码以找到答案。
  12. -
-

经过以上 6 步或者 5 步你都无法解决遇到的问题,那么你确实针对这个问题能力有限,准备去群里请教了,那么在尝试自己解决之后无果,应该做哪些准备呢?

-

不能自己解决应该准备的哪些

    -
  1. 一定要明白自己想要问什么问题:不能自己都说不清自己想要问什么问题,那么群里提问你也问不出什么来。
  2. -
  3. 梳理准备您的问题:要说明之前你都干了些什么。
  4. -
  5. 要用言简意赅的语言:这个是我们作为职场一个必备的技能,说重点,言简意赅。
  6. -
-

怎么提问

抱着平和对等的心态,找到合适的途径后,就得静下心来将遇到的问题写成文字。书写文字不是一件简单的事情,我们可以从遵循一些简单的规则开始。

-

用词准确,问题明确

标题要简洁清晰,要言之有物。

-
-

Bad:救命呀/急/跪求,遇到了一个 react 问题,xxx 组件渲染不出来

-

Good:在使用 xxx 版本的 react ,我操作了 xxx,也写了 xxx,但是 xxx 组件渲染不出来

-
-

一个好标题范例是目标 —— 差异式的描述,许多技术支持组织就是这样做的。在目标部分指出是哪一个或哪一组东西有问题,在差异部分则描述与期望的行为不一致的地方。

-

描述清晰,信息充足

    -
  1. 准确有效的信息:描述事实,而不是猜测,如果你想给出你的猜测,一定要先描述事实,给你的猜测一些证据,不然就不要猜测。
  2. -
  3. 问题表现/内容:按照时间顺序列出问题症状。问题发生前的一系列操作,往往就是对找出问题最有帮助的线索。因此,你的说明里应该包含你的操作步骤,以及机器和软件的反应,直到问题发生。在命令行处理的情况下,提供一段操作记录(例如运行脚本工具所生成的),并引用相关的若干行(如 20 行)记录会非常有帮助。
  4. -
  5. 简单的做过什么尝试:在描述你做过什么尝试的时候,简单的你描述你做了哪些尝试就行,为什么要这么做其实不是那么重要。
  6. -
-

如果你想弄清楚如何做某事(而不是报告一个 Bug),在开头就描述你的目标,然后才陈述重现你所卡住的特定步骤。

-

经常寻求技术帮助的人在心中有个更高层次的目标,而他们在自以为能达到目标的特定道路上被卡住了,然后跑来问该怎么走,但没有意识到这条路本身就有问题。结果要费很大的劲才能搞定。

-

玉伯有句话是这么说的:

-
-

提问者选择的路本身就是一条崎岖之路,对于要解决的问题,实际上有更好的方式。这种情况下,描述清楚目标,讲清楚要干什么非常重要。

-
-
    -
  1. 想要问到什么:提供建议?发送一段代码?检查你的补丁或者别的?在群里经常会出现这种情况,当某个人发了一段文字,另外的人说:你想问什么?
  2. -
-

所以我们在问问题的时候一定要把你想要问到什么,这个目标想清楚。

-
    -
  1. 提供尽量多的信息:尽量提供可重现的例子,你可以在 jsbin)、runjsjsfiddle)、codepen 等这些地方提供一个可重现的例子。即使你是一个很大的项目,想办法把你需要验证的点提取出来,如果确实无法提取,就贴一些代码,出现问题那行代码周围的代码(周围的相关代码都要,因为你可能觉得不是他们的问题,但也许就是,不然你觉得的都是对的,你就不会不知道怎么解决了)。
  2. -
-

避免一些毫无意义的问题

经常会有人问一些毫无意义的问题,比如这样的:

-
-

Bad:有没有人会xxx?

-

Bad: 有没有人在?

-

Bad: 谁能帮我解决一个问题?

-
-

面对这种问题,别人就很难预估你这个问题需要解决多久,也很难判断自己是否能解决这个问题,如果他回答了你,意味着你就是有空而且很在行,所以他还是选择不出声。这个就跟微信私聊的时候说:”在吗?“ 这种一个意思。

-
-

Bad: 什么是 JavaScript?

-
-

这种问题也是,很明显通过搜索引擎就能搞定的,要是下次还有这种问题,你就把这个图发给它。

-

img

-

建议的问法:

    -
  1. 有问题直接问。比如:ES6什么时候雄霸天下,前端什么时候一统江湖?
  2. -
  3. 直接说场景:我在做xx端东西的时候,在 window 7 平台的 IE7 版本下遇到了左右不对齐问题,具体如图所示img,代码地址:http://www.jsbin.com/xxxx,在百度中找到的答案,试了之后还是有同样的问题。请有空的同学帮我看看是什么问题?
  4. -
-

注意事项

    -
  • 提前做好冷场的准备:也许别人在忙,也许这个问题太简单了,也许没人做过这块,如果冷场了,没人回答,赶紧换下一个群。
  • -
  • 谦虚,别人没有义务帮你解决问题,往往大牛的时间比你少,比你珍贵。
  • -
  • 没有一定的自学能力,问到问题就伸手的不适合玩这个。
  • -
  • 群唯一的作用就是:扯淡、交流、分享,以上几条为前提。
  • -
-

如果觉得问题记不住,收藏一下这个图吧:

-

img

-

最后

其实对于问问题,我们换位思考一下就更好了,这其实也是人际交往的方式,站在看你提问题的角度,想想当别人提问题的时候,你想让他问什么,你才愿意去回答。

-

当然除了在群里提问,在社区里提问,论坛里提问都有一定的规范,后面再慢慢补充吧。

-
-
-

版权属于:桃翁

-

本文链接:http://taoweng.site/index.php/archives/215/

-

转载时须注明出处及本声明,欢迎关注我的公众号「前端桃园」

-
-

.

-

(这真就原封不动的照搬呗)

-
-

《提问的智慧》

另外还想再贴一个,最经典的,最最经典的(也最长最复杂的):

-

《提问的智慧》,来自 Github 。其实最初是 Eric S. Raymond, Rick Moen 创作的,然后 ryanhanwu 翻译了并放在 Github 上作为一个开源项目,截止本文写作时,该项目已有 10.2k Star,2.8k Fork。

-

另外,由于这个是国外作者创作的,所以其中出现的案例论坛等一般是国外常见论坛,也可以了解一下。

-

【警告】:本文十分冗长,建议在有闲暇时间时仔细浏览。

-

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/03/let-onedrive-fly-scientifically/index.html b/2020/03/let-onedrive-fly-scientifically/index.html deleted file mode 100644 index 52b8a8d..0000000 --- a/2020/03/let-onedrive-fly-scientifically/index.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 科学地让 OneDrive 飞,下载速度 5Mb/s | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 科学地让 OneDrive 飞,下载速度 5Mb/s -

- - -
- - - - -
- - -

OneDrive 是 Microsoft 的一个云存储服务,安装后集成在 Windows 资源管理器,所以比其他任何网盘都更有其与生俱来的优势。但由于众所周知的原因,OneDrive 的访问速度也极低。
访问速度慢还不算了,还经常会死在某个进度,一直下不动,这是最**的

-image-20200321165324494 -
你看这 243KB/秒 长得多标致啊
- - -

解决方案

    -
  1. ShadowsocksR
  2. -
  3. Proxifier
  4. -
  5. 设置 OneDrive 多线程
  6. -
-

1. ShadowsocksR

略。

-

配置好之后应该是会开启 127.0.0.1:1080 ,HTTP、Socks5 均有(没出问题的话默认就是这个配置)

-

2. Proxifier

搜索Proxifier找到官网:https://www.proxifier.com/download/

-image-20200321172127587 - -

下载 Proxifier Standard Edition ,这个是安装版,Portable是绿色版,这里不用绿色版。

-

下载下来exe双击安装,安装过程中勾选Create a desktop shortcut,完了之后会默认打开软件,关掉它(你也可以在最后一步取消勾选Launch Proxifier)

-

在桌面快捷方式右键,用管理员权限运行。打开之后是长这个样子的:

-image-20200321175935712 - -

选择31天试用,或者输入注册码,如果输入注册码,最好是勾选All userss on this computer(require administrator),然后就会打开程序主界面

-

image-20200321180424905

-

我们当然是希望开机启动,所以开启Autostart

-image-20200321191843270 - -

通过Profile->Proxy Servers,添加 HTTPS 和 Socks5 代理配置

-image-20200321181035454 - -

通过Profile->Proxification Rules,配置软件代理规则

-

image-20200321182841860

-

我们在这里添加OneDrive。

-

先找到OneDrive的可执行文件的位置。一般应该是在%localappdata%\Microsoft\OneDrive\

-

如果没有,运行OneDrive,打开任务管理器,在详细信息标签页,找到onedrive.exe,右键打开文件所在位置

-

点击上面窗口的Add,添加配置。点击Browse输入OneDrive目录,选择onedrive.exe,action选择通过socks5代理

-image-20200321183611160 - -

保存,并把 default 的 action 设置为 direct(你也不希望所有程序都通过代理对吧)

-image-20200321183553240 - -

任务栏里面右键 OneDrive,更多,关闭 OneDrive,再找到刚才的OneDrive程序位置,开启OneDrive。

-

我们随便下载一个文件看看:

-

image-20200321191651660

-

3. 设置 OneDrive 多线程

你好像速度没我快?那肯定是你氪金不够(bushi),那就试试开启 OneDrive 多线程

-
1
2
3
4
修改这个文件:
"%localappdata%\Microsoft\OneDrive\settings\Personal\global.ini"
可通过win r运行,或cmd里运行下面直接打开修改:
notepad "%localappdata%\Microsoft\OneDrive\settings\Personal\global.ini"
- -

第一行加入:

-
1
numberOfConcurrentUploads=3
- -
-

PS:数值项即为线程数,最小值为1,最大值为3,根据实际需要选择即可

-
-image-20200321193422745 - -

效果:(奇怪的网速增加了)

-

image-20200321213449574

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/03/why-linux/index.html b/2020/03/why-linux/index.html deleted file mode 100644 index 6b20d9f..0000000 --- a/2020/03/why-linux/index.html +++ /dev/null @@ -1,727 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Why linux | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- Why linux -

- - -
- - - - -
- - -

学习Linux之前,了解Linux哲学和Linux设计思想是必要的。

-

然后就是开始敲命令了啦

-

Linux哲学

知乎:《unix/linux 设计哲学》

https://zhuanlan.zhihu.com/p/57521605

-

内容太多,不要求完全记住。可以以后回来再翻阅

-

博客园:Linux的哲学思想

Linux哲学思想:

-
    -
  1. 一切皆文件;
  2. -
  3. 小型,单一用途的程序;
  4. -
  5. 连接程序,共同完成复杂功能;
  6. -
  7. 避免令人困惑的用户界面;
  8. -
  9. 配置数据存储在文本中;
  10. -
-

解释:
一切皆文件:是 Unix/Linux 的基本哲学之一。不仅普通的文件,目录、字符设备、块设备、 套接字等在 Unix/Linux 中都是以文件被对待;它们虽然类型不同,但是对其提供的却是同一套操作界面。

-

小型,单一用途的程序:程序和可执行文件不要太复杂,这样才能保证了linux内核的高效运行

-

连接程序,共同完成复杂功能:复杂的任务可以通过连接多个简单的程序实现复杂的功能。对于复杂的功能linux通过许多简单程序的组合等方式实现,在保证简单功能的高效性的同时,复杂的程序也必然是高效性的

-

避免令人困惑的用户界面:如windows那样出了问题一般人选择的会是重启,实在是不行的话就是 重新 安装系统了,因为对于windows那样不是开源的,并且用户界面比较 复杂操作系统出了问题,一般的人是根本没有办法解决的。但是linux就不一样了,第一linux是开源的,无论什么问题都可以通过简洁的命令行实现 排错,修改系统的配置,一切都是简洁明了为基础。

-

配置数据存储在文本中:linux所有的配置文件都存放在文本配置文件当中,无论什么配置修改都只需修改其配置文件即可,配置文件时文本形式的只需任意一款文本编辑器修改即可而不是类似于windows那样将保存在注册表中,并且windows的注册表需要专门的二进制或十六进制的编辑器才可编辑,修改比较复杂

-

bilibili:Linux哲学视频资料1:

哲学的魅力 | 非Windows系统家族的魅力之所在:“一切皆文件”

-

https://www.bilibili.com/video/BV1Yb411g79x

-

(命令不会没关系,了解一下“哲学”就好)

-

bilibili:Linux哲学视频资料2

TED-Linux背后的精神 _ Linus Torvalds

-

https://www.bilibili.com/video/BV1a4411t7Kt?p=1

-

(一个有英文字幕的双语版本:)

-

https://www.bilibili.com/video/BV1J7411v7BD

-
-

系统目录结构

Linux 里面最重要的概念估计就是“一切皆文件”了,我们来看看Linux系统的根目录结构。

-

首先是 Linux 不像 Windows 这种,系统里面看起来有多个“盘”,C,D,E,F,什么的,

-

在 Linux,只有一个“盘”(可以假想成 C盘),但是里面文件夹却有很多。

-

img

-

我们来看看菜鸟教程 Linux 部分是怎么说的:

-

https://www.runoob.com/linux/linux-system-contents.html

-

其中用得比较多的文件夹也不是很多啦:

-
1
2
3
4
5
6
7
/dev	虚拟的,你的硬件设备会列出在这里
/etc 配置文件的集散地
/home 用户目录,相当于 Windows 的 %USERPROFILE% (你可以试试把这个输入资源管理器的地址栏回车)
/media 一些设备出现在这里
/mnt 用于挂载文件系统(插入U盘并挂载后在这里找)(wsl可以在这里访问主系统文件)
/bin | /usr/bin | /usr/sbin 你看到文件出现在这里,那大概率是可执行程序这样的东西了
/var 做 web 你会爱死的
- -
-

Linux终端

终端(Terminal),也叫命令行,顾名思义,输入命令的地方。就是经常见到的黑窗口(当然并不见得都是黑的)

-

命令行是 Linux 最常见的状态,GUI (Graphical User Interface,图形用户界面) 反而不是

-

在 Linux 终端干得最多的一件事当然是敲命令了,命令一般是如下格式:

-

command [-option] parameter1 parameter2...

-

我们来看几个参考链接:

-

图示直观的:https://blog.csdn.net/pl0020/article/details/82012881

-

分析有理的:https://blog.csdn.net/wangjianno2/article/details/16344807

-

详细深入的:http://c.biancheng.net/view/720.html

-

这里还想 bb 几句:

-
    -
  1. Windows Linux都有命令行(Windows早期DOS也是命令行系统),但是操作习惯有些小不同
  2. -
  3. Windows 参数一般是 /option,Linux 大多是 -option --option
  4. -
  5. Windows 获取帮助一般是 /? ,Linux 大多是 -h -help --help
  6. -
  7. Windows 路径以反斜杠 \ 分隔,Linux 路径由正斜杠 / 分隔
  8. -
  9. Windows 命令行能运行 .bat 批处理脚本,Linux终端能运行 .sh 批处理脚本,语法大部分不同,少数相同
  10. -
-
-

开始背命令吧

必学的少数命令

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lsllcdtouchclearpwdmkdircatmore
lesstailcpmvrm(谨慎)findvi/vim|grep
pskillipconfigtarrebootshutdownhaltchmod
-

这里是一些介绍:https://blog.csdn.net/weixin_44706512/article/details/90604635

-

菜鸟教程:Linux 命令大全

其他的,少见的,忘了的,可以在这里速查,也可以学习积累:

-

https://www.runoob.com/linux/linux-command-manual.html

-

Linux常用命令大全(和用法)

https://www.cnblogs.com/fnlingnzb-learner/p/5831284.html

-
-

Q&A

Linux 怎么装?

必应搜索“WSL安装”:https://cn.bing.com/search?q=wsl%E5%AE%89%E8%A3%85

-

必应搜索“VMware 安装 Linux”:https://cn.bing.com/search?q=VMware+%E5%AE%89%E8%A3%85+Linux

-

想知道VMware安装详细某版本,把上面 Linux 换成你的对应详细版本即可,如:Ubuntu18.04

-

发行版这么多,用哪个版本好?

初学者:Ubuntu、deepin。极客:Arch。服务器用户:CentOS。发烧玩家:Steam OS。

-

哪儿去获取 Linux 镜像?

千万别再去XX下载站了。

-

必应搜索你想要的系统名字,搜索结果第一条都是官方网站了,一般他们域名都是 系统名.org,这是非营利组织的域名,也有部分是 系统.com,如Ubuntu,因为它包含了商业发行版。

-

打开网站,在醒目的位置,都能找到 Download 这种东西,仔细寻找,可以找到 .iso 镜像下载链接。如果下载慢,可以使用 国内镜像站 ,他们提供了高速的软件下载和软件源服务,像 清华源阿里云网易等等

-

我应该使用 root 用户吗?

不建议。应当在系统安装过程中设置好用户名和密码,以后使用需要高权限的命令应该使用 sudosu

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/05/Mi9-SE-screen-problem-self-rescue/index.html b/2020/05/Mi9-SE-screen-problem-self-rescue/index.html deleted file mode 100644 index a8abbd0..0000000 --- a/2020/05/Mi9-SE-screen-problem-self-rescue/index.html +++ /dev/null @@ -1,725 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 手机差点报废后的自救 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 手机差点报废后的自救 -

- - -
- - - - -
- - -

今天手机屏幕出问题手机差点变砖

- - -

莫名其妙的自动点击

今天(前几天开始),手机使用的时候总是有莫名其妙的自动的点击,造成了一些困扰。

-

今天下午开始直接十点同时点击,在屏幕最下方!

-

脑补一下:打开输入法,啪啦啪啦给我按一堆 ,.,.,,,

-

打开设置,啪啦啪啦给我点进去不知道什么设置选项了

-

打开 Minecraft ,选中TNT,刚想摆,结果在右边给我放了一堆了(然后切换成火石…)

-

(事后模拟了一下,大概就像这样:)

-

-img - - - -

考虑是不是系统卡顿

img

-

锁屏,解锁。无效

-

关机,重启。无效。开机一会儿后又开始了,而且频繁的点击影响锁屏解锁!

-

什么?你想叫我重买?

-不可能想都不要想_不要_可能表情 - - - -

考虑是不是有病毒软件恶意程序

浩浩荡荡开始卸载(半年了终于清理一次手机)

-
-

顺手发现了小米系统的自动启动程序是真的恶心。刚关了几个,又给我打开了几个程序

-
-

检查并卸载了:白鲸V₱N、老王V₱N、蚂蚁V₱N、旋风V₱N、Minecraft网易版、adbd insecure(系统使用过程中提示授予了root权限 所以严重怀疑这个)、VMOS(占用空间大,顺手卸了吧)、轻启动(有模拟点击,所以也怀疑这个,而且长得还丑,顺手卸了吧)

-

莫 有 卵 用 !

-

还是那么自由的十点暴击

-

冻结系统程序

浏览小米系统管家,看到了下面的程序然后冻结了

- - -

心想重启一下才能停止运行系统服务呢。重启手机。结果:

-

触 摸 完 全 没 反 应 了 !

-

下图是网上随便找的,脑补一下随便怎么划都没反应的状态。当时我心里就直接:噔噔咚

- - -

咋办??????????????????

-

adb ?试试就逝世。

连接电脑,adb shell进入命令行。

-

input,模拟触摸。不管用

-

-

通过搜索,知道了如何列出已停用的系统程序

-

-

通过搜索知道了启用已冻结的系统程序的方法,启用了两个,然后reboot重启

-

-

还是不行。又启用了两个

-

-

-

重启,还是不行

-

突然想到鼠标

摸出手机 USB-C OTG 转接头,拔掉电脑无线鼠标插上OTG插上TypeC口,

-

能用!

- - -

啊这?? 这变成巴掌大的 Android显示器了么

-

所幸是能用了

-希望人没事_没事_希望表情 - -

现在又咋办呢????????????

-

进入TRWP看看?

截图就不截图了,脑补一下。

-

重启进入TRWP,各种操作都是正常的,甚至还很流畅。

-

判定硬件没有问题。

-

判定TRWP手机驱动正常可用。

-

MIUI系统有问题。

-

通过搜索,我们知道…

搜你妹,上莆田医院啊

-

img

-

重装。。。系统?

-

然后又搜了一堆新版系统,又搜了刷系统。

-

不行,我程序还没备份。

-

于是打算开始用鼠标操作进行本地备份( 如何操作

-

此处省略 1w 字 …

-

浏览器历史记录:(信息量很大)image-20200526165743064

-

image-20200526165817077

-

image-20200526165855658

-

image-20200526165952401

-

image-20200526170059829

-

我想起高兴的细情

手机发烫了。

-

想起前面哪篇文章说过触摸不行可能是屏幕上电荷什么的。。。

-

终于找到这篇文章了

-

解决方案:湿抹布,上下左右前前后后擦一遍,重启。

-

问题解决。

-

意不意外!惊不惊喜! - 没想到吧?我想到了哈哈哈!意不意外?惊不惊喜?刺不刺激?_想不到_装逼_斗图_怼人表情表情

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/05/adb-auto-make-money/index.html b/2020/05/adb-auto-make-money/index.html deleted file mode 100644 index e6a29f6..0000000 --- a/2020/05/adb-auto-make-money/index.html +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - adb自动刷钱 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- adb自动刷钱 -

- - -
- - - - -
- - -

这是一款名字叫“Zen Idle”的游戏。来尝试下自动刷钱

-image-20200505094215251 - - - -

【adb获取包名以及当前运行的activity】

-
1
adb shell dumpsys window | findstr mCurrentFocus
- -

输出:

-
1
mCurrentFocus=Window{98555ab u0 com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity}
- -

由包名获取apk路径

-
1
adb shell pm path io.ionic.starter
- -

【adb命令行启动应用程序】

-
1
adb shell am start -n 包名/类名
- -

如:

-
1
adb shell am start -n com.android.music/com.android.music.MusicBrowserActivity
- -

【adb shell 修改系统时间】
下面命令亲测可用,假如当前时间 01月05号08点23分改成 01月05号12点23分

-
1
adb shell date "01051223"
- -

【按钮的位置】
找到开发者选项,开启“指针位置”,在游戏里找到按钮的范围
Claim按钮
X: 390-690 300 540
Y: 1212-1362 150 1287
关闭广告按钮
x 915
y 835

-

【Android adb 模拟滑动 按键 点击事件】

-

关于tap的话,他模拟的是touch屏幕的事件,只需给出x、y坐标即可。
此x、y坐标对应的是真实的屏幕分辨率,所以要根据具体手机具体看,比如你想点击屏幕(x, y) = (250, 250)位置:

-
1
adb shell input tap 250 250
- -

此处我:

-
1
input tap 540 1287
- -
1
input tap 915 835
- -

【总命令】

-
1
adb shell date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
- -

加点循环

-
1
2
3
for I in $(seq 1 20);do
echo $I/20 ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
done
- -

写入sh脚本,懒得每次输入了

-
1
echo 'for I in $(seq 1 20);do\n    echo $I/20 ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3\ndone' >zen.sh
- -

【adb 安装卸载程序】
adb root 失败,提示adbd cannot run as root in production builds
网上说安装adbd-Insecure-v2.00.apk,亲测无效。还是每次adb shell然后su吧。

-
1
2
3
4
5
6
adb install ./adbd-Insecure-v2.00.apk

adb shell pm list packages|grep adb
输出: package:eu.chainfire.adbd

adb uninstall eu.chainfire.adbd
- -

【尝试只改时间】

-
1
date "01010101" ; date "01010601"
- -

并不能让程序显示奖励窗口(必须先退出这个页面再进入)

-

并不能让程序显示奖励窗口(必须先退出这个页面再进入)

-

【进一步的集成】
通过命令行参数决定要循环几次

-
1
2
3
4
5
6
7
echo 'CNT=10
if [ $# != 0 ] ; then
CNT=$1
fi
for I in $(seq 1 $CNT);do
echo $I/$CNT ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
done' >zen.sh
- -

然后:

-
1
2
3
4
adb shell
cd /sdcard/_sh
su
. ./zen.sh 20
- -

【手机闹钟BUG级响起】
无解
可以关闭闹钟

-

【尝试只在date的时候用su执行】

-
1
2
3
4
5
6
7
8
mkdir /sdcard/_sh
echo 'CNT=10
if [ $# != 0 ] ; then
CNT=$1
fi
for I in $(seq 1 $CNT);do
echo $I/$CNT ; su -c date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; su -c date "01010101" ; input keyevent 3
done' >/sdcard/_sh/zen.sh
- -

完美~
但是会每次date的时候显示“已授予shell超级用户权限”,看着很难受
先su再执行脚本就不会了

-

可以在电脑上adb shell进去执行脚本,也可以用手机啦

-

【视频演示】

- - - - -

- - -
- - -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/05/dajubao/index.html b/2020/05/dajubao/index.html deleted file mode 100644 index 4bf0b3f..0000000 --- a/2020/05/dajubao/index.html +++ /dev/null @@ -1,720 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 大举报:仿佛那个时代又来临了 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 大举报:仿佛那个时代又来临了 -

- - -
- - - - -
- - -

转自 豆瓣 : 2019-05-25 03:37:45

-
-

大举报:仿佛那个时代又来临了

原创:梅骁

-

1

-

之前我很想写一篇文章,写举报是时代变坏的开始。

-

但最近我的想法变了,我们的时代不是在开始变坏,而是已经变得很坏了。

-

最近一个让我有这种感觉的事件是王晨艺的点赞事件。

-

王晨艺是今年《创造营2019》的一个选手,是个没什么背景的舞蹈老师,在《创造营2019》这个整体很糊的节目里人气排名很靠前。

-

你不知道他没关系,因为我其实对他也没那么熟悉。

-

但这两天他身上发生了一个事情,有人扒出他六年前曾经在微博点赞过荤段子,所以认为他点赞涉及“敏感问题”,认为他是劣迹艺人,要求他立刻退赛。

-

img

-

看到这条新闻的时候,我觉得这一切都荒谬透顶。

-

最可怕的还不是有人认为一个人点赞荤段子所以他就是劣迹艺人,最可怕的是居然有人为了寻找一个人的“劣迹”而去疯狂翻查这个人过去多年的人生经历,试图寻找出一个黑料、一个过失,并对此大加举报攻击,以达到封杀、退赛的目的。

-

这个画面实在太可怕了。

-

一个人,他面无表情地盯着手机、盯着电脑,去从另一个人过往的茫茫人生经历里寻找一个错漏之处,就为了攻击他、打垮他。

-

你十年前说过脏话、你五年前垃圾没扔进垃圾桶、你三年前打过人一拳……这些全部都有可能成为你被攻击的素材。

-

这太可怕了,这画面的恐怖程度不亚于任何一部恐怖片。

-

因为我们谁都不能保证自己过往人生里从没有过任何错漏不当之处,所以我们任何人都有可能成为被这种手段打倒的那个。

-

2

-

时间稍微往前推一下。

-

今年三月份时,曾经发生过一件事,重庆一所高校里,有个老师因为课堂上发表损害国家声誉的过激言论而被学生举报。

-

学校很快发布公告,认为他违反教师职业道德,撤销了他的教师资格。

-

img

-

这是举报者的又一次胜利,可我看得特别害怕。

-

试想一下,当一个大学老师在课堂上讲话都可能会被举报的时候,他会怎么办?

-

他会只敢讲那些最安全、最无聊也最没有价值的东西,因为只有那些东西才是不会被举报的,与传道授业解惑相比,当然是个人的安全最重要。

-

这次是撤销教师资格,下次可能就是被判刑入狱,不,据我所知,已经有大学老师因为这个而入狱三年了。

-

img

-

所以,会越来越少人敢冒这个风险。

-

可是,你知道吗,现代大学教育跟中世纪大学教育的区别就在于,中世纪大学是传授已有知识的场所,而现代大学则担负着不断开拓新的知识和学科的职能。

-

所以,从1809年现代大学由柏林大学创立开始,“自由”都是大学最核心的关键词。

-

曾经在清华大学里,闻一多是言论最激进的教授,动不动就要在课堂上发表演说,后来更是在西南联大的广场集会上高声呼喊,对学校大肆批评。

-

img

-

闻一多

-

当时政府要求学校解聘闻一多,时任校长梅贻琦根本不理会,即便他自己也对闻一多的言行很不满,但他知道“自由”才是让大学教育保持活力的唯一动力。

-

而当“举报”出现在大学课堂上,当大学老师的每一句话都可能成为被举报的理由和材料时,还谈什么自由,谈什么进步。

-

我们的年轻一代在面对自己不认可的言论时第一反应已经不是“与他辩论”“将他驳倒”,而是熟练的使用举报手段“我要举报他,堵上他说话的嘴巴”。

-

并且他们一次又一次的成功做到了。

-

他们毁掉的不只是一个又一个老师,他们毁掉的更是教育本身。

-

这真的很可悲。

-

3

-

前两天,在豆瓣鹅组有这么一个帖子,内容是一个投票。

-

帖子的作者问大家,如果你发现你的父母、爱人、师长、朋友发表了不当言论,你要不要举报ta?

-

那个帖子里甚至详细地把这些人分成了“关系亲近的父母”“有过过节的朋友”“分手分得不愉快的前任”等等,把这些人分门别类地做了投票,问当这些发表了不当言论,你要不要举报。

-

这还不是最可怕的,最可怕的是下面的跟帖是真的认真在讨论。

-

有人说,父母是绝对不会举报的。

-

有人说,就算是爸妈,说了不当言论,也不能姑息。

-

有人说,分得不愉快的前任、有过节的朋友当然要举报啊。

-

诸如此类,林林总总,这些讨论才是我觉得最可怕的地方,因为大家都默认了“举报”的合法性,默认了当一个人发表了不当言论,他就应该被举报。

-

这实在太荒谬了。

-

没有任何一个人应该因为他的言论而被举报

-

当你遇到一个人说了你不认可的、甚至你极端厌恶的言论,你要做的事情应该是去反驳他、去驳倒他,去用你的思想、你的知识、你的言论去和他正面对决。

-

“我看不惯你的言论,所以我要反驳你”,这才是一个文明社会的人应该做的事情。

-

而“举报”是“我看不惯你的言论,所以我要堵上你的嘴,不让你说话,我堵不上,我就让更高的权力去堵你的嘴”。

-

这是个太可怕的思路。

-

一旦你把对言论正确与否的决定权交给了更高的权力,那今天被打倒的是你看不惯的人,明天被打倒的就可能是你自己。

-

不要觉得自己一辈子都不可能有任何错漏,任何人都会有错漏,任何人都会在某些情况下发表不当言论。

-

甚至,很可能今天还是很合情合理合法的言论,明天就会变成不当言论。

-

枪口不会因为你曾经是举报者,就对你网开一面。

-

4

-

其实,最近这两年来,举报已经越来越常见

-

有粉丝为了打击别家偶像,就去举报对方主演的作品有思想问题,有的就去挖对方多年前的微博、文章,试图找出蛛丝马迹、错漏之处。

-

我们其实是眼看着这股风气越兴越胜的。

-

有人因言获罪入狱,有人靠举报他人以达到打击报复的目的。

-

有人讨论当父母发表不当言论时,要不要与父母划清界线。

-

有人认真觉得堵上越来越多的嘴,这世界才会变得更好。

-

我们已经可以看到那个可预见的未来了。

-

在那个未来里,大家会因为不知道自己哪天因为哪句话被举报,所以大学老师会越来越不敢说话,亲人、爱人、朋友之间会越来越无法相信彼此。

-

甚至,就连你用滴滴打个车,都可能被司机举报你有不当言论,只因为你在车上和朋友讨论了一下性少数群体的话题。

-

img

-

我们已经能看到那个人人自危的未来就在不远处了。

-

你我都知道那会是个糟糕、邪恶的时代,我们早就见识过了。

-

但你我也都知道,我们是很难阻挡举报时代的来临的。

-

不,其实风行举报的时代早就已经在我们没注意时来临了,它早就已经深入到了我们生活的方方面面。

-

可这是不对的,无论多少人这么做,它都依然是不对的。

-

它会毁掉教育,毁掉创造和文化,毁掉人与人之间的信任,毁掉所有自由进步的可能性。

-

它不是将要到来,它是已经到来了。

-

你我都拦不住这个糟糕时代的来临。

-

但至少,我们可以选择不使用它,我们可以选择不做这个糟糕时代的共犯。

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/07/batch-shortcuts/index.html b/2020/07/batch-shortcuts/index.html deleted file mode 100644 index 488ae50..0000000 --- a/2020/07/batch-shortcuts/index.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - batch-shortcuts | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- batch-shortcuts -

- - -
- - - - -
- - -

教你设置 batch-shortcuts

-

img

-

PATH 环境变量介绍

搬运自 知乎

-

PATH 环境变量

经常使用命令行工具的话,对PATH等环境变量应该会非常熟悉;但现今的日常开发,接触到这一概念的机会越来越少。

-

时不时还是会遇到小朋友问我:“什么是PATH?”

-

这里记录一下,以供参考。

-

什么是环境变量?

环境变量是操作系统提供给应用程序访问的简单 key / value字符串;windows/linux/mac都有同样的概念。

-

一般用于提供参数值给不同的应用程序。

-

什么是PATH变量?

我们从命令行想要运行一个程序的时候,待运行的程序往往不是在当前目录。

-

PATH变量就是用于保存可以搜索的目录路径,如果待运行的程序不在当前目录,操作系统便可以去依次搜索PATH变量变量中记录的目录,如果在这些目录中找到待运行的程序,操作系统便可以运行。

-

Go开发为例,但我们使用go install命令编译、安装go程序后,可执行文件是会被保存在$GOPATH/bin路径下;那么我们可以把这个路径加入PATH变量中,这样我们便可以在任意路径中运行go安装的程序。

-

GOPATH

GOPATH又是一个环境变量,用于保存go的主目录,go默认安装之后,GOPATH会是当前用户的主工作目录中的go子目录,即:%HOME/go

-

查看环境变量

假设我们要查看GOPATH这个环境变量的值:

-
    -
  • windows command prompt: echo %GOPATH%
  • -
  • windows powershell: $env:GOPATH
  • -
  • linux & mac: echo $GOPATH
  • -
-

设置PATH变量

windows

假设我们当前登陆操作系统的用户名是:xiaomin

-

然后我们要把c:\users\xiaomin\go\bin路径加入到PATH变量中,在windows下我们可以在PowerShell中执行:

-
1
$env:Path += ";c:\users\xiaomin\go\bin"
- -

注意,这样仅仅只是临时修改当前的PATH变量,当我们关闭、重开PowerShell时,就需要重新设置。

-

如果要永久的修改,需要使用管理员权限启动PowerShell,然后执行:

-
1
setx /M PATH "%PATH%;c:\users\xiaomin\go\bin"
- -

Linux & Mac

同样假设我们当前登陆用户名是:xiaomin

-

然后我们要把/home/xiaomin/go/bin路径加入到PATH变量

-
1
export PATH=$PATH:/home/xiaomin/go/bin
- -

这同样是临时修改,重开shell之后,会被重置;要永久改变的话,一般是将上面的命令加入到我们使用的shell初始化文件中。

-

以bash为例,那么就是将上述命令加到/home/xiaomin/.bash_profile文件中。

-
-

设置步骤

1. pathext

Windows上的另一个变量。这里存储可直接运行的文件类型,一般需要添加 .lnk 进去

-

2. 建立一个目录

建立: D:\bin\batch-shortcuts

-

D:\bin\ 路径又简洁又舒服

-

3. 把目录写入path

参照百度经验:windows10设置环境变量PATH

-

注意,设置完后,需要重启资源管理器和命令行来应用更改。

-

可以在任务管理器,选中资源管理器,选择重新启动

-

可以注销,然后登陆

-

可以重启

-

4. 然后就可以用了

怎么用?

-

在上面那个文件夹内的所有文件,都是命令行可以访问到的。

-

一般可以创建:.bat .lnk ,.exe也阔以哇

-

举个栗子:

-
1
2
文件名:batch-shortcuts.bat
explorer "D:\bin\batch-shortcuts"
- -

模仿Linux ctrl d 一键关闭风格,创建的 d.bat

-
1
2
文件名:d.bat
exit
- -

比如md5

-
1
2
文件名:md5.lnk
指向:"D:\Program Fies (Green)\WinMD5校验器.exe"
- -

还有一些调用程序的,比如安装Ubuntu后,写一个脚本来调用Ubuntu执行命令

-
1
2
3
4
5
6
7
8
9
文件名:ubuntu.bat
@echo off

echo.
echo Usage:
echo use "ubuntu run $code$" to run shell command

echo.
"C:/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_2020.1604.14.0_x64__79rhkp1fndgsc/ubuntu1604.exe" %*
- -

%* 是传递所有命令行参数,这个了解一下会有很大的帮助

-

如果不用这个,就得用 %1 %2 %3 %4 %5 %6 %7 %8 %9 ,而超过9的就不能再处理了

-

还有其他玩法,自己探索吧!

-
-

关于 D:\bin 文件夹

我一般把命令行调用的,编程语言类的,放在这里面,

-

(还有一些绿色IDE为代表的,可以一套带走的,我也放里面)

-

(还有DOS系统盘为代表的,系统级的底层的,我也放里面)

-

一方面是,这个路径他没有空格,不容易导致命令行调用出错。

-

第二是,他真的又简洁又舒服哇

-

列出一下目前为止我的 D:\bin 的内容

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
D:\bin>dir
驱动器 D 中的卷没有标签。
卷的序列号是 9E68-267B

D:\bin 的目录

2020/05/25 16:24 <DIR> .
2020/05/25 16:24 <DIR> ..
2020/05/25 16:25 <DIR> .gradle
2020/03/17 20:23 <DIR> Anaconda3
2020/03/23 01:30 <DIR> Android_SDK
2020/06/05 10:42 <DIR> batch-shortcuts
2020/07/16 17:22 <DIR> DOS-16bit
2020/02/15 14:21 <DIR> eclipse-cpp
2020/02/15 14:18 <DIR> eclipse-java
2020/05/21 17:14 <DIR> ESP_8266
2019/07/01 00:43 <DIR> HBuilder.9.0.1.windows
2020/03/31 23:31 <DIR> HBuilderX.2.6.8.20200330.full
2020/04/21 01:06 <DIR> Java
2020/07/17 11:56 <DIR> nodejs
2019/11/28 13:53 <DIR> Perl
2020/03/18 23:53 <DIR> PortableApps
2020/02/19 23:47 <DIR> Python
2020/03/12 21:23 <DIR> Qt
2020/03/10 23:30 <DIR> Ruby27-x64
2020/03/23 21:16 <DIR> texlive
0 个文件 0 字节
20 个目录 57,676,476,416 可用字节

D:\bin>
- - - - -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/07/gdb-operation/index.html b/2020/07/gdb-operation/index.html deleted file mode 100644 index 79ff5a0..0000000 --- a/2020/07/gdb-operation/index.html +++ /dev/null @@ -1,673 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 简简单单的记录一下gdb的亿点点常用的操作 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 简简单单的记录一下gdb的亿点点常用的操作 -

- - -
- - - - -
- - -

.

-

gdb操作:


-

gdb ./xxx

开始调试xxx程序,如果不能运行,需要先 chmod +x ./xxx

-
-

gdb attach [pid]

通过程序id即pid,gdb附加到一个正在运行的程序,并对其进行调试

-
-

start

运行程序并断点在第一条指令

-

输出寄存器,反汇编等信息

-
-

list

有源码的情况下 输出源码

-
1
2
3
4
5
6
7
8
9
10
11
12
pwndbg> list
warning: Source file is more recent than executable.
1 #include<stdio.h>
2 #include<stdlib.h>
3 #include<unistd.h>
4 int main(){
5 char num='0';
6 char str[10];
7 read(0,str,0x10);
8 if(num=='1'){
9 puts("great.\n");
10 fflush(stdout);
- -
-

b *内存地址

在内存地址处下断点

-
-

b 函数名/*函数名

下断点

-
1
2
pwndbg> b main
Breakpoint 1 at 0x80484dc: file pwn05_char[]_overflow.cpp, line 5.
- -
-

info b

查看断点信息

-
1
2
3
pwndbg> info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x080484dc in main() at pwn05_char[]_overflow.cpp:5
- -
-

step

step(in),步入,在有源码调试时,执行下一行源码,有函数调用时进入函数调用

-
-

next

步过,在有源码调试时,执行下一行源码,有函数调用时执行完函数并执行到函数调用的下一行

-
-

nexti/ni

next instruction,步过,执行下一行汇编指令

-
-

stepi/si

step into,步入,执行下一行汇编指令,如果有函数调用时进入函数的第一行汇编指令

-
-

finish

运行完当前的函数,停在最后一句汇编代码

-
-

info registers

寄存器信息

-
-

x/<n/f/u> <addr>

格式:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
f格式:
x 按十六进制格式显示变量。
d 按十进制格式显示变量。
u 按十六进制格式显示无符号整型。
o 按八进制格式显示变量。
t 按二进制格式显示变量。
a 按十六进制格式显示变量。
c 按字符格式显示变量。
f 按浮点数格式显示变量。

u格式:
b表示单字节
h表示双字节
w表示四字节
g表示八字节。
- -
-

一些GDB参考链接:

https://blog.csdn.net/tzshlyt/article/details/53668885

-

https://www.jianshu.com/p/b7896e9afeb7

-

https://blog.csdn.net/u013525455/article/details/52813637

-

https://www.jianshu.com/p/e6af28e2566f

-

https://www.cnblogs.com/xiaoshiwang/p/10755199.html

-

https://www.cnblogs.com/xsln/p/gdb_instructions1.html

-

https://man.linuxde.net/gdb

-

https://www.cnblogs.com/tangtangde12580/p/8045980.html

-

https://www.cnblogs.com/zhoug2020/p/7283169.html

-

https://www.jianshu.com/p/adcf474f5561

-

https://blog.csdn.net/songchuwang1868/article/details/86132281

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/07/qzone-faster-like/index.html b/2020/07/qzone-faster-like/index.html deleted file mode 100644 index 05e9e65..0000000 --- a/2020/07/qzone-faster-like/index.html +++ /dev/null @@ -1,666 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - QQ空间辅助点赞 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- QQ空间辅助点赞 -

- - -
- - - - -
- - -

QQ空间手滑点赞太麻烦,用键盘吧。

-

嗯,我文思枯竭了,编不出什么内容充实的文章,就写下过程贴代码吧

-

浏览器检查元素

通过完成的审查元素发现:

-
1
2
3
4
所有的列表,元素的id:     feed_friend_list
一个说说的,元素的class: f-single
点赞按钮,元素的class: qz_like_btn_v3
评论按钮,元素的class: qz_btn_reply
- -

写脚本

之前考虑用jQuery实现,用油猴脚本,但是脚本对于加载jQuery有一点问题

-

因为QQ空间用了 $ 这个名字,但是不是jQuery,所以考虑用纯 js 实现。

-

后来啊。$ 不是可以用jQuery写么。就改成了jQuery实现

-

(jQuery真香)

-

用纯 js 添加点赞按钮的css

1
2
3
4
var style = document.createElement('style');
style.innerHTML="a.item-on {background-color: red;}"
var head = document.head || document.getElementsByTagName('head')[0];
head.appendChild(style);
- -

完整脚本 v0.1

(还没想好怎么解释这个脚本。直接贴代码)

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app/
// @version 0.1
// @description try to take over the world!
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==
(function () {
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
function up(){
console.log("上");
}
function left(){
console.log("左");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
}
function down(){
console.log("下");
var first=jQuery(".f-single").eq(0);
console.log(first);
first.slideUp(function(){this.remove()});
//if(jQuery(".f-single").length==0){
// window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
first.slideUp(function(){this.remove()});
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div>\
<style>\
#rect {\
height: 100px; width: 160px; border:red 5px solid; position:fixed;\
z-index: 999; top:40px; margin-left:40%; margin-right:40%;\
}\
#rect:focus{ border:5px green solid; }\
</style>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n下 下一条\n左 评论\n右 点赞</textarea></div>');
jQuery("body").append($rect);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();
- - - -

2020-08-01更新 v0.2

增加了修复网络的功能。妈妈再也不用担心更新不出来啦

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app/
// @version 0.2
// @description QQ空间用键盘操作,岂不美哉
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==

(function () {
'use strict';
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
function up(){
console.log("上");
}
function left(){
console.log("左");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
}
function down(){
console.log("下");
var first=jQuery(".f-single").eq(0);
console.log(first);
first.slideUp(function(){this.remove()});
//if(jQuery(".f-single").length==0){
// window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
first.slideUp(function(){this.remove()});
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div id="rect_div">\
<style>\
#rect_div{\
position:fixed; z-index: 999; top:40px; margin-left:40%; margin-right:40%; width: 50%;\
}\
#rect {\
height: 100px; width: 200px; border:red 5px solid; \
}\
#rect:focus{ border:5px green solid; }\
#qzone_fix_button{\
float:left; height: 50px; width: 100px; border:skyblue 2px solid; \
}\
</style>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n下 下一条\n左 评论\n右 点赞</textarea>\
<button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button></div>');
jQuery("body").append($rect);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();
- - - -

2020-08-16更新 v0.3

0.3版本,增加了简单的去除顶部的已点赞用户

-

代码:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app/
// @version 0.3
// @description QQ空间用键盘操作,岂不美哉
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==

(function () {
'use strict';
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
var list=["Cortana","Cortana"];
function getFirstTime(){
var first=jQuery(".f-single").eq(0);
var timetime = first.find(".info-detail .ui-mr8.state").html();
console.log(timetime);
}
function faded(first){
getFirstTime();
first.slideUp(100,function(){this.remove()});
}
function clearLiked(){
jQuery("#finishedClearLiked").html("pending.");
var first=jQuery(".f-single").eq(0);
console.log(first);
if(first.length==0){
jQuery("#finishedClearLiked").html("finished.");
return;
}
var nickName = first.find(".f-nick a").html();
console.log(nickName);
var matchList = false;
for(i=0;i<list.length;i++){
if(nickName.indexOf(list[i])>-1){
matchList=true;
break;
}
}
if(matchList==true){
console.log("进入{pass}分支");
var second=jQuery(".f-single").eq(1);
var nextZan=second.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//取消赞
console.log(nextZan.length);
if(nextZan.length!=0){ //下面有取消赞
console.log("下面有取消赞,所以pass");
first.remove();
setTimeout(clearLiked,100);
}
else{ //下面没有取消赞,停止
console.log("下面无取消赞,所以停止");
var nickName = second.find(".f-nick a").html();
console.log("下一个人是:",nickName);
jQuery("#finishedClearLiked").html("finished.");
}
}
else{
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
jQuery("#finishedClearLiked").html("finished.");
}
else{
first.remove();
setTimeout(clearLiked,100);
}
}
}
function up(){
console.log("上");
jQuery("#finishedClearLiked").html("pending.");
clearLiked();
}
function left(){
console.log("左");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
}
function down(){
console.log("下");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
faded(first);
//if(jQuery(".f-single").length==0){
// window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
faded(first);
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div id="rect_div">\
<style>\
#rect_div{\
position:fixed; z-index: 999; top:40px; margin-left:40%; margin-right:40%; width: 50%;\
}\
#rect {\
height: 120px; width: 200px; border:red 5px solid; \
}\
#rect:focus{ border:5px green solid; }\
#qzone_fix_button{\
float:left; height: 50px; width: 100px; border:skyblue 2px solid; \
}\
#clearLikedDiv{\
vertical-align: top;border: 2px solid yellow;width: 150px;height: 80px;\
display: inline-flex;flex-direction: column;background-color: wheat;\
}\
#finishedClearLiked{\
border: skyblue 2px inset; font-size: 1.5em;\
}\
#startClearLiked{\
width: 100%;flex-grow: 1;\
}\
</style>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n上 清理顶部已点赞\n下 下一条\n左 评论\n右 点赞</textarea>\
<button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button>\
<div id="clearLikedDiv">\
<span id="finishedClearLiked">free.</span>\
<button id="startClearLiked">清理已点赞</button>\
</div>\
</div>');
jQuery("body").append($rect);
jQuery("#startClearLiked").click(clearLiked);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();
- - - -

2020-08-16更新 v0.4

增加显示最顶部五条动态内容,修复网络和状态条和删除顶部已点赞都放在最左边了

-

代码:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app
// @version 0.4
// @description QQ空间用键盘操作,岂不美哉
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==

(function () {
'use strict';
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
var list=["Cortana","今日百色","易锦教育","易锦大学","CUIT网络空间安全学院","丁凌娜","黄恋茹","Victor","墙"];
function getFirstTime(){
var first=jQuery(".f-single").eq(0);
var timetime = first.find(".info-detail .ui-mr8.state").html();
console.log(timetime);
}
function matchList(nickName){
var match = false;
for(i=0;i<list.length;i++){
if(nickName.indexOf(list[i])>-1){
match=true;
break;
}
}
return match;
}
function faded(first){
getFirstTime();
first.slideUp(100,function(){this.remove()});
}
function clearLiked(){
jQuery("#finishedClearLiked").html("pending.");
var first=jQuery(".f-single").eq(0);
console.log(first);
if(first.length==0){ //好友动态已经空了
jQuery("#finishedClearLiked").html("finished.");
return;
}
var nickName1 = first.find(".f-nick a").html();
console.log(nickName1);
var match1 = matchList(nickName1);
if(match1==true){ // 第一个人是列表
console.log("进入{pass}分支");
var second=jQuery(".f-single").eq(1);
var nextZan=second.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//查找取消赞
console.log("第二个人有无取消赞:",nextZan.length);
if(nextZan.length!=0){ //下面有取消赞
console.log("下面有取消赞,所以pass");
first.remove();
setTimeout(clearLiked,125);
}
else{ //第二个人下面没有取消赞,
console.log("第二个人下面无取消赞,");
var nickName2 = second.find(".f-nick a").html();
console.log("第二个人:",nickName2);
var match2 = matchList(nickName2);
if(match2==true){ // 第二个人也是列表
console.log("进入{pass}分支");
var third=jQuery(".f-single").eq(2);
var nickName3 = second.find(".f-nick a").html();
console.log("第三个人:",nickName3);
var thirdZan=third.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//取消赞
console.log("第三个人有无取消赞:",thirdZan.length);
if(thirdZan.length!=0){ //下面有取消赞
console.log("第三个人下面有取消赞,所以pass");
first.remove();
setTimeout(clearLiked,125);
}
else{ //下面没有取消赞,停止
console.log("下面无取消赞,所以停止");
jQuery("#finishedClearLiked").html("finished.");
}
}
}
}
else{
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log("第一个人有无点赞按钮:",zan.length);
if(zan.length!=0){ // 有点赞按钮,结束
jQuery("#finishedClearLiked").html("finished.");
}
else{
first.remove();
setTimeout(clearLiked,125);
}
}
setTimeout(space,100);
}
function space(){
for(var iii=0;iii<5;iii++){
var one=jQuery(".f-single").eq(iii);
if(one.length==0){
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(0).html("nickName");
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(1).html("timestamp");
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(2).html("content");
}
else{
var nickName = one.find(".f-nick a").html();
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(0).html(nickName);
var time = one.find(".info-detail .ui-mr8.state").html();
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(1).html(time);
var summary = one.find(".f-info").text();
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(2).html(summary);
}
}
}
function up(){
console.log("上");
jQuery("#finishedClearLiked").html("pending.");
clearLiked();
setTimeout(space,100);
jQuery("#finishedClearLiked").html("finished.");
}
function left(){
console.log("左");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
setTimeout(space,100);
}
function down(){
console.log("下");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
faded(first);
setTimeout(space,100);
//if(jQuery(".f-single").length==0){
// window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
faded(first);
setTimeout(space,150);
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div id="rect_div">\
<style>\
#rect_div{\
position: fixed; z-index: 999;top: 40px; width: 90%; text-align: center; left: 0px; right: 0px; margin-left: auto; margin-right: auto;\
}\
#rect {\
height: 140px; width: 210px; border:red 5px solid; \
}\
#rect:focus{ border:5px green solid; }\
#clearLikedDiv{\
vertical-align: top;border: 4px solid darkseagreen;width: 100px;height: 120px;\
display: inline-flex;flex-direction: column;background-color: wheat;\
}\
#qzone_fix_button{\
height: 50px; width: 100px; \
}\
#finishedClearLiked{\
border: skyblue 3px inset; font-size: 1.5em;\
}\
#startClearLiked{\
width: 100%;flex-grow: 1;\
}\
\
#statusTable{\
border-collapse: collapse;\
display: inline-table;\
vertical-align: top;\
}\
#statusTable tr td:nth-child(1){\
background-color: #FFFFCC;\
width: 100px;\
}\
#statusTable tr td:nth-child(2){\
background-color: #DDDDDD;\
width: 100px;\
}\
#statusTable tr td:nth-child(3){\
background-color: #CCFFCC;\
width: 300px;\
}\
</style>\
<div id="clearLikedDiv">\
<button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button>\
<span id="finishedClearLiked">free.</span>\
<button id="startClearLiked">清理已点赞</button>\
</div>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n空格 加载前五条动态信息\n上 清理顶部已点赞\n下 下一条\n左 评论\n右 点赞</textarea>\
<table id="statusTable" border="2"><tr>\
<td>100</td><td>100</td><td>100</td>\
</tr><tr>\
<td>200</td><td>200</td><td>200</td>\
</tr><tr>\
<td>300</td><td>300</td><td>300</td>\
</tr><tr>\
<td>400</td><td>400</td><td>400</td>\
</tr><tr>\
<td>500</td><td>500</td><td>500</td>\
</tr></table>\
</div>');
jQuery("body").append($rect);
jQuery("#startClearLiked").click(clearLiked);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 32){//空格
console.log("空格");
space();
}else if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();
- - -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/07/time-management/index.html b/2020/07/time-management/index.html deleted file mode 100644 index 9333d6e..0000000 --- a/2020/07/time-management/index.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 亿分钟成为时间管理大师 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 亿分钟成为时间管理大师 -

- - -
- - - - -
- - -

使用一个叫 manicTime 的软件

-

(好像最近越来越喜欢挖坑不填了哇)

-

(想了解的小伙伴请发邮件催更,联系方式在about页面有)

-

image-20200716102927688

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2020/08/welcome-pwn-partition/index.html b/2020/08/welcome-pwn-partition/index.html deleted file mode 100644 index 6dec8ca..0000000 --- a/2020/08/welcome-pwn-partition/index.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 欢迎 pwn 分区(P盘) | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 欢迎 pwn 分区(P盘) -

- - -
- - - - -
- - -

今天再次尝试 wsl+gdb 调试,照舅失败

-

于是我搞了一个 “P分区”

-
-

wsl+gdb,不行. ❌

咕了很久还是想继续尝试gdb,wsl+gdb当然是最方便的一种方式了,打开命令行就可以用,都不需要开启 vmware。

-

但是很快的就遇到了问题。首先就是 wsl (我用的是Ubuntu16.04) 装好时是不支持32位程序的,通过搜索知道了安装启动 binfmt-support 就可以,让 wsl 能运行32位程序。

-

让64位的WSL(windows 子 linux系统)支持运行32位程序 - 简书

-

正准备开心的打开gdb调试,布星了。

-

在 gdb 里 start 可以,但是 ni 就不行了:

-

image-20200804185229605

-
1
2
3
4
5
6
pwndbg> ni
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x80484a0

Command aborted.
- -

查询了一波,感觉大概可能应该或许是 wsl 他就不能调试32位程序?

-image-20200804184759075 - -

你品你细品,wsl 装好的时候是只有64位程序支持的,32位直接给砍掉了,如果要运行32位还需要安装 binfmt-support ,32位程序仿佛不是 wsl 本来所支持的功能?

-

你品你再品,gcc编译成32位程序还需要加 -m32 编译参数,那么默认编译出来就是64位?32位是不是”过时”了?

-

阅读 binfmt-support 的介绍,可以看到

-

https://packages.debian.org/stretch/binfmt-support 上,写道:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
==========原文==========
软件包:binfmt-support(2.1.6-2)
Support for extra binary formats
The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

This package provides an 'update-binfmts' script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

标签: 系统管理: 核心或模块, 软件开发: 解释器, 实做语言: implemented-in::perl, interface::commandline, 角色: 程序, 范围: 实用程序, 应用程序集: Debian
==========google机翻==========
软件包:binfmt-support(2.1.6-2)
支持额外的二进制格式
版本2.1.43和更高版本的Linux内核中包含的binfmt_misc内核模块,使系统管理员可以根据幻数或文件扩展名注册各种二进制格式的解释器,并在匹配文件时调用适当的解释器。被执行。将其视为#的更灵活版本!可执行解释器机制。

该软件包提供了一个'update-binfmts'脚本,软件包维护者可以使用该脚本注册要与此模块一起使用的解释器,而不必担心编写自己的init.d脚本,并且sysadmin可以将其用于稍高级别的接口。模块。

标签: 系统管理: 核心或模块, 软件开发: 解释器, 实做语言: implemented-in::perl, interface::commandline, 角色: 程序, 范围: 实用程序, 应用程序集: Debian
- -

http://binfmt-support.nongnu.org/ 上,写道:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
==========原文==========
binfmt-support
The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

binfmt-support provides an update-binfmts script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

Versions 1.2.0 and above also support a mechanism for extending the range of binary formats among which the kernel can distinguish with the aid of a userspace helper, called a detector.

The source code to binfmt-support can be retrieved from its Git repository (if you don't have Git, follow the link for installation instructions).

This Web page is created and maintained by Colin Watson.
Last modified: $Date: 2017/07/09 13:30:47 $
==========google机翻==========
binfmt-支持
binfmt_miscLinux内核版本2.1.43和更高版本中包含的内核模块,允许系统管理员基于幻数或其文件扩展名注册各种二进制格式的解释器,并在匹配文件被调用时调用适当的解释器。被执行。可以将其视为#!可执行解释器机制的更灵活版本 。

binfmt-support提供了一个update-binfmts 脚本,程序包维护人员可以使用该脚本来注册要与此模块一起使用的解释程序,而不必担心编写自己的 init.d脚本,并且sysadmins可以将其用于该模块的更高级别的界面。

1.2.0及更高版本还支持一种扩展二进制格式范围的机制,内核可以借助一种称为检测器的用户空间助手来区分二进制格式 。

binfmt-support可以从其Git存储库中检索要获取 的源代码(如果您没有Git,请遵循链接以获取安装说明)。

该网页由Colin Watson创建和维护 。
上次修改时间:$日期:2017/07/09 13:30:47 $
- -

这两个网页说,binfmt-support 是32位程序的解释器,安装后将32位程序绑定使用它打开。这是不是有点像虚拟机风格? gdb和Linux内核应该还是不能支持32位(我猜的)

-
-

vmware,好用!✅

不多说了吧,VMware装一个Ubuntu来进行调试,肯定没问题

-

但是我还是想快速的访问Windows上那些文件夹。

-

https://cn.bing.com/search?q=vmware添加共享文件夹

-

由于我会常用到下载文件夹,所以把下载文件夹映射到share目录。

-image-20200804221417612 - -

Linux里面,文件夹在哪儿呢?

-

/mnt/hgfs/share

-

但是文件管理器进入这个目录,还是不能右键新建文件夹。

-

ls -al 查看权限,chmod 777 share授予最宽的权限,再次 ls -al查看权限

-

image-20200804222350672

-

image-20200804222407950

-

设置完后就可以像正常使用一样读写这个文件夹了,所做的更改,在Windows上全部同步。

-

可是,这个目录不太好打啊

-

我在 ~/.bash_aliases 里设置了share,来方便地命令行打开文件夹 alias share="cd /mnt/hgfs/share"

-

那么下次运行share命令就可以了,

-

(感觉还是哪里不太方便?)

-
-

P盘 与 /pwn

干脆把那个文件夹抽出来,用一个分区存?

-

好处:

-
    -
  1. Windows上好找,单独一个分区呢,二进制文件放里面就好啦
  2. -
  3. 虚拟机里好找,vmware设置挂在文件夹时输入分区就行了,不用担心如果文件夹被移动,会导致虚拟机内不可用
  4. -
  5. wsl 里好找,众所周知,wsl 和Windows共享文件系统,是通过把Windows上的盘符,挂载到 /mnt,那么P盘对应就是 /mnt/p,可以说目录已经灰常好打了
  6. -
  7. 稳定不容易坏,他就是个单独分区,不存在移动文件夹导致找不到的问题,只要这个盘还在,就能用(盘不在就创建一个分区呗)
  8. -
-

在此电脑,右键,管理,磁盘管理,搞个新分区,我选的4G大小差不多了。大概像酱紫:

-

image-20200804164302218

-

操作完之后就多出来一个P分区。

-
-

这里有一点经验教训就是新建分区后进去然后打开wsl是不行的,wsl还不能识别到分区,如果要识别,需要重启wsl,在管理员权限的cmd里运行:

-
1
2
net stop LxssManager
net start LxssManager
-
-

虚拟机设置挂载文件夹,同上文。然后运行 ls -al 就可以看到 p 文件夹:

-

image-20200804234159560

-

这次就,不设置 alias 命令了吧,直接,把这个文件夹,映射到根目录下的 /pwn

-

创建符号链接

-
1
sudo ln -s /mnt/hgfs/p /pwn
- -

image-20200804234628952

-

运行 ls -al

-

image-20200804234748499

-

来试一下好了没,运行 cd /pwn

-

image-20200804234951886

-

(这里新建p分区的时候应该应该选择exFat文件系统的。。)

-

(然后用 DiskGenius 格式化成了exFat。亲测可用)

-

image-20200805000450165

-

听说win10可以直接读取ext4 U盘,硬盘应该也快了。我试试格式化成ext4格式。

-

读取不了,资源管理器都不显示

-

尝试安装了一个 Ext2Fsd-0.69.exe,在 https://sourceforge.net/projects/ext2fsd/ 下载的

-

安装完成需要重启电脑,不敢重启,就算了不试了

-

格式化回exFat格式,可正常使用

-

下一步,放进文件

-image-20200805002113063 - -

下一步,在Linux中使用

-

image-20200805002130947

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2021/07/wsl2-and-proxifier/index.html b/2021/07/wsl2-and-proxifier/index.html deleted file mode 100644 index ec227cc..0000000 --- a/2021/07/wsl2-and-proxifier/index.html +++ /dev/null @@ -1,666 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 解决 WSL2 和 proxifier 的相互报错问题 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 解决 WSL2 和 proxifier 的相互报错问题 -

- - -
- - - - -
- - -

转载自知乎:https://zhuanlan.zhihu.com/p/151392411

-

关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

- - -

问题:

参考的对象类型不支持尝试的操作。(The attempted operation is not supported for the type of object referenced.)

-

解决方法:

1. 常见临时解决方案(不推荐):

-

以管理员身份运行CMD,输入:

-
-

netsh winsock reset

-
-

重启计算机即可修复。

-

2. 长期解决的方案(推荐):

-

(1)下载此软件:

-

http://www.proxifier.com/tmp/Test20200228/NoLsp.exe

-

(需要挂代理访问下载)

-

(2)管理员身份运行CMD输入:

-
-

NoLsp.exe C:\windows\system32\wsl.exe

-
-

请自行注意NoLsp.exe程序的位置,以及你的wsl.exe位置。

-

产生原因和解决方法分析:

-
    -
  1. 代理软件和wsl2的sock端口冲突,使用netsh winsock reset重置修复。
  2. -
  3. Proxifer开发人员解释如下:
  4. -
-
-

如果Winsock LSP DLL被加载到其进程中,则wsl.exe将显示此错误。最简单的解决方案是对wsl.exe使用WSCSetApplicationCategory WinAPI调用来防止这种情况。在后台,该调用在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog中为wsl.exe创建一个条目。
这将告诉Windows不要将LSP DLL加载到wsl.exe进程中

-
-

上述解决方案来自于:

-

https://github.com/microsoft/WSL/issues/4177

-

https://answers.microsoft.com/zh-hans/insider/forum/all/wsl2%E5%AE%89%E8%A3%85kali/b6dd4c62-1130-4a7c-9462-1e9e5f38dab2

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2022/03/my-disk-crushed/index.html b/2022/03/my-disk-crushed/index.html deleted file mode 100644 index 6d1766f..0000000 --- a/2022/03/my-disk-crushed/index.html +++ /dev/null @@ -1,677 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 硬盘损坏(物理)和事件分析 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 硬盘损坏(物理)和事件分析 -

- - -
- - - - -
- - -

寒假期间,本人的电脑硬盘坏掉了。

-

总结一点经验吧,希望能帮助到您。

- - -

事件经过

​ 起初是偶尔的找不到系统分区找不到 winload.efi 从而无法启动。后来启不动,BIOS也识别不到,多重启几次可以开机。最后直接无法识别,换卡槽换机器也完全无法识别。 本人猜测可能是主控坏掉的原因。

-

​ 硬盘是西数SN550,容量是1TB,由于是在淘宝小店买的便宜货,店铺的售后就不可能了,尝试西数官方联保,在线申请一直提示网络问题无法申请。尝试看一下数据恢复服务,在系数官方的数据恢复里找到了ontrack公司,在线填写信息后客服发邮件提供了报价,约合人民币5500多。奈何本人,钱包不足,遂放弃。

-

​ 邮件如下(也可以参考一下使用昂贵的数据恢复服务的操作流程):

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
您好XXX,

多謝你使用KLDiscovery Ontrack (HK) Ltd. 數據修復服務.
Ontrack 35年歷史,在美國上市,是全球最大的數據恢復公司,每年恢復超過50,000個成功個案。

數據恢復服務的程序如下:
1. 請郵寄你的硬盤到我們的辦公室.
2. 數據修復服務開始後, 你會收到我們發出的郵件, 你可登入查核數據修復進度.
3. 當修復服務完成後, 我們會傳送修復報告及報價單到你的電子郵箱.
4. 如你對報告感到滿意, 請簽回報價單. 修復好的數據將會儲存於全新1TB 移動硬盤.
5. 標準服務的檢查費為HKD800恢復數據費用為 HKD6000. 時間約為5-7個工作天 (不包括速遞運輸時間時間).
6. 如因為硬件事故或需配備零件, 需時可能會更長.
7. 如未能恢復成功, 不會收取恢復數據費用
8. 如Ontrack 成功恢復數據, 而客戶拒絕恢復服務, 我們會收取 HKD1000 行政費.
9. 如客戶於一個月內未有取回硬盤, ONTRACK 會將硬盤消磁並销毁.

以下是我們的辦公室地址,
To: KLDiscovery Ontrack (HK) Limited
香港北角電器道148 號12樓1203A室
ATTN: Andrew Sin
Tel: +852 3704 8688

請包好你的硬盤及貼上我們的Job編號 (6389167)
請確認以上的報價並回覆以上的電郵, 多謝!
希望收到您的好消息!
如需要任何協助, 請致電聯絡我們+852 3704 8688.

Thank you!
- -

丢失的数据

​ 这一块硬盘里面包含了:

-
    -
  • 200G的Windows系统盘(C),
  • -
  • 200G的硬件技术资料(O),
  • -
  • 200G的游戏分区GTA(V),
  • -
  • 200G的多媒体文件(W),
  • -
  • 50G的一些备份文件(X),
  • -
-

​ 这些数据和资料全部丢失了。虽然说恰好这些资料不是最重要的,但是C盘仍然是很多重要文件的集散地,不管是重装还是格盘,都会丢失大量的程序数据,包括但不限于:

-
    -
  • appdata(相当大一部分程序的数据都在appdata),
  • -
  • documents(QQ接收文件 微信接收文件,QQ和微信的聊天记录数据库,一部分IDE的项目文件),
  • -
  • User目录(相当于Linux的~目录,程序员IDE的配置,一部分项目文件,一部分程序的配置文件都会在这里,尤其是ssh密钥和xshell的服务器记录,如果丢失损失非常大)
  • -
  • Download目录(相信很多人的下载文件都是放在这里的吧,如果丢失也会损失很多内容)
  • -
  • chrome的文件夹(书签 历史记录 扩展程序和油猴插件的脚本)(虽然说你登陆了账户并且开启了chrome同步,那书签和一小段时间的历史记录和你的扩展程序可以从远程恢复,但是扩展程序里面的数据 配置 手撕脚本等可能就付之一炬了特别是油猴(当事人:现在就是后悔 非常的后悔))
  • -
-

总结一些

-

后记

一怒之下在 jd 购买了三星980,1TB硬盘,感觉比西数更靠谱一点。

-
-

西数,🐕都不用

-

真香~.jpg

-
- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/2022/04/adb-picture-transfer/index.html b/2022/04/adb-picture-transfer/index.html deleted file mode 100644 index 81a0012..0000000 --- a/2022/04/adb-picture-transfer/index.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 使用adb从手机传输相片到电脑 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- 使用adb从手机传输相片到电脑 -

- - -
- - - - -
- - -

随着手机照片越来越多,手机空间越来越小,把手机照片腾到电脑上或许是一个减小空间的办法。

-

将安卓手机上的照片复制到电脑上有几种方法:

-
    -
  • 手机连电脑,使用文件模式复制照片
  • -
  • 手机连电脑,使用照片模式复制照片
  • -
  • 手机插U盘,复制照片
  • -
  • 手机插电脑,用adb命令行复制
  • -
-

前两种方法,由于Windows垃圾的安卓数据传输协议,极有可能中途失败或者传输错误。不考虑

-

第三种方法,可行,但需要手机支持插U盘以及需要USB口转typeC口等,不是很方便

-

第四种方法,步骤稍多,但是不需要U盘中转,速度快,可以方便的查看结果等优势

-
-

本文所使用和举例的机型是 MIUI 系统的手机,其他的系统路径不同,但是方法是一样的。

-

adb工具在这里放一个链接: https://cdutsec.lanzouw.com/ixnfb02yij7g

-

adb工具的版本太旧会影响传输速度和命令行的交互,所以尽量使用新版本的adb

-
-

0. 准备工作

0.1 电脑上adb工具

在此文件夹中,这三个文件,打开命令行即可操作。

-

image-20220410171522377

-

在文件夹按住shift然后鼠标右键,选择在此处打开命令行,可以运行adb

-

(如果打开的是powershell,运行cmd进入cmd命令行)

-image-20220410113046875 - - - -

0.2 手机上开启开发者模式和USB调试

0.2.1 开启开发者模式

如果手机没有开启开发者模式,按照这个操作开启开发者模式。

-

打开设置,点开我的设备

-IMG_20220405_210341 - -

点开全部参数

-IMG_20220405_210406 - -

一直点击MIUI版本,会进入开发者模式。

-IMG_20220405_210501 - -

0.2.2 打开开发者模式后打开USB调试

点开设置,打开更多设置,

-IMG_20220405_210522 - -

找到开发者选项

-IMG_20220405_210531 - -

首先开启开发者选项,手机可能提示有危险,选择确定。

-

然后打开USB调试的开关

-Screenshot_2022-04-10-16-46-22-788_com.miui.securitycenter - -IMG_20220405_210546 - - - - - -

1. 手机创建相册和分类照片

将手机中需要传到电脑的图片选中,点击添加到,新相册,创建相册

-

注意这里命名需要是:英文或数字,不能有空格 ,如果是带有汉字或者有空格,选中其中的图片,重新创建相册。

-IMG_20220410_113421 - -IMG_20220410_113442 - -

选择移动相片的方式

-IMG_20220410_113507 - - - -

2. 电脑连接adb,搬运相片

把手机用原厂充电线插上电脑(杂牌线可能识别不了或数据传输有问题!)

-

运行adb devices ,可以看到设备ID。

-

(这时候手机可能谈弹出提示:是否允许这台计算机调试,选择允许。)

-

image-20220410165018191

-

adb shell 进入手机空间

-

cd /sdcard/Pictures/Gallery/owner/,进入到相册的目录。ls 可以看到各个创建的相册

-

(在MIUI旧版本上需要运行的可能是:cd /sdcard/MIUI/Gallery/cloud/owner/

-

image-20220410165325479

-

cd 文件夹名字 进入文件夹,例如在这里我的文件夹是usb,那么我运行:cd usb

-

pwd 查看当前目录的路径,

-

image-20220410171122349

-

复制完整路径备用。

-

exit或 ctrl d 退出shell命令行,回到Windows命令行,运行:

-

adb pull 完整路径 来拉取文件,例如在此处我运行:adb pull /sdcard/Pictures/Gallery/owner/usb

-

image-20220410171324243

-

过程中没有报错,如果报错需要根据提示解决问题。

-

打开文件夹可以看到,相片文件夹已经有了:

-

image-20220410171541286

-

3. 手机和电脑确认文件夹信息

3.1 手机上查看相册文件夹信息

打开re文件管理器(如果没有 安装一个)

-IMG_20220410_113744 - -

和上面的路径一样,打开找到owner,找到自己创建的文件夹,

-

长按选中文件夹,点击右上方三个点,点击属性

-IMG_20220410_113858 - -IMG_20220410_113908 - -

可以看到文件夹里面有多少个文件,多少个文件夹,多少字节

-image-20220410173129131 - -

3.2 电脑上查看文件夹信息

打开刚才的文件夹,右键刚收到的文件夹,属性,

-

或者按住键盘alt键然后双击文件夹,打开文件夹属性

-image-20220410172952180 - -

对比两个信息,观察文件数、文件夹数、字节数都是一样的,就是完全复制到电脑上了,手机上的可以删除掉了

-

4. 手机上删除相册

这里快到结尾了,但还是要多说几句

-

删除相册的方式用且仅用:系统自带的相册app,来删除相册

-IMG_20220410_113959 - -

如图所示,MIUI是可能开启了云备份的,如果你恰好开了云备份并且这个相册里的一些图片已经备份,那么在使用文件管理器删除相册所在的文件夹,可能有两个问题:

-
    -
  • 相册运行错误。相册找不到文件夹,但是配置中是有文件夹的,所以会显示一个相册,但是打不开
  • -
  • 云备份恢复。如果一些图片删除了,手机联网会自动从云备份恢复图片。那你这个相册就删不干净了。
  • -
-

如图所示,相册app删除的时候会同时删除远程备份,所以,,干净(并且不会导致相册运行错误)

- -
- - - - - - - - -
-
坚持原创技术分享,您的支持将鼓励我继续创作!
- - -
- - - -
- -
- - - - -
- - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..c0f5c4c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# here is the website of TCPSoft ,thanks for your reaching ! diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..cfecd89 --- /dev/null +++ b/_config.yml @@ -0,0 +1,100 @@ +# Hexo Configuration +## Docs: https://hexo.io/docs/configuration.html +## Source: https://github.com/hexojs/hexo/ + +# Site +title: Hi, I'm Cortana. +subtitle: '' +description: '' +keywords: +author: tcpsoft +language: zh-CN +timezone: '' + +# URL +## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' +url: http://blog.tcpsoft.app +root: / +permalink: :year/:month/:day/:title/ +permalink_defaults: +pretty_urls: + trailing_index: true # Set to false to remove trailing index.html from permalinks + +# Directory +source_dir: source +public_dir: public +tag_dir: tags +archive_dir: archives +category_dir: categories +code_dir: downloads/code +i18n_dir: :lang +skip_render: + +# Writing +new_post_name: :title.md # File name of new posts +default_layout: post +titlecase: false # Transform title into titlecase +external_link: + enable: true # Open external links in new tab + field: site # Apply to the whole site + exclude: '' +filename_case: 0 +render_drafts: false +post_asset_folder: false +relative_link: false +future: true +highlight: + enable: true + line_number: true + auto_detect: false + tab_replace: '' + +# Home page setting +# path: Root path for your blogs index page. (default = '') +# per_page: Posts displayed per page. (0 = disable pagination) +# order_by: Posts order. (Order by date descending by default) +index_generator: + path: '' + per_page: 10 + order_by: -date + +# Category & Tag +default_category: uncategorized +category_map: +tag_map: + +# Metadata elements +## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta +meta_generator: true + +# Date / Time format +## Hexo uses Moment.js to parse and display date +## You can customize the date format as defined in +## http://momentjs.com/docs/#/displaying/format/ +date_format: YYYY-MM-DD +time_format: HH:mm:ss +## Use post's date for updated date unless set in front-matter +use_date_for_updated: false + +# Pagination +## Set per_page to 0 to disable pagination +per_page: 10 +pagination_dir: page + +# Include / Exclude file(s) +## include:/exclude: options only apply to the 'source/' folder +include: +exclude: +ignore: + +# Extensions +## Plugins: https://hexo.io/plugins/ +## Themes: https://hexo.io/themes/ +theme: next + +# Deployment +## Docs: https://hexo.io/docs/deployment.html +deploy: + type: git + repository: https://github.com/tcpsoftware/tcpsoftware.github.io.git + branch: master diff --git a/about/index.html b/about/index.html deleted file mode 100644 index 965e660..0000000 --- a/about/index.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - about me. | Hi, I'm Cortana. - - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - - - -
- - -
- - - -
-
- -

about me. -

- - - -
- - - - -
-

学生族,00后,生卒年不详。

-

网络空间安全专业本科生

-

邮箱 tcpsoft@outlook.com

-

近几日闲来无事竟然开始写博文,这都得从一只蝙蝠说起……

- -
- - - -
- - - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2019/12/index.html b/archives/2019/12/index.html deleted file mode 100644 index 5f6b648..0000000 --- a/archives/2019/12/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2019

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2019/index.html b/archives/2019/index.html deleted file mode 100644 index 356e966..0000000 --- a/archives/2019/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2019

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/02/index.html b/archives/2020/02/index.html deleted file mode 100644 index 5f524ac..0000000 --- a/archives/2020/02/index.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/03/index.html b/archives/2020/03/index.html deleted file mode 100644 index e42a749..0000000 --- a/archives/2020/03/index.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/05/index.html b/archives/2020/05/index.html deleted file mode 100644 index 4afdb02..0000000 --- a/archives/2020/05/index.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/07/index.html b/archives/2020/07/index.html deleted file mode 100644 index 3830fca..0000000 --- a/archives/2020/07/index.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/08/index.html b/archives/2020/08/index.html deleted file mode 100644 index 458262c..0000000 --- a/archives/2020/08/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/index.html b/archives/2020/index.html deleted file mode 100644 index 89820be..0000000 --- a/archives/2020/index.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/page/2/index.html b/archives/2020/page/2/index.html deleted file mode 100644 index 1600ccb..0000000 --- a/archives/2020/page/2/index.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/page/3/index.html b/archives/2020/page/3/index.html deleted file mode 100644 index ff1aed2..0000000 --- a/archives/2020/page/3/index.html +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2021/07/index.html b/archives/2021/07/index.html deleted file mode 100644 index ef4fd56..0000000 --- a/archives/2021/07/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2021

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2021/index.html b/archives/2021/index.html deleted file mode 100644 index a0e57d2..0000000 --- a/archives/2021/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2021

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2022/03/index.html b/archives/2022/03/index.html deleted file mode 100644 index f4c28b0..0000000 --- a/archives/2022/03/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2022

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2022/04/index.html b/archives/2022/04/index.html deleted file mode 100644 index fb50e0c..0000000 --- a/archives/2022/04/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2022

-
- - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2022/index.html b/archives/2022/index.html deleted file mode 100644 index 6581ed5..0000000 --- a/archives/2022/index.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2022

-
- - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/index.html b/archives/index.html deleted file mode 100644 index bae4c85..0000000 --- a/archives/index.html +++ /dev/null @@ -1,664 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2022

-
- - - - -
-

2021

-
- - -
-

2020

-
- - - - - - - - - - - - - - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/page/2/index.html b/archives/page/2/index.html deleted file mode 100644 index 71d62d0..0000000 --- a/archives/page/2/index.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/page/3/index.html b/archives/page/3/index.html deleted file mode 100644 index ad27657..0000000 --- a/archives/page/3/index.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
- 嗯..! 目前共计 25 篇日志。 继续努力。 -
- - -
-

2020

-
- - - - - - - - -
-

2019

-
- - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/atom.xml b/atom.xml deleted file mode 100644 index 90c62ae..0000000 --- a/atom.xml +++ /dev/null @@ -1,519 +0,0 @@ - - - Hi, I'm Cortana. - - - - - - 2022-04-10T10:19:04.915Z - https://blog.tcpsoft.app/ - - - tcpsoft - - - - Hexo - - - 使用adb从手机传输相片到电脑 - - https://blog.tcpsoft.app/2022/04/adb-picture-transfer/ - 2022-04-10T10:07:32.000Z - 2022-04-10T10:19:04.915Z - - 随着手机照片越来越多,手机空间越来越小,把手机照片腾到电脑上或许是一个减小空间的办法。

将安卓手机上的照片复制到电脑上有几种方法:

  • 手机连电脑,使用文件模式复制照片
  • 手机连电脑,使用照片模式复制照片
  • 手机插U盘,复制照片
  • 手机插电脑,用adb命令行复制

前两种方法,由于Windows垃圾的安卓数据传输协议,极有可能中途失败或者传输错误。不考虑

第三种方法,可行,但需要手机支持插U盘以及需要USB口转typeC口等,不是很方便

第四种方法,步骤稍多,但是不需要U盘中转,速度快,可以方便的查看结果等优势

本文所使用和举例的机型是 MIUI 系统的手机,其他的系统路径不同,但是方法是一样的。

adb工具在这里放一个链接: https://cdutsec.lanzouw.com/ixnfb02yij7g

adb工具的版本太旧会影响传输速度和命令行的交互,所以尽量使用新版本的adb

0. 准备工作

0.1 电脑上adb工具

在此文件夹中,这三个文件,打开命令行即可操作。

image-20220410171522377

在文件夹按住shift然后鼠标右键,选择在此处打开命令行,可以运行adb

(如果打开的是powershell,运行cmd进入cmd命令行)

image-20220410113046875

0.2 手机上开启开发者模式和USB调试

0.2.1 开启开发者模式

如果手机没有开启开发者模式,按照这个操作开启开发者模式。

打开设置,点开我的设备

IMG_20220405_210341

点开全部参数

IMG_20220405_210406

一直点击MIUI版本,会进入开发者模式。

IMG_20220405_210501

0.2.2 打开开发者模式后打开USB调试

点开设置,打开更多设置,

IMG_20220405_210522

找到开发者选项

IMG_20220405_210531

首先开启开发者选项,手机可能提示有危险,选择确定。

然后打开USB调试的开关

Screenshot_2022-04-10-16-46-22-788_com.miui.securitycenterIMG_20220405_210546

1. 手机创建相册和分类照片

将手机中需要传到电脑的图片选中,点击添加到,新相册,创建相册

注意这里命名需要是:英文或数字,不能有空格 ,如果是带有汉字或者有空格,选中其中的图片,重新创建相册。

IMG_20220410_113421IMG_20220410_113442

选择移动相片的方式

IMG_20220410_113507

2. 电脑连接adb,搬运相片

把手机用原厂充电线插上电脑(杂牌线可能识别不了或数据传输有问题!)

运行adb devices ,可以看到设备ID。

(这时候手机可能谈弹出提示:是否允许这台计算机调试,选择允许。)

image-20220410165018191

adb shell 进入手机空间

cd /sdcard/Pictures/Gallery/owner/,进入到相册的目录。ls 可以看到各个创建的相册

(在MIUI旧版本上需要运行的可能是:cd /sdcard/MIUI/Gallery/cloud/owner/

image-20220410165325479

cd 文件夹名字 进入文件夹,例如在这里我的文件夹是usb,那么我运行:cd usb

pwd 查看当前目录的路径,

image-20220410171122349

复制完整路径备用。

exit或 ctrl d 退出shell命令行,回到Windows命令行,运行:

adb pull 完整路径 来拉取文件,例如在此处我运行:adb pull /sdcard/Pictures/Gallery/owner/usb

image-20220410171324243

过程中没有报错,如果报错需要根据提示解决问题。

打开文件夹可以看到,相片文件夹已经有了:

image-20220410171541286

3. 手机和电脑确认文件夹信息

3.1 手机上查看相册文件夹信息

打开re文件管理器(如果没有 安装一个)

IMG_20220410_113744

和上面的路径一样,打开找到owner,找到自己创建的文件夹,

长按选中文件夹,点击右上方三个点,点击属性

IMG_20220410_113858IMG_20220410_113908

可以看到文件夹里面有多少个文件,多少个文件夹,多少字节

image-20220410173129131

3.2 电脑上查看文件夹信息

打开刚才的文件夹,右键刚收到的文件夹,属性,

或者按住键盘alt键然后双击文件夹,打开文件夹属性

image-20220410172952180

对比两个信息,观察文件数、文件夹数、字节数都是一样的,就是完全复制到电脑上了,手机上的可以删除掉了

4. 手机上删除相册

这里快到结尾了,但还是要多说几句

删除相册的方式用且仅用:系统自带的相册app,来删除相册

IMG_20220410_113959

如图所示,MIUI是可能开启了云备份的,如果你恰好开了云备份并且这个相册里的一些图片已经备份,那么在使用文件管理器删除相册所在的文件夹,可能有两个问题:

  • 相册运行错误。相册找不到文件夹,但是配置中是有文件夹的,所以会显示一个相册,但是打不开
  • 云备份恢复。如果一些图片删除了,手机联网会自动从云备份恢复图片。那你这个相册就删不干净了。

如图所示,相册app删除的时候会同时删除远程备份,所以,,干净(并且不会导致相册运行错误)

]]>
- - - - <p>随着手机照片越来越多,手机空间越来越小,把手机照片腾到电脑上或许是一个减小空间的办法。 - - - - - - - - - -
- - - 硬盘损坏(物理)和事件分析 - - https://blog.tcpsoft.app/2022/03/my-disk-crushed/ - 2022-03-04T11:40:09.000Z - 2022-03-04T15:08:17.232Z - - 寒假期间,本人的电脑硬盘坏掉了。

总结一点经验吧,希望能帮助到您。

事件经过

​ 起初是偶尔的找不到系统分区找不到 winload.efi 从而无法启动。后来启不动,BIOS也识别不到,多重启几次可以开机。最后直接无法识别,换卡槽换机器也完全无法识别。 本人猜测可能是主控坏掉的原因。

​ 硬盘是西数SN550,容量是1TB,由于是在淘宝小店买的便宜货,店铺的售后就不可能了,尝试西数官方联保,在线申请一直提示网络问题无法申请。尝试看一下数据恢复服务,在系数官方的数据恢复里找到了ontrack公司,在线填写信息后客服发邮件提供了报价,约合人民币5500多。奈何本人,钱包不足,遂放弃。

​ 邮件如下(也可以参考一下使用昂贵的数据恢复服务的操作流程):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
您好XXX,

多謝你使用KLDiscovery Ontrack (HK) Ltd. 數據修復服務.
Ontrack 35年歷史,在美國上市,是全球最大的數據恢復公司,每年恢復超過50,000個成功個案。

數據恢復服務的程序如下:
1. 請郵寄你的硬盤到我們的辦公室.
2. 數據修復服務開始後, 你會收到我們發出的郵件, 你可登入查核數據修復進度.
3. 當修復服務完成後, 我們會傳送修復報告及報價單到你的電子郵箱.
4. 如你對報告感到滿意, 請簽回報價單. 修復好的數據將會儲存於全新1TB 移動硬盤.
5. 標準服務的檢查費為HKD800恢復數據費用為 HKD6000. 時間約為5-7個工作天 (不包括速遞運輸時間時間).
6. 如因為硬件事故或需配備零件, 需時可能會更長.
7. 如未能恢復成功, 不會收取恢復數據費用
8. 如Ontrack 成功恢復數據, 而客戶拒絕恢復服務, 我們會收取 HKD1000 行政費.
9. 如客戶於一個月內未有取回硬盤, ONTRACK 會將硬盤消磁並销毁.

以下是我們的辦公室地址,
To: KLDiscovery Ontrack (HK) Limited
香港北角電器道148 號12樓1203A室
ATTN: Andrew Sin
Tel: +852 3704 8688

請包好你的硬盤及貼上我們的Job編號 (6389167)
請確認以上的報價並回覆以上的電郵, 多謝!
希望收到您的好消息!
如需要任何協助, 請致電聯絡我們+852 3704 8688.

Thank you!

丢失的数据

​ 这一块硬盘里面包含了:

  • 200G的Windows系统盘(C),
  • 200G的硬件技术资料(O),
  • 200G的游戏分区GTA(V),
  • 200G的多媒体文件(W),
  • 50G的一些备份文件(X),

​ 这些数据和资料全部丢失了。虽然说恰好这些资料不是最重要的,但是C盘仍然是很多重要文件的集散地,不管是重装还是格盘,都会丢失大量的程序数据,包括但不限于:

  • appdata(相当大一部分程序的数据都在appdata),
  • documents(QQ接收文件 微信接收文件,QQ和微信的聊天记录数据库,一部分IDE的项目文件),
  • User目录(相当于Linux的~目录,程序员IDE的配置,一部分项目文件,一部分程序的配置文件都会在这里,尤其是ssh密钥和xshell的服务器记录,如果丢失损失非常大)
  • Download目录(相信很多人的下载文件都是放在这里的吧,如果丢失也会损失很多内容)
  • chrome的文件夹(书签 历史记录 扩展程序和油猴插件的脚本)(虽然说你登陆了账户并且开启了chrome同步,那书签和一小段时间的历史记录和你的扩展程序可以从远程恢复,但是扩展程序里面的数据 配置 手撕脚本等可能就付之一炬了特别是油猴(当事人:现在就是后悔 非常的后悔))

总结一些

后记

一怒之下在 jd 购买了三星980,1TB硬盘,感觉比西数更靠谱一点。

西数,🐕都不用

真香~.jpg

]]>
- - - - <p>寒假期间,本人的电脑硬盘坏掉了。</p> -<p>总结一点经验吧,希望能帮助到您。</p> - - - - - - - - - -
- - - 解决 WSL2 和 proxifier 的相互报错问题 - - https://blog.tcpsoft.app/2021/07/wsl2-and-proxifier/ - 2021-07-21T02:00:00.000Z - 2021-07-21T02:12:20.832Z - - 转载自知乎:https://zhuanlan.zhihu.com/p/151392411

关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

问题:

参考的对象类型不支持尝试的操作。(The attempted operation is not supported for the type of object referenced.)

解决方法:

1. 常见临时解决方案(不推荐):

以管理员身份运行CMD,输入:

netsh winsock reset

重启计算机即可修复。

2. 长期解决的方案(推荐):

(1)下载此软件:

http://www.proxifier.com/tmp/Test20200228/NoLsp.exe

(需要挂代理访问下载)

(2)管理员身份运行CMD输入:

NoLsp.exe C:\windows\system32\wsl.exe

请自行注意NoLsp.exe程序的位置,以及你的wsl.exe位置。

产生原因和解决方法分析:

  1. 代理软件和wsl2的sock端口冲突,使用netsh winsock reset重置修复。
  2. Proxifer开发人员解释如下:

如果Winsock LSP DLL被加载到其进程中,则wsl.exe将显示此错误。最简单的解决方案是对wsl.exe使用WSCSetApplicationCategory WinAPI调用来防止这种情况。在后台,该调用在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog中为wsl.exe创建一个条目。
这将告诉Windows不要将LSP DLL加载到wsl.exe进程中

上述解决方案来自于:

https://github.com/microsoft/WSL/issues/4177

https://answers.microsoft.com/zh-hans/insider/forum/all/wsl2%E5%AE%89%E8%A3%85kali/b6dd4c62-1130-4a7c-9462-1e9e5f38dab2

]]>
- - - - <p>转载自知乎:<code>https://zhuanlan.zhihu.com/p/151392411</code> </p> -<h2 id="关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。"><a href="#关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。" class="headerlink" title="关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。"></a>关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。</h2><p><img src="https://blogsrc-1301043685.cos.ap-chengdu.myqcloud.com/v2-7fc4f91dc113fc84a7115c2f8661b8f6_1440w.jpg" alt="关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。"></p> - - - - - - - - - - - - - -
- - - 欢迎 pwn 分区(P盘) - - https://blog.tcpsoft.app/2020/08/welcome-pwn-partition/ - 2020-08-04T08:24:29.000Z - 2020-08-05T04:20:56.561Z - - 今天再次尝试 wsl+gdb 调试,照舅失败

于是我搞了一个 “P分区”


wsl+gdb,不行. ❌

咕了很久还是想继续尝试gdb,wsl+gdb当然是最方便的一种方式了,打开命令行就可以用,都不需要开启 vmware。

但是很快的就遇到了问题。首先就是 wsl (我用的是Ubuntu16.04) 装好时是不支持32位程序的,通过搜索知道了安装启动 binfmt-support 就可以,让 wsl 能运行32位程序。

让64位的WSL(windows 子 linux系统)支持运行32位程序 - 简书

正准备开心的打开gdb调试,布星了。

在 gdb 里 start 可以,但是 ni 就不行了:

image-20200804185229605

1
2
3
4
5
6
pwndbg> ni
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x80484a0

Command aborted.

查询了一波,感觉大概可能应该或许是 wsl 他就不能调试32位程序?

image-20200804184759075

你品你细品,wsl 装好的时候是只有64位程序支持的,32位直接给砍掉了,如果要运行32位还需要安装 binfmt-support ,32位程序仿佛不是 wsl 本来所支持的功能?

你品你再品,gcc编译成32位程序还需要加 -m32 编译参数,那么默认编译出来就是64位?32位是不是”过时”了?

阅读 binfmt-support 的介绍,可以看到

https://packages.debian.org/stretch/binfmt-support 上,写道:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
==========原文==========
软件包:binfmt-support(2.1.6-2)
Support for extra binary formats
The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

This package provides an 'update-binfmts' script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

标签: 系统管理: 核心或模块, 软件开发: 解释器, 实做语言: implemented-in::perl, interface::commandline, 角色: 程序, 范围: 实用程序, 应用程序集: Debian
==========google机翻==========
软件包:binfmt-support(2.1.6-2)
支持额外的二进制格式
版本2.1.43和更高版本的Linux内核中包含的binfmt_misc内核模块,使系统管理员可以根据幻数或文件扩展名注册各种二进制格式的解释器,并在匹配文件时调用适当的解释器。被执行。将其视为#的更灵活版本!可执行解释器机制。

该软件包提供了一个'update-binfmts'脚本,软件包维护者可以使用该脚本注册要与此模块一起使用的解释器,而不必担心编写自己的init.d脚本,并且sysadmin可以将其用于稍高级别的接口。模块。

标签: 系统管理: 核心或模块, 软件开发: 解释器, 实做语言: implemented-in::perl, interface::commandline, 角色: 程序, 范围: 实用程序, 应用程序集: Debian

http://binfmt-support.nongnu.org/ 上,写道:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
==========原文==========
binfmt-support
The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

binfmt-support provides an update-binfmts script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

Versions 1.2.0 and above also support a mechanism for extending the range of binary formats among which the kernel can distinguish with the aid of a userspace helper, called a detector.

The source code to binfmt-support can be retrieved from its Git repository (if you don't have Git, follow the link for installation instructions).

This Web page is created and maintained by Colin Watson.
Last modified: $Date: 2017/07/09 13:30:47 $
==========google机翻==========
binfmt-支持
binfmt_miscLinux内核版本2.1.43和更高版本中包含的内核模块,允许系统管理员基于幻数或其文件扩展名注册各种二进制格式的解释器,并在匹配文件被调用时调用适当的解释器。被执行。可以将其视为#!可执行解释器机制的更灵活版本 。

binfmt-support提供了一个update-binfmts 脚本,程序包维护人员可以使用该脚本来注册要与此模块一起使用的解释程序,而不必担心编写自己的 init.d脚本,并且sysadmins可以将其用于该模块的更高级别的界面。

1.2.0及更高版本还支持一种扩展二进制格式范围的机制,内核可以借助一种称为检测器的用户空间助手来区分二进制格式 。

binfmt-support可以从其Git存储库中检索要获取 的源代码(如果您没有Git,请遵循链接以获取安装说明)。

该网页由Colin Watson创建和维护 。
上次修改时间:$日期:2017/07/09 13:30:47 $

这两个网页说,binfmt-support 是32位程序的解释器,安装后将32位程序绑定使用它打开。这是不是有点像虚拟机风格? gdb和Linux内核应该还是不能支持32位(我猜的)


vmware,好用!✅

不多说了吧,VMware装一个Ubuntu来进行调试,肯定没问题

但是我还是想快速的访问Windows上那些文件夹。

https://cn.bing.com/search?q=vmware添加共享文件夹

由于我会常用到下载文件夹,所以把下载文件夹映射到share目录。

image-20200804221417612

Linux里面,文件夹在哪儿呢?

/mnt/hgfs/share

但是文件管理器进入这个目录,还是不能右键新建文件夹。

ls -al 查看权限,chmod 777 share授予最宽的权限,再次 ls -al查看权限

image-20200804222350672

image-20200804222407950

设置完后就可以像正常使用一样读写这个文件夹了,所做的更改,在Windows上全部同步。

可是,这个目录不太好打啊

我在 ~/.bash_aliases 里设置了share,来方便地命令行打开文件夹 alias share="cd /mnt/hgfs/share"

那么下次运行share命令就可以了,

(感觉还是哪里不太方便?)


P盘 与 /pwn

干脆把那个文件夹抽出来,用一个分区存?

好处:

  1. Windows上好找,单独一个分区呢,二进制文件放里面就好啦
  2. 虚拟机里好找,vmware设置挂在文件夹时输入分区就行了,不用担心如果文件夹被移动,会导致虚拟机内不可用
  3. wsl 里好找,众所周知,wsl 和Windows共享文件系统,是通过把Windows上的盘符,挂载到 /mnt,那么P盘对应就是 /mnt/p,可以说目录已经灰常好打了
  4. 稳定不容易坏,他就是个单独分区,不存在移动文件夹导致找不到的问题,只要这个盘还在,就能用(盘不在就创建一个分区呗)

在此电脑,右键,管理,磁盘管理,搞个新分区,我选的4G大小差不多了。大概像酱紫:

image-20200804164302218

操作完之后就多出来一个P分区。

这里有一点经验教训就是新建分区后进去然后打开wsl是不行的,wsl还不能识别到分区,如果要识别,需要重启wsl,在管理员权限的cmd里运行:

1
2
net stop LxssManager
net start LxssManager

虚拟机设置挂载文件夹,同上文。然后运行 ls -al 就可以看到 p 文件夹:

image-20200804234159560

这次就,不设置 alias 命令了吧,直接,把这个文件夹,映射到根目录下的 /pwn

创建符号链接

1
sudo ln -s /mnt/hgfs/p /pwn

image-20200804234628952

运行 ls -al

image-20200804234748499

来试一下好了没,运行 cd /pwn

image-20200804234951886

(这里新建p分区的时候应该应该选择exFat文件系统的。。)

(然后用 DiskGenius 格式化成了exFat。亲测可用)

image-20200805000450165

听说win10可以直接读取ext4 U盘,硬盘应该也快了。我试试格式化成ext4格式。

读取不了,资源管理器都不显示

尝试安装了一个 Ext2Fsd-0.69.exe,在 https://sourceforge.net/projects/ext2fsd/ 下载的

安装完成需要重启电脑,不敢重启,就算了不试了

格式化回exFat格式,可正常使用

下一步,放进文件

image-20200805002113063

下一步,在Linux中使用

image-20200805002130947

]]>
- - - - <p>今天再次尝试 wsl+gdb 调试,照舅失败</p> -<p>于是我搞了一个 “P分区” - - - - - - - - - - - - - -
- - - 简简单单的记录一下gdb的亿点点常用的操作 - - https://blog.tcpsoft.app/2020/07/gdb-operation/ - 2020-07-28T13:35:52.000Z - 2020-07-28T14:21:11.448Z - - .

gdb操作:


gdb ./xxx

开始调试xxx程序,如果不能运行,需要先 chmod +x ./xxx


gdb attach [pid]

通过程序id即pid,gdb附加到一个正在运行的程序,并对其进行调试


start

运行程序并断点在第一条指令

输出寄存器,反汇编等信息


list

有源码的情况下 输出源码

1
2
3
4
5
6
7
8
9
10
11
12
pwndbg> list
warning: Source file is more recent than executable.
1 #include<stdio.h>
2 #include<stdlib.h>
3 #include<unistd.h>
4 int main(){
5 char num='0';
6 char str[10];
7 read(0,str,0x10);
8 if(num=='1'){
9 puts("great.\n");
10 fflush(stdout);

b *内存地址

在内存地址处下断点


b 函数名/*函数名

下断点

1
2
pwndbg> b main
Breakpoint 1 at 0x80484dc: file pwn05_char[]_overflow.cpp, line 5.

info b

查看断点信息

1
2
3
pwndbg> info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x080484dc in main() at pwn05_char[]_overflow.cpp:5

step

step(in),步入,在有源码调试时,执行下一行源码,有函数调用时进入函数调用


next

步过,在有源码调试时,执行下一行源码,有函数调用时执行完函数并执行到函数调用的下一行


nexti/ni

next instruction,步过,执行下一行汇编指令


stepi/si

step into,步入,执行下一行汇编指令,如果有函数调用时进入函数的第一行汇编指令


finish

运行完当前的函数,停在最后一句汇编代码


info registers

寄存器信息


x/<n/f/u> <addr>

格式:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
f格式:
x 按十六进制格式显示变量。
d 按十进制格式显示变量。
u 按十六进制格式显示无符号整型。
o 按八进制格式显示变量。
t 按二进制格式显示变量。
a 按十六进制格式显示变量。
c 按字符格式显示变量。
f 按浮点数格式显示变量。

u格式:
b表示单字节
h表示双字节
w表示四字节
g表示八字节。

一些GDB参考链接:

https://blog.csdn.net/tzshlyt/article/details/53668885

https://www.jianshu.com/p/b7896e9afeb7

https://blog.csdn.net/u013525455/article/details/52813637

https://www.jianshu.com/p/e6af28e2566f

https://www.cnblogs.com/xiaoshiwang/p/10755199.html

https://www.cnblogs.com/xsln/p/gdb_instructions1.html

https://man.linuxde.net/gdb

https://www.cnblogs.com/tangtangde12580/p/8045980.html

https://www.cnblogs.com/zhoug2020/p/7283169.html

https://www.jianshu.com/p/adcf474f5561

https://blog.csdn.net/songchuwang1868/article/details/86132281

]]>
- - - - <p>. - - - - - - - - - -
- - - batch-shortcuts - - https://blog.tcpsoft.app/2020/07/batch-shortcuts/ - 2020-07-28T13:19:40.000Z - 2020-07-28T13:28:21.725Z - - 教你设置 batch-shortcuts

img

PATH 环境变量介绍

搬运自 知乎

PATH 环境变量

经常使用命令行工具的话,对PATH等环境变量应该会非常熟悉;但现今的日常开发,接触到这一概念的机会越来越少。

时不时还是会遇到小朋友问我:“什么是PATH?”

这里记录一下,以供参考。

什么是环境变量?

环境变量是操作系统提供给应用程序访问的简单 key / value字符串;windows/linux/mac都有同样的概念。

一般用于提供参数值给不同的应用程序。

什么是PATH变量?

我们从命令行想要运行一个程序的时候,待运行的程序往往不是在当前目录。

PATH变量就是用于保存可以搜索的目录路径,如果待运行的程序不在当前目录,操作系统便可以去依次搜索PATH变量变量中记录的目录,如果在这些目录中找到待运行的程序,操作系统便可以运行。

Go开发为例,但我们使用go install命令编译、安装go程序后,可执行文件是会被保存在$GOPATH/bin路径下;那么我们可以把这个路径加入PATH变量中,这样我们便可以在任意路径中运行go安装的程序。

GOPATH

GOPATH又是一个环境变量,用于保存go的主目录,go默认安装之后,GOPATH会是当前用户的主工作目录中的go子目录,即:%HOME/go

查看环境变量

假设我们要查看GOPATH这个环境变量的值:

  • windows command prompt: echo %GOPATH%
  • windows powershell: $env:GOPATH
  • linux & mac: echo $GOPATH

设置PATH变量

windows

假设我们当前登陆操作系统的用户名是:xiaomin

然后我们要把c:\users\xiaomin\go\bin路径加入到PATH变量中,在windows下我们可以在PowerShell中执行:

1
$env:Path += ";c:\users\xiaomin\go\bin"

注意,这样仅仅只是临时修改当前的PATH变量,当我们关闭、重开PowerShell时,就需要重新设置。

如果要永久的修改,需要使用管理员权限启动PowerShell,然后执行:

1
setx /M PATH "%PATH%;c:\users\xiaomin\go\bin"

Linux & Mac

同样假设我们当前登陆用户名是:xiaomin

然后我们要把/home/xiaomin/go/bin路径加入到PATH变量

1
export PATH=$PATH:/home/xiaomin/go/bin

这同样是临时修改,重开shell之后,会被重置;要永久改变的话,一般是将上面的命令加入到我们使用的shell初始化文件中。

以bash为例,那么就是将上述命令加到/home/xiaomin/.bash_profile文件中。


设置步骤

1. pathext

Windows上的另一个变量。这里存储可直接运行的文件类型,一般需要添加 .lnk 进去

2. 建立一个目录

建立: D:\bin\batch-shortcuts

D:\bin\ 路径又简洁又舒服

3. 把目录写入path

参照百度经验:windows10设置环境变量PATH

注意,设置完后,需要重启资源管理器和命令行来应用更改。

可以在任务管理器,选中资源管理器,选择重新启动

可以注销,然后登陆

可以重启

4. 然后就可以用了

怎么用?

在上面那个文件夹内的所有文件,都是命令行可以访问到的。

一般可以创建:.bat .lnk ,.exe也阔以哇

举个栗子:

1
2
文件名:batch-shortcuts.bat
explorer "D:\bin\batch-shortcuts"

模仿Linux ctrl d 一键关闭风格,创建的 d.bat

1
2
文件名:d.bat
exit

比如md5

1
2
文件名:md5.lnk
指向:"D:\Program Fies (Green)\WinMD5校验器.exe"

还有一些调用程序的,比如安装Ubuntu后,写一个脚本来调用Ubuntu执行命令

1
2
3
4
5
6
7
8
9
文件名:ubuntu.bat
@echo off

echo.
echo Usage:
echo use "ubuntu run $code$" to run shell command

echo.
"C:/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_2020.1604.14.0_x64__79rhkp1fndgsc/ubuntu1604.exe" %*

%* 是传递所有命令行参数,这个了解一下会有很大的帮助

如果不用这个,就得用 %1 %2 %3 %4 %5 %6 %7 %8 %9 ,而超过9的就不能再处理了

还有其他玩法,自己探索吧!


关于 D:\bin 文件夹

我一般把命令行调用的,编程语言类的,放在这里面,

(还有一些绿色IDE为代表的,可以一套带走的,我也放里面)

(还有DOS系统盘为代表的,系统级的底层的,我也放里面)

一方面是,这个路径他没有空格,不容易导致命令行调用出错。

第二是,他真的又简洁又舒服哇

列出一下目前为止我的 D:\bin 的内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
D:\bin>dir
驱动器 D 中的卷没有标签。
卷的序列号是 9E68-267B

D:\bin 的目录

2020/05/25 16:24 <DIR> .
2020/05/25 16:24 <DIR> ..
2020/05/25 16:25 <DIR> .gradle
2020/03/17 20:23 <DIR> Anaconda3
2020/03/23 01:30 <DIR> Android_SDK
2020/06/05 10:42 <DIR> batch-shortcuts
2020/07/16 17:22 <DIR> DOS-16bit
2020/02/15 14:21 <DIR> eclipse-cpp
2020/02/15 14:18 <DIR> eclipse-java
2020/05/21 17:14 <DIR> ESP_8266
2019/07/01 00:43 <DIR> HBuilder.9.0.1.windows
2020/03/31 23:31 <DIR> HBuilderX.2.6.8.20200330.full
2020/04/21 01:06 <DIR> Java
2020/07/17 11:56 <DIR> nodejs
2019/11/28 13:53 <DIR> Perl
2020/03/18 23:53 <DIR> PortableApps
2020/02/19 23:47 <DIR> Python
2020/03/12 21:23 <DIR> Qt
2020/03/10 23:30 <DIR> Ruby27-x64
2020/03/23 21:16 <DIR> texlive
0 个文件 0 字节
20 个目录 57,676,476,416 可用字节

D:\bin>
]]>
- - - - <p>教你设置 batch-shortcuts</p> -<p><img src="https://blogsrc-1301043685.cos.ap-chengdu.myqcloud.com/006APoFYly1geysc9gpjmj305i058749.jpg" alt="img"> - - - - - - - - - -
- - - 亿分钟成为时间管理大师 - - https://blog.tcpsoft.app/2020/07/time-management/ - 2020-07-16T02:27:30.000Z - 2020-07-16T04:57:23.701Z - - 使用一个叫 manicTime 的软件

(好像最近越来越喜欢挖坑不填了哇)

(想了解的小伙伴请发邮件催更,联系方式在about页面有)

image-20200716102927688

]]>
- - - - <p>使用一个叫 manicTime 的软件 - - - - - - - - - -
- - - QQ空间辅助点赞 - - https://blog.tcpsoft.app/2020/07/qzone-faster-like/ - 2020-07-11T01:05:01.000Z - 2020-08-16T10:30:11.292Z - - QQ空间手滑点赞太麻烦,用键盘吧。

嗯,我文思枯竭了,编不出什么内容充实的文章,就写下过程贴代码吧

浏览器检查元素

通过完成的审查元素发现:

1
2
3
4
所有的列表,元素的id:     feed_friend_list
一个说说的,元素的class: f-single
点赞按钮,元素的class: qz_like_btn_v3
评论按钮,元素的class: qz_btn_reply

写脚本

之前考虑用jQuery实现,用油猴脚本,但是脚本对于加载jQuery有一点问题

因为QQ空间用了 $ 这个名字,但是不是jQuery,所以考虑用纯 js 实现。

后来啊。$ 不是可以用jQuery写么。就改成了jQuery实现

(jQuery真香)

用纯 js 添加点赞按钮的css

1
2
3
4
var style = document.createElement('style');
style.innerHTML="a.item-on {background-color: red;}"
var head = document.head || document.getElementsByTagName('head')[0];
head.appendChild(style);

完整脚本 v0.1

(还没想好怎么解释这个脚本。直接贴代码)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app/
// @version 0.1
// @description try to take over the world!
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==
(function () {
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
function up(){
console.log("上");
}
function left(){
console.log("左");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
}
function down(){
console.log("下");
var first=jQuery(".f-single").eq(0);
console.log(first);
first.slideUp(function(){this.remove()});
//if(jQuery(".f-single").length==0){
//window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
first.slideUp(function(){this.remove()});
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div>\
<style>\
#rect {\
height: 100px; width: 160px; border:red 5px solid; position:fixed;\
z-index: 999; top:40px; margin-left:40%; margin-right:40%;\
}\
#rect:focus{ border:5px green solid; }\
</style>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n下 下一条\n左 评论\n右 点赞</textarea></div>');
jQuery("body").append($rect);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();

2020-08-01更新 v0.2

增加了修复网络的功能。妈妈再也不用担心更新不出来啦

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app/
// @version 0.2
// @description QQ空间用键盘操作,岂不美哉
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==

(function () {
'use strict';
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
function up(){
console.log("上");
}
function left(){
console.log("左");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
}
function down(){
console.log("下");
var first=jQuery(".f-single").eq(0);
console.log(first);
first.slideUp(function(){this.remove()});
//if(jQuery(".f-single").length==0){
//window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
first.slideUp(function(){this.remove()});
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div id="rect_div">\
<style>\
#rect_div{\
position:fixed; z-index: 999; top:40px; margin-left:40%; margin-right:40%; width: 50%;\
}\
#rect {\
height: 100px; width: 200px; border:red 5px solid; \
}\
#rect:focus{ border:5px green solid; }\
#qzone_fix_button{\
float:left; height: 50px; width: 100px; border:skyblue 2px solid; \
}\
</style>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n下 下一条\n左 评论\n右 点赞</textarea>\
<button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button></div>');
jQuery("body").append($rect);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();

2020-08-16更新 v0.3

0.3版本,增加了简单的去除顶部的已点赞用户

代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app/
// @version 0.3
// @description QQ空间用键盘操作,岂不美哉
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==

(function () {
'use strict';
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
var list=["Cortana","Cortana"];
function getFirstTime(){
var first=jQuery(".f-single").eq(0);
var timetime = first.find(".info-detail .ui-mr8.state").html();
console.log(timetime);
}
function faded(first){
getFirstTime();
first.slideUp(100,function(){this.remove()});
}
function clearLiked(){
jQuery("#finishedClearLiked").html("pending.");
var first=jQuery(".f-single").eq(0);
console.log(first);
if(first.length==0){
jQuery("#finishedClearLiked").html("finished.");
return;
}
var nickName = first.find(".f-nick a").html();
console.log(nickName);
var matchList = false;
for(i=0;i<list.length;i++){
if(nickName.indexOf(list[i])>-1){
matchList=true;
break;
}
}
if(matchList==true){
console.log("进入{pass}分支");
var second=jQuery(".f-single").eq(1);
var nextZan=second.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//取消赞
console.log(nextZan.length);
if(nextZan.length!=0){ //下面有取消赞
console.log("下面有取消赞,所以pass");
first.remove();
setTimeout(clearLiked,100);
}
else{ //下面没有取消赞,停止
console.log("下面无取消赞,所以停止");
var nickName = second.find(".f-nick a").html();
console.log("下一个人是:",nickName);
jQuery("#finishedClearLiked").html("finished.");
}
}
else{
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
jQuery("#finishedClearLiked").html("finished.");
}
else{
first.remove();
setTimeout(clearLiked,100);
}
}
}
function up(){
console.log("上");
jQuery("#finishedClearLiked").html("pending.");
clearLiked();
}
function left(){
console.log("左");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
}
function down(){
console.log("下");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
faded(first);
//if(jQuery(".f-single").length==0){
//window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
faded(first);
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div id="rect_div">\
<style>\
#rect_div{\
position:fixed; z-index: 999; top:40px; margin-left:40%; margin-right:40%; width: 50%;\
}\
#rect {\
height: 120px; width: 200px; border:red 5px solid; \
}\
#rect:focus{ border:5px green solid; }\
#qzone_fix_button{\
float:left; height: 50px; width: 100px; border:skyblue 2px solid; \
}\
#clearLikedDiv{\
vertical-align: top;border: 2px solid yellow;width: 150px;height: 80px;\
display: inline-flex;flex-direction: column;background-color: wheat;\
}\
#finishedClearLiked{\
border: skyblue 2px inset; font-size: 1.5em;\
}\
#startClearLiked{\
width: 100%;flex-grow: 1;\
}\
</style>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n上 清理顶部已点赞\n下 下一条\n左 评论\n右 点赞</textarea>\
<button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button>\
<div id="clearLikedDiv">\
<span id="finishedClearLiked">free.</span>\
<button id="startClearLiked">清理已点赞</button>\
</div>\
</div>');
jQuery("body").append($rect);
jQuery("#startClearLiked").click(clearLiked);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();

2020-08-16更新 v0.4

增加显示最顶部五条动态内容,修复网络和状态条和删除顶部已点赞都放在最左边了

代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
// ==UserScript==
// @name QQ空间快速操作
// @namespace https://blog.tcpsoft.app
// @version 0.4
// @description QQ空间用键盘操作,岂不美哉
// @author tcpsoft
// @match https://user.qzone.qq.com/*
// @grant none
// ==/UserScript==

(function () {
'use strict';
// Your code here...
/* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
var list=["Cortana","今日百色","易锦教育","易锦大学","CUIT网络空间安全学院","丁凌娜","黄恋茹","Victor","墙"];
function getFirstTime(){
var first=jQuery(".f-single").eq(0);
var timetime = first.find(".info-detail .ui-mr8.state").html();
console.log(timetime);
}
function matchList(nickName){
var match = false;
for(i=0;i<list.length;i++){
if(nickName.indexOf(list[i])>-1){
match=true;
break;
}
}
return match;
}
function faded(first){
getFirstTime();
first.slideUp(100,function(){this.remove()});
}
function clearLiked(){
jQuery("#finishedClearLiked").html("pending.");
var first=jQuery(".f-single").eq(0);
console.log(first);
if(first.length==0){ //好友动态已经空了
jQuery("#finishedClearLiked").html("finished.");
return;
}
var nickName1 = first.find(".f-nick a").html();
console.log(nickName1);
var match1 = matchList(nickName1);
if(match1==true){ // 第一个人是列表
console.log("进入{pass}分支");
var second=jQuery(".f-single").eq(1);
var nextZan=second.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//查找取消赞
console.log("第二个人有无取消赞:",nextZan.length);
if(nextZan.length!=0){ //下面有取消赞
console.log("下面有取消赞,所以pass");
first.remove();
setTimeout(clearLiked,125);
}
else{ //第二个人下面没有取消赞,
console.log("第二个人下面无取消赞,");
var nickName2 = second.find(".f-nick a").html();
console.log("第二个人:",nickName2);
var match2 = matchList(nickName2);
if(match2==true){ // 第二个人也是列表
console.log("进入{pass}分支");
var third=jQuery(".f-single").eq(2);
var nickName3 = second.find(".f-nick a").html();
console.log("第三个人:",nickName3);
var thirdZan=third.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//取消赞
console.log("第三个人有无取消赞:",thirdZan.length);
if(thirdZan.length!=0){ //下面有取消赞
console.log("第三个人下面有取消赞,所以pass");
first.remove();
setTimeout(clearLiked,125);
}
else{ //下面没有取消赞,停止
console.log("下面无取消赞,所以停止");
jQuery("#finishedClearLiked").html("finished.");
}
}
}
}
else{
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log("第一个人有无点赞按钮:",zan.length);
if(zan.length!=0){ // 有点赞按钮,结束
jQuery("#finishedClearLiked").html("finished.");
}
else{
first.remove();
setTimeout(clearLiked,125);
}
}
setTimeout(space,100);
}
function space(){
for(var iii=0;iii<5;iii++){
var one=jQuery(".f-single").eq(iii);
if(one.length==0){
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(0).html("nickName");
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(1).html("timestamp");
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(2).html("content");
}
else{
var nickName = one.find(".f-nick a").html();
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(0).html(nickName);
var time = one.find(".info-detail .ui-mr8.state").html();
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(1).html(time);
var summary = one.find(".f-info").text();
jQuery("#statusTable").find("tr").eq(iii).find("td").eq(2).html(summary);
}
}
}
function up(){
console.log("上");
jQuery("#finishedClearLiked").html("pending.");
clearLiked();
setTimeout(space,100);
jQuery("#finishedClearLiked").html("finished.");
}
function left(){
console.log("左");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
first.find(".qz_btn_reply").click();
setTimeout(space,100);
}
function down(){
console.log("下");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
faded(first);
setTimeout(space,100);
//if(jQuery(".f-single").length==0){
//window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
//}
}
function right(){
console.log("右 点赞");
jQuery("#finishedClearLiked").html("free.");
var first=jQuery(".f-single").eq(0);
console.log(first);
var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
console.log(zan.length);
if(zan.length!=0){
zan.eq(0).click();
}
faded(first);
setTimeout(space,150);
}
function beg(){
console.clear();
console.log("【【【【【】】】】】");
/*插入输入框*/
var $rect = jQuery('<div id="rect_div">\
<style>\
#rect_div{\
position: fixed; z-index: 999;top: 40px; width: 90%; text-align: center; left: 0px; right: 0px; margin-left: auto; margin-right: auto;\
}\
#rect {\
height: 140px; width: 210px; border:red 5px solid; \
}\
#rect:focus{ border:5px green solid; }\
#clearLikedDiv{\
vertical-align: top;border: 4px solid darkseagreen;width: 100px;height: 120px;\
display: inline-flex;flex-direction: column;background-color: wheat;\
}\
#qzone_fix_button{\
height: 50px; width: 100px; \
}\
#finishedClearLiked{\
border: skyblue 3px inset; font-size: 1.5em;\
}\
#startClearLiked{\
width: 100%;flex-grow: 1;\
}\
\
#statusTable{\
border-collapse: collapse;\
display: inline-table;\
vertical-align: top;\
}\
#statusTable tr td:nth-child(1){\
background-color: #FFFFCC;\
width: 100px;\
}\
#statusTable tr td:nth-child(2){\
background-color: #DDDDDD;\
width: 100px;\
}\
#statusTable tr td:nth-child(3){\
background-color: #CCFFCC;\
width: 300px;\
}\
</style>\
<div id="clearLikedDiv">\
<button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button>\
<span id="finishedClearLiked">free.</span>\
<button id="startClearLiked">清理已点赞</button>\
</div>\
<textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n空格 加载前五条动态信息\n上 清理顶部已点赞\n下 下一条\n左 评论\n右 点赞</textarea>\
<table id="statusTable" border="2"><tr>\
<td>100</td><td>100</td><td>100</td>\
</tr><tr>\
<td>200</td><td>200</td><td>200</td>\
</tr><tr>\
<td>300</td><td>300</td><td>300</td>\
</tr><tr>\
<td>400</td><td>400</td><td>400</td>\
</tr><tr>\
<td>500</td><td>500</td><td>500</td>\
</tr></table>\
</div>');
jQuery("body").append($rect);
jQuery("#startClearLiked").click(clearLiked);
/*红色点赞*/
jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
/*红色提示和文字
jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
*/
/*监听document的回车操作 37左 38上 39右 40下*/
jQuery("#rect").keydown(function(e){
//获取键盘输入的keyCode
//console.log(e)
var keycode = (Number)(e.keyCode);
console.log(keycode);
if(keycode == 32){//空格
console.log("空格");
space();
}else if(keycode == 37){//左
left();
}else if(keycode == 38){//上
up();
}else if(keycode == 39){//右
right();
}else if(keycode == 40){//下
down();
}
return false;
});
}
console.log("----等两秒----");
setTimeout(beg,2000);
})();
]]>
- - - - <p>QQ空间手滑点赞太麻烦,用键盘吧。</p> -<p>嗯,我文思枯竭了,编不出什么内容充实的文章,就写下过程贴代码吧 - - - - - - - - - -
- - - 手机差点报废后的自救 - - https://blog.tcpsoft.app/2020/05/Mi9-SE-screen-problem-self-rescue/ - 2020-05-26T11:28:30.000Z - 2020-05-26T13:04:34.854Z - - 今天手机屏幕出问题手机差点变砖

莫名其妙的自动点击

今天(前几天开始),手机使用的时候总是有莫名其妙的自动的点击,造成了一些困扰。

今天下午开始直接十点同时点击,在屏幕最下方!

脑补一下:打开输入法,啪啦啪啦给我按一堆 ,.,.,,,

打开设置,啪啦啪啦给我点进去不知道什么设置选项了

打开 Minecraft ,选中TNT,刚想摆,结果在右边给我放了一堆了(然后切换成火石…)

(事后模拟了一下,大概就像这样:)

img

考虑是不是系统卡顿

img

锁屏,解锁。无效

关机,重启。无效。开机一会儿后又开始了,而且频繁的点击影响锁屏解锁!

什么?你想叫我重买?

不可能想都不要想_不要_可能表情

考虑是不是有病毒软件恶意程序

浩浩荡荡开始卸载(半年了终于清理一次手机)

顺手发现了小米系统的自动启动程序是真的恶心。刚关了几个,又给我打开了几个程序

检查并卸载了:白鲸V₱N、老王V₱N、蚂蚁V₱N、旋风V₱N、Minecraft网易版、adbd insecure(系统使用过程中提示授予了root权限 所以严重怀疑这个)、VMOS(占用空间大,顺手卸了吧)、轻启动(有模拟点击,所以也怀疑这个,而且长得还丑,顺手卸了吧)

莫 有 卵 用 !

还是那么自由的十点暴击

冻结系统程序

浏览小米系统管家,看到了下面的程序然后冻结了

心想重启一下才能停止运行系统服务呢。重启手机。结果:

触 摸 完 全 没 反 应 了 !

下图是网上随便找的,脑补一下随便怎么划都没反应的状态。当时我心里就直接:噔噔咚

咋办??????????????????

adb ?试试就逝世。

连接电脑,adb shell进入命令行。

input,模拟触摸。不管用

通过搜索,知道了如何列出已停用的系统程序

通过搜索知道了启用已冻结的系统程序的方法,启用了两个,然后reboot重启

还是不行。又启用了两个

重启,还是不行

突然想到鼠标

摸出手机 USB-C OTG 转接头,拔掉电脑无线鼠标插上OTG插上TypeC口,

能用!

啊这?? 这变成巴掌大的 Android显示器了么

所幸是能用了

希望人没事_没事_希望表情

现在又咋办呢????????????

进入TRWP看看?

截图就不截图了,脑补一下。

重启进入TRWP,各种操作都是正常的,甚至还很流畅。

判定硬件没有问题。

判定TRWP手机驱动正常可用。

MIUI系统有问题。

通过搜索,我们知道…

搜你妹,上莆田医院啊

img

重装。。。系统?

然后又搜了一堆新版系统,又搜了刷系统。

不行,我程序还没备份。

于是打算开始用鼠标操作进行本地备份( 如何操作

此处省略 1w 字 …

浏览器历史记录:(信息量很大)image-20200526165743064

image-20200526165817077

image-20200526165855658

image-20200526165952401

image-20200526170059829

我想起高兴的细情

手机发烫了。

想起前面哪篇文章说过触摸不行可能是屏幕上电荷什么的。。。

终于找到这篇文章了

解决方案:湿抹布,上下左右前前后后擦一遍,重启。

问题解决。

意不意外!惊不惊喜! - 没想到吧?我想到了哈哈哈!意不意外?惊不惊喜?刺不刺激?_想不到_装逼_斗图_怼人表情表情

]]>
- - - - <p>今天手机屏幕出问题手机差点变砖</p> - - - - - - - - - -
- - - 大举报:仿佛那个时代又来临了 - - https://blog.tcpsoft.app/2020/05/dajubao/ - 2020-05-11T06:35:55.000Z - 2020-05-26T11:57:51.419Z - - 转自 豆瓣 : 2019-05-25 03:37:45


大举报:仿佛那个时代又来临了

原创:梅骁

1

之前我很想写一篇文章,写举报是时代变坏的开始。

但最近我的想法变了,我们的时代不是在开始变坏,而是已经变得很坏了。

最近一个让我有这种感觉的事件是王晨艺的点赞事件。

王晨艺是今年《创造营2019》的一个选手,是个没什么背景的舞蹈老师,在《创造营2019》这个整体很糊的节目里人气排名很靠前。

你不知道他没关系,因为我其实对他也没那么熟悉。

但这两天他身上发生了一个事情,有人扒出他六年前曾经在微博点赞过荤段子,所以认为他点赞涉及“敏感问题”,认为他是劣迹艺人,要求他立刻退赛。

img

看到这条新闻的时候,我觉得这一切都荒谬透顶。

最可怕的还不是有人认为一个人点赞荤段子所以他就是劣迹艺人,最可怕的是居然有人为了寻找一个人的“劣迹”而去疯狂翻查这个人过去多年的人生经历,试图寻找出一个黑料、一个过失,并对此大加举报攻击,以达到封杀、退赛的目的。

这个画面实在太可怕了。

一个人,他面无表情地盯着手机、盯着电脑,去从另一个人过往的茫茫人生经历里寻找一个错漏之处,就为了攻击他、打垮他。

你十年前说过脏话、你五年前垃圾没扔进垃圾桶、你三年前打过人一拳……这些全部都有可能成为你被攻击的素材。

这太可怕了,这画面的恐怖程度不亚于任何一部恐怖片。

因为我们谁都不能保证自己过往人生里从没有过任何错漏不当之处,所以我们任何人都有可能成为被这种手段打倒的那个。

2

时间稍微往前推一下。

今年三月份时,曾经发生过一件事,重庆一所高校里,有个老师因为课堂上发表损害国家声誉的过激言论而被学生举报。

学校很快发布公告,认为他违反教师职业道德,撤销了他的教师资格。

img

这是举报者的又一次胜利,可我看得特别害怕。

试想一下,当一个大学老师在课堂上讲话都可能会被举报的时候,他会怎么办?

他会只敢讲那些最安全、最无聊也最没有价值的东西,因为只有那些东西才是不会被举报的,与传道授业解惑相比,当然是个人的安全最重要。

这次是撤销教师资格,下次可能就是被判刑入狱,不,据我所知,已经有大学老师因为这个而入狱三年了。

img

所以,会越来越少人敢冒这个风险。

可是,你知道吗,现代大学教育跟中世纪大学教育的区别就在于,中世纪大学是传授已有知识的场所,而现代大学则担负着不断开拓新的知识和学科的职能。

所以,从1809年现代大学由柏林大学创立开始,“自由”都是大学最核心的关键词。

曾经在清华大学里,闻一多是言论最激进的教授,动不动就要在课堂上发表演说,后来更是在西南联大的广场集会上高声呼喊,对学校大肆批评。

img

闻一多

当时政府要求学校解聘闻一多,时任校长梅贻琦根本不理会,即便他自己也对闻一多的言行很不满,但他知道“自由”才是让大学教育保持活力的唯一动力。

而当“举报”出现在大学课堂上,当大学老师的每一句话都可能成为被举报的理由和材料时,还谈什么自由,谈什么进步。

我们的年轻一代在面对自己不认可的言论时第一反应已经不是“与他辩论”“将他驳倒”,而是熟练的使用举报手段“我要举报他,堵上他说话的嘴巴”。

并且他们一次又一次的成功做到了。

他们毁掉的不只是一个又一个老师,他们毁掉的更是教育本身。

这真的很可悲。

3

前两天,在豆瓣鹅组有这么一个帖子,内容是一个投票。

帖子的作者问大家,如果你发现你的父母、爱人、师长、朋友发表了不当言论,你要不要举报ta?

那个帖子里甚至详细地把这些人分成了“关系亲近的父母”“有过过节的朋友”“分手分得不愉快的前任”等等,把这些人分门别类地做了投票,问当这些发表了不当言论,你要不要举报。

这还不是最可怕的,最可怕的是下面的跟帖是真的认真在讨论。

有人说,父母是绝对不会举报的。

有人说,就算是爸妈,说了不当言论,也不能姑息。

有人说,分得不愉快的前任、有过节的朋友当然要举报啊。

诸如此类,林林总总,这些讨论才是我觉得最可怕的地方,因为大家都默认了“举报”的合法性,默认了当一个人发表了不当言论,他就应该被举报。

这实在太荒谬了。

没有任何一个人应该因为他的言论而被举报

当你遇到一个人说了你不认可的、甚至你极端厌恶的言论,你要做的事情应该是去反驳他、去驳倒他,去用你的思想、你的知识、你的言论去和他正面对决。

“我看不惯你的言论,所以我要反驳你”,这才是一个文明社会的人应该做的事情。

而“举报”是“我看不惯你的言论,所以我要堵上你的嘴,不让你说话,我堵不上,我就让更高的权力去堵你的嘴”。

这是个太可怕的思路。

一旦你把对言论正确与否的决定权交给了更高的权力,那今天被打倒的是你看不惯的人,明天被打倒的就可能是你自己。

不要觉得自己一辈子都不可能有任何错漏,任何人都会有错漏,任何人都会在某些情况下发表不当言论。

甚至,很可能今天还是很合情合理合法的言论,明天就会变成不当言论。

枪口不会因为你曾经是举报者,就对你网开一面。

4

其实,最近这两年来,举报已经越来越常见

有粉丝为了打击别家偶像,就去举报对方主演的作品有思想问题,有的就去挖对方多年前的微博、文章,试图找出蛛丝马迹、错漏之处。

我们其实是眼看着这股风气越兴越胜的。

有人因言获罪入狱,有人靠举报他人以达到打击报复的目的。

有人讨论当父母发表不当言论时,要不要与父母划清界线。

有人认真觉得堵上越来越多的嘴,这世界才会变得更好。

我们已经可以看到那个可预见的未来了。

在那个未来里,大家会因为不知道自己哪天因为哪句话被举报,所以大学老师会越来越不敢说话,亲人、爱人、朋友之间会越来越无法相信彼此。

甚至,就连你用滴滴打个车,都可能被司机举报你有不当言论,只因为你在车上和朋友讨论了一下性少数群体的话题。

img

我们已经能看到那个人人自危的未来就在不远处了。

你我都知道那会是个糟糕、邪恶的时代,我们早就见识过了。

但你我也都知道,我们是很难阻挡举报时代的来临的。

不,其实风行举报的时代早就已经在我们没注意时来临了,它早就已经深入到了我们生活的方方面面。

可这是不对的,无论多少人这么做,它都依然是不对的。

它会毁掉教育,毁掉创造和文化,毁掉人与人之间的信任,毁掉所有自由进步的可能性。

它不是将要到来,它是已经到来了。

你我都拦不住这个糟糕时代的来临。

但至少,我们可以选择不使用它,我们可以选择不做这个糟糕时代的共犯。

]]>
- - - - <p>转自 <a href="https://www.douban.com/note/719813875/" rel="external nofollow noopener noreferrer" target="_blank">豆瓣</a> : 2019-05-25 03:37:45 - - - - - - - - - -
- - - adb自动刷钱 - - https://blog.tcpsoft.app/2020/05/adb-auto-make-money/ - 2020-05-05T01:31:03.000Z - 2020-05-05T05:27:20.987Z - - 这是一款名字叫“Zen Idle”的游戏。来尝试下自动刷钱

image-20200505094215251

【adb获取包名以及当前运行的activity】

1
adb shell dumpsys window | findstr mCurrentFocus

输出:

1
mCurrentFocus=Window{98555ab u0 com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity}

由包名获取apk路径

1
adb shell pm path io.ionic.starter

【adb命令行启动应用程序】

1
adb shell am start -n 包名/类名

如:

1
adb shell am start -n com.android.music/com.android.music.MusicBrowserActivity

【adb shell 修改系统时间】
下面命令亲测可用,假如当前时间 01月05号08点23分改成 01月05号12点23分

1
adb shell date "01051223"

【按钮的位置】
找到开发者选项,开启“指针位置”,在游戏里找到按钮的范围
Claim按钮
X: 390-690 300 540
Y: 1212-1362 150 1287
关闭广告按钮
x 915
y 835

【Android adb 模拟滑动 按键 点击事件】

关于tap的话,他模拟的是touch屏幕的事件,只需给出x、y坐标即可。
此x、y坐标对应的是真实的屏幕分辨率,所以要根据具体手机具体看,比如你想点击屏幕(x, y) = (250, 250)位置:

1
adb shell input tap 250 250

此处我:

1
input tap 540 1287
1
input tap 915 835

【总命令】

1
adb shell date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3

加点循环

1
2
3
for I in $(seq 1 20);do
echo $I/20 ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
done

写入sh脚本,懒得每次输入了

1
echo 'for I in $(seq 1 20);do\n    echo $I/20 ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3\ndone' >zen.sh

【adb 安装卸载程序】
adb root 失败,提示adbd cannot run as root in production builds
网上说安装adbd-Insecure-v2.00.apk,亲测无效。还是每次adb shell然后su吧。

1
2
3
4
5
6
adb install ./adbd-Insecure-v2.00.apk

adb shell pm list packages|grep adb
输出:package:eu.chainfire.adbd

adb uninstall eu.chainfire.adbd

【尝试只改时间】

1
date "01010101" ; date "01010601"

并不能让程序显示奖励窗口(必须先退出这个页面再进入)

并不能让程序显示奖励窗口(必须先退出这个页面再进入)

【进一步的集成】
通过命令行参数决定要循环几次

1
2
3
4
5
6
7
echo 'CNT=10
if [ $# != 0 ] ; then
CNT=$1
fi
for I in $(seq 1 $CNT);do
echo $I/$CNT ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
done' >zen.sh

然后:

1
2
3
4
adb shell
cd /sdcard/_sh
su
. ./zen.sh 20

【手机闹钟BUG级响起】
无解
可以关闭闹钟

【尝试只在date的时候用su执行】

1
2
3
4
5
6
7
8
mkdir /sdcard/_sh
echo 'CNT=10
if [ $# != 0 ] ; then
CNT=$1
fi
for I in $(seq 1 $CNT);do
echo $I/$CNT ; su -c date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; su -c date "01010101" ; input keyevent 3
done' >/sdcard/_sh/zen.sh

完美~
但是会每次date的时候显示“已授予shell超级用户权限”,看着很难受
先su再执行脚本就不会了

可以在电脑上adb shell进去执行脚本,也可以用手机啦

【视频演示】

]]>
- - - - <p>这是一款名字叫“Zen Idle”的游戏。来尝试下自动刷钱</p> -<img src="../../blog-images/2020/adb-auto-make-money/image-20200505094215251.png" alt="image-20200505094215251" style="zoom: 33%;"> - - - - - - - - - -
- - - Why linux - - https://blog.tcpsoft.app/2020/03/why-linux/ - 2020-03-27T17:35:58.000Z - 2020-03-28T05:37:39.960Z - - 学习Linux之前,了解Linux哲学和Linux设计思想是必要的。

然后就是开始敲命令了啦

Linux哲学

知乎:《unix/linux 设计哲学》

https://zhuanlan.zhihu.com/p/57521605

内容太多,不要求完全记住。可以以后回来再翻阅

博客园:Linux的哲学思想

Linux哲学思想:

  1. 一切皆文件;
  2. 小型,单一用途的程序;
  3. 连接程序,共同完成复杂功能;
  4. 避免令人困惑的用户界面;
  5. 配置数据存储在文本中;

解释:
一切皆文件:是 Unix/Linux 的基本哲学之一。不仅普通的文件,目录、字符设备、块设备、 套接字等在 Unix/Linux 中都是以文件被对待;它们虽然类型不同,但是对其提供的却是同一套操作界面。

小型,单一用途的程序:程序和可执行文件不要太复杂,这样才能保证了linux内核的高效运行

连接程序,共同完成复杂功能:复杂的任务可以通过连接多个简单的程序实现复杂的功能。对于复杂的功能linux通过许多简单程序的组合等方式实现,在保证简单功能的高效性的同时,复杂的程序也必然是高效性的

避免令人困惑的用户界面:如windows那样出了问题一般人选择的会是重启,实在是不行的话就是 重新 安装系统了,因为对于windows那样不是开源的,并且用户界面比较 复杂操作系统出了问题,一般的人是根本没有办法解决的。但是linux就不一样了,第一linux是开源的,无论什么问题都可以通过简洁的命令行实现 排错,修改系统的配置,一切都是简洁明了为基础。

配置数据存储在文本中:linux所有的配置文件都存放在文本配置文件当中,无论什么配置修改都只需修改其配置文件即可,配置文件时文本形式的只需任意一款文本编辑器修改即可而不是类似于windows那样将保存在注册表中,并且windows的注册表需要专门的二进制或十六进制的编辑器才可编辑,修改比较复杂

bilibili:Linux哲学视频资料1:

哲学的魅力 | 非Windows系统家族的魅力之所在:“一切皆文件”

https://www.bilibili.com/video/BV1Yb411g79x

(命令不会没关系,了解一下“哲学”就好)

bilibili:Linux哲学视频资料2

TED-Linux背后的精神 _ Linus Torvalds

https://www.bilibili.com/video/BV1a4411t7Kt?p=1

(一个有英文字幕的双语版本:)

https://www.bilibili.com/video/BV1J7411v7BD


系统目录结构

Linux 里面最重要的概念估计就是“一切皆文件”了,我们来看看Linux系统的根目录结构。

首先是 Linux 不像 Windows 这种,系统里面看起来有多个“盘”,C,D,E,F,什么的,

在 Linux,只有一个“盘”(可以假想成 C盘),但是里面文件夹却有很多。

img

我们来看看菜鸟教程 Linux 部分是怎么说的:

https://www.runoob.com/linux/linux-system-contents.html

其中用得比较多的文件夹也不是很多啦:

1
2
3
4
5
6
7
/dev虚拟的,你的硬件设备会列出在这里
/etc配置文件的集散地
/home用户目录,相当于 Windows 的 %USERPROFILE% (你可以试试把这个输入资源管理器的地址栏回车)
/media一些设备出现在这里
/mnt用于挂载文件系统(插入U盘并挂载后在这里找)(wsl可以在这里访问主系统文件)
/bin | /usr/bin | /usr/sbin 你看到文件出现在这里,那大概率是可执行程序这样的东西了
/var做 web 你会爱死的

Linux终端

终端(Terminal),也叫命令行,顾名思义,输入命令的地方。就是经常见到的黑窗口(当然并不见得都是黑的)

命令行是 Linux 最常见的状态,GUI (Graphical User Interface,图形用户界面) 反而不是

在 Linux 终端干得最多的一件事当然是敲命令了,命令一般是如下格式:

command [-option] parameter1 parameter2...

我们来看几个参考链接:

图示直观的:https://blog.csdn.net/pl0020/article/details/82012881

分析有理的:https://blog.csdn.net/wangjianno2/article/details/16344807

详细深入的:http://c.biancheng.net/view/720.html

这里还想 bb 几句:

  1. Windows Linux都有命令行(Windows早期DOS也是命令行系统),但是操作习惯有些小不同
  2. Windows 参数一般是 /option,Linux 大多是 -option --option
  3. Windows 获取帮助一般是 /? ,Linux 大多是 -h -help --help
  4. Windows 路径以反斜杠 \ 分隔,Linux 路径由正斜杠 / 分隔
  5. Windows 命令行能运行 .bat 批处理脚本,Linux终端能运行 .sh 批处理脚本,语法大部分不同,少数相同

开始背命令吧

必学的少数命令

lsllcdtouchclearpwdmkdircatmore
lesstailcpmvrm(谨慎)findvi/vim|grep
pskillipconfigtarrebootshutdownhaltchmod

这里是一些介绍:https://blog.csdn.net/weixin_44706512/article/details/90604635

菜鸟教程:Linux 命令大全

其他的,少见的,忘了的,可以在这里速查,也可以学习积累:

https://www.runoob.com/linux/linux-command-manual.html

Linux常用命令大全(和用法)

https://www.cnblogs.com/fnlingnzb-learner/p/5831284.html


Q&A

Linux 怎么装?

必应搜索“WSL安装”:https://cn.bing.com/search?q=wsl%E5%AE%89%E8%A3%85

必应搜索“VMware 安装 Linux”:https://cn.bing.com/search?q=VMware+%E5%AE%89%E8%A3%85+Linux

想知道VMware安装详细某版本,把上面 Linux 换成你的对应详细版本即可,如:Ubuntu18.04

发行版这么多,用哪个版本好?

初学者:Ubuntu、deepin。极客:Arch。服务器用户:CentOS。发烧玩家:Steam OS。

哪儿去获取 Linux 镜像?

千万别再去XX下载站了。

必应搜索你想要的系统名字,搜索结果第一条都是官方网站了,一般他们域名都是 系统名.org,这是非营利组织的域名,也有部分是 系统.com,如Ubuntu,因为它包含了商业发行版。

打开网站,在醒目的位置,都能找到 Download 这种东西,仔细寻找,可以找到 .iso 镜像下载链接。如果下载慢,可以使用 国内镜像站 ,他们提供了高速的软件下载和软件源服务,像 清华源阿里云网易等等

我应该使用 root 用户吗?

不建议。应当在系统安装过程中设置好用户名和密码,以后使用需要高权限的命令应该使用 sudosu

]]>
- - - - <p>学习Linux之前,了解Linux哲学和Linux设计思想是必要的。</p> -<p>然后就是开始敲命令了啦 - - - - - - - - - -
- - - 科学地让 OneDrive 飞,下载速度 5Mb/s - - https://blog.tcpsoft.app/2020/03/let-onedrive-fly-scientifically/ - 2020-03-21T07:06:27.000Z - 2020-03-22T04:21:35.300Z - - OneDrive 是 Microsoft 的一个云存储服务,安装后集成在 Windows 资源管理器,所以比其他任何网盘都更有其与生俱来的优势。但由于众所周知的原因,OneDrive 的访问速度也极低。
访问速度慢还不算了,还经常会死在某个进度,一直下不动,这是最**的

image-20200321165324494
你看这 243KB/秒 长得多标致啊

解决方案

  1. ShadowsocksR
  2. Proxifier
  3. 设置 OneDrive 多线程

1. ShadowsocksR

略。

配置好之后应该是会开启 127.0.0.1:1080 ,HTTP、Socks5 均有(没出问题的话默认就是这个配置)

2. Proxifier

搜索Proxifier找到官网:https://www.proxifier.com/download/

image-20200321172127587

下载 Proxifier Standard Edition ,这个是安装版,Portable是绿色版,这里不用绿色版。

下载下来exe双击安装,安装过程中勾选Create a desktop shortcut,完了之后会默认打开软件,关掉它(你也可以在最后一步取消勾选Launch Proxifier)

在桌面快捷方式右键,用管理员权限运行。打开之后是长这个样子的:

image-20200321175935712

选择31天试用,或者输入注册码,如果输入注册码,最好是勾选All userss on this computer(require administrator),然后就会打开程序主界面

image-20200321180424905

我们当然是希望开机启动,所以开启Autostart

image-20200321191843270

通过Profile->Proxy Servers,添加 HTTPS 和 Socks5 代理配置

image-20200321181035454

通过Profile->Proxification Rules,配置软件代理规则

image-20200321182841860

我们在这里添加OneDrive。

先找到OneDrive的可执行文件的位置。一般应该是在%localappdata%\Microsoft\OneDrive\

如果没有,运行OneDrive,打开任务管理器,在详细信息标签页,找到onedrive.exe,右键打开文件所在位置

点击上面窗口的Add,添加配置。点击Browse输入OneDrive目录,选择onedrive.exe,action选择通过socks5代理

image-20200321183611160

保存,并把 default 的 action 设置为 direct(你也不希望所有程序都通过代理对吧)

image-20200321183553240

任务栏里面右键 OneDrive,更多,关闭 OneDrive,再找到刚才的OneDrive程序位置,开启OneDrive。

我们随便下载一个文件看看:

image-20200321191651660

3. 设置 OneDrive 多线程

你好像速度没我快?那肯定是你氪金不够(bushi),那就试试开启 OneDrive 多线程

1
2
3
4
修改这个文件:
"%localappdata%\Microsoft\OneDrive\settings\Personal\global.ini"
可通过win r运行,或cmd里运行下面直接打开修改:
notepad "%localappdata%\Microsoft\OneDrive\settings\Personal\global.ini"

第一行加入:

1
numberOfConcurrentUploads=3

PS:数值项即为线程数,最小值为1,最大值为3,根据实际需要选择即可

image-20200321193422745

效果:(奇怪的网速增加了)

image-20200321213449574

]]>
- - - - <p>OneDrive 是 Microsoft 的一个云存储服务,安装后集成在 Windows 资源管理器,所以比其他任何网盘都更有其与生俱来的优势。但由于众所周知的原因,OneDrive 的访问速度也极低。<br>访问速度慢还不算了,还经常会死在某个进度,一直下不动,这是最**的</p> -<img src="../../blog-images/2020/let-onedrive-fly-scientifically/image-20200321165324494.png" alt="image-20200321165324494" style="zoom:67%;"> -<div style="text-align:center">你看这 243KB/秒 长得多标致啊</div> - - - - - - - - - - - -
- - - 用 Visual Studio 2019 写 C++ 基础代码 - - https://blog.tcpsoft.app/2020/03/cpp-with-Visual-Studio-2019/ - 2020-03-06T06:30:00.000Z - 2020-03-06T06:45:52.168Z - - 什么?你不会用VS?

准备工作

安装 Visual Studio2019 Community,不多说了,虽然可能出现很多问题。这里假定你已经有安装好的 VS2019。

打开VS,创建项目

打开VS2019,看到如下界面。

image-20200306134632068

选择C++,Windows,选择控制台应用。

image-20200306134730096

填写项目名称和存储位置,点击创建。

image-20200306134821590

然后就会打开工程界面,在右边的解决方案资源管理器,源文件,可以找到刚才填写的名字的cpp文件,双击打开(默认会打开的),在左边正常编写代码,按 F5 运行,或点击上面绿色三角形,“本地Windows调试器”,(可以直接点也可以菜单栏选择调试,开始执行不调试(快捷键Ctrl+F5))

image-20200306134954770

没有“控制台应用”选项?

创建项目窗口,拉到最下面,找到安装

image-20200306135632223

在打开的窗口,勾选安装这三个。(其他的可以根据需要添加)(如果你确实不用VS开发高级应用,只勾选“使用C++的桌面开发”也就可以了)

image-20200306135706897

另外需要注意的是,如果想要图形化设计程序界面,(即MFC),需要在勾选“使用C++的桌面开发”之后,勾选右边的 C++ MFC v142

image-20200306135751221

,然后开始安装即可。可以选择下载时安装(下载一个安装一个),下载完成安装(全部下载完再一起装),我个人偏好后一种

(等待巨长时间,安装完成后再同理创建项目。)

用VS进行简单调试

断点

在需要暂停的代码这一行前面灰色区域鼠标单击,出现一个红色圆点,就是下断点。

image-20200306141237786

F5 开始调试,或点上方“本地Windows调试器”或菜单栏调试,开始调试。

VS界面会发生变化,且之前下断点位置会变成橙色箭头,表示程序当前正在执行这一行代码。此时程序暂停,可以查看变量值和一行一行运行程序。

  • 鼠标悬停在变量上,可以查看变量值。

  • 选中变量,右键,添加监视,可以在下方监视面板自动显示变量值

  • 在代码里鼠标右键,快速监视,输入变量名,可以添加多个变量监视,也可以添加表达式监视,比如a+b+c

image-20200306142152438

单步运行

图示的四个按钮。

  • 显示下一条语句
  • 逐语句
  • 逐过程
  • 跳出

image-20200306142607239

]]>
- - - - <p>什么?你不会用VS? - - - - - - - - - - - -
- - - 群里提问的艺术 - - https://blog.tcpsoft.app/2020/03/how-to-ask-in-group-chat/ - 2020-03-05T15:17:52.000Z - 2020-03-06T17:10:35.817Z - - 现在互联网发达的时代,大家都会有很多的群,xxx 交流群、xxx 技术交流、xxx开发群、xxx技术学习群等,大家的初心可能都是想交流的,遇到点问题然后就可以在群里问。

然而很多时候你问的问题没人回答;也有时候问了半天还是没找到答案;也有时候当你把问题发出来了,别人正准备回答你的时候,你说知道了;然后刚开始群里很活跃,慢慢的就死了。

其实以上问题,都是大家不想看到的,然而在群里提问是我们加入群的初心,但是很多人做不好,最终导致你的问题无人解答,群慢慢的失去意义。

今天我所谈的就是群里提问的艺术,让你的问题快速得到解决。

我将今天的问题分成以下三部分进行介绍:

  • 提问之前
  • 提问之时,怎么提问
  • 注意事项

提问之前

在群里提问之前首先我们应该做好功课,看自己是否完成以下步骤,否则你的提问将一塌糊涂,大概率得不到想要 的答案。

  1. 尝试自己解决
  2. 不能自己解决应该准备的哪些

尝试自己解决

尝试自己解决是非常重要的一步,这也是我们能否经过这个问题能够成长的关键所在。

  1. 通过搜索引擎搜索:baidu 或者 google(推荐),搜索结果中前三页如果找不到你想要的信息,就进行下一步吧。对于成熟的开源项目,你遇到的问题,很可能别人也遇到过。这时通过 Google、StackOverflow 等网站的搜索服务,可以帮你快速定位并解决问题。永远记住,地球上的你并不孤单,包括你遇到的问题。
  2. 查阅手册/文档:确保自己阅读过至少一次官方文档。这样在遇到问题时,如果能回忆起只言片语,就可以再去读一遍相关文档,问题往往也就解决了。
  3. 查阅社区/论坛:阅读常见问题文件(FAQ)或者开源项目的 issue,或者论坛(类似 react china)
  4. 询问朋友:如果你使用的开源软件,在朋友圈或同事圈里也有人使用,那么抬起你的脚、或拿起你的电话,真挚诚恳的探讨不会遭遇拒绝,而会增进友谊。不要犹豫,你的内心渴望面对面交流,你的朋友也是。
  5. 自检并不断测试:试自己检查或试验以找到答案。
  6. 阅读源码(这步非必须):如果你是程序开发者,尽量尝试阅读源码以找到答案。

经过以上 6 步或者 5 步你都无法解决遇到的问题,那么你确实针对这个问题能力有限,准备去群里请教了,那么在尝试自己解决之后无果,应该做哪些准备呢?

不能自己解决应该准备的哪些

  1. 一定要明白自己想要问什么问题:不能自己都说不清自己想要问什么问题,那么群里提问你也问不出什么来。
  2. 梳理准备您的问题:要说明之前你都干了些什么。
  3. 要用言简意赅的语言:这个是我们作为职场一个必备的技能,说重点,言简意赅。

怎么提问

抱着平和对等的心态,找到合适的途径后,就得静下心来将遇到的问题写成文字。书写文字不是一件简单的事情,我们可以从遵循一些简单的规则开始。

用词准确,问题明确

标题要简洁清晰,要言之有物。

Bad:救命呀/急/跪求,遇到了一个 react 问题,xxx 组件渲染不出来

Good:在使用 xxx 版本的 react ,我操作了 xxx,也写了 xxx,但是 xxx 组件渲染不出来

一个好标题范例是目标 —— 差异式的描述,许多技术支持组织就是这样做的。在目标部分指出是哪一个或哪一组东西有问题,在差异部分则描述与期望的行为不一致的地方。

描述清晰,信息充足

  1. 准确有效的信息:描述事实,而不是猜测,如果你想给出你的猜测,一定要先描述事实,给你的猜测一些证据,不然就不要猜测。
  2. 问题表现/内容:按照时间顺序列出问题症状。问题发生前的一系列操作,往往就是对找出问题最有帮助的线索。因此,你的说明里应该包含你的操作步骤,以及机器和软件的反应,直到问题发生。在命令行处理的情况下,提供一段操作记录(例如运行脚本工具所生成的),并引用相关的若干行(如 20 行)记录会非常有帮助。
  3. 简单的做过什么尝试:在描述你做过什么尝试的时候,简单的你描述你做了哪些尝试就行,为什么要这么做其实不是那么重要。

如果你想弄清楚如何做某事(而不是报告一个 Bug),在开头就描述你的目标,然后才陈述重现你所卡住的特定步骤。

经常寻求技术帮助的人在心中有个更高层次的目标,而他们在自以为能达到目标的特定道路上被卡住了,然后跑来问该怎么走,但没有意识到这条路本身就有问题。结果要费很大的劲才能搞定。

玉伯有句话是这么说的:

提问者选择的路本身就是一条崎岖之路,对于要解决的问题,实际上有更好的方式。这种情况下,描述清楚目标,讲清楚要干什么非常重要。

  1. 想要问到什么:提供建议?发送一段代码?检查你的补丁或者别的?在群里经常会出现这种情况,当某个人发了一段文字,另外的人说:你想问什么?

所以我们在问问题的时候一定要把你想要问到什么,这个目标想清楚。

  1. 提供尽量多的信息:尽量提供可重现的例子,你可以在 jsbin)、runjsjsfiddle)、codepen 等这些地方提供一个可重现的例子。即使你是一个很大的项目,想办法把你需要验证的点提取出来,如果确实无法提取,就贴一些代码,出现问题那行代码周围的代码(周围的相关代码都要,因为你可能觉得不是他们的问题,但也许就是,不然你觉得的都是对的,你就不会不知道怎么解决了)。

避免一些毫无意义的问题

经常会有人问一些毫无意义的问题,比如这样的:

Bad:有没有人会xxx?

Bad: 有没有人在?

Bad: 谁能帮我解决一个问题?

面对这种问题,别人就很难预估你这个问题需要解决多久,也很难判断自己是否能解决这个问题,如果他回答了你,意味着你就是有空而且很在行,所以他还是选择不出声。这个就跟微信私聊的时候说:”在吗?“ 这种一个意思。

Bad: 什么是 JavaScript?

这种问题也是,很明显通过搜索引擎就能搞定的,要是下次还有这种问题,你就把这个图发给它。

img

建议的问法:

  1. 有问题直接问。比如:ES6什么时候雄霸天下,前端什么时候一统江湖?
  2. 直接说场景:我在做xx端东西的时候,在 window 7 平台的 IE7 版本下遇到了左右不对齐问题,具体如图所示img,代码地址:http://www.jsbin.com/xxxx,在百度中找到的答案,试了之后还是有同样的问题。请有空的同学帮我看看是什么问题?

注意事项

  • 提前做好冷场的准备:也许别人在忙,也许这个问题太简单了,也许没人做过这块,如果冷场了,没人回答,赶紧换下一个群。
  • 谦虚,别人没有义务帮你解决问题,往往大牛的时间比你少,比你珍贵。
  • 没有一定的自学能力,问到问题就伸手的不适合玩这个。
  • 群唯一的作用就是:扯淡、交流、分享,以上几条为前提。

如果觉得问题记不住,收藏一下这个图吧:

img

最后

其实对于问问题,我们换位思考一下就更好了,这其实也是人际交往的方式,站在看你提问题的角度,想想当别人提问题的时候,你想让他问什么,你才愿意去回答。

当然除了在群里提问,在社区里提问,论坛里提问都有一定的规范,后面再慢慢补充吧。


版权属于:桃翁

本文链接:http://taoweng.site/index.php/archives/215/

转载时须注明出处及本声明,欢迎关注我的公众号「前端桃园」

.

(这真就原封不动的照搬呗)


《提问的智慧》

另外还想再贴一个,最经典的,最最经典的(也最长最复杂的):

《提问的智慧》,来自 Github 。其实最初是 Eric S. Raymond, Rick Moen 创作的,然后 ryanhanwu 翻译了并放在 Github 上作为一个开源项目,截止本文写作时,该项目已有 10.2k Star,2.8k Fork。

另外,由于这个是国外作者创作的,所以其中出现的案例论坛等一般是国外常见论坛,也可以了解一下。

【警告】:本文十分冗长,建议在有闲暇时间时仔细浏览。

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

]]>
- - - - <p>现在互联网发达的时代,大家都会有很多的群,xxx 交流群、xxx 技术交流、xxx开发群、xxx技术学习群等,大家的初心可能都是想交流的,遇到点问题然后就可以在群里问。</p> -<p>然而很多时候你问的问题没人回答;也有时候问了半天还是没找到答案;也有时候当你把问题发出来了,别人正准备回答你的时候,你说知道了;然后刚开始群里很活跃,慢慢的就死了。</p> -<p>其实以上问题,都是大家不想看到的,然而<strong>在群里提问</strong>是我们加入群的初心,但是很多人做不好,最终导致你的问题无人解答,群慢慢的失去意义。</p> -<p>今天我所谈的就是<strong>群里提问的艺术</strong>,让你的问题快速得到解决。 - - - - - - - - - -
- - - 2020 高考加油 - - https://blog.tcpsoft.app/2020/02/2020gaokaojiayou/ - 2020-02-28T00:00:00.000Z - 2020-02-28T11:26:22.790Z - - 2020-02-28,距离 2020高考还有100天。

]]>
- - - - <p>2020-02-28,距离 2020高考还有100天。</p> - - - - - - - - - -
- - - 吾爱破解入门帖子 - - https://blog.tcpsoft.app/2020/02/getting-start-52pojie/ - 2020-02-22T16:40:00.000Z - 2020-02-22T16:53:57.174Z - - 今日探索吾爱破解论坛,整理了两篇入门指导文章,当备忘录了

内容来自:吾爱破解 论坛


吾爱破解论坛官方入门教学培训第一期开始啦!【已更新到第十课】

培训课表–讲师:

《吾爱破解培训第一课:破解基础知识之介绍常见工具和壳的特征》

讲师:Hmily,链接:http://www.52pojie.cn/thread-378612-1-1.html

《吾爱破解培训第二课:实战去广告、弹窗及主页锁定》

讲师:Kido,链接:http://www.52pojie.cn/thread-384195-1-1.html

《吾爱破解培训第三课:改头换面之修改版权和资源》

讲师:Kido,链接:http://www.52pojie.cn/thread-389996-1-1.html

《吾爱破解培训第四课:击破程序最坚固的堡垒–实战去程序自校验》

讲师:小生我怕怕,链接:http://www.52pojie.cn/thread-392395-1-1.html

《吾爱破解培训第五课:反击作者的挑衅–实战解除程序重启验证》

讲师:我是用户,链接:http://www.52pojie.cn/thread-396068-1-1.html

《吾爱破解培训第六课:潜伏在程序身边的黑影–实战给程序补丁》

讲师:我是用户,链接:http://www.52pojie.cn/thread-405758-1-1.html

《吾爱破解培训第七课:手把手教你从实例看如何攻破常见的网络验证》

讲师:珈蓝夜雨,链接:http://www.52pojie.cn/thread-408475-1-1.html

《吾爱破解培训第八课:短兵相接–深入浅出探讨脱壳细节(上)》

讲师:L4Nce,链接:http://www.52pojie.cn/thread-411104-1-1.html

《吾爱破解培训第九课:短兵相接–深入浅出探讨脱壳细节(下)》

讲师:L4Nce,链接:http://www.52pojie.cn/thread-411104-1-1.html

《吾爱破解培训第十课:探寻逆向新航标—x64平台脱壳与破解实战》

讲师:Kido,链接:http://www.52pojie.cn/thread-422192-1-1.html

视频下载:

360云盘下载:
https://yunpan.360.cn/surl_y3GCKpiI2fX 提取码:7693

百度网盘下载:
链接: https://pan.baidu.com/s/1z9WQeYgUGxcurVD2lKfNeg 提取码: e2su

爱盘下载:
http://down.52pojie.cn/吾爱破解视频教程/吾爱破解论坛官方入门教学培训第一期/

解压密码(请使用新版7z解压缩):
www.52pojie.cn









零基础新手破解学习指导教程

吾爱破解论坛官方入门培训:http://www.52pojie.cn/thread-349073-1-1.html
整理一些论坛脱壳破解相关入门教程及需要用到的相关工具,方便新手同学查看学习

工欲善其事必先利其器,下面是破解需要用到的工具

OllyDbg(OD):http://www.52pojie.cn/thread-350397-1-1.html
PEIDhttp://www.52pojie.cn/thread-170387-1-1.html
Exeinfo PEhttp://www.52pojie.cn/thread-169779-1-1.html
樱花补丁制作工具:http://www.52pojie.cn/thread-62307-1-1.html
内存补丁生成器:http://www.52pojie.cn/thread-162411-1-1.html
注册机生成器:http://www.52pojie.cn/thread-159470-1-1.html
IDA Pro v6.5:http://www.52pojie.cn/thread-284145-1-1.html
破解工具包http://www.52pojie.cn/thread-190698-1-1.html
吾爱云盘【最牛逼的在线工具包】:http://down.52pojie.cn/Tools/

也可以点击下面的连接进去逆向资源区寻找工具哦

Android | Tools安卓程序逆向所用到的相关工具
Debuggers动态调试工具
Disassemblers反编译工具(静态分析为主)
PEtoolsPE文件分析相关工具
Packers给程序加壳相关工具
Patchers给程序做补丁相关工具
Editors程序资源编辑、文本操作相关工具
Crptography算法相关工具
Unpackers脱壳机相关
Dongle加密狗相关
.NET微软.Net程序逆向相关工具
OllyDbg | 1.x | Plugin动态调试工具OllyDbg | 1.x的插件程序
OllyDbg | 2.x | Plugin动态调试工具OllyDbg | 2.x的插件程序
IDA | Plugin反编译工具IDA的插件程序
Other其他相关程序

NO.1

Hmily 【初学者教程】破解基础知识之认识壳与程序的特征。
新手一看教程就在说程序破解应该先脱壳,那到底程序有没有加壳?加了什么壳?看看大H的文章你就懂了!
http://www.52pojie.cn/thread-234739-1-1.html

NO.2

ximo 脱壳教程(24集全)
http://pan.baidu.com/s/1cebVOU 密码: fxia
http://down.52pojie.cn/吾爱破解视频教程/ximo脱壳基础.7z
来自吾爱破解论坛LCG组织成员也是VMP脱壳插件作者ximo做的脱壳教程,堪称经典,入门脱壳必学!
压缩包为7Z格式,7Z官方网站

NO.3

小生我怕怕 脱壳练习系列附带对应文章的动画视频教程,方便学习交流脱壳知识。
教程对应动画视频:http://www.52pojie.cn/thread-11642-1-1.html

[编者注]:视频爱盘下载地址:https://down.52pojie.cn/吾爱破解视频教程/吾爱破解脱壳练习系列动画/

吾爱专题脱壳练习一—-压缩壳练习之一:http://www.52pojie.cn/thread-10496-1-1.html
吾爱专题脱壳练习二—-压缩壳练习之二:http://www.52pojie.cn/thread-10607-1-1.html
吾爱专题脱壳练习三—-压缩壳练习之三:http://www.52pojie.cn/thread-10688-1-1.html
吾爱破解脱壳练习四——简单加密壳:http://www.52pojie.cn/thread-10850-1-1.html
吾爱专题脱壳练习五—-upx壳:http://www.52pojie.cn/thread-10990-1-1.html
吾爱专题脱壳练习六—-TElock V0.99 :http://www.52pojie.cn/thread-11112-1-1.html
吾爱专题脱壳练习七—-ORiEN:http://www.52pojie.cn/thread-11244-1-1.html
吾爱专题脱壳练习八—-MoleBox V2.6.5:http://www.52pojie.cn/thread-11306-1-1.html
吾爱专题脱壳练习九—-CRYPToCRACk’s PE Protector:http://www.52pojie.cn/thread-11446-1-1.html
吾爱专题脱壳练习十—-PESpin 1.32:http://www.52pojie.cn/thread-11585-1-1.html
吾爱专题脱壳练习十一—-VB自效验的处理:http://www.52pojie.cn/thread-11747-1-1.html
吾爱专题脱壳练习十二—-delphi自效验的处理:http://www.52pojie.cn/thread-11883-1-1.html
吾爱专题脱壳练习十三—-GHF Protector V1.0:http://www.52pojie.cn/thread-12011-1-1.html
吾爱专题脱壳练习十四—-Armadillo 6.04:http://www.52pojie.cn/thread-12135-1-1.html
吾爱专题脱壳练习十五—-ACProtector系列保护:http://www.52pojie.cn/thread-12279-1-1.html
吾爱专题脱壳练习十六—-ACProtector系列保护:http://www.52pojie.cn/thread-12362-1-1.html
吾爱专题脱壳练习十七—-PEBundle 2.0b5 - 3.0x:http://www.52pojie.cn/thread-12498-1-1.html
吾爱专题脱壳练习十八—-Armadillo 4.40:http://www.52pojie.cn/thread-12620-1-1.html
吾爱专题脱壳练习十九—-PUNiSHER 1.5:http://www.52pojie.cn/thread-12822-1-1.html
吾爱专题脱壳练习二十—-未知壳一:http://www.52pojie.cn/thread-12936-1-1.html
吾爱专题脱壳练习二十一—-未知壳二:http://www.52pojie.cn/thread-13494-1-1.html
吾爱专题脱壳练习二十二—-未知壳三:http://www.52pojie.cn/thread-13770-1-1.html

NO.4

我是用户 破解实战(10集全)
破解实战演练教程
第一战:http://www.52pojie.cn/thread-197281-1-1.html
第二战:http://www.52pojie.cn/thread-197598-1-1.html
第三战:http://www.52pojie.cn/thread-197957-1-1.html
第四战:http://www.52pojie.cn/thread-198203-1-1.html
第五战:http://www.52pojie.cn/thread-198365-1-1.html
第六战:http://www.52pojie.cn/thread-198930-1-1.html
第七战:http://www.52pojie.cn/thread-199459-1-1.html
第八战:http://www.52pojie.cn/thread-199834-1-1.html
第九战:http://www.52pojie.cn/thread-200655-1-1.html
第十战:http://www.52pojie.cn/thread-200798-1-1.html

NO.5

Blue .NET系列教程(4集全)
图文教程分析.net程序!
第一课 http://www.52pojie.cn/thread-248348-1-1.html
第二课 http://www.52pojie.cn/thread-249034-1-1.html
第三课 http://www.52pojie.cn/thread-250626-1-1.html
第四课 http://www.52pojie.cn/thread-250633-1-1.html

NO.6

去软件弹窗系列教程(共两集)
第一课 http://www.52pojie.cn/thread-316180-1-1.html
第二课 http://www.52pojie.cn/thread-323346-1-1.html

NO.7

R4ndom破解教程全文翻译(共七集)
第一课 http://www.52pojie.cn/thread-344925-1-1.html
第二课 http://www.52pojie.cn/thread-345839-1-1.html
第三课 http://www.52pojie.cn/thread-346455-1-1.html
第四课 http://www.52pojie.cn/thread-350727-1-1.html
第五课 http://www.52pojie.cn/thread-352818-1-1.html
第六课 http://www.52pojie.cn/thread-354029-1-1.html
第七课 http://www.52pojie.cn/thread-355207-1-1.html

希望大家在本论坛发现新手容易理解的系列教程通知我,我会陆续加进来。(转载的朋友请标注:吾爱破解原创作品)

]]>
- - - - <p>今日探索吾爱破解论坛,整理了两篇入门指导文章,当备忘录了</p> -<p>内容来自:<a href="http://www.52pojie.cn/" rel="external nofollow noopener noreferrer" target="_blank">吾爱破解</a> 论坛 - - - - - - - - - -
- - - 科学地让 Git 飞,git clone 速度 5Mb/s - - https://blog.tcpsoft.app/2020/02/let-git-fly-scientifically/ - 2020-02-13T17:46:15.000Z - 2020-03-21T08:40:38.967Z - - 写本文原因:Git 太慢。看最后,14 KiB/s

image-20200214101358632

首先拥有一个代理服务器

代理分为正向代理和反向代理,

正向代理就是代理用户端,改变用户端的身份(IP)。

反向代理就是代理服务端,改变服务器的身份(IP)。

目前的代理大多数用的都是正向代理。

获得服务器方法很多,不讲了,然后你就可以通过软件转发流量来进行“代理”

这里使用 ShadowsocksR 配置一个本地 HTTP 代理。

然后,设置代理

运行SSR,在软件中添加已获得的服务器,然后进行一些常见的设置如 PAC 。

Tips:PAC:Proxy Auto Config

然后 Win + R ,输入 inetcpl.cpl 或是找到系统设置里面的代理设置,可以看到类似这样子的界面:

image-20200214104604088

这样子就是说明本地 1080 端口正在被代理软件使用。

然后,修改 Git 配置

git 客户端可以使用代理来改善连接速度,Git 的所有配置都是存储在一个文件中的,可以通过修改配置文件或者通过 Git 命令行来修改配置。

Git 命令行主要有几种存在形式:

  • Windows命令行调用,主要是Windows安装版 Git 或在有 Git 的文件夹中运行 Git
  • 软件自带的 Git,这种多是在开发工具或 IDE 中,提供一个 Git 的命令行,如 Visual Studio、Git desktop 等,可能是自带了一份 Git 副本,可能是调用系统的 Git。
  • Linux 系统中的 Git ,Linux 系统大多自带 Git 命令

Git 的配置文件是一个名字叫 .gitconfig 的文件,上述的第1、3种的配置文件比较好找,第二种就存在不确定性。

在Windows中,.gitconfig%userprofile% 文件夹,即用户文件夹。用notepad++ 打开,看起来像这样子:

image-20200214111535140

在Linux中,.gitconfig~ 文件夹,即用户文件夹,看起来像这样子:(截图为 WSL Ubuntu16.04 + Windows Terminal )

image-20200214113002933

已知本地端口的情况下,(比如我的是1080),可以配置文件手动添加如下内容:

1
2
3
4
[http]
proxy = http://127.0.0.1:1080
[https]
proxy = http://127.0.0.1:1080

注意修改后格式像图中即可

另一种方式是在 Git 命令行设置,上面的三种情况都可以使用。

打开命令行,输入:

1
2
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080

如果要取消代理设置,输入:

1
2
git config --global --unset http.proxy
git config --global --unset https.proxy

(打开配置文件会发现对应的也自动修改好了)

然后就可以打开命令行开始 git clone 辣。

请注意 Github 的两种 clone 方式的区别:

https 方式,是通过本地的 http 链接,是会通过代理软件的

ssh 方式,是通过 ssh.exe 收发流量,不会通过代理软件,所以依然很慢

(截图为我开始 ssh 方式 clone 的时候,网络防火墙提示 ssh.exe 联网)

image-20200214125336775

用 https 方式速度就会达到接近带宽的峰值。比如我们来 clone 一个 ctf-wiki

image-20200214133923497

]]>
- - - - <p>写本文原因:Git 太慢。看最后,14 KiB/s</p> -<p><img src="../../blog-images/2020/let-git-fly-scientifically/image-20200214101358632.png" alt="image-20200214101358632"></p> - - - - - - - - - - - -
- - - 无中生有访问 Google - - https://blog.tcpsoft.app/2020/02/access-google-from-nothing/ - 2020-02-13T08:33:07.000Z - 2020-03-06T17:09:31.335Z - - 由于众所周知的原因,[数据删除] 。并且在搜索引擎方面,Google 也是搜索知识的一个优秀工具。

关于搜索引擎之间的瓜葛,Baidu、Bing、Google 究竟谁优谁劣,以后我有空的话再来谈这个话题,欢迎和我 issue 交流。

今天就来介绍一下如何“无中生有访问 Google”。

一个“不存在的” chrome 插件

能访问 Google,当然是多亏了一个插件,名字叫做“谷歌上网助手”,它大概长这个样子:

image-20191113170312

可以在 Google 网上应用点搜索到,然后点击“添加至Chrome”按钮就可以添加插件了

https://chrome.google.com/webstore/detail/谷歌上网助手/nonmafimegllfoonjgplbabhmgfanaka

它的介绍文字是:

专门为科研、外贸、跨境电商、海淘人员、开发人员服务的上网加速工具,chrome内核浏览器专用!可以解决chrome扩展无法自动更新的问题,同时可>以访问谷歌google搜索,gmail邮箱,google+等谷歌产品

简单易用的《谷歌上网助手》,可以解决chrome扩展无法自动更新的问题,同时可以访问谷歌google搜索,gmail邮箱,google+等谷歌服务。

《谷歌上网助手》一键安装,无需其他配置,即可访问谷歌。

使用本插件可以免费上:

  • google.com 谷歌搜索
  • mail.google.com gmail邮箱
  • chrome商店访问

当然,以上链接是不存在的。

无中生有?

chrome 的插件是一个后缀名为 .crx 的文件,文件结构与 zip 相同,这意味着,你可以用压缩软件打开 .crx 文件。

我们有了 crx 文件,就可以添加到 chrome 浏览器了。

从哪儿去得到 crx 文件?从 Google 应用商店。当然,Google 应用商店是不存在的。

更新:插件官网也可以下载,快速下载方式请直接翻到文尾“#写在后面”部分,再从此处继续阅读。

这里介绍一个网站,可以看作 Google应用商店翻版,也就是镜像站。https://www.gugeapps.net/

我的网站也提供了一个副本(划掉)谷歌上网助手.zip ,如果添加 chrome 失败请转至下面方法下载,

bing 搜索 gugeapps.net,第一个链接是 www.gugeapps.net 就是了

打开是长这个样子的:

image-20191114102230

我们可以在这里的搜索框搜索谷歌上网助手,回车搜索,或者在 bing 搜索 谷歌上网助手 site:gugeapps.net 第一个就是对应的页面了。

image-20191114102822

这里不能直接安装到 chrome ,点击下载按钮,转到页面底端开始下载。

下载完成后会出现红色提示,保留就可以了
image-20191114102910

Ps:最新的下载下来好像后缀名是 zip ,不过不影响后续操作。

然后在文件夹中打开,可以看到文件夹里面有个 .crx 文件了

image-20191114103010

导入

一般来说,crx 可以直接拖入 chrome 的扩展程序页面,会提示是否添加插件,确定添加就可以添加,不过,对于自己下载的插件,大多数是不行的,会提示“程序包无效”,

image-20191114103110

不能导入?

这里需要通过 chrome 的开发者模式,添加插件。

首先打开 chrome 的扩展程序页面:chrome://extensions ,开启页面右上方的“开发者模式”开关。

然后点左边的“加载已解压的扩展程序”

image-20191114103117

切换到刚才的下载文件夹,复制一份 crx 文件,后缀名改为 zip ,随后解压到压缩文件同名文件夹。

如果看不到后缀名,在查看这里把文件扩展名选项勾选。

image-20191114103616

切换到 chrome 的选择文件夹窗口,打开刚才的文件夹,可以看到文件夹里面的结构是

1
2
3
_locales
_metadata
assets

然后添加文件夹。

image-20191114103357

回到 chrome ,就可以看到新插件添加成功,

可以看到有提示错误,但是可以用,

可以看到, chrome 右上方增加了一个插件的图标了

同时可以看到图标下面有一个标志,鼠标悬浮提示:“未封装的扩展程序”。

另外,如果关闭 chrome 再打开,会提示移除插件,所以正常使用起来的话,还是有一些麻烦的

image-20191114104215

点击右上角图标,会弹出插件菜单,首次需要注册登录,在登录页面找到新用户注册,填入邮箱和新账户密码注册

image-20191114104439

然后进入插件 控制面板 ,有红色提示“邮箱未激活”,此时前往邮箱,点击新收到的邮件激活账户即可

image-20191114104528

再点开插件菜单,把开关打开即可

image-20191114104755

然后 www.google.com 可以访问了。

image-20191114104855

后续操作

关闭浏览器再打开就会提示“请停用以开发者模式添加的插件”,影响使用,所以需要再“操作”一下

Ps:如果没有注册登录插件,现在的新版浏览器是直接移除插件,影响使用,所以需要再“操作”一下

image-20200213214020573

这个提示框每次打开 chrome 都会弹出,极其 讨厌。

我们可以通过:从 Google 应用商店安装正规插件,的方式,替换这个插件,就不会再提示辣

打开 Google网上应用店 https://chrome.google.com/webstore/category/extensions

搜索 谷歌上网助手 ,找到第一个就是正规插件(开发版也可以用),点“添加至 chrome”按钮就可以添加,点添加扩展程序 按钮

image-20200213214703542

接着我们可以看到 chrome 左下方出现了一个 crx 下载进度条,但是这个下载完之后并不会提示下载完成,会自动消失(在下载记录也不会留下记录),而是自动安装

image-20200213214909741

然后会看到页面里面“谷歌上网助手”变成了“已添加”,“添加至chrome”变成了“评分”,就是安装完成了

image-20200213215254798

然后需要删除旧插件,打开插件管理页面,chrome://extensions/

也可以在右上角插件图标处鼠标右键,管理扩展程序,然后返回按钮

找到刚才提示“未封装的扩展程序”的插件,删除,

image-20200213215852988

点击右上角新安装的插件的图标,弹出登陆页面,进去再用刚注册的账号登陆一次就可以了

至此,全部安装完成!

写在后面

插件官网:http://googlehelper.net/ ,也可以在这里下载 zip 然后按上述方法导入

image-20200213221452052

点击 download ,下载此网站最新插件压缩包,也可以下载我保存的副本, Ghelper2.0.4.all.zip

压缩包解压之后可以看到:

1
2
3
ghelper_source
Ghelper2.0.5.crx
中国大陆安装方法.txt

其中 ghelper_source 和上文提到的解压后文件夹是一样的,

其中的 crx 文件可以用于直接拖拽导入插件(2020/02/13测试这个crx可以直接导入没有问题)

点击此处回到 “无中生有?” 部分继续阅读

]]>
- - - - <p>由于众所周知的原因,[数据删除] 。并且在搜索引擎方面,Google 也是搜索知识的一个优秀工具。</p> -<p>关于搜索引擎之间的瓜葛,Baidu、Bing、Google 究竟谁优谁劣,以后我有空的话再来谈这个话题,欢迎和我 issue 交流。</p> -<p>今天就来介绍一下如何“无中生有访问 Google”。 - - - - - - - - - - - - - - - -
- - - Wooyun.org lives on Github - - https://blog.tcpsoft.app/2020/02/wooyun-on-github/ - 2020-02-11T12:11:21.000Z - 2020-02-13T15:52:27.920Z - - 翻阅 Wooyun ,然后找到了Github上。。。不得不说,Github 上确实有大量镜像资源

在这里做一个总结吧。按 Star 排序,把每个库的 Readme.md 剪辑到了这里。

文尾有彩蛋!



No.1 https://github.com/hanc00l/wooyun_public

Watch:224___Star:3586___Fork:1.8k

wooyun_public

乌云公开漏洞、知识库爬虫和搜索
crawl and search for wooyun.org public bug(vulnerability) and drops

1.wooyun公开漏洞爬虫版

index

search

源自2016年6月底使用scrapy爬虫爬取的4W公开漏洞和知识库,虚拟机为ubuntu14.04,采用python2+mongodb+flask(tornado)和Elasticsearch搜索引擎。

虚拟机下载地址:

https://pan.baidu.com/s/1HkR4ggvAwTikshsjcKYBuA ,提取密码:8wnb(2018.4.23更新)

安装、使用指南(点我)

2.wooyun公开漏洞纪念版

index_final

search_final

漏洞信息和代码来自于m0l1ce的wooyun_all_bugs_8.8W,包含8.8W漏洞信息(不含知识库);搜索和漏洞信息代码位于wooyun_final,对代码进行了部份修改:

  • 修改了搜索功能,支持多关键字搜索和在漏洞详情中搜索
  • 修改了离线图片文件的位置,搜索结果直接使用虚拟机中的离线图片
  • 修改了代码以适应PHP5.6及更新版本

虚拟机为ubuntu16.04,PHP5.6+MySQL5.7+Apache2。虚拟机下载地址:
https://pan.baidu.com/s/1qYRqa3U 密码: w8vb (2017.7.4)

虚拟机用户名、密码为hancool/qwe123

3.其它

  • 本程序只用于技术研究和个人使用,程序组件均为开源程序,漏洞和知识库来源于乌云公开漏洞,版权归wooyun.org。


No.2 https://github.com/Xyntax/1000php

Watch:31___Star:759___Fork:481

1000php

1000个PHP代码审计案例 (2016.7以前乌云公开漏洞)

说明

  • 数据取自3.8W乌云已公开漏洞(截至2016.7)
  • 漏洞在./bugs,./upload保存了相关漏洞的图片资源
  • 使用特征匹配提取,杂质在5%以内,如遇其他非php漏洞自行删除即可
  • 愿乌云早日回归


No.3 https://github.com/starnightcyber/1000php

Watch:1___Star:759___Fork:481

1000php

1000个PHP代码审计案例 (2016.7以前乌云公开漏洞)

在原来的基础上Xyntax/1000php添加了简单的漏洞索引,并且加入了原css文件,方便查看

Sample

wooyun-index

点击其中某个漏洞,查看

bug

刚才试过了,直接打开index.html好像并不会简单按照我们的意愿显示,可以重新再执行一下代码:

python script.py

这样会重新生成index.html,在本地打开应该就没有问题,另外可能会出现乱码,可以用谷歌浏览器打开。

说明

  • 数据取自3.8W乌云已公开漏洞(截至2016.7)
  • 漏洞在./bugs,./upload保存了相关漏洞的图片资源
  • 使用特征匹配提取,杂质在5%以内,如遇其他非php漏洞自行删除即可
  • 愿乌云早日回归


No.4 https://github.com/jiji262/wooyun_articles

Watch:27___Star:640___Fork:506

wooyun_articles

drops.wooyun.org 乌云Drops文章备份

(乌云网站已经离我们而去,可能再也不会回来了!谨以此纪念乌云!)

线上版本

(已更新图片)

https://wooyun.js.org/

线上版本源码

https://github.com/jiji262/wooyun_articles/tree/gh-pages

关于branches

gh-pages

https://wooyun.js.org/ 源码。

由于wooyun服务器已经无法访问,所以文章中图片已经无法显示。所幸,之前已经将图片抓取下来,可以在这里查看所有图片。

master

目录如下:

wooyun.js:用于抓取 drops.wooyun.org 上文章的脚本;

drops:抓取下来的文章原文;

image_download:单独下载文章中图片的方法, bagpipe_versionasync_version为多并发下载图片的解决方案。

Todo

[x]更新本地图片链接到文章中



No.5 https://github.com/boy-hack/wooyun-payload

Watch:12___Star:465___Fork:90

WooYun-Payload

从乌云漏洞库中提取的扫描规则,内容介绍: https://mp.weixin.qq.com/s/9RHVsw-HtAfo1UuPAqXZEw

Burpsuite 辅助插件

通过http请求包中域名,路径,参数等获取乌云历史漏洞中类似的数据。

wooyunpayload

数据说明



No.6 https://github.com/m0l1ce/wooyunallbugs

Watch:21___Star:398___Fork:154

wooyunallbugs

wooyun_all_bugs_8.8W


链接:https://pan.baidu.com/s/1htwVF3Q 密码:oskw

代码在bugs文件里
ps:php version 5.3
库解压到wooyun库里即可
ps:注意修改数据库连接密码 conn.php


ps:图片资源解压到根目录/upload/下 本地绑定下host 你的图片服务器 static.loner.fm
static.loner.fm 不会关掉的 大家可以放心使用

漏洞查询链接 www.loner.fm/bugs/



No.7 https://github.com/SuperKieran/WooyunDrops

Watch:13___Star:346___Fork:243

Wooyun Drops

DEMO: https://wooyun.kieran.top

静态版乌云 Drops

OPTIONS:
1.默认开启 https,如果不需要可以在 index.html 删掉
2.图片依赖于 https://github.com/SuperKieran/wooyun-img

全文搜索有想法还但没想好怎么做
最先想到的自然是写个后台,搜搜搜就完工了,但这不太方便
静态页面的搜索 我暂时没有好的方案,如果有好的想法的话可以在 issue 里提



No.8 https://github.com/SuperKieran/wooyun-img

Watch:0___Star:20___Fork:33

WooYun Drops 图片库

DEMO: https://superkieran.github.io/WooyunDrops
Github: https://github.com/SuperKieran/WooyunDrops
(编者注:图片在gh-pages分支)



No.9 https://github.com/grt1st/wooyun_search

Watch:22___Star:327___Fork:157

乌云公开漏洞、知识库搜索

index

search

author

0x00.介绍

  • 灵感来源于hanc00l的github项目wooyun_public

  • wooyun_public基于flask或者tornado,而本项目可以布置在apache、nginx等web服务器上。

  • 如果你有wooyun的静态网页数据,那么我们可以开始了!

  • 整个项目包括两个部分,第一部分是索引,将网页信息存储进数据库;第二部分是搜索,从数据库中查找信息。轻量级,支持进行二次开发。

  • 静态网页网盘链接:

    1
    2
    bugs   链接: https://pan.baidu.com/s/1n_kkUaZZxcTEa4-v6sGa9Q 密码: sg98 (20180707)
    drops 链接: https://pan.baidu.com/s/1r2Y7rfntwnjglX6HtzDk6w 密码: 738f (20180707)

0x01.依赖组件及说明

  • python 2.7和pip

  • python依赖:MySQLdb,lxml(推荐)

  • mysql,php及任意web服务器(php需开启pdo-mysql模块

  • 将本项目放进web服务器目录下,bugs目录下为漏洞库文件,drops目录下为知识库文件。

    1
    2
    3
    4
    5
    6
    7
    8
    文件说明:
    app_bugs.py bugs的索引,依赖lxml
    app_drops.py drops的索引,依赖lxml
    index.html 搜索的主页
    search.php 执行搜索的页面
    config.php php配置文件
    ./bugs bugs静态文件的目录
    ./drops drops静态文件的目录

0x02.索引配置

  • app_bugs.py为建立bugs索引的脚本,app_drops为建立drops索引的脚本。

  • 因为python脚本中open()函数打开的文件名不能为中文,建议将drops目录下的中文文件名改为英文(例如,安全运维-xxxx.html=>safe-xxxx.html)

  • python脚本运行前需要修改如下语句,更改参数如主机、端口号、用户名、密码。

    1
    conn=MySQLdb.connect(host='localhost',port=3306,user='root',passwd='',db='wooyun',charset='utf8')
  • 在mysql中建立数据库wooyun,数据表bugs、drops,分别建立字段title,dates,author,type,corp,doc与title,dates,author,type,doc。

    1
    2
    3
    CREATE DATABASE `wooyun` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    create table bugs(title VARCHAR(500),dates DATETIME, author CHAR(255),type CHAR(255),corp CHAR(255),doc VARCHAR(200) PRIMARY KEY);
    create table drops(title VARCHAR(500),dates DATETIME, author CHAR(255),type CHAR(255),doc VARCHAR(200) PRIMARY KEY);
  • 注意mysql编码如下,需要为utf-8(character_set_server不为utf-8要修改mysql配置文件

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    use wooyun;
    show variables like 'character%'; #查看编码
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | utf8 |
    | character_set_connection | utf8 |
    | character_set_database | utf8 |
    | character_set_filesystem | binary |
    | character_set_results | utf8 |
    | character_set_server | utf8 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+

    如果编码错误会报错,比如:

    1
    2
    Warning: Incorrect string value: '\xE5\xBB\xB6\xE9\x95\xBF...' for column 'title' at row 1
    cur.execute("INSERT INTO `drops`(`title`,`dates`,`author`,`type`,`doc`) VALUES(%s,%s,%s,%s,%s)", tmp)

    在mysql里查看会发现有一堆???

  • 之后就可以建立索引了

    1
    2
    sudo python ./app_bugs.py
    sudo python ./app_drops.py
  • bugs数目为40280,drops数目为1264

    1
    2
    3
    use wooyun;
    select count(*) from bugs;
    select count(*) from drops;

0x03.搜索配置

  • 修改config.php中修改如下语句中参数,分别是主机、端口、用户名、密码与数据库。

    1
    2
    3
    4
    5
    $config['host'] = '127.0.0.1';
    $config['port'] = '3306';
    $config['user'] = 'root';
    $config['passwd'] = '';
    $config['database'] = 'wooyun';
  • index.html与search.php样式来自于前端静态资源托管库。f12进入开发者模式,如果样式文件访问不到可以使用本地或cdn的样式(bootstrap3.3.7、jquery3.1.0)。只需要更改两个网页里面的如下内容。

1
2
3
<link href="//lib.baomitu.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="//lib.baomitu.com/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript" src="//lib.baomitu.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  • 为了防止因为web服务器配置不正确,导致访问http(s)://example.link/bugs/或者http(s)://example.link/drops/而进入index of页面泄露所有文件,在目录下放置内容为空的index.html即可。

  • linux下由于selinux可能会导致无法连接数据库,可以使用如下命令:

    1
    2
    getenforce   //查看selinux状态
    setenforce 0 //暂时关闭selinux

0x04.问题

  • drops很奇怪的会都需web目录下的js而不是本身目录里的js,所以drops的页面会有些乱。开发者模式看一下,缺少的js为web目录/static/drops/css与web目录/static/drops/js。新建目录再把drops下的css、js文件夹复制过去即可

0x05.更新日志

  • 2016.10.08更新:上传了bugs.py。由于bugs部分页面(约143条)的author带有js,正则匹配出的信息出错,所以上传了bugs.py用于修正,在app.py后执行,python bugs.py。(2016.11.09已修正,无需执行bugs.py)

  • 2016.10.10更新:重写了search.php和search.css,基本适配了各种浏览器和移动端。

  • 2016.11.09更新:匹配索引将BeautifulSoup换成了lxml,运行速度更快。优化了匹配(感谢@tuola)。

  • 2017.01.01更新:增加了作者搜索,优化了分页逻辑。

  • 2017.3.7更新:重写了前端,优化了php代码。

  • 欢迎反馈问题。可以提问issue也可以通过grt1stnull@gmail.com联系我。后续也会进行其他细节优化。

0x06.后记

  • 本来打算把wooyun_public布置在我的树莓派上,因为一些原因失败,所以萌生了自己搭建的念头

  • 总共搭建了十天,接触了js、bootstarap、beautifulsoup、mysqldb、mysqli和pdo。虽然以前也会css与php,但这是第一次真正写一个动态网页,感觉很棒。

0x07.其他

  • 本程序只用于技术研究和个人使用,程序组件均为开源程序,漏洞和知识库来源于乌云公开漏洞,版权归wooyun.org。

  • 新浪微博:http://weibo.com/grt1st

  • 个人邮箱:grt1stnull@gmail.com



No.10 https://github.com/LubyRuffy/wyquery

Watch:12___Star:109___Fork:92

wyquery

Wooyun公开的漏洞详情是一个很好的资源,但是没有提供很好的搜索引擎和排序功能来进行数据分析,所以,这个项目用户镜像wooyun上已经对外公开的漏洞详情,并提供更多搜索和排序的功能。

你有没有想完成如下功能?

  • 我想只看给钱的漏洞
  • 我想只看带乌云标志的漏洞
  • 我想按照rank排序漏洞

如果有,那你跟我遇到的问题一样,不妨试试这个项目!线上已经搭建好的DEMO环境如下:http://120.27.41.90/

搭建环境

建议在Linux下运行,当然Windows下也可以。Ruby 2.0+

1
2
3
4
5
git clone https://github.com/LubyRuffy/wyquery.git
cd wyquery
bundle install
rake db:migrate
rails s

然后访问http://0.0.0.0:3000

初次抓取数据

1
2
cd wyquery
ruby ./tools/import_bugs.rb

同步数据

这时可以建立定时任务

1
2
crontab -e
*/10 * * * * <wyquery路径>/tools/import_bugs.rb


No.11 https://github.com/jas502n/fuzz-wooyun-org

Watch:3___Star:96___Fork:49

fuzz-wooyun-org

WooYun Fuzz 库



No.12 https://github.com/xinali/wooyun

Watch:6___Star:95___Fork:42

wooyun

wooyun datasets

  • usernames
  • passwords
  • URLs
  • sensitive data patterns
  • fuzzing payloads
  • web shells


No.13 https://github.com/l3m0n/wooyun-wiki

Watch:5___Star:75___Fork:55

wooyun-wiki

wiki.wooyun.org的部分快照网页



No.14 https://github.com/fxfactorial/wooyun.github.io

Watch:6___Star:44___Fork:33

【没有 Readme.md 介绍】



No.15 https://github.com/CaledoniaProject/wooyun_offline_ui

Watch:4___Star:40___Fork:19

说明

花了10分钟重做了一套乌云离线Web UI,重做总共有两个目的,

  1. 没必要使用14GB的虚拟机,经过处理,40K漏洞只占用500MB mongodb 硬盘空间
  2. 上述作者没有提取 关注数、是否为有奖励或者漏洞预警的漏洞 等几个关键字段

特性

支持漏洞标题搜索、漏洞wooyun id搜索

screen

支持漏洞查看(删除了评论),原始 wooyun UI

screen2

安装

复制 src 到 web 目录,e.g

1
cp -R src ~/web/wooyun_offline

安装 php-mongo 扩展

mongo 默认为 127.0.0.1:27017,如有不同,修改 src/config.php 即可

1
2
3
4
5
<?php
$config = array(
'mongodb' => 'mongodb://127.0.0.1:27017'
);
?>

导入数据

导入到 wooyun 数据库,bugs 表即可

由于政策风险,我不能提供数据,可以用网上的14GB虚拟机导出

然后使用 src/scripts/minify.pl 精简 mongo 数据库

已知问题

  1. 缺少 images/blood.png
  2. 漏洞库不全,可惜没用高权限账号爬


No.16 https://github.com/lxj616/DVWA-WooYun

Watch:1___Star:23___Fork:16

DVWA-WooYun

DVWA-WooYun is a plugin-set for DVWA , with plugins based on wooyun.org real bug reports

It should have been a fork of the RandomStorm/DVWA , But while I was coding it , I didn’t know a thing about github :(

And now I do , so scavenged old codes to github

And I modified lot of things , can’t remember why , just messed around , It seems to be not able to merge with the original DVWA now

DAMN VULNERABLE WEB APP

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.

WARNING!

Damn Vulnerable Web App is damn vulnerable! Do not upload it to your hosting provider’s public html folder or any working web
server as it will be hacked. I recommend downloading and installing XAMPP onto a local machine inside your LAN which is used solely for testing.

We do not take responsibility for the way in which any one uses Damn Vulnerable Web App (DVWA). We have made the purposes of the application clear and it should not be used maliciously. We have given warnings and taken measures to prevent users from installing DVWA on to live web servers. If your web server is compromised via an installation of DVWA it is not our responsibility it is the responsibility of the person/s who uploaded and installed it.

License

This file is part of Damn Vulnerable Web App (DVWA).

Damn Vulnerable Web App (DVWA) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Damn Vulnerable Web App (DVWA) is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Damn Vulnerable Web App (DVWA). If not, see http://www.gnu.org/licenses/.

Download

DVWA is available either as a package that will run on your own web server or as a Live CD

Installation

Default username = admin

Default password = password

Installation video:
http://www.youtube.com/watch?v=GzIj07jt8rM

The easiest way to install DVWA is to download and install ‘XAMPP’ if you do not already have a web server setup.

XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

XAMPP can be downloaded from:
http://www.apachefriends.org/en/xampp.html

Simply unzip dvwa.zip, place the unzipped files in your public html folder, then point your browser to http://127.0.0.1/dvwa/index.php

Database Setup

To set up the database, simply click on the Setup button in the main menu, then click on the ‘Create / Reset Database’ button. This will create / reset the database for you with some data in.

If you receive an error while trying to create your database, make sure your database credentials are correct within /config/config.inc.php

The variables are set to the following by default:

1
2
3
$_DVWA[ 'db_user' ] = 'root';
$_DVWA[ 'db_password' ] = '';
$_DVWA[ 'db_database' ] = 'dvwa';

Troubleshooting

For the latest troubleshooting information please visit:
http://code.google.com/p/dvwa/issues/list

+Q. SQL Injection wont work on PHP version 5.2.6.

-A.If you are using PHP version 5.2.6 you will need to do the following in order for SQL injection and other vulnerabilities to work.

In .htaccess:

Replace:

1
2
3
4
5
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
#php_flag allow_url_fopen on
#php_flag allow_url_include on
</IfModule>

With:

1
2
3
4
5
<IfModule mod_php5.c>
magic_quotes_gpc = Off
allow_url_fopen = On
allow_url_include = On
</IfModule>

+Q. Command execution won’t work.

-A. Apache may not have high enough priviledges to run commands on the web server. If you are running DVWA under linux make sure you are logged in as root. Under Windows log in as Administrator.

+Q. My XSS payload won’t run in IE.

-A. If your running IE8 or above IE actively filters any XSS. To disable the filter you can do so by setting the HTTP header ‘X-XSS-Protection: 0’ or disable it from internet options. There may also be ways to bypass the filter.

Homepage: http://www.dvwa.co.uk

Project Home: https://github.com/RandomStorm/DVWA

Created by the DVWA team



No.17 https://github.com/neargle/SecNewsBak

Watch:2___Star:20___Fork:17

README

该项目只用于备份Sec-News上Drops乌云知识库的失效文章,并非Drops整站文章。

文章列表如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
drops_arti_list = [
"SQL注入速查表(上)",
"WMI Attacks",
"攻击洋葱路由(Tor)匿名服务的一些综述",
"SQL注入速查表(下)与Oracle注入速查表",
"Hacking ipcam like Harold in POI",
"海豚浏览器与水星浏览器远程代码执行漏洞详解",
"WMI Backdoor",
"手把手教你当微信运动第一名 – 利用Android Hook进行微信运动作弊",
"WMI Defense",
"Tomcat安全配置",
"利用Weblogic进行入侵的一些总结",
"工控安全入门分析",
"利用被入侵的路由器获取网络流量",
"利用白名单绕过360实例",
"浅析大规模DDOS防御架构-应对T级攻防",
"XCode编译器里有鬼 – XCodeGhost样本分析",
"借用UAC完成的提权思路分享",
"TcpDump使用手册",
"被人遗忘的Memcached内存注射",
"利用被入侵的路由器迈入内网",
"Android sqlite load_extension漏洞解析",
"CTF主办方指南之对抗搅屎棍",
"域渗透的金之钥匙",
"比葫芦娃还可怕的百度全系APP SDK漏洞 - WormHole虫洞漏洞分析报告",
"那些年做过的ctf之加密篇",
"从一个锁主页木马里挖出的惊天“暗杀黑名单”",
"C&C控制服务的设计和侦测方法综述",
"Python安全编码指南",
"翻墙路由器的原理与实现",
"几期『三个白帽』小竞赛的writeup",
"拆分密码",
"变种XSS:持久控制",
"使用32位64位交叉编码混淆来打败静态和动态分析工具",
"給初學者的DLL Side Loading的UAC繞過",
"Joomla远程代码执行漏洞分析",
"网络小黑揭秘系列之黑色SEO初探",
"一步一步学ROP之Android ARM 32位篇",
"Linux入侵检测基础",
"Android WebView File域攻击杂谈",
"小议Linux安全防护(一)",
"Powershell 提权框架-Powerup",
"Android Linker学习笔记",
"MD5碰撞的演化之路",
"Android应用安全开发之源码安全",
"Ruby on Rails 动态渲染远程代码执行漏洞 (CVE-2016-0752)(翻译)",
"中间人攻击 -- Cookie喷发",
"域渗透——Security Support Provider",
"LUA脚本虚拟机逃逸技术分析",
"我的通行你的证",
"在不需要知道密码的情况下 Hacking MSSQL",
"代码审计入门总结",
"Linux服务器应急事件溯源报告",
"Head First FILE Stream Pointer Overflow",
"从 WTForm 的 URLXSS 谈开源组件的安全性",
"网络小黑揭秘系列之黑产江湖黑吃黑—中国菜刀的隐形把手",
"简单验证码识别及工具编写思路",
"中国菜刀仿冒官网三百万箱子爆菊记",
"Rails Security (上) ",
"富文本存储型XSS的模糊测试之道",
"主机被入侵分析过程报告",
"Exploring SSTI in Flask/Jinja2 | WooYun知识库",
"0ctf writeup",
"一个支付宝木马的分析溯源之旅",
"QQ模拟登录实现后篇",
"渗透技巧——通过cmd上传文件的N种方法",
"通过ELF动态装载构造ROP链 ( Return-to-dl-resolve)",
"Mysql报错注入原理分析(count()、rand()、group by)",
"利用反射型XSS二次注入绕过CSP form-action限制",
"渗透Hacking Team过程",
"“信任“之殇――安全软件的“白名单”将放大恶意威胁",
"百脑虫之hook技术",
"内网渗透中转发工具总结",
"TCP安全测试指南-魔兽3找联机0day",
"CVE-2016-3714 - ImageMagick 命令执行分析",
"CVE-2016-1897/8 - FFMpeg漏洞分析",
"漫谈流量劫持",
"新姿势之Docker Remote API未授权访问漏洞分析和利用",
"利用CouchDB未授权访问漏洞执行任意系统命令",
"利用环境变量LD_PRELOAD来绕过php disable_function执行系统命令",
"CTF中比较好玩的stego",
"linux下tomcat安全配置",
"MySQL和PostgreSQL数据库安全配置",
"内网渗透思路探索之新思路的探索与验证",
"小窥TeslaCrypt密钥设计",
"Do Evil Things with gopher://",
"三个白帽条条大路通罗马系列2之二进制题分析",
"Android安全开发之Provider组件安全",
"漏洞检测的那些事儿 ",
"QQ浏览器隐私泄露报告",
"三个白帽之从pwn me调试到Linux攻防学习",
"渗透中寻找突破口的那些事",
"Struts2 S033与最新S037详细分析",
"DB2在渗透中的应用",
"Python urllib HTTP头注入漏洞 (中文翻译)",
"SQL注入关联分析",
"Anti-debugging Skills in APK",
"玩转Metasploit之Automated Persistent Backdoor",
"Uber渗透案例:我们是如何发现你是谁,你在哪,你要打车去哪!",
"玩转Metasploit之Automated Persistent Backdoor",
"Docker安全那些事 ",
"Use bitsadmin to maintain persistence and bypass Autoruns ",
"CTF中那些脑洞大开的编码和加密 ",
"Jenkins RCE 2(CVE-2016-0788)分析及利用",
"小议安卓定位伪造-实战足不出户畅玩pokemon go",
"三个白帽挑战赛之[续集]火币网2W大挑战Writeup"
]


No.18 https://github.com/acgpiano/wooyun-node

Watch:2___Star:9___Fork:8

wooyun-node

这是wooyun.org镜像的node.js版本,用的mysql,支持标题,作者,类型,厂商检索。
方便新手小白使用,搭建方法非常简单。
首先需要安装mysql,要把数据库语言设置成utf8(非常重要,不然会出错)。由于各个系统设置方法不同,需自行百度。检测是否成功可以登进数据库,执行

1
status;

如果是以下状态,就代表可以下一步了。
把该项目克隆到本地

1
git clone https://github.com/acgpiano/wooyun-node.git

修改config.js里面的用户名和密码,改为你的mysql的用户名和密码,port是服务的端口,可以自行修改。
下载wooyun的静态资源:
链接: 百度网盘 密码: mqnp
需要解压到wooyun-node/static/bugs/
文件夹下面(自行新建bugs文件夹)
接下来安装node.js,去官网下载就好了。
接下来安装cnpm(如果可以连Internet这一步可以忽略,以下命令的cnpm全都可以用npm代替)

1
npm install -g cnpm --registry=https://registry.npm.taobao.org

然后在wooyun-node里执行

1
cnpm install

等所有的依赖装完再执行

1
npm run db

等数据库建表完后,共40293条,再执行

1
npm start

默认port端口是9999,可以在config.js里面修改
打开浏览器 http://127.0.0.1:9999就可以使用了。

仅供自学使用,如果要部署到公网可以自己改用orm,修改表结构加速查询,防注入。



当然是彩蛋辣~

上面提到的 Baidu网盘 链接整理:

https://github.com/hanc00l/wooyun_public
Watch:224___Star:3586___Fork:1.8k

1
2
3
4
5
6
7
虚拟机下载地址:
https://pan.baidu.com/s/1HkR4ggvAwTikshsjcKYBuA ,提取密码:8wnb(2018.4.23更新)
【文件名:ooyun_vmware_201606_es】

虚拟机下载地址: https://pan.baidu.com/s/1qYRqa3U 密码: w8vb (2017.7.4)
【文件名:wooyun_final】
虚拟机用户名、密码为hancool/qwe123

https://github.com/m0l1ce/wooyunallbugs
Watch:21___Star:398___Fork:154

1
2
链接:https://pan.baidu.com/s/1htwVF3Q 密码:oskw
【文件名:wooyun-15-a.zip等】

https://github.com/grt1st/wooyun_search
Watch:22___Star:327___Fork:157

1
2
3
4
5
静态网页网盘链接:
bugs 链接: https://pan.baidu.com/s/1n_kkUaZZxcTEa4-v6sGa9Q 密码: sg98 (20180707)
【文件名:WooYun_Bugs(漏洞库)】
drops 链接: https://pan.baidu.com/s/1r2Y7rfntwnjglX6HtzDk6w 密码: 738f (20180707)
【文件名:WooYun_Drops(知识库)】

https://github.com/acgpiano/wooyun-node
Watch:2___Star:9___Fork:8

1
2
链接: https://pan.baidu.com/share/init?shareid=3613354206&uk=4113422303 密码: mqnp
【文件名:WooYun_Bugs(漏洞库)】


当然还有彩蛋辣~

新建一个文件夹,在里面打开终端,复制粘贴下面代码,或者保存为 .sh (linux)、 .bat (Windows),命令行调用辣

注意:最后三个库特别大,如果网络不好,可能出现 git 连接超时,可以连接更优网络,或参考我的文章

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
echo .
git clone https://github.com/hanc00l/wooyun_public
echo .
git clone https://github.com/boy-hack/wooyun-payload
echo .
git clone https://github.com/m0l1ce/wooyunallbugs
echo .
git clone https://github.com/SuperKieran/WooyunDrops
echo .
git clone https://github.com/SuperKieran/wooyun-img
echo .
git clone https://github.com/grt1st/wooyun_search
echo .
git clone https://github.com/LubyRuffy/wyquery
echo .
git clone https://github.com/jas502n/fuzz-wooyun-org
echo .
git clone https://github.com/xinali/wooyun
echo .
git clone https://github.com/l3m0n/wooyun-wiki
echo .
git clone https://github.com/fxfactorial/wooyun.github.io
echo .
git clone https://github.com/CaledoniaProject/wooyun_offline_ui
echo .
git clone https://github.com/lxj616/DVWA-WooYun
echo .
git clone https://github.com/neargle/SecNewsBak
echo .
git clone https://github.com/acgpiano/wooyun-node
echo .
git clone https://github.com/Xyntax/1000php 1000php-Xyntax
echo .
git clone https://github.com/starnightcyber/1000php 1000php-starnightcyber
echo .
git clone https://github.com/jiji262/wooyun_articles
echo .
]]>
- - - - <p>翻阅 Wooyun ,然后找到了Github上。。。不得不说,Github 上确实有大量镜像资源</p> -<p>在这里做一个总结吧。按 Star 排序,把每个库的 Readme.md 剪辑到了这里。</p> -<p>文尾有彩蛋!</p> - - - - - - - - - - - -
- -
diff --git a/baidu_urls.txt b/baidu_urls.txt deleted file mode 100644 index 37ec21c..0000000 --- a/baidu_urls.txt +++ /dev/null @@ -1,5 +0,0 @@ -https://blog.tcpsoft.app/2022/04/adb-picture-transfer/ -https://blog.tcpsoft.app/2022/03/my-disk-crushed/ -https://blog.tcpsoft.app/2021/07/wsl2-and-proxifier/ -https://blog.tcpsoft.app/2020/08/welcome-pwn-partition/ -https://blog.tcpsoft.app/2020/07/gdb-operation/ \ No newline at end of file diff --git a/baidusitemap.xml b/baidusitemap.xml deleted file mode 100644 index 08fb8be..0000000 --- a/baidusitemap.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - https://blog.tcpsoft.app/2022/04/adb-picture-transfer/ - 2022-04-10 - - https://blog.tcpsoft.app/2022/03/my-disk-crushed/ - 2022-03-04 - - https://blog.tcpsoft.app/2021/07/wsl2-and-proxifier/ - 2021-07-21 - - https://blog.tcpsoft.app/2020/07/qzone-faster-like/ - 2020-08-16 - - https://blog.tcpsoft.app/2020/08/welcome-pwn-partition/ - 2020-08-05 - - https://blog.tcpsoft.app/2020/07/gdb-operation/ - 2020-07-28 - - https://blog.tcpsoft.app/2020/07/batch-shortcuts/ - 2020-07-28 - - https://blog.tcpsoft.app/2020/07/time-management/ - 2020-07-16 - - https://blog.tcpsoft.app/2020/05/Mi9-SE-screen-problem-self-rescue/ - 2020-05-26 - - https://blog.tcpsoft.app/2020/05/dajubao/ - 2020-05-26 - - https://blog.tcpsoft.app/2020/05/adb-auto-make-money/ - 2020-05-05 - - https://blog.tcpsoft.app/2020/03/why-linux/ - 2020-03-28 - - https://blog.tcpsoft.app/2020/03/let-onedrive-fly-scientifically/ - 2020-03-22 - - https://blog.tcpsoft.app/2020/02/let-git-fly-scientifically/ - 2020-03-21 - - https://blog.tcpsoft.app/2020/03/how-to-ask-in-group-chat/ - 2020-03-06 - - https://blog.tcpsoft.app/2020/02/access-google-from-nothing/ - 2020-03-06 - - https://blog.tcpsoft.app/2020/03/cpp-with-Visual-Studio-2019/ - 2020-03-06 - - https://blog.tcpsoft.app/2020/02/2020gaokaojiayou/ - 2020-02-28 - - https://blog.tcpsoft.app/2020/02/getting-start-52pojie/ - 2020-02-22 - - https://blog.tcpsoft.app/2020/02/wooyun-on-github/ - 2020-02-13 - - https://blog.tcpsoft.app/2019/12/Hi-Im-Cortana/ - 2020-02-11 - - https://blog.tcpsoft.app/2020/02/hexo-with-gitalk/ - 2020-02-11 - - https://blog.tcpsoft.app/2020/02/hexo-with-cloudflare/ - 2020-02-11 - - https://blog.tcpsoft.app/2020/02/hexo-seo/ - 2020-02-11 - - https://blog.tcpsoft.app/2020/02/hexo-changes/ - 2020-02-11 - - diff --git a/categories/index.html b/categories/index.html deleted file mode 100644 index 434509f..0000000 --- a/categories/index.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - categories | Hi, I'm Cortana. - - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - - - -
- - -
- - - -
-
- -

categories -

- - - -
- - - - -
-
-
- 目前共计 6 个分类 -
- -
- -
- - - -
- - - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/categories/none/index.html b/categories/none/index.html deleted file mode 100644 index 27abe0e..0000000 --- a/categories/none/index.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: none | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

none - 分类 -

-
- - -
-

2022

-
- - - - -
-

2021

-
- - -
-

2020

-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/categories/none/page/2/index.html b/categories/none/page/2/index.html deleted file mode 100644 index 5441e28..0000000 --- a/categories/none/page/2/index.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: none | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

none - 分类 -

-
- - -
-

2020

-
- - -
-

2019

-
- - - -
-
- - - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/categories/pwn/index.html b/categories/pwn/index.html deleted file mode 100644 index 4ac694c..0000000 --- a/categories/pwn/index.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: pwn | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

pwn - 分类 -

-
- - -
-

2020

-
- - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\345\237\272\347\241\200/index.html" "b/categories/\345\237\272\347\241\200/index.html" deleted file mode 100644 index 4feefcd..0000000 --- "a/categories/\345\237\272\347\241\200/index.html" +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: 基础 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

基础 - 分类 -

-
- - -
-

2020

-
- - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\345\273\272\347\253\231/index.html" "b/categories/\345\273\272\347\253\231/index.html" deleted file mode 100644 index d68f63b..0000000 --- "a/categories/\345\273\272\347\253\231/index.html" +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: 建站 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

建站 - 分类 -

-
- - -
-

2020

-
- - - - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\347\247\221\345\255\246\344\270\212\347\275\221/index.html" "b/categories/\347\247\221\345\255\246\344\270\212\347\275\221/index.html" deleted file mode 100644 index d95f332..0000000 --- "a/categories/\347\247\221\345\255\246\344\270\212\347\275\221/index.html" +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: 科学上网 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

科学上网 - 分类 -

-
- - -
-

2020

-
- - - - - - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\351\200\206\345\220\221/index.html" "b/categories/\351\200\206\345\220\221/index.html" deleted file mode 100644 index 9f0d32d..0000000 --- "a/categories/\351\200\206\345\220\221/index.html" +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 分类: 逆向 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - - - - -
-
-
-

逆向 - 分类 -

-
- - -
-

2020

-
- - - -
-
- - - - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/blog-encrypt.css b/css/blog-encrypt.css deleted file mode 100644 index 3efa275..0000000 --- a/css/blog-encrypt.css +++ /dev/null @@ -1,116 +0,0 @@ -.hbe-input-container { - width: 80%; - max-width: 800px; - position: relative; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: reverse; - -ms-flex-flow: column-reverse; - flex-flow: column-reverse; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - margin: 100px auto; -} -.hbe-input-container input { - -webkit-box-ordinal-group: 11; - order: 10; - -ms-flex-order: 10; - outline: none; - border: none; - width: 100%; - padding: 15px 0; - font-size: 20px; - border-bottom: 1px solid #d5d5d5; - text-indent: 10px; -} -.hbe-input-container input::-moz-placeholder { - opacity: 0; -} -.hbe-input-container input::-webkit-input-placeholder { - opacity: 0; -} -.hbe-input-container input:-ms-input-placeholder { - opacity: 0; -} -.hbe-input-container input, -.hbe-input-container label { - transition: all 0.3s; -} -.hbe-input-container label { - -webkit-box-ordinal-group: 101; - -ms-flex-order: 100; - font-size: 18px; - order: 100; - color: #3f4f5b; - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: translate(10px, 40px); - transform: translate(0px, 40px); -} -.hbe-input-container .bottom-line { - order: 2; - width: 0; - height: 2px; - background: #658db5; - transition: all 0.3s; -} -.hbe-input-container input:focus { - border-bottom-color: #fff; -} -.hbe-input-container input:focus ~ div, -.hbe-input-container input:not(:placeholder-shown) ~ div { - width: 100%; -} -.hbe-input-container input:focus + label, -.hbe-input-container input:not(:placeholder-shown) + label { - color: #52616c; - -webkit-transform: translate(10px) scale(0.9); - transform: translate(10px) scale(0.9); -} - -.hbe-button { - width: 130px; - height: 40px; - background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%); /* W3C */ - border: none; - border-radius: 5px; - position: relative; - border-bottom: 4px solid #2b8bc6; - color: #fbfbfb; - font-weight: 600; - font-family: 'Open Sans', sans-serif; - text-shadow: 1px 1px 1px rgba(0,0,0,.4); - font-size: 15px; - text-align: left; - text-indent: 5px; - box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2); - cursor: pointer; - - display: block; - margin: 0 auto; - margin-bottom: 20px; -} - -.hbe-button:active { - box-shadow: 0px 2px 0px 0px rgba(0,0,0,.2); - top: 1px; -} - -.hbe-button:after { - content: ""; - width: 0; - height: 0; - display: block; - border-top: 20px solid #187dbc; - border-bottom: 20px solid #187dbc; - border-left: 16px solid transparent; - border-right: 20px solid #187dbc; - position: absolute; - opacity: 0.6; - right: 0; - top: 0; - border-radius: 0 5px 5px 0; -} diff --git a/css/main.css b/css/main.css deleted file mode 100644 index 7570631..0000000 --- a/css/main.css +++ /dev/null @@ -1,2749 +0,0 @@ -html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} -body { - margin: 0; -} -main { - display: block; -} -h1 { - font-size: 2em; - margin: 0.67em 0; -} -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} -pre { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} -a { - background: transparent; -} -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} -b, -strong { - font-weight: bolder; -} -code, -kbd, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sub { - bottom: -0.25em; -} -sup { - top: -0.5em; -} -img { - border-style: none; -} -button, -input, -optgroup, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ -} -button, -input { -/* 1 */ - overflow: visible; -} -button, -select { -/* 1 */ - text-transform: none; -} -button, -[type='button'], -[type='reset'], -[type='submit'] { - -webkit-appearance: button; -} -button::-moz-focus-inner, -[type='button']::-moz-focus-inner, -[type='reset']::-moz-focus-inner, -[type='submit']::-moz-focus-inner { - border-style: none; - padding: 0; -} -button:-moz-focusring, -[type='button']:-moz-focusring, -[type='reset']:-moz-focusring, -[type='submit']:-moz-focusring { - outline: 1px dotted ButtonText; -} -fieldset { - padding: 0.35em 0.75em 0.625em; -} -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} -progress { - vertical-align: baseline; -} -textarea { - overflow: auto; -} -[type='checkbox'], -[type='radio'] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} -[type='number']::-webkit-inner-spin-button, -[type='number']::-webkit-outer-spin-button { - height: auto; -} -[type='search'] { - outline-offset: -2px; /* 2 */ - -webkit-appearance: textfield; /* 1 */ -} -[type='search']::-webkit-search-decoration { - -webkit-appearance: none; -} -::-webkit-file-upload-button { - font: inherit; /* 2 */ - -webkit-appearance: button; /* 1 */ -} -details { - display: block; -} -summary { - display: list-item; -} -template { - display: none; -} -[hidden] { - display: none; -} -::selection { - background: #262a30; - color: #fff; -} -html, -body { - height: 100%; -} -body { - background: #eee; - color: #555; - font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; - font-size: 1em; - line-height: 2; -} -@media (max-width: 991px) { - body { - padding-left: 0 !important; - padding-right: 0 !important; - } -} -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; - font-weight: bold; - line-height: 1.5; - margin: 20px 0 15px; -} -h1 { - font-size: 1.5em; -} -h2 { - font-size: 1.375em; -} -h3 { - font-size: 1.25em; -} -h4 { - font-size: 1.125em; -} -h5 { - font-size: 1em; -} -h6 { - font-size: 0.875em; -} -p { - margin: 0 0 20px 0; -} -a, -span.exturl { - border-bottom: 1px solid #999; - color: #555; - outline: 0; - text-decoration: none; - overflow-wrap: break-word; - word-wrap: break-word; - cursor: pointer; -} -a:hover, -span.exturl:hover { - border-bottom-color: #222; - color: #222; -} -iframe, -img, -video { - display: block; - margin-left: auto; - margin-right: auto; - max-width: 100%; -} -hr { - background-color: #ddd; - background-image: repeating-linear-gradient(-45deg, #fff, #fff 4px, transparent 4px, transparent 8px); - border: 0; - height: 3px; - margin: 40px 0; -} -blockquote { - border-left: 4px solid #ddd; - color: #666; - margin: 0; - padding: 0 15px; -} -blockquote cite::before { - content: '-'; - padding: 0 5px; -} -dt { - font-weight: 700; -} -dd { - margin: 0; - padding: 0; -} -kbd { - background-color: #f5f5f5; - background-image: linear-gradient(#eee, #fff, #eee); - border: 1px solid #ccc; - border-radius: 0.2em; - box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); - font-family: inherit; - padding: 0.1em 0.3em; - white-space: nowrap; -} -.table-container { - -webkit-overflow-scrolling: touch; - overflow: auto; -} -table { - border-collapse: collapse; - border-spacing: 0; - font-size: 0.875em; - margin: 0 0 20px 0; - width: 100%; -} -tbody tr:nth-of-type(odd) { - background: #f9f9f9; -} -tbody tr:hover { - background: #f5f5f5; -} -caption, -th, -td { - font-weight: normal; - padding: 8px; - text-align: left; - vertical-align: middle; -} -th, -td { - border: 1px solid #ddd; - border-bottom: 3px solid #ddd; -} -th { - font-weight: 700; - padding-bottom: 10px; -} -td { - border-bottom-width: 1px; -} -.btn { - background: #fff; - border: 2px solid #555; - border-radius: 2px; - color: #555; - display: inline-block; - font-size: 0.875em; - line-height: 2; - padding: 0 20px; - text-decoration: none; - transition-property: background-color; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.btn:hover { - background: #222; - border-color: #222; - color: #fff; -} -.btn + .btn { - margin: 0 0 8px 8px; -} -.btn .fa-fw { - text-align: left; - width: 1.285714285714286em; -} -.toggle { - line-height: 0; -} -.toggle .toggle-line { - background: #fff; - display: inline-block; - height: 2px; - left: 0; - position: relative; - top: 0; - transition: all 0.4s; - vertical-align: top; - width: 100%; -} -.toggle .toggle-line:not(:first-child) { - margin-top: 3px; -} -.toggle.toggle-arrow .toggle-line-first { - left: 50%; - top: 2px; - transform: rotate(45deg); - width: 50%; -} -.toggle.toggle-arrow .toggle-line-middle { - left: 2px; - width: 90%; -} -.toggle.toggle-arrow .toggle-line-last { - left: 50%; - top: -2px; - transform: rotate(-45deg); - width: 50%; -} -.toggle.toggle-close .toggle-line-first { - transform: rotate(-45deg); - top: 5px; -} -.toggle.toggle-close .toggle-line-middle { - opacity: 0; -} -.toggle.toggle-close .toggle-line-last { - transform: rotate(45deg); - top: -5px; -} -.highlight, -pre { - background: #f7f7f7; - color: #4d4d4c; - line-height: 1.6; - margin: 0 auto 20px; -} -pre, -code { - font-family: consolas, Menlo, monospace, "PingFang SC", "Microsoft YaHei"; -} -code { - background: #eee; - border-radius: 3px; - color: #555; - padding: 2px 4px; - overflow-wrap: break-word; - word-wrap: break-word; -} -.highlight *::selection { - background: #d6d6d6; -} -.highlight pre { - border: 0; - margin: 0; - padding: 10px 0; -} -.highlight table { - border: 0; - margin: 0; - width: auto; -} -.highlight td { - border: 0; - padding: 0; -} -.highlight figcaption { - background: #eee; - color: #4d4d4c; - font-size: 0.875em; - line-height: 1.2; - padding: 0.5em; -} -.highlight figcaption::before, -.highlight figcaption::after { - content: ' '; - display: table; -} -.highlight figcaption::after { - clear: both; -} -.highlight figcaption a { - color: #4d4d4c; - float: right; -} -.highlight figcaption a:hover { - border-bottom-color: #4d4d4c; -} -.highlight .gutter { - -moz-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; - user-select: none; -} -.highlight .gutter pre { - background: #eff2f3; - color: #869194; - padding-left: 10px; - padding-right: 10px; - text-align: right; -} -.highlight .code pre { - background: #f7f7f7; - padding-left: 10px; - width: 100%; -} -.gist table { - width: auto; -} -.gist table td { - border: 0; -} -pre { - overflow: auto; - padding: 10px; -} -pre code { - background: none; - color: #4d4d4c; - font-size: 0.875em; - padding: 0; - text-shadow: none; -} -pre .deletion { - background: #fdd; -} -pre .addition { - background: #dfd; -} -pre .meta { - color: #eab700; - -moz-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; - user-select: none; -} -pre .comment { - color: #8e908c; -} -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: #c82829; -} -pre .number, -pre .preprocessor, -pre .built_in, -pre .builtin-name, -pre .literal, -pre .params, -pre .constant, -pre .command { - color: #f5871f; -} -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: #718c00; -} -pre .title, -pre .css .hexcolor { - color: #3e999f; -} -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: #4271ae; -} -pre .keyword, -pre .javascript .function { - color: #8959a8; -} -.blockquote-center { - border-left: none; - margin: 40px 0; - padding: 0; - position: relative; - text-align: center; -} -.blockquote-center::before, -.blockquote-center::after { - background-repeat: no-repeat; - background-size: 22px 22px; - content: ' '; - display: block; - height: 24px; - opacity: 0.2; - position: absolute; - width: 100%; -} -.blockquote-center::before { - background-image: url("../images/quote-l.svg"); - background-position: 0 -6px; - border-top: 1px solid #ccc; - top: -20px; -} -.blockquote-center::after { - background-image: url("../images/quote-r.svg"); - background-position: 100% 8px; - border-bottom: 1px solid #ccc; - bottom: -20px; -} -.blockquote-center p, -.blockquote-center div { - text-align: center; -} -.post-body .group-picture img { - margin: 0 auto; - padding: 0 3px; -} -.group-picture-row { - margin-bottom: 6px; - overflow: hidden; -} -.group-picture-column { - float: left; - margin-bottom: 10px; -} -.post-body .label { - display: inline; - padding: 0 2px; -} -.post-body .label.default { - background: #f0f0f0; -} -.post-body .label.primary { - background: #efe6f7; -} -.post-body .label.info { - background: #e5f2f8; -} -.post-body .label.success { - background: #e7f4e9; -} -.post-body .label.warning { - background: #fcf6e1; -} -.post-body .label.danger { - background: #fae8eb; -} -.post-body .tabs { - margin-bottom: 20px; -} -.post-body .tabs, -.tabs-comment { - display: block; - padding-top: 10px; - position: relative; -} -.post-body .tabs ul.nav-tabs, -.tabs-comment ul.nav-tabs { - display: flex; - flex-wrap: wrap; - margin: 0; - margin-bottom: -1px; - padding: 0; -} -@media (max-width: 413px) { - .post-body .tabs ul.nav-tabs, - .tabs-comment ul.nav-tabs { - display: block; - margin-bottom: 5px; - } -} -.post-body .tabs ul.nav-tabs li.tab, -.tabs-comment ul.nav-tabs li.tab { - background: #fff; - border-bottom: 1px solid #ddd; - border-left: 1px solid transparent; - border-right: 1px solid transparent; - border-top: 3px solid transparent; - flex-grow: 1; - list-style-type: none; - border-radius: 0 0 0 0; -} -@media (max-width: 413px) { - .post-body .tabs ul.nav-tabs li.tab, - .tabs-comment ul.nav-tabs li.tab { - border-bottom: 1px solid transparent; - border-left: 3px solid transparent; - border-right: 1px solid transparent; - border-top: 1px solid transparent; - } -} -@media (max-width: 413px) { - .post-body .tabs ul.nav-tabs li.tab, - .tabs-comment ul.nav-tabs li.tab { - border-radius: 0; - } -} -.post-body .tabs ul.nav-tabs li.tab a, -.tabs-comment ul.nav-tabs li.tab a { - border-bottom: initial; - display: block; - line-height: 1.8; - outline: 0; - padding: 0.25em 0.75em; - text-align: center; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-out; -} -.post-body .tabs ul.nav-tabs li.tab a i, -.tabs-comment ul.nav-tabs li.tab a i { - width: 1.285714285714286em; -} -.post-body .tabs ul.nav-tabs li.tab.active, -.tabs-comment ul.nav-tabs li.tab.active { - border-bottom: 1px solid transparent; - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; - border-top: 3px solid #fc6423; -} -@media (max-width: 413px) { - .post-body .tabs ul.nav-tabs li.tab.active, - .tabs-comment ul.nav-tabs li.tab.active { - border-bottom: 1px solid #ddd; - border-left: 3px solid #fc6423; - border-right: 1px solid #ddd; - border-top: 1px solid #ddd; - } -} -.post-body .tabs ul.nav-tabs li.tab.active a, -.tabs-comment ul.nav-tabs li.tab.active a { - color: #555; - cursor: default; -} -.post-body .tabs .tab-content .tab-pane, -.tabs-comment .tab-content .tab-pane { - border: 1px solid #ddd; - padding: 20px 20px 0 20px; - border-radius: 0; -} -.post-body .tabs .tab-content .tab-pane:not(.active), -.tabs-comment .tab-content .tab-pane:not(.active) { - display: none; -} -.post-body .tabs .tab-content .tab-pane.active, -.tabs-comment .tab-content .tab-pane.active { - display: block; -} -.post-body .tabs .tab-content .tab-pane.active:nth-of-type(1), -.tabs-comment .tab-content .tab-pane.active:nth-of-type(1) { - border-radius: 0 0 0 0; -} -@media (max-width: 413px) { - .post-body .tabs .tab-content .tab-pane.active:nth-of-type(1), - .tabs-comment .tab-content .tab-pane.active:nth-of-type(1) { - border-radius: 0; - } -} -.post-body .note { - border-radius: 3px; - margin-bottom: 20px; - padding: 15px; - position: relative; - border: 1px solid #eee; - border-left-width: 5px; -} -.post-body .note h2, -.post-body .note h3, -.post-body .note h4, -.post-body .note h5, -.post-body .note h6 { - margin-top: 0; - border-bottom: initial; - margin-bottom: 0; - padding-top: 0; -} -.post-body .note p:first-child, -.post-body .note ul:first-child, -.post-body .note ol:first-child, -.post-body .note table:first-child, -.post-body .note pre:first-child, -.post-body .note blockquote:first-child, -.post-body .note img:first-child { - margin-top: 0; -} -.post-body .note p:last-child, -.post-body .note ul:last-child, -.post-body .note ol:last-child, -.post-body .note table:last-child, -.post-body .note pre:last-child, -.post-body .note blockquote:last-child, -.post-body .note img:last-child { - margin-bottom: 0; -} -.post-body .note.default { - border-left-color: #777; -} -.post-body .note.default h2, -.post-body .note.default h3, -.post-body .note.default h4, -.post-body .note.default h5, -.post-body .note.default h6 { - color: #777; -} -.post-body .note.primary { - border-left-color: #6f42c1; -} -.post-body .note.primary h2, -.post-body .note.primary h3, -.post-body .note.primary h4, -.post-body .note.primary h5, -.post-body .note.primary h6 { - color: #6f42c1; -} -.post-body .note.info { - border-left-color: #428bca; -} -.post-body .note.info h2, -.post-body .note.info h3, -.post-body .note.info h4, -.post-body .note.info h5, -.post-body .note.info h6 { - color: #428bca; -} -.post-body .note.success { - border-left-color: #5cb85c; -} -.post-body .note.success h2, -.post-body .note.success h3, -.post-body .note.success h4, -.post-body .note.success h5, -.post-body .note.success h6 { - color: #5cb85c; -} -.post-body .note.warning { - border-left-color: #f0ad4e; -} -.post-body .note.warning h2, -.post-body .note.warning h3, -.post-body .note.warning h4, -.post-body .note.warning h5, -.post-body .note.warning h6 { - color: #f0ad4e; -} -.post-body .note.danger { - border-left-color: #d9534f; -} -.post-body .note.danger h2, -.post-body .note.danger h3, -.post-body .note.danger h4, -.post-body .note.danger h5, -.post-body .note.danger h6 { - color: #d9534f; -} -.pagination .prev, -.pagination .next, -.pagination .page-number, -.pagination .space { - display: inline-block; - margin: 0 10px; - padding: 0 11px; - position: relative; - top: -1px; -} -@media (max-width: 767px) { - .pagination .prev, - .pagination .next, - .pagination .page-number, - .pagination .space { - margin: 0 5px; - } -} -.pagination { - border-top: 1px solid #eee; - margin: 120px 0 0; - text-align: center; -} -.pagination .prev, -.pagination .next, -.pagination .page-number { - border-bottom: 0; - border-top: 1px solid #eee; - transition-property: border-color; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.pagination .prev:hover, -.pagination .next:hover, -.pagination .page-number:hover { - border-top-color: #222; -} -.pagination .space { - margin: 0; - padding: 0; -} -.pagination .prev { - margin-left: 0; -} -.pagination .next { - margin-right: 0; -} -.pagination .page-number.current { - background: #ccc; - border-top-color: #ccc; - color: #fff; -} -@media (max-width: 767px) { - .pagination { - border-top: none; - } - .pagination .prev, - .pagination .next, - .pagination .page-number { - border-bottom: 1px solid #eee; - border-top: 0; - margin-bottom: 10px; - padding: 0 10px; - } - .pagination .prev:hover, - .pagination .next:hover, - .pagination .page-number:hover { - border-bottom-color: #222; - } -} -.comments { - margin: 60px 20px 0; - overflow: hidden; -} -.comment-button-group { - display: flex; - flex-wrap: wrap-reverse; - justify-content: center; - margin: 1em 0; -} -.comment-button-group .comment-button { - margin: 0.1em 0.2em; -} -.comment-button-group .comment-button.active { - background: #222; - border-color: #222; - color: #fff; -} -.comment-position { - display: none; -} -.comment-position.active { - display: block; -} -.tabs-comment { - background: #fff; - margin-top: 4em; - padding-top: 0; -} -.tabs-comment .comments { - border: 0; - box-shadow: none; - margin-top: 0; - padding-top: 0; -} -.container { - min-height: 100%; - position: relative; -} -.main-inner { - margin: 0 auto; - width: calc(100% - 20px); -} -@media (min-width: 1200px) { - .main-inner { - width: 1160px; - } -} -@media (min-width: 1600px) { - .main-inner { - width: 73%; - } -} -.header { - background: transparent; -} -.header-inner { - margin: 0 auto; - position: relative; - width: calc(100% - 20px); -} -@media (min-width: 1200px) { - .header-inner { - width: 1160px; - } -} -@media (min-width: 1600px) { - .header-inner { - width: 73%; - } -} -.headband { - background: #222; - height: 3px; -} -.site-meta { - margin: 0; - text-align: center; -} -@media (max-width: 767px) { - .site-meta { - text-align: center; - } -} -.brand { - background: #222; - border-bottom: none; - color: #fff; - display: inline-block; - line-height: 1.375em; - padding: 0 40px; - position: relative; -} -.brand:hover { - color: #fff; -} -.site-title { - display: inline-block; - font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; - font-size: 1.375em; - font-weight: normal; - line-height: 1.5; - vertical-align: top; -} -.site-subtitle { - color: #ddd; - font-size: 0.8125em; - margin-top: 10px; -} -.use-motion .brand { - opacity: 0; -} -.use-motion .site-title, -.use-motion .site-subtitle, -.use-motion .custom-logo-image { - opacity: 0; - position: relative; - top: -10px; -} -.site-nav-toggle { - display: none; - left: 10px; - position: absolute; -} -@media (max-width: 767px) { - .site-nav-toggle { - display: block; - } -} -.site-nav-toggle .toggle { - background: transparent; - border: 0; - margin-top: 2px; - padding: 10px; - width: 22px; -} -.site-nav-toggle .toggle .toggle-line { - background: #555; - border-radius: 1px; -} -.site-nav { - display: block; -} -@media (max-width: 767px) { - .site-nav { - clear: both; - display: none; - } -} -.site-nav.site-nav-on { - display: block; -} -.menu { - margin-top: 20px; - padding-left: 0; - text-align: center; -} -.menu-item { - display: inline-block; - list-style: none; - margin: 0 10px; -} -@media (max-width: 767px) { - .menu-item { - margin-top: 10px; - } -} -.menu-item a, -.menu-item span.exturl { - border-bottom: 0; - display: block; - font-size: 0.8125em; - transition-property: border-color; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -@media (hover: none) { - .menu-item a:hover, - .menu-item span.exturl:hover { - border-bottom-color: transparent !important; - } -} -.menu-item .fa { - margin-right: 8px; -} -.menu-item .badge { - display: inline-block; - font-weight: 700; - line-height: 1; - margin-left: 0.35em; - margin-top: 0.35em; - text-align: center; - white-space: nowrap; -} -@media (max-width: 767px) { - .menu-item .badge { - float: right; - margin-left: 0; - } -} -.use-motion .menu-item { - opacity: 0; -} -.sidebar { - background: #222; - bottom: 0; - box-shadow: inset 0 2px 6px #000; - position: fixed; - top: 0; - z-index: 1200; -} -.sidebar a, -.sidebar span.exturl { - border-bottom-color: #555; - color: #999; -} -.sidebar a:hover, -.sidebar span.exturl:hover { - border-bottom-color: #eee; - color: #eee; -} -@media (max-width: 991px) { - .sidebar { - display: none; - } -} -.sidebar-inner { - color: #999; - padding: 18px 10px; - text-align: center; -} -.site-overview-wrap { - overflow-x: hidden; - overflow-y: auto; -} -.cc-license { - margin-top: 10px; - text-align: center; -} -.cc-license .cc-opacity { - border-bottom: none; - opacity: 0.7; -} -.cc-license .cc-opacity:hover { - opacity: 0.9; -} -.cc-license img { - display: inline-block; -} -.site-author-image { - border: 1px solid #eee; - display: block; - height: auto; - margin: 0 auto; - max-width: 120px; - padding: 2px; -} -.site-author-name { - color: #222; - font-weight: 600; - margin: 0; - text-align: center; -} -.site-description { - color: #999; - font-size: 0.8125em; - margin-top: 0; - text-align: center; -} -.links-of-author { - margin-top: 15px; -} -.links-of-author a, -.links-of-author span.exturl { - border-bottom-color: #555; - display: inline-block; - font-size: 0.8125em; - margin-bottom: 10px; - margin-right: 10px; - vertical-align: middle; -} -.links-of-author a::before, -.links-of-author span.exturl::before { - background: #65e506; - border-radius: 50%; - content: ' '; - display: inline-block; - height: 4px; - margin-right: 3px; - vertical-align: middle; - width: 4px; -} -.sidebar-button { - margin-top: 15px; -} -.sidebar-button a { - border: 1px solid #fc6423; - border-radius: 4px; - color: #fc6423; - display: inline-block; - padding: 0 15px; -} -.sidebar-button a .fa { - margin-right: 5px; -} -.sidebar-button a:hover { - background: #fc6423; - border: 1px solid #fc6423; - color: #fff; -} -.sidebar-button a:hover .fa { - color: #fff; -} -.links-of-blogroll { - font-size: 0.8125em; - margin-top: 10px; -} -.links-of-blogroll-title { - font-size: 0.875em; - font-weight: 600; - margin-top: 0; -} -.links-of-blogroll-list { - list-style: none; - margin: 0; - padding: 0; -} -.links-of-blogroll-item { - padding: 2px 10px; -} -.links-of-blogroll-item a, -.links-of-blogroll-item span.exturl { - box-sizing: border-box; - display: inline-block; - max-width: 280px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -#sidebar-dimmer { - display: none; -} -@media (max-width: 767px) { - #sidebar-dimmer { - background: #000; - display: block; - height: 100%; - left: 100%; - opacity: 0; - position: fixed; - top: 0; - width: 100%; - z-index: 1100; - } - .sidebar-active + #sidebar-dimmer { - opacity: 0.7; - transform: translateX(-100%); - transition: opacity 0.5s; - } -} -.sidebar-nav { - margin: 0; - padding-bottom: 20px; - padding-left: 0; -} -.sidebar-nav li { - border-bottom: 1px solid transparent; - color: #555; - cursor: pointer; - display: inline-block; - font-size: 0.875em; -} -.sidebar-nav li.sidebar-nav-overview { - margin-left: 10px; -} -.sidebar-nav li:hover { - color: #fc6423; -} -.sidebar-nav .sidebar-nav-active { - border-bottom-color: #fc6423; - color: #fc6423; -} -.sidebar-nav .sidebar-nav-active:hover { - color: #fc6423; -} -.sidebar-panel { - display: none; -} -.sidebar-panel-active { - display: block; -} -.sidebar-toggle { - background: #222; - bottom: 45px; - cursor: pointer; - height: 14px; - left: 30px; - padding: 5px; - position: fixed; - width: 14px; - z-index: 1300; -} -@media (max-width: 991px) { - .sidebar-toggle { - left: 20px; - opacity: 0.8; - display: none; - } -} -.sidebar-toggle:hover .toggle-line { - background: #fc6423; -} -.post-toc-wrap { - overflow-x: hidden; - overflow-y: auto; -} -.post-toc { - font-size: 0.875em; -} -.post-toc ol { - list-style: none; - margin: 0; - padding: 0 2px 5px 10px; - text-align: left; -} -.post-toc ol > ol { - padding-left: 0; -} -.post-toc ol a { - border-bottom-color: #ccc; - color: #666; - transition-property: all; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.post-toc ol a:hover { - border-bottom-color: #000; - color: #000; -} -.post-toc .nav-item { - line-height: 1.8; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.post-toc .nav .nav-child { - display: none; -} -.post-toc .nav .active > .nav-child { - display: block; -} -.post-toc .nav .active-current > .nav-child { - display: block; -} -.post-toc .nav .active-current > .nav-child > .nav-item { - display: block; -} -.post-toc .nav .active > a { - border-bottom-color: #fc6423; - color: #fc6423; -} -.post-toc .nav .active-current > a { - color: #fc6423; -} -.post-toc .nav .active-current > a:hover { - color: #fc6423; -} -.site-state { - display: flex; - justify-content: center; - line-height: 1.4; - margin-top: 10px; - overflow: hidden; - text-align: center; - white-space: nowrap; -} -.site-state-item { - padding: 0 15px; -} -.site-state-item:not(:first-child) { - border-left: 1px solid #eee; -} -.site-state-item a { - border-bottom: none; -} -.site-state-item-count { - color: inherit; - display: block; - font-size: 1em; - font-weight: 600; - text-align: center; -} -.site-state-item-name { - color: #999; - font-size: 0.8125em; -} -.footer { - color: #999; - font-size: 0.875em; - padding: 20px 0; -} -.footer.footer-fixed { - bottom: 0; - left: 0; - position: absolute; - right: 0; -} -.footer-inner { - box-sizing: border-box; - margin: 0 auto; - text-align: center; - width: calc(100% - 20px); -} -@media (min-width: 1200px) { - .footer-inner { - width: 1160px; - } -} -@media (min-width: 1600px) { - .footer-inner { - width: 73%; - } -} -.with-love { - color: #808080; - display: inline-block; - margin: 0 5px; - animation: iconAnimate 1.33s ease-in-out infinite; -} -.powered-by, -.theme-info { - display: inline-block; -} -@-moz-keyframes iconAnimate { - 0%, 100% { - transform: scale(1); - } - 10%, 30% { - transform: scale(0.9); - } - 20%, 40%, 60%, 80% { - transform: scale(1.1); - } - 50%, 70% { - transform: scale(1.1); - } -} -@-webkit-keyframes iconAnimate { - 0%, 100% { - transform: scale(1); - } - 10%, 30% { - transform: scale(0.9); - } - 20%, 40%, 60%, 80% { - transform: scale(1.1); - } - 50%, 70% { - transform: scale(1.1); - } -} -@-o-keyframes iconAnimate { - 0%, 100% { - transform: scale(1); - } - 10%, 30% { - transform: scale(0.9); - } - 20%, 40%, 60%, 80% { - transform: scale(1.1); - } - 50%, 70% { - transform: scale(1.1); - } -} -@keyframes iconAnimate { - 0%, 100% { - transform: scale(1); - } - 10%, 30% { - transform: scale(0.9); - } - 20%, 40%, 60%, 80% { - transform: scale(1.1); - } - 50%, 70% { - transform: scale(1.1); - } -} -.back-to-top { - background: #222; - bottom: -100px; - box-sizing: border-box; - color: #fff; - cursor: pointer; - font-size: 12px; - left: 30px; - opacity: 0.6; - padding: 0 6px; - position: fixed; - text-align: center; - transition-property: bottom; - z-index: 1300; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; - width: 24px; -} -.back-to-top span { - display: none; -} -.back-to-top:hover { - color: #fc6423; -} -.back-to-top.back-to-top-on { - bottom: 30px; -} -@media (max-width: 991px) { - .back-to-top { - left: 20px; - opacity: 0.8; - } -} -.reading-progress-bar { - background: #37c6c0; - display: block; - height: 3px; - left: 0; - position: fixed; - top: 0; - width: 0; - z-index: 1500; -} -.post-body { - font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; - overflow-wrap: break-word; - word-wrap: break-word; -} -@media (min-width: 1200px) { - .post-body { - font-size: 1.125em; - } -} -.post-body span.exturl .fa { - font-size: 0.875em; - margin-left: 4px; -} -.post-body .image-caption, -.post-body .figure .caption { - color: #999; - font-size: 0.875em; - font-weight: bold; - line-height: 1; - margin: -20px auto 15px; - text-align: center; -} -.post-sticky-flag { - display: inline-block; - transform: rotate(30deg); -} -.post-button { - margin-top: 40px; - text-align: center; -} -.use-motion .post-block, -.use-motion .pagination, -.use-motion .comments { - opacity: 0; -} -.use-motion .post-header { - opacity: 0; -} -.use-motion .post-body { - opacity: 0; -} -.use-motion .collection-header { - opacity: 0; -} -.posts-collapse { - margin-left: 55px; - position: relative; -} -@media (max-width: 767px) { - .posts-collapse { - margin-left: 20px; - margin-right: 20px; - } -} -.posts-collapse .collection-title { - font-size: 1.125em; - position: relative; -} -.posts-collapse .collection-title::before { - background: #999; - border: 1px solid #fff; - border-radius: 50%; - content: ' '; - height: 10px; - left: 0; - margin-left: -6px; - margin-top: -4px; - position: absolute; - top: 50%; - width: 10px; -} -.posts-collapse .collection-year { - margin: 60px 0; - position: relative; -} -.posts-collapse .collection-year::before { - background: #bbb; - border-radius: 50%; - content: ' '; - height: 8px; - left: 0; - margin-left: -4px; - margin-top: -4px; - position: absolute; - top: 50%; - width: 8px; -} -.posts-collapse .collection-header { - display: inline-block; - margin: 0 0 0 20px; -} -.posts-collapse .collection-header small { - color: #bbb; - margin-left: 5px; -} -.posts-collapse .post-header { - border-bottom: 1px dashed #ccc; - margin: 30px 0; - padding-left: 15px; - position: relative; - transition-property: border; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.posts-collapse .post-header::before { - background: #bbb; - border: 1px solid #fff; - border-radius: 50%; - content: ' '; - height: 6px; - left: 0; - margin-left: -4px; - position: absolute; - top: 0.75em; - transition-property: background; - width: 6px; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.posts-collapse .post-header:hover { - border-bottom-color: #666; -} -.posts-collapse .post-header:hover::before { - background: #222; -} -.posts-collapse .post-meta { - display: inline; - font-size: 0.75em; - margin-right: 10px; -} -.posts-collapse .post-title { - display: inline; - font-size: 1em; - font-weight: normal; - margin-bottom: 0; - margin-top: 0; -} -.posts-collapse .post-title a, -.posts-collapse .post-title span.exturl { - border-bottom: none; - color: #666; -} -.posts-collapse::before { - background: #f5f5f5; - content: ' '; - height: 100%; - left: 0; - margin-left: -2px; - position: absolute; - top: 1.25em; - width: 4px; -} -.posts-collapse .fa-external-link { - font-size: 0.875em; - margin-left: 5px; -} -.post-eof { - background: #ccc; - height: 1px; - margin: 80px auto 60px; - text-align: center; - width: 8%; -} -.post-block:last-child .post-eof { - display: none; -} -.posts-expand { - padding-top: 40px; -} -@media (max-width: 767px) { - .posts-expand { - margin: 0 20px; - } -} -@media (min-width: 992px) { - .post-body { - text-align: justify; - } -} -@media (max-width: 991px) { - .post-body { - text-align: justify; - } -} -.post-body h1, -.post-body h2, -.post-body h3, -.post-body h4, -.post-body h5, -.post-body h6 { - padding-top: 10px; -} -.post-body h1 .header-anchor, -.post-body h2 .header-anchor, -.post-body h3 .header-anchor, -.post-body h4 .header-anchor, -.post-body h5 .header-anchor, -.post-body h6 .header-anchor { - border-bottom-style: none; - color: #ccc; - float: right; - margin-left: 10px; - visibility: hidden; -} -.post-body h1 .header-anchor:hover, -.post-body h2 .header-anchor:hover, -.post-body h3 .header-anchor:hover, -.post-body h4 .header-anchor:hover, -.post-body h5 .header-anchor:hover, -.post-body h6 .header-anchor:hover { - color: inherit; -} -.post-body h1:hover .header-anchor, -.post-body h2:hover .header-anchor, -.post-body h3:hover .header-anchor, -.post-body h4:hover .header-anchor, -.post-body h5:hover .header-anchor, -.post-body h6:hover .header-anchor { - visibility: visible; -} -.post-body iframe, -.post-body img, -.post-body video { - margin-bottom: 20px; -} -.post-body .video-container { - height: 0; - margin-bottom: 20px; - overflow: hidden; - padding-top: 75%; - position: relative; - width: 100%; -} -.post-body .video-container iframe, -.post-body .video-container object, -.post-body .video-container embed { - height: 100%; - left: 0; - margin: 0; - position: absolute; - top: 0; - width: 100%; -} -.post-gallery { - align-items: center; - display: grid; - grid-gap: 10px; - grid-template-columns: 1fr 1fr 1fr; - margin-bottom: 20px; -} -@media (max-width: 767px) { - .post-gallery { - grid-template-columns: 1fr 1fr; - } -} -.post-gallery a { - border: 0; -} -.post-gallery img { - margin: 0; -} -.posts-expand .post-header { - font-size: 1.125em; -} -.posts-expand .post-title { - font-weight: 400; - margin: initial; - text-align: center; - overflow-wrap: break-word; - word-wrap: break-word; -} -.posts-expand .post-title-link { - border-bottom: none; - color: #555; - display: inline-block; - position: relative; - vertical-align: top; -} -.posts-expand .post-title-link::before { - background: #000; - bottom: 0; - content: ''; - height: 2px; - left: 0; - position: absolute; - transform: scaleX(0); - visibility: hidden; - width: 100%; - transition-delay: 0s; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.posts-expand .post-title-link:hover::before { - transform: scaleX(1); - visibility: visible; -} -.posts-expand .post-title-link .fa { - font-size: 0.875em; - margin-left: 5px; -} -.posts-expand .post-meta { - color: #999; - font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; - font-size: 0.75em; - margin: 3px 0 60px 0; - text-align: center; -} -.posts-expand .post-meta .post-description { - font-size: 0.875em; - margin-top: 2px; -} -.posts-expand .post-meta time { - border-bottom: 1px dashed #999; - cursor: pointer; -} -.post-meta .post-meta-item + .post-meta-item::before { - content: '|'; - margin: 0 0.5em; -} -.post-meta-divider { - margin: 0 0.5em; -} -.post-meta-item-icon { - margin-right: 3px; -} -@media (max-width: 991px) { - .post-meta-item-icon { - display: inline-block; - } -} -@media (max-width: 991px) { - .post-meta-item-text { - display: none; - } -} -.post-nav { - border-top: 1px solid #eee; - display: flex; - justify-content: space-between; - margin-top: 15px; - padding-top: 10px; -} -.post-nav-item { - flex: 1; -} -.post-nav-item a { - border-bottom: none; - display: block; - font-size: 0.875em; - line-height: 1.6; - position: relative; -} -.post-nav-item a:hover { - border-bottom: none; - color: #222; -} -.post-nav-item a:active { - top: 2px; -} -.post-nav-item .fa { - font-size: 0.75em; -} -.post-nav-item:first-child { - margin-right: 15px; -} -.post-nav-item:first-child a { - padding-left: 5px; -} -.post-nav-item:first-child .fa { - margin-right: 5px; -} -.post-nav-item:last-child { - margin-left: 15px; - text-align: right; -} -.post-nav-item:last-child a { - padding-right: 5px; -} -.post-nav-item:last-child .fa { - margin-left: 5px; -} -.rtl.post-body p, -.rtl.post-body a, -.rtl.post-body h1, -.rtl.post-body h2, -.rtl.post-body h3, -.rtl.post-body h4, -.rtl.post-body h5, -.rtl.post-body h6, -.rtl.post-body li, -.rtl.post-body ul, -.rtl.post-body ol { - direction: rtl; - font-family: UKIJ Ekran; -} -.rtl.post-title { - font-family: UKIJ Ekran; -} -.post-tags { - margin-top: 40px; - text-align: center; -} -.post-tags a { - display: inline-block; - font-size: 0.8125em; -} -.post-tags a:not(:last-child) { - margin-right: 10px; -} -.post-widgets { - border-top: 1px solid #eee; - margin-top: 15px; - text-align: center; -} -.wp_rating { - height: 20px; - line-height: 20px; - margin-top: 10px; - padding-top: 6px; - text-align: center; -} -.social-like { - display: flex; - font-size: 0.875em; - justify-content: center; - text-align: center; -} -.reward-container { - margin: 20px auto; - padding: 10px 0; - text-align: center; - width: 90%; -} -.reward-container button { - background: #ff2a2a; - border: 0; - border-radius: 5px; - color: #fff; - cursor: pointer; - line-height: 2; - outline: 0; - padding: 0 15px; - vertical-align: text-top; -} -.reward-container button:hover { - background: #f55; -} -#qr { - padding-top: 20px; -} -#qr a { - border: 0; -} -#qr img { - display: inline-block; - margin: 0.8em 2em 0 2em; - max-width: 100%; - width: 180px; -} -#qr p { - text-align: center; -} -.post-copyright { - background: #f5f5f5; - border-left: 3px solid #ff2a2a; - list-style: none; - margin: 2em 0 0; - padding: 0.5em 1em; -} -.category-all-page .category-all-title { - text-align: center; -} -.category-all-page .category-all { - margin-top: 20px; -} -.category-all-page .category-list { - list-style: none; - margin: 0; - padding: 0; -} -.category-all-page .category-list-item { - margin: 5px 10px; -} -.category-all-page .category-list-count { - color: #bbb; -} -.category-all-page .category-list-count::before { - content: ' ('; - display: inline; -} -.category-all-page .category-list-count::after { - content: ') '; - display: inline; -} -.category-all-page .category-list-child { - padding-left: 10px; -} -.event-list { - padding: 0; -} -.event-list hr { - background: #222; - margin: 20px 0 45px 0; -} -.event-list hr::after { - background: #222; - color: #fff; - content: 'NOW'; - display: inline-block; - font-weight: bold; - padding: 0 5px; - text-align: right; -} -.event-list .event { - background: #222; - margin: 20px 0; - min-height: 40px; - padding: 15px 0 15px 10px; -} -.event-list .event .event-summary { - color: #fff; - margin: 0; - padding-bottom: 3px; -} -.event-list .event .event-summary::before { - animation: dot-flash 1s alternate infinite ease-in-out; - color: #fff; - content: '\f111'; - display: inline-block; - font-family: 'FontAwesome'; - font-size: 10px; - margin-right: 25px; - vertical-align: middle; -} -.event-list .event .event-relative-time { - color: #bbb; - display: inline-block; - font-size: 12px; - font-weight: 400; - padding-left: 12px; -} -.event-list .event .event-details { - color: #fff; - display: block; - line-height: 18px; - margin-left: 56px; - padding-bottom: 6px; - padding-top: 3px; - text-indent: -24px; -} -.event-list .event .event-details::before { - color: #fff; - display: inline-block; - font-family: 'FontAwesome'; - margin-right: 9px; - text-align: center; - text-indent: 0; - width: 14px; -} -.event-list .event .event-details.event-location::before { - content: '\f041'; -} -.event-list .event .event-details.event-duration::before { - content: '\f017'; -} -.event-list .event-past { - background: #f5f5f5; -} -.event-list .event-past .event-summary, -.event-list .event-past .event-details { - color: #bbb; - opacity: 0.9; -} -.event-list .event-past .event-summary::before, -.event-list .event-past .event-details::before { - animation: none; - color: #bbb; -} -@-moz-keyframes dot-flash { - from { - opacity: 1; - transform: scale(1); - } - to { - opacity: 0; - transform: scale(0.8); - } -} -@-webkit-keyframes dot-flash { - from { - opacity: 1; - transform: scale(1); - } - to { - opacity: 0; - transform: scale(0.8); - } -} -@-o-keyframes dot-flash { - from { - opacity: 1; - transform: scale(1); - } - to { - opacity: 0; - transform: scale(0.8); - } -} -@keyframes dot-flash { - from { - opacity: 1; - transform: scale(1); - } - to { - opacity: 0; - transform: scale(0.8); - } -} -ul.breadcrumb { - font-size: 0.75em; - list-style: none; - margin: 1em 0; - padding: 0 2em; - text-align: center; -} -ul.breadcrumb li { - display: inline; -} -ul.breadcrumb li + li::before { - content: '/\00a0'; - font-weight: normal; - padding: 0.5em; -} -ul.breadcrumb li + li:last-child { - font-weight: bold; -} -.tag-cloud { - text-align: center; -} -.tag-cloud a { - display: inline-block; - margin: 10px; -} -.tag-cloud a:hover { - color: #222 !important; -} -.gt-header a, -.gt-comments a, -.gt-popup a { - border-bottom: none; -} -.gt-container .gt-popup .gt-action.is--active::before { - top: 0.7em; -} -.search-pop-overlay { - background: rgba(0,0,0,0.3); - display: none; - height: 100%; - left: 0; - overflow: hidden; - position: fixed; - top: 0; - width: 100%; - z-index: 1400; -} -.search-popup { - background: #fff; - border-radius: 5px; - color: #333; - display: none; - height: 80%; - left: 50%; - margin-left: -350px; - padding: 0; - position: fixed; - top: 10%; - width: 700px; - z-index: 1500; -} -@media (max-width: 767px) { - .search-popup { - border-radius: 0; - height: 100%; - left: 0; - margin: 0; - padding: 0; - top: 0; - width: 100%; - } -} -.search-popup .search-icon, -.search-popup .popup-btn-close { - color: #999; - display: inline-block; - font-size: 18px; - height: 36px; - padding-left: 10px; - padding-right: 10px; - width: 18px; -} -.search-popup .popup-btn-close { - border-left: 1px solid #eee; - cursor: pointer; - float: right; -} -.search-popup .popup-btn-close:hover .fa { - color: #222; -} -.search-popup .search-header { - background: #f5f5f5; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - padding: 5px; -} -.search-loading-icon { - margin: 20% auto 0 auto; - text-align: center; -} -.search-popup ul.search-result-list { - margin: 0 5px; - padding: 0; -} -.search-popup p.search-result { - border-bottom: 1px dashed #ccc; - padding: 5px 0; -} -.search-popup a.search-result-title { - font-weight: bold; -} -.search-popup .search-keyword { - border-bottom: 1px dashed #ff2a2a; - color: #ff2a2a; - font-weight: bold; -} -.search-popup #search-result { - height: calc(100% - 55px); - overflow: auto; - padding: 5px 25px; - position: relative; -} -.search-popup .search-input-container { - display: inline-block; - height: 36px; - line-height: 36px; - padding: 0 5px; - position: absolute; - width: calc(100% - 90px); -} -.search-popup .search-input-container input { - background: transparent; - border: 0; - display: block; - height: 20px; - outline: 0; - padding: 8px 0; - vertical-align: middle; - width: 100%; -} -.search-popup #no-result { - color: #ccc; - left: 50%; - position: absolute; - top: 50%; - transform: translate(-50%, -50%); -} -.popular-posts-header { - border-bottom: 1px solid #eee; - display: block; - font-size: 1.125em; - margin-bottom: 10px; - margin-top: 60px; -} -.popular-posts { - padding: 0; -} -.popular-posts .popular-posts-item { - margin-left: 2em; -} -.popular-posts .popular-posts-item .popular-posts-title { - font-size: 0.875em; - font-weight: normal; - line-height: 2.4; - margin: 0; -} -.header { - margin: 0 auto; - position: relative; - width: calc(100% - 20px); -} -@media (min-width: 1200px) { - .header { - width: 1160px; - } -} -@media (min-width: 1600px) { - .header { - width: 73%; - } -} -@media (max-width: 991px) { - .header { - width: auto; - } -} -.header-inner { - background: #fff; - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); - overflow: hidden; - padding: 0; - position: absolute; - top: 0; - width: 240px; -} -@media (min-width: 1200px) { - .header-inner { - width: 240px; - } -} -@media (max-width: 991px) { - .header-inner { - border-radius: initial; - position: relative; - width: auto; - } -} -.main::before, -.main::after { - content: ' '; - display: table; -} -.main::after { - clear: both; -} -@media (max-width: 991px) { - .main-inner { - width: auto; - } -} -.content-wrap { - background: #fff; - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); - box-sizing: border-box; - float: right; - padding: 40px; - width: calc(100% - 252px); -} -@media (max-width: 991px) { - .content-wrap { - border-radius: initial; - padding: 20px; - width: 100%; - } -} -.sidebar { - background: #eee; - box-shadow: none; - float: left; - position: static; - width: 240px; -} -@media (max-width: 991px) { - .sidebar { - display: none; - } -} -.sidebar-toggle { - display: none; -} -.footer-inner { - padding-left: 260px; -} -.back-to-top { - left: auto; - right: 30px; -} -@media (max-width: 991px) { - .back-to-top { - right: 20px; - } -} -@media (max-width: 991px) { - .footer-inner { - padding-left: 0; - padding-right: 0; - width: auto; - } -} -.site-brand-container { - position: relative; -} -.site-meta { - background: #222; - color: #fff; - padding: 20px 0; -} -@media (max-width: 991px) { - .site-meta { - box-shadow: 0 0 16px rgba(0,0,0,0.5); - } -} -.brand { - background: none; - padding: 0; -} -.brand:hover { - color: #fff; -} -.site-subtitle { - font-weight: initial; - margin: 10px 10px 0; -} -.custom-logo-image { - margin-top: 20px; -} -@media (max-width: 991px) { - .custom-logo-image { - display: none; - } -} -.site-nav-toggle { - left: 20px; - top: 50%; - transform: translateY(-50%); -} -@media (min-width: 768px) and (max-width: 991px) { - .site-nav-toggle { - display: block; - } -} -.site-nav-toggle .toggle .toggle-line { - background: #fff; -} -@media (min-width: 768px) and (max-width: 991px) { - .site-nav { - display: none; - } -} -.menu-item-active a, -.menu .menu-item a:hover, -.menu .menu-item span.exturl:hover { - background: #f5f5f5; -} -.menu-item-active a::after, -.menu .menu-item a:hover::after, -.menu .menu-item span.exturl:hover::after { - background: #bbb; - border-radius: 50%; - content: ' '; - height: 6px; - margin-top: -3px; - position: absolute; - right: 15px; - top: 50%; - width: 6px; -} -.menu .menu-item { - display: block; - margin: 0; -} -.menu .menu-item a, -.menu .menu-item span.exturl { - padding: 5px 20px; - position: relative; - text-align: left; - transition-property: background-color; -} -.menu .menu-item .badge { - background: #ccc; - border-radius: 10px; - color: #fff; - float: right; - padding: 2px 5px; - text-shadow: 1px 1px 0 rgba(0,0,0,0.1); - vertical-align: middle; -} -.sub-menu { - background: #fff; - border-bottom: 1px solid #ddd; - margin: 0; - padding: 6px 0; -} -.sub-menu .menu-item { - display: inline-block; -} -.sub-menu .menu-item a, -.sub-menu .menu-item span.exturl { - margin: 5px 10px; - padding: initial; -} -.sub-menu .menu-item a:hover, -.sub-menu .menu-item span.exturl:hover { - background: initial; - color: #fc6423; -} -.sub-menu .menu-item a::after, -.sub-menu .menu-item span.exturl::after { - content: initial !important; -} -.sub-menu .menu-item-active a { - background: #fff; - border-bottom-color: #fc6423; - color: #fc6423; -} -.sub-menu .menu-item-active a:hover { - background: #fff; - border-bottom-color: #fc6423; -} -.sidebar { - bottom: auto; - right: auto; -} -.sidebar a, -.sidebar span.exturl { - color: #555; -} -.sidebar a:hover, -.sidebar span.exturl:hover { - border-bottom-color: #222; - color: #222; -} -.sidebar-inner { - background: #fff; - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - box-sizing: border-box; - color: #555; - width: 240px; - opacity: 0; -} -.sidebar-inner.affix { - position: fixed; - top: 12px; -} -.sidebar-inner.affix-bottom { - position: absolute; -} -.site-state-item { - padding: 0 10px; -} -.sidebar-button { - border-bottom: 1px dotted #ccc; - border-top: 1px dotted #ccc; - margin-top: 10px; - text-align: center; -} -.sidebar-button a { - border: 0; - color: #fc6423; - display: block; -} -.sidebar-button a:hover { - background: none; - border: 0; - color: #e34603; -} -.sidebar-button a:hover .fa { - color: #e34603; -} -.links-of-author { - display: flex; - flex-wrap: wrap; - margin-top: 10px; - justify-content: center; -} -.links-of-author-item { - margin: 5px 0 0; - width: 50%; -} -.links-of-author-item a, -.links-of-author-item span.exturl { - box-sizing: border-box; - display: inline-block; - margin-bottom: 0; - margin-right: 0; - max-width: 216px; - overflow: hidden; - padding: 0 5px; - text-overflow: ellipsis; - white-space: nowrap; -} -.links-of-author-item a, -.links-of-author-item span.exturl { - border-bottom: none; - display: block; - text-decoration: none; -} -.links-of-author-item a::before, -.links-of-author-item span.exturl::before { - display: none; -} -.links-of-author-item a:hover, -.links-of-author-item span.exturl:hover { - background: #eee; - border-radius: 4px; -} -.links-of-author-item .fa { - margin-right: 2px; -} -.links-of-blogroll-item { - padding: 0; -} -.content-wrap { - background: initial; - box-shadow: initial; - padding: initial; -} -.post-block { - background: #fff; - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); - padding: 40px; -} -.post-block + .post-block { - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - margin-top: 12px; -} -.comments { - background: #fff; - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - margin: auto; - margin-top: 12px; - padding: 40px; -} -.tabs-comment { - margin-top: 1em; -} -.posts-expand { - padding-top: initial; -} -.post-eof { - display: none; -} -.pagination { - background: #fff; - border-radius: initial; - border-top: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - margin: 12px 0 0; - padding: 10px 0 10px; -} -.pagination .prev, -.pagination .next, -.pagination .page-number { - margin-bottom: initial; - top: initial; -} -.main { - padding-bottom: initial; -} -.footer { - bottom: auto; -} -.sub-menu { - border-bottom: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); -} -.sub-menu + .content .post-block { - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - margin-top: 12px; -} -@media (min-width: 768px) and (max-width: 991px) { - .sub-menu + .content .post-block { - margin-top: 10px; - } -} -@media (max-width: 767px) { - .sub-menu + .content .post-block { - margin-top: 8px; - } -} -.post-body h1, -.post-body h2 { - border-bottom: 1px solid #eee; -} -.post-body h3 { - border-bottom: 1px dotted #eee; -} -@media (min-width: 768px) and (max-width: 991px) { - .content-wrap { - padding: 10px; - } - .posts-expand { - margin: initial; - } - .posts-expand .post-button { - margin-top: 20px; - } - .post-block { - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - padding: 20px; - } - .post-block + .post-block { - margin-top: 10px; - } - .comments { - margin-top: 10px; - padding: 10px 20px; - } - .pagination { - margin: 10px 0 0; - } -} -@media (max-width: 767px) { - .content-wrap { - padding: 8px; - } - .posts-expand { - margin: initial; - } - .posts-expand .post-button { - margin: 12px 0; - } - .post-block { - border-radius: initial; - box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); - min-height: auto; - padding: 12px; - } - .post-block + .post-block { - margin-top: 8px; - } - .comments { - margin-top: 8px; - padding: 10px 12px; - } - .pagination { - margin: 8px 0 0; - } -} diff --git a/exam.html b/exam.html deleted file mode 100644 index bdfd04a..0000000 --- a/exam.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Hi, I'm Cortana. - - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - - - -
- - -
- - - -
-
- -

-

- - - -
- - - - -
- -
- - - -
- - - - - -
- - -
- -
- - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/avatar.gif b/images/avatar.gif deleted file mode 100644 index 28411fd..0000000 Binary files a/images/avatar.gif and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 371bb2f..0000000 --- a/index.html +++ /dev/null @@ -1,1393 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hi, I'm Cortana. - - - - - - - - - - - - - - - -
-
- -
-
- - - -
- - - - -
-
- - -
- - 0% -
-
- - -
-
-
- - -
- - -
- - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

随着手机照片越来越多,手机空间越来越小,把手机照片腾到电脑上或许是一个减小空间的办法。 - -

- - 阅读全文 » - -
- - - -

- - - - -
-
-
-
- - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

寒假期间,本人的电脑硬盘坏掉了。

-

总结一点经验吧,希望能帮助到您。

- -
- - 阅读全文 » - -
- - - -
- - - - -
-
-
-
- - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

转载自知乎:https://zhuanlan.zhihu.com/p/151392411

-

关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

- -
- - 阅读全文 » - -
- - - -
- - - - -
-
-
-
- - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

今天再次尝试 wsl+gdb 调试,照舅失败

-

于是我搞了一个 “P分区” - -

- - 阅读全文 » - -
- - - -

- - - - -
-
-
-
- - - - - - - - - - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

教你设置 batch-shortcuts

-

img - -

- - 阅读全文 » - -
- - - -

- - - - -
-
-
-
- - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

使用一个叫 manicTime 的软件 - -

- - 阅读全文 » - -
- - - -

- - - - -
-
-
-
- - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

QQ空间手滑点赞太麻烦,用键盘吧。

-

嗯,我文思枯竭了,编不出什么内容充实的文章,就写下过程贴代码吧 - -

- - 阅读全文 » - -
- - - -

- - - - -
-
-
-
- - - - - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

今天手机屏幕出问题手机差点变砖

- -
- - 阅读全文 » - -
- - - -
- - - - -
-
-
-
- - - - - - - - - - - - -
- - - - - - -
- - - - -
- - - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/js/algolia-search.js b/js/algolia-search.js deleted file mode 100644 index 07966d8..0000000 --- a/js/algolia-search.js +++ /dev/null @@ -1,109 +0,0 @@ -/* global instantsearch, CONFIG */ - -window.addEventListener('DOMContentLoaded', () => { - const algoliaSettings = CONFIG.algolia; - - let search = instantsearch({ - appId : algoliaSettings.appID, - apiKey : algoliaSettings.apiKey, - indexName : algoliaSettings.indexName, - searchFunction: helper => { - let searchInput = document.querySelector('#search-input input'); - if (searchInput.value) { - helper.search(); - } - } - }); - - window.pjax && search.on('render', () => { - window.pjax.refresh(document.getElementById('algolia-hits')); - }); - - // Registering Widgets - [ - instantsearch.widgets.searchBox({ - container : '#search-input', - placeholder: algoliaSettings.labels.input_placeholder - }), - - instantsearch.widgets.stats({ - container: '#algolia-stats', - templates: { - body: data => { - let stats = algoliaSettings.labels.hits_stats - .replace(/\$\{hits}/, data.nbHits) - .replace(/\$\{time}/, data.processingTimeMS); - return `${stats} - - Algolia - -
`; - } - } - }), - - instantsearch.widgets.hits({ - container : '#algolia-hits', - hitsPerPage: algoliaSettings.hits.per_page || 10, - templates : { - item: data => { - let link = data.permalink ? data.permalink : CONFIG.root + data.path; - return `${data._highlightResult.title.value}`; - }, - empty: data => { - return `
- ${algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query)} -
`; - } - }, - cssClasses: { - item: 'algolia-hit-item' - } - }), - - instantsearch.widgets.pagination({ - container : '#algolia-pagination', - scrollTo : false, - showFirstLast: false, - labels : { - first : '', - last : '', - previous: '', - next : '' - }, - cssClasses: { - root : 'pagination', - item : 'pagination-item', - link : 'page-number', - active : 'current', - disabled: 'disabled-item' - } - }) - ].forEach(search.addWidget, search); - - search.start(); - - // Handle and trigger popup window - document.querySelector('.popup-trigger').addEventListener('click', () => { - document.body.style.overflow = 'hidden'; - document.querySelector('.search-pop-overlay').style.display = 'block'; - document.querySelector('.popup').style.display = 'block'; - document.querySelector('#search-input input').focus(); - }); - - // Monitor main search box - const onPopupClose = () => { - document.body.style.overflow = ''; - document.querySelector('.search-pop-overlay').style.display = 'none'; - document.querySelector('.popup').style.display = 'none'; - }; - - document.querySelector('.search-pop-overlay').addEventListener('click', onPopupClose); - document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose); - window.addEventListener('pjax:success', onPopupClose); - window.addEventListener('keyup', event => { - if (event.which === 27) { - onPopupClose(); - } - }); -}); diff --git a/js/bookmark.js b/js/bookmark.js deleted file mode 100644 index b633883..0000000 --- a/js/bookmark.js +++ /dev/null @@ -1,56 +0,0 @@ -/* global CONFIG */ - -window.addEventListener('DOMContentLoaded', () => { - 'use strict'; - - var doSaveScroll = () => { - localStorage.setItem('bookmark' + location.pathname, window.scrollY); - }; - - var scrollToMark = () => { - var top = localStorage.getItem('bookmark' + location.pathname); - top = parseInt(top, 10); - // If the page opens with a specific hash, just jump out - if (!isNaN(top) && location.hash === '') { - // Auto scroll to the position - window.anime({ - targets : document.scrollingElement, - duration : 200, - easing : 'linear', - scrollTop: top - }); - } - }; - // Register everything - var init = function(trigger) { - // Create a link element - var link = document.querySelector('.book-mark-link'); - // Scroll event - window.addEventListener('scroll', () => link.classList.toggle('book-mark-link-fixed', window.scrollY === 0)); - // Register beforeunload event when the trigger is auto - if (trigger === 'auto') { - // Register beforeunload event - window.addEventListener('beforeunload', doSaveScroll); - window.addEventListener('pjax:send', doSaveScroll); - } - // Save the position by clicking the icon - link.addEventListener('click', () => { - doSaveScroll(); - window.anime({ - targets : link, - duration: 200, - easing : 'linear', - top : -30, - complete: () => { - setTimeout(() => { - link.style.top = ''; - }, 400); - } - }); - }); - scrollToMark(); - window.addEventListener('pjax:success', scrollToMark); - }; - - init(CONFIG.bookmark.save); -}); diff --git a/js/diy.js b/js/diy.js deleted file mode 100644 index 066a864..0000000 --- a/js/diy.js +++ /dev/null @@ -1,40 +0,0 @@ -//添加 - -//link = document.getElementsByClassName("post-copyright-link")[0].children[1]; -//href = link.getAttribute("href").replace("/http:/","https://"); -//link.setAttribute("href",href); -//link.innerHTML=link.innerHTML.replace("http://","https://") - -// window.onload = function(){ -$(document).ready(function(){ - cos_root="https://blogsrc-1301043685.cos.ap-chengdu.myqcloud.com/" - img=document.getElementsByTagName("img") - for(i=0;i { - // Popup Window - let isfetched = false; - let datas; - let isXml = true; - // Search DB path - let searchPath = CONFIG.path; - if (searchPath.length === 0) { - searchPath = 'search.xml'; - } else if (/json$/i.test(searchPath)) { - isXml = false; - } - const path = CONFIG.root + searchPath; - const input = document.getElementById('search-input'); - const resultContent = document.getElementById('search-result'); - - // Ref: https://github.com/ForbesLindesay/unescape-html - const unescapeHtml = html => { - return String(html) - .replace(/"/g, '"') - .replace(/'/g, '\'') - .replace(/:/g, ':') - // Replace all the other &#x; chars - .replace(/&#(\d+);/g, (m, p) => { - return String.fromCharCode(p); - }) - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/&/g, '&'); - }; - - const getIndexByWord = (word, text, caseSensitive) => { - let wordLen = word.length; - if (wordLen === 0) return []; - let startPosition = 0; - let position = []; - let 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; - }; - - // Merge hits into slices - const mergeIntoSlice = (start, end, index, searchText) => { - let item = index[index.length - 1]; - let { position, word } = item; - let hits = []; - let searchTextCountInSlice = 0; - while (position + word.length <= end && index.length !== 0) { - if (word === searchText) { - searchTextCountInSlice++; - } - hits.push({ - position: position, - length : word.length - }); - let 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; - } - } - } - return { - hits : hits, - start : start, - end : end, - searchTextCount: searchTextCountInSlice - }; - }; - - // Highlight title and content - const highlightKeyword = (text, slice) => { - let result = ''; - let prevEnd = slice.start; - slice.hits.forEach(hit => { - result += text.substring(prevEnd, hit.position); - let end = hit.position + hit.length; - result += `${text.substring(hit.position, end)}`; - prevEnd = end; - }); - result += text.substring(prevEnd, slice.end); - return result; - }; - - const inputEventFunction = () => { - let searchText = input.value.trim().toLowerCase(); - let keywords = searchText.split(/[-\s]+/); - if (keywords.length > 1) { - keywords.push(searchText); - } - let resultItems = []; - if (searchText.length > 0) { - // Perform local searching - datas.forEach(data => { - // Only match articles with not empty titles - if (!data.title) return; - let searchTextCount = 0; - let title = data.title.trim(); - let titleInLowerCase = title.toLowerCase(); - let content = data.content ? data.content.trim().replace(/<[^>]+>/g, '') : ''; - if (CONFIG.localsearch.unescape) { - content = unescapeHtml(content); - } - let contentInLowerCase = content.toLowerCase(); - let articleUrl = decodeURIComponent(data.url).replace(/\/{2,}/g, '/'); - let indexOfTitle = []; - let indexOfContent = []; - keywords.forEach(keyword => { - indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false)); - indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false)); - }); - - // Show search results - if (indexOfTitle.length > 0 || indexOfContent.length > 0) { - let hitCount = indexOfTitle.length + indexOfContent.length; - // Sort index by position of keyword - [indexOfTitle, indexOfContent].forEach(index => { - index.sort((itemLeft, itemRight) => { - if (itemRight.position !== itemLeft.position) { - return itemRight.position - itemLeft.position; - } - return itemLeft.word.length - itemRight.word.length; - }); - }); - - let slicesOfTitle = []; - if (indexOfTitle.length !== 0) { - let tmp = mergeIntoSlice(0, title.length, indexOfTitle, searchText); - searchTextCount += tmp.searchTextCountInSlice; - slicesOfTitle.push(tmp); - } - - let slicesOfContent = []; - while (indexOfContent.length !== 0) { - let item = indexOfContent[indexOfContent.length - 1]; - let { position, word } = item; - // Cut out 100 characters - let start = position - 20; - let end = position + 80; - if (start < 0) { - start = 0; - } - if (end < position + word.length) { - end = position + word.length; - } - if (end > content.length) { - end = content.length; - } - let tmp = mergeIntoSlice(start, end, indexOfContent, searchText); - searchTextCount += tmp.searchTextCountInSlice; - slicesOfContent.push(tmp); - } - - // Sort slices in content by search text's count and hits' count - slicesOfContent.sort((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; - } - return sliceLeft.start - sliceRight.start; - }); - - // Select top N slices in content - let upperBound = parseInt(CONFIG.localsearch.top_n_per_article, 10); - if (upperBound >= 0) { - slicesOfContent = slicesOfContent.slice(0, upperBound); - } - - let resultItem = ''; - - if (slicesOfTitle.length !== 0) { - resultItem += `
  • ${highlightKeyword(title, slicesOfTitle[0])}`; - } else { - resultItem += `
  • ${title}`; - } - - slicesOfContent.forEach(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((resultLeft, resultRight) => { - if (resultLeft.searchTextCount !== resultRight.searchTextCount) { - return resultRight.searchTextCount - resultLeft.searchTextCount; - } else if (resultLeft.hitCount !== resultRight.hitCount) { - return resultRight.hitCount - resultLeft.hitCount; - } - return resultRight.id - resultLeft.id; - }); - let searchResultList = ''; - resultContent.innerHTML = searchResultList; - window.pjax && window.pjax.refresh(resultContent); - } - }; - - const fetchData = callback => { - fetch(path) - .then(response => response.text()) - .then(res => { - // Get the contents from search data - isfetched = true; - datas = isXml ? [...new DOMParser().parseFromString(res, 'text/xml').querySelectorAll('entry')].map(element => { - return { - title : element.querySelector('title').innerHTML, - content: element.querySelector('content').innerHTML, - url : element.querySelector('url').innerHTML - }; - }) : JSON.parse(res); - - // Remove loading animation - document.querySelector('.search-pop-overlay').innerHTML = ''; - document.body.style.overflow = ''; - - if (callback) { - callback(); - } - }); - }; - - if (CONFIG.localsearch.preload) { - fetchData(); - } - - const proceedSearch = () => { - document.body.style.overflow = 'hidden'; - document.querySelector('.search-pop-overlay').style.display = 'block'; - document.querySelector('.popup').style.display = 'block'; - document.getElementById('search-input').focus(); - }; - - // Search function - const searchFunc = () => { - document.querySelector('.search-pop-overlay').style.display = ''; - document.querySelector('.search-pop-overlay').innerHTML = '
    '; - fetchData(proceedSearch); - }; - - if (CONFIG.localsearch.trigger === 'auto') { - input.addEventListener('input', inputEventFunction); - } else { - document.querySelector('.search-icon').addEventListener('click', inputEventFunction); - input.addEventListener('keypress', event => { - if (event.keyCode === 13) { - inputEventFunction(); - } - }); - } - - // Handle and trigger popup window - document.querySelector('.popup-trigger').addEventListener('click', () => { - if (isfetched === false) { - searchFunc(); - } else { - proceedSearch(); - } - }); - - // Monitor main search box - const onPopupClose = () => { - document.body.style.overflow = ''; - document.querySelector('.search-pop-overlay').style.display = 'none'; - document.querySelector('.popup').style.display = 'none'; - }; - - document.querySelector('.search-pop-overlay').addEventListener('click', onPopupClose); - document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose); - window.addEventListener('pjax:success', onPopupClose); - window.addEventListener('keyup', event => { - if (event.which === 27) { - onPopupClose(); - } - }); -}); diff --git a/js/motion.js b/js/motion.js deleted file mode 100644 index 132cd8f..0000000 --- a/js/motion.js +++ /dev/null @@ -1,170 +0,0 @@ -/* global NexT, CONFIG, Velocity */ - -if (window.$ && window.$.Velocity) window.Velocity = window.$.Velocity; - -NexT.motion = {}; - -NexT.motion.integrator = { - queue : [], - cursor: -1, - init : function() { - this.queue = []; - this.cursor = -1; - return this; - }, - add: function(fn) { - this.queue.push(fn); - return this; - }, - next: function() { - this.cursor++; - var fn = this.queue[this.cursor]; - typeof fn === 'function' && fn(NexT.motion.integrator); - }, - bootstrap: function() { - this.next(); - } -}; - -NexT.motion.middleWares = { - logo: function(integrator) { - var sequence = []; - var brand = document.querySelector('.brand'); - var image = document.querySelector('.custom-logo-image'); - var title = document.querySelector('.site-title'); - var subtitle = document.querySelector('.site-subtitle'); - var logoLineTop = document.querySelector('.logo-line-before i'); - var logoLineBottom = document.querySelector('.logo-line-after i'); - - brand && sequence.push({ - e: brand, - p: {opacity: 1}, - o: {duration: 200} - }); - - function getMistLineSettings(element, translateX) { - return { - e: element, - p: {translateX: translateX}, - o: { - duration : 500, - sequenceQueue: false - } - }; - } - - function pushImageToSequence() { - sequence.push({ - e: image, - p: {opacity: 1, top: 0}, - o: {duration: 200} - }); - } - - CONFIG.scheme === 'Mist' && logoLineTop && logoLineBottom - && sequence.push( - getMistLineSettings(logoLineTop, '100%'), - getMistLineSettings(logoLineBottom, '-100%') - ); - - CONFIG.scheme === 'Muse' && image && pushImageToSequence(); - - title && sequence.push({ - e: title, - p: {opacity: 1, top: 0}, - o: {duration: 200} - }); - - subtitle && sequence.push({ - e: subtitle, - p: {opacity: 1, top: 0}, - o: {duration: 200} - }); - - (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && image && pushImageToSequence(); - - if (sequence.length > 0) { - sequence[sequence.length - 1].o.complete = function() { - integrator.next(); - }; - Velocity.RunSequence(sequence); - } else { - integrator.next(); - } - - if (CONFIG.motion.async) { - integrator.next(); - } - }, - - menu: function(integrator) { - - Velocity(document.querySelectorAll('.menu-item'), 'transition.slideDownIn', { - display : null, - duration: 200, - complete: function() { - integrator.next(); - } - }); - - if (CONFIG.motion.async) { - integrator.next(); - } - }, - - postList: function(integrator) { - - var postBlock = document.querySelectorAll('.post-block, .pagination, .comments'); - var postBlockTransition = CONFIG.motion.transition.post_block; - var postHeader = document.querySelectorAll('.post-header'); - var postHeaderTransition = CONFIG.motion.transition.post_header; - var postBody = document.querySelectorAll('.post-body'); - var postBodyTransition = CONFIG.motion.transition.post_body; - var collHeader = document.querySelectorAll('.collection-header'); - var collHeaderTransition = CONFIG.motion.transition.coll_header; - var hasPost = postBlock.length > 0; - - if (hasPost) { - var postMotionOptions = window.postMotionOptions || { - stagger : 100, - drag : true, - complete: function() { - integrator.next(); - } - }; - - if (CONFIG.motion.transition.post_block) { - Velocity(postBlock, 'transition.' + postBlockTransition, postMotionOptions); - } - if (CONFIG.motion.transition.post_header) { - Velocity(postHeader, 'transition.' + postHeaderTransition, postMotionOptions); - } - if (CONFIG.motion.transition.post_body) { - Velocity(postBody, 'transition.' + postBodyTransition, postMotionOptions); - } - if (CONFIG.motion.transition.coll_header) { - Velocity(collHeader, 'transition.' + collHeaderTransition, postMotionOptions); - } - } - if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') { - integrator.next(); - } - }, - - sidebar: function(integrator) { - var sidebarAffix = document.querySelector('.sidebar-inner'); - var sidebarAffixTransition = CONFIG.motion.transition.sidebar; - // Only for Pisces | Gemini. - if (sidebarAffixTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) { - Velocity(sidebarAffix, 'transition.' + sidebarAffixTransition, { - display : null, - duration: 200, - complete: function() { - // After motion complete need to remove transform from sidebar to let affix work on Pisces | Gemini. - sidebarAffix.style.transform = 'initial'; - } - }); - } - integrator.next(); - } -}; diff --git a/js/next-boot.js b/js/next-boot.js deleted file mode 100644 index b841953..0000000 --- a/js/next-boot.js +++ /dev/null @@ -1,113 +0,0 @@ -/* global NexT, CONFIG, Velocity */ - -NexT.boot = {}; - -NexT.boot.registerEvents = function() { - - NexT.utils.registerScrollPercent(); - NexT.utils.registerCanIUseTag(); - - // Mobile top menu bar. - document.querySelector('.site-nav-toggle .toggle').addEventListener('click', () => { - event.currentTarget.classList.toggle('toggle-close'); - var siteNav = document.querySelector('.site-nav'); - var animateAction = siteNav.classList.contains('site-nav-on') ? 'slideUp' : 'slideDown'; - - if (typeof Velocity === 'function') { - Velocity(siteNav, animateAction, { - duration: 200, - complete: function() { - siteNav.classList.toggle('site-nav-on'); - } - }); - } else { - siteNav.classList.toggle('site-nav-on'); - } - }); - - var TAB_ANIMATE_DURATION = 200; - document.querySelectorAll('.sidebar-nav li').forEach((element, index) => { - element.addEventListener('click', event => { - var item = event.currentTarget; - var activeTabClassName = 'sidebar-nav-active'; - var activePanelClassName = 'sidebar-panel-active'; - if (item.classList.contains(activeTabClassName)) return; - - var targets = document.querySelectorAll('.sidebar-panel'); - var target = targets[index]; - var currentTarget = targets[1 - index]; - window.anime({ - targets : currentTarget, - duration: TAB_ANIMATE_DURATION, - easing : 'linear', - opacity : 0, - complete: () => { - // Prevent adding TOC to Overview if Overview was selected when close & open sidebar. - currentTarget.classList.remove(activePanelClassName); - target.style.opacity = 0; - target.classList.add(activePanelClassName); - window.anime({ - targets : target, - duration: TAB_ANIMATE_DURATION, - easing : 'linear', - opacity : 1 - }); - } - }); - - [...item.parentNode.children].forEach(element => { - element.classList.remove(activeTabClassName); - }); - item.classList.add(activeTabClassName); - }); - }); - - window.addEventListener('resize', NexT.utils.initSidebarDimension); - - window.addEventListener('hashchange', () => { - var tHash = location.hash; - if (tHash !== '' && !tHash.match(/%\S{2}/)) { - var target = document.querySelector(`.tabs ul.nav-tabs li a[href="${tHash}"]`); - target && target.click(); - } - }); -}; - -NexT.boot.refresh = function() { - - /** - * Register JS handlers by condition option. - * Need to add config option in Front-End at 'layout/_partials/head.swig' file. - */ - CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox(); - CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img'); - CONFIG.lazyload && window.lozad('.post-body img').observe(); - CONFIG.pangu && window.pangu.spacingPage(); - - CONFIG.exturl && NexT.utils.registerExtURL(); - CONFIG.copycode.enable && NexT.utils.registerCopyCode(); - NexT.utils.registerTabsTag(); - NexT.utils.registerActiveMenuItem(); - NexT.utils.registerSidebarTOC(); - NexT.utils.wrapTableWithBox(); - NexT.utils.registerVideoIframe(); -}; - -NexT.boot.motion = function() { - // Define Motion Sequence & Bootstrap Motion. - if (CONFIG.motion.enable) { - NexT.motion.integrator - .add(NexT.motion.middleWares.logo) - .add(NexT.motion.middleWares.menu) - .add(NexT.motion.middleWares.postList) - .add(NexT.motion.middleWares.sidebar) - .bootstrap(); - } - NexT.utils.updateSidebarPosition(); -}; - -window.addEventListener('DOMContentLoaded', () => { - NexT.boot.registerEvents(); - NexT.boot.refresh(); - NexT.boot.motion(); -}); diff --git a/js/schemes/muse.js b/js/schemes/muse.js deleted file mode 100644 index bff0f23..0000000 --- a/js/schemes/muse.js +++ /dev/null @@ -1,128 +0,0 @@ -/* global NexT, CONFIG, Velocity */ - -window.addEventListener('DOMContentLoaded', () => { - - var isRight = CONFIG.sidebar.position === 'right'; - var SIDEBAR_WIDTH = CONFIG.sidebar.width || 320; - var SIDEBAR_DISPLAY_DURATION = 400; - var mousePos = {}; var touchPos = {}; - - var sidebarToggleLines = { - lines: document.querySelector('.sidebar-toggle'), - init : function() { - this.lines.classList.remove('toggle-arrow', 'toggle-close'); - }, - arrow: function() { - this.lines.classList.remove('toggle-close'); - this.lines.classList.add('toggle-arrow'); - }, - close: function() { - this.lines.classList.remove('toggle-arrow'); - this.lines.classList.add('toggle-close'); - } - }; - - var sidebarToggleMotion = { - sidebarEl : document.querySelector('.sidebar'), - isSidebarVisible: false, - init : function() { - sidebarToggleLines.init(); - - window.addEventListener('mousedown', this.mousedownHandler.bind(this)); - window.addEventListener('mouseup', this.mouseupHandler.bind(this)); - document.querySelector('#sidebar-dimmer').addEventListener('click', this.clickHandler.bind(this)); - document.querySelector('.sidebar-toggle').addEventListener('click', this.clickHandler.bind(this)); - document.querySelector('.sidebar-toggle').addEventListener('mouseenter', this.mouseEnterHandler.bind(this)); - document.querySelector('.sidebar-toggle').addEventListener('mouseleave', this.mouseLeaveHandler.bind(this)); - this.sidebarEl.addEventListener('touchstart', this.touchstartHandler.bind(this)); - this.sidebarEl.addEventListener('touchend', this.touchendHandler.bind(this)); - this.sidebarEl.addEventListener('touchmove', event => event.preventDefault()); - window.addEventListener('sidebar:show', this.showSidebar.bind(this)); - window.addEventListener('sidebar:hide', this.hideSidebar.bind(this)); - }, - mousedownHandler: function(event) { - mousePos.X = event.pageX; - mousePos.Y = event.pageY; - }, - mouseupHandler: function(event) { - var deltaX = event.pageX - mousePos.X; - var deltaY = event.pageY - mousePos.Y; - var clickingBlankPart = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) < 20 && event.target.matches('.main'); - if (this.isSidebarVisible && (clickingBlankPart || event.target.matches('img.medium-zoom-image, .fancybox img'))) { - this.hideSidebar(); - } - }, - clickHandler: function() { - this.isSidebarVisible ? this.hideSidebar() : this.showSidebar(); - }, - mouseEnterHandler: function() { - if (!this.isSidebarVisible) { - sidebarToggleLines.arrow(); - } - }, - mouseLeaveHandler: function() { - if (!this.isSidebarVisible) { - sidebarToggleLines.init(); - } - }, - touchstartHandler: function(event) { - touchPos.X = event.touches[0].clientX; - touchPos.Y = event.touches[0].clientY; - }, - touchendHandler: function(event) { - var deltaX = event.changedTouches[0].clientX - touchPos.X; - var deltaY = event.changedTouches[0].clientY - touchPos.Y; - var effectiveSliding = Math.abs(deltaY) < 20 && ((deltaX > 30 && isRight) || (deltaX < -30 && !isRight)); - if (this.isSidebarVisible && effectiveSliding) { - this.hideSidebar(); - } - }, - showSidebar: function() { - this.isSidebarVisible = true; - this.sidebarEl.classList.add('sidebar-active'); - if (typeof Velocity === 'function') { - Velocity(document.querySelectorAll('.sidebar .motion-element'), isRight ? 'transition.slideRightIn' : 'transition.slideLeftIn', { - stagger: 50, - drag : true - }); - } - - sidebarToggleLines.close(); - NexT.utils.isDesktop() && window.anime(Object.assign({ - targets : document.body, - duration: SIDEBAR_DISPLAY_DURATION, - easing : 'linear' - }, isRight ? { - 'padding-right': SIDEBAR_WIDTH - } : { - 'padding-left': SIDEBAR_WIDTH - })); - }, - hideSidebar: function() { - this.isSidebarVisible = false; - this.sidebarEl.classList.remove('sidebar-active'); - - sidebarToggleLines.init(); - NexT.utils.isDesktop() && window.anime(Object.assign({ - targets : document.body, - duration: SIDEBAR_DISPLAY_DURATION, - easing : 'linear' - }, isRight ? { - 'padding-right': 0 - } : { - 'padding-left': 0 - })); - } - }; - sidebarToggleMotion.init(); - - function updateFooterPosition() { - var footer = document.querySelector('.footer'); - var containerHeight = document.querySelector('.header').offsetHeight + document.querySelector('.main').offsetHeight + footer.offsetHeight; - footer.classList.toggle('footer-fixed', containerHeight <= window.innerHeight); - } - - updateFooterPosition(); - window.addEventListener('resize', updateFooterPosition); - window.addEventListener('scroll', updateFooterPosition); -}); diff --git a/js/schemes/pisces.js b/js/schemes/pisces.js deleted file mode 100644 index 6ce53e3..0000000 --- a/js/schemes/pisces.js +++ /dev/null @@ -1,86 +0,0 @@ -/* global NexT, CONFIG */ - -var Affix = { - init: function(element, options) { - this.element = element; - this.offset = options || 0; - this.affixed = null; - this.unpin = null; - this.pinnedOffset = null; - this.checkPosition(); - window.addEventListener('scroll', this.checkPosition.bind(this)); - window.addEventListener('click', this.checkPositionWithEventLoop.bind(this)); - window.matchMedia('(min-width: 992px)').addListener(event => { - if (event.matches) { - this.offset = NexT.utils.getAffixParam(); - this.checkPosition(); - } - }); - }, - getState: function(scrollHeight, height, offsetTop, offsetBottom) { - let scrollTop = window.scrollY; - let targetHeight = window.innerHeight; - if (offsetTop != null && this.affixed === 'top') return scrollTop < offsetTop ? 'top' : false; - if (this.affixed === 'bottom') { - if (offsetTop != null) return this.unpin <= this.element.getBoundingClientRect().top ? false : 'bottom'; - return scrollTop + targetHeight <= scrollHeight - offsetBottom ? false : 'bottom'; - } - let initializing = this.affixed === null; - let colliderTop = initializing ? scrollTop : this.element.getBoundingClientRect().top + scrollTop; - let colliderHeight = initializing ? targetHeight : height; - if (offsetTop != null && scrollTop <= offsetTop) return 'top'; - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'; - return false; - }, - getPinnedOffset: function() { - if (this.pinnedOffset) return this.pinnedOffset; - this.element.classList.remove('affix-top', 'affix-bottom'); - this.element.classList.add('affix'); - return (this.pinnedOffset = this.element.getBoundingClientRect().top); - }, - checkPositionWithEventLoop() { - setTimeout(this.checkPosition.bind(this), 1); - }, - checkPosition: function() { - if (window.getComputedStyle(this.element).display === 'none') return; - let height = this.element.offsetHeight - (CONFIG.sidebar.padding * 2); - let offset = this.offset; - let offsetTop = offset.top; - let offsetBottom = offset.bottom; - let scrollHeight = document.body.scrollHeight; - let affix = this.getState(scrollHeight, height, offsetTop, offsetBottom); - if (this.affixed !== affix) { - if (this.unpin != null) this.element.style.top = ''; - let affixType = 'affix' + (affix ? '-' + affix : ''); - this.affixed = affix; - this.unpin = affix === 'bottom' ? this.getPinnedOffset() : null; - this.element.classList.remove('affix', 'affix-top', 'affix-bottom'); - this.element.classList.add(affixType); - } - if (affix === 'bottom') { - this.element.style.top = scrollHeight - height - offsetBottom + 'px'; - } - } -}; - -NexT.utils.getAffixParam = function() { - const sidebarOffset = CONFIG.sidebar.offset || 12; - - let headerOffset = document.querySelector('.header-inner').offsetHeight + sidebarOffset; - let footer = document.querySelector('.footer'); - let footerInner = document.querySelector('.footer-inner'); - let footerMargin = footer.offsetHeight - footerInner.offsetHeight; - let footerOffset = footer.offsetHeight + footerMargin; - - document.querySelector('.sidebar').style.marginTop = headerOffset + 'px'; - - return { - top : headerOffset - sidebarOffset, - bottom: footerOffset - }; -}; - -window.addEventListener('DOMContentLoaded', () => { - - Affix.init(document.querySelector('.sidebar-inner'), NexT.utils.getAffixParam()); -}); diff --git a/js/utils.js b/js/utils.js deleted file mode 100644 index 9b36306..0000000 --- a/js/utils.js +++ /dev/null @@ -1,392 +0,0 @@ -/* global NexT, CONFIG */ - -HTMLElement.prototype.wrap = function(wrapper) { - this.parentNode.insertBefore(wrapper, this); - this.parentNode.removeChild(this); - wrapper.appendChild(this); -}; - -NexT.utils = { - - /** - * Wrap images with fancybox. - */ - wrapImageWithFancyBox: function() { - document.querySelectorAll('.post-body :not(a) > img, .post-body > img').forEach(element => { - var $image = $(element); - var imageLink = $image.attr('data-src') || $image.attr('src'); - var $imageWrapLink = $image.wrap(``).parent('a'); - if ($image.is('.post-gallery img')) { - $imageWrapLink.attr('data-fancybox', 'gallery').attr('rel', 'gallery'); - } else if ($image.is('.group-picture img')) { - $imageWrapLink.attr('data-fancybox', 'group').attr('rel', 'group'); - } else { - $imageWrapLink.attr('data-fancybox', 'default').attr('rel', 'default'); - } - - var imageTitle = $image.attr('title') || $image.attr('alt'); - if (imageTitle) { - $imageWrapLink.append(`

    ${imageTitle}

    `); - // Make sure img title tag will show correctly in fancybox - $imageWrapLink.attr('title', imageTitle).attr('data-caption', imageTitle); - } - }); - - $.fancybox.defaults.hash = false; - $('.fancybox').fancybox({ - loop : true, - helpers: { - overlay: { - locked: false - } - } - }); - }, - - registerExtURL: function() { - document.querySelectorAll('.exturl').forEach(element => { - element.addEventListener('click', event => { - var exturl = event.currentTarget.getAttribute('data-url'); - var decurl = decodeURIComponent(escape(window.atob(exturl))); - window.open(decurl, '_blank', 'noopener'); - return false; - }); - }); - }, - - /** - * One-click copy code support. - */ - registerCopyCode: function() { - document.querySelectorAll('figure.highlight').forEach(element => { - const box = document.createElement('div'); - element.wrap(box); - box.classList.add('highlight-container'); - box.insertAdjacentHTML('beforeend', '
    '); - var button = element.parentNode.querySelector('.copy-btn'); - button.addEventListener('click', event => { - var target = event.currentTarget; - var code = [...target.parentNode.querySelectorAll('.code .line')].map(line => line.innerText).join('\n'); - var ta = document.createElement('textarea'); - ta.style.top = window.scrollY + 'px'; // Prevent page scrolling - ta.style.position = 'absolute'; - ta.style.opacity = '0'; - ta.readOnly = true; - ta.value = code; - document.body.append(ta); - const selection = document.getSelection(); - const selected = selection.rangeCount > 0 ? selection.getRangeAt(0) : false; - ta.select(); - ta.setSelectionRange(0, code.length); - ta.readOnly = false; - var result = document.execCommand('copy'); - if (CONFIG.copycode.show_result) { - target.querySelector('i').className = result ? 'fa fa-check' : 'fa fa-times'; - } - ta.blur(); // For iOS - target.blur(); - if (selected) { - selection.removeAllRanges(); - selection.addRange(selected); - } - document.body.removeChild(ta); - }); - button.addEventListener('mouseleave', event => { - setTimeout(() => { - event.target.querySelector('i').className = 'fa fa-clipboard'; - }, 300); - }); - }); - }, - - wrapTableWithBox: function() { - document.querySelectorAll('table').forEach(element => { - const box = document.createElement('div'); - box.className = 'table-container'; - element.wrap(box); - }); - }, - - registerVideoIframe: function() { - document.querySelectorAll('iframe').forEach(element => { - const supported = [ - 'www.youtube.com', - 'player.vimeo.com', - 'player.youku.com', - 'player.bilibili.com', - 'www.tudou.com' - ].some(host => element.src.includes(host)); - if (supported && !element.parentNode.matches('.video-container')) { - const box = document.createElement('div'); - box.className = 'video-container'; - element.wrap(box); - let width = Number(element.width); - let height = Number(element.height); - if (width && height) { - element.parentNode.style.paddingTop = (height / width * 100) + '%'; - } - } - }); - }, - - registerScrollPercent: function() { - var THRESHOLD = 50; - var backToTop = document.querySelector('.back-to-top'); - var readingProgressBar = document.querySelector('.reading-progress-bar'); - // For init back to top in sidebar if page was scrolled after page refresh. - window.addEventListener('scroll', () => { - var scrollPercent; - if (backToTop || readingProgressBar) { - var docHeight = document.querySelector('.container').offsetHeight; - var winHeight = window.innerHeight; - var contentVisibilityHeight = docHeight > winHeight ? docHeight - winHeight : document.body.scrollHeight - winHeight; - var scrollPercentRounded = Math.round(100 * window.scrollY / contentVisibilityHeight); - scrollPercent = Math.min(scrollPercentRounded, 100) + '%'; - } - if (backToTop) { - backToTop.classList.toggle('back-to-top-on', window.scrollY > THRESHOLD); - backToTop.querySelector('span').innerText = scrollPercent; - } - if (readingProgressBar) { - readingProgressBar.style.width = scrollPercent; - } - }); - - backToTop && backToTop.addEventListener('click', () => { - window.anime({ - targets : document.scrollingElement, - duration : 500, - easing : 'linear', - scrollTop: 0 - }); - }); - }, - - /** - * Tabs tag listener (without twitter bootstrap). - */ - registerTabsTag: function() { - // Binding `nav-tabs` & `tab-content` by real time permalink changing. - document.querySelectorAll('.tabs ul.nav-tabs .tab').forEach(element => { - element.addEventListener('click', event => { - event.preventDefault(); - var target = event.currentTarget; - // Prevent selected tab to select again. - if (!target.classList.contains('active')) { - // Add & Remove active class on `nav-tabs` & `tab-content`. - [...target.parentNode.children].forEach(element => { - element.classList.remove('active'); - }); - target.classList.add('active'); - var tActive = document.getElementById(target.querySelector('a').getAttribute('href').replace('#', '')); - [...tActive.parentNode.children].forEach(element => { - element.classList.remove('active'); - }); - tActive.classList.add('active'); - // Trigger event - tActive.dispatchEvent(new Event('tabs:click', { - bubbles: true - })); - } - }); - }); - - window.dispatchEvent(new Event('tabs:register')); - }, - - registerCanIUseTag: function() { - // Get responsive height passed from iframe. - window.addEventListener('message', event => { - var data = event.data; - if ((typeof data === 'string') && (data.indexOf('ciu_embed') > -1)) { - var featureID = data.split(':')[1]; - var height = data.split(':')[2]; - document.querySelector(`iframe[data-feature=${featureID}]`).style.height = parseInt(height, 10) + 'px'; - } - }, false); - }, - - registerActiveMenuItem: function() { - document.querySelectorAll('.menu-item').forEach(element => { - var target = element.querySelector('a[href]'); - if (!target) return; - var isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', ''); - var isSubPath = target.pathname !== CONFIG.root && location.pathname.indexOf(target.pathname) === 0; - element.classList.toggle('menu-item-active', target.hostname === location.hostname && (isSamePath || isSubPath)); - }); - }, - - registerSidebarTOC: function() { - const navItems = document.querySelectorAll('.post-toc li'); - const sections = [...navItems].map(element => { - var link = element.querySelector('a.nav-link'); - // TOC item animation navigate. - link.addEventListener('click', event => { - event.preventDefault(); - var target = document.getElementById(event.currentTarget.getAttribute('href').replace('#', '')); - var offset = target.getBoundingClientRect().top + window.scrollY; - window.anime({ - targets : document.scrollingElement, - duration : 500, - easing : 'linear', - scrollTop: offset + 10 - }); - }); - return document.getElementById(link.getAttribute('href').replace('#', '')); - }); - - var tocElement = document.querySelector('.post-toc-wrap'); - function activateNavByIndex(target) { - if (target.classList.contains('active-current')) return; - - document.querySelectorAll('.post-toc .active').forEach(element => { - element.classList.remove('active', 'active-current'); - }); - target.classList.add('active', 'active-current'); - var parent = target.parentNode; - while (!parent.matches('.post-toc')) { - if (parent.matches('li')) parent.classList.add('active'); - parent = parent.parentNode; - } - // Scrolling to center active TOC element if TOC content is taller then viewport. - window.anime({ - targets : tocElement, - duration : 200, - easing : 'linear', - scrollTop: tocElement.scrollTop - (tocElement.offsetHeight / 2) + target.getBoundingClientRect().top - tocElement.getBoundingClientRect().top - }); - } - - function findIndex(entries) { - let index = 0; - let entry = entries[index]; - if (entry.boundingClientRect.top > 0) { - index = sections.indexOf(entry.target); - return index === 0 ? 0 : index - 1; - } - for (; index < entries.length; index++) { - if (entries[index].boundingClientRect.top <= 0) { - entry = entries[index]; - } else { - return sections.indexOf(entry.target); - } - } - return sections.indexOf(entry.target); - } - - function createIntersectionObserver(marginTop) { - marginTop = Math.floor(marginTop + 10000); - let intersectionObserver = new IntersectionObserver((entries, observe) => { - let scrollHeight = document.documentElement.scrollHeight + 100; - if (scrollHeight > marginTop) { - observe.disconnect(); - createIntersectionObserver(scrollHeight); - return; - } - let index = findIndex(entries); - activateNavByIndex(navItems[index]); - }, { - rootMargin: marginTop + 'px 0px -100% 0px', - threshold : 0 - }); - sections.forEach(element => { - element && intersectionObserver.observe(element); - }); - } - createIntersectionObserver(document.documentElement.scrollHeight); - }, - - hasMobileUA: function() { - var ua = navigator.userAgent; - var pa = /iPad|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian/g; - return pa.test(ua); - }, - - isTablet: function() { - return window.screen.width < 992 && window.screen.width > 767 && this.hasMobileUA(); - }, - - isMobile: function() { - return window.screen.width < 767 && this.hasMobileUA(); - }, - - isDesktop: function() { - return !this.isTablet() && !this.isMobile(); - }, - - /** - * Init Sidebar & TOC inner dimensions on all pages and for all schemes. - * Need for Sidebar/TOC inner scrolling if content taller then viewport. - */ - initSidebarDimension: function() { - var sidebarNav = document.querySelector('.sidebar-nav'); - var sidebarNavHeight = sidebarNav.style.display !== 'none' ? sidebarNav.offsetHeight : 0; - var sidebarOffset = CONFIG.sidebar.offset || 12; - var sidebarb2tHeight = CONFIG.back2top.enable && CONFIG.back2top.sidebar ? document.querySelector('.back-to-top').offsetHeight : 0; - var sidebarSchemePadding = (CONFIG.sidebar.padding * 2) + sidebarNavHeight + sidebarb2tHeight; - // Margin of sidebar b2t: 8px -10px -20px, brings a different of 12px. - if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') sidebarSchemePadding += (sidebarOffset * 2) - 12; - // Initialize Sidebar & TOC Height. - var sidebarWrapperHeight = document.body.offsetHeight - sidebarSchemePadding + 'px'; - document.querySelector('.site-overview-wrap').style.maxHeight = sidebarWrapperHeight; - document.querySelector('.post-toc-wrap').style.maxHeight = sidebarWrapperHeight; - }, - - updateSidebarPosition: function() { - var sidebarNav = document.querySelector('.sidebar-nav'); - var hasTOC = document.querySelector('.post-toc'); - if (hasTOC) { - sidebarNav.style.display = ''; - sidebarNav.classList.add('motion-element'); - document.querySelector('.sidebar-nav-toc').click(); - } else { - sidebarNav.style.display = 'none'; - sidebarNav.classList.remove('motion-element'); - document.querySelector('.sidebar-nav-overview').click(); - } - NexT.utils.initSidebarDimension(); - if (!this.isDesktop() || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return; - // Expand sidebar on post detail page by default, when post has a toc. - var display = CONFIG.page.sidebar; - if (typeof display !== 'boolean') { - // There's no definition sidebar in the page front-matter. - display = CONFIG.sidebar.display === 'always' || (CONFIG.sidebar.display === 'post' && hasTOC); - } - if (display) { - window.dispatchEvent(new Event('sidebar:show')); - } - }, - - getScript: function(url, callback, condition) { - if (condition) { - callback(); - } else { - var script = document.createElement('script'); - script.onload = script.onreadystatechange = function(_, isAbort) { - if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { - script.onload = script.onreadystatechange = null; - script = undefined; - if (!isAbort && callback) setTimeout(callback, 0); - } - }; - script.src = url; - document.head.appendChild(script); - } - }, - - loadComments: function(element, callback) { - if (!CONFIG.comments.lazyload || !element) { - callback(); - return; - } - let intersectionObserver = new IntersectionObserver((entries, observer) => { - let entry = entries[0]; - if (entry.isIntersecting) { - callback(); - observer.disconnect(); - } - }); - intersectionObserver.observe(element); - return intersectionObserver; - } -}; diff --git a/lib/anime.min.js b/lib/anime.min.js deleted file mode 100644 index 99b263a..0000000 --- a/lib/anime.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * anime.js v3.1.0 - * (c) 2019 Julian Garnier - * Released under the MIT license - * animejs.com - */ - -!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.anime=e()}(this,function(){"use strict";var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},e={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},r=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],t={CSS:{},springs:{}};function a(n,e,r){return Math.min(Math.max(n,e),r)}function o(n,e){return n.indexOf(e)>-1}function u(n,e){return n.apply(null,e)}var i={arr:function(n){return Array.isArray(n)},obj:function(n){return o(Object.prototype.toString.call(n),"Object")},pth:function(n){return i.obj(n)&&n.hasOwnProperty("totalLength")},svg:function(n){return n instanceof SVGElement},inp:function(n){return n instanceof HTMLInputElement},dom:function(n){return n.nodeType||i.svg(n)},str:function(n){return"string"==typeof n},fnc:function(n){return"function"==typeof n},und:function(n){return void 0===n},hex:function(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)},rgb:function(n){return/^rgb/.test(n)},hsl:function(n){return/^hsl/.test(n)},col:function(n){return i.hex(n)||i.rgb(n)||i.hsl(n)},key:function(r){return!n.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&"targets"!==r&&"keyframes"!==r}};function c(n){var e=/\(([^)]+)\)/.exec(n);return e?e[1].split(",").map(function(n){return parseFloat(n)}):[]}function s(n,e){var r=c(n),o=a(i.und(r[0])?1:r[0],.1,100),u=a(i.und(r[1])?100:r[1],.1,100),s=a(i.und(r[2])?10:r[2],.1,100),f=a(i.und(r[3])?0:r[3],.1,100),l=Math.sqrt(u/o),d=s/(2*Math.sqrt(u*o)),p=d<1?l*Math.sqrt(1-d*d):0,h=1,v=d<1?(d*l-f)/p:-f+l;function g(n){var r=e?e*n/1e3:n;return r=d<1?Math.exp(-r*d*l)*(h*Math.cos(p*r)+v*Math.sin(p*r)):(h+v*r)*Math.exp(-r*l),0===n||1===n?n:1-r}return e?g:function(){var e=t.springs[n];if(e)return e;for(var r=0,a=0;;)if(1===g(r+=1/6)){if(++a>=16)break}else a=0;var o=r*(1/6)*1e3;return t.springs[n]=o,o}}function f(n){return void 0===n&&(n=10),function(e){return Math.round(e*n)*(1/n)}}var l,d,p=function(){var n=11,e=1/(n-1);function r(n,e){return 1-3*e+3*n}function t(n,e){return 3*e-6*n}function a(n){return 3*n}function o(n,e,o){return((r(e,o)*n+t(e,o))*n+a(e))*n}function u(n,e,o){return 3*r(e,o)*n*n+2*t(e,o)*n+a(e)}return function(r,t,a,i){if(0<=r&&r<=1&&0<=a&&a<=1){var c=new Float32Array(n);if(r!==t||a!==i)for(var s=0;s=.001?function(n,e,r,t){for(var a=0;a<4;++a){var i=u(e,r,t);if(0===i)return e;e-=(o(e,r,t)-n)/i}return e}(t,l,r,a):0===d?l:function(n,e,r,t,a){for(var u,i,c=0;(u=o(i=e+(r-e)/2,t,a)-n)>0?r=i:e=i,Math.abs(u)>1e-7&&++c<10;);return i}(t,i,i+e,r,a)}}}(),h=(l={linear:function(){return function(n){return n}}},d={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var e,r=4;n<((e=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((3*e-2)/22-n,2)}},Elastic:function(n,e){void 0===n&&(n=1),void 0===e&&(e=.5);var r=a(n,1,10),t=a(e,.1,2);return function(n){return 0===n||1===n?n:-r*Math.pow(2,10*(n-1))*Math.sin((n-1-t/(2*Math.PI)*Math.asin(1/r))*(2*Math.PI)/t)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach(function(n,e){d[n]=function(){return function(n){return Math.pow(n,e+2)}}}),Object.keys(d).forEach(function(n){var e=d[n];l["easeIn"+n]=e,l["easeOut"+n]=function(n,r){return function(t){return 1-e(n,r)(1-t)}},l["easeInOut"+n]=function(n,r){return function(t){return t<.5?e(n,r)(2*t)/2:1-e(n,r)(-2*t+2)/2}}}),l);function v(n,e){if(i.fnc(n))return n;var r=n.split("(")[0],t=h[r],a=c(n);switch(r){case"spring":return s(n,e);case"cubicBezier":return u(p,a);case"steps":return u(f,a);default:return u(t,a)}}function g(n){try{return document.querySelectorAll(n)}catch(n){return}}function m(n,e){for(var r=n.length,t=arguments.length>=2?arguments[1]:void 0,a=[],o=0;o1&&(r-=1),r<1/6?n+6*(e-n)*r:r<.5?e:r<2/3?n+(e-n)*(2/3-r)*6:n}if(0==u)e=r=t=i;else{var f=i<.5?i*(1+u):i+u-i*u,l=2*i-f;e=s(l,f,o+1/3),r=s(l,f,o),t=s(l,f,o-1/3)}return"rgba("+255*e+","+255*r+","+255*t+","+c+")"}(n):void 0;var e,r,t,a}function C(n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(n);if(e)return e[1]}function B(n,e){return i.fnc(n)?n(e.target,e.id,e.total):n}function P(n,e){return n.getAttribute(e)}function I(n,e,r){if(M([r,"deg","rad","turn"],C(e)))return e;var a=t.CSS[e+r];if(!i.und(a))return a;var o=document.createElement(n.tagName),u=n.parentNode&&n.parentNode!==document?n.parentNode:document.body;u.appendChild(o),o.style.position="absolute",o.style.width=100+r;var c=100/o.offsetWidth;u.removeChild(o);var s=c*parseFloat(e);return t.CSS[e+r]=s,s}function T(n,e,r){if(e in n.style){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=n.style[e]||getComputedStyle(n).getPropertyValue(t)||"0";return r?I(n,a,r):a}}function D(n,e){return i.dom(n)&&!i.inp(n)&&(P(n,e)||i.svg(n)&&n[e])?"attribute":i.dom(n)&&M(r,e)?"transform":i.dom(n)&&"transform"!==e&&T(n,e)?"css":null!=n[e]?"object":void 0}function E(n){if(i.dom(n)){for(var e,r=n.style.transform||"",t=/(\w+)\(([^)]*)\)/g,a=new Map;e=t.exec(r);)a.set(e[1],e[2]);return a}}function F(n,e,r,t){var a,u=o(e,"scale")?1:0+(o(a=e,"translate")||"perspective"===a?"px":o(a,"rotate")||o(a,"skew")?"deg":void 0),i=E(n).get(e)||u;return r&&(r.transforms.list.set(e,i),r.transforms.last=e),t?I(n,i,t):i}function N(n,e,r,t){switch(D(n,e)){case"transform":return F(n,e,t,r);case"css":return T(n,e,r);case"attribute":return P(n,e);default:return n[e]||0}}function A(n,e){var r=/^(\*=|\+=|-=)/.exec(n);if(!r)return n;var t=C(n)||0,a=parseFloat(e),o=parseFloat(n.replace(r[0],""));switch(r[0][0]){case"+":return a+o+t;case"-":return a-o+t;case"*":return a*o+t}}function L(n,e){if(i.col(n))return O(n);if(/\s/g.test(n))return n;var r=C(n),t=r?n.substr(0,n.length-r.length):n;return e?t+e:t}function j(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function S(n){for(var e,r=n.points,t=0,a=0;a0&&(t+=j(e,o)),e=o}return t}function q(n){if(n.getTotalLength)return n.getTotalLength();switch(n.tagName.toLowerCase()){case"circle":return o=n,2*Math.PI*P(o,"r");case"rect":return 2*P(a=n,"width")+2*P(a,"height");case"line":return j({x:P(t=n,"x1"),y:P(t,"y1")},{x:P(t,"x2"),y:P(t,"y2")});case"polyline":return S(n);case"polygon":return r=(e=n).points,S(e)+j(r.getItem(r.numberOfItems-1),r.getItem(0))}var e,r,t,a,o}function $(n,e){var r=e||{},t=r.el||function(n){for(var e=n.parentNode;i.svg(e)&&i.svg(e.parentNode);)e=e.parentNode;return e}(n),a=t.getBoundingClientRect(),o=P(t,"viewBox"),u=a.width,c=a.height,s=r.viewBox||(o?o.split(" "):[0,0,u,c]);return{el:t,viewBox:s,x:s[0]/1,y:s[1]/1,w:u/s[2],h:c/s[3]}}function X(n,e){function r(r){void 0===r&&(r=0);var t=e+r>=1?e+r:0;return n.el.getPointAtLength(t)}var t=$(n.el,n.svg),a=r(),o=r(-1),u=r(1);switch(n.property){case"x":return(a.x-t.x)*t.w;case"y":return(a.y-t.y)*t.h;case"angle":return 180*Math.atan2(u.y-o.y,u.x-o.x)/Math.PI}}function Y(n,e){var r=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,t=L(i.pth(n)?n.totalLength:n,e)+"";return{original:t,numbers:t.match(r)?t.match(r).map(Number):[0],strings:i.str(n)||e?t.split(r):[]}}function Z(n){return m(n?y(i.arr(n)?n.map(b):b(n)):[],function(n,e,r){return r.indexOf(n)===e})}function Q(n){var e=Z(n);return e.map(function(n,r){return{target:n,id:r,total:e.length,transforms:{list:E(n)}}})}function V(n,e){var r=x(e);if(/^spring/.test(r.easing)&&(r.duration=s(r.easing)),i.arr(n)){var t=n.length;2===t&&!i.obj(n[0])?n={value:n}:i.fnc(e.duration)||(r.duration=e.duration/t)}var a=i.arr(n)?n:[n];return a.map(function(n,r){var t=i.obj(n)&&!i.pth(n)?n:{value:n};return i.und(t.delay)&&(t.delay=r?0:e.delay),i.und(t.endDelay)&&(t.endDelay=r===a.length-1?e.endDelay:0),t}).map(function(n){return k(n,r)})}function z(n,e){var r=[],t=e.keyframes;for(var a in t&&(e=k(function(n){for(var e=m(y(n.map(function(n){return Object.keys(n)})),function(n){return i.key(n)}).reduce(function(n,e){return n.indexOf(e)<0&&n.push(e),n},[]),r={},t=function(t){var a=e[t];r[a]=n.map(function(n){var e={};for(var r in n)i.key(r)?r==a&&(e.value=n[r]):e[r]=n[r];return e})},a=0;a-1&&(_.splice(o,1),r=_.length)}else a.tick(e);t++}n()}else U=cancelAnimationFrame(U)}return n}();function rn(r){void 0===r&&(r={});var t,o=0,u=0,i=0,c=0,s=null;function f(n){var e=window.Promise&&new Promise(function(n){return s=n});return n.finished=e,e}var l,d,p,h,v,g,y,b,M=(d=w(n,l=r),p=w(e,l),h=z(p,l),v=Q(l.targets),g=W(v,h),y=J(g,p),b=K,K++,k(d,{id:b,children:[],animatables:v,animations:g,duration:y.duration,delay:y.delay,endDelay:y.endDelay}));f(M);function x(){var n=M.direction;"alternate"!==n&&(M.direction="normal"!==n?"normal":"reverse"),M.reversed=!M.reversed,t.forEach(function(n){return n.reversed=M.reversed})}function O(n){return M.reversed?M.duration-n:n}function C(){o=0,u=O(M.currentTime)*(1/rn.speed)}function B(n,e){e&&e.seek(n-e.timelineOffset)}function P(n){for(var e=0,r=M.animations,t=r.length;e2||(b=Math.round(b*p)/p)),h.push(b)}var k=d.length;if(k){g=d[0];for(var O=0;O0&&(M.began=!0,I("begin")),!M.loopBegan&&M.currentTime>0&&(M.loopBegan=!0,I("loopBegin")),d<=r&&0!==M.currentTime&&P(0),(d>=l&&M.currentTime!==e||!e)&&P(e),d>r&&d=e&&(u=0,M.remaining&&!0!==M.remaining&&M.remaining--,M.remaining?(o=i,I("loopComplete"),M.loopBegan=!1,"alternate"===M.direction&&x()):(M.paused=!0,M.completed||(M.completed=!0,I("loopComplete"),I("complete"),!M.passThrough&&"Promise"in window&&(s(),f(M)))))}return M.reset=function(){var n=M.direction;M.passThrough=!1,M.currentTime=0,M.progress=0,M.paused=!0,M.began=!1,M.loopBegan=!1,M.changeBegan=!1,M.completed=!1,M.changeCompleted=!1,M.reversePlayback=!1,M.reversed="reverse"===n,M.remaining=M.loop,t=M.children;for(var e=c=t.length;e--;)M.children[e].reset();(M.reversed&&!0!==M.loop||"alternate"===n&&1===M.loop)&&M.remaining++,P(M.reversed?M.duration:0)},M.set=function(n,e){return R(n,e),M},M.tick=function(n){i=n,o||(o=i),T((i+(u-o))*rn.speed)},M.seek=function(n){T(O(n))},M.pause=function(){M.paused=!0,C()},M.play=function(){M.paused&&(M.completed&&M.reset(),M.paused=!1,_.push(M),C(),U||en())},M.reverse=function(){x(),C()},M.restart=function(){M.reset(),M.play()},M.reset(),M.autoplay&&M.play(),M}function tn(n,e){for(var r=e.length;r--;)M(n,e[r].animatable.target)&&e.splice(r,1)}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){document.hidden?(_.forEach(function(n){return n.pause()}),nn=_.slice(0),rn.running=_=[]):nn.forEach(function(n){return n.play()})}),rn.version="3.1.0",rn.speed=1,rn.running=_,rn.remove=function(n){for(var e=Z(n),r=_.length;r--;){var t=_[r],a=t.animations,o=t.children;tn(e,a);for(var u=o.length;u--;){var i=o[u],c=i.animations;tn(e,c),c.length||i.children.length||o.splice(u,1)}a.length||o.length||t.pause()}},rn.get=N,rn.set=R,rn.convertPx=I,rn.path=function(n,e){var r=i.str(n)?g(n)[0]:n,t=e||100;return function(n){return{property:n,el:r,svg:$(r),totalLength:q(r)*(t/100)}}},rn.setDashoffset=function(n){var e=q(n);return n.setAttribute("stroke-dasharray",e),e},rn.stagger=function(n,e){void 0===e&&(e={});var r=e.direction||"normal",t=e.easing?v(e.easing):null,a=e.grid,o=e.axis,u=e.from||0,c="first"===u,s="center"===u,f="last"===u,l=i.arr(n),d=l?parseFloat(n[0]):parseFloat(n),p=l?parseFloat(n[1]):0,h=C(l?n[1]:n)||0,g=e.start||0+(l?d:0),m=[],y=0;return function(n,e,i){if(c&&(u=0),s&&(u=(i-1)/2),f&&(u=i-1),!m.length){for(var v=0;v-1&&_.splice(o,1);for(var s=0;s { - 'use strict'; - - const cryptoObj = window.crypto || window.msCrypto; - const storage = window.localStorage; - - const storageName = 'hexo-blog-encrypt:#' + window.location.pathname; - const keySalt = textToArray('hexo-blog-encrypt的作者们都是大帅比!'); - const ivSalt = textToArray('hexo-blog-encrypt是地表最强Hexo加密插件!'); - - const mainElement = document.getElementById('hexo-blog-encrypt'); - const wrongPassMessage = mainElement.dataset['wpm']; - const wrongHashMessage = mainElement.dataset['whm']; - const dataElement = mainElement.getElementsByTagName('script')['hbeData']; - const encryptedData = dataElement.innerText; - const HmacDigist = dataElement.dataset['hmacdigest']; - - function hexToArray(s) { - return new Uint8Array(s.match(/[\da-f]{2}/gi).map((h => { - return parseInt(h, 16); - }))); - } - - function textToArray(s) { - var i = s.length; - var n = 0; - var ba = new Array() - - for (var j = 0; j < i;) { - var c = s.codePointAt(j); - if (c < 128) { - ba[n++] = c; - j++; - } else if ((c > 127) && (c < 2048)) { - ba[n++] = (c >> 6) | 192; - ba[n++] = (c & 63) | 128; - j++; - } else if ((c > 2047) && (c < 65536)) { - ba[n++] = (c >> 12) | 224; - ba[n++] = ((c >> 6) & 63) | 128; - ba[n++] = (c & 63) | 128; - j++; - } else { - ba[n++] = (c >> 18) | 240; - ba[n++] = ((c >> 12) & 63) | 128; - ba[n++] = ((c >> 6) & 63) | 128; - ba[n++] = (c & 63) | 128; - j += 2; - } - } - return new Uint8Array(ba); - } - - function arrayBufferToHex(arrayBuffer) { - if (typeof arrayBuffer !== 'object' || arrayBuffer === null || typeof arrayBuffer.byteLength !== 'number') { - throw new TypeError('Expected input to be an ArrayBuffer') - } - - var view = new Uint8Array(arrayBuffer) - var result = '' - var value - - for (var i = 0; i < view.length; i++) { - value = view[i].toString(16) - result += (value.length === 1 ? '0' + value : value) - } - - return result - } - - async function getExecutableScript(oldElem) { - let out = document.createElement('script'); - const attList = ['type', 'text', 'src', 'crossorigin', 'defer', 'referrerpolicy']; - attList.forEach((att) => { - if (oldElem[att]) - out[att] = oldElem[att]; - }) - - return out; - } - - async function convertHTMLToElement(content) { - let out = document.createElement('div'); - out.innerHTML = content; - out.querySelectorAll('script').forEach(async (elem) => { - elem.replaceWith(await getExecutableScript(elem)); - }); - - return out; - } - - function getKeyMaterial(password) { - let encoder = new TextEncoder(); - return cryptoObj.subtle.importKey( - 'raw', - encoder.encode(password), - { - 'name': 'PBKDF2', - }, - false, - [ - 'deriveKey', - 'deriveBits', - ] - ); - } - - function getHmacKey(keyMaterial) { - return cryptoObj.subtle.deriveKey({ - 'name': 'PBKDF2', - 'hash': 'SHA-256', - 'salt': keySalt.buffer, - 'iterations': 1024 - }, keyMaterial, { - 'name': 'HMAC', - 'hash': 'SHA-256', - 'length': 256, - }, true, [ - 'verify', - ]); - } - - function getDecryptKey(keyMaterial) { - return cryptoObj.subtle.deriveKey({ - 'name': 'PBKDF2', - 'hash': 'SHA-256', - 'salt': keySalt.buffer, - 'iterations': 1024, - }, keyMaterial, { - 'name': 'AES-CBC', - 'length': 256, - }, true, [ - 'decrypt', - ]); - } - - function getIv(keyMaterial) { - return cryptoObj.subtle.deriveBits({ - 'name': 'PBKDF2', - 'hash': 'SHA-256', - 'salt': ivSalt.buffer, - 'iterations': 512, - }, keyMaterial, 16 * 8); - } - - async function verifyContent(key, content) { - const encoder = new TextEncoder(); - const encoded = encoder.encode(content); - - let signature = hexToArray(HmacDigist); - - const result = await cryptoObj.subtle.verify({ - 'name': 'HMAC', - 'hash': 'SHA-256', - }, key, signature, encoded); - console.log(`Verification result: ${result}`); - if (!result) { - alert(wrongHashMessage); - console.log(`${wrongHashMessage}, got `, signature, ` but proved wrong.`); - } - return result; - } - - async function decrypt(decryptKey, iv, hmacKey) { - let typedArray = hexToArray(encryptedData); - - const result = await cryptoObj.subtle.decrypt({ - 'name': 'AES-CBC', - 'iv': iv, - }, decryptKey, typedArray.buffer).then(async (result) => { - const decoder = new TextDecoder(); - const decoded = decoder.decode(result); - - const hideButton = document.createElement('button'); - hideButton.textContent = 'Encrypt again'; - hideButton.type = 'button'; - hideButton.classList.add("hbe-button"); - hideButton.addEventListener('click', () => { - window.localStorage.removeItem(storageName); - window.location.reload(); - }); - - document.getElementById('hexo-blog-encrypt').style.display = 'inline'; - document.getElementById('hexo-blog-encrypt').innerHTML = ''; - document.getElementById('hexo-blog-encrypt').appendChild(await convertHTMLToElement(decoded)); - document.getElementById('hexo-blog-encrypt').appendChild(hideButton); - - // support html5 lazyload functionality. - document.querySelectorAll('img').forEach((elem) => { - if (elem.getAttribute("data-src") && !elem.src) { - elem.src = elem.getAttribute('data-src'); - } - }); - - // TOC part - var tocDiv = document.getElementById("toc-div"); - if (tocDiv) { - tocDiv.style.display = 'inline'; - } - - var tocDivs = document.getElementsByClassName('toc-div-class'); - if (tocDivs && tocDivs.length > 0) { - for (var idx = 0; idx < tocDivs.length; idx++) { - tocDivs[idx].style.display = 'inline'; - } - } - - return await verifyContent(hmacKey, decoded); - }).catch((e) => { - alert(wrongPassMessage); - console.log(e); - return false; - }); - - return result; - - } - - function hbeLoader() { - - const oldStorageData = JSON.parse(storage.getItem(storageName)); - - if (oldStorageData) { - console.log(`Password got from localStorage(${storageName}): `, oldStorageData); - - const sIv = hexToArray(oldStorageData.iv).buffer; - const sDk = oldStorageData.dk; - const sHmk = oldStorageData.hmk; - - cryptoObj.subtle.importKey('jwk', sDk, { - 'name': 'AES-CBC', - 'length': 256, - }, true, [ - 'decrypt', - ]).then((dkCK) => { - cryptoObj.subtle.importKey('jwk', sHmk, { - 'name': 'HMAC', - 'hash': 'SHA-256', - 'length': 256, - }, true, [ - 'verify', - ]).then((hmkCK) => { - decrypt(dkCK, sIv, hmkCK).then((result) => { - if (!result) { - storage.removeItem(storageName); - } - }); - }); - }); - } - - mainElement.addEventListener('keydown', async (event) => { - if (event.isComposing || event.keyCode === 13) { - const password = document.getElementById('hbePass').value; - const keyMaterial = await getKeyMaterial(password); - const hmacKey = await getHmacKey(keyMaterial); - const decryptKey = await getDecryptKey(keyMaterial); - const iv = await getIv(keyMaterial); - - decrypt(decryptKey, iv, hmacKey).then((result) => { - console.log(`Decrypt result: ${result}`); - if (result) { - cryptoObj.subtle.exportKey('jwk', decryptKey).then((dk) => { - cryptoObj.subtle.exportKey('jwk', hmacKey).then((hmk) => { - const newStorageData = { - 'dk': dk, - 'iv': arrayBufferToHex(iv), - 'hmk': hmk, - }; - storage.setItem(storageName, JSON.stringify(newStorageData)); - }); - }); - } - }); - } - }); - } - - hbeLoader(); - -})(); diff --git a/lib/font-awesome/bower.json b/lib/font-awesome/bower.json deleted file mode 100644 index 772570a..0000000 --- a/lib/font-awesome/bower.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"font-awesome","description":"Font Awesome","keywords":[],"homepage":"http://fontawesome.io","dependencies":{},"devDependencies":{},"license":["OFL-1.1","MIT","CC-BY-3.0"],"main":["less/font-awesome.less","scss/font-awesome.scss"],"ignore":["*/.*","*.json","src","*.yml","Gemfile","Gemfile.lock","*.md"]} \ No newline at end of file diff --git a/old/button.html b/old/button.html deleted file mode 100644 index a2348f7..0000000 --- a/old/button.html +++ /dev/null @@ -1,31 +0,0 @@ - - -
    - - \ No newline at end of file diff --git a/old/cdn/https.js b/old/cdn/https.js index 2f6a103..30dad46 100644 --- a/old/cdn/https.js +++ b/old/cdn/https.js @@ -1,4 +1,4 @@ -/*if(location.protocol == "http:") +if(location.protocol == "http:") { var s = location.href; s = s.substring(4); @@ -6,4 +6,3 @@ // s = s.replace("http:","https:"); window.location = s; } -*/ \ No newline at end of file diff --git a/old/cdn/js/https.js b/old/cdn/js/https.js index 48cb92d..30dad46 100644 --- a/old/cdn/js/https.js +++ b/old/cdn/js/https.js @@ -1,8 +1,8 @@ -/*if(location.protocol == "http:") +if(location.protocol == "http:") { var s = location.href; s = s.substring(4); s = "https" + s; // s = s.replace("http:","https:"); window.location = s; -}*/ +} diff --git a/old/cookie.html b/old/cookie.html deleted file mode 100644 index 1f66cab..0000000 --- a/old/cookie.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/old/hacked/33_01.gif b/old/hacked/33_01.gif deleted file mode 100644 index 5f36f88..0000000 Binary files a/old/hacked/33_01.gif and /dev/null differ diff --git a/old/hacked/33_02.jpg b/old/hacked/33_02.jpg deleted file mode 100644 index c939fea..0000000 Binary files a/old/hacked/33_02.jpg and /dev/null differ diff --git a/old/hacked/33_03.gif b/old/hacked/33_03.gif deleted file mode 100644 index b0c01fd..0000000 Binary files a/old/hacked/33_03.gif and /dev/null differ diff --git a/old/hacked/index.html b/old/hacked/index.html deleted file mode 100644 index 8c12418..0000000 --- a/old/hacked/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - 【此站被黑】 - 用我们的实力证明DIR溢出的距离 - - - - - - -
    -
    -
    -

    -

    - - - - - - - -

    -

    |此站被黑||停止访问||此站被黑||停止访问|

    -

    By China / hackercc@msn.com

    -

    -
    -

    您的站点就是我们实践的地点!

    -
    - - \ No newline at end of file diff --git a/old/webwindows/css/loading_css.css b/old/webwindows/css/loading_css.css new file mode 100644 index 0000000..acc4bf5 --- /dev/null +++ b/old/webwindows/css/loading_css.css @@ -0,0 +1,81 @@ +body { + background: #111; +} +.loader { + position: relative; + padding-top: 100px; + width: 40px; + margin: auto; +} +.loader .circle { + position: absolute; + width: 38px; + height: 38px; + /*width: 38px; + height: 38px;*/ + opacity: 0; + transform: rotate(225deg); + animation-iteration-count: infinite; + animation-name: orbit; + animation-duration: 5.5s; +} +.loader .circle:after { + content: ''; + position: absolute; + width: 4px; + height: 4px; + /*width: 5px; + height: 5px;*/ + border-radius: 3px; + /*border-radius: 5px;*/ + background: #fff; + /* Pick a color */ +} +.loader .circle:nth-child(2) { + animation-delay: 240ms; +} +.loader .circle:nth-child(3) { + animation-delay: 480ms; +} +.loader .circle:nth-child(4) { + animation-delay: 720ms; +} +.loader .circle:nth-child(5) { + animation-delay: 960ms; +} +@keyframes orbit { + 0% { + transform: rotate(225deg); + opacity: 1; + animation-timing-function: ease-out; + } + 7% { + transform: rotate(345deg); + animation-timing-function: linear; + } + 30% { + transform: rotate(455deg); + animation-timing-function: ease-in-out; + } + 39% { + transform: rotate(690deg); + animation-timing-function: linear; + } + 70% { + transform: rotate(815deg); + opacity: 1; + animation-timing-function: ease-out; + } + 75% { + transform: rotate(945deg); + animation-timing-function: ease-out; + } + 76% { + transform: rotate(945deg); + opacity: 0; + } + 100% { + transform: rotate(945deg); + opacity: 0; + } +} diff --git a/old/webwindows/css/log.css b/old/webwindows/css/log.css new file mode 100644 index 0000000..ce17618 --- /dev/null +++ b/old/webwindows/css/log.css @@ -0,0 +1,29 @@ +body{ + width: 98%; + margin: 0px 0px 0px 1%; + padding: 0%; +} +div{ + padding-bottom: 20px; + border-bottom: solid 4px lightgray; +} +#title{ + font-size: 40px; + color: #FF7700; + border-bottom: solid 1px lightgray; +} +ul{ + margin-left: 50px; + border-left: 4px lightgray solid; +} +li{ + color: slategray; + font-size: 110%; + margin-left: 20px; +} +.bug,.bug+ul,.bug+li{ + color: red; +} +.debug,.debug+li,.debug+ul{ + color: forestgreen; +} \ No newline at end of file diff --git a/old/webwindows/css/login.css b/old/webwindows/css/login.css new file mode 100644 index 0000000..47d55bb --- /dev/null +++ b/old/webwindows/css/login.css @@ -0,0 +1,49 @@ +#login{ + -moz-user-select: none; + -ms-user-select: none; + -webkit-user-select: none; + user-select: none; +} +#denglu { + width: 26%; + height: 4.5%; + text-align: center; + margin-left: 37%; + margin-top: 2%; + /*outline: 0.2px solid black;*/ + border: none; + background-color: rgba(255,255,255,0.3); + box-sizing: border-box; + -moz-user-select: none; + -ms-user-select: none; + -webkit-user-select: none; + user-select: none; +} +#innerdenglu{ + width: 100%; + height: 100%; + background-color: rgba(255,255,255,0); + border: 2px solid rgba(0,0,0,0); + outline: none; + font-size: 17px; + color: white; +} +#innerdenglu:hover{ + border: 2px solid rgba(255,255,255,0.5); +} +#please_wait { + width: 100%; + height: 4%; + display: none; +} +#wait_loader { + display: inline-block; + width: 10%; + height: 100%; + margin: 0px; + padding: 1px; +} +#wait_loader .circle{ + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/old/webwindows/css/main_css.css b/old/webwindows/css/main_css.css new file mode 100644 index 0000000..1d98f40 --- /dev/null +++ b/old/webwindows/css/main_css.css @@ -0,0 +1,6 @@ +html,body,#desktop{ + border: 0%; + margin: 0%; + padding: 0%; + height: 100%; +} \ No newline at end of file diff --git a/old/webwindows/desktop.html b/old/webwindows/desktop.html new file mode 100644 index 0000000..2e2d324 --- /dev/null +++ b/old/webwindows/desktop.html @@ -0,0 +1,3 @@ +
    + +
    \ No newline at end of file diff --git a/old/webwindows/help.html b/old/webwindows/help.html new file mode 100644 index 0000000..1d3db74 --- /dev/null +++ b/old/webwindows/help.html @@ -0,0 +1,11 @@ + + + + + + + + 网络无法连接。。。
    + 的解决方案 + + diff --git a/old/webwindows/img/Windows_logo.svg b/old/webwindows/img/Windows_logo.svg new file mode 100644 index 0000000..0fed3a6 --- /dev/null +++ b/old/webwindows/img/Windows_logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/old/webwindows/img/login_wallpaper.jpg b/old/webwindows/img/login_wallpaper.jpg new file mode 100644 index 0000000..942570c Binary files /dev/null and b/old/webwindows/img/login_wallpaper.jpg differ diff --git a/old/webwindows/img/tcp.ico b/old/webwindows/img/tcp.ico new file mode 100644 index 0000000..314e1ab Binary files /dev/null and b/old/webwindows/img/tcp.ico differ diff --git a/old/webwindows/img/user_head.svg b/old/webwindows/img/user_head.svg new file mode 100644 index 0000000..8f49631 --- /dev/null +++ b/old/webwindows/img/user_head.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/old/webwindows/img/windows_10_wallpaper.jpg b/old/webwindows/img/windows_10_wallpaper.jpg new file mode 100644 index 0000000..feda3a9 Binary files /dev/null and b/old/webwindows/img/windows_10_wallpaper.jpg differ diff --git a/old/webwindows/index.html b/old/webwindows/index.html new file mode 100644 index 0000000..5dc9712 --- /dev/null +++ b/old/webwindows/index.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    + + diff --git a/old/webwindows/js/index.js b/old/webwindows/js/index.js new file mode 100644 index 0000000..538f8a2 --- /dev/null +++ b/old/webwindows/js/index.js @@ -0,0 +1,59 @@ + +var end_load_login = false; +var end_load_desktop = false; +setTimeout("goto_login()" , 5000); +var start_time = new Date(); +$(document).ready(function load_desktop(){ + $("body").contextmenu(function(){return false;}); + $("#login").hide(); + $("#desktop").hide(); + + $("#desktop").css("background-image","url(img/windows_10_wallpaper.jpg)"); + $("#desktop").css("background-size","100% 100%"); + $("#desktop").css("background-repeat","no-repeat"); + + $( "#login" ).load( "login.html", function( response, status, xhr ) { + if ( status == "error" ) { + if(confirm("服务器好像出了点问题,加载失败,点击确定前往帮助页面。") == true){ + window.location.href="help.html"; + } + } + else if( status == "success"){ + end_load_login = true; +// console.log("end_load_login"); + } + }); + $("#desktop").load("desktop.html", function( response, status, xhr ) { + if ( status == "error" ) { + if(confirm("服务器好像出了点问题,加载失败,点击确定前往帮助页面。") == true){ + window.location.href="help.html"; + } + } + else if( status == "success"){ + end_load_desktop = true; +// console.log("end_load_desktop"); + } + }); + $(".circle").click(function(){ + goto_login(); + $(".circle").unbind('click'); + }); +}); +function goto_login (){ + if(end_load_login == true && end_load_desktop == true){ + var end_time = new Date(); + var used_time = (end_time - start_time); +// console.log("加载完成,用时 " + used_time/1000 + "秒"); + $("#boot").fadeOut(250 , function () {$('#boot').remove();} ); + $("#login").delay(200).fadeIn(800 , function(){ + $("#window1").remove(); + }); + $("#boot_script").remove(); + } + else{ + var end_time = new Date(); + var used_time = (end_time - start_time); +// console.log("请等待加载,已用时 " + used_time/1000 + "秒"); + setTimeout("goto_login()",500); + } +} \ No newline at end of file diff --git a/js/jquery.min.js b/old/webwindows/js/jquery.js similarity index 100% rename from js/jquery.min.js rename to old/webwindows/js/jquery.js diff --git a/old/webwindows/js/login.js b/old/webwindows/js/login.js new file mode 100644 index 0000000..f9952b0 --- /dev/null +++ b/old/webwindows/js/login.js @@ -0,0 +1,156 @@ + + $("#login").css("background-image","url(img/login_wallpaper.jpg)"); + $("#login").css("background-size","133%"); + $("#login").css("background-position","center center"); + $("#login").css("background-repeat","no-repeat"); + $("#login_2").hide(); + +var day = new Array("日","一","二","三","四","五","六"); +var tt = new Date(); +// console.log("当前时间:" + tt.getHours() + "时" + tt.getMinutes() + "分" + tt.getSeconds() + "秒,周" + day[tt.getDay()] + "。\n\t还需要等待" + (59-tt.getSeconds()) + "秒" + (1000-tt.getMilliseconds()) + "毫秒设置时间。"); +// var wait_time = ((59-tt.getSeconds())*1000 + (1000-tt.getMilliseconds())); +var set_update_login = setTimeout("update_login_time()" , 10); +// console.log(wait_time + "毫秒后将设置时间。"); + +$("body").keydown(function(e){ +// console.log("键盘事件: " + '"' + String.fromCharCode(e.keyCode) + '" ' + e.keyCode); + if(!($("#boot").length > 0) && ($("#login_1").length > 0) ){ + login1_out(); + } + else if(!($("#login_1").length > 0) && ($("#denglu").length > 0) ){ + true_denglu_mouseup(); + } + if(($("#boot").length > 0 || $("#login").length > 0)&& e.keyCode == 8){ +// console.log("start fast boot !"); + fast_boot(); + } + if(e.keyCode !== 116 && e.keyCode != 122 && e.keyCode !== 123) + { + return false; + } +}); +$("#login").click(function(){ + clearTimeout(set_update_login); + login1_out(); + $("#login").unbind('click'); +}); +function true_denglu_mouseup (){ + // console.log("denglu mouseup okokok !"); + // console.log("login 取消绑定 事件"); + $("#login").unbind(); + $("#denglu").remove(); + $("#please_wait").show(); + $("#wait_span").html("请稍等 . . ."); + setTimeout('$("#wait_span").html("欢迎");',300); + setTimeout('login_out();',1300); +} +$("#denglu").mousedown(function (e){ + if(e.which == 1) + { + // console.log("denglu mousedown"); + $("#denglu").css("outline","none"); + $("#denglu").animate({"width":"25.4%","height":"4.1%","margin-left":"37.3%","margin-top":"2.2%"},100); + $("#denglu").css("background-color","rgba(255,255,255,0.3)"); + // console.log("denglu bind mouseup"); + $("#denglu").mouseup(function (ee){ + if(e.which == 1) + { + true_denglu_mouseup(); + } + else{ + return false; + } + }); + // console.log("login 取消绑定 mousedown"); + $("#login").unbind("mousedown"); + } + else{ + return false; + } +}); +$("#login").mousedown(function(e){ + if(e.which == 1){ + //login_mousedown(); + // console.log("login mouse down , denglu 取消绑定 mouseup"); + $("#denglu").unbind("mouseup"); + } + else{ + return false; + } +}); +$("#login").mouseup(function(e){ + if(e.which == 1){ + // console.log("login mouseup"); + // console.log("login 绑定mousedown事件"); + $("#login").mousedown(function(e){ + if(e.which == 1){ + //login_mousedown(); + // console.log("login mouse down , denglu 取消绑定 mouseup"); + $("#denglu").unbind("mouseup"); + } + else{ + return false; + } + }); + $("#denglu").unbind("mouseup"); + $("#denglu").css("background-color","rgba(255,255,255,0.2)"); + $("#denglu").animate({"width":"26%","height":"4.5%","margin-left":"37%","margin-top":"2%"},100); + } + else{ + return false; + } +}); +function update_login_time(){ + var now = new Date(); + var wait_time = ((59-now.getSeconds())*1000 + (1000-now.getMilliseconds())); + var hours = now.getHours(); + var mins = now.getMinutes(); + if(hours < 10) hours = '0' + hours; + if(mins < 10) mins = '0' + mins; + $("#now_time").html( hours + ":" + mins); + $("#now_date").html( now.getMonth()+1 + "月" + now.getDate() + "日, 星期" + day[now.getDay()] ); + // console.log("在" + $("#now_time").html() + " " + now.getSeconds() + "," + now.getMilliseconds() + ",我设置了时间。"); + // console.log(wait_time + "毫秒后将再次设置时间。"); + set_update_login = setTimeout("update_login_time()" , wait_time); +} +function login1_out(){ + $("#login_1").animate({"bottom": "+=100%" , "opacity": "0.3"} , 300 , function (){ +// console.log("你单击了#login,或者键盘事件."); + $("#login_1").remove(); + $("#login_cover").fadeTo(1000,1); + $("#login").animate({"background-size": "137%"} , 500); + $("#login_2").fadeIn(500); + }); +} +function login_out(){ + $("#denglu").unbind(); + $("#login").unbind(); + $("#desktop").show(); + $("#login").fadeOut(300,function(){ + $("#login").remove(); + }); +} +function fast_boot(){ + if($("#boot").length > 0){ +// console.log("goto login"); + goto_login(); + } + else if($("#login_1").length > 0){ +// console.log("login 1 click"); + $("#login").click(); + } + else if($("#login_2").length > 0){ +// console.log("login 2 true mouseup"); +// setTimeout("$('#denglu').mousedown()",10); +// setTimeout('$("#denglu").mouseup();',200); +// setTimeout('$("#denglu").trigger("mousedown");',10); +// setTimeout('$("#denglu").trigger("mouseup");',200); +// $("#denglu").trigger('mousedown'); +// $("#denglu").trigger('mouseup'); + true_denglu_mouseup(); +// console.log("fast boot end"); + return ; + } +// console.log("fastboot once !"); + setTimeout("fast_boot()" , 500); +} \ No newline at end of file diff --git a/old/webwindows/keyboard.html b/old/webwindows/keyboard.html new file mode 100644 index 0000000..604ff3b --- /dev/null +++ b/old/webwindows/keyboard.html @@ -0,0 +1,22 @@ + + + + + + + + +
    + 强制截获键盘事件。 +
    +
    + + + diff --git a/old/webwindows/login.html b/old/webwindows/login.html new file mode 100644 index 0000000..f1cc0ba --- /dev/null +++ b/old/webwindows/login.html @@ -0,0 +1,24 @@ + +
    +
    +
    +
    +
    +
    + +
    + User +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + 233 +
    +
    + \ No newline at end of file diff --git a/old/webwindows/update_log.html b/old/webwindows/update_log.html new file mode 100644 index 0000000..6df7d15 --- /dev/null +++ b/old/webwindows/update_log.html @@ -0,0 +1,113 @@ + + + + + 更新日志 + + + +
    WebWindows - Update Notes
    + +
    +

    v0.1.0 @2018-1-6

    +

    [ADD]

    +
      +
    • 添加 fast_boot 函数,在开机完成前按住 Backspace 键可以一键秒开机!
    • +
    +
    +
    +

    v0.0.9 @2018-1-5

    +

    [ADD]

    +
      +
    • 添加键盘事件响应,开发阶段,屏蔽掉了除 F5、F11、F12 外的所有键盘事件,使之看起来更像windows
    • +
    • 实现了退出登陆界面,进入主界面(桌面)
    • +
    +
    +
    +

    v0.0.8 @2018-1-4

    +

    [ADD]

    +
      +
    • 实现复杂的“登录”按钮逻辑:
      +
        +
      1. 点击按钮,移向按钮外面,按钮不响应点击事件
      2. +
      3. 点击外面,移向按钮里面,按钮不响应点击事件
      4. +
      5. 点击按钮,移向按钮外面,再移向按钮里面,按钮响应
      6. +
      7. 鼠标中键、鼠标右键点击,不响应
      8. +
      +
    • +
    • + 整个web均默认不响应鼠标右键事件 +
    • +
    +

    [Debug]

    +
  • 修复屏保界面时间更新的另一个小问题
  • +
    +
    +

    v0.0.7 @2017-12-22

    +

    [ADD]

    +
      +
    • 登陆界面“登录”按钮
    • +
    • 登陆界面消失动画
    • +
    +

    [Debug]

    +
  • 修复 0.0.6版本中 开机界面连续点两下菊花动画,在接下来的屏保界面会出现文字全选的问题
  • +
    +
    +

    v0.0.6 @2017-12-18

    +

    [ADD]

    +
      +
    • 登陆界面各个元素定位
    • +
    +

    [Bug]

    +
  • 开机界面连续点两下菊花动画,在接下来的屏保界面会出现文字全选的问题,暂无法修复
  • +
    +
    +

    v0.0.5 @2017-12-17

    +

    [ADD]

    +
  • 手动绘制用户头像图片
  • +

    [Debug]

    +
  • 更准确的开机加载完成检测。避免未加载完就退出开机界面
  • +

    [Change]

    +
      +
    • 重新定位开机界面各个元素
    • +
    • 重新定位登入界面各个元素
    • +
    +
    +
    +

    v0.0.4 @2017-12-10

    +

    [ADD]

    +
  • 屏保界面上滑消失动画
  • +
    +
    +

    v0.0.3 @2017-12-8

    +

    [ADD]

    +
      +
    • 屏保界面进入动画
    • +
    • 屏保界面
    • +
    • 屏保界面时间更新
    • +
    +

    [Debug]

    +
  • 修复时间更新的小bug
  • +
    +
    +

    v0.0.2 @2017-12-7

    +

    [ADD]

    +
      +
    • 定时检测加载完成则退出开机界面
    • +
    • 开机界面淡出动画
    • +
    +
    +
    +

    v0.0.1 @2017-12-3

    +

    [ADD]

    +
      +
    • 开机界面logo
    • +
    • 开机界面 旋转菊花动画的实现
    • +
    +
    +
    +

    + No More. +

    + + diff --git a/old/webwindows/usage.html b/old/webwindows/usage.html new file mode 100644 index 0000000..5545898 --- /dev/null +++ b/old/webwindows/usage.html @@ -0,0 +1,12 @@ + + + + + 使用方法 + + +
    + vb +
    + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3c4b9ee --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3460 @@ +{ + "name": "hexo-site", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npm.taobao.org/JSONStream/download/JSONStream-1.3.5.tgz", + "integrity": "sha1-MgjB8I06TZkmGrZPkjArwV4RHKA=", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/a-sync-waterfall/download/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha1-dba2qnJZi0l6El56J3DxT0yKH6c=" + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz", + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=" + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz", + "integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-7.1.0.tgz", + "integrity": "sha1-lJ028sKSU12mAig1hsJHfFfrLWw=" + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1573557674483&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz?cache=0&sync_timestamp=1569897341237&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fanymatch%2Fdownload%2Fanymatch-3.1.1.tgz", + "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "optional": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "optional": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "optional": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "optional": true + }, + "async": { + "version": "0.2.10", + "resolved": "https://registry.npm.taobao.org/async/download/async-0.2.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync%2Fdownload%2Fasync-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz", + "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", + "optional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", + "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npm.taobao.org/base/download/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "optional": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/basic-auth/download/basic-auth-2.0.1.tgz", + "integrity": "sha1-uZgnm/R844NEtPPPkW1Gebv1Hjo=", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + } + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.0.0.tgz", + "integrity": "sha1-I8DfFPaogHf1+YbA0WfsA8PVU3w=" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", + "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=" + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz", + "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", + "requires": { + "fill-range": "^7.0.1" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "optional": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npm.taobao.org/cheerio/download/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + } + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.3.0.tgz?cache=0&sync_timestamp=1572685444380&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.3.0.tgz", + "integrity": "sha1-EsBxRmjFWAD2WeJi1JYql/r1VKY=", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "optional": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", + "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "command-exists": { + "version": "1.2.8", + "resolved": "https://registry.npm.taobao.org/command-exists/download/command-exists-1.2.8.tgz", + "integrity": "sha1-cVrO/dEiO5ybNxEKFJxjksKFIpE=" + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz", + "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=", + "optional": true + }, + "compressible": { + "version": "2.0.17", + "resolved": "https://registry.npm.taobao.org/compressible/download/compressible-2.0.17.tgz", + "integrity": "sha1-bowQihatWDhKl386SCyiC/8vOME=", + "requires": { + "mime-db": ">= 1.40.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz", + "integrity": "sha1-lVI+/xcMpXwpoMpB5v4TH0Hlu48=", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npm.taobao.org/connect/download/connect-3.7.0.tgz", + "integrity": "sha1-XUk0iRDKpeB6AYALAw0MNfIEhPg=", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "optional": true + }, + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.1.tgz?cache=0&sync_timestamp=1570440024132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.1.tgz", + "integrity": "sha1-CrVihuD3wk4VPQTMKqAn5DqaXRQ=", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npm.taobao.org/css/download/css-2.2.4.tgz", + "integrity": "sha1-xkZ1XHOXHyu6amAeLPL9cbEpiSk=", + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "css-parse": { + "version": "1.7.0", + "resolved": "https://registry.npm.taobao.org/css-parse/download/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=" + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz", + "integrity": "sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI=" + }, + "cuid": { + "version": "2.1.6", + "resolved": "https://registry.npm.taobao.org/cuid/download/cuid-2.1.6.tgz", + "integrity": "sha1-3DogtadJfTbTLAv4opl1JMnHlsQ=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.1.1.tgz", + "integrity": "sha1-HsQFnihLq+027sKUHUqXChic58A=", + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz", + "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=" + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz?cache=0&sync_timestamp=1564708887907&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomhandler%2Fdownload%2Fdomhandler-2.4.2.tgz", + "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npm.taobao.org/ejs/download/ejs-2.7.4.tgz?cache=0&sync_timestamp=1574560387393&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fejs%2Fdownload%2Fejs-2.7.4.tgz", + "integrity": "sha1-SGYSh1c9zFPjZsehrlLDoSDuybo=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz", + "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "optional": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "optional": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "optional": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz", + "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz", + "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "optional": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "optional": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.2.tgz", + "integrity": "sha1-TAofs0vGjlQ7S4Kp7Dkr+9qECAU=", + "optional": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "optional": true + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npm.taobao.org/glob/download/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "optional": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.0.tgz", + "integrity": "sha1-X0wdHnSNMM1zrSlEs1d6gbCB6MI=", + "requires": { + "is-glob": "^4.0.1" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz", + "integrity": "sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "optional": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "optional": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hexo": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/hexo/download/hexo-4.0.0.tgz", + "integrity": "sha1-W1Tf1lvOPUW6MXji+63d9rV1HMI=", + "requires": { + "abbrev": "^1.1.1", + "archy": "^1.0.0", + "bluebird": "^3.5.2", + "chalk": "^2.4.1", + "cheerio": "0.22.0", + "hexo-cli": "^3.0.0", + "hexo-front-matter": "^1.0.0", + "hexo-fs": "^2.0.0", + "hexo-i18n": "^1.0.0", + "hexo-log": "^1.0.0", + "hexo-util": "^1.4.0", + "js-yaml": "^3.12.0", + "lodash": "^4.17.11", + "micromatch": "^4.0.2", + "moment": "^2.22.2", + "moment-timezone": "^0.5.21", + "nunjucks": "^3.1.3", + "pretty-hrtime": "^1.0.3", + "resolve": "^1.8.1", + "strip-ansi": "^5.0.0", + "strip-indent": "^3.0.0", + "swig-extras": "0.0.1", + "swig-templates": "^2.0.3", + "text-table": "^0.2.0", + "tildify": "^2.0.0", + "titlecase": "^1.1.2", + "warehouse": "^3.0.1" + }, + "dependencies": { + "hexo-cli": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/hexo-cli/download/hexo-cli-3.1.0.tgz", + "integrity": "sha1-p0FNRkczP+c3Yvhtd+VmBlnA0Fs=", + "requires": { + "abbrev": "^1.1.1", + "acorn": "^7.0.0", + "bluebird": "^3.5.5", + "chalk": "^2.4.2", + "command-exists": "^1.2.8", + "hexo-fs": "^2.0.0", + "hexo-log": "^1.0.0", + "hexo-util": "^1.4.0", + "minimist": "^1.2.0", + "resolve": "^1.11.0", + "tildify": "^2.0.0" + } + } + } + }, + "hexo-bunyan": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-bunyan/download/hexo-bunyan-2.0.0.tgz?cache=0&sync_timestamp=1568804692012&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhexo-bunyan%2Fdownload%2Fhexo-bunyan-2.0.0.tgz", + "integrity": "sha1-Ag16URBMx/5Q35AFAgw1msUEMJ4=", + "requires": { + "moment": "^2.10.6", + "mv": "~2", + "safe-json-stringify": "~1" + } + }, + "hexo-front-matter": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-front-matter/download/hexo-front-matter-1.0.0.tgz", + "integrity": "sha1-C0ixwe0UPoyyWzsiOpA3OF2RBlU=", + "requires": { + "js-yaml": "^3.13.1" + } + }, + "hexo-fs": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-fs/download/hexo-fs-2.0.0.tgz", + "integrity": "sha1-C8QhvAyXWoWiUGGsqVN/tZKS0nk=", + "requires": { + "bluebird": "^3.5.1", + "chokidar": "^3.0.0", + "escape-string-regexp": "^2.0.0", + "graceful-fs": "^4.1.11" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz", + "integrity": "sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=" + } + } + }, + "hexo-generator-archive": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-generator-archive/download/hexo-generator-archive-1.0.0.tgz", + "integrity": "sha1-rSr7EiMqZeL4YI/Byj8ZFi+2N4Y=", + "requires": { + "hexo-pagination": "1.0.0" + } + }, + "hexo-generator-category": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-generator-category/download/hexo-generator-category-1.0.0.tgz", + "integrity": "sha1-zSorA+sybaPvgh1uKUCEiMwTLrU=", + "requires": { + "hexo-pagination": "1.0.0" + } + }, + "hexo-generator-index": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-generator-index/download/hexo-generator-index-1.0.0.tgz", + "integrity": "sha1-jJ8Vfc+gr0+EF/d6TrWzgx9ppxk=", + "requires": { + "hexo-pagination": "1.0.0" + } + }, + "hexo-generator-tag": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-generator-tag/download/hexo-generator-tag-1.0.0.tgz", + "integrity": "sha1-VOwj3pQJx1WE6oHjYFelkDGwIvE=", + "requires": { + "hexo-pagination": "1.0.0" + } + }, + "hexo-i18n": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-i18n/download/hexo-i18n-1.0.0.tgz", + "integrity": "sha1-eYP7OjE+kGFbhN2PqUanHEie9b0=", + "requires": { + "sprintf-js": "^1.0.3" + } + }, + "hexo-log": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-log/download/hexo-log-1.0.0.tgz", + "integrity": "sha1-bw054OnnawSkYXskLD4QHVxCg8c=", + "requires": { + "chalk": "^2.4.1", + "hexo-bunyan": "^2.0.0" + } + }, + "hexo-pagination": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-pagination/download/hexo-pagination-1.0.0.tgz", + "integrity": "sha1-ycDKNmUme56dCon8PtyvMnaQfcE=" + }, + "hexo-renderer-ejs": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-renderer-ejs/download/hexo-renderer-ejs-1.0.0.tgz", + "integrity": "sha1-Q8TeSe6uIkA2pFffhg6xwUxotLQ=", + "requires": { + "ejs": "^2.6.1" + } + }, + "hexo-renderer-marked": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-renderer-marked/download/hexo-renderer-marked-2.0.0.tgz", + "integrity": "sha1-RYVAsBQUHnz3IUWoLsWRvjWc26E=", + "requires": { + "hexo-util": "1.0.0", + "marked": "^0.7.0", + "strip-indent": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz?cache=0&sync_timestamp=1570440024132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "hexo-util": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-util/download/hexo-util-1.0.0.tgz", + "integrity": "sha1-JUXvzWbjRe+S/kinOjVHDNZfCyo=", + "requires": { + "bluebird": "^3.5.2", + "camel-case": "^3.0.0", + "cross-spawn": "^6.0.5", + "highlight.js": "^9.13.1", + "html-entities": "^1.2.1", + "striptags": "^3.1.1" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshebang-command%2Fdownload%2Fshebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "hexo-renderer-stylus": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/hexo-renderer-stylus/download/hexo-renderer-stylus-1.1.0.tgz", + "integrity": "sha1-egoQe89LdP34jyjaLbR7jcniCOU=", + "requires": { + "nib": "^1.1.2", + "stylus": "^0.54.5" + } + }, + "hexo-server": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/hexo-server/download/hexo-server-1.0.0.tgz", + "integrity": "sha1-r4n8wKB3QK0qfzPR0AOImqsikn4=", + "requires": { + "bluebird": "^3.5.5", + "chalk": "^2.4.2", + "compression": "^1.7.4", + "connect": "^3.7.0", + "mime": "^2.4.3", + "morgan": "^1.9.1", + "open": "^6.3.0", + "serve-static": "^1.14.1" + } + }, + "hexo-util": { + "version": "1.6.1", + "resolved": "https://registry.npm.taobao.org/hexo-util/download/hexo-util-1.6.1.tgz", + "integrity": "sha1-eFe2WwxVq6d7P1ej3bMnzN9y92I=", + "requires": { + "bluebird": "^3.5.2", + "camel-case": "^3.0.0", + "cross-spawn": "^7.0.0", + "highlight.js": "^9.13.1", + "striptags": "^3.1.1" + } + }, + "highlight.js": { + "version": "9.16.2", + "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.16.2.tgz", + "integrity": "sha1-aDaNA5/+HGIRvMB+SD2vld4+QD4=" + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npm.taobao.org/html-entities/download/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz", + "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=", + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.3.tgz", + "integrity": "sha1-bGGeT5xgMIw4UZSYwU+7EKrOuwY=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", + "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz", + "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "optional": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "optional": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "optional": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", + "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz", + "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "optional": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "optional": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-wsl%2Fdownload%2Fis-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "optional": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "optional": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.13.1.tgz", + "integrity": "sha1-r/FRswv9+o5J4F2iLnQV6d+jeEc=", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npm.taobao.org/jsonparse/download/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "optional": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/lazy-cache/download/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flcid%2Fdownload%2Flcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz", + "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=" + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npm.taobao.org/lodash.assignin/download/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npm.taobao.org/lodash.bind/download/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npm.taobao.org/lodash.defaults/download/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npm.taobao.org/lodash.filter/download/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npm.taobao.org/lodash.flatten/download/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npm.taobao.org/lodash.foreach/download/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npm.taobao.org/lodash.map/download/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npm.taobao.org/lodash.merge/download/lodash.merge-4.6.2.tgz", + "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=" + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npm.taobao.org/lodash.pick/download/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npm.taobao.org/lodash.reduce/download/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npm.taobao.org/lodash.reject/download/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npm.taobao.org/lodash.some/download/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "optional": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "optional": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "markdown": { + "version": "0.5.0", + "resolved": "https://registry.npm.taobao.org/markdown/download/markdown-0.5.0.tgz", + "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI=", + "requires": { + "nopt": "~2.1.1" + } + }, + "marked": { + "version": "0.7.0", + "resolved": "https://registry.npm.taobao.org/marked/download/marked-0.7.0.tgz", + "integrity": "sha1-tkIB8FHScbHtwQoE0a6bdLuOXA4=" + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-4.0.2.tgz", + "integrity": "sha1-T8sJmb+fvC/L3SEvbWKbmlbDklk=", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "mime": { + "version": "2.4.4", + "resolved": "https://registry.npm.taobao.org/mime/download/mime-2.4.4.tgz", + "integrity": "sha1-vXuRE1/GsBzePpuuM9ZZtj2IV+U=" + }, + "mime-db": { + "version": "1.42.0", + "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.42.0.tgz", + "integrity": "sha1-PiUpB7THrbkGWXtLZWNics+ee6w=" + }, + "mime-types": { + "version": "2.1.25", + "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.25.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.25.tgz", + "integrity": "sha1-OXctRmIfk+KoCoVsU7hqYhVqZDc=", + "requires": { + "mime-db": "1.42.0" + } + }, + "min-indent": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/min-indent/download/min-indent-1.0.0.tgz", + "integrity": "sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz", + "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", + "optional": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.24.0.tgz", + "integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s=" + }, + "moment-timezone": { + "version": "0.5.27", + "resolved": "https://registry.npm.taobao.org/moment-timezone/download/moment-timezone-0.5.27.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment-timezone%2Fdownload%2Fmoment-timezone-0.5.27.tgz", + "integrity": "sha1-c63sgTm2/jBFLnjyEPJ7HzRriHc=", + "requires": { + "moment": ">= 2.9.0" + } + }, + "morgan": { + "version": "1.9.1", + "resolved": "https://registry.npm.taobao.org/morgan/download/morgan-1.9.1.tgz", + "integrity": "sha1-Co0Wc0odmvvIJLmd+H5zjlji2lk=", + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mv": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/mv/download/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "optional": true, + "requires": { + "mkdirp": "~0.5.1", + "ncp": "~2.0.0", + "rimraf": "~2.4.0" + } + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.0.tgz", + "integrity": "sha1-eBj3IgJ7JFmobwKV1DTR/CM2xSw=", + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", + "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", + "optional": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/ncp/download/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "optional": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz", + "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=" + }, + "nib": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/nib/download/nib-1.1.2.tgz", + "integrity": "sha1-amnt5AgblcDe+L4CSkyK4MLLtsc=", + "requires": { + "stylus": "0.54.5" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npm.taobao.org/glob/download/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "requires": { + "amdefine": ">=0.0.4" + } + }, + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npm.taobao.org/stylus/download/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "requires": { + "css-parse": "1.7.x", + "debug": "*", + "glob": "7.0.x", + "mkdirp": "0.5.x", + "sax": "0.5.x", + "source-map": "0.1.x" + } + } + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", + "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=" + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz", + "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=", + "requires": { + "lower-case": "^1.1.1" + } + }, + "nopt": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/nopt/download/nopt-2.1.2.tgz", + "integrity": "sha1-bMzZd7gBMqB3MdbozljCyDA8+a8=", + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=" + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz", + "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=", + "requires": { + "boolbase": "~1.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nunjucks": { + "version": "3.2.0", + "resolved": "https://registry.npm.taobao.org/nunjucks/download/nunjucks-3.2.0.tgz", + "integrity": "sha1-U+lfQ8lVXoIuiVAAiiAbEALUmTM=", + "requires": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "chokidar": "^2.0.0", + "yargs": "^3.32.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz?cache=0&sync_timestamp=1569897341237&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fanymatch%2Fdownload%2Fanymatch-2.0.0.tgz", + "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", + "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", + "optional": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "optional": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1572685444380&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", + "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.9.tgz", + "integrity": "sha1-P17WZYPM1vQAtaANtvfoYTY+OI8=", + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "optional": true + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "optional": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz", + "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "optional": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "optional": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "optional": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "optional": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "optional": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz", + "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "open": { + "version": "6.4.0", + "resolved": "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz", + "integrity": "sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk=", + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npm.taobao.org/optimist/download/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + } + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", + "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "optional": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "optional": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz", + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", + "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=" + }, + "picomatch": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.1.1.tgz", + "integrity": "sha1-7N++p3BK21/m+0f5hmxMDhXpBcU=" + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "optional": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/pretty-hrtime/download/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz", + "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", + "optional": true + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz", + "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=" + }, + "readable-stream": { + "version": "3.4.0", + "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.4.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.4.0.tgz", + "integrity": "sha1-pRwmdUZY4KPCHb9ZFjvUW6b0R/w=", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.2.0.tgz", + "integrity": "sha1-wwwzNSsSyW37S4lUIaSf1alZODk=", + "requires": { + "picomatch": "^2.0.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "optional": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "optional": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz", + "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", + "optional": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "resolve": { + "version": "1.13.1", + "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.13.1.tgz?cache=0&sync_timestamp=1574810204797&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.13.1.tgz", + "integrity": "sha1-vgqkwGrNUwg1BauzX01mkyqzXRY=", + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "optional": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.4.5", + "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.4.5.tgz?cache=0&sync_timestamp=1566289585759&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "optional": true, + "requires": { + "glob": "^6.0.1" + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz", + "integrity": "sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk=" + }, + "safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/safe-json-stringify/download/safe-json-stringify-1.2.0.tgz", + "integrity": "sha1-NW5EvJjx+TzkXfFLzXwBzahuCv0=", + "optional": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "optional": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" + }, + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npm.taobao.org/sax/download/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz", + "integrity": "sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz", + "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz", + "integrity": "sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/set-value/download/set-value-2.0.1.tgz", + "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz", + "integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshebang-command%2Fdownload%2Fshebang-command-2.0.0.tgz", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "optional": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "optional": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "optional": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "optional": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "optional": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.3.0.tgz", + "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz", + "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=" + } + } + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/strip-indent/download/strip-indent-3.0.0.tgz", + "integrity": "sha1-wy4c7pQLazQyx3G8LFS8znPNMAE=", + "requires": { + "min-indent": "^1.0.0" + } + }, + "striptags": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/striptags/download/striptags-3.1.1.tgz", + "integrity": "sha1-yMPn/db7S7OjKjt1LltePjgJPr0=" + }, + "stylus": { + "version": "0.54.7", + "resolved": "https://registry.npm.taobao.org/stylus/download/stylus-0.54.7.tgz", + "integrity": "sha1-xs5Hk5Ze5Ti86+UPMVN7/ATYjNI=", + "requires": { + "css-parse": "~2.0.0", + "debug": "~3.1.0", + "glob": "^7.1.3", + "mkdirp": "~0.5.x", + "safer-buffer": "^2.1.2", + "sax": "~1.2.4", + "semver": "^6.0.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "css-parse": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/css-parse/download/css-parse-2.0.0.tgz", + "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", + "requires": { + "css": "^2.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz", + "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=" + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz", + "integrity": "sha1-UwL4FpAxc1ImVECS5kmB91F1A4M=" + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1569557271992&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "requires": { + "has-flag": "^3.0.0" + } + }, + "swig-extras": { + "version": "0.0.1", + "resolved": "https://registry.npm.taobao.org/swig-extras/download/swig-extras-0.0.1.tgz", + "integrity": "sha1-tQP+3jcqucJMasaMr2VrzvGHIyg=", + "requires": { + "markdown": "~0.5.0" + } + }, + "swig-templates": { + "version": "2.0.3", + "resolved": "https://registry.npm.taobao.org/swig-templates/download/swig-templates-2.0.3.tgz", + "integrity": "sha1-a0xDtGIXXfKo2oV6IEM3nsbqb9A=", + "requires": { + "optimist": "~0.6", + "uglify-js": "2.6.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tildify": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/tildify/download/tildify-2.0.0.tgz", + "integrity": "sha1-8gXzZ01nfOaYtwZ6melJzgO0dUo=" + }, + "titlecase": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/titlecase/download/titlecase-1.1.3.tgz", + "integrity": "sha1-/G1l/1grBgJBB2jvGgm3BQYxPcM=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "optional": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz", + "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz", + "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=" + }, + "uglify-js": { + "version": "2.6.0", + "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-2.6.0.tgz?cache=0&sync_timestamp=1574701606909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-2.6.0.tgz", + "integrity": "sha1-JeqhzDVQ45QQzu+v0c+7a20V8AE=", + "requires": { + "async": "~0.2.6", + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz", + "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "optional": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "optional": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "optional": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "optional": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz", + "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", + "optional": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", + "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "warehouse": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/warehouse/download/warehouse-3.0.1.tgz", + "integrity": "sha1-S1e2GS/bif93qfNGOBBIxUiMKzU=", + "requires": { + "JSONStream": "^1.0.7", + "bluebird": "^3.2.2", + "cuid": "^2.1.4", + "graceful-fs": "^4.1.3", + "is-plain-object": "^3.0.0", + "lodash": "^4.17.10" + }, + "dependencies": { + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-3.0.0.tgz", + "integrity": "sha1-R7/F2htdUNZBEIBsGZNZSC51qSg=", + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-4.0.0.tgz", + "integrity": "sha1-PxyRVec7GSAiqAgZus0DQ3EWl7A=" + } + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "requires": { + "isexe": "^2.0.0" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npm.taobao.org/window-size/download/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..284c1bd --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "hexo-site", + "version": "0.0.0", + "private": true, + "scripts": { + "build": "hexo generate", + "clean": "hexo clean", + "deploy": "hexo deploy", + "server": "hexo server" + }, + "hexo": { + "version": "4.0.0" + }, + "dependencies": { + "hexo": "^4.0.0", + "hexo-deployer-git": "^2.1.0", + "hexo-generator-archive": "^1.0.0", + "hexo-generator-category": "^1.0.0", + "hexo-generator-index": "^1.0.0", + "hexo-generator-tag": "^1.0.0", + "hexo-renderer-ejs": "^1.0.0", + "hexo-renderer-marked": "^2.0.0", + "hexo-renderer-stylus": "^1.1.0", + "hexo-server": "^1.0.0" + } +} diff --git a/page/2/index.html b/page/2/index.html deleted file mode 100644 index 7041dd6..0000000 --- a/page/2/index.html +++ /dev/null @@ -1,1413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hi, I'm Cortana. - - - - - - - - - - - - - - - -
    -
    - -
    -
    - - - -
    - - - - -
    -
    - - -
    - - 0% -
    -
    - - -
    -
    -
    - - -
    - - -
    - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    这是一款名字叫“Zen Idle”的游戏。来尝试下自动刷钱

    -image-20200505094215251 - -
    - - 阅读全文 » - -
    - - - -
    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    学习Linux之前,了解Linux哲学和Linux设计思想是必要的。

    -

    然后就是开始敲命令了啦 - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    OneDrive 是 Microsoft 的一个云存储服务,安装后集成在 Windows 资源管理器,所以比其他任何网盘都更有其与生俱来的优势。但由于众所周知的原因,OneDrive 的访问速度也极低。
    访问速度慢还不算了,还经常会死在某个进度,一直下不动,这是最**的

    -image-20200321165324494 -
    你看这 243KB/秒 长得多标致啊
    - -
    - - 阅读全文 » - -
    - - - -
    - - - - -
    -
    -
    -
    - - - - - - - - - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    现在互联网发达的时代,大家都会有很多的群,xxx 交流群、xxx 技术交流、xxx开发群、xxx技术学习群等,大家的初心可能都是想交流的,遇到点问题然后就可以在群里问。

    -

    然而很多时候你问的问题没人回答;也有时候问了半天还是没找到答案;也有时候当你把问题发出来了,别人正准备回答你的时候,你说知道了;然后刚开始群里很活跃,慢慢的就死了。

    -

    其实以上问题,都是大家不想看到的,然而在群里提问是我们加入群的初心,但是很多人做不好,最终导致你的问题无人解答,群慢慢的失去意义。

    -

    今天我所谈的就是群里提问的艺术,让你的问题快速得到解决。 - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    2020-02-28,距离 2020高考还有100天。

    - -
    - - 阅读全文 » - -
    - - - -
    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    今日探索吾爱破解论坛,整理了两篇入门指导文章,当备忘录了

    -

    内容来自:吾爱破解 论坛 - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - - - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    由于众所周知的原因,[数据删除] 。并且在搜索引擎方面,Google 也是搜索知识的一个优秀工具。

    -

    关于搜索引擎之间的瓜葛,Baidu、Bing、Google 究竟谁优谁劣,以后我有空的话再来谈这个话题,欢迎和我 issue 交流。

    -

    今天就来介绍一下如何“无中生有访问 Google”。 - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    翻阅 Wooyun ,然后找到了Github上。。。不得不说,Github 上确实有大量镜像资源

    -

    在这里做一个总结吧。按 Star 排序,把每个库的 Readme.md 剪辑到了这里。

    -

    文尾有彩蛋!

    - -
    - - 阅读全文 » - -
    - - - -
    - - - - -
    -
    -
    -
    - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    -
    - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/page/3/index.html b/page/3/index.html deleted file mode 100644 index 9355dba..0000000 --- a/page/3/index.html +++ /dev/null @@ -1,939 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hi, I'm Cortana. - - - - - - - - - - - - - - - -
    -
    - -
    -
    - - - -
    - - - - -
    -
    - - -
    - - 0% -
    -
    - - -
    -
    -
    - - -
    - - -
    - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    昨天配置了 Google、Baidu、Bing搜索引擎提交,不过比较悲催的是 Github Pages 服务器拒绝 BaiduSpider ,整个站点根本不能出现在 Baidu 里面好么!! 另一方面,速度过慢,github pages 在国内速度,不太理想,所以用 CloudFlare 老牌 cdn 加速整站,还可以被 BaiduSpider 收录。 - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    害呀,hexo 都做了这么多了,干脆把google 统计一起加上去得了。Google Analytics、Google添加站点,baidu 添加站点、bing 添加站点,通通加上!

    - -
    - - 阅读全文 » - -
    - - - -
    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    今日看到博客的评论功能,就想整一个,本以为跟前两天添加hexo插件查不多,结果,,爬坑,又掉坑,爬坑又掉坑…… - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    今天闲来无事,折腾博客(其实是写 gdb 结果得更新一下 hexo ),然后这个博客就大换血了。

    -

    我干了啥呢: - -

    - - 阅读全文 » - -
    - - - -

    - - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - -
    -

    - - -

    - - -
    - - - - -
    - - -

    2020即将来临了,作为群贫困人口,在2019年再来看各位群友最后一面

    - - -
    - - - - -
    -
    -
    -
    - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    -
    - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/robots.txt b/robots.txt deleted file mode 100644 index 698f42f..0000000 --- a/robots.txt +++ /dev/null @@ -1,17 +0,0 @@ -User-agent: * -Allow: / -Allow: /archives/ -Allow: /tags/ -Allow: /categories/ - -Disallow: /vendors/ -Disallow: /js/ -Disallow: /lib/ -Disallow: /css/ -Disallow: /fonts/ -Disallow: /vendors/ -Disallow: /fancybox/ -Disallow: /old/ - -Sitemap: http://blog.tcpsoft.app/sitemap.xml -Sitemap: http://blog.tcpsoft.app/baidusitemap.xml \ No newline at end of file diff --git a/scaffolds/draft.md b/scaffolds/draft.md new file mode 100644 index 0000000..498e95b --- /dev/null +++ b/scaffolds/draft.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +tags: +--- diff --git a/scaffolds/page.md b/scaffolds/page.md new file mode 100644 index 0000000..f01ba3c --- /dev/null +++ b/scaffolds/page.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +date: {{ date }} +--- diff --git a/scaffolds/post.md b/scaffolds/post.md new file mode 100644 index 0000000..1f9b9a4 --- /dev/null +++ b/scaffolds/post.md @@ -0,0 +1,5 @@ +--- +title: {{ title }} +date: {{ date }} +tags: +--- diff --git a/search.xml b/search.xml deleted file mode 100644 index 725283d..0000000 --- a/search.xml +++ /dev/null @@ -1,2278 +0,0 @@ - - - - 使用adb从手机传输相片到电脑 - /2022/04/adb-picture-transfer/ - 随着手机照片越来越多,手机空间越来越小,把手机照片腾到电脑上或许是一个减小空间的办法。

    -

    将安卓手机上的照片复制到电脑上有几种方法:

    -
      -
    • 手机连电脑,使用文件模式复制照片
    • -
    • 手机连电脑,使用照片模式复制照片
    • -
    • 手机插U盘,复制照片
    • -
    • 手机插电脑,用adb命令行复制
    • -
    -

    前两种方法,由于Windows垃圾的安卓数据传输协议,极有可能中途失败或者传输错误。不考虑

    -

    第三种方法,可行,但需要手机支持插U盘以及需要USB口转typeC口等,不是很方便

    -

    第四种方法,步骤稍多,但是不需要U盘中转,速度快,可以方便的查看结果等优势

    -
    -

    本文所使用和举例的机型是 MIUI 系统的手机,其他的系统路径不同,但是方法是一样的。

    -

    adb工具在这里放一个链接: https://cdutsec.lanzouw.com/ixnfb02yij7g

    -

    adb工具的版本太旧会影响传输速度和命令行的交互,所以尽量使用新版本的adb

    -
    -

    0. 准备工作

    0.1 电脑上adb工具

    在此文件夹中,这三个文件,打开命令行即可操作。

    -

    image-20220410171522377

    -

    在文件夹按住shift然后鼠标右键,选择在此处打开命令行,可以运行adb

    -

    (如果打开的是powershell,运行cmd进入cmd命令行)

    -image-20220410113046875 - - - -

    0.2 手机上开启开发者模式和USB调试

    0.2.1 开启开发者模式

    如果手机没有开启开发者模式,按照这个操作开启开发者模式。

    -

    打开设置,点开我的设备

    -IMG_20220405_210341 - -

    点开全部参数

    -IMG_20220405_210406 - -

    一直点击MIUI版本,会进入开发者模式。

    -IMG_20220405_210501 - -

    0.2.2 打开开发者模式后打开USB调试

    点开设置,打开更多设置,

    -IMG_20220405_210522 - -

    找到开发者选项

    -IMG_20220405_210531 - -

    首先开启开发者选项,手机可能提示有危险,选择确定。

    -

    然后打开USB调试的开关

    -Screenshot_2022-04-10-16-46-22-788_com.miui.securitycenter - -IMG_20220405_210546 - - - - - -

    1. 手机创建相册和分类照片

    将手机中需要传到电脑的图片选中,点击添加到,新相册,创建相册

    -

    注意这里命名需要是:英文或数字,不能有空格 ,如果是带有汉字或者有空格,选中其中的图片,重新创建相册。

    -IMG_20220410_113421 - -IMG_20220410_113442 - -

    选择移动相片的方式

    -IMG_20220410_113507 - - - -

    2. 电脑连接adb,搬运相片

    把手机用原厂充电线插上电脑(杂牌线可能识别不了或数据传输有问题!)

    -

    运行adb devices ,可以看到设备ID。

    -

    (这时候手机可能谈弹出提示:是否允许这台计算机调试,选择允许。)

    -

    image-20220410165018191

    -

    adb shell 进入手机空间

    -

    cd /sdcard/Pictures/Gallery/owner/,进入到相册的目录。ls 可以看到各个创建的相册

    -

    (在MIUI旧版本上需要运行的可能是:cd /sdcard/MIUI/Gallery/cloud/owner/

    -

    image-20220410165325479

    -

    cd 文件夹名字 进入文件夹,例如在这里我的文件夹是usb,那么我运行:cd usb

    -

    pwd 查看当前目录的路径,

    -

    image-20220410171122349

    -

    复制完整路径备用。

    -

    exit或 ctrl d 退出shell命令行,回到Windows命令行,运行:

    -

    adb pull 完整路径 来拉取文件,例如在此处我运行:adb pull /sdcard/Pictures/Gallery/owner/usb

    -

    image-20220410171324243

    -

    过程中没有报错,如果报错需要根据提示解决问题。

    -

    打开文件夹可以看到,相片文件夹已经有了:

    -

    image-20220410171541286

    -

    3. 手机和电脑确认文件夹信息

    3.1 手机上查看相册文件夹信息

    打开re文件管理器(如果没有 安装一个)

    -IMG_20220410_113744 - -

    和上面的路径一样,打开找到owner,找到自己创建的文件夹,

    -

    长按选中文件夹,点击右上方三个点,点击属性

    -IMG_20220410_113858 - -IMG_20220410_113908 - -

    可以看到文件夹里面有多少个文件,多少个文件夹,多少字节

    -image-20220410173129131 - -

    3.2 电脑上查看文件夹信息

    打开刚才的文件夹,右键刚收到的文件夹,属性,

    -

    或者按住键盘alt键然后双击文件夹,打开文件夹属性

    -image-20220410172952180 - -

    对比两个信息,观察文件数、文件夹数、字节数都是一样的,就是完全复制到电脑上了,手机上的可以删除掉了

    -

    4. 手机上删除相册

    这里快到结尾了,但还是要多说几句

    -

    删除相册的方式用且仅用:系统自带的相册app,来删除相册

    -IMG_20220410_113959 - -

    如图所示,MIUI是可能开启了云备份的,如果你恰好开了云备份并且这个相册里的一些图片已经备份,那么在使用文件管理器删除相册所在的文件夹,可能有两个问题:

    -
      -
    • 相册运行错误。相册找不到文件夹,但是配置中是有文件夹的,所以会显示一个相册,但是打不开
    • -
    • 云备份恢复。如果一些图片删除了,手机联网会自动从云备份恢复图片。那你这个相册就删不干净了。
    • -
    -

    如图所示,相册app删除的时候会同时删除远程备份,所以,,干净(并且不会导致相册运行错误)

    -]]>
    - - none - - - none - -
    - - 硬盘损坏(物理)和事件分析 - /2022/03/my-disk-crushed/ - 寒假期间,本人的电脑硬盘坏掉了。

    -

    总结一点经验吧,希望能帮助到您。

    - - -

    事件经过

    ​ 起初是偶尔的找不到系统分区找不到 winload.efi 从而无法启动。后来启不动,BIOS也识别不到,多重启几次可以开机。最后直接无法识别,换卡槽换机器也完全无法识别。 本人猜测可能是主控坏掉的原因。

    -

    ​ 硬盘是西数SN550,容量是1TB,由于是在淘宝小店买的便宜货,店铺的售后就不可能了,尝试西数官方联保,在线申请一直提示网络问题无法申请。尝试看一下数据恢复服务,在系数官方的数据恢复里找到了ontrack公司,在线填写信息后客服发邮件提供了报价,约合人民币5500多。奈何本人,钱包不足,遂放弃。

    -

    ​ 邮件如下(也可以参考一下使用昂贵的数据恢复服务的操作流程):

    -
    您好XXX,

    多謝你使用KLDiscovery Ontrack (HK) Ltd. 數據修復服務.
    Ontrack 35年歷史,在美國上市,是全球最大的數據恢復公司,每年恢復超過50,000個成功個案。

    數據恢復服務的程序如下:
    1. 請郵寄你的硬盤到我們的辦公室.
    2. 數據修復服務開始後, 你會收到我們發出的郵件, 你可登入查核數據修復進度.
    3. 當修復服務完成後, 我們會傳送修復報告及報價單到你的電子郵箱.
    4. 如你對報告感到滿意, 請簽回報價單. 修復好的數據將會儲存於全新1TB 移動硬盤.
    5. 標準服務的檢查費為HKD800恢復數據費用為 HKD6000. 時間約為5-7個工作天 (不包括速遞運輸時間時間).
    6. 如因為硬件事故或需配備零件, 需時可能會更長.
    7. 如未能恢復成功, 不會收取恢復數據費用
    8. 如Ontrack 成功恢復數據, 而客戶拒絕恢復服務, 我們會收取 HKD1000 行政費.
    9. 如客戶於一個月內未有取回硬盤, ONTRACK 會將硬盤消磁並销毁.

    以下是我們的辦公室地址,
    To: KLDiscovery Ontrack (HK) Limited
    香港北角電器道148 號12樓1203A室
    ATTN: Andrew Sin
    Tel: +852 3704 8688

    請包好你的硬盤及貼上我們的Job編號 (6389167)
    請確認以上的報價並回覆以上的電郵, 多謝!
    希望收到您的好消息!
    如需要任何協助, 請致電聯絡我們+852 3704 8688.

    Thank you!
    - -

    丢失的数据

    ​ 这一块硬盘里面包含了:

    -
      -
    • 200G的Windows系统盘(C),
    • -
    • 200G的硬件技术资料(O),
    • -
    • 200G的游戏分区GTA(V),
    • -
    • 200G的多媒体文件(W),
    • -
    • 50G的一些备份文件(X),
    • -
    -

    ​ 这些数据和资料全部丢失了。虽然说恰好这些资料不是最重要的,但是C盘仍然是很多重要文件的集散地,不管是重装还是格盘,都会丢失大量的程序数据,包括但不限于:

    -
      -
    • appdata(相当大一部分程序的数据都在appdata),
    • -
    • documents(QQ接收文件 微信接收文件,QQ和微信的聊天记录数据库,一部分IDE的项目文件),
    • -
    • User目录(相当于Linux的~目录,程序员IDE的配置,一部分项目文件,一部分程序的配置文件都会在这里,尤其是ssh密钥和xshell的服务器记录,如果丢失损失非常大)
    • -
    • Download目录(相信很多人的下载文件都是放在这里的吧,如果丢失也会损失很多内容)
    • -
    • chrome的文件夹(书签 历史记录 扩展程序和油猴插件的脚本)(虽然说你登陆了账户并且开启了chrome同步,那书签和一小段时间的历史记录和你的扩展程序可以从远程恢复,但是扩展程序里面的数据 配置 手撕脚本等可能就付之一炬了特别是油猴(当事人:现在就是后悔 非常的后悔))
    • -
    -

    总结一些

    -

    后记

    一怒之下在 jd 购买了三星980,1TB硬盘,感觉比西数更靠谱一点。

    -
    -

    西数,🐕都不用

    -

    真香~.jpg

    -
    -]]>
    - - none - - - none - -
    - - 解决 WSL2 和 proxifier 的相互报错问题 - /2021/07/wsl2-and-proxifier/ - 转载自知乎:https://zhuanlan.zhihu.com/p/151392411

    -

    关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

    关于使用WSL2出现“参考的对象类型不支持尝试的操作”的解决方法。

    - - -

    问题:

    参考的对象类型不支持尝试的操作。(The attempted operation is not supported for the type of object referenced.)

    -

    解决方法:

    1. 常见临时解决方案(不推荐):

    -

    以管理员身份运行CMD,输入:

    -
    -

    netsh winsock reset

    -
    -

    重启计算机即可修复。

    -

    2. 长期解决的方案(推荐):

    -

    (1)下载此软件:

    -

    http://www.proxifier.com/tmp/Test20200228/NoLsp.exe

    -

    (需要挂代理访问下载)

    -

    (2)管理员身份运行CMD输入:

    -
    -

    NoLsp.exe C:\windows\system32\wsl.exe

    -
    -

    请自行注意NoLsp.exe程序的位置,以及你的wsl.exe位置。

    -

    产生原因和解决方法分析:

    -
      -
    1. 代理软件和wsl2的sock端口冲突,使用netsh winsock reset重置修复。
    2. -
    3. Proxifer开发人员解释如下:
    4. -
    -
    -

    如果Winsock LSP DLL被加载到其进程中,则wsl.exe将显示此错误。最简单的解决方案是对wsl.exe使用WSCSetApplicationCategory WinAPI调用来防止这种情况。在后台,该调用在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog中为wsl.exe创建一个条目。
    这将告诉Windows不要将LSP DLL加载到wsl.exe进程中

    -
    -

    上述解决方案来自于:

    -

    https://github.com/microsoft/WSL/issues/4177

    -

    https://answers.microsoft.com/zh-hans/insider/forum/all/wsl2%E5%AE%89%E8%A3%85kali/b6dd4c62-1130-4a7c-9462-1e9e5f38dab2

    -]]>
    - - none - - - 代理 - WSL2 - proxifier - -
    - - 欢迎 pwn 分区(P盘) - /2020/08/welcome-pwn-partition/ - 今天再次尝试 wsl+gdb 调试,照舅失败

    -

    于是我搞了一个 “P分区”

    -
    -

    wsl+gdb,不行. ❌

    咕了很久还是想继续尝试gdb,wsl+gdb当然是最方便的一种方式了,打开命令行就可以用,都不需要开启 vmware。

    -

    但是很快的就遇到了问题。首先就是 wsl (我用的是Ubuntu16.04) 装好时是不支持32位程序的,通过搜索知道了安装启动 binfmt-support 就可以,让 wsl 能运行32位程序。

    -

    让64位的WSL(windows 子 linux系统)支持运行32位程序 - 简书

    -

    正准备开心的打开gdb调试,布星了。

    -

    在 gdb 里 start 可以,但是 ni 就不行了:

    -

    image-20200804185229605

    -
    pwndbg> ni
    Warning:
    Cannot insert breakpoint 1.
    Cannot access memory at address 0x80484a0

    Command aborted.
    - -

    查询了一波,感觉大概可能应该或许是 wsl 他就不能调试32位程序?

    -image-20200804184759075 - -

    你品你细品,wsl 装好的时候是只有64位程序支持的,32位直接给砍掉了,如果要运行32位还需要安装 binfmt-support ,32位程序仿佛不是 wsl 本来所支持的功能?

    -

    你品你再品,gcc编译成32位程序还需要加 -m32 编译参数,那么默认编译出来就是64位?32位是不是”过时”了?

    -

    阅读 binfmt-support 的介绍,可以看到

    -

    https://packages.debian.org/stretch/binfmt-support 上,写道:

    -
    ==========原文==========
    软件包:binfmt-support(2.1.6-2)
    Support for extra binary formats
    The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

    This package provides an 'update-binfmts' script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

    标签: 系统管理: 核心或模块, 软件开发: 解释器, 实做语言: implemented-in::perl, interface::commandline, 角色: 程序, 范围: 实用程序, 应用程序集: Debian
    ==========google机翻==========
    软件包:binfmt-support(2.1.6-2)
    支持额外的二进制格式
    版本2.1.43和更高版本的Linux内核中包含的binfmt_misc内核模块,使系统管理员可以根据幻数或文件扩展名注册各种二进制格式的解释器,并在匹配文件时调用适当的解释器。被执行。将其视为#的更灵活版本!可执行解释器机制。

    该软件包提供了一个'update-binfmts'脚本,软件包维护者可以使用该脚本注册要与此模块一起使用的解释器,而不必担心编写自己的init.d脚本,并且sysadmin可以将其用于稍高级别的接口。模块。

    标签: 系统管理: 核心或模块, 软件开发: 解释器, 实做语言: implemented-in::perl, interface::commandline, 角色: 程序, 范围: 实用程序, 应用程序集: Debian
    - -

    http://binfmt-support.nongnu.org/ 上,写道:

    -
    ==========原文==========
    binfmt-support
    The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.

    binfmt-support provides an update-binfmts script with which package maintainers can register interpreters to be used with this module without having to worry about writing their own init.d scripts, and which sysadmins can use for a slightly higher-level interface to this module.

    Versions 1.2.0 and above also support a mechanism for extending the range of binary formats among which the kernel can distinguish with the aid of a userspace helper, called a detector.

    The source code to binfmt-support can be retrieved from its Git repository (if you don't have Git, follow the link for installation instructions).

    This Web page is created and maintained by Colin Watson.
    Last modified: $Date: 2017/07/09 13:30:47 $
    ==========google机翻==========
    binfmt-支持
    binfmt_miscLinux内核版本2.1.43和更高版本中包含的内核模块,允许系统管理员基于幻数或其文件扩展名注册各种二进制格式的解释器,并在匹配文件被调用时调用适当的解释器。被执行。可以将其视为#!可执行解释器机制的更灵活版本 。

    binfmt-support提供了一个update-binfmts 脚本,程序包维护人员可以使用该脚本来注册要与此模块一起使用的解释程序,而不必担心编写自己的 init.d脚本,并且sysadmins可以将其用于该模块的更高级别的界面。

    1.2.0及更高版本还支持一种扩展二进制格式范围的机制,内核可以借助一种称为检测器的用户空间助手来区分二进制格式 。

    binfmt-support可以从其Git存储库中检索要获取 的源代码(如果您没有Git,请遵循链接以获取安装说明)。

    该网页由Colin Watson创建和维护 。
    上次修改时间:$日期:2017/07/09 13:30:47 $
    - -

    这两个网页说,binfmt-support 是32位程序的解释器,安装后将32位程序绑定使用它打开。这是不是有点像虚拟机风格? gdb和Linux内核应该还是不能支持32位(我猜的)

    -
    -

    vmware,好用!✅

    不多说了吧,VMware装一个Ubuntu来进行调试,肯定没问题

    -

    但是我还是想快速的访问Windows上那些文件夹。

    -

    https://cn.bing.com/search?q=vmware添加共享文件夹

    -

    由于我会常用到下载文件夹,所以把下载文件夹映射到share目录。

    -image-20200804221417612 - -

    Linux里面,文件夹在哪儿呢?

    -

    /mnt/hgfs/share

    -

    但是文件管理器进入这个目录,还是不能右键新建文件夹。

    -

    ls -al 查看权限,chmod 777 share授予最宽的权限,再次 ls -al查看权限

    -

    image-20200804222350672

    -

    image-20200804222407950

    -

    设置完后就可以像正常使用一样读写这个文件夹了,所做的更改,在Windows上全部同步。

    -

    可是,这个目录不太好打啊

    -

    我在 ~/.bash_aliases 里设置了share,来方便地命令行打开文件夹 alias share="cd /mnt/hgfs/share"

    -

    那么下次运行share命令就可以了,

    -

    (感觉还是哪里不太方便?)

    -
    -

    P盘 与 /pwn

    干脆把那个文件夹抽出来,用一个分区存?

    -

    好处:

    -
      -
    1. Windows上好找,单独一个分区呢,二进制文件放里面就好啦
    2. -
    3. 虚拟机里好找,vmware设置挂在文件夹时输入分区就行了,不用担心如果文件夹被移动,会导致虚拟机内不可用
    4. -
    5. wsl 里好找,众所周知,wsl 和Windows共享文件系统,是通过把Windows上的盘符,挂载到 /mnt,那么P盘对应就是 /mnt/p,可以说目录已经灰常好打了
    6. -
    7. 稳定不容易坏,他就是个单独分区,不存在移动文件夹导致找不到的问题,只要这个盘还在,就能用(盘不在就创建一个分区呗)
    8. -
    -

    在此电脑,右键,管理,磁盘管理,搞个新分区,我选的4G大小差不多了。大概像酱紫:

    -

    image-20200804164302218

    -

    操作完之后就多出来一个P分区。

    -
    -

    这里有一点经验教训就是新建分区后进去然后打开wsl是不行的,wsl还不能识别到分区,如果要识别,需要重启wsl,在管理员权限的cmd里运行:

    -
    net stop LxssManager
    net start LxssManager
    -
    -

    虚拟机设置挂载文件夹,同上文。然后运行 ls -al 就可以看到 p 文件夹:

    -

    image-20200804234159560

    -

    这次就,不设置 alias 命令了吧,直接,把这个文件夹,映射到根目录下的 /pwn

    -

    创建符号链接

    -
    sudo ln -s /mnt/hgfs/p /pwn
    - -

    image-20200804234628952

    -

    运行 ls -al

    -

    image-20200804234748499

    -

    来试一下好了没,运行 cd /pwn

    -

    image-20200804234951886

    -

    (这里新建p分区的时候应该应该选择exFat文件系统的。。)

    -

    (然后用 DiskGenius 格式化成了exFat。亲测可用)

    -

    image-20200805000450165

    -

    听说win10可以直接读取ext4 U盘,硬盘应该也快了。我试试格式化成ext4格式。

    -

    读取不了,资源管理器都不显示

    -

    尝试安装了一个 Ext2Fsd-0.69.exe,在 https://sourceforge.net/projects/ext2fsd/ 下载的

    -

    安装完成需要重启电脑,不敢重启,就算了不试了

    -

    格式化回exFat格式,可正常使用

    -

    下一步,放进文件

    -image-20200805002113063 - -

    下一步,在Linux中使用

    -

    image-20200805002130947

    -]]>
    - - pwn - - - gdb - linux - vmware - -
    - - 简简单单的记录一下gdb的亿点点常用的操作 - /2020/07/gdb-operation/ - .

    -

    gdb操作:


    -

    gdb ./xxx

    开始调试xxx程序,如果不能运行,需要先 chmod +x ./xxx

    -
    -

    gdb attach [pid]

    通过程序id即pid,gdb附加到一个正在运行的程序,并对其进行调试

    -
    -

    start

    运行程序并断点在第一条指令

    -

    输出寄存器,反汇编等信息

    -
    -

    list

    有源码的情况下 输出源码

    -
    pwndbg> list
    warning: Source file is more recent than executable.
    1 #include<stdio.h>
    2 #include<stdlib.h>
    3 #include<unistd.h>
    4 int main(){
    5 char num='0';
    6 char str[10];
    7 read(0,str,0x10);
    8 if(num=='1'){
    9 puts("great.\n");
    10 fflush(stdout);
    - -
    -

    b *内存地址

    在内存地址处下断点

    -
    -

    b 函数名/*函数名

    下断点

    -
    pwndbg> b main
    Breakpoint 1 at 0x80484dc: file pwn05_char[]_overflow.cpp, line 5.
    - -
    -

    info b

    查看断点信息

    -
    pwndbg> info b
    Num Type Disp Enb Address What
    1 breakpoint keep y 0x080484dc in main() at pwn05_char[]_overflow.cpp:5
    - -
    -

    step

    step(in),步入,在有源码调试时,执行下一行源码,有函数调用时进入函数调用

    -
    -

    next

    步过,在有源码调试时,执行下一行源码,有函数调用时执行完函数并执行到函数调用的下一行

    -
    -

    nexti/ni

    next instruction,步过,执行下一行汇编指令

    -
    -

    stepi/si

    step into,步入,执行下一行汇编指令,如果有函数调用时进入函数的第一行汇编指令

    -
    -

    finish

    运行完当前的函数,停在最后一句汇编代码

    -
    -

    info registers

    寄存器信息

    -
    -

    x/<n/f/u> <addr>

    格式:

    -
    f格式:
    x 按十六进制格式显示变量。
    d 按十进制格式显示变量。
    u 按十六进制格式显示无符号整型。
    o 按八进制格式显示变量。
    t 按二进制格式显示变量。
    a 按十六进制格式显示变量。
    c 按字符格式显示变量。
    f 按浮点数格式显示变量。

    u格式:
    b表示单字节
    h表示双字节
    w表示四字节
    g表示八字节。
    - -
    -

    一些GDB参考链接:

    https://blog.csdn.net/tzshlyt/article/details/53668885

    -

    https://www.jianshu.com/p/b7896e9afeb7

    -

    https://blog.csdn.net/u013525455/article/details/52813637

    -

    https://www.jianshu.com/p/e6af28e2566f

    -

    https://www.cnblogs.com/xiaoshiwang/p/10755199.html

    -

    https://www.cnblogs.com/xsln/p/gdb_instructions1.html

    -

    https://man.linuxde.net/gdb

    -

    https://www.cnblogs.com/tangtangde12580/p/8045980.html

    -

    https://www.cnblogs.com/zhoug2020/p/7283169.html

    -

    https://www.jianshu.com/p/adcf474f5561

    -

    https://blog.csdn.net/songchuwang1868/article/details/86132281

    -]]>
    - - pwn - - - gdb - -
    - - batch-shortcuts - /2020/07/batch-shortcuts/ - 教你设置 batch-shortcuts

    -

    img

    -

    PATH 环境变量介绍

    搬运自 知乎

    -

    PATH 环境变量

    经常使用命令行工具的话,对PATH等环境变量应该会非常熟悉;但现今的日常开发,接触到这一概念的机会越来越少。

    -

    时不时还是会遇到小朋友问我:“什么是PATH?”

    -

    这里记录一下,以供参考。

    -

    什么是环境变量?

    环境变量是操作系统提供给应用程序访问的简单 key / value字符串;windows/linux/mac都有同样的概念。

    -

    一般用于提供参数值给不同的应用程序。

    -

    什么是PATH变量?

    我们从命令行想要运行一个程序的时候,待运行的程序往往不是在当前目录。

    -

    PATH变量就是用于保存可以搜索的目录路径,如果待运行的程序不在当前目录,操作系统便可以去依次搜索PATH变量变量中记录的目录,如果在这些目录中找到待运行的程序,操作系统便可以运行。

    -

    Go开发为例,但我们使用go install命令编译、安装go程序后,可执行文件是会被保存在$GOPATH/bin路径下;那么我们可以把这个路径加入PATH变量中,这样我们便可以在任意路径中运行go安装的程序。

    -

    GOPATH

    GOPATH又是一个环境变量,用于保存go的主目录,go默认安装之后,GOPATH会是当前用户的主工作目录中的go子目录,即:%HOME/go

    -

    查看环境变量

    假设我们要查看GOPATH这个环境变量的值:

    -
      -
    • windows command prompt: echo %GOPATH%
    • -
    • windows powershell: $env:GOPATH
    • -
    • linux & mac: echo $GOPATH
    • -
    -

    设置PATH变量

    windows

    假设我们当前登陆操作系统的用户名是:xiaomin

    -

    然后我们要把c:\users\xiaomin\go\bin路径加入到PATH变量中,在windows下我们可以在PowerShell中执行:

    -
    $env:Path += ";c:\users\xiaomin\go\bin"
    - -

    注意,这样仅仅只是临时修改当前的PATH变量,当我们关闭、重开PowerShell时,就需要重新设置。

    -

    如果要永久的修改,需要使用管理员权限启动PowerShell,然后执行:

    -
    setx /M PATH "%PATH%;c:\users\xiaomin\go\bin"
    - -

    Linux & Mac

    同样假设我们当前登陆用户名是:xiaomin

    -

    然后我们要把/home/xiaomin/go/bin路径加入到PATH变量

    -
    export PATH=$PATH:/home/xiaomin/go/bin
    - -

    这同样是临时修改,重开shell之后,会被重置;要永久改变的话,一般是将上面的命令加入到我们使用的shell初始化文件中。

    -

    以bash为例,那么就是将上述命令加到/home/xiaomin/.bash_profile文件中。

    -
    -

    设置步骤

    1. pathext

    Windows上的另一个变量。这里存储可直接运行的文件类型,一般需要添加 .lnk 进去

    -

    2. 建立一个目录

    建立: D:\bin\batch-shortcuts

    -

    D:\bin\ 路径又简洁又舒服

    -

    3. 把目录写入path

    参照百度经验:windows10设置环境变量PATH

    -

    注意,设置完后,需要重启资源管理器和命令行来应用更改。

    -

    可以在任务管理器,选中资源管理器,选择重新启动

    -

    可以注销,然后登陆

    -

    可以重启

    -

    4. 然后就可以用了

    怎么用?

    -

    在上面那个文件夹内的所有文件,都是命令行可以访问到的。

    -

    一般可以创建:.bat .lnk ,.exe也阔以哇

    -

    举个栗子:

    -
    文件名:batch-shortcuts.bat
    explorer "D:\bin\batch-shortcuts"
    - -

    模仿Linux ctrl d 一键关闭风格,创建的 d.bat

    -
    文件名:d.bat
    exit
    - -

    比如md5

    -
    文件名:md5.lnk
    指向:"D:\Program Fies (Green)\WinMD5校验器.exe"
    - -

    还有一些调用程序的,比如安装Ubuntu后,写一个脚本来调用Ubuntu执行命令

    -
    文件名:ubuntu.bat
    @echo off

    echo.
    echo Usage:
    echo use "ubuntu run $code$" to run shell command

    echo.
    "C:/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_2020.1604.14.0_x64__79rhkp1fndgsc/ubuntu1604.exe" %*
    - -

    %* 是传递所有命令行参数,这个了解一下会有很大的帮助

    -

    如果不用这个,就得用 %1 %2 %3 %4 %5 %6 %7 %8 %9 ,而超过9的就不能再处理了

    -

    还有其他玩法,自己探索吧!

    -
    -

    关于 D:\bin 文件夹

    我一般把命令行调用的,编程语言类的,放在这里面,

    -

    (还有一些绿色IDE为代表的,可以一套带走的,我也放里面)

    -

    (还有DOS系统盘为代表的,系统级的底层的,我也放里面)

    -

    一方面是,这个路径他没有空格,不容易导致命令行调用出错。

    -

    第二是,他真的又简洁又舒服哇

    -

    列出一下目前为止我的 D:\bin 的内容

    -
    D:\bin>dir
    驱动器 D 中的卷没有标签。
    卷的序列号是 9E68-267B

    D:\bin 的目录

    2020/05/25 16:24 <DIR> .
    2020/05/25 16:24 <DIR> ..
    2020/05/25 16:25 <DIR> .gradle
    2020/03/17 20:23 <DIR> Anaconda3
    2020/03/23 01:30 <DIR> Android_SDK
    2020/06/05 10:42 <DIR> batch-shortcuts
    2020/07/16 17:22 <DIR> DOS-16bit
    2020/02/15 14:21 <DIR> eclipse-cpp
    2020/02/15 14:18 <DIR> eclipse-java
    2020/05/21 17:14 <DIR> ESP_8266
    2019/07/01 00:43 <DIR> HBuilder.9.0.1.windows
    2020/03/31 23:31 <DIR> HBuilderX.2.6.8.20200330.full
    2020/04/21 01:06 <DIR> Java
    2020/07/17 11:56 <DIR> nodejs
    2019/11/28 13:53 <DIR> Perl
    2020/03/18 23:53 <DIR> PortableApps
    2020/02/19 23:47 <DIR> Python
    2020/03/12 21:23 <DIR> Qt
    2020/03/10 23:30 <DIR> Ruby27-x64
    2020/03/23 21:16 <DIR> texlive
    0 个文件 0 字节
    20 个目录 57,676,476,416 可用字节

    D:\bin>
    - - - -]]>
    - - none - - - none - -
    - - 亿分钟成为时间管理大师 - /2020/07/time-management/ - 使用一个叫 manicTime 的软件

    -

    (好像最近越来越喜欢挖坑不填了哇)

    -

    (想了解的小伙伴请发邮件催更,联系方式在about页面有)

    -

    image-20200716102927688

    -]]>
    - - none - - - none - -
    - - QQ空间辅助点赞 - /2020/07/qzone-faster-like/ - QQ空间手滑点赞太麻烦,用键盘吧。

    -

    嗯,我文思枯竭了,编不出什么内容充实的文章,就写下过程贴代码吧

    -

    浏览器检查元素

    通过完成的审查元素发现:

    -
    所有的列表,元素的id:     feed_friend_list
    一个说说的,元素的class: f-single
    点赞按钮,元素的class: qz_like_btn_v3
    评论按钮,元素的class: qz_btn_reply
    - -

    写脚本

    之前考虑用jQuery实现,用油猴脚本,但是脚本对于加载jQuery有一点问题

    -

    因为QQ空间用了 $ 这个名字,但是不是jQuery,所以考虑用纯 js 实现。

    -

    后来啊。$ 不是可以用jQuery写么。就改成了jQuery实现

    -

    (jQuery真香)

    -

    用纯 js 添加点赞按钮的css

    var style = document.createElement('style');
    style.innerHTML="a.item-on {background-color: red;}"
    var head = document.head || document.getElementsByTagName('head')[0];
    head.appendChild(style);
    - -

    完整脚本 v0.1

    (还没想好怎么解释这个脚本。直接贴代码)

    -
    // ==UserScript==
    // @name QQ空间快速操作
    // @namespace https://blog.tcpsoft.app/
    // @version 0.1
    // @description try to take over the world!
    // @author tcpsoft
    // @match https://user.qzone.qq.com/*
    // @grant none
    // ==/UserScript==
    (function () {
    // Your code here...
    /* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
    function up(){
    console.log("上");
    }
    function left(){
    console.log("左");
    var first=jQuery(".f-single").eq(0);
    first.find(".qz_btn_reply").click();
    }
    function down(){
    console.log("下");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    first.slideUp(function(){this.remove()});
    //if(jQuery(".f-single").length==0){
    // window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
    //}
    }
    function right(){
    console.log("右 点赞");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
    console.log(zan.length);
    if(zan.length!=0){
    zan.eq(0).click();
    }
    first.slideUp(function(){this.remove()});
    }
    function beg(){
    console.clear();
    console.log("【【【【【】】】】】");
    /*插入输入框*/
    var $rect = jQuery('<div>\
    <style>\
    #rect {\
    height: 100px; width: 160px; border:red 5px solid; position:fixed;\
    z-index: 999; top:40px; margin-left:40%; margin-right:40%;\
    }\
    #rect:focus{ border:5px green solid; }\
    </style>\
    <textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n下 下一条\n左 评论\n右 点赞</textarea></div>');
    jQuery("body").append($rect);
    /*红色点赞*/
    jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
    /*红色提示和文字
    jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
    */
    /*监听document的回车操作 37左 38上 39右 40下*/
    jQuery("#rect").keydown(function(e){
    //获取键盘输入的keyCode
    //console.log(e)
    var keycode = (Number)(e.keyCode);
    console.log(keycode);
    if(keycode == 37){//左
    left();
    }else if(keycode == 38){//上
    up();
    }else if(keycode == 39){//右
    right();
    }else if(keycode == 40){//下
    down();
    }
    return false;
    });
    }
    console.log("----等两秒----");
    setTimeout(beg,2000);
    })();
    - - - -

    2020-08-01更新 v0.2

    增加了修复网络的功能。妈妈再也不用担心更新不出来啦

    -
    // ==UserScript==
    // @name QQ空间快速操作
    // @namespace https://blog.tcpsoft.app/
    // @version 0.2
    // @description QQ空间用键盘操作,岂不美哉
    // @author tcpsoft
    // @match https://user.qzone.qq.com/*
    // @grant none
    // ==/UserScript==

    (function () {
    'use strict';
    // Your code here...
    /* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
    function up(){
    console.log("上");
    }
    function left(){
    console.log("左");
    var first=jQuery(".f-single").eq(0);
    first.find(".qz_btn_reply").click();
    }
    function down(){
    console.log("下");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    first.slideUp(function(){this.remove()});
    //if(jQuery(".f-single").length==0){
    // window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
    //}
    }
    function right(){
    console.log("右 点赞");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
    console.log(zan.length);
    if(zan.length!=0){
    zan.eq(0).click();
    }
    first.slideUp(function(){this.remove()});
    }
    function beg(){
    console.clear();
    console.log("【【【【【】】】】】");
    /*插入输入框*/
    var $rect = jQuery('<div id="rect_div">\
    <style>\
    #rect_div{\
    position:fixed; z-index: 999; top:40px; margin-left:40%; margin-right:40%; width: 50%;\
    }\
    #rect {\
    height: 100px; width: 200px; border:red 5px solid; \
    }\
    #rect:focus{ border:5px green solid; }\
    #qzone_fix_button{\
    float:left; height: 50px; width: 100px; border:skyblue 2px solid; \
    }\
    </style>\
    <textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n下 下一条\n左 评论\n右 点赞</textarea>\
    <button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button></div>');
    jQuery("body").append($rect);
    /*红色点赞*/
    jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
    /*红色提示和文字
    jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
    */
    /*监听document的回车操作 37左 38上 39右 40下*/
    jQuery("#rect").keydown(function(e){
    //获取键盘输入的keyCode
    //console.log(e)
    var keycode = (Number)(e.keyCode);
    console.log(keycode);
    if(keycode == 37){//左
    left();
    }else if(keycode == 38){//上
    up();
    }else if(keycode == 39){//右
    right();
    }else if(keycode == 40){//下
    down();
    }
    return false;
    });
    }
    console.log("----等两秒----");
    setTimeout(beg,2000);
    })();
    - - - -

    2020-08-16更新 v0.3

    0.3版本,增加了简单的去除顶部的已点赞用户

    -

    代码:

    -
    // ==UserScript==
    // @name QQ空间快速操作
    // @namespace https://blog.tcpsoft.app/
    // @version 0.3
    // @description QQ空间用键盘操作,岂不美哉
    // @author tcpsoft
    // @match https://user.qzone.qq.com/*
    // @grant none
    // ==/UserScript==

    (function () {
    'use strict';
    // Your code here...
    /* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
    var list=["Cortana","Cortana"];
    function getFirstTime(){
    var first=jQuery(".f-single").eq(0);
    var timetime = first.find(".info-detail .ui-mr8.state").html();
    console.log(timetime);
    }
    function faded(first){
    getFirstTime();
    first.slideUp(100,function(){this.remove()});
    }
    function clearLiked(){
    jQuery("#finishedClearLiked").html("pending.");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    if(first.length==0){
    jQuery("#finishedClearLiked").html("finished.");
    return;
    }
    var nickName = first.find(".f-nick a").html();
    console.log(nickName);
    var matchList = false;
    for(i=0;i<list.length;i++){
    if(nickName.indexOf(list[i])>-1){
    matchList=true;
    break;
    }
    }
    if(matchList==true){
    console.log("进入{pass}分支");
    var second=jQuery(".f-single").eq(1);
    var nextZan=second.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//取消赞
    console.log(nextZan.length);
    if(nextZan.length!=0){ //下面有取消赞
    console.log("下面有取消赞,所以pass");
    first.remove();
    setTimeout(clearLiked,100);
    }
    else{ //下面没有取消赞,停止
    console.log("下面无取消赞,所以停止");
    var nickName = second.find(".f-nick a").html();
    console.log("下一个人是:",nickName);
    jQuery("#finishedClearLiked").html("finished.");
    }
    }
    else{
    var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
    console.log(zan.length);
    if(zan.length!=0){
    jQuery("#finishedClearLiked").html("finished.");
    }
    else{
    first.remove();
    setTimeout(clearLiked,100);
    }
    }
    }
    function up(){
    console.log("上");
    jQuery("#finishedClearLiked").html("pending.");
    clearLiked();
    }
    function left(){
    console.log("左");
    jQuery("#finishedClearLiked").html("free.");
    var first=jQuery(".f-single").eq(0);
    first.find(".qz_btn_reply").click();
    }
    function down(){
    console.log("下");
    jQuery("#finishedClearLiked").html("free.");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    faded(first);
    //if(jQuery(".f-single").length==0){
    // window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
    //}
    }
    function right(){
    console.log("右 点赞");
    jQuery("#finishedClearLiked").html("free.");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
    console.log(zan.length);
    if(zan.length!=0){
    zan.eq(0).click();
    }
    faded(first);
    }
    function beg(){
    console.clear();
    console.log("【【【【【】】】】】");
    /*插入输入框*/
    var $rect = jQuery('<div id="rect_div">\
    <style>\
    #rect_div{\
    position:fixed; z-index: 999; top:40px; margin-left:40%; margin-right:40%; width: 50%;\
    }\
    #rect {\
    height: 120px; width: 200px; border:red 5px solid; \
    }\
    #rect:focus{ border:5px green solid; }\
    #qzone_fix_button{\
    float:left; height: 50px; width: 100px; border:skyblue 2px solid; \
    }\
    #clearLikedDiv{\
    vertical-align: top;border: 2px solid yellow;width: 150px;height: 80px;\
    display: inline-flex;flex-direction: column;background-color: wheat;\
    }\
    #finishedClearLiked{\
    border: skyblue 2px inset; font-size: 1.5em;\
    }\
    #startClearLiked{\
    width: 100%;flex-grow: 1;\
    }\
    </style>\
    <textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n上 清理顶部已点赞\n下 下一条\n左 评论\n右 点赞</textarea>\
    <button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button>\
    <div id="clearLikedDiv">\
    <span id="finishedClearLiked">free.</span>\
    <button id="startClearLiked">清理已点赞</button>\
    </div>\
    </div>');
    jQuery("body").append($rect);
    jQuery("#startClearLiked").click(clearLiked);
    /*红色点赞*/
    jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
    /*红色提示和文字
    jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
    */
    /*监听document的回车操作 37左 38上 39右 40下*/
    jQuery("#rect").keydown(function(e){
    //获取键盘输入的keyCode
    //console.log(e)
    var keycode = (Number)(e.keyCode);
    console.log(keycode);
    if(keycode == 37){//左
    left();
    }else if(keycode == 38){//上
    up();
    }else if(keycode == 39){//右
    right();
    }else if(keycode == 40){//下
    down();
    }
    return false;
    });
    }
    console.log("----等两秒----");
    setTimeout(beg,2000);
    })();
    - - - -

    2020-08-16更新 v0.4

    增加显示最顶部五条动态内容,修复网络和状态条和删除顶部已点赞都放在最左边了

    -

    代码:

    -
    // ==UserScript==
    // @name QQ空间快速操作
    // @namespace https://blog.tcpsoft.app
    // @version 0.4
    // @description QQ空间用键盘操作,岂不美哉
    // @author tcpsoft
    // @match https://user.qzone.qq.com/*
    // @grant none
    // ==/UserScript==

    (function () {
    'use strict';
    // Your code here...
    /* https://greasyfork.org/zh-CN/scripts/373979-qq%E7%A9%BA%E9%97%B4%E5%8A%A8%E6%80%81%E8%87%AA%E5%8A%A8%E7%82%B9%E8%B5%9E/code */
    var list=["Cortana","今日百色","易锦教育","易锦大学","CUIT网络空间安全学院","丁凌娜","黄恋茹","Victor","墙"];
    function getFirstTime(){
    var first=jQuery(".f-single").eq(0);
    var timetime = first.find(".info-detail .ui-mr8.state").html();
    console.log(timetime);
    }
    function matchList(nickName){
    var match = false;
    for(i=0;i<list.length;i++){
    if(nickName.indexOf(list[i])>-1){
    match=true;
    break;
    }
    }
    return match;
    }
    function faded(first){
    getFirstTime();
    first.slideUp(100,function(){this.remove()});
    }
    function clearLiked(){
    jQuery("#finishedClearLiked").html("pending.");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    if(first.length==0){ //好友动态已经空了
    jQuery("#finishedClearLiked").html("finished.");
    return;
    }
    var nickName1 = first.find(".f-nick a").html();
    console.log(nickName1);
    var match1 = matchList(nickName1);
    if(match1==true){ // 第一个人是列表
    console.log("进入{pass}分支");
    var second=jQuery(".f-single").eq(1);
    var nextZan=second.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//查找取消赞
    console.log("第二个人有无取消赞:",nextZan.length);
    if(nextZan.length!=0){ //下面有取消赞
    console.log("下面有取消赞,所以pass");
    first.remove();
    setTimeout(clearLiked,125);
    }
    else{ //第二个人下面没有取消赞,
    console.log("第二个人下面无取消赞,");
    var nickName2 = second.find(".f-nick a").html();
    console.log("第二个人:",nickName2);
    var match2 = matchList(nickName2);
    if(match2==true){ // 第二个人也是列表
    console.log("进入{pass}分支");
    var third=jQuery(".f-single").eq(2);
    var nickName3 = second.find(".f-nick a").html();
    console.log("第三个人:",nickName3);
    var thirdZan=third.find("a.qz_like_btn_v3[data-clicklog='cancellike']");//取消赞
    console.log("第三个人有无取消赞:",thirdZan.length);
    if(thirdZan.length!=0){ //下面有取消赞
    console.log("第三个人下面有取消赞,所以pass");
    first.remove();
    setTimeout(clearLiked,125);
    }
    else{ //下面没有取消赞,停止
    console.log("下面无取消赞,所以停止");
    jQuery("#finishedClearLiked").html("finished.");
    }
    }
    }
    }
    else{
    var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
    console.log("第一个人有无点赞按钮:",zan.length);
    if(zan.length!=0){ // 有点赞按钮,结束
    jQuery("#finishedClearLiked").html("finished.");
    }
    else{
    first.remove();
    setTimeout(clearLiked,125);
    }
    }
    setTimeout(space,100);
    }
    function space(){
    for(var iii=0;iii<5;iii++){
    var one=jQuery(".f-single").eq(iii);
    if(one.length==0){
    jQuery("#statusTable").find("tr").eq(iii).find("td").eq(0).html("nickName");
    jQuery("#statusTable").find("tr").eq(iii).find("td").eq(1).html("timestamp");
    jQuery("#statusTable").find("tr").eq(iii).find("td").eq(2).html("content");
    }
    else{
    var nickName = one.find(".f-nick a").html();
    jQuery("#statusTable").find("tr").eq(iii).find("td").eq(0).html(nickName);
    var time = one.find(".info-detail .ui-mr8.state").html();
    jQuery("#statusTable").find("tr").eq(iii).find("td").eq(1).html(time);
    var summary = one.find(".f-info").text();
    jQuery("#statusTable").find("tr").eq(iii).find("td").eq(2).html(summary);
    }
    }
    }
    function up(){
    console.log("上");
    jQuery("#finishedClearLiked").html("pending.");
    clearLiked();
    setTimeout(space,100);
    jQuery("#finishedClearLiked").html("finished.");
    }
    function left(){
    console.log("左");
    jQuery("#finishedClearLiked").html("free.");
    var first=jQuery(".f-single").eq(0);
    first.find(".qz_btn_reply").click();
    setTimeout(space,100);
    }
    function down(){
    console.log("下");
    jQuery("#finishedClearLiked").html("free.");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    faded(first);
    setTimeout(space,100);
    //if(jQuery(".f-single").length==0){
    // window.scrollTo(window.scrollX, document.documentElement.scrollHeight);
    //}
    }
    function right(){
    console.log("右 点赞");
    jQuery("#finishedClearLiked").html("free.");
    var first=jQuery(".f-single").eq(0);
    console.log(first);
    var zan=first.find("a.qz_like_btn_v3[data-clicklog='like']");
    console.log(zan.length);
    if(zan.length!=0){
    zan.eq(0).click();
    }
    faded(first);
    setTimeout(space,150);
    }
    function beg(){
    console.clear();
    console.log("【【【【【】】】】】");
    /*插入输入框*/
    var $rect = jQuery('<div id="rect_div">\
    <style>\
    #rect_div{\
    position: fixed; z-index: 999;top: 40px; width: 90%; text-align: center; left: 0px; right: 0px; margin-left: auto; margin-right: auto;\
    }\
    #rect {\
    height: 140px; width: 210px; border:red 5px solid; \
    }\
    #rect:focus{ border:5px green solid; }\
    #clearLikedDiv{\
    vertical-align: top;border: 4px solid darkseagreen;width: 100px;height: 120px;\
    display: inline-flex;flex-direction: column;background-color: wheat;\
    }\
    #qzone_fix_button{\
    height: 50px; width: 100px; \
    }\
    #finishedClearLiked{\
    border: skyblue 3px inset; font-size: 1.5em;\
    }\
    #startClearLiked{\
    width: 100%;flex-grow: 1;\
    }\
    \
    #statusTable{\
    border-collapse: collapse;\
    display: inline-table;\
    vertical-align: top;\
    }\
    #statusTable tr td:nth-child(1){\
    background-color: #FFFFCC;\
    width: 100px;\
    }\
    #statusTable tr td:nth-child(2){\
    background-color: #DDDDDD;\
    width: 100px;\
    }\
    #statusTable tr td:nth-child(3){\
    background-color: #CCFFCC;\
    width: 300px;\
    }\
    </style>\
    <div id="clearLikedDiv">\
    <button id="qzone_fix_button" onclick="QZFL.cookie.set(\'page_engine_off\',1,\'qzone.qq.com\',\'/\',12);location = location.href;return false;">网络问题<br>立即修复</button>\
    <span id="finishedClearLiked">free.</span>\
    <button id="startClearLiked">清理已点赞</button>\
    </div>\
    <textarea type="input" id="rect" value="">输入区操作:\n触摸板双指上下滑刷新动态\n空格 加载前五条动态信息\n上 清理顶部已点赞\n下 下一条\n左 评论\n右 点赞</textarea>\
    <table id="statusTable" border="2"><tr>\
    <td>100</td><td>100</td><td>100</td>\
    </tr><tr>\
    <td>200</td><td>200</td><td>200</td>\
    </tr><tr>\
    <td>300</td><td>300</td><td>300</td>\
    </tr><tr>\
    <td>400</td><td>400</td><td>400</td>\
    </tr><tr>\
    <td>500</td><td>500</td><td>500</td>\
    </tr></table>\
    </div>');
    jQuery("body").append($rect);
    jQuery("#startClearLiked").click(clearLiked);
    /*红色点赞*/
    jQuery("head").append("<style id=\"addedCSS\" type=\"text/css\">a.item-on {background-color: red;}</style>");
    /*红色提示和文字
    jQuery("div.user-vip-info").eq(0).html("<span style='color:red;font-size:50px'>OOKK.</span>");
    */
    /*监听document的回车操作 37左 38上 39右 40下*/
    jQuery("#rect").keydown(function(e){
    //获取键盘输入的keyCode
    //console.log(e)
    var keycode = (Number)(e.keyCode);
    console.log(keycode);
    if(keycode == 32){//空格
    console.log("空格");
    space();
    }else if(keycode == 37){//左
    left();
    }else if(keycode == 38){//上
    up();
    }else if(keycode == 39){//右
    right();
    }else if(keycode == 40){//下
    down();
    }
    return false;
    });
    }
    console.log("----等两秒----");
    setTimeout(beg,2000);
    })();
    - -]]>
    - - none - - - none - -
    - - 手机差点报废后的自救 - /2020/05/Mi9-SE-screen-problem-self-rescue/ - 今天手机屏幕出问题手机差点变砖

    - - -

    莫名其妙的自动点击

    今天(前几天开始),手机使用的时候总是有莫名其妙的自动的点击,造成了一些困扰。

    -

    今天下午开始直接十点同时点击,在屏幕最下方!

    -

    脑补一下:打开输入法,啪啦啪啦给我按一堆 ,.,.,,,

    -

    打开设置,啪啦啪啦给我点进去不知道什么设置选项了

    -

    打开 Minecraft ,选中TNT,刚想摆,结果在右边给我放了一堆了(然后切换成火石…)

    -

    (事后模拟了一下,大概就像这样:)

    -

    -img - - - -

    考虑是不是系统卡顿

    img

    -

    锁屏,解锁。无效

    -

    关机,重启。无效。开机一会儿后又开始了,而且频繁的点击影响锁屏解锁!

    -

    什么?你想叫我重买?

    -不可能想都不要想_不要_可能表情 - - - -

    考虑是不是有病毒软件恶意程序

    浩浩荡荡开始卸载(半年了终于清理一次手机)

    -
    -

    顺手发现了小米系统的自动启动程序是真的恶心。刚关了几个,又给我打开了几个程序

    -
    -

    检查并卸载了:白鲸V₱N、老王V₱N、蚂蚁V₱N、旋风V₱N、Minecraft网易版、adbd insecure(系统使用过程中提示授予了root权限 所以严重怀疑这个)、VMOS(占用空间大,顺手卸了吧)、轻启动(有模拟点击,所以也怀疑这个,而且长得还丑,顺手卸了吧)

    -

    莫 有 卵 用 !

    -

    还是那么自由的十点暴击

    -

    冻结系统程序

    浏览小米系统管家,看到了下面的程序然后冻结了

    - - -

    心想重启一下才能停止运行系统服务呢。重启手机。结果:

    -

    触 摸 完 全 没 反 应 了 !

    -

    下图是网上随便找的,脑补一下随便怎么划都没反应的状态。当时我心里就直接:噔噔咚

    - - -

    咋办??????????????????

    -

    adb ?试试就逝世。

    连接电脑,adb shell进入命令行。

    -

    input,模拟触摸。不管用

    -

    -

    通过搜索,知道了如何列出已停用的系统程序

    -

    -

    通过搜索知道了启用已冻结的系统程序的方法,启用了两个,然后reboot重启

    -

    -

    还是不行。又启用了两个

    -

    -

    -

    重启,还是不行

    -

    突然想到鼠标

    摸出手机 USB-C OTG 转接头,拔掉电脑无线鼠标插上OTG插上TypeC口,

    -

    能用!

    - - -

    啊这?? 这变成巴掌大的 Android显示器了么

    -

    所幸是能用了

    -希望人没事_没事_希望表情 - -

    现在又咋办呢????????????

    -

    进入TRWP看看?

    截图就不截图了,脑补一下。

    -

    重启进入TRWP,各种操作都是正常的,甚至还很流畅。

    -

    判定硬件没有问题。

    -

    判定TRWP手机驱动正常可用。

    -

    MIUI系统有问题。

    -

    通过搜索,我们知道…

    搜你妹,上莆田医院啊

    -

    img

    -

    重装。。。系统?

    -

    然后又搜了一堆新版系统,又搜了刷系统。

    -

    不行,我程序还没备份。

    -

    于是打算开始用鼠标操作进行本地备份( 如何操作

    -

    此处省略 1w 字 …

    -

    浏览器历史记录:(信息量很大)image-20200526165743064

    -

    image-20200526165817077

    -

    image-20200526165855658

    -

    image-20200526165952401

    -

    image-20200526170059829

    -

    我想起高兴的细情

    手机发烫了。

    -

    想起前面哪篇文章说过触摸不行可能是屏幕上电荷什么的。。。

    -

    终于找到这篇文章了

    -

    解决方案:湿抹布,上下左右前前后后擦一遍,重启。

    -

    问题解决。

    -

    意不意外!惊不惊喜! - 没想到吧?我想到了哈哈哈!意不意外?惊不惊喜?刺不刺激?_想不到_装逼_斗图_怼人表情表情

    -]]>
    - - none - - - adb - -
    - - 大举报:仿佛那个时代又来临了 - /2020/05/dajubao/ - 转自 豆瓣 : 2019-05-25 03:37:45

    -
    -

    大举报:仿佛那个时代又来临了

    原创:梅骁

    -

    1

    -

    之前我很想写一篇文章,写举报是时代变坏的开始。

    -

    但最近我的想法变了,我们的时代不是在开始变坏,而是已经变得很坏了。

    -

    最近一个让我有这种感觉的事件是王晨艺的点赞事件。

    -

    王晨艺是今年《创造营2019》的一个选手,是个没什么背景的舞蹈老师,在《创造营2019》这个整体很糊的节目里人气排名很靠前。

    -

    你不知道他没关系,因为我其实对他也没那么熟悉。

    -

    但这两天他身上发生了一个事情,有人扒出他六年前曾经在微博点赞过荤段子,所以认为他点赞涉及“敏感问题”,认为他是劣迹艺人,要求他立刻退赛。

    -

    img

    -

    看到这条新闻的时候,我觉得这一切都荒谬透顶。

    -

    最可怕的还不是有人认为一个人点赞荤段子所以他就是劣迹艺人,最可怕的是居然有人为了寻找一个人的“劣迹”而去疯狂翻查这个人过去多年的人生经历,试图寻找出一个黑料、一个过失,并对此大加举报攻击,以达到封杀、退赛的目的。

    -

    这个画面实在太可怕了。

    -

    一个人,他面无表情地盯着手机、盯着电脑,去从另一个人过往的茫茫人生经历里寻找一个错漏之处,就为了攻击他、打垮他。

    -

    你十年前说过脏话、你五年前垃圾没扔进垃圾桶、你三年前打过人一拳……这些全部都有可能成为你被攻击的素材。

    -

    这太可怕了,这画面的恐怖程度不亚于任何一部恐怖片。

    -

    因为我们谁都不能保证自己过往人生里从没有过任何错漏不当之处,所以我们任何人都有可能成为被这种手段打倒的那个。

    -

    2

    -

    时间稍微往前推一下。

    -

    今年三月份时,曾经发生过一件事,重庆一所高校里,有个老师因为课堂上发表损害国家声誉的过激言论而被学生举报。

    -

    学校很快发布公告,认为他违反教师职业道德,撤销了他的教师资格。

    -

    img

    -

    这是举报者的又一次胜利,可我看得特别害怕。

    -

    试想一下,当一个大学老师在课堂上讲话都可能会被举报的时候,他会怎么办?

    -

    他会只敢讲那些最安全、最无聊也最没有价值的东西,因为只有那些东西才是不会被举报的,与传道授业解惑相比,当然是个人的安全最重要。

    -

    这次是撤销教师资格,下次可能就是被判刑入狱,不,据我所知,已经有大学老师因为这个而入狱三年了。

    -

    img

    -

    所以,会越来越少人敢冒这个风险。

    -

    可是,你知道吗,现代大学教育跟中世纪大学教育的区别就在于,中世纪大学是传授已有知识的场所,而现代大学则担负着不断开拓新的知识和学科的职能。

    -

    所以,从1809年现代大学由柏林大学创立开始,“自由”都是大学最核心的关键词。

    -

    曾经在清华大学里,闻一多是言论最激进的教授,动不动就要在课堂上发表演说,后来更是在西南联大的广场集会上高声呼喊,对学校大肆批评。

    -

    img

    -

    闻一多

    -

    当时政府要求学校解聘闻一多,时任校长梅贻琦根本不理会,即便他自己也对闻一多的言行很不满,但他知道“自由”才是让大学教育保持活力的唯一动力。

    -

    而当“举报”出现在大学课堂上,当大学老师的每一句话都可能成为被举报的理由和材料时,还谈什么自由,谈什么进步。

    -

    我们的年轻一代在面对自己不认可的言论时第一反应已经不是“与他辩论”“将他驳倒”,而是熟练的使用举报手段“我要举报他,堵上他说话的嘴巴”。

    -

    并且他们一次又一次的成功做到了。

    -

    他们毁掉的不只是一个又一个老师,他们毁掉的更是教育本身。

    -

    这真的很可悲。

    -

    3

    -

    前两天,在豆瓣鹅组有这么一个帖子,内容是一个投票。

    -

    帖子的作者问大家,如果你发现你的父母、爱人、师长、朋友发表了不当言论,你要不要举报ta?

    -

    那个帖子里甚至详细地把这些人分成了“关系亲近的父母”“有过过节的朋友”“分手分得不愉快的前任”等等,把这些人分门别类地做了投票,问当这些发表了不当言论,你要不要举报。

    -

    这还不是最可怕的,最可怕的是下面的跟帖是真的认真在讨论。

    -

    有人说,父母是绝对不会举报的。

    -

    有人说,就算是爸妈,说了不当言论,也不能姑息。

    -

    有人说,分得不愉快的前任、有过节的朋友当然要举报啊。

    -

    诸如此类,林林总总,这些讨论才是我觉得最可怕的地方,因为大家都默认了“举报”的合法性,默认了当一个人发表了不当言论,他就应该被举报。

    -

    这实在太荒谬了。

    -

    没有任何一个人应该因为他的言论而被举报

    -

    当你遇到一个人说了你不认可的、甚至你极端厌恶的言论,你要做的事情应该是去反驳他、去驳倒他,去用你的思想、你的知识、你的言论去和他正面对决。

    -

    “我看不惯你的言论,所以我要反驳你”,这才是一个文明社会的人应该做的事情。

    -

    而“举报”是“我看不惯你的言论,所以我要堵上你的嘴,不让你说话,我堵不上,我就让更高的权力去堵你的嘴”。

    -

    这是个太可怕的思路。

    -

    一旦你把对言论正确与否的决定权交给了更高的权力,那今天被打倒的是你看不惯的人,明天被打倒的就可能是你自己。

    -

    不要觉得自己一辈子都不可能有任何错漏,任何人都会有错漏,任何人都会在某些情况下发表不当言论。

    -

    甚至,很可能今天还是很合情合理合法的言论,明天就会变成不当言论。

    -

    枪口不会因为你曾经是举报者,就对你网开一面。

    -

    4

    -

    其实,最近这两年来,举报已经越来越常见

    -

    有粉丝为了打击别家偶像,就去举报对方主演的作品有思想问题,有的就去挖对方多年前的微博、文章,试图找出蛛丝马迹、错漏之处。

    -

    我们其实是眼看着这股风气越兴越胜的。

    -

    有人因言获罪入狱,有人靠举报他人以达到打击报复的目的。

    -

    有人讨论当父母发表不当言论时,要不要与父母划清界线。

    -

    有人认真觉得堵上越来越多的嘴,这世界才会变得更好。

    -

    我们已经可以看到那个可预见的未来了。

    -

    在那个未来里,大家会因为不知道自己哪天因为哪句话被举报,所以大学老师会越来越不敢说话,亲人、爱人、朋友之间会越来越无法相信彼此。

    -

    甚至,就连你用滴滴打个车,都可能被司机举报你有不当言论,只因为你在车上和朋友讨论了一下性少数群体的话题。

    -

    img

    -

    我们已经能看到那个人人自危的未来就在不远处了。

    -

    你我都知道那会是个糟糕、邪恶的时代,我们早就见识过了。

    -

    但你我也都知道,我们是很难阻挡举报时代的来临的。

    -

    不,其实风行举报的时代早就已经在我们没注意时来临了,它早就已经深入到了我们生活的方方面面。

    -

    可这是不对的,无论多少人这么做,它都依然是不对的。

    -

    它会毁掉教育,毁掉创造和文化,毁掉人与人之间的信任,毁掉所有自由进步的可能性。

    -

    它不是将要到来,它是已经到来了。

    -

    你我都拦不住这个糟糕时代的来临。

    -

    但至少,我们可以选择不使用它,我们可以选择不做这个糟糕时代的共犯。

    -]]>
    - - none - - - none - -
    - - adb自动刷钱 - /2020/05/adb-auto-make-money/ - 这是一款名字叫“Zen Idle”的游戏。来尝试下自动刷钱

    -image-20200505094215251 - - - -

    【adb获取包名以及当前运行的activity】

    -
    adb shell dumpsys window | findstr mCurrentFocus
    - -

    输出:

    -
    mCurrentFocus=Window{98555ab u0 com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity}
    - -

    由包名获取apk路径

    -
    adb shell pm path io.ionic.starter
    - -

    【adb命令行启动应用程序】

    -
    adb shell am start -n 包名/类名
    - -

    如:

    -
    adb shell am start -n com.android.music/com.android.music.MusicBrowserActivity
    - -

    【adb shell 修改系统时间】
    下面命令亲测可用,假如当前时间 01月05号08点23分改成 01月05号12点23分

    -
    adb shell date "01051223"
    - -

    【按钮的位置】
    找到开发者选项,开启“指针位置”,在游戏里找到按钮的范围
    Claim按钮
    X: 390-690 300 540
    Y: 1212-1362 150 1287
    关闭广告按钮
    x 915
    y 835

    -

    【Android adb 模拟滑动 按键 点击事件】

    -

    关于tap的话,他模拟的是touch屏幕的事件,只需给出x、y坐标即可。
    此x、y坐标对应的是真实的屏幕分辨率,所以要根据具体手机具体看,比如你想点击屏幕(x, y) = (250, 250)位置:

    -
    adb shell input tap 250 250
    - -

    此处我:

    -
    input tap 540 1287
    - -
    input tap 915 835
    - -

    【总命令】

    -
    adb shell date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
    - -

    加点循环

    -
    for I in $(seq 1 20);do
    echo $I/20 ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
    done
    - -

    写入sh脚本,懒得每次输入了

    -
    echo 'for I in $(seq 1 20);do\n    echo $I/20 ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3\ndone' >zen.sh
    - -

    【adb 安装卸载程序】
    adb root 失败,提示adbd cannot run as root in production builds
    网上说安装adbd-Insecure-v2.00.apk,亲测无效。还是每次adb shell然后su吧。

    -
    adb install ./adbd-Insecure-v2.00.apk

    adb shell pm list packages|grep adb
    输出: package:eu.chainfire.adbd

    adb uninstall eu.chainfire.adbd
    - -

    【尝试只改时间】

    -
    date "01010101" ; date "01010601"
    - -

    并不能让程序显示奖励窗口(必须先退出这个页面再进入)

    -

    并不能让程序显示奖励窗口(必须先退出这个页面再进入)

    -

    【进一步的集成】
    通过命令行参数决定要循环几次

    -
    echo 'CNT=10
    if [ $# != 0 ] ; then
    CNT=$1
    fi
    for I in $(seq 1 $CNT);do
    echo $I/$CNT ; date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; date "01010101" ; input keyevent 3
    done' >zen.sh
    - -

    然后:

    -
    adb shell
    cd /sdcard/_sh
    su
    . ./zen.sh 20
    - -

    【手机闹钟BUG级响起】
    无解
    可以关闭闹钟

    -

    【尝试只在date的时候用su执行】

    -
    mkdir /sdcard/_sh
    echo 'CNT=10
    if [ $# != 0 ] ; then
    CNT=$1
    fi
    for I in $(seq 1 $CNT);do
    echo $I/$CNT ; su -c date "01010601" ; am start -n com.TechTreeGames.ZenIdle/com.unity3d.player.UnityPlayerActivity ; sleep 1 ; input tap 915 835 ; input tap 915 835 ; input tap 540 1287 ; sleep 1 ; su -c date "01010101" ; input keyevent 3
    done' >/sdcard/_sh/zen.sh
    - -

    完美~
    但是会每次date的时候显示“已授予shell超级用户权限”,看着很难受
    先su再执行脚本就不会了

    -

    可以在电脑上adb shell进去执行脚本,也可以用手机啦

    -

    【视频演示】

    - - - - -

    - - -
    - -]]>
    - - none - - - adb - -
    - - Why linux - /2020/03/why-linux/ - 学习Linux之前,了解Linux哲学和Linux设计思想是必要的。

    -

    然后就是开始敲命令了啦

    -

    Linux哲学

    知乎:《unix/linux 设计哲学》

    https://zhuanlan.zhihu.com/p/57521605

    -

    内容太多,不要求完全记住。可以以后回来再翻阅

    -

    博客园:Linux的哲学思想

    Linux哲学思想:

    -
      -
    1. 一切皆文件;
    2. -
    3. 小型,单一用途的程序;
    4. -
    5. 连接程序,共同完成复杂功能;
    6. -
    7. 避免令人困惑的用户界面;
    8. -
    9. 配置数据存储在文本中;
    10. -
    -

    解释:
    一切皆文件:是 Unix/Linux 的基本哲学之一。不仅普通的文件,目录、字符设备、块设备、 套接字等在 Unix/Linux 中都是以文件被对待;它们虽然类型不同,但是对其提供的却是同一套操作界面。

    -

    小型,单一用途的程序:程序和可执行文件不要太复杂,这样才能保证了linux内核的高效运行

    -

    连接程序,共同完成复杂功能:复杂的任务可以通过连接多个简单的程序实现复杂的功能。对于复杂的功能linux通过许多简单程序的组合等方式实现,在保证简单功能的高效性的同时,复杂的程序也必然是高效性的

    -

    避免令人困惑的用户界面:如windows那样出了问题一般人选择的会是重启,实在是不行的话就是 重新 安装系统了,因为对于windows那样不是开源的,并且用户界面比较 复杂操作系统出了问题,一般的人是根本没有办法解决的。但是linux就不一样了,第一linux是开源的,无论什么问题都可以通过简洁的命令行实现 排错,修改系统的配置,一切都是简洁明了为基础。

    -

    配置数据存储在文本中:linux所有的配置文件都存放在文本配置文件当中,无论什么配置修改都只需修改其配置文件即可,配置文件时文本形式的只需任意一款文本编辑器修改即可而不是类似于windows那样将保存在注册表中,并且windows的注册表需要专门的二进制或十六进制的编辑器才可编辑,修改比较复杂

    -

    bilibili:Linux哲学视频资料1:

    哲学的魅力 | 非Windows系统家族的魅力之所在:“一切皆文件”

    -

    https://www.bilibili.com/video/BV1Yb411g79x

    -

    (命令不会没关系,了解一下“哲学”就好)

    -

    bilibili:Linux哲学视频资料2

    TED-Linux背后的精神 _ Linus Torvalds

    -

    https://www.bilibili.com/video/BV1a4411t7Kt?p=1

    -

    (一个有英文字幕的双语版本:)

    -

    https://www.bilibili.com/video/BV1J7411v7BD

    -
    -

    系统目录结构

    Linux 里面最重要的概念估计就是“一切皆文件”了,我们来看看Linux系统的根目录结构。

    -

    首先是 Linux 不像 Windows 这种,系统里面看起来有多个“盘”,C,D,E,F,什么的,

    -

    在 Linux,只有一个“盘”(可以假想成 C盘),但是里面文件夹却有很多。

    -

    img

    -

    我们来看看菜鸟教程 Linux 部分是怎么说的:

    -

    https://www.runoob.com/linux/linux-system-contents.html

    -

    其中用得比较多的文件夹也不是很多啦:

    -
    /dev	虚拟的,你的硬件设备会列出在这里
    /etc 配置文件的集散地
    /home 用户目录,相当于 Windows 的 %USERPROFILE% (你可以试试把这个输入资源管理器的地址栏回车)
    /media 一些设备出现在这里
    /mnt 用于挂载文件系统(插入U盘并挂载后在这里找)(wsl可以在这里访问主系统文件)
    /bin | /usr/bin | /usr/sbin 你看到文件出现在这里,那大概率是可执行程序这样的东西了
    /var 做 web 你会爱死的
    - -
    -

    Linux终端

    终端(Terminal),也叫命令行,顾名思义,输入命令的地方。就是经常见到的黑窗口(当然并不见得都是黑的)

    -

    命令行是 Linux 最常见的状态,GUI (Graphical User Interface,图形用户界面) 反而不是

    -

    在 Linux 终端干得最多的一件事当然是敲命令了,命令一般是如下格式:

    -

    command [-option] parameter1 parameter2...

    -

    我们来看几个参考链接:

    -

    图示直观的:https://blog.csdn.net/pl0020/article/details/82012881

    -

    分析有理的:https://blog.csdn.net/wangjianno2/article/details/16344807

    -

    详细深入的:http://c.biancheng.net/view/720.html

    -

    这里还想 bb 几句:

    -
      -
    1. Windows Linux都有命令行(Windows早期DOS也是命令行系统),但是操作习惯有些小不同
    2. -
    3. Windows 参数一般是 /option,Linux 大多是 -option --option
    4. -
    5. Windows 获取帮助一般是 /? ,Linux 大多是 -h -help --help
    6. -
    7. Windows 路径以反斜杠 \ 分隔,Linux 路径由正斜杠 / 分隔
    8. -
    9. Windows 命令行能运行 .bat 批处理脚本,Linux终端能运行 .sh 批处理脚本,语法大部分不同,少数相同
    10. -
    -
    -

    开始背命令吧

    必学的少数命令

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    lsllcdtouchclearpwdmkdircatmore
    lesstailcpmvrm(谨慎)findvi/vim|grep
    pskillipconfigtarrebootshutdownhaltchmod
    -

    这里是一些介绍:https://blog.csdn.net/weixin_44706512/article/details/90604635

    -

    菜鸟教程:Linux 命令大全

    其他的,少见的,忘了的,可以在这里速查,也可以学习积累:

    -

    https://www.runoob.com/linux/linux-command-manual.html

    -

    Linux常用命令大全(和用法)

    https://www.cnblogs.com/fnlingnzb-learner/p/5831284.html

    -
    -

    Q&A

    Linux 怎么装?

    必应搜索“WSL安装”:https://cn.bing.com/search?q=wsl%E5%AE%89%E8%A3%85

    -

    必应搜索“VMware 安装 Linux”:https://cn.bing.com/search?q=VMware+%E5%AE%89%E8%A3%85+Linux

    -

    想知道VMware安装详细某版本,把上面 Linux 换成你的对应详细版本即可,如:Ubuntu18.04

    -

    发行版这么多,用哪个版本好?

    初学者:Ubuntu、deepin。极客:Arch。服务器用户:CentOS。发烧玩家:Steam OS。

    -

    哪儿去获取 Linux 镜像?

    千万别再去XX下载站了。

    -

    必应搜索你想要的系统名字,搜索结果第一条都是官方网站了,一般他们域名都是 系统名.org,这是非营利组织的域名,也有部分是 系统.com,如Ubuntu,因为它包含了商业发行版。

    -

    打开网站,在醒目的位置,都能找到 Download 这种东西,仔细寻找,可以找到 .iso 镜像下载链接。如果下载慢,可以使用 国内镜像站 ,他们提供了高速的软件下载和软件源服务,像 清华源阿里云网易等等

    -

    我应该使用 root 用户吗?

    不建议。应当在系统安装过程中设置好用户名和密码,以后使用需要高权限的命令应该使用 sudosu

    -]]>
    - - pwn - - - linux - -
    - - 科学地让 OneDrive 飞,下载速度 5Mb/s - /2020/03/let-onedrive-fly-scientifically/ - OneDrive 是 Microsoft 的一个云存储服务,安装后集成在 Windows 资源管理器,所以比其他任何网盘都更有其与生俱来的优势。但由于众所周知的原因,OneDrive 的访问速度也极低。
    访问速度慢还不算了,还经常会死在某个进度,一直下不动,这是最**的

    -image-20200321165324494 -
    你看这 243KB/秒 长得多标致啊
    - - -

    解决方案

      -
    1. ShadowsocksR
    2. -
    3. Proxifier
    4. -
    5. 设置 OneDrive 多线程
    6. -
    -

    1. ShadowsocksR

    略。

    -

    配置好之后应该是会开启 127.0.0.1:1080 ,HTTP、Socks5 均有(没出问题的话默认就是这个配置)

    -

    2. Proxifier

    搜索Proxifier找到官网:https://www.proxifier.com/download/

    -image-20200321172127587 - -

    下载 Proxifier Standard Edition ,这个是安装版,Portable是绿色版,这里不用绿色版。

    -

    下载下来exe双击安装,安装过程中勾选Create a desktop shortcut,完了之后会默认打开软件,关掉它(你也可以在最后一步取消勾选Launch Proxifier)

    -

    在桌面快捷方式右键,用管理员权限运行。打开之后是长这个样子的:

    -image-20200321175935712 - -

    选择31天试用,或者输入注册码,如果输入注册码,最好是勾选All userss on this computer(require administrator),然后就会打开程序主界面

    -

    image-20200321180424905

    -

    我们当然是希望开机启动,所以开启Autostart

    -image-20200321191843270 - -

    通过Profile->Proxy Servers,添加 HTTPS 和 Socks5 代理配置

    -image-20200321181035454 - -

    通过Profile->Proxification Rules,配置软件代理规则

    -

    image-20200321182841860

    -

    我们在这里添加OneDrive。

    -

    先找到OneDrive的可执行文件的位置。一般应该是在%localappdata%\Microsoft\OneDrive\

    -

    如果没有,运行OneDrive,打开任务管理器,在详细信息标签页,找到onedrive.exe,右键打开文件所在位置

    -

    点击上面窗口的Add,添加配置。点击Browse输入OneDrive目录,选择onedrive.exe,action选择通过socks5代理

    -image-20200321183611160 - -

    保存,并把 default 的 action 设置为 direct(你也不希望所有程序都通过代理对吧)

    -image-20200321183553240 - -

    任务栏里面右键 OneDrive,更多,关闭 OneDrive,再找到刚才的OneDrive程序位置,开启OneDrive。

    -

    我们随便下载一个文件看看:

    -

    image-20200321191651660

    -

    3. 设置 OneDrive 多线程

    你好像速度没我快?那肯定是你氪金不够(bushi),那就试试开启 OneDrive 多线程

    -
    修改这个文件:
    "%localappdata%\Microsoft\OneDrive\settings\Personal\global.ini"
    可通过win r运行,或cmd里运行下面直接打开修改:
    notepad "%localappdata%\Microsoft\OneDrive\settings\Personal\global.ini"
    - -

    第一行加入:

    -
    numberOfConcurrentUploads=3
    - -
    -

    PS:数值项即为线程数,最小值为1,最大值为3,根据实际需要选择即可

    -
    -image-20200321193422745 - -

    效果:(奇怪的网速增加了)

    -

    image-20200321213449574

    -]]>
    - - 科学上网 - - - 代理 - OneDrive - -
    - - 用 Visual Studio 2019 写 C++ 基础代码 - /2020/03/cpp-with-Visual-Studio-2019/ - 什么?你不会用VS?

    -

    准备工作

    安装 Visual Studio2019 Community,不多说了,虽然可能出现很多问题。这里假定你已经有安装好的 VS2019。

    -

    打开VS,创建项目

    打开VS2019,看到如下界面。

    -

    image-20200306134632068

    -

    选择C++,Windows,选择控制台应用。

    -

    image-20200306134730096

    -

    填写项目名称和存储位置,点击创建。

    -

    image-20200306134821590

    -

    然后就会打开工程界面,在右边的解决方案资源管理器,源文件,可以找到刚才填写的名字的cpp文件,双击打开(默认会打开的),在左边正常编写代码,按 F5 运行,或点击上面绿色三角形,“本地Windows调试器”,(可以直接点也可以菜单栏选择调试,开始执行不调试(快捷键Ctrl+F5))

    -

    image-20200306134954770

    -

    没有“控制台应用”选项?

    创建项目窗口,拉到最下面,找到安装

    -

    image-20200306135632223

    -

    在打开的窗口,勾选安装这三个。(其他的可以根据需要添加)(如果你确实不用VS开发高级应用,只勾选“使用C++的桌面开发”也就可以了)

    -

    image-20200306135706897

    -

    另外需要注意的是,如果想要图形化设计程序界面,(即MFC),需要在勾选“使用C++的桌面开发”之后,勾选右边的 C++ MFC v142

    -

    image-20200306135751221

    -

    ,然后开始安装即可。可以选择下载时安装(下载一个安装一个),下载完成安装(全部下载完再一起装),我个人偏好后一种

    -

    (等待巨长时间,安装完成后再同理创建项目。)

    -

    用VS进行简单调试

    断点

    在需要暂停的代码这一行前面灰色区域鼠标单击,出现一个红色圆点,就是下断点。

    -

    image-20200306141237786

    -

    F5 开始调试,或点上方“本地Windows调试器”或菜单栏调试,开始调试。

    -

    VS界面会发生变化,且之前下断点位置会变成橙色箭头,表示程序当前正在执行这一行代码。此时程序暂停,可以查看变量值和一行一行运行程序。

    -
      -
    • 鼠标悬停在变量上,可以查看变量值。

      -
    • -
    • 选中变量,右键,添加监视,可以在下方监视面板自动显示变量值

      -
    • -
    • 在代码里鼠标右键,快速监视,输入变量名,可以添加多个变量监视,也可以添加表达式监视,比如a+b+c

      -
    • -
    -

    image-20200306142152438

    -

    单步运行

    图示的四个按钮。

    -
      -
    • 显示下一条语句
    • -
    • 逐语句
    • -
    • 逐过程
    • -
    • 跳出
    • -
    -

    image-20200306142607239

    -]]>
    - - 基础 - - - CPP - VisualStudio - -
    - - 群里提问的艺术 - /2020/03/how-to-ask-in-group-chat/ - 现在互联网发达的时代,大家都会有很多的群,xxx 交流群、xxx 技术交流、xxx开发群、xxx技术学习群等,大家的初心可能都是想交流的,遇到点问题然后就可以在群里问。

    -

    然而很多时候你问的问题没人回答;也有时候问了半天还是没找到答案;也有时候当你把问题发出来了,别人正准备回答你的时候,你说知道了;然后刚开始群里很活跃,慢慢的就死了。

    -

    其实以上问题,都是大家不想看到的,然而在群里提问是我们加入群的初心,但是很多人做不好,最终导致你的问题无人解答,群慢慢的失去意义。

    -

    今天我所谈的就是群里提问的艺术,让你的问题快速得到解决。

    -

    我将今天的问题分成以下三部分进行介绍:

    -
      -
    • 提问之前
    • -
    • 提问之时,怎么提问
    • -
    • 注意事项
    • -
    -

    提问之前

    在群里提问之前首先我们应该做好功课,看自己是否完成以下步骤,否则你的提问将一塌糊涂,大概率得不到想要 的答案。

    -
      -
    1. 尝试自己解决
    2. -
    3. 不能自己解决应该准备的哪些
    4. -
    -

    尝试自己解决

    尝试自己解决是非常重要的一步,这也是我们能否经过这个问题能够成长的关键所在。

    -
      -
    1. 通过搜索引擎搜索:baidu 或者 google(推荐),搜索结果中前三页如果找不到你想要的信息,就进行下一步吧。对于成熟的开源项目,你遇到的问题,很可能别人也遇到过。这时通过 Google、StackOverflow 等网站的搜索服务,可以帮你快速定位并解决问题。永远记住,地球上的你并不孤单,包括你遇到的问题。
    2. -
    3. 查阅手册/文档:确保自己阅读过至少一次官方文档。这样在遇到问题时,如果能回忆起只言片语,就可以再去读一遍相关文档,问题往往也就解决了。
    4. -
    5. 查阅社区/论坛:阅读常见问题文件(FAQ)或者开源项目的 issue,或者论坛(类似 react china)
    6. -
    7. 询问朋友:如果你使用的开源软件,在朋友圈或同事圈里也有人使用,那么抬起你的脚、或拿起你的电话,真挚诚恳的探讨不会遭遇拒绝,而会增进友谊。不要犹豫,你的内心渴望面对面交流,你的朋友也是。
    8. -
    9. 自检并不断测试:试自己检查或试验以找到答案。
    10. -
    11. 阅读源码(这步非必须):如果你是程序开发者,尽量尝试阅读源码以找到答案。
    12. -
    -

    经过以上 6 步或者 5 步你都无法解决遇到的问题,那么你确实针对这个问题能力有限,准备去群里请教了,那么在尝试自己解决之后无果,应该做哪些准备呢?

    -

    不能自己解决应该准备的哪些

      -
    1. 一定要明白自己想要问什么问题:不能自己都说不清自己想要问什么问题,那么群里提问你也问不出什么来。
    2. -
    3. 梳理准备您的问题:要说明之前你都干了些什么。
    4. -
    5. 要用言简意赅的语言:这个是我们作为职场一个必备的技能,说重点,言简意赅。
    6. -
    -

    怎么提问

    抱着平和对等的心态,找到合适的途径后,就得静下心来将遇到的问题写成文字。书写文字不是一件简单的事情,我们可以从遵循一些简单的规则开始。

    -

    用词准确,问题明确

    标题要简洁清晰,要言之有物。

    -
    -

    Bad:救命呀/急/跪求,遇到了一个 react 问题,xxx 组件渲染不出来

    -

    Good:在使用 xxx 版本的 react ,我操作了 xxx,也写了 xxx,但是 xxx 组件渲染不出来

    -
    -

    一个好标题范例是目标 —— 差异式的描述,许多技术支持组织就是这样做的。在目标部分指出是哪一个或哪一组东西有问题,在差异部分则描述与期望的行为不一致的地方。

    -

    描述清晰,信息充足

      -
    1. 准确有效的信息:描述事实,而不是猜测,如果你想给出你的猜测,一定要先描述事实,给你的猜测一些证据,不然就不要猜测。
    2. -
    3. 问题表现/内容:按照时间顺序列出问题症状。问题发生前的一系列操作,往往就是对找出问题最有帮助的线索。因此,你的说明里应该包含你的操作步骤,以及机器和软件的反应,直到问题发生。在命令行处理的情况下,提供一段操作记录(例如运行脚本工具所生成的),并引用相关的若干行(如 20 行)记录会非常有帮助。
    4. -
    5. 简单的做过什么尝试:在描述你做过什么尝试的时候,简单的你描述你做了哪些尝试就行,为什么要这么做其实不是那么重要。
    6. -
    -

    如果你想弄清楚如何做某事(而不是报告一个 Bug),在开头就描述你的目标,然后才陈述重现你所卡住的特定步骤。

    -

    经常寻求技术帮助的人在心中有个更高层次的目标,而他们在自以为能达到目标的特定道路上被卡住了,然后跑来问该怎么走,但没有意识到这条路本身就有问题。结果要费很大的劲才能搞定。

    -

    玉伯有句话是这么说的:

    -
    -

    提问者选择的路本身就是一条崎岖之路,对于要解决的问题,实际上有更好的方式。这种情况下,描述清楚目标,讲清楚要干什么非常重要。

    -
    -
      -
    1. 想要问到什么:提供建议?发送一段代码?检查你的补丁或者别的?在群里经常会出现这种情况,当某个人发了一段文字,另外的人说:你想问什么?
    2. -
    -

    所以我们在问问题的时候一定要把你想要问到什么,这个目标想清楚。

    -
      -
    1. 提供尽量多的信息:尽量提供可重现的例子,你可以在 jsbin)、runjsjsfiddle)、codepen 等这些地方提供一个可重现的例子。即使你是一个很大的项目,想办法把你需要验证的点提取出来,如果确实无法提取,就贴一些代码,出现问题那行代码周围的代码(周围的相关代码都要,因为你可能觉得不是他们的问题,但也许就是,不然你觉得的都是对的,你就不会不知道怎么解决了)。
    2. -
    -

    避免一些毫无意义的问题

    经常会有人问一些毫无意义的问题,比如这样的:

    -
    -

    Bad:有没有人会xxx?

    -

    Bad: 有没有人在?

    -

    Bad: 谁能帮我解决一个问题?

    -
    -

    面对这种问题,别人就很难预估你这个问题需要解决多久,也很难判断自己是否能解决这个问题,如果他回答了你,意味着你就是有空而且很在行,所以他还是选择不出声。这个就跟微信私聊的时候说:”在吗?“ 这种一个意思。

    -
    -

    Bad: 什么是 JavaScript?

    -
    -

    这种问题也是,很明显通过搜索引擎就能搞定的,要是下次还有这种问题,你就把这个图发给它。

    -

    img

    -

    建议的问法:

      -
    1. 有问题直接问。比如:ES6什么时候雄霸天下,前端什么时候一统江湖?
    2. -
    3. 直接说场景:我在做xx端东西的时候,在 window 7 平台的 IE7 版本下遇到了左右不对齐问题,具体如图所示img,代码地址:http://www.jsbin.com/xxxx,在百度中找到的答案,试了之后还是有同样的问题。请有空的同学帮我看看是什么问题?
    4. -
    -

    注意事项

      -
    • 提前做好冷场的准备:也许别人在忙,也许这个问题太简单了,也许没人做过这块,如果冷场了,没人回答,赶紧换下一个群。
    • -
    • 谦虚,别人没有义务帮你解决问题,往往大牛的时间比你少,比你珍贵。
    • -
    • 没有一定的自学能力,问到问题就伸手的不适合玩这个。
    • -
    • 群唯一的作用就是:扯淡、交流、分享,以上几条为前提。
    • -
    -

    如果觉得问题记不住,收藏一下这个图吧:

    -

    img

    -

    最后

    其实对于问问题,我们换位思考一下就更好了,这其实也是人际交往的方式,站在看你提问题的角度,想想当别人提问题的时候,你想让他问什么,你才愿意去回答。

    -

    当然除了在群里提问,在社区里提问,论坛里提问都有一定的规范,后面再慢慢补充吧。

    -
    -
    -

    版权属于:桃翁

    -

    本文链接:http://taoweng.site/index.php/archives/215/

    -

    转载时须注明出处及本声明,欢迎关注我的公众号「前端桃园」

    -
    -

    .

    -

    (这真就原封不动的照搬呗)

    -
    -

    《提问的智慧》

    另外还想再贴一个,最经典的,最最经典的(也最长最复杂的):

    -

    《提问的智慧》,来自 Github 。其实最初是 Eric S. Raymond, Rick Moen 创作的,然后 ryanhanwu 翻译了并放在 Github 上作为一个开源项目,截止本文写作时,该项目已有 10.2k Star,2.8k Fork。

    -

    另外,由于这个是国外作者创作的,所以其中出现的案例论坛等一般是国外常见论坛,也可以了解一下。

    -

    【警告】:本文十分冗长,建议在有闲暇时间时仔细浏览。

    -

    https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

    -]]>
    - - 基础 - - - none - -
    - - 2020 高考加油 - /2020/02/2020gaokaojiayou/ - 2020-02-28,距离 2020高考还有100天。

    - - - - - - - -]]>
    - - none - - - none - -
    - - 吾爱破解入门帖子 - /2020/02/getting-start-52pojie/ - 今日探索吾爱破解论坛,整理了两篇入门指导文章,当备忘录了

    -

    内容来自:吾爱破解 论坛

    -
    -

    吾爱破解论坛官方入门教学培训第一期开始啦!【已更新到第十课】

    培训课表–讲师:

    《吾爱破解培训第一课:破解基础知识之介绍常见工具和壳的特征》

    -

    讲师:Hmily,链接:http://www.52pojie.cn/thread-378612-1-1.html

    -

    《吾爱破解培训第二课:实战去广告、弹窗及主页锁定》

    -

    讲师:Kido,链接:http://www.52pojie.cn/thread-384195-1-1.html

    -

    《吾爱破解培训第三课:改头换面之修改版权和资源》

    -

    讲师:Kido,链接:http://www.52pojie.cn/thread-389996-1-1.html

    -

    《吾爱破解培训第四课:击破程序最坚固的堡垒–实战去程序自校验》

    -

    讲师:小生我怕怕,链接:http://www.52pojie.cn/thread-392395-1-1.html

    -

    《吾爱破解培训第五课:反击作者的挑衅–实战解除程序重启验证》

    -

    讲师:我是用户,链接:http://www.52pojie.cn/thread-396068-1-1.html

    -

    《吾爱破解培训第六课:潜伏在程序身边的黑影–实战给程序补丁》

    -

    讲师:我是用户,链接:http://www.52pojie.cn/thread-405758-1-1.html

    -

    《吾爱破解培训第七课:手把手教你从实例看如何攻破常见的网络验证》

    -

    讲师:珈蓝夜雨,链接:http://www.52pojie.cn/thread-408475-1-1.html

    -

    《吾爱破解培训第八课:短兵相接–深入浅出探讨脱壳细节(上)》

    -

    讲师:L4Nce,链接:http://www.52pojie.cn/thread-411104-1-1.html

    -

    《吾爱破解培训第九课:短兵相接–深入浅出探讨脱壳细节(下)》

    -

    讲师:L4Nce,链接:http://www.52pojie.cn/thread-411104-1-1.html

    -

    《吾爱破解培训第十课:探寻逆向新航标—x64平台脱壳与破解实战》

    -

    讲师:Kido,链接:http://www.52pojie.cn/thread-422192-1-1.html

    -

    视频下载:

    -

    360云盘下载:
    https://yunpan.360.cn/surl_y3GCKpiI2fX 提取码:7693

    -

    百度网盘下载:
    链接: https://pan.baidu.com/s/1z9WQeYgUGxcurVD2lKfNeg 提取码: e2su

    -

    爱盘下载:
    http://down.52pojie.cn/吾爱破解视频教程/吾爱破解论坛官方入门教学培训第一期/

    -
    -
    -

    解压密码(请使用新版7z解压缩):
    www.52pojie.cn

    -
    -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -

    零基础新手破解学习指导教程

    吾爱破解论坛官方入门培训:http://www.52pojie.cn/thread-349073-1-1.html
    整理一些论坛脱壳破解相关入门教程及需要用到的相关工具,方便新手同学查看学习

    -

    工欲善其事必先利其器,下面是破解需要用到的工具

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    OllyDbg(OD):http://www.52pojie.cn/thread-350397-1-1.html
    PEIDhttp://www.52pojie.cn/thread-170387-1-1.html
    Exeinfo PEhttp://www.52pojie.cn/thread-169779-1-1.html
    樱花补丁制作工具:http://www.52pojie.cn/thread-62307-1-1.html
    内存补丁生成器:http://www.52pojie.cn/thread-162411-1-1.html
    注册机生成器:http://www.52pojie.cn/thread-159470-1-1.html
    IDA Pro v6.5:http://www.52pojie.cn/thread-284145-1-1.html
    破解工具包http://www.52pojie.cn/thread-190698-1-1.html
    吾爱云盘【最牛逼的在线工具包】:http://down.52pojie.cn/Tools/
    -

    也可以点击下面的连接进去逆向资源区寻找工具哦

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Android | Tools安卓程序逆向所用到的相关工具
    Debuggers动态调试工具
    Disassemblers反编译工具(静态分析为主)
    PEtoolsPE文件分析相关工具
    Packers给程序加壳相关工具
    Patchers给程序做补丁相关工具
    Editors程序资源编辑、文本操作相关工具
    Crptography算法相关工具
    Unpackers脱壳机相关
    Dongle加密狗相关
    .NET微软.Net程序逆向相关工具
    OllyDbg | 1.x | Plugin动态调试工具OllyDbg | 1.x的插件程序
    OllyDbg | 2.x | Plugin动态调试工具OllyDbg | 2.x的插件程序
    IDA | Plugin反编译工具IDA的插件程序
    Other其他相关程序
    -

    NO.1

    Hmily 【初学者教程】破解基础知识之认识壳与程序的特征。
    新手一看教程就在说程序破解应该先脱壳,那到底程序有没有加壳?加了什么壳?看看大H的文章你就懂了!
    http://www.52pojie.cn/thread-234739-1-1.html

    -

    NO.2

    ximo 脱壳教程(24集全)
    http://pan.baidu.com/s/1cebVOU 密码: fxia
    http://down.52pojie.cn/吾爱破解视频教程/ximo脱壳基础.7z
    来自吾爱破解论坛LCG组织成员也是VMP脱壳插件作者ximo做的脱壳教程,堪称经典,入门脱壳必学!
    压缩包为7Z格式,7Z官方网站

    -

    NO.3

    小生我怕怕 脱壳练习系列附带对应文章的动画视频教程,方便学习交流脱壳知识。
    教程对应动画视频:http://www.52pojie.cn/thread-11642-1-1.html

    -

    [编者注]:视频爱盘下载地址:https://down.52pojie.cn/吾爱破解视频教程/吾爱破解脱壳练习系列动画/

    -

    吾爱专题脱壳练习一—-压缩壳练习之一:http://www.52pojie.cn/thread-10496-1-1.html
    吾爱专题脱壳练习二—-压缩壳练习之二:http://www.52pojie.cn/thread-10607-1-1.html
    吾爱专题脱壳练习三—-压缩壳练习之三:http://www.52pojie.cn/thread-10688-1-1.html
    吾爱破解脱壳练习四——简单加密壳:http://www.52pojie.cn/thread-10850-1-1.html
    吾爱专题脱壳练习五—-upx壳:http://www.52pojie.cn/thread-10990-1-1.html
    吾爱专题脱壳练习六—-TElock V0.99 :http://www.52pojie.cn/thread-11112-1-1.html
    吾爱专题脱壳练习七—-ORiEN:http://www.52pojie.cn/thread-11244-1-1.html
    吾爱专题脱壳练习八—-MoleBox V2.6.5:http://www.52pojie.cn/thread-11306-1-1.html
    吾爱专题脱壳练习九—-CRYPToCRACk’s PE Protector:http://www.52pojie.cn/thread-11446-1-1.html
    吾爱专题脱壳练习十—-PESpin 1.32:http://www.52pojie.cn/thread-11585-1-1.html
    吾爱专题脱壳练习十一—-VB自效验的处理:http://www.52pojie.cn/thread-11747-1-1.html
    吾爱专题脱壳练习十二—-delphi自效验的处理:http://www.52pojie.cn/thread-11883-1-1.html
    吾爱专题脱壳练习十三—-GHF Protector V1.0:http://www.52pojie.cn/thread-12011-1-1.html
    吾爱专题脱壳练习十四—-Armadillo 6.04:http://www.52pojie.cn/thread-12135-1-1.html
    吾爱专题脱壳练习十五—-ACProtector系列保护:http://www.52pojie.cn/thread-12279-1-1.html
    吾爱专题脱壳练习十六—-ACProtector系列保护:http://www.52pojie.cn/thread-12362-1-1.html
    吾爱专题脱壳练习十七—-PEBundle 2.0b5 - 3.0x:http://www.52pojie.cn/thread-12498-1-1.html
    吾爱专题脱壳练习十八—-Armadillo 4.40:http://www.52pojie.cn/thread-12620-1-1.html
    吾爱专题脱壳练习十九—-PUNiSHER 1.5:http://www.52pojie.cn/thread-12822-1-1.html
    吾爱专题脱壳练习二十—-未知壳一:http://www.52pojie.cn/thread-12936-1-1.html
    吾爱专题脱壳练习二十一—-未知壳二:http://www.52pojie.cn/thread-13494-1-1.html
    吾爱专题脱壳练习二十二—-未知壳三:http://www.52pojie.cn/thread-13770-1-1.html

    -

    NO.4

    我是用户 破解实战(10集全)
    破解实战演练教程
    第一战:http://www.52pojie.cn/thread-197281-1-1.html
    第二战:http://www.52pojie.cn/thread-197598-1-1.html
    第三战:http://www.52pojie.cn/thread-197957-1-1.html
    第四战:http://www.52pojie.cn/thread-198203-1-1.html
    第五战:http://www.52pojie.cn/thread-198365-1-1.html
    第六战:http://www.52pojie.cn/thread-198930-1-1.html
    第七战:http://www.52pojie.cn/thread-199459-1-1.html
    第八战:http://www.52pojie.cn/thread-199834-1-1.html
    第九战:http://www.52pojie.cn/thread-200655-1-1.html
    第十战:http://www.52pojie.cn/thread-200798-1-1.html

    -

    NO.5

    Blue .NET系列教程(4集全)
    图文教程分析.net程序!
    第一课 http://www.52pojie.cn/thread-248348-1-1.html
    第二课 http://www.52pojie.cn/thread-249034-1-1.html
    第三课 http://www.52pojie.cn/thread-250626-1-1.html
    第四课 http://www.52pojie.cn/thread-250633-1-1.html

    -

    NO.6

    去软件弹窗系列教程(共两集)
    第一课 http://www.52pojie.cn/thread-316180-1-1.html
    第二课 http://www.52pojie.cn/thread-323346-1-1.html

    -

    NO.7

    R4ndom破解教程全文翻译(共七集)
    第一课 http://www.52pojie.cn/thread-344925-1-1.html
    第二课 http://www.52pojie.cn/thread-345839-1-1.html
    第三课 http://www.52pojie.cn/thread-346455-1-1.html
    第四课 http://www.52pojie.cn/thread-350727-1-1.html
    第五课 http://www.52pojie.cn/thread-352818-1-1.html
    第六课 http://www.52pojie.cn/thread-354029-1-1.html
    第七课 http://www.52pojie.cn/thread-355207-1-1.html

    -

    希望大家在本论坛发现新手容易理解的系列教程通知我,我会陆续加进来。(转载的朋友请标注:吾爱破解原创作品)

    -]]>
    - - 逆向 - - - 52pojie - -
    - - 科学地让 Git 飞,git clone 速度 5Mb/s - /2020/02/let-git-fly-scientifically/ - 写本文原因:Git 太慢。看最后,14 KiB/s

    -

    image-20200214101358632

    - - -

    首先拥有一个代理服务器

    代理分为正向代理和反向代理,

    -

    正向代理就是代理用户端,改变用户端的身份(IP)。

    -

    反向代理就是代理服务端,改变服务器的身份(IP)。

    -

    目前的代理大多数用的都是正向代理。

    -

    获得服务器方法很多,不讲了,然后你就可以通过软件转发流量来进行“代理”

    -

    这里使用 ShadowsocksR 配置一个本地 HTTP 代理。

    -

    然后,设置代理

    运行SSR,在软件中添加已获得的服务器,然后进行一些常见的设置如 PAC 。

    -

    Tips:PAC:Proxy Auto Config

    -

    然后 Win + R ,输入 inetcpl.cpl 或是找到系统设置里面的代理设置,可以看到类似这样子的界面:

    -

    image-20200214104604088

    -

    这样子就是说明本地 1080 端口正在被代理软件使用。

    -

    然后,修改 Git 配置

    git 客户端可以使用代理来改善连接速度,Git 的所有配置都是存储在一个文件中的,可以通过修改配置文件或者通过 Git 命令行来修改配置。

    -

    Git 命令行主要有几种存在形式:

    -
      -
    • Windows命令行调用,主要是Windows安装版 Git 或在有 Git 的文件夹中运行 Git
    • -
    • 软件自带的 Git,这种多是在开发工具或 IDE 中,提供一个 Git 的命令行,如 Visual Studio、Git desktop 等,可能是自带了一份 Git 副本,可能是调用系统的 Git。
    • -
    • Linux 系统中的 Git ,Linux 系统大多自带 Git 命令
    • -
    -

    Git 的配置文件是一个名字叫 .gitconfig 的文件,上述的第1、3种的配置文件比较好找,第二种就存在不确定性。

    -

    在Windows中,.gitconfig%userprofile% 文件夹,即用户文件夹。用notepad++ 打开,看起来像这样子:

    -image-20200214111535140 - -

    在Linux中,.gitconfig~ 文件夹,即用户文件夹,看起来像这样子:(截图为 WSL Ubuntu16.04 + Windows Terminal )

    -

    image-20200214113002933

    -

    已知本地端口的情况下,(比如我的是1080),可以配置文件手动添加如下内容:

    -
    [http]
    proxy = http://127.0.0.1:1080
    [https]
    proxy = http://127.0.0.1:1080
    - -

    注意修改后格式像图中即可

    -

    另一种方式是在 Git 命令行设置,上面的三种情况都可以使用。

    -

    打开命令行,输入:

    -
    git config --global https.proxy http://127.0.0.1:1080
    git config --global https.proxy http://127.0.0.1:1080
    - -

    如果要取消代理设置,输入:

    -
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    - -

    (打开配置文件会发现对应的也自动修改好了)

    -

    然后就可以打开命令行开始 git clone 辣。

    -

    请注意 Github 的两种 clone 方式的区别:

    -

    https 方式,是通过本地的 http 链接,是会通过代理软件的

    -

    ssh 方式,是通过 ssh.exe 收发流量,不会通过代理软件,所以依然很慢

    -

    (截图为我开始 ssh 方式 clone 的时候,网络防火墙提示 ssh.exe 联网)

    -image-20200214125336775 - -

    用 https 方式速度就会达到接近带宽的峰值。比如我们来 clone 一个 ctf-wiki

    -

    image-20200214133923497

    -]]>
    - - 科学上网 - - - 代理 - git - -
    - - 无中生有访问 Google - /2020/02/access-google-from-nothing/ - 由于众所周知的原因,[数据删除] 。并且在搜索引擎方面,Google 也是搜索知识的一个优秀工具。

    -

    关于搜索引擎之间的瓜葛,Baidu、Bing、Google 究竟谁优谁劣,以后我有空的话再来谈这个话题,欢迎和我 issue 交流。

    -

    今天就来介绍一下如何“无中生有访问 Google”。

    -

    一个“不存在的” chrome 插件

    能访问 Google,当然是多亏了一个插件,名字叫做“谷歌上网助手”,它大概长这个样子:

    -

    image-20191113170312

    -

    可以在 Google 网上应用点搜索到,然后点击“添加至Chrome”按钮就可以添加插件了

    -

    https://chrome.google.com/webstore/detail/谷歌上网助手/nonmafimegllfoonjgplbabhmgfanaka

    -

    它的介绍文字是:

    -
    -

    专门为科研、外贸、跨境电商、海淘人员、开发人员服务的上网加速工具,chrome内核浏览器专用!可以解决chrome扩展无法自动更新的问题,同时可>以访问谷歌google搜索,gmail邮箱,google+等谷歌产品

    -

    简单易用的《谷歌上网助手》,可以解决chrome扩展无法自动更新的问题,同时可以访问谷歌google搜索,gmail邮箱,google+等谷歌服务。

    -

    《谷歌上网助手》一键安装,无需其他配置,即可访问谷歌。

    -

    使用本插件可以免费上:

    -
      -
    • google.com 谷歌搜索
    • -
    • mail.google.com gmail邮箱
    • -
    • chrome商店访问
    • -
    -
    -

    当然,以上链接是不存在的。

    -

    无中生有?

    chrome 的插件是一个后缀名为 .crx 的文件,文件结构与 zip 相同,这意味着,你可以用压缩软件打开 .crx 文件。

    -

    我们有了 crx 文件,就可以添加到 chrome 浏览器了。

    -

    从哪儿去得到 crx 文件?从 Google 应用商店。当然,Google 应用商店是不存在的。

    -

    更新:插件官网也可以下载,快速下载方式请直接翻到文尾“#写在后面”部分,再从此处继续阅读。

    -

    这里介绍一个网站,可以看作 Google应用商店翻版,也就是镜像站。https://www.gugeapps.net/

    -

    我的网站也提供了一个副本(划掉)谷歌上网助手.zip ,如果添加 chrome 失败请转至下面方法下载,

    -

    bing 搜索 gugeapps.net,第一个链接是 www.gugeapps.net 就是了

    -

    打开是长这个样子的:

    -

    image-20191114102230

    -

    我们可以在这里的搜索框搜索谷歌上网助手,回车搜索,或者在 bing 搜索 谷歌上网助手 site:gugeapps.net 第一个就是对应的页面了。

    -

    image-20191114102822

    -

    这里不能直接安装到 chrome ,点击下载按钮,转到页面底端开始下载。

    -

    下载完成后会出现红色提示,保留就可以了
    image-20191114102910

    -

    Ps:最新的下载下来好像后缀名是 zip ,不过不影响后续操作。

    -

    然后在文件夹中打开,可以看到文件夹里面有个 .crx 文件了

    -

    image-20191114103010

    -

    导入

    一般来说,crx 可以直接拖入 chrome 的扩展程序页面,会提示是否添加插件,确定添加就可以添加,不过,对于自己下载的插件,大多数是不行的,会提示“程序包无效”,

    -

    image-20191114103110

    -

    不能导入?

    这里需要通过 chrome 的开发者模式,添加插件。

    -

    首先打开 chrome 的扩展程序页面:chrome://extensions ,开启页面右上方的“开发者模式”开关。

    -

    然后点左边的“加载已解压的扩展程序”

    -

    image-20191114103117

    -

    切换到刚才的下载文件夹,复制一份 crx 文件,后缀名改为 zip ,随后解压到压缩文件同名文件夹。

    -

    如果看不到后缀名,在查看这里把文件扩展名选项勾选。

    -

    image-20191114103616

    -

    切换到 chrome 的选择文件夹窗口,打开刚才的文件夹,可以看到文件夹里面的结构是

    -
    _locales
    _metadata
    assets
    - -

    然后添加文件夹。

    -

    image-20191114103357

    -

    回到 chrome ,就可以看到新插件添加成功,

    -

    可以看到有提示错误,但是可以用,

    -

    可以看到, chrome 右上方增加了一个插件的图标了

    -

    同时可以看到图标下面有一个标志,鼠标悬浮提示:“未封装的扩展程序”。

    -

    另外,如果关闭 chrome 再打开,会提示移除插件,所以正常使用起来的话,还是有一些麻烦的

    -

    image-20191114104215

    -

    点击右上角图标,会弹出插件菜单,首次需要注册登录,在登录页面找到新用户注册,填入邮箱和新账户密码注册

    -

    image-20191114104439

    -

    然后进入插件 控制面板 ,有红色提示“邮箱未激活”,此时前往邮箱,点击新收到的邮件激活账户即可

    -

    image-20191114104528

    -

    再点开插件菜单,把开关打开即可

    -image-20191114104755 - -

    然后 www.google.com 可以访问了。

    -

    image-20191114104855

    -

    后续操作

    关闭浏览器再打开就会提示“请停用以开发者模式添加的插件”,影响使用,所以需要再“操作”一下

    -

    Ps:如果没有注册登录插件,现在的新版浏览器是直接移除插件,影响使用,所以需要再“操作”一下

    -

    image-20200213214020573

    -

    这个提示框每次打开 chrome 都会弹出,极其 讨厌。

    -

    我们可以通过:从 Google 应用商店安装正规插件,的方式,替换这个插件,就不会再提示辣

    -

    打开 Google网上应用店 https://chrome.google.com/webstore/category/extensions

    -

    搜索 谷歌上网助手 ,找到第一个就是正规插件(开发版也可以用),点“添加至 chrome”按钮就可以添加,点添加扩展程序 按钮

    -

    image-20200213214703542

    -

    接着我们可以看到 chrome 左下方出现了一个 crx 下载进度条,但是这个下载完之后并不会提示下载完成,会自动消失(在下载记录也不会留下记录),而是自动安装

    -

    image-20200213214909741

    -

    然后会看到页面里面“谷歌上网助手”变成了“已添加”,“添加至chrome”变成了“评分”,就是安装完成了

    -

    image-20200213215254798

    -

    然后需要删除旧插件,打开插件管理页面,chrome://extensions/

    -

    也可以在右上角插件图标处鼠标右键,管理扩展程序,然后返回按钮

    -

    找到刚才提示“未封装的扩展程序”的插件,删除,

    -

    image-20200213215852988

    -

    点击右上角新安装的插件的图标,弹出登陆页面,进去再用刚注册的账号登陆一次就可以了

    -

    至此,全部安装完成!

    -

    写在后面

    插件官网:http://googlehelper.net/ ,也可以在这里下载 zip 然后按上述方法导入

    -

    image-20200213221452052

    -

    点击 download ,下载此网站最新插件压缩包,也可以下载我保存的副本, Ghelper2.0.4.all.zip

    -

    压缩包解压之后可以看到:

    -
    ghelper_source
    Ghelper2.0.5.crx
    中国大陆安装方法.txt
    - -

    其中 ghelper_source 和上文提到的解压后文件夹是一样的,

    -

    其中的 crx 文件可以用于直接拖拽导入插件(2020/02/13测试这个crx可以直接导入没有问题)

    -

    点击此处回到 “无中生有?” 部分继续阅读

    -]]>
    - - 科学上网 - - - chrome - Google - 搜索引擎 - 代理 - -
    - - Wooyun.org lives on Github - /2020/02/wooyun-on-github/ - 翻阅 Wooyun ,然后找到了Github上。。。不得不说,Github 上确实有大量镜像资源

    -

    在这里做一个总结吧。按 Star 排序,把每个库的 Readme.md 剪辑到了这里。

    -

    文尾有彩蛋!

    - - -
    - -
    - -

    No.1 https://github.com/hanc00l/wooyun_public

    -

    Watch:224___Star:3586___Fork:1.8k

    -

    wooyun_public

    乌云公开漏洞、知识库爬虫和搜索
    crawl and search for wooyun.org public bug(vulnerability) and drops

    -

    1.wooyun公开漏洞爬虫版

    index

    -

    search

    -

    源自2016年6月底使用scrapy爬虫爬取的4W公开漏洞和知识库,虚拟机为ubuntu14.04,采用python2+mongodb+flask(tornado)和Elasticsearch搜索引擎。

    -

    虚拟机下载地址:

    -

    https://pan.baidu.com/s/1HkR4ggvAwTikshsjcKYBuA ,提取密码:8wnb(2018.4.23更新)

    -

    安装、使用指南(点我)

    -

    2.wooyun公开漏洞纪念版

    index_final

    -

    search_final

    -

    漏洞信息和代码来自于m0l1ce的wooyun_all_bugs_8.8W,包含8.8W漏洞信息(不含知识库);搜索和漏洞信息代码位于wooyun_final,对代码进行了部份修改:

    -
      -
    • 修改了搜索功能,支持多关键字搜索和在漏洞详情中搜索
    • -
    • 修改了离线图片文件的位置,搜索结果直接使用虚拟机中的离线图片
    • -
    • 修改了代码以适应PHP5.6及更新版本
    • -
    -

    虚拟机为ubuntu16.04,PHP5.6+MySQL5.7+Apache2。虚拟机下载地址:
    https://pan.baidu.com/s/1qYRqa3U 密码: w8vb (2017.7.4)

    -

    虚拟机用户名、密码为hancool/qwe123

    -

    3.其它

      -
    • 本程序只用于技术研究和个人使用,程序组件均为开源程序,漏洞和知识库来源于乌云公开漏洞,版权归wooyun.org。
    • -
    -
    - -
    - -

    No.2 https://github.com/Xyntax/1000php

    -

    Watch:31___Star:759___Fork:481

    -

    1000php

    1000个PHP代码审计案例 (2016.7以前乌云公开漏洞)

    -

    说明

      -
    • 数据取自3.8W乌云已公开漏洞(截至2016.7)
    • -
    • 漏洞在./bugs,./upload保存了相关漏洞的图片资源
    • -
    • 使用特征匹配提取,杂质在5%以内,如遇其他非php漏洞自行删除即可
    • -
    • 愿乌云早日回归
    • -
    -
    - -
    - -

    No.3 https://github.com/starnightcyber/1000php

    -

    Watch:1___Star:759___Fork:481

    -

    1000php

    1000个PHP代码审计案例 (2016.7以前乌云公开漏洞)

    -

    在原来的基础上Xyntax/1000php添加了简单的漏洞索引,并且加入了原css文件,方便查看

    -

    Sample

    wooyun-index

    -

    点击其中某个漏洞,查看

    -

    bug

    -

    刚才试过了,直接打开index.html好像并不会简单按照我们的意愿显示,可以重新再执行一下代码:

    -

    python script.py

    -

    这样会重新生成index.html,在本地打开应该就没有问题,另外可能会出现乱码,可以用谷歌浏览器打开。

    -

    说明

      -
    • 数据取自3.8W乌云已公开漏洞(截至2016.7)
    • -
    • 漏洞在./bugs,./upload保存了相关漏洞的图片资源
    • -
    • 使用特征匹配提取,杂质在5%以内,如遇其他非php漏洞自行删除即可
    • -
    • 愿乌云早日回归
    • -
    -
    - -
    - -

    No.4 https://github.com/jiji262/wooyun_articles

    -

    Watch:27___Star:640___Fork:506

    -

    wooyun_articles

    drops.wooyun.org 乌云Drops文章备份

    -

    (乌云网站已经离我们而去,可能再也不会回来了!谨以此纪念乌云!)

    -

    线上版本

    (已更新图片)

    -

    https://wooyun.js.org/

    -

    线上版本源码

    https://github.com/jiji262/wooyun_articles/tree/gh-pages

    -

    关于branches

    gh-pages

    https://wooyun.js.org/ 源码。

    -

    由于wooyun服务器已经无法访问,所以文章中图片已经无法显示。所幸,之前已经将图片抓取下来,可以在这里查看所有图片。

    -

    master

    目录如下:

    -

    wooyun.js:用于抓取 drops.wooyun.org 上文章的脚本;

    -

    drops:抓取下来的文章原文;

    -

    image_download:单独下载文章中图片的方法, bagpipe_versionasync_version为多并发下载图片的解决方案。

    -

    Todo

    [x]更新本地图片链接到文章中

    -
    - -
    - -

    No.5 https://github.com/boy-hack/wooyun-payload

    -

    Watch:12___Star:465___Fork:90

    -

    WooYun-Payload

    从乌云漏洞库中提取的扫描规则,内容介绍: https://mp.weixin.qq.com/s/9RHVsw-HtAfo1UuPAqXZEw

    -

    Burpsuite 辅助插件

    通过http请求包中域名,路径,参数等获取乌云历史漏洞中类似的数据。

    -

    wooyunpayload

    -

    数据说明

    -
    - -
    - -

    No.6 https://github.com/m0l1ce/wooyunallbugs

    -

    Watch:21___Star:398___Fork:154

    -

    wooyunallbugs

    wooyun_all_bugs_8.8W

    -
    -

    链接:https://pan.baidu.com/s/1htwVF3Q 密码:oskw

    -

    代码在bugs文件里
    ps:php version 5.3
    库解压到wooyun库里即可
    ps:注意修改数据库连接密码 conn.php

    -
    -

    ps:图片资源解压到根目录/upload/下 本地绑定下host 你的图片服务器 static.loner.fm
    static.loner.fm 不会关掉的 大家可以放心使用

    -

    漏洞查询链接 www.loner.fm/bugs/

    -
    - -
    - -

    No.7 https://github.com/SuperKieran/WooyunDrops

    -

    Watch:13___Star:346___Fork:243

    -

    Wooyun Drops

    DEMO: https://wooyun.kieran.top

    -

    静态版乌云 Drops

    OPTIONS:
    1.默认开启 https,如果不需要可以在 index.html 删掉
    2.图片依赖于 https://github.com/SuperKieran/wooyun-img

    -

    全文搜索有想法还但没想好怎么做
    最先想到的自然是写个后台,搜搜搜就完工了,但这不太方便
    静态页面的搜索 我暂时没有好的方案,如果有好的想法的话可以在 issue 里提

    -
    - -
    - -

    No.8 https://github.com/SuperKieran/wooyun-img

    -

    Watch:0___Star:20___Fork:33

    -

    WooYun Drops 图片库

    DEMO: https://superkieran.github.io/WooyunDrops
    Github: https://github.com/SuperKieran/WooyunDrops
    (编者注:图片在gh-pages分支)

    -
    - -
    - -

    No.9 https://github.com/grt1st/wooyun_search

    -

    Watch:22___Star:327___Fork:157

    -

    乌云公开漏洞、知识库搜索

    -

    index

    -

    search

    -

    author

    -

    0x00.介绍

      -
    • 灵感来源于hanc00l的github项目wooyun_public

      -
    • -
    • wooyun_public基于flask或者tornado,而本项目可以布置在apache、nginx等web服务器上。

      -
    • -
    • 如果你有wooyun的静态网页数据,那么我们可以开始了!

      -
    • -
    • 整个项目包括两个部分,第一部分是索引,将网页信息存储进数据库;第二部分是搜索,从数据库中查找信息。轻量级,支持进行二次开发。

      -
    • -
    • 静态网页网盘链接:

      -
      bugs   链接: https://pan.baidu.com/s/1n_kkUaZZxcTEa4-v6sGa9Q 密码: sg98 (20180707)
      drops 链接: https://pan.baidu.com/s/1r2Y7rfntwnjglX6HtzDk6w 密码: 738f (20180707)
      - -
    • -
    -

    0x01.依赖组件及说明

      -
    • python 2.7和pip

      -
    • -
    • python依赖:MySQLdb,lxml(推荐)

      -
    • -
    • mysql,php及任意web服务器(php需开启pdo-mysql模块

      -
    • -
    • 将本项目放进web服务器目录下,bugs目录下为漏洞库文件,drops目录下为知识库文件。

      -
      文件说明:
      app_bugs.py bugs的索引,依赖lxml
      app_drops.py drops的索引,依赖lxml
      index.html 搜索的主页
      search.php 执行搜索的页面
      config.php php配置文件
      ./bugs bugs静态文件的目录
      ./drops drops静态文件的目录
      - -
    • -
    -

    0x02.索引配置

      -
    • app_bugs.py为建立bugs索引的脚本,app_drops为建立drops索引的脚本。

      -
    • -
    • 因为python脚本中open()函数打开的文件名不能为中文,建议将drops目录下的中文文件名改为英文(例如,安全运维-xxxx.html=>safe-xxxx.html)

      -
    • -
    • python脚本运行前需要修改如下语句,更改参数如主机、端口号、用户名、密码。

      -
      conn=MySQLdb.connect(host='localhost',port=3306,user='root',passwd='',db='wooyun',charset='utf8')
      -
    • -
    • 在mysql中建立数据库wooyun,数据表bugs、drops,分别建立字段title,dates,author,type,corp,doc与title,dates,author,type,doc。

      -
      CREATE DATABASE `wooyun` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
      create table bugs(title VARCHAR(500),dates DATETIME, author CHAR(255),type CHAR(255),corp CHAR(255),doc VARCHAR(200) PRIMARY KEY);
      create table drops(title VARCHAR(500),dates DATETIME, author CHAR(255),type CHAR(255),doc VARCHAR(200) PRIMARY KEY);
    • -
    • 注意mysql编码如下,需要为utf-8(character_set_server不为utf-8要修改mysql配置文件

      -
      use wooyun;
      show variables like 'character%'; #查看编码
      +--------------------------+----------------------------+
      | Variable_name | Value |
      +--------------------------+----------------------------+
      | character_set_client | utf8 |
      | character_set_connection | utf8 |
      | character_set_database | utf8 |
      | character_set_filesystem | binary |
      | character_set_results | utf8 |
      | character_set_server | utf8 |
      | character_set_system | utf8 |
      | character_sets_dir | /usr/share/mysql/charsets/ |
      +--------------------------+----------------------------+
      -

      如果编码错误会报错,比如:

      -
      Warning: Incorrect string value: '\xE5\xBB\xB6\xE9\x95\xBF...' for column 'title' at row 1
      cur.execute("INSERT INTO `drops`(`title`,`dates`,`author`,`type`,`doc`) VALUES(%s,%s,%s,%s,%s)", tmp)
      -

      在mysql里查看会发现有一堆???

      -
    • -
    • 之后就可以建立索引了

      -
      sudo python ./app_bugs.py
      sudo python ./app_drops.py
    • -
    • bugs数目为40280,drops数目为1264

      -
      use wooyun;
      select count(*) from bugs;
      select count(*) from drops;
      - -
    • -
    -

    0x03.搜索配置

      -
    • 修改config.php中修改如下语句中参数,分别是主机、端口、用户名、密码与数据库。

      -
      $config['host'] = '127.0.0.1';
      $config['port'] = '3306';
      $config['user'] = 'root';
      $config['passwd'] = '';
      $config['database'] = 'wooyun';
      -
    • -
    • index.html与search.php样式来自于前端静态资源托管库。f12进入开发者模式,如果样式文件访问不到可以使用本地或cdn的样式(bootstrap3.3.7、jquery3.1.0)。只需要更改两个网页里面的如下内容。

      -
    • -
    -
    <link href="//lib.baomitu.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="//lib.baomitu.com/jquery/3.1.0/jquery.min.js"></script>
    <script type="text/javascript" src="//lib.baomitu.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    - -
      -
    • 为了防止因为web服务器配置不正确,导致访问http(s)://example.link/bugs/或者http(s)://example.link/drops/而进入index of页面泄露所有文件,在目录下放置内容为空的index.html即可。

      -
    • -
    • linux下由于selinux可能会导致无法连接数据库,可以使用如下命令:

      -
      getenforce   //查看selinux状态
      setenforce 0 //暂时关闭selinux
      - -
    • -
    -

    0x04.问题

      -
    • drops很奇怪的会都需web目录下的js而不是本身目录里的js,所以drops的页面会有些乱。开发者模式看一下,缺少的js为web目录/static/drops/css与web目录/static/drops/js。新建目录再把drops下的css、js文件夹复制过去即可
    • -
    -

    0x05.更新日志

      -
    • 2016.10.08更新:上传了bugs.py。由于bugs部分页面(约143条)的author带有js,正则匹配出的信息出错,所以上传了bugs.py用于修正,在app.py后执行,python bugs.py。(2016.11.09已修正,无需执行bugs.py)

      -
    • -
    • 2016.10.10更新:重写了search.php和search.css,基本适配了各种浏览器和移动端。

      -
    • -
    • 2016.11.09更新:匹配索引将BeautifulSoup换成了lxml,运行速度更快。优化了匹配(感谢@tuola)。

      -
    • -
    • 2017.01.01更新:增加了作者搜索,优化了分页逻辑。

      -
    • -
    • 2017.3.7更新:重写了前端,优化了php代码。

      -
    • -
    • 欢迎反馈问题。可以提问issue也可以通过grt1stnull@gmail.com联系我。后续也会进行其他细节优化。

      -
    • -
    -

    0x06.后记

      -
    • 本来打算把wooyun_public布置在我的树莓派上,因为一些原因失败,所以萌生了自己搭建的念头

      -
    • -
    • 总共搭建了十天,接触了js、bootstarap、beautifulsoup、mysqldb、mysqli和pdo。虽然以前也会css与php,但这是第一次真正写一个动态网页,感觉很棒。

      -
    • -
    -

    0x07.其他

      -
    • 本程序只用于技术研究和个人使用,程序组件均为开源程序,漏洞和知识库来源于乌云公开漏洞,版权归wooyun.org。

      -
    • -
    • 新浪微博:http://weibo.com/grt1st

      -
    • -
    • 个人邮箱:grt1stnull@gmail.com

      -
    • -
    -
    - -
    - -

    No.10 https://github.com/LubyRuffy/wyquery

    -

    Watch:12___Star:109___Fork:92

    -

    wyquery

    Wooyun公开的漏洞详情是一个很好的资源,但是没有提供很好的搜索引擎和排序功能来进行数据分析,所以,这个项目用户镜像wooyun上已经对外公开的漏洞详情,并提供更多搜索和排序的功能。

    -

    你有没有想完成如下功能?

    -
      -
    • 我想只看给钱的漏洞
    • -
    • 我想只看带乌云标志的漏洞
    • -
    • 我想按照rank排序漏洞
    • -
    -

    如果有,那你跟我遇到的问题一样,不妨试试这个项目!线上已经搭建好的DEMO环境如下:http://120.27.41.90/

    -

    搭建环境

    建议在Linux下运行,当然Windows下也可以。Ruby 2.0+

    -
    git clone https://github.com/LubyRuffy/wyquery.git
    cd wyquery
    bundle install
    rake db:migrate
    rails s
    - -

    然后访问http://0.0.0.0:3000

    -

    初次抓取数据

    cd wyquery
    ruby ./tools/import_bugs.rb
    - -

    同步数据

    这时可以建立定时任务

    -
    crontab -e
    */10 * * * * <wyquery路径>/tools/import_bugs.rb
    - -
    - -
    - -

    No.11 https://github.com/jas502n/fuzz-wooyun-org

    -

    Watch:3___Star:96___Fork:49

    -

    fuzz-wooyun-org

    WooYun Fuzz 库

    -
    - -
    - -

    No.12 https://github.com/xinali/wooyun

    -

    Watch:6___Star:95___Fork:42

    -

    wooyun

    wooyun datasets

      -
    • usernames
    • -
    • passwords
    • -
    • URLs
    • -
    • sensitive data patterns
    • -
    • fuzzing payloads
    • -
    • web shells
    • -
    -
    - -
    - -

    No.13 https://github.com/l3m0n/wooyun-wiki

    -

    Watch:5___Star:75___Fork:55

    -

    wooyun-wiki

    wiki.wooyun.org的部分快照网页

    -
    - -
    - -

    No.14 https://github.com/fxfactorial/wooyun.github.io

    -

    Watch:6___Star:44___Fork:33

    -

    【没有 Readme.md 介绍】


    - -
    - -

    No.15 https://github.com/CaledoniaProject/wooyun_offline_ui

    -

    Watch:4___Star:40___Fork:19

    -

    说明

    花了10分钟重做了一套乌云离线Web UI,重做总共有两个目的,

    -
      -
    1. 没必要使用14GB的虚拟机,经过处理,40K漏洞只占用500MB mongodb 硬盘空间
    2. -
    3. 上述作者没有提取 关注数、是否为有奖励或者漏洞预警的漏洞 等几个关键字段
    4. -
    -

    特性

    支持漏洞标题搜索、漏洞wooyun id搜索

    -

    screen

    -

    支持漏洞查看(删除了评论),原始 wooyun UI

    -

    screen2

    -

    安装

    复制 src 到 web 目录,e.g

    -
    cp -R src ~/web/wooyun_offline
    - -

    安装 php-mongo 扩展

    -

    mongo 默认为 127.0.0.1:27017,如有不同,修改 src/config.php 即可

    -
    <?php
    $config = array(
    'mongodb' => 'mongodb://127.0.0.1:27017'
    );
    ?>
    - -

    导入数据

    导入到 wooyun 数据库,bugs 表即可

    -

    由于政策风险,我不能提供数据,可以用网上的14GB虚拟机导出

    -

    然后使用 src/scripts/minify.pl 精简 mongo 数据库

    -

    已知问题

      -
    1. 缺少 images/blood.png
    2. -
    3. 漏洞库不全,可惜没用高权限账号爬
    4. -
    -
    - -
    - -

    No.16 https://github.com/lxj616/DVWA-WooYun

    -

    Watch:1___Star:23___Fork:16

    -

    DVWA-WooYun

    DVWA-WooYun is a plugin-set for DVWA , with plugins based on wooyun.org real bug reports

    -

    It should have been a fork of the RandomStorm/DVWA , But while I was coding it , I didn’t know a thing about github :(

    -

    And now I do , so scavenged old codes to github

    -

    And I modified lot of things , can’t remember why , just messed around , It seems to be not able to merge with the original DVWA now

    -

    DAMN VULNERABLE WEB APP

    Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.

    -

    WARNING!

    Damn Vulnerable Web App is damn vulnerable! Do not upload it to your hosting provider’s public html folder or any working web
    server as it will be hacked. I recommend downloading and installing XAMPP onto a local machine inside your LAN which is used solely for testing.

    -

    We do not take responsibility for the way in which any one uses Damn Vulnerable Web App (DVWA). We have made the purposes of the application clear and it should not be used maliciously. We have given warnings and taken measures to prevent users from installing DVWA on to live web servers. If your web server is compromised via an installation of DVWA it is not our responsibility it is the responsibility of the person/s who uploaded and installed it.

    -

    License

    This file is part of Damn Vulnerable Web App (DVWA).

    -

    Damn Vulnerable Web App (DVWA) is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    -

    Damn Vulnerable Web App (DVWA) is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    -

    You should have received a copy of the GNU General Public License
    along with Damn Vulnerable Web App (DVWA). If not, see http://www.gnu.org/licenses/.

    -

    Download

    DVWA is available either as a package that will run on your own web server or as a Live CD

    -
      -
    • DVWA v1.0.8 (latest) - (1.3MB) Download
    • -
    • DVWA v1.0.7 LiveCD - (480MB) Download
    • -
    -

    Installation

    Default username = admin

    -

    Default password = password

    -

    Installation video:
    http://www.youtube.com/watch?v=GzIj07jt8rM

    -

    The easiest way to install DVWA is to download and install ‘XAMPP’ if you do not already have a web server setup.

    -

    XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

    -

    XAMPP can be downloaded from:
    http://www.apachefriends.org/en/xampp.html

    -

    Simply unzip dvwa.zip, place the unzipped files in your public html folder, then point your browser to http://127.0.0.1/dvwa/index.php

    -

    Database Setup

    To set up the database, simply click on the Setup button in the main menu, then click on the ‘Create / Reset Database’ button. This will create / reset the database for you with some data in.

    -

    If you receive an error while trying to create your database, make sure your database credentials are correct within /config/config.inc.php

    -

    The variables are set to the following by default:

    -
    $_DVWA[ 'db_user' ] = 'root';
    $_DVWA[ 'db_password' ] = '';
    $_DVWA[ 'db_database' ] = 'dvwa';
    - -

    Troubleshooting

    For the latest troubleshooting information please visit:
    http://code.google.com/p/dvwa/issues/list

    -

    +Q. SQL Injection wont work on PHP version 5.2.6.

    -

    -A.If you are using PHP version 5.2.6 you will need to do the following in order for SQL injection and other vulnerabilities to work.

    -

    In .htaccess:

    -

    Replace:

    -
    <IfModule mod_php5.c>
    php_flag magic_quotes_gpc off
    #php_flag allow_url_fopen on
    #php_flag allow_url_include on
    </IfModule>
    -

    With:

    -
    <IfModule mod_php5.c>
    magic_quotes_gpc = Off
    allow_url_fopen = On
    allow_url_include = On
    </IfModule>
    -

    +Q. Command execution won’t work.

    -

    -A. Apache may not have high enough priviledges to run commands on the web server. If you are running DVWA under linux make sure you are logged in as root. Under Windows log in as Administrator.

    -

    +Q. My XSS payload won’t run in IE.

    -

    -A. If your running IE8 or above IE actively filters any XSS. To disable the filter you can do so by setting the HTTP header ‘X-XSS-Protection: 0’ or disable it from internet options. There may also be ways to bypass the filter.

    -

    Homepage: http://www.dvwa.co.uk

    -

    Project Home: https://github.com/RandomStorm/DVWA

    -

    Created by the DVWA team

    -
    - -
    - -

    No.17 https://github.com/neargle/SecNewsBak

    -

    Watch:2___Star:20___Fork:17

    -

    README

    该项目只用于备份Sec-News上Drops乌云知识库的失效文章,并非Drops整站文章。

    -

    文章列表如下:

    -
    drops_arti_list = [
    "SQL注入速查表(上)",
    "WMI Attacks",
    "攻击洋葱路由(Tor)匿名服务的一些综述",
    "SQL注入速查表(下)与Oracle注入速查表",
    "Hacking ipcam like Harold in POI",
    "海豚浏览器与水星浏览器远程代码执行漏洞详解",
    "WMI Backdoor",
    "手把手教你当微信运动第一名 – 利用Android Hook进行微信运动作弊",
    "WMI Defense",
    "Tomcat安全配置",
    "利用Weblogic进行入侵的一些总结",
    "工控安全入门分析",
    "利用被入侵的路由器获取网络流量",
    "利用白名单绕过360实例",
    "浅析大规模DDOS防御架构-应对T级攻防",
    "XCode编译器里有鬼 – XCodeGhost样本分析",
    "借用UAC完成的提权思路分享",
    "TcpDump使用手册",
    "被人遗忘的Memcached内存注射",
    "利用被入侵的路由器迈入内网",
    "Android sqlite load_extension漏洞解析",
    "CTF主办方指南之对抗搅屎棍",
    "域渗透的金之钥匙",
    "比葫芦娃还可怕的百度全系APP SDK漏洞 - WormHole虫洞漏洞分析报告",
    "那些年做过的ctf之加密篇",
    "从一个锁主页木马里挖出的惊天“暗杀黑名单”",
    "C&C控制服务的设计和侦测方法综述",
    "Python安全编码指南",
    "翻墙路由器的原理与实现",
    "几期『三个白帽』小竞赛的writeup",
    "拆分密码",
    "变种XSS:持久控制",
    "使用32位64位交叉编码混淆来打败静态和动态分析工具",
    "給初學者的DLL Side Loading的UAC繞過",
    "Joomla远程代码执行漏洞分析",
    "网络小黑揭秘系列之黑色SEO初探",
    "一步一步学ROP之Android ARM 32位篇",
    "Linux入侵检测基础",
    "Android WebView File域攻击杂谈",
    "小议Linux安全防护(一)",
    "Powershell 提权框架-Powerup",
    "Android Linker学习笔记",
    "MD5碰撞的演化之路",
    "Android应用安全开发之源码安全",
    "Ruby on Rails 动态渲染远程代码执行漏洞 (CVE-2016-0752)(翻译)",
    "中间人攻击 -- Cookie喷发",
    "域渗透——Security Support Provider",
    "LUA脚本虚拟机逃逸技术分析",
    "我的通行你的证",
    "在不需要知道密码的情况下 Hacking MSSQL",
    "代码审计入门总结",
    "Linux服务器应急事件溯源报告",
    "Head First FILE Stream Pointer Overflow",
    "从 WTForm 的 URLXSS 谈开源组件的安全性",
    "网络小黑揭秘系列之黑产江湖黑吃黑—中国菜刀的隐形把手",
    "简单验证码识别及工具编写思路",
    "中国菜刀仿冒官网三百万箱子爆菊记",
    "Rails Security (上) ",
    "富文本存储型XSS的模糊测试之道",
    "主机被入侵分析过程报告",
    "Exploring SSTI in Flask/Jinja2 | WooYun知识库",
    "0ctf writeup",
    "一个支付宝木马的分析溯源之旅",
    "QQ模拟登录实现后篇",
    "渗透技巧——通过cmd上传文件的N种方法",
    "通过ELF动态装载构造ROP链 ( Return-to-dl-resolve)",
    "Mysql报错注入原理分析(count()、rand()、group by)",
    "利用反射型XSS二次注入绕过CSP form-action限制",
    "渗透Hacking Team过程",
    "“信任“之殇――安全软件的“白名单”将放大恶意威胁",
    "百脑虫之hook技术",
    "内网渗透中转发工具总结",
    "TCP安全测试指南-魔兽3找联机0day",
    "CVE-2016-3714 - ImageMagick 命令执行分析",
    "CVE-2016-1897/8 - FFMpeg漏洞分析",
    "漫谈流量劫持",
    "新姿势之Docker Remote API未授权访问漏洞分析和利用",
    "利用CouchDB未授权访问漏洞执行任意系统命令",
    "利用环境变量LD_PRELOAD来绕过php disable_function执行系统命令",
    "CTF中比较好玩的stego",
    "linux下tomcat安全配置",
    "MySQL和PostgreSQL数据库安全配置",
    "内网渗透思路探索之新思路的探索与验证",
    "小窥TeslaCrypt密钥设计",
    "Do Evil Things with gopher://",
    "三个白帽条条大路通罗马系列2之二进制题分析",
    "Android安全开发之Provider组件安全",
    "漏洞检测的那些事儿 ",
    "QQ浏览器隐私泄露报告",
    "三个白帽之从pwn me调试到Linux攻防学习",
    "渗透中寻找突破口的那些事",
    "Struts2 S033与最新S037详细分析",
    "DB2在渗透中的应用",
    "Python urllib HTTP头注入漏洞 (中文翻译)",
    "SQL注入关联分析",
    "Anti-debugging Skills in APK",
    "玩转Metasploit之Automated Persistent Backdoor",
    "Uber渗透案例:我们是如何发现你是谁,你在哪,你要打车去哪!",
    "玩转Metasploit之Automated Persistent Backdoor",
    "Docker安全那些事 ",
    "Use bitsadmin to maintain persistence and bypass Autoruns ",
    "CTF中那些脑洞大开的编码和加密 ",
    "Jenkins RCE 2(CVE-2016-0788)分析及利用",
    "小议安卓定位伪造-实战足不出户畅玩pokemon go",
    "三个白帽挑战赛之[续集]火币网2W大挑战Writeup"
    ]
    - -
    - -
    - -

    No.18 https://github.com/acgpiano/wooyun-node

    -

    Watch:2___Star:9___Fork:8

    -

    wooyun-node

    这是wooyun.org镜像的node.js版本,用的mysql,支持标题,作者,类型,厂商检索。
    方便新手小白使用,搭建方法非常简单。
    首先需要安装mysql,要把数据库语言设置成utf8(非常重要,不然会出错)。由于各个系统设置方法不同,需自行百度。检测是否成功可以登进数据库,执行

    -
    status;
    -

    如果是以下状态,就代表可以下一步了。
    把该项目克隆到本地

    -
    git clone https://github.com/acgpiano/wooyun-node.git
    -

    修改config.js里面的用户名和密码,改为你的mysql的用户名和密码,port是服务的端口,可以自行修改。
    下载wooyun的静态资源:
    链接: 百度网盘 密码: mqnp
    需要解压到wooyun-node/static/bugs/
    文件夹下面(自行新建bugs文件夹)
    接下来安装node.js,去官网下载就好了。
    接下来安装cnpm(如果可以连Internet这一步可以忽略,以下命令的cnpm全都可以用npm代替)

    -
    npm install -g cnpm --registry=https://registry.npm.taobao.org
    -

    然后在wooyun-node里执行

    -
    cnpm install
    -

    等所有的依赖装完再执行

    -
    npm run db
    -

    等数据库建表完后,共40293条,再执行

    -
    npm start
    -

    默认port端口是9999,可以在config.js里面修改
    打开浏览器 http://127.0.0.1:9999就可以使用了。

    -

    仅供自学使用,如果要部署到公网可以自己改用orm,修改表结构加速查询,防注入。

    -
    - -
    - -

    当然是彩蛋辣~

    上面提到的 Baidu网盘 链接整理:

    -

    https://github.com/hanc00l/wooyun_public
    Watch:224___Star:3586___Fork:1.8k

    -
    -
    虚拟机下载地址:
    https://pan.baidu.com/s/1HkR4ggvAwTikshsjcKYBuA ,提取密码:8wnb(2018.4.23更新)
    【文件名:ooyun_vmware_201606_es】

    虚拟机下载地址: https://pan.baidu.com/s/1qYRqa3U 密码: w8vb (2017.7.4)
    【文件名:wooyun_final】
    虚拟机用户名、密码为hancool/qwe123
    -
    -

    https://github.com/m0l1ce/wooyunallbugs
    Watch:21___Star:398___Fork:154

    -
    -
    链接:https://pan.baidu.com/s/1htwVF3Q 密码:oskw
    【文件名:wooyun-15-a.zip等】
    - -
    -

    https://github.com/grt1st/wooyun_search
    Watch:22___Star:327___Fork:157

    -
    -
    静态网页网盘链接:
    bugs 链接: https://pan.baidu.com/s/1n_kkUaZZxcTEa4-v6sGa9Q 密码: sg98 (20180707)
    【文件名:WooYun_Bugs(漏洞库)】
    drops 链接: https://pan.baidu.com/s/1r2Y7rfntwnjglX6HtzDk6w 密码: 738f (20180707)
    【文件名:WooYun_Drops(知识库)】
    - -
    -

    https://github.com/acgpiano/wooyun-node
    Watch:2___Star:9___Fork:8

    -
    -
    链接: https://pan.baidu.com/share/init?shareid=3613354206&uk=4113422303 密码: mqnp
    【文件名:WooYun_Bugs(漏洞库)】
    - -
    - -
    - -

    当然还有彩蛋辣~

    新建一个文件夹,在里面打开终端,复制粘贴下面代码,或者保存为 .sh (linux)、 .bat (Windows),命令行调用辣

    -

    注意:最后三个库特别大,如果网络不好,可能出现 git 连接超时,可以连接更优网络,或参考我的文章

    - -
    echo .
    git clone https://github.com/hanc00l/wooyun_public
    echo .
    git clone https://github.com/boy-hack/wooyun-payload
    echo .
    git clone https://github.com/m0l1ce/wooyunallbugs
    echo .
    git clone https://github.com/SuperKieran/WooyunDrops
    echo .
    git clone https://github.com/SuperKieran/wooyun-img
    echo .
    git clone https://github.com/grt1st/wooyun_search
    echo .
    git clone https://github.com/LubyRuffy/wyquery
    echo .
    git clone https://github.com/jas502n/fuzz-wooyun-org
    echo .
    git clone https://github.com/xinali/wooyun
    echo .
    git clone https://github.com/l3m0n/wooyun-wiki
    echo .
    git clone https://github.com/fxfactorial/wooyun.github.io
    echo .
    git clone https://github.com/CaledoniaProject/wooyun_offline_ui
    echo .
    git clone https://github.com/lxj616/DVWA-WooYun
    echo .
    git clone https://github.com/neargle/SecNewsBak
    echo .
    git clone https://github.com/acgpiano/wooyun-node
    echo .
    git clone https://github.com/Xyntax/1000php 1000php-Xyntax
    echo .
    git clone https://github.com/starnightcyber/1000php 1000php-starnightcyber
    echo .
    git clone https://github.com/jiji262/wooyun_articles
    echo .
    - -]]>
    - - none - - - wooyun - github - -
    - - hexo + CloudFlare = 速度飞起 - /2020/02/hexo-with-cloudflare/ - 昨天配置了 Google、Baidu、Bing搜索引擎提交,不过比较悲催的是 Github Pages 服务器拒绝 BaiduSpider ,整个站点根本不能出现在 Baidu 里面好么!! 另一方面,速度过慢,github pages 在国内速度,不太理想,所以用 CloudFlare 老牌 cdn 加速整站,还可以被 BaiduSpider 收录。

    -

    参考了这篇文章: 基于 Hexo 的 GitHub Pages 配置 CloudFlare CDN_qhh0205-CSDN博客

    -

    准备好 GitHub 和 CloudFlare

    有一个 github 账户,添加 username.github.io 库,把 hexo 发布到存储库,不多说了。

    -

    注册 CloudFlare 账号并登录。

    -

    在 CloudFlare 添加站点

    在 CloudFlare 添加站点,并检查 DNS 记录,确认导入 CloudFlare 中。

    -

    在域名购买商处修改 DNS 服务器为 CloudFlare 提供的两个 DNS 服务器,等待生效之后继续操作

    -

    注意 :修改 DNS 服务器可能会导致某些记录丢失(像 Google 域名验证、letsencrypt 域名验证)(因为不是全部同步过去),所以在更改之前可以在旧 DNS 控制台,记录下各个 DNS 记录(截屏或手抄),后期可再写入新纪录

    -

    Ps:实验表明: CloudFlare 会同步大部分DNS记录,但是还是有部分子域名会漏掉,看个人情况是否手动记录原 DNS

    -

    image-20200210152724656

    -

    image-20200210112341702

    -

    修改 DNS 服务器:

    -

    image-20200210112513410

    -

    等待生效,可用 nslookup -q=ns tcpsoft.app 查询 DNS 解析服务器情况(本地的好像更新有点慢),其实 CloudFlare 在检测到 DNS 服务器修改成功之后会发邮件通知的。

    -

    然后在 CloudFlare 检查域名服务器,进行下一步操作,设置一些网站的自定义选项,包括是否开启浏览器到CF

    -

    的安全连接,是否开启CF到源服务器的安全连接,是否启用 Brotli 压缩来传输数据等。

    -

    然后就可以查看 DNS 设置,有黄色云图标的就是 CloudFlare 开启代理的

    -

    image-20200210120918605

    -

    我们可以用 dig (linux)或 nslookup (linux、Windows)查看域名解析情况。

    -
    root@Mi-CP /m/c/U/CP# dig blog.tcpsoft.app

    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> blog.tcpsoft.app
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45170
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;blog.tcpsoft.app. IN A

    ;; ANSWER SECTION:
    blog.tcpsoft.app. 900 IN CNAME tcpsoftware.github.io.
    tcpsoftware.github.io. 900 IN A 185.199.110.153
    tcpsoftware.github.io. 900 IN A 185.199.108.153
    tcpsoftware.github.io. 900 IN A 185.199.111.153
    tcpsoftware.github.io. 900 IN A 185.199.109.153

    ;; Query time: 1990 msec
    ;; SERVER: 223.5.5.5#53(223.5.5.5)
    ;; WHEN: Mon Feb 10 12:12:47 CST 2020
    ;; MSG SIZE rcvd: 133

    root@Mi-CP /m/c/U/CP# nslookup blog.tcpsoft.app
    Server: 223.5.5.5
    Address: 223.5.5.5#53

    Non-authoritative answer:
    blog.tcpsoft.app canonical name = tcpsoftware.github.io.
    Name: tcpsoftware.github.io
    Address: 185.199.110.153
    Name: tcpsoftware.github.io
    Address: 185.199.108.153
    Name: tcpsoftware.github.io
    Address: 185.199.109.153
    Name: tcpsoftware.github.io
    Address: 185.199.111.153

    root@Mi-CP /m/c/U/CP#
    - -

    我们可以看到解析了四个 IP,而我的 DNS 设置只有一个 CNAME,查询这个 IP,发现是 CDN,设置成功。

    -

    开启DNSSEC,防止 DNS 劫持

    在 CloudFlare 的 DNS 管理面板往下翻可以看到 DNSSEC 选项,DNSSEC 是 DNS 安全扩展,采用加密方式,防止 DNS 劫持

    -

    image-20200210122448916

    -

    CF 提供了十多个参数,转到域名注册商处,填入注册商要求的对应参数即可。

    -

    等待十多分钟至一个小时,CloudFlare 上的 DNSSEC 会检测到设置成功,提示 Success!

    -

    image-20200210125156256

    -

    又掉坑:“重定向次数过多”

    刚才的配置好之后,满以为可以运行的飞起来了,结果,打 !不 !开 !了 !

    -image-20200210143346231 - -

    一番查询发现是:CloudFlare SSL 选项开的是 Flexible。

    -

    image-20200210143616798

    -

    下面文字摘自 参考链接:WordPress 网站使用 CloudFlare 后提示“将您重定向的次数过多” 的原因及解决办法 _WordPress智库

    -

    Cloudflare CDN 配置

    -
      -
    • Off:不开启https。

      -
    • -
    • Flexible:当我们的源网站没有配置 HTTPS 支持时,启用这个选项,Cloudflare 会在回源的时候通过 HTTP 协议访问我们的网站。

      -
    • -
    • Full:当我们的源网站支持 HTTPS,但是 HTTPS 证书和域名不匹配或者是自签名证书时,Cloudflare 会通过 HTTPS 协议访问源网站,但不会验证证书,也就是说,即使我们的源网站提供的 HTTPS 证书不受浏览器信任,Cloudflare 也会通过 HTTPS 回源网站。

      -
    • -
    • Full(strict):当我们的源网站支持 HTTP ,并且证书有效时(未过期且受信任)。Cloudflare 会通过 HTTPS 协议访问源网站,并在每个请求过程中验证证书。

      -
    • -
    -

    了解了上面各个设置的功能,我们来看一下 Cloudflare 的循环重定向问题是怎么出现的,在 Cloudflare 中开启了 SSL 后,访问网站时出现循环重定向需满足下面两个条件:

    -
      -
    1. SSL 中设置了 Flexible,CDN 以 HTTP 协议回源网站。
    2. -
    3. 源网站支持 HTTPS,并且设置了通过 HTTP 协议访问时,自动跳转到 HTTPS 协议。
    4. -
    -

    到这里,可能就有朋友发现问题了,我们访问 Cloudflare 的 CDN 服务器的时候,是通过 HTTPS 访问的,CDN 访问源网站的时候,是通过 HTTP 访问的,源网站上 HTTP 又自动跳转了 HTTPS,完美的一个循环重定向。重定向的次数多了,浏览器就撂挑子报出了 ERR_TOO_MANY_REDIRECTS 的错误。

    -

    CloudFlare 造成重定向的次数过多问题的解决办法

    知道了循环重定向的原因,我们也就知道了怎么解决这个问题,通过测试,下面的两种设置方法都可以解决 Cloudflare 循环重定向的问题。

    -
      -
    • SSL 中选择 Full 或者 Full(strict),让 CDN 回源的时候使用 HTTPS 的方式回源,没有 HTTP 什么事了,就不会跳来跳去了
    • -
    • 源网站不设置 HTTPS 支持或者 不设置 HTTP 跳转 HTTPS,让 Cloudflare 回源的时候使用 HTTP 方式获取资源。
    • -
    -

    修改了 CloudFlare 设置后,可能需要过几分钟或清理浏览器缓存后才能生效。

    -

    除了 Cloudflare,使用其他 CDN 提供商的时候,也可能会出现这个问题,如果设置了 CDN 后,遇到了 Chrome 报重定向次数过多的问题,可以通过上面的思路查找问题。

    -]]>
    - - 建站 - - - hexo - cdn - cloudflare - -
    - - hexo seo 优化 - /2020/02/hexo-seo/ - 害呀,hexo 都做了这么多了,干脆把google 统计一起加上去得了。Google Analytics、Google添加站点,baidu 添加站点、bing 添加站点,通通加上!

    - - -

    google analytics

      -
    • 访问Google Analytics,需要科学上网并用google账号登录,之后按照提示填写网站信息开通GA服务,获取统计ID。

      -
    • -
    • 编辑主题配置文件, 找到关键字google_analytics , 删除注释#并填写获取到的统计ID

      -
      google_analytics:
      tracking_id: UA-XXXXXXXXX-X # <app_id>
      - -
    • -
    -

    robots.txt

    在 source 目录下添加 robots.txt ,编写爬虫规则,下面是我的 robots.txt

    -
    User-agent: *
    Allow: /
    Allow: /archives/
    Allow: /tags/
    Allow: /categories/

    Disallow: /vendors/
    Disallow: /js/
    Disallow: /lib/
    Disallow: /css/
    Disallow: /fonts/
    Disallow: /vendors/
    Disallow: /fancybox/
    Disallow: /old/

    Sitemap: http://blog.tcpsoft.app/sitemap.xml
    Sitemap: http://blog.tcpsoft.app/baidusitemap.xml
    - -

    Google Search Console

    image-20200209180807809

    -

    提交整个域名或者某个子域名到 google,我这里提交“网域”即整个域名。

    -

    输入tcpsoft.app,点继续,会开始验证。

    -

    image-20200209181014294

    -

    在域名购买处修改 DNS 记录或者自己的 DNS 托管商处修改,添加一条特定的 TXT 记录。

    -

    小贴士 用 linux 命令dig hostnamenslookup -q=TXT hostname可查询DNS是否生效(后者windows也可用)

    -

    这个地方有一点坑的是需要设置 name 为 @,值为 google-site-verification=XXXXXX ,而不是 name 为 google-site-verification

    -

    image-20200209184813570

    -

    设置记录,稍等片刻(或者等半天)记录生效之后,点击验证,验证成功

    -

    image-20200209184707276

    -

    之后就可以进行管理辣。

    -

    接下来提交 sitemap,站点地图,帮助机器人抓取网站

    -

    之后就可以通过 google 搜索命令 site:blog.tcpsoft.app 查看站点收录情况

    -

    image-20200209185519286

    -

    Baidu搜索资源平台

    打开Baidu搜索资源平台,添加网站

    -

    image-20200209201555631

    -

    填入主域名 https://tcpsoft.app 选择网站分类,准备验证,可通过文件验证,html 标签验证,CNAME 验证,此处我选择 CNAME 验证,将 H9JpujyZsP.tcpsoft.app 使用 CNAME 解析到 ziyuan.baidu.com。和之前一样,在托管商添加DNS记录。

    -

    小贴士 可用 dig hostnamenslookup -q=CNAME hostname 可查看DNS是否生效,同上文。

    -

    image-20200209202629054

    -

    添加记录生效后就点击完成验证,稍等一会儿,提示验证成功,可以选择批量添加子站。

    -

    和 google 不同,这里的需要手动一条条添加。(还有一点隐私保护的味道呢 [滑稽] )手动填入子域名即可。

    -

    image-20200209203148808

    -

    通过 html 标签验证添加,会要求 head 中添加标签,此处 hexo 有集成,在 hexo 修改配置就可。

    -

    image-20200209204126442

    -

    复制 baidu 提供的 content,在 next 主题的 _config.yml中搜索 baidu_site_verification: 填入,然后再 hexo g -d 发布一次,检查有标签后,点击完成验证。

    -

    验证完成 ,就可以查看站点,我等了半天 Baidu 也抓不到站点,到处看了一圈发现是 github 屏蔽了Baidu 爬虫,所以需要其他方式。

    -

    首先是把根目录下的 baidusitemap.xml 提交给Baidu平台,不多介绍,自己摸索

    -

    Baidu 自动推送

    于是就手动提交 sitemap 并且开启 hexo next 集成的自动推送链接功能,打开站点主题theme/next/_config.yml文件:

    -
    # Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
    baidu_push: true
    - -

    however~,貌似 uBlock Origin 会拦截 Google Analytics 和 Baidu 自动提交,这就比较悲催了

    -

    hexo 自动提交 Baidu

    npm install hexo-baidu-url-submit --save
    - -

    然后修改 hexo 的配置文件,添加 baidu_url_submit: ,并修改 deploy

    -

    注意:本插件的配置文件中包含秘钥, 如果要把 hexo 博客整体放在 github ,需要放在私有仓库。

    -

    注意:这里 host 里填入的域名是在 Baidu站长平台 添加好的域名

    -
    baidu_url_submit:
    count: 5 ## 提交最新的5个链接
    host: blog.tcpsoft.app ## 在百度站长平台中注册的域名
    token: your_token ## 请注意这是您的秘钥, 请不要发布在公众仓库里!
    path: baidu_urls.txt ## 文本文档的地址, 新链接会保存在此文本文档里
    # xz_appid: 'xxxxxx' ## 你的熊掌号 appid
    # xz_token: 'xxxxxx' ## 你的熊掌号 token
    # xz_count: 10 ## 从所有的提交的数据当中选取最新的10条,该数量跟你的熊掌号而定
    - -

    不过我认为熊掌号没什么用,需要的话可以添加

    -
    deploy:
    - type: git
    repository: https://github.com/XXXX/XXXX
    - type: baidu_url_submitter # 百度
    # - type: baidu_xz_url_submitter # 百度熊掌号
    - -

    执行hexo deploy的时候,新的链接就会被推送了。

    -

    当你 hexo g -d,看到这个的时候,说明配置成功了

    -

    image-20200209224126611

    -

    其他的中国特色搜索引擎

    不说了,想设置Sougou、360、神马可以参考这篇: Hexo-NexT 博客提交搜索引擎收录 | 小丁的个人博客

    -

    Bing

    搜索并打开 Bing - Webmaster Tools,Bing网站搜索管理。然后登陆微软账号或者 google 账号,看起来像这样:

    -

    image-20200209235529136

    -

    由于我已经有了 Google Search Console(第三条提到的),就直接绑定 Google 账号同步数据就可以了。

    -

    image-20200209235651847

    -

    点击“继续访问”之后会跳转到 google 登陆,登录之后授权 Bing 就可以了。读取到站点数据,导入。

    -

    image-20200209235919325

    -

    然后也需要向 Bing 提交sitemap,同上 Google。

    -

    修改 url 格式

    -

    seo搜索引擎优化认为,网站的最佳结构是用户从首页点击三次就可以到达任何一个页面

    -
    -

    但是我们使用hexo编译的站点打开文章的url是:sitename/year/mounth/day/title四层的结构,这样的url结构很不利于seo,爬虫就会经常爬不到我们的文章,所以我把url格式改为 sitename/year/mounth/title。

    -

    修改 hexo 配置文件:

    -
    permalink: :year/:month/:title/
    - -

    出站链接 “nofollow”

    外链越多,搜索引擎给此站点的权重就越低,即排位越后。为了提高权重,可以禁止搜索引擎跟进外链,添加 nofollow 属性就可以做到。一个一个页面添加跟定是不现实的,当然是选择用插件。

    -

    先在 hexo 博客根目录安装插件,插件有hexo-autonofollowhexo-filter-nofollow ,filter要好用一些,他们两个的差别可以参考作者的博客:hexo-filter-nofollow - Hexo 官方的 nofollow 插件 | Sukka’s Blog

    -
    npm install hexo-filter-nofollow --save
    - -

    编辑 hexo 配置文件,添加:

    -
    nofollow:
    enable: true
    field: post # post:仅处理文章内容,site:处理全站所有页面
    exclude:
    - 'exclude1.com'
    - 'exclude2.com'
    - -]]>
    - - 建站 - - - hexo - seo - -
    - - hexo + gitalk,满满的都是坑。 - /2020/02/hexo-with-gitalk/ - 今日看到博客的评论功能,就想整一个,本以为跟前两天添加hexo插件查不多,结果,,爬坑,又掉坑,爬坑又掉坑……

    -
    -

    安装gitalk

    安装gitalk没什么,有很多博文有介绍,这里贴一篇就好,修改主题配置的部分很精简,我喜欢。

    - -

    注意域名是自己的 github pages 或者自定义域名就好。

    -

    注意每一次发布新文章之后都需要去博客登陆刷新一下评论,插件会在你的 repo 里面新建 issue。

    -

    我之前有篇文章叫《Hi, I’m Cortana.》,我点开这个做实验看能不能使用评论功能,原地址是

    -
    https://blog.tcpsoft.app/2019/12/29/Hi,%20I'm%20Cortana/
    -
    -

    艰难爬坑

    [ 以下多链接警告,请选择性阅读 ]

    -

    报错:redirect_uri_mismatch

    -

    看了感觉也没啥用,根据指示转到下面这篇,写的比较详细,但是是没有解决问题

    - -

    我看了看我的配置,根据前面的指导写的最初的配置是这样子的:

    -

    github-config

    -

    http https 的问题?

    又看了看我的请求 url,确实是都是 https,没有问题啊

    -

    后来又找到这个 gitalk issue 115 和 162,貌似是个很“权威”的解答

    - -

    加 / ?

    好像回调地址里面要加个 / ?加就加吧,然后

    -
    Authorization callback URL:
    https://blog.tcpsoft.app/
    - -

    也不行。仍然跳回主页,并提示 redirect_uri_mismatch

    -

    后来我又尝试了:

    -
    http://tcpsoftware.github.io
    https://tcpsoftware.github.io
    http://tcpsoftware.github.io/
    https://tcpsoftware.github.io/
    http://blog.tcpsoft.app
    https://blog.tcpsoft.app
    http://blog.tcpsoft.app/
    https://blog.tcpsoft.app/
    tcpsoftware.github.io
    tcpsoftware.github.io
    blog.tcpsoft.app
    blog.tcpsoft.app
    - -

    心累

    -

    然后忽然在 issue 162 翻到这个?

    -

    image-20200209140447713

    -

    中文??!

    🤨

    -

    🤔

    -

    回头看了看我的 url,貌似并没有中文。

    -
    https://blog.tcpsoft.app/2019/12/29/Hi,%20I'm%20Cortana/
    -

    url 编码导致的问题?

    -

    我尝试换一个文章,在上一篇 hexo 里,可了!!它的链接是,

    -
    https://blog.tcpsoft.app/2020/02/06/hexo-changes/
    -

    呐,没有 url 编码,没有中文

    -

    🤔

    -

    issue

    -

    编码问题。

    url 里面不要有特殊符号,刚才链接里面完美命中(而且链接看起来很丑可读性很差)

    -

    有特殊符号不能被匹配规则匹配到(像我刚才链接里面的 , '

    -
    -

    解决方案

    hexo new passage_name

    -

    新建文章的时候想好一个优雅的名字,如果遇到符号或者多单词,可以考虑用:

    -
    驼峰式命名法(小驼峰命名法)

    hexo new helloImCortana

    -
    帕斯卡命名法(大驼峰命名法)

    hexo new HelloImCortana

    -
    匈牙利命名法(本文无关)

    hexo new sHelloImCortana

    -

    变量类型+变量名(逃)

    -
    下划线命名法

    hexo new hello_Im_Cortana

    -
    短横线分隔(Github风格 编程必报错)

    hexo new hello-Im-Cortana

    -
    -

    再说一句

    (其实上面尝试的那一大堆链接,除了最后四个没有 http https 协议的之外,其他的都是可以的)

    -]]>
    - - 建站 - - - hexo - gitalk - -
    - - hexo 大换血 - /2020/02/hexo-changes/ - 今天闲来无事,折腾博客(其实是写 gdb 结果得更新一下 hexo ),然后这个博客就大换血了。

    -

    我干了啥呢:

    -
    -

    Typora 的图片存放路径

    Typora 的图片存放路径和文章图片 URL 的问题

    - -

    hexo 添加主页页面,tags等

    hexo 主页上的 tags、categories、archive、about 等页面,手动添加。

    - -

    hexo 打赏

    设置 next 主题配置下的 reward_settings,但和文章中说的有些小不同

    - -

    hexo 添加版权

    这里我遵循知识共享(Creative Commons) 署名 4.0 协议国际版,可以在next主题的 config.yml 里面的 creative_commons 配置

    - -

    hexo 添加版权后链接错误问题

    本来应该是 http:// blog.tcpsoft.app/2020/02/06/hexo-changes/,

    -

    但是变成了 /http:/blog.tcpsoft.app/2020/02/06/hexo-changes/

    -

    所以就手动写了个 js 脚本,添加到 source/js 文件夹,并修改 next 的一个配置文件。

    -
    //添加<script>到 \themes\next\layout\_scripts\index.swig
    //<script src="/js/diy.js"></script>

    link = document.getElementsByClassName("post-copyright-link")[0].children[1];
    href = link.getAttribute("href").replace("/http:/","http://");
    link.setAttribute("href",href);
    - -

    解决了显示混乱问题

    我之前的博客迁移,导致了显示混乱问题(即我已有 css 而 hexo 又给我加上一套主题的显示方案),此处用 hexo 的 skip_render 设置即可,不过要匹配文件文件夹还是有点小坑的 [坑爹预警]

    - -

    博客 CDN 加速

    看了百度云加速,知道创宇云加速,cloud flare,暂时还是不弄了,现阶段博客是基于 GitHub Pages + Hexo ,图片使用腾讯云存储。后期可能考虑加 CDN 或整站迁移腾讯云存储(因域名无法备案及COS网站的处理问题已放弃此方案)

    -

    sitemap 功能

    hexo、next 主题的 sitemap 功能,帮助搜索引擎收录站点(不用修改 hexo 配置文件)
    注:这些 npm 命令都是在本地博客根目录下执行,下同

    -
    npm install hexo-generator-sitemap --save
    npm install hexo-generator-baidu-sitemap --save
    - - -

    RSS 订阅功能

    (不用修改 hexo 配置文件)(修改next主题配置以显示按钮)

    -
    npm install hexo-generator-feed --save
    -
    "/themes/next/_config.yml"
    menu:
    ......
    rss: /atom.xml
    - -

    站点搜索功能

    安装插件,然后修改 next 配置文件,,,

    -
    npm install hexo-generator-searchdb --save
    - - -

    相关文章推荐

    同样的,安装插件,修改配置

    -
    npm install hexo-related-popular-posts --save
    - -

    参考链接1: Hexo+NexT(v7.0+) 搭建博客:功能强化 | Chingow’s Blog

    -

    文章字数统计和阅读时间估计

    npm install hexo-symbols-count-time --save
    - -

    参考链接1: o(五):个性化 next theme | 执行者的博客

    -

    社交按钮

    参考链接1: o(五):个性化 next theme | 执行者的博客

    -

    阅读进度

    设置 next 主题配置:

    -
    reading_progress:
    enable: true
    - -

    hexo 设置阅读全文

    其实也和文章的有点不一样,可能是因为 next 版本不一样,我设置的是 next 配置文件

    -
    # Automatically excerpt description in homepage as preamble text.
    excerpt_description: true

    # Read more button
    # If true, the read more button will be displayed in excerpt section.
    read_more_btn: true
    - -

    参考链接1: Hexo-设置阅读全文 - 简书

    -

    修改标签样式

    只需要修改模板/themes/next/layout/_macro/post.swig,搜索 rel="tag">#,将 # 换成<i class="fa fa-tag"></i> 。(好像改了更丑了,后来改回来了)

    -

    参考链接1: Hexo博客优化之Next主题美化_huangpiao-CSDN博客

    -

    设置博客底部布局

    参考链接1: Hexo博客优化之Next主题美化_huangpiao-CSDN博客

    -

    设置代码样式

    没有改,后面需要再说

    -

    参考链接1: Hexo博客优化之Next主题美化_huangpiao-CSDN博客

    -

    结语

    终于配置完了,要死,(其实我是想写点 gdb 的来着?)

    -]]>
    - - 建站 - - - hexo - -
    - - Hi, I'm Cortana. - /2019/12/Hi-Im-Cortana/ - 2020即将来临了,作为群贫困人口,在2019年再来看各位群友最后一面

    -]]>
    - - none - - - none - -
    -
    diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index 520356f..0000000 --- a/sitemap.xml +++ /dev/null @@ -1,207 +0,0 @@ - - - - - https://blog.tcpsoft.app/2022/04/adb-picture-transfer/ - - 2022-04-10T10:19:04.915Z - - - - - https://blog.tcpsoft.app/2022/03/my-disk-crushed/ - - 2022-03-04T15:08:17.232Z - - - - - https://blog.tcpsoft.app/2021/07/wsl2-and-proxifier/ - - 2021-07-21T02:12:20.832Z - - - - - https://blog.tcpsoft.app/2020/07/qzone-faster-like/ - - 2020-08-16T10:30:11.292Z - - - - - https://blog.tcpsoft.app/2020/08/welcome-pwn-partition/ - - 2020-08-05T04:20:56.561Z - - - - - https://blog.tcpsoft.app/2020/07/gdb-operation/ - - 2020-07-28T14:21:11.448Z - - - - - https://blog.tcpsoft.app/2020/07/batch-shortcuts/ - - 2020-07-28T13:28:21.725Z - - - - - https://blog.tcpsoft.app/about/index.html - - 2020-07-16T04:58:41.479Z - - - - - https://blog.tcpsoft.app/2020/07/time-management/ - - 2020-07-16T04:57:23.701Z - - - - - https://blog.tcpsoft.app/2020/05/Mi9-SE-screen-problem-self-rescue/ - - 2020-05-26T13:04:34.854Z - - - - - https://blog.tcpsoft.app/2020/05/dajubao/ - - 2020-05-26T11:57:51.419Z - - - - - https://blog.tcpsoft.app/2020/05/adb-auto-make-money/ - - 2020-05-05T05:27:20.987Z - - - - - https://blog.tcpsoft.app/2020/03/why-linux/ - - 2020-03-28T05:37:39.960Z - - - - - https://blog.tcpsoft.app/2020/03/let-onedrive-fly-scientifically/ - - 2020-03-22T04:21:35.300Z - - - - - https://blog.tcpsoft.app/2020/02/let-git-fly-scientifically/ - - 2020-03-21T08:40:38.967Z - - - - - https://blog.tcpsoft.app/2020/03/how-to-ask-in-group-chat/ - - 2020-03-06T17:10:35.817Z - - - - - https://blog.tcpsoft.app/2020/02/access-google-from-nothing/ - - 2020-03-06T17:09:31.335Z - - - - - https://blog.tcpsoft.app/2020/03/cpp-with-Visual-Studio-2019/ - - 2020-03-06T06:45:52.168Z - - - - - https://blog.tcpsoft.app/2020/02/2020gaokaojiayou/ - - 2020-02-28T11:26:22.790Z - - - - - https://blog.tcpsoft.app/2020/02/getting-start-52pojie/ - - 2020-02-22T16:53:57.174Z - - - - - https://blog.tcpsoft.app/2020/02/wooyun-on-github/ - - 2020-02-13T15:52:27.920Z - - - - - https://blog.tcpsoft.app/2019/12/Hi-Im-Cortana/ - - 2020-02-11T17:53:34.830Z - - - - - https://blog.tcpsoft.app/2020/02/hexo-with-gitalk/ - - 2020-02-11T17:53:31.604Z - - - - - https://blog.tcpsoft.app/2020/02/hexo-with-cloudflare/ - - 2020-02-11T17:53:28.120Z - - - - - https://blog.tcpsoft.app/2020/02/hexo-seo/ - - 2020-02-11T17:53:24.399Z - - - - - https://blog.tcpsoft.app/2020/02/hexo-changes/ - - 2020-02-11T17:53:20.273Z - - - - - https://blog.tcpsoft.app/categories/index.html - - 2020-02-06T11:28:49.924Z - - - - - https://blog.tcpsoft.app/tags/index.html - - 2020-02-06T09:17:54.852Z - - - - - https://blog.tcpsoft.app/exam.html - - 2020-01-03T14:42:00.594Z - - - - diff --git a/source/CNAME b/source/CNAME new file mode 100644 index 0000000..6329106 --- /dev/null +++ b/source/CNAME @@ -0,0 +1 @@ +blog.tcpsoft.app \ No newline at end of file diff --git a/source/_posts/Hi, I'm Cortana.md b/source/_posts/Hi, I'm Cortana.md new file mode 100644 index 0000000..00654a8 --- /dev/null +++ b/source/_posts/Hi, I'm Cortana.md @@ -0,0 +1,7 @@ +--- +title: Hi, I'm Cortana. +date: 2019-12-29 13:42:28 +tags: +--- +2020即将来临了,作为群贫困人口,在2019年再来看各位群友最后一面 + diff --git a/source/exam.html b/source/exam.html new file mode 100644 index 0000000..8281ae8 --- /dev/null +++ b/source/exam.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/source/old/520/css/index.css b/source/old/520/css/index.css new file mode 100644 index 0000000..a04ed0b --- /dev/null +++ b/source/old/520/css/index.css @@ -0,0 +1,84 @@ +#search–div{ + float: right; + width: 340px; + margin: 0px; + border: 2px solid #000000; + margin-right: 20px; + padding: 0px; + text–align: center; +} +#search-input{ + float: right; + width: 300px; + height: 40px; + font-size: 20px; + margin: auto 0px; + border: none; + padding:0px; + text-align: center; +} +#nav-top span{ + font-size: 25px; +} +#search-button{ + float: right; + width: 40px; + height: 40px; + margin: auto 0px; + border: none; + padding: 0px; + background-image: url(../img/search-white.png); + background-color: #0c8484; + background-position: center; + background-repeat: no-repeat; +} +.nav-button{ + width: 80px; + height: 40px; + font-size: 25px; + margin: auto 0px; + margin: 0%; + padding: 0px; +} +div.music-value-buttons{ + /*固定定位 如下:*/ + position: fixed; + bottom: 6.5%; + right: -0.5%; + + /*背景 如下:*/ + background-color: #ABCDEF; + + /*边框 距离*/ + border: #000000 2px solid; /*边框*/ + padding: 10px; /*内边距*/ + width: 50px; /*宽度*/ +} +#select_music_ul{ + padding: 0px; +} +.select_music_button{ + + /*背景 如下:*/ + background-color: #DDDDDD; + + text-align: center; + margin-top: 5px; + margin-bottom: 5px; + width: 96%; + height: 25px; + border: 0px; +} +#music{ + position: fixed; + bottom: 0%; + right: 0%; +} +label#select_music_div{ + font-size: 9px; +} +input.music-value-button{ + height: 20px; + width: 40px; + border: 0px; +} \ No newline at end of file diff --git a/source/old/520/css/struct.css b/source/old/520/css/struct.css new file mode 100644 index 0000000..1789614 --- /dev/null +++ b/source/old/520/css/struct.css @@ -0,0 +1,64 @@ +body,#header,#nav,#nav-left,#section,#aside,#footer { + margin: 0%; +} +#header { + color: white; + width: 100%; + background-color: #AEDFCB; + text-align: center; + padding: 5px; + padding-bottom: 1px; + height: 10%; +} +#header h1 { + font-size: 35px; + border-bottom: 1px solid black; +} +#nav-top{ + line-height: 10%; + background-color: #eeeeee; + width: 100%; + padding: 1px; + text-align: center; +} +#nav-left{ + background-color: #cccccc; + width: 19.5%; + padding: 1px; + margin–left: 0%; + float: left; +} +#section { + font-family: sans-serif; + background-color: gray; + background-image: url(../img/body-background.gif); + margin–left: 20%; + padding: 1px; + border: 2px solid #439900; + width: 59.5%; + display: block; + float: left; +} +#select_music_div,#aside { + font-family: sans-serif; + text-align: center; + background-color: #ABCDEF; + width: 19.5%; + margin-left: 80%; + margin-right: 0%; + padding: 1px; + border: 1px solid #439900; + display: block; + position: relative; +} +#footer { + font-size: small; + clear: both; + margin: 20px auto 0 auto; + text-align: center; + color: #999; + line-height: 22px; + padding: 10px 0 10px 0; + background: #DDDDDD; + border-top: 1px solid #E6E6E6; +} \ No newline at end of file diff --git a/source/old/520/img/01.jpg b/source/old/520/img/01.jpg new file mode 100644 index 0000000..7aad639 Binary files /dev/null and b/source/old/520/img/01.jpg differ diff --git a/source/old/520/img/01.png b/source/old/520/img/01.png new file mode 100644 index 0000000..e50c749 Binary files /dev/null and b/source/old/520/img/01.png differ diff --git a/source/old/520/img/012.jpg b/source/old/520/img/012.jpg new file mode 100644 index 0000000..dd66e7a Binary files /dev/null and b/source/old/520/img/012.jpg differ diff --git a/source/old/520/img/013.jpg b/source/old/520/img/013.jpg new file mode 100644 index 0000000..6d8262f Binary files /dev/null and b/source/old/520/img/013.jpg differ diff --git a/source/old/520/img/014.jpg b/source/old/520/img/014.jpg new file mode 100644 index 0000000..3a9bc2e Binary files /dev/null and b/source/old/520/img/014.jpg differ diff --git a/source/old/520/img/015.jpg b/source/old/520/img/015.jpg new file mode 100644 index 0000000..7f532c2 Binary files /dev/null and b/source/old/520/img/015.jpg differ diff --git a/source/old/520/img/016.jpg b/source/old/520/img/016.jpg new file mode 100644 index 0000000..8e86dc8 Binary files /dev/null and b/source/old/520/img/016.jpg differ diff --git a/source/old/520/img/02.png b/source/old/520/img/02.png new file mode 100644 index 0000000..3925aed Binary files /dev/null and b/source/old/520/img/02.png differ diff --git a/source/old/520/img/body-background.gif b/source/old/520/img/body-background.gif new file mode 100644 index 0000000..cdd320d Binary files /dev/null and b/source/old/520/img/body-background.gif differ diff --git a/source/old/520/img/body-background.png b/source/old/520/img/body-background.png new file mode 100644 index 0000000..c6fdf66 Binary files /dev/null and b/source/old/520/img/body-background.png differ diff --git a/source/old/520/img/search-white.png b/source/old/520/img/search-white.png new file mode 100644 index 0000000..f56d812 Binary files /dev/null and b/source/old/520/img/search-white.png differ diff --git a/source/old/520/img/search.png b/source/old/520/img/search.png new file mode 100644 index 0000000..f1d2348 Binary files /dev/null and b/source/old/520/img/search.png differ diff --git a/source/old/520/index.html b/source/old/520/index.html new file mode 100644 index 0000000..0b53cee --- /dev/null +++ b/source/old/520/index.html @@ -0,0 +1,95 @@ + + + + + + 这是网页标题。 + + + + + + + + + + + + + + +
    + + +
    +
    +

    。。。

    + "你的浏览器不支持HTML5的画布。" +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
      + +
    +
    +
    +
    + +
    + 把音量
    设置为
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + 幻想过遇见你的呼吸 遇见你的地点 遇见你的表情 后来发现你才最重要QQ:2065925071 +
    + 温馨提示:
    + 您的js不存在! +
    + + diff --git a/source/old/d/index.html b/source/old/d/index.html new file mode 100644 index 0000000..c49f3d6 --- /dev/null +++ b/source/old/d/index.html @@ -0,0 +1,22 @@ + + + + + 页面收录 + + +

    上次司南科技社网页培训活动
    收集到的文件在此
    点击链接前往

    +

    +

      +
    1.  电教CP/shuai.html
    2. +
    3.  终徵绥兮.html/终徵绥兮.html
    4. +
    5.  233.html
    6. +
    7.  dg.html
    8. +
    9.  new_file.html
    10. +
    11.  涂cp.html
    12. +
    13.  web2.html
    14. +
    + +

    + + diff --git a/source/old/d/new_file.html b/source/old/d/new_file.html new file mode 100644 index 0000000..fb9e1ea --- /dev/null +++ b/source/old/d/new_file.html @@ -0,0 +1,19 @@ + + + + + + + +

    这是一级标题

    +

    二级标题

    +

    三级标题

    + +

    + 哈!这是我的 + 段落 + 这里有一个
    换行。 +

    + + + diff --git a/source/old/d/photo.jpg b/source/old/d/photo.jpg new file mode 100644 index 0000000..fdb71f7 Binary files /dev/null and b/source/old/d/photo.jpg differ diff --git a/source/old/d/web2.html b/source/old/d/web2.html new file mode 100644 index 0000000..42c7419 --- /dev/null +++ b/source/old/d/web2.html @@ -0,0 +1,17 @@ + + + + + + +

    这是一级标题

    +

    二级标题

    +

    三级标题

    + +

    + 哈!这是我的 + 段落 + 这里有一个
    换行符。 +

    + + diff --git "a/source/old/d/\346\266\202cp.html" "b/source/old/d/\346\266\202cp.html" new file mode 100644 index 0000000..ec58340 --- /dev/null +++ "b/source/old/d/\346\266\202cp.html" @@ -0,0 +1,28 @@ + + + + + 这个是我的网页,哈哈哈 + + +

    .........*******.............

    +

    ......************...........

    +

    ........*********............

    +

    ........*********............

    +

    .........*******.............

    +

    ............**...............

    +

    ............**...............

    +

    ****************************

    +

    ****************************

    + + + + + + + + + +

    tu cp zui laji

    + + diff --git "a/source/old/d/\347\224\265\346\225\231CP/shuai.html" "b/source/old/d/\347\224\265\346\225\231CP/shuai.html" new file mode 100644 index 0000000..dcfb4fe --- /dev/null +++ "b/source/old/d/\347\224\265\346\225\231CP/shuai.html" @@ -0,0 +1,32 @@ + + + + + 物理大法好!!c++也同样强无敌 + + +

    二力平衡

    +

    if循环

    +

    电教CP

    +

    强无敌

    + + +

    + #include
    + using namespace std;
    + int main()
    + {
    + cout<<"哈哈哈哈哈";
    + if(liuyipeng==sha)
    + {
    + kill liuyipeng;
    + }
    + else
    + {
    + kiss him;
    + }
    + }
    + +

    + + diff --git "a/source/old/d/\347\273\210\345\276\265\347\273\245\345\205\256.html/\347\273\210\345\276\265\347\273\245\345\205\256.html" "b/source/old/d/\347\273\210\345\276\265\347\273\245\345\205\256.html/\347\273\210\345\276\265\347\273\245\345\205\256.html" new file mode 100644 index 0000000..2a014e0 --- /dev/null +++ "b/source/old/d/\347\273\210\345\276\265\347\273\245\345\205\256.html/\347\273\210\345\276\265\347\273\245\345\205\256.html" @@ -0,0 +1,22 @@ + + + + + 终徵绥兮 + + +

    终徵绥兮

    + + 时间的旅者 + 遥望在 + 陌影 + +

    孤影滥觞

    + + 酒不醉人
    + 人自醉 +
    +

    梦逐天漄

    + + + diff --git a/source/old/demo/ajax/ajax.html b/source/old/demo/ajax/ajax.html new file mode 100644 index 0000000..a7ce802 --- /dev/null +++ b/source/old/demo/ajax/ajax.html @@ -0,0 +1,24 @@ + + + + + load demo + + + + + +Projects: +
      + + + + + diff --git a/source/old/demo/ajax/ajaxtext.txt b/source/old/demo/ajax/ajaxtext.txt new file mode 100644 index 0000000..2fee72c --- /dev/null +++ b/source/old/demo/ajax/ajaxtext.txt @@ -0,0 +1,2 @@ +Projects: +

      this is the passage.

      diff --git a/source/old/game/index.html b/source/old/game/index.html new file mode 100644 index 0000000..f1d08ae --- /dev/null +++ b/source/old/game/index.html @@ -0,0 +1,10 @@ + + + + + Some Games. + + +

      Some Games.

      + + diff --git a/source/old/index.css b/source/old/index.css new file mode 100644 index 0000000..44d1de4 --- /dev/null +++ b/source/old/index.css @@ -0,0 +1,32 @@ +body{ + margin: 0px; + border: 0px; + padding:0px; + //text_align: center; +} +#main_div{ + width: 80%; + height: 80%; +/* margin-top: auto; + margin-bottom: auto; + margin-left: auto; + margin-right: auto;*/ + + position:absolute; + left:10%; + top:10%; + text-align: left; + background-color: skyblue; +} +#img_a{ + color: red; + font-size: 20px; + width: 100px; + height: 100px; + float: left; + /*background-image: url(./head.jpg);*/ + background-repeat: no-repeat; +} +h1{ + font-size: 50px; +} diff --git a/source/old/index.html b/source/old/index.html new file mode 100644 index 0000000..cf64b6e --- /dev/null +++ b/source/old/index.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + TCP_Website + + + + + + +
      + +

      Hello!

      +

      Here is the website of TCPSoft

      +
      +

       ●友情链接:一个制作比较精良的网页:tcpsoft.me/520

      +

       ●友情链接:访问我的github

      +

       ●友情链接:内江六中司南科技社官网跳转链接

      +

       ●友情链接:内江六中司南科技社官网

      +

       ●友情链接:内江六中司南科技社介绍

      +

       ●友情链接:内江六中官网

      +

       ●站内链接:cdn - 内容分发中心

      +

       ●站内链接:games - HTML5游戏

      +

       ●站内链接:司南科技社 网页活动制作页面

      +
      +
      +
      + + + diff --git a/source/old/index.js b/source/old/index.js new file mode 100644 index 0000000..571bbbc --- /dev/null +++ b/source/old/index.js @@ -0,0 +1,13 @@ +function $$(id) +{ + return document.getElementById(id); +} +function mOver(obj) +{ + obj.innerHTML="点击前往
      我的
      GitHub
      "; +} + +function mOut(obj) +{ + obj.innerHTML=""; +} \ No newline at end of file diff --git a/source/old/snkjs/index.css b/source/old/snkjs/index.css new file mode 100644 index 0000000..586f463 --- /dev/null +++ b/source/old/snkjs/index.css @@ -0,0 +1,5 @@ +#timer +{ + font-size: 50px; + color: red; +} \ No newline at end of file diff --git a/source/old/snkjs/index.html b/source/old/snkjs/index.html new file mode 100644 index 0000000..fffed40 --- /dev/null +++ b/source/old/snkjs/index.html @@ -0,0 +1,15 @@ + + + + + + + + 跳转中. . . + + +

      即将进入司南科技社官网. . .

      让我们倒数五个数

      +

      +

      如果无法跳转,请点击链接,涂副社带你进官网带你飞

      + + diff --git a/source/old/snkjs/index.js b/source/old/snkjs/index.js new file mode 100644 index 0000000..7dbbeb1 --- /dev/null +++ b/source/old/snkjs/index.js @@ -0,0 +1,35 @@ +window.onload=loading(); +function $$(id) +{ + return document.getElementById(id); +} +function change (str) +{ + $$("timer").innerHTML=str; +} +function add (str) +{ + $$("timer").innerHTML+=str; +} +function turn() +{ + //add(" 0 "); + window.location.href="https://snkjs.github.io"; + //alert("已跳转"); +} +function loading() +{ + //var t=setTimeout("",5000); + var t5=setTimeout("add(' 5 ')",1000); + var t4=setTimeout("add(' 4 ')",2000); + var t3=setTimeout("add(' 3 ')",3000); + var t2=setTimeout("add(' 2 ')",4000); + var t1=setTimeout("add(' 1 ')",5000); + var t23333=setTimeout("turn();",6000); +} + +// //重复执行某个方法 +// var t1 = window.setInterval(hello,1000); +// var t2 = window.setInterval("hello()",3000); +// //去掉定时器的方法 +// window.clearInterval(t1); diff --git a/source/old/test/hitNJLZ.html b/source/old/test/hitNJLZ.html new file mode 100644 index 0000000..f79c6e4 --- /dev/null +++ b/source/old/test/hitNJLZ.html @@ -0,0 +1,71 @@ + + + + + + + + + 选择列表
      + 向此链接请求
      + 毫秒刷新
      + +
      + + + + + diff --git a/source/old/test/json/json.html b/source/old/test/json/json.html new file mode 100644 index 0000000..7bd429e --- /dev/null +++ b/source/old/test/json/json.html @@ -0,0 +1,11 @@ + + + + + + + +

      wrong !

      +
      + + \ No newline at end of file diff --git a/source/old/test/json/json.js b/source/old/test/json/json.js new file mode 100644 index 0000000..f57992a --- /dev/null +++ b/source/old/test/json/json.js @@ -0,0 +1,55 @@ +function updatetimus(timus) +{ + var p = document.getElementsByTagName("p")[0]; + p.innerHTML = "updatetimus p 已经正常运行"; + //alert(JSON.stringify(timus)); + var timus_div = document.getElementById("timus_div"); + timus_div.innerHTML="updatetimus函数已经正常运行"; + for(var i=0;i + + + + + + +

      wrong !

      +
      + + \ No newline at end of file diff --git a/source/old/test/jsons/json.js b/source/old/test/jsons/json.js new file mode 100644 index 0000000..f57992a --- /dev/null +++ b/source/old/test/jsons/json.js @@ -0,0 +1,55 @@ +function updatetimus(timus) +{ + var p = document.getElementsByTagName("p")[0]; + p.innerHTML = "updatetimus p 已经正常运行"; + //alert(JSON.stringify(timus)); + var timus_div = document.getElementById("timus_div"); + timus_div.innerHTML="updatetimus函数已经正常运行"; + for(var i=0;i + + \ No newline at end of file diff --git a/source/old/webwindows/help.html b/source/old/webwindows/help.html new file mode 100644 index 0000000..1d3db74 --- /dev/null +++ b/source/old/webwindows/help.html @@ -0,0 +1,11 @@ + + + + + + + + 网络无法连接。。。
      + 的解决方案 + + diff --git a/source/old/webwindows/img/Windows_logo.svg b/source/old/webwindows/img/Windows_logo.svg new file mode 100644 index 0000000..0fed3a6 --- /dev/null +++ b/source/old/webwindows/img/Windows_logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/source/old/webwindows/img/login_wallpaper.jpg b/source/old/webwindows/img/login_wallpaper.jpg new file mode 100644 index 0000000..942570c Binary files /dev/null and b/source/old/webwindows/img/login_wallpaper.jpg differ diff --git a/source/old/webwindows/img/tcp.ico b/source/old/webwindows/img/tcp.ico new file mode 100644 index 0000000..314e1ab Binary files /dev/null and b/source/old/webwindows/img/tcp.ico differ diff --git a/source/old/webwindows/img/user_head.svg b/source/old/webwindows/img/user_head.svg new file mode 100644 index 0000000..8f49631 --- /dev/null +++ b/source/old/webwindows/img/user_head.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/source/old/webwindows/img/windows_10_wallpaper.jpg b/source/old/webwindows/img/windows_10_wallpaper.jpg new file mode 100644 index 0000000..feda3a9 Binary files /dev/null and b/source/old/webwindows/img/windows_10_wallpaper.jpg differ diff --git a/source/old/webwindows/index.html b/source/old/webwindows/index.html new file mode 100644 index 0000000..5dc9712 --- /dev/null +++ b/source/old/webwindows/index.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + +
      + +
      +
      +
      +
      +
      +
      +
      + + diff --git a/source/old/webwindows/js/index.js b/source/old/webwindows/js/index.js new file mode 100644 index 0000000..538f8a2 --- /dev/null +++ b/source/old/webwindows/js/index.js @@ -0,0 +1,59 @@ + +var end_load_login = false; +var end_load_desktop = false; +setTimeout("goto_login()" , 5000); +var start_time = new Date(); +$(document).ready(function load_desktop(){ + $("body").contextmenu(function(){return false;}); + $("#login").hide(); + $("#desktop").hide(); + + $("#desktop").css("background-image","url(img/windows_10_wallpaper.jpg)"); + $("#desktop").css("background-size","100% 100%"); + $("#desktop").css("background-repeat","no-repeat"); + + $( "#login" ).load( "login.html", function( response, status, xhr ) { + if ( status == "error" ) { + if(confirm("服务器好像出了点问题,加载失败,点击确定前往帮助页面。") == true){ + window.location.href="help.html"; + } + } + else if( status == "success"){ + end_load_login = true; +// console.log("end_load_login"); + } + }); + $("#desktop").load("desktop.html", function( response, status, xhr ) { + if ( status == "error" ) { + if(confirm("服务器好像出了点问题,加载失败,点击确定前往帮助页面。") == true){ + window.location.href="help.html"; + } + } + else if( status == "success"){ + end_load_desktop = true; +// console.log("end_load_desktop"); + } + }); + $(".circle").click(function(){ + goto_login(); + $(".circle").unbind('click'); + }); +}); +function goto_login (){ + if(end_load_login == true && end_load_desktop == true){ + var end_time = new Date(); + var used_time = (end_time - start_time); +// console.log("加载完成,用时 " + used_time/1000 + "秒"); + $("#boot").fadeOut(250 , function () {$('#boot').remove();} ); + $("#login").delay(200).fadeIn(800 , function(){ + $("#window1").remove(); + }); + $("#boot_script").remove(); + } + else{ + var end_time = new Date(); + var used_time = (end_time - start_time); +// console.log("请等待加载,已用时 " + used_time/1000 + "秒"); + setTimeout("goto_login()",500); + } +} \ No newline at end of file diff --git a/source/old/webwindows/js/jquery.js b/source/old/webwindows/js/jquery.js new file mode 100644 index 0000000..644d35e --- /dev/null +++ b/source/old/webwindows/js/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"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){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=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=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(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 qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.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),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},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(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),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){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.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?I(k,a)-I(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?I(k,a)-I(k,b):0;if(e===f)return la(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?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$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 ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.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},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.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=ga.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=ga.selectors={cacheLength:50,createPseudo:ia,match:V,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(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===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]||ga.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]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.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(_,aa).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("(^|"+K+")"+a+"("+K+"|$)"))&&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=ga.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(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},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()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(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:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).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:oa(!1),disabled:oa(!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 X.test(a.nodeName)},input:function(a){return W.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:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(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}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,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]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.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 r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.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=g=[],c||b||(f=c=""),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};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.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 W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(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)ya(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=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(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&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" + + +
      + 强制截获键盘事件。 +
      +
      + + + diff --git a/source/old/webwindows/login.html b/source/old/webwindows/login.html new file mode 100644 index 0000000..f1cc0ba --- /dev/null +++ b/source/old/webwindows/login.html @@ -0,0 +1,24 @@ + +
      +
      +
      +
      +
      +
      + +
      + User +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + 233 +
      +
      + \ No newline at end of file diff --git a/source/old/webwindows/update_log.html b/source/old/webwindows/update_log.html new file mode 100644 index 0000000..6df7d15 --- /dev/null +++ b/source/old/webwindows/update_log.html @@ -0,0 +1,113 @@ + + + + + 更新日志 + + + +
      WebWindows - Update Notes
      + +
      +

      v0.1.0 @2018-1-6

      +

      [ADD]

      +
        +
      • 添加 fast_boot 函数,在开机完成前按住 Backspace 键可以一键秒开机!
      • +
      +
      +
      +

      v0.0.9 @2018-1-5

      +

      [ADD]

      +
        +
      • 添加键盘事件响应,开发阶段,屏蔽掉了除 F5、F11、F12 外的所有键盘事件,使之看起来更像windows
      • +
      • 实现了退出登陆界面,进入主界面(桌面)
      • +
      +
      +
      +

      v0.0.8 @2018-1-4

      +

      [ADD]

      +
        +
      • 实现复杂的“登录”按钮逻辑:
        +
          +
        1. 点击按钮,移向按钮外面,按钮不响应点击事件
        2. +
        3. 点击外面,移向按钮里面,按钮不响应点击事件
        4. +
        5. 点击按钮,移向按钮外面,再移向按钮里面,按钮响应
        6. +
        7. 鼠标中键、鼠标右键点击,不响应
        8. +
        +
      • +
      • + 整个web均默认不响应鼠标右键事件 +
      • +
      +

      [Debug]

      +
    1. 修复屏保界面时间更新的另一个小问题
    2. +
      +
      +

      v0.0.7 @2017-12-22

      +

      [ADD]

      +
        +
      • 登陆界面“登录”按钮
      • +
      • 登陆界面消失动画
      • +
      +

      [Debug]

      +
    3. 修复 0.0.6版本中 开机界面连续点两下菊花动画,在接下来的屏保界面会出现文字全选的问题
    4. +
      +
      +

      v0.0.6 @2017-12-18

      +

      [ADD]

      +
        +
      • 登陆界面各个元素定位
      • +
      +

      [Bug]

      +
    5. 开机界面连续点两下菊花动画,在接下来的屏保界面会出现文字全选的问题,暂无法修复
    6. +
      +
      +

      v0.0.5 @2017-12-17

      +

      [ADD]

      +
    7. 手动绘制用户头像图片
    8. +

      [Debug]

      +
    9. 更准确的开机加载完成检测。避免未加载完就退出开机界面
    10. +

      [Change]

      +
        +
      • 重新定位开机界面各个元素
      • +
      • 重新定位登入界面各个元素
      • +
      +
      +
      +

      v0.0.4 @2017-12-10

      +

      [ADD]

      +
    11. 屏保界面上滑消失动画
    12. +
      +
      +

      v0.0.3 @2017-12-8

      +

      [ADD]

      +
        +
      • 屏保界面进入动画
      • +
      • 屏保界面
      • +
      • 屏保界面时间更新
      • +
      +

      [Debug]

      +
    13. 修复时间更新的小bug
    14. +
      +
      +

      v0.0.2 @2017-12-7

      +

      [ADD]

      +
        +
      • 定时检测加载完成则退出开机界面
      • +
      • 开机界面淡出动画
      • +
      +
      +
      +

      v0.0.1 @2017-12-3

      +

      [ADD]

      +
        +
      • 开机界面logo
      • +
      • 开机界面 旋转菊花动画的实现
      • +
      +
      +
      +

      + No More. +

      + + diff --git a/source/old/webwindows/usage.html b/source/old/webwindows/usage.html new file mode 100644 index 0000000..5545898 --- /dev/null +++ b/source/old/webwindows/usage.html @@ -0,0 +1,12 @@ + + + + + 使用方法 + + +
      + vb +
      + + diff --git a/tags/52pojie/index.html b/tags/52pojie/index.html deleted file mode 100644 index c83a37b..0000000 --- a/tags/52pojie/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: 52pojie | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      52pojie - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/CPP/index.html b/tags/CPP/index.html deleted file mode 100644 index ac79bf4..0000000 --- a/tags/CPP/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: CPP | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      CPP - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/Google/index.html b/tags/Google/index.html deleted file mode 100644 index 7cb5746..0000000 --- a/tags/Google/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: Google | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      Google - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/OneDrive/index.html b/tags/OneDrive/index.html deleted file mode 100644 index 9802f0e..0000000 --- a/tags/OneDrive/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: OneDrive | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      OneDrive - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/VisualStudio/index.html b/tags/VisualStudio/index.html deleted file mode 100644 index e70a685..0000000 --- a/tags/VisualStudio/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: VisualStudio | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      VisualStudio - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/WSL2/index.html b/tags/WSL2/index.html deleted file mode 100644 index c53c80a..0000000 --- a/tags/WSL2/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: WSL2 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      WSL2 - 标签 -

      -
      - - -
      -

      2021

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/adb/index.html b/tags/adb/index.html deleted file mode 100644 index 2f1d10b..0000000 --- a/tags/adb/index.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: adb | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      adb - 标签 -

      -
      - - -
      -

      2020

      -
      - - - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cdn/index.html b/tags/cdn/index.html deleted file mode 100644 index 84bd69c..0000000 --- a/tags/cdn/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: cdn | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      cdn - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/chrome/index.html b/tags/chrome/index.html deleted file mode 100644 index 8450417..0000000 --- a/tags/chrome/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: chrome | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      chrome - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cloudflare/index.html b/tags/cloudflare/index.html deleted file mode 100644 index 9104796..0000000 --- a/tags/cloudflare/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: cloudflare | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      cloudflare - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/gdb/index.html b/tags/gdb/index.html deleted file mode 100644 index bbfbb91..0000000 --- a/tags/gdb/index.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: gdb | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      gdb - 标签 -

      -
      - - -
      -

      2020

      -
      - - - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/git/index.html b/tags/git/index.html deleted file mode 100644 index 5c1d31e..0000000 --- a/tags/git/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: git | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      git - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/gitalk/index.html b/tags/gitalk/index.html deleted file mode 100644 index f2f5157..0000000 --- a/tags/gitalk/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: gitalk | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      gitalk - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/github/index.html b/tags/github/index.html deleted file mode 100644 index c3534e3..0000000 --- a/tags/github/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: github | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      github - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/hexo/index.html b/tags/hexo/index.html deleted file mode 100644 index ccc749d..0000000 --- a/tags/hexo/index.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: hexo | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      hexo - 标签 -

      -
      - - -
      -

      2020

      -
      - - - - - - - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/index.html b/tags/index.html deleted file mode 100644 index fc9b6bd..0000000 --- a/tags/index.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tags | Hi, I'm Cortana. - - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - - - -
      - - -
      - - - -
      -
      - -

      tags -

      - - - -
      - - - - -
      - - -
      - - - -
      - - - - - -
      - - -
      - -
      - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/linux/index.html b/tags/linux/index.html deleted file mode 100644 index de871ff..0000000 --- a/tags/linux/index.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: linux | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      linux - 标签 -

      -
      - - -
      -

      2020

      -
      - - - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/none/index.html b/tags/none/index.html deleted file mode 100644 index 07e9332..0000000 --- a/tags/none/index.html +++ /dev/null @@ -1,644 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: none | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      none - 标签 -

      -
      - - -
      -

      2022

      -
      - - - - -
      -

      2020

      -
      - - - - - - - - - - - - -
      -

      2019

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/proxifier/index.html b/tags/proxifier/index.html deleted file mode 100644 index cc147c2..0000000 --- a/tags/proxifier/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: proxifier | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      proxifier - 标签 -

      -
      - - -
      -

      2021

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/seo/index.html b/tags/seo/index.html deleted file mode 100644 index 489531f..0000000 --- a/tags/seo/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: seo | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      seo - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/vmware/index.html b/tags/vmware/index.html deleted file mode 100644 index bcbab22..0000000 --- a/tags/vmware/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: vmware | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      vmware - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/wooyun/index.html b/tags/wooyun/index.html deleted file mode 100644 index 58cf48f..0000000 --- a/tags/wooyun/index.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: wooyun | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      wooyun - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/tags/\344\273\243\347\220\206/index.html" "b/tags/\344\273\243\347\220\206/index.html" deleted file mode 100644 index 2a52041..0000000 --- "a/tags/\344\273\243\347\220\206/index.html" +++ /dev/null @@ -1,551 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: 代理 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      代理 - 标签 -

      -
      - - -
      -

      2021

      -
      - - -
      -

      2020

      -
      - - - - - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/tags/\346\220\234\347\264\242\345\274\225\346\223\216/index.html" "b/tags/\346\220\234\347\264\242\345\274\225\346\223\216/index.html" deleted file mode 100644 index 1cad024..0000000 --- "a/tags/\346\220\234\347\264\242\345\274\225\346\223\216/index.html" +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: 搜索引擎 | Hi, I'm Cortana. - - - - - - - - - - - - - - - -
      -
      - -
      -
      - - - -
      - - - - -
      -
      - - -
      - - 0% -
      -
      - - -
      -
      -
      - - -
      - - - - - -
      -
      -
      -

      搜索引擎 - 标签 -

      -
      - - -
      -

      2020

      -
      - - - -
      -
      - - - - - - - - -
      - - - - -
      - - - - - - - - -
      -
      - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/themes/landscape/.gitignore b/themes/landscape/.gitignore new file mode 100644 index 0000000..6e3a08a --- /dev/null +++ b/themes/landscape/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +tmp \ No newline at end of file diff --git a/themes/landscape/Gruntfile.js b/themes/landscape/Gruntfile.js new file mode 100644 index 0000000..59fd5df --- /dev/null +++ b/themes/landscape/Gruntfile.js @@ -0,0 +1,46 @@ +module.exports = function(grunt){ + grunt.initConfig({ + gitclone: { + fontawesome: { + options: { + repository: 'https://github.com/FortAwesome/Font-Awesome.git', + directory: 'tmp/fontawesome' + }, + }, + fancybox: { + options: { + repository: 'https://github.com/fancyapps/fancyBox.git', + directory: 'tmp/fancybox' + } + } + }, + copy: { + fontawesome: { + expand: true, + cwd: 'tmp/fontawesome/fonts/', + src: ['**'], + dest: 'source/css/fonts/' + }, + fancybox: { + expand: true, + cwd: 'tmp/fancybox/source/', + src: ['**'], + dest: 'source/fancybox/' + } + }, + _clean: { + tmp: ['tmp'], + fontawesome: ['source/css/fonts'], + fancybox: ['source/fancybox'] + } + }); + + require('load-grunt-tasks')(grunt); + + grunt.renameTask('clean', '_clean'); + + grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']); + grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']); + grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']); + grunt.registerTask('clean', ['_clean']); +}; \ No newline at end of file diff --git a/themes/landscape/LICENSE b/themes/landscape/LICENSE new file mode 100644 index 0000000..9ce4d32 --- /dev/null +++ b/themes/landscape/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Tommy Chen + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/themes/landscape/README.md b/themes/landscape/README.md new file mode 100644 index 0000000..90ecccd --- /dev/null +++ b/themes/landscape/README.md @@ -0,0 +1,112 @@ +# Landscape + +A brand new default theme for [Hexo]. + +- [Preview](http://hexo.io/hexo-theme-landscape/) + +## Installation + +### Install + +``` bash +$ git clone https://github.com/hexojs/hexo-theme-landscape.git themes/landscape +``` + +**Landscape requires Hexo 2.4 and above.** If you would like to enable the RSS, the [hexo-generate-feed] plugin is also required. + +### Enable + +Modify `theme` setting in `_config.yml` to `landscape`. + +### Update + +``` bash +cd themes/landscape +git pull +``` + +## Configuration + +``` yml +# Header +menu: + Home: / + Archives: /archives +rss: /atom.xml + +# Content +excerpt_link: Read More +fancybox: true + +# Sidebar +sidebar: right +widgets: +- category +- tag +- tagcloud +- archives +- recent_posts + +# Miscellaneous +google_analytics: +favicon: /favicon.png +twitter: +google_plus: +``` + +- **menu** - Navigation menu +- **rss** - RSS link +- **excerpt_link** - "Read More" link at the bottom of excerpted articles. `false` to hide the link. +- **fancybox** - Enable [Fancybox] +- **sidebar** - Sidebar style. You can choose `left`, `right`, `bottom` or `false`. +- **widgets** - Widgets displaying in sidebar +- **google_analytics** - Google Analytics ID +- **favicon** - Favicon path +- **twitter** - Twiiter ID +- **google_plus** - Google+ ID + +## Features + +### Fancybox + +Landscape uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos. + +``` +![img caption](img url) + +{% fancybox img_url [img_thumbnail] [img_caption] %} +``` + +### Sidebar + +You can put your sidebar in left side, right side or bottom of your site by editing `sidebar` setting. + +Landscape provides 5 built-in widgets: + +- category +- tag +- tagcloud +- archives +- recent_posts + +All of them are enabled by default. You can edit them in `widget` setting. + +## Development + +### Requirements + +- [Grunt] 0.4+ +- Hexo 2.4+ + +### Grunt tasks + +- **default** - Download [Fancybox] and [Font Awesome]. +- **fontawesome** - Only download [Font Awesome]. +- **fancybox** - Only download [Fancybox]. +- **clean** - Clean temporarily files and downloaded files. + +[Hexo]: https://hexo.io/ +[Fancybox]: http://fancyapps.com/fancybox/ +[Font Awesome]: http://fontawesome.io/ +[Grunt]: http://gruntjs.com/ +[hexo-generate-feed]: https://github.com/hexojs/hexo-generator-feed diff --git a/themes/landscape/_config.yml b/themes/landscape/_config.yml new file mode 100644 index 0000000..ca22374 --- /dev/null +++ b/themes/landscape/_config.yml @@ -0,0 +1,37 @@ +# Header +menu: + Home: / + Archives: /archives +rss: /atom.xml + +# Content +excerpt_link: Read More +fancybox: true + +# Sidebar +sidebar: right +widgets: +- category +- tag +- tagcloud +- archive +- recent_posts + +# display widgets at the bottom of index pages (pagination == 2) +index_widgets: +# - category +# - tagcloud +# - archive + +# widget behavior +archive_type: 'monthly' +show_count: false + +# Miscellaneous +google_analytics: +gauges_analytics: +favicon: /favicon.png +twitter: +google_plus: +fb_admins: +fb_app_id: diff --git a/themes/landscape/languages/de.yml b/themes/landscape/languages/de.yml new file mode 100644 index 0000000..630055f --- /dev/null +++ b/themes/landscape/languages/de.yml @@ -0,0 +1,19 @@ +categories: Kategorien +search: Suche +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: zurück +next: weiter +comment: Kommentare +archive_a: Archiv +archive_b: "Archive: %s" +page: Seite %d +recent_posts: letzter Beitrag +newer: Neuer +older: Älter +share: Teilen +powered_by: Powered by +rss_feed: RSS Feed +category: Kategorie +tag: Tag diff --git a/themes/landscape/languages/default.yml b/themes/landscape/languages/default.yml new file mode 100644 index 0000000..3ef7e92 --- /dev/null +++ b/themes/landscape/languages/default.yml @@ -0,0 +1,19 @@ +categories: Categories +search: Search +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: Prev +next: Next +comment: Comments +archive_a: Archives +archive_b: "Archives: %s" +page: Page %d +recent_posts: Recent Posts +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/es.yml b/themes/landscape/languages/es.yml new file mode 100644 index 0000000..d862e87 --- /dev/null +++ b/themes/landscape/languages/es.yml @@ -0,0 +1,19 @@ +categories: Categorías +search: Buscar +tags: Tags +tagcloud: Nube de Tags +tweets: Tweets +prev: Previo +next: Siguiente +comment: Comentarios +archive_a: Archivos +archive_b: "Archivos: %s" +page: Página %d +recent_posts: Posts recientes +newer: Nuevo +older: Viejo +share: Compartir +powered_by: Construido por +rss_feed: RSS +category: Categoría +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/fr.yml b/themes/landscape/languages/fr.yml new file mode 100644 index 0000000..c84f51b --- /dev/null +++ b/themes/landscape/languages/fr.yml @@ -0,0 +1,19 @@ +categories: Catégories +search: Rechercher +tags: Mot-clés +tagcloud: Nuage de mot-clés +tweets: Tweets +prev: Précédent +next: Suivant +comment: Commentaires +archive_a: Archives +archive_b: "Archives: %s" +page: Page %d +recent_posts: Articles récents +newer: Récent +older: Ancien +share: Partager +powered_by: Propulsé par +rss_feed: Flux RSS +category: Catégorie +tag: Mot-clé diff --git a/themes/landscape/languages/ja.yml b/themes/landscape/languages/ja.yml new file mode 100644 index 0000000..af0f7fe --- /dev/null +++ b/themes/landscape/languages/ja.yml @@ -0,0 +1,19 @@ +categories: カテゴリ +search: 検索 +tags: タグ +tagcloud: タグクラウド +tweets: ツイート +prev: 戻る +next: 次へ +comment: コメント +archive_a: アーカイブ +archive_b: "アーカイブ: %s" +page: ページ %d +recent_posts: 最近の投稿 +newer: 次の記事 +older: 前の記事 +share: 共有 +powered_by: Powered by +rss_feed: RSSフィード +category: カテゴリ +tag: タグ diff --git a/themes/landscape/languages/ko.yml b/themes/landscape/languages/ko.yml new file mode 100644 index 0000000..1d27b43 --- /dev/null +++ b/themes/landscape/languages/ko.yml @@ -0,0 +1,19 @@ +categories: 카테고리 +search: 검색 +tags: 태그 +tagcloud: 태그 클라우드 +tweets: 트윗 +prev: 이전 +next: 다음 +comment: 댓글 +archive_a: 아카이브 +archive_b: "아카이브: %s" +page: 페이지 %d +recent_posts: 최근 포스트 +newer: 최신 +older: 이전 +share: 공유 +powered_by: Powered by +rss_feed: RSS Feed +category: 카테고리 +tag: 태그 diff --git a/themes/landscape/languages/nl.yml b/themes/landscape/languages/nl.yml new file mode 100644 index 0000000..568d33e --- /dev/null +++ b/themes/landscape/languages/nl.yml @@ -0,0 +1,20 @@ + +categories: Categorieën +search: Zoeken +tags: Labels +tagcloud: Tag Cloud +tweets: Tweets +prev: Vorige +next: Volgende +comment: Commentaren +archive_a: Archieven +archive_b: "Archieven: %s" +page: Pagina %d +recent_posts: Recente berichten +newer: Nieuwer +older: Ouder +share: Delen +powered_by: Powered by +rss_feed: RSS Feed +category: Categorie +tag: Label diff --git a/themes/landscape/languages/no.yml b/themes/landscape/languages/no.yml new file mode 100644 index 0000000..b997691 --- /dev/null +++ b/themes/landscape/languages/no.yml @@ -0,0 +1,19 @@ +categories: Kategorier +search: Søk +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: Forrige +next: Neste +comment: Kommentarer +archive_a: Arkiv +archive_b: "Arkiv: %s" +page: Side %d +recent_posts: Siste innlegg +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/pt.yml b/themes/landscape/languages/pt.yml new file mode 100644 index 0000000..3d74af3 --- /dev/null +++ b/themes/landscape/languages/pt.yml @@ -0,0 +1,19 @@ +categories: Categorias +search: Buscar +tags: Tags +tagcloud: Nuvem de Tags +tweets: Tweets +prev: Anterior +next: Próximo +comment: Comentários +archive_a: Arquivos +archive_b: "Arquivos: %s" +page: Página %d +recent_posts: Postagens Recentes +newer: Mais Recente +older: Mais Antigo +share: Compartilhar +powered_by: Desenvolvido por +rss_feed: Feed RSS +category: Categoria +tag: Tag diff --git a/themes/landscape/languages/ru.yml b/themes/landscape/languages/ru.yml new file mode 100644 index 0000000..625a83c --- /dev/null +++ b/themes/landscape/languages/ru.yml @@ -0,0 +1,19 @@ +categories: Категории +search: Поиск +tags: Метки +tagcloud: Облако меток +tweets: Твиты +prev: Назад +next: Вперед +comment: Комментарии +archive_a: Архив +archive_b: "Архив: %s" +page: Страница %d +recent_posts: Недавние записи +newer: Следующий +older: Предыдущий +share: Поделиться +powered_by: Создано с помощью +rss_feed: RSS-каналы +category: Категория +tag: Метка \ No newline at end of file diff --git a/themes/landscape/languages/zh-CN.yml b/themes/landscape/languages/zh-CN.yml new file mode 100644 index 0000000..51e1321 --- /dev/null +++ b/themes/landscape/languages/zh-CN.yml @@ -0,0 +1,19 @@ +categories: 分类 +search: 搜索 +tags: 标签 +tagcloud: 标签云 +tweets: 推文 +prev: 上一页 +next: 下一页 +comment: 留言 +archive_a: 归档 +archive_b: 归档:%s +page: 第 %d 页 +recent_posts: 最新文章 +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/zh-TW.yml b/themes/landscape/languages/zh-TW.yml new file mode 100644 index 0000000..76d2916 --- /dev/null +++ b/themes/landscape/languages/zh-TW.yml @@ -0,0 +1,19 @@ +categories: 分類 +search: 搜尋 +tags: 標籤 +tagcloud: 標籤雲 +tweets: 推文 +prev: 上一頁 +next: 下一頁 +comment: 留言 +archive_a: 彙整 +archive_b: 彙整:%s +page: 第 %d 頁 +recent_posts: 最新文章 +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/layout/_partial/after-footer.ejs b/themes/landscape/layout/_partial/after-footer.ejs new file mode 100644 index 0000000..ff2d509 --- /dev/null +++ b/themes/landscape/layout/_partial/after-footer.ejs @@ -0,0 +1,25 @@ +<% if (config.disqus_shortname){ %> + +<% } %> + + + +<% if (theme.fancybox){ %> + <%- css('fancybox/jquery.fancybox') %> + <%- js('fancybox/jquery.fancybox.pack') %> +<% } %> + +<%- js('js/script') %> +<%- partial('gauges-analytics') %> diff --git a/themes/landscape/layout/_partial/archive-post.ejs b/themes/landscape/layout/_partial/archive-post.ejs new file mode 100644 index 0000000..36f2cc3 --- /dev/null +++ b/themes/landscape/layout/_partial/archive-post.ejs @@ -0,0 +1,8 @@ +
      +
      +
      + <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %> + <%- partial('post/title', {class_name: 'archive-article-title'}) %> +
      +
      +
      \ No newline at end of file diff --git a/themes/landscape/layout/_partial/archive.ejs b/themes/landscape/layout/_partial/archive.ejs new file mode 100644 index 0000000..9da934a --- /dev/null +++ b/themes/landscape/layout/_partial/archive.ejs @@ -0,0 +1,34 @@ +<% if (pagination == 2){ %> + <% page.posts.each(function(post){ %> + <%- partial('article', {post: post, index: true}) %> + <% }) %> +<% } else { %> + <% var last; %> + <% page.posts.each(function(post, i){ %> + <% var year = post.date.year(); %> + <% if (last != year){ %> + <% if (last != null){ %> + + <% } %> + <% last = year; %> +
      + +
      + <% } %> + <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> + <% }) %> + <% if (page.posts.length){ %> +
      + <% } %> +<% } %> +<% if (page.total > 1){ %> + +<% } %> diff --git a/themes/landscape/layout/_partial/article.ejs b/themes/landscape/layout/_partial/article.ejs new file mode 100644 index 0000000..0f951a9 --- /dev/null +++ b/themes/landscape/layout/_partial/article.ejs @@ -0,0 +1,44 @@ +
      + +
      + <%- partial('post/gallery') %> + <% if (post.link || post.title){ %> +
      + <%- partial('post/title', {class_name: 'article-title'}) %> +
      + <% } %> +
      + <% if (post.excerpt && index){ %> + <%- post.excerpt %> + <% if (theme.excerpt_link){ %> +

      + <%= theme.excerpt_link %> +

      + <% } %> + <% } else { %> + <%- post.content %> + <% } %> +
      + +
      + <% if (!index){ %> + <%- partial('post/nav') %> + <% } %> +
      + +<% if (!index && post.comments && config.disqus_shortname){ %> +
      +
      + +
      +
      +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/footer.ejs b/themes/landscape/layout/_partial/footer.ejs new file mode 100644 index 0000000..3aca618 --- /dev/null +++ b/themes/landscape/layout/_partial/footer.ejs @@ -0,0 +1,11 @@ +
      + <% if (theme.sidebar === 'bottom'){ %> + <%- partial('_partial/sidebar') %> + <% } %> +
      + +
      +
      \ No newline at end of file diff --git a/themes/landscape/layout/_partial/gauges-analytics.ejs b/themes/landscape/layout/_partial/gauges-analytics.ejs new file mode 100644 index 0000000..d64be38 --- /dev/null +++ b/themes/landscape/layout/_partial/gauges-analytics.ejs @@ -0,0 +1,18 @@ +<% if (theme.gauges_analytics){ %> + + + +<% } %> diff --git a/themes/landscape/layout/_partial/google-analytics.ejs b/themes/landscape/layout/_partial/google-analytics.ejs new file mode 100644 index 0000000..84e75f0 --- /dev/null +++ b/themes/landscape/layout/_partial/google-analytics.ejs @@ -0,0 +1,14 @@ +<% if (theme.google_analytics){ %> + + + +<% } %> diff --git a/themes/landscape/layout/_partial/head.ejs b/themes/landscape/layout/_partial/head.ejs new file mode 100644 index 0000000..43d5f93 --- /dev/null +++ b/themes/landscape/layout/_partial/head.ejs @@ -0,0 +1,36 @@ + + + + + <%- partial('google-analytics') %> + <% + var title = page.title; + + if (is_archive()){ + title = __('archive_a'); + + if (is_month()){ + title += ': ' + page.year + '/' + page.month; + } else if (is_year()){ + title += ': ' + page.year; + } + } else if (is_category()){ + title = __('category') + ': ' + page.category; + } else if (is_tag()){ + title = __('tag') + ': ' + page.tag; + } + %> + <% if (title){ %><%= title %> | <% } %><%= config.title %> + + <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> + <% if (theme.rss){ %> + + <% } %> + <% if (theme.favicon){ %> + + <% } %> + <% if (config.highlight.enable){ %> + + <% } %> + <%- css('css/style') %> + diff --git a/themes/landscape/layout/_partial/header.ejs b/themes/landscape/layout/_partial/header.ejs new file mode 100644 index 0000000..e8a305e --- /dev/null +++ b/themes/landscape/layout/_partial/header.ejs @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/mobile-nav.ejs b/themes/landscape/layout/_partial/mobile-nav.ejs new file mode 100644 index 0000000..7c1d2af --- /dev/null +++ b/themes/landscape/layout/_partial/mobile-nav.ejs @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/category.ejs b/themes/landscape/layout/_partial/post/category.ejs new file mode 100644 index 0000000..db2ed48 --- /dev/null +++ b/themes/landscape/layout/_partial/post/category.ejs @@ -0,0 +1,10 @@ +<% if (post.categories && post.categories.length){ %> + +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/date.ejs b/themes/landscape/layout/_partial/post/date.ejs new file mode 100644 index 0000000..3f49613 --- /dev/null +++ b/themes/landscape/layout/_partial/post/date.ejs @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/gallery.ejs b/themes/landscape/layout/_partial/post/gallery.ejs new file mode 100644 index 0000000..886c8ec --- /dev/null +++ b/themes/landscape/layout/_partial/post/gallery.ejs @@ -0,0 +1,11 @@ +<% if (post.photos && post.photos.length){ %> +
      +
      + <% post.photos.forEach(function(photo, i){ %> + + + + <% }) %> +
      +
      +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/nav.ejs b/themes/landscape/layout/_partial/post/nav.ejs new file mode 100644 index 0000000..720798a --- /dev/null +++ b/themes/landscape/layout/_partial/post/nav.ejs @@ -0,0 +1,22 @@ +<% if (post.prev || post.next){ %> + +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/tag.ejs b/themes/landscape/layout/_partial/post/tag.ejs new file mode 100644 index 0000000..e0f327f --- /dev/null +++ b/themes/landscape/layout/_partial/post/tag.ejs @@ -0,0 +1,6 @@ +<% if (post.tags && post.tags.length){ %> + <%- list_tags(post.tags, { + show_count: false, + class: 'article-tag' + }) %> +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/title.ejs b/themes/landscape/layout/_partial/post/title.ejs new file mode 100644 index 0000000..69d646f --- /dev/null +++ b/themes/landscape/layout/_partial/post/title.ejs @@ -0,0 +1,15 @@ +<% if (post.link){ %> +

      + +

      +<% } else if (post.title){ %> + <% if (index){ %> +

      + <%= post.title %> +

      + <% } else { %> +

      + <%= post.title %> +

      + <% } %> +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/sidebar.ejs b/themes/landscape/layout/_partial/sidebar.ejs new file mode 100644 index 0000000..c1e48e5 --- /dev/null +++ b/themes/landscape/layout/_partial/sidebar.ejs @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_widget/archive.ejs b/themes/landscape/layout/_widget/archive.ejs new file mode 100644 index 0000000..a20c58c --- /dev/null +++ b/themes/landscape/layout/_widget/archive.ejs @@ -0,0 +1,8 @@ +<% if (site.posts.length){ %> +
      +

      <%= __('archive_a') %>

      +
      + <%- list_archives({show_count: theme.show_count, type: theme.archive_type}) %> +
      +
      +<% } %> diff --git a/themes/landscape/layout/_widget/category.ejs b/themes/landscape/layout/_widget/category.ejs new file mode 100644 index 0000000..8d9e5e9 --- /dev/null +++ b/themes/landscape/layout/_widget/category.ejs @@ -0,0 +1,8 @@ +<% if (site.categories.length){ %> +
      +

      <%= __('categories') %>

      +
      + <%- list_categories({show_count: theme.show_count}) %> +
      +
      +<% } %> diff --git a/themes/landscape/layout/_widget/recent_posts.ejs b/themes/landscape/layout/_widget/recent_posts.ejs new file mode 100644 index 0000000..7a38547 --- /dev/null +++ b/themes/landscape/layout/_widget/recent_posts.ejs @@ -0,0 +1,14 @@ +<% if (site.posts.length){ %> +
      +

      <%= __('recent_posts') %>

      +
      + +
      +
      +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_widget/tag.ejs b/themes/landscape/layout/_widget/tag.ejs new file mode 100644 index 0000000..ea5fb2c --- /dev/null +++ b/themes/landscape/layout/_widget/tag.ejs @@ -0,0 +1,8 @@ +<% if (site.tags.length){ %> +
      +

      <%= __('tags') %>

      +
      + <%- list_tags({show_count: theme.show_count}) %> +
      +
      +<% } %> diff --git a/themes/landscape/layout/_widget/tagcloud.ejs b/themes/landscape/layout/_widget/tagcloud.ejs new file mode 100644 index 0000000..5feb435 --- /dev/null +++ b/themes/landscape/layout/_widget/tagcloud.ejs @@ -0,0 +1,8 @@ +<% if (site.tags.length){ %> +
      +

      <%= __('tagcloud') %>

      +
      + <%- tagcloud() %> +
      +
      +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/archive.ejs b/themes/landscape/layout/archive.ejs new file mode 100644 index 0000000..52f9b21 --- /dev/null +++ b/themes/landscape/layout/archive.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/category.ejs b/themes/landscape/layout/category.ejs new file mode 100644 index 0000000..3ffe252 --- /dev/null +++ b/themes/landscape/layout/category.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.category, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/index.ejs b/themes/landscape/layout/index.ejs new file mode 100644 index 0000000..60a2c68 --- /dev/null +++ b/themes/landscape/layout/index.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: 2, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/layout.ejs b/themes/landscape/layout/layout.ejs new file mode 100644 index 0000000..cf88daf --- /dev/null +++ b/themes/landscape/layout/layout.ejs @@ -0,0 +1,18 @@ +<%- partial('_partial/head') %> + +
      +
      + <%- partial('_partial/header', null, {cache: !config.relative_link}) %> +
      +
      <%- body %>
      + <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %> + <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %> + <% } %> +
      + <%- partial('_partial/footer', null, {cache: !config.relative_link}) %> +
      + <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> + <%- partial('_partial/after-footer') %> +
      + + \ No newline at end of file diff --git a/themes/landscape/layout/page.ejs b/themes/landscape/layout/page.ejs new file mode 100644 index 0000000..bea6318 --- /dev/null +++ b/themes/landscape/layout/page.ejs @@ -0,0 +1 @@ +<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/themes/landscape/layout/post.ejs b/themes/landscape/layout/post.ejs new file mode 100644 index 0000000..bea6318 --- /dev/null +++ b/themes/landscape/layout/post.ejs @@ -0,0 +1 @@ +<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/themes/landscape/layout/tag.ejs b/themes/landscape/layout/tag.ejs new file mode 100644 index 0000000..048cdb0 --- /dev/null +++ b/themes/landscape/layout/tag.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.tag, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/package.json b/themes/landscape/package.json new file mode 100644 index 0000000..ac0df3d --- /dev/null +++ b/themes/landscape/package.json @@ -0,0 +1,12 @@ +{ + "name": "hexo-theme-landscape", + "version": "0.0.2", + "private": true, + "devDependencies": { + "grunt": "~0.4.2", + "load-grunt-tasks": "~0.2.0", + "grunt-git": "~0.2.2", + "grunt-contrib-clean": "~0.5.0", + "grunt-contrib-copy": "~0.4.1" + } +} diff --git a/themes/landscape/scripts/fancybox.js b/themes/landscape/scripts/fancybox.js new file mode 100644 index 0000000..83f1fdc --- /dev/null +++ b/themes/landscape/scripts/fancybox.js @@ -0,0 +1,24 @@ +var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/; + +/** +* Fancybox tag +* +* Syntax: +* {% fancybox /path/to/image [/path/to/thumbnail] [title] %} +*/ + +hexo.extend.tag.register('fancybox', function(args){ + var original = args.shift(), + thumbnail = ''; + + if (args.length && rUrl.test(args[0])){ + thumbnail = args.shift(); + } + + var title = args.join(' '); + + return '' + + '' + title + '' + '' + + (title ? '' + title + '' : ''); +}); \ No newline at end of file diff --git a/themes/landscape/source/css/_extend.styl b/themes/landscape/source/css/_extend.styl new file mode 100644 index 0000000..96a1817 --- /dev/null +++ b/themes/landscape/source/css/_extend.styl @@ -0,0 +1,63 @@ +$block-caption + text-decoration: none + text-transform: uppercase + letter-spacing: 2px + color: color-grey + margin-bottom: 1em + margin-left: 5px + line-height: 1em + text-shadow: 0 1px #fff + font-weight: bold + +$block + background: #fff + box-shadow: 1px 2px 3px #ddd + border: 1px solid color-border + border-radius: 3px + +$base-style + h1 + font-size: 2em + h2 + font-size: 1.5em + h3 + font-size: 1.3em + h4 + font-size: 1.2em + h5 + font-size: 1em + h6 + font-size: 1em + color: color-grey + hr + border: 1px dashed color-border + strong + font-weight: bold + em, cite + font-style: italic + sup, sub + font-size: 0.75em + line-height: 0 + position: relative + vertical-align: baseline + sup + top: -0.5em + sub + bottom: -0.2em + small + font-size: 0.85em + acronym, abbr + border-bottom: 1px dotted + ul, ol, dl + margin: 0 20px + line-height: line-height + ul, ol + ul, ol + margin-top: 0 + margin-bottom: 0 + ul + list-style: disc + ol + list-style: decimal + dt + font-weight: bold \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/archive.styl b/themes/landscape/source/css/_partial/archive.styl new file mode 100644 index 0000000..90ef053 --- /dev/null +++ b/themes/landscape/source/css/_partial/archive.styl @@ -0,0 +1,80 @@ +.archives-wrap + margin: block-margin 0 + +.archives + clearfix() + +.archive-year-wrap + margin-bottom: 1em + +.archive-year + @extend $block-caption + +.archives + column-gap: 10px + @media mq-tablet + column-count: 2 + @media mq-normal + column-count: 3 + +.archive-article + avoid-column-break() + +.archive-article-inner + @extend $block + padding: 10px + margin-bottom: 15px + +.archive-article-title + text-decoration: none + font-weight: bold + color: color-default + transition: color 0.2s + line-height: line-height + &:hover + color: color-link + +.archive-article-footer + margin-top: 1em + +.archive-article-date + color: color-grey + text-decoration: none + font-size: 0.85em + line-height: 1em + margin-bottom: 0.5em + display: block + +#page-nav + clearfix() + margin: block-margin auto + background: #fff + box-shadow: 1px 2px 3px #ddd + border: 1px solid color-border + border-radius: 3px + text-align: center + color: color-grey + overflow: hidden + a, span + padding: 10px 20px + line-height: 1 + height: 2ex + a + color: color-grey + text-decoration: none + &:hover + background: color-grey + color: #fff + .prev + float: left + .next + float: right + .page-number + display: inline-block + @media mq-mobile + display: none + .current + color: color-default + font-weight: bold + .space + color: color-border \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/article.styl b/themes/landscape/source/css/_partial/article.styl new file mode 100644 index 0000000..46094f9 --- /dev/null +++ b/themes/landscape/source/css/_partial/article.styl @@ -0,0 +1,357 @@ +.article + margin: block-margin 0 + +.article-inner + @extend $block + overflow: hidden + +.article-meta + clearfix() + +.article-date + @extend $block-caption + float: left + +.article-category + float: left + line-height: 1em + color: #ccc + text-shadow: 0 1px #fff + margin-left: 8px + &:before + content: "\2022" + +.article-category-link + @extend $block-caption + margin: 0 12px 1em + +.article-header + padding: article-padding article-padding 0 + +.article-title + text-decoration: none + font-size: 2em + font-weight: bold + color: color-default + line-height: line-height-title + transition: color 0.2s + a&:hover + color: color-link + +.article-entry + @extend $base-style + clearfix() + color: color-default + padding: 0 article-padding + p, table + line-height: line-height + margin: line-height 0 + h1, h2, h3, h4, h5, h6 + font-weight: bold + h1, h2, h3, h4, h5, h6 + line-height: line-height-title + margin: line-height-title 0 + a + color: color-link + text-decoration: none + &:hover + text-decoration: underline + ul, ol, dl + margin-top: line-height + margin-bottom: line-height + img, video + max-width: 100% + height: auto + display: block + margin: auto + iframe + border: none + table + width: 100% + border-collapse: collapse + border-spacing: 0 + th + font-weight: bold + border-bottom: 3px solid color-border + padding-bottom: 0.5em + td + border-bottom: 1px solid color-border + padding: 10px 0 + blockquote + font-family: font-serif + font-size: 1.4em + margin: line-height 20px + text-align: center + footer + font-size: font-size + margin: line-height 0 + font-family: font-sans + cite + &:before + content: "—" + padding: 0 0.5em + .pullquote + text-align: left + width: 45% + margin: 0 + &.left + margin-left: 0.5em + margin-right: 1em + &.right + margin-right: 0.5em + margin-left: 1em + .caption + color: color-grey + display: block + font-size: 0.9em + margin-top: 0.5em + position: relative + text-align: center + // http://webdesignerwall.com/tutorials/css-elastic-videos + .video-container + position: relative + padding-top: (9 / 16 * 100)% // 16:9 ratio + height: 0 + overflow: hidden + iframe, object, 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: color-background + color: color-grey + text-shadow: 0 1px #fff + text-decoration: none + &:hover + background: color-link + color: #fff + text-decoration: none + text-shadow: 0 1px darken(color-link, 20%) + +.article-footer + clearfix() + font-size: 0.85em + line-height: line-height + border-top: 1px solid color-border + padding-top: line-height + margin: 0 article-padding article-padding + a + color: color-grey + text-decoration: none + &:hover + color: color-default + +.article-tag-list-item + float: left + margin-right: 10px + +.article-tag-list-link + &:before + content: "#" + +.article-comment-link + float: right + &:before + content: "\f075" + font-family: font-icon + padding-right: 8px + +.article-share-link + cursor: pointer + float: right + margin-left: 20px + &:before + content: "\f064" + font-family: font-icon + padding-right: 6px + +#article-nav + clearfix() + position: relative + @media mq-normal + margin: block-margin 0 + &:before + absolute-center(8px) + content: "" + border-radius: 50% + background: color-border + box-shadow: 0 1px 2px #fff + +.article-nav-link-wrap + text-decoration: none + text-shadow: 0 1px #fff + color: color-grey + box-sizing: border-box + margin-top: block-margin + text-align: center + display: block + &:hover + color: color-default + @media mq-normal + width: 50% + margin-top: 0 + +#article-nav-newer + @media mq-normal + float: left + text-align: right + padding-right: 20px + +#article-nav-older + @media mq-normal + float: right + text-align: left + padding-left: 20px + +.article-nav-caption + text-transform: uppercase + letter-spacing: 2px + color: color-border + line-height: 1em + font-weight: bold + #article-nav-newer & + margin-right: -2px + +.article-nav-title + font-size: 0.85em + line-height: line-height + margin-top: 0.5em + +.article-share-box + position: absolute + display: none + background: #fff + box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.2) + border-radius: 3px + margin-left: -145px + overflow: hidden + z-index: 1 + &.on + display: block + +.article-share-input + width: 100% + background: none + box-sizing: border-box + font: 14px font-sans + padding: 0 15px + color: color-default + outline: none + border: 1px solid color-border + border-radius: 3px 3px 0 0 + height: 36px + line-height: 36px + +.article-share-links + clearfix() + background: color-background + +$article-share-link + width: 50px + height: 36px + display: block + float: left + position: relative + color: #999 + text-shadow: 0 1px #fff + &:before + font-size: 20px + font-family: font-icon + absolute-center(@font-size) + text-align: center + &:hover + color: #fff + +.article-share-twitter + @extend $article-share-link + &:before + content: "\f099" + &:hover + background: color-twitter + text-shadow: 0 1px darken(color-twitter, 20%) + +.article-share-facebook + @extend $article-share-link + &:before + content: "\f09a" + &:hover + background: color-facebook + text-shadow: 0 1px darken(color-facebook, 20%) + +.article-share-pinterest + @extend $article-share-link + &:before + content: "\f0d2" + &:hover + background: color-pinterest + text-shadow: 0 1px darken(color-pinterest, 20%) + +.article-share-google + @extend $article-share-link + &:before + content: "\f0d5" + &:hover + background: color-google + text-shadow: 0 1px darken(color-google, 20%) + +.article-gallery + background: #000 + position: relative + +.article-gallery-photos + position: relative + overflow: hidden + +.article-gallery-img + display: none + max-width: 100% + &:first-child + display: block + &.loaded + position: absolute + display: block + img + display: block + max-width: 100% + margin: 0 auto +/* +$article-gallery-ctrl + position: absolute + top: 0 + height: 100% + width: 60px + color: #fff + text-shadow: 0 0 3px rgba(0, 0, 0, 0.3) + opacity: 0.3 + transition: opacity 0.2s + cursor: pointer + &:hover + opacity: 0.8 + &:before + font-size: 30px + font-family: font-icon + position: absolute + top: 50% + margin-top: @font-size * -0.5 + +.article-gallery-prev + @extend $article-gallery-ctrl + left: 0 + &:before + content: "\f053" + left: 15px + +.article-gallery-next + @extend $article-gallery-ctrl + right: 0 + &:before + content: "\f054" + right: 15px*/ \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/comment.styl b/themes/landscape/source/css/_partial/comment.styl new file mode 100644 index 0000000..296b7dd --- /dev/null +++ b/themes/landscape/source/css/_partial/comment.styl @@ -0,0 +1,9 @@ +#comments + background: #fff + box-shadow: 1px 2px 3px #ddd + padding: article-padding + border: 1px solid color-border + border-radius: 3px + margin: block-margin 0 + a + color: color-link \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/footer.styl b/themes/landscape/source/css/_partial/footer.styl new file mode 100644 index 0000000..fe2fd24 --- /dev/null +++ b/themes/landscape/source/css/_partial/footer.styl @@ -0,0 +1,14 @@ +#footer + background: color-footer-background + padding: 50px 0 + border-top: 1px solid color-border + color: color-grey + a + color: color-link + text-decoration: none + &:hover + text-decoration: underline + +#footer-info + line-height: line-height + font-size: 0.85em \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/header.styl b/themes/landscape/source/css/_partial/header.styl new file mode 100644 index 0000000..d18ebc8 --- /dev/null +++ b/themes/landscape/source/css/_partial/header.styl @@ -0,0 +1,165 @@ +#header + height: banner-height + position: relative + border-bottom: 1px solid color-border + &:before, &:after + content: "" + position: absolute + left: 0 + right: 0 + height: 40px + &:before + top: 0 + background: linear-gradient(rgba(0, 0, 0, 0.2), transparent) + &:after + bottom: 0 + 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(banner-url) center #000 + background-size: cover + z-index: -1 + +#header-title + text-align: center + height: logo-size + position: absolute + top: 50% + left: 0 + margin-top: logo-size * -0.5 + +$logo-text + text-decoration: none + color: #fff + font-weight: 300 + text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) + +#logo + @extend $logo-text + font-size: logo-size + line-height: logo-size + letter-spacing: 2px + +#subtitle + @extend $logo-text + font-size: subtitle-size + line-height: subtitle-size + letter-spacing: 1px + +#subtitle-wrap + margin-top: subtitle-size + +#main-nav + float: left + margin-left: -15px + +$nav-link + float: left + color: #fff + opacity: 0.6 + text-decoration: none + text-shadow: 0 1px rgba(0, 0, 0, 0.2) + transition: opacity 0.2s + display: block + padding: 20px 15px + &:hover + opacity: 1 + +.nav-icon + @extend $nav-link + font-family: font-icon + text-align: center + font-size: font-size + width: font-size + height: font-size + padding: 20px 15px + position: relative + cursor: pointer + +.main-nav-link + @extend $nav-link + font-weight: 300 + letter-spacing: 1px + @media mq-mobile + display: none + +#main-nav-toggle + display: none + &:before + content: "\f0c9" + @media mq-mobile + 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 + transition: 0.2s ease-out + &.on + opacity: 1 + right: 0 + @media mq-mobile + width: 100% + right: -100% + +.search-form + position: absolute + top: 0 + left: 0 + right: 0 + background: #fff + padding: 5px 15px + border-radius: 15px + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) + +.search-form-input + border: none + background: none + color: color-default + width: 100% + font: 13px font-sans + outline: none + &::-webkit-search-results-decoration + &::-webkit-search-cancel-button + -webkit-appearance: none + +.search-form-submit + position: absolute + top: 50% + right: 10px + margin-top: -7px + font: 13px font-icon + border: none + background: none + color: #bbb + cursor: pointer + &:hover, &:focus + color: #777 \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/highlight.styl b/themes/landscape/source/css/_partial/highlight.styl new file mode 100644 index 0000000..c932ec3 --- /dev/null +++ b/themes/landscape/source/css/_partial/highlight.styl @@ -0,0 +1,158 @@ +// https://github.com/chriskempson/tomorrow-theme +highlight-background = #2d2d2d +highlight-current-line = #393939 +highlight-selection = #515151 +highlight-foreground = #cccccc +highlight-comment = #999999 +highlight-red = #f2777a +highlight-orange = #f99157 +highlight-yellow = #ffcc66 +highlight-green = #99cc99 +highlight-aqua = #66cccc +highlight-blue = #6699cc +highlight-purple = #cc99cc + +$code-block + background: highlight-background + margin: 0 article-padding * -1 + padding: 15px article-padding + border-style: solid + border-color: color-border + border-width: 1px 0 + overflow: auto + color: highlight-foreground + line-height: font-size * line-height + +$line-numbers + color: #666 + font-size: 0.85em + +.article-entry + pre, code + font-family: font-mono + code + background: color-background + text-shadow: 0 1px #fff + padding: 0 0.3em + pre + @extend $code-block + code + background: none + text-shadow: none + padding: 0 + .highlight + @extend $code-block + pre + border: none + margin: 0 + padding: 0 + table + margin: 0 + width: auto + td + border: none + padding: 0 + figcaption + clearfix() + font-size: 0.85em + color: highlight-comment + line-height: 1em + margin-bottom: 1em + a + float: right + .gutter pre + @extend $line-numbers + text-align: right + padding-right: 20px + .line + height: font-size * line-height + .line.marked + background: highlight-selection + .gist + margin: 0 article-padding * -1 + border-style: solid + border-color: color-border + border-width: 1px 0 + background: highlight-background + padding: 15px article-padding 15px 0 + .gist-file + border: none + font-family: font-mono + margin: 0 + .gist-data + background: none + border: none + .line-numbers + @extend $line-numbers + background: none + border: none + padding: 0 20px 0 0 + .line-data + padding: 0 !important + .highlight + margin: 0 + padding: 0 + border: none + .gist-meta + background: highlight-background + color: highlight-comment + font: 0.85em font-sans + text-shadow: 0 0 + padding: 0 + margin-top: 1em + margin-left: article-padding + a + color: color-link + font-weight: normal + &:hover + text-decoration: underline + +pre + .comment + .title + color: highlight-comment + .variable + .attribute + .tag + .regexp + .ruby .constant + .xml .tag .title + .xml .pi + .xml .doctype + .html .doctype + .css .id + .css .class + .css .pseudo + color: highlight-red + .number + .preprocessor + .built_in + .literal + .params + .constant + color: highlight-orange + .class + .ruby .class .title + .css .rules .attribute + color: highlight-green + .string + .value + .inheritance + .header + .ruby .symbol + .xml .cdata + color: highlight-green + .css .hexcolor + color: highlight-aqua + .function + .python .decorator + .python .title + .ruby .function .title + .ruby .title .keyword + .perl .sub + .javascript .title + .coffeescript .title + color: highlight-blue + .keyword + .javascript .function + color: highlight-purple diff --git a/themes/landscape/source/css/_partial/mobile.styl b/themes/landscape/source/css/_partial/mobile.styl new file mode 100644 index 0000000..eb68b3a --- /dev/null +++ b/themes/landscape/source/css/_partial/mobile.styl @@ -0,0 +1,19 @@ +@media mq-mobile + #mobile-nav + position: absolute + top: 0 + left: 0 + width: mobile-nav-width + height: 100% + background: color-mobile-nav-background + border-right: 1px solid #fff + +@media mq-mobile + .mobile-nav-link + display: block + color: color-grey + text-decoration: none + padding: 15px 20px + font-weight: bold + &:hover + color: #fff diff --git a/themes/landscape/source/css/_partial/sidebar-aside.styl b/themes/landscape/source/css/_partial/sidebar-aside.styl new file mode 100644 index 0000000..838b167 --- /dev/null +++ b/themes/landscape/source/css/_partial/sidebar-aside.styl @@ -0,0 +1,27 @@ +#sidebar + @media mq-normal + column(sidebar-column) + +.widget-wrap + margin: block-margin 0 + +.widget-title + @extend $block-caption + +.widget + color: color-sidebar-text + text-shadow: 0 1px #fff + background: color-widget-background + box-shadow: 0 -1px 4px color-widget-border inset + border: 1px solid color-widget-border + padding: 15px + border-radius: 3px + a + color: color-link + text-decoration: none + &:hover + text-decoration: underline + ul, ol, dl + ul, ol, dl + margin-left: 15px + list-style: disc \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/sidebar-bottom.styl b/themes/landscape/source/css/_partial/sidebar-bottom.styl new file mode 100644 index 0000000..e2403fd --- /dev/null +++ b/themes/landscape/source/css/_partial/sidebar-bottom.styl @@ -0,0 +1,27 @@ +.widget-wrap + margin-bottom: block-margin !important + @media mq-normal + column(main-column) + +.widget-title + color: #ccc + text-transform: uppercase + letter-spacing: 2px + margin-bottom: .5em + line-height: 1em + font-weight: bold + +.widget + color: color-grey + ul, ol + li + display: inline-block + zoom:1 + *display:inline + padding-right: .75em +/* Having problems getting balanced white space between items + li:before + content: " | " + li:first-child:before + content: none + */ diff --git a/themes/landscape/source/css/_partial/sidebar.styl b/themes/landscape/source/css/_partial/sidebar.styl new file mode 100644 index 0000000..e43d66a --- /dev/null +++ b/themes/landscape/source/css/_partial/sidebar.styl @@ -0,0 +1,35 @@ +if sidebar is bottom + @import "sidebar-bottom" +else + @import "sidebar-aside" + +.widget + @extend $base-style + line-height: line-height + word-wrap: break-word + font-size: 0.9em + ul, ol + list-style: none + margin: 0 + ul, ol + margin: 0 20px + ul + list-style: disc + ol + list-style: decimal + +.category-list-count +.tag-list-count +.archive-list-count + padding-left: 5px + color: color-grey + font-size: 0.85em + &:before + content: "(" + &:after + content: ")" + +.tagcloud + a + margin-right: 5px + display: inline-block diff --git a/themes/landscape/source/css/_util/grid.styl b/themes/landscape/source/css/_util/grid.styl new file mode 100644 index 0000000..2a14dd2 --- /dev/null +++ b/themes/landscape/source/css/_util/grid.styl @@ -0,0 +1,38 @@ +///////////////// +// Semantic.gs // for Stylus: http://learnboost.github.com/stylus/ +///////////////// + +// Utility function — you should never need to modify this +// _gridsystem-width = (column-width + gutter-width) * columns +gridsystem-width(_columns = columns) + (column-width + gutter-width) * _columns + +// Set @total-width to 100% for a fluid layout +// total-width = gridsystem-width(columns) +total-width = 100% + +////////// +// GRID // +////////// + +body + clearfix() + width: 100% + +row(_columns = columns) + clearfix() + display: block + width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns)) + margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1) + +column(x, _columns = columns) + display: inline + float: left + width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns)) + margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns)) + +push(offset = 1) + margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) + +pull(offset = 1) + margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) \ No newline at end of file diff --git a/themes/landscape/source/css/_util/mixin.styl b/themes/landscape/source/css/_util/mixin.styl new file mode 100644 index 0000000..b56f037 --- /dev/null +++ b/themes/landscape/source/css/_util/mixin.styl @@ -0,0 +1,31 @@ +// http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ +hide-text() + text-indent: 100% + white-space: nowrap + overflow: hidden + +// http://codepen.io/shshaw/full/gEiDt +absolute-center(width, height = width) + // margin: auto + // position: absolute + // top: 50% + // top: 0 + // left: 0 + // bottom: 0 + // right: 0 + // width: width + // height: height + // overflow: auto + width: width + height: height + position: absolute + top: 50% + left: 50% + margin-top: width * -0.5 + margin-left: height * -0.5 + +avoid-column-break() + vendor("column-break-inside", avoid, only: webkit) + page-break-inside: avoid // for firefox + overflow: hidden // fix for firefox + break-inside: avoid-column diff --git a/themes/landscape/source/css/_variables.styl b/themes/landscape/source/css/_variables.styl new file mode 100644 index 0000000..4562911 --- /dev/null +++ b/themes/landscape/source/css/_variables.styl @@ -0,0 +1,63 @@ +// Config +support-for-ie = false +vendor-prefixes = webkit moz ms official + +// Colors +color-default = #555 +color-grey = #999 +color-border = #ddd +color-link = #258fb8 +color-background = #eee +color-sidebar-text = #777 +color-widget-background = #ddd +color-widget-border = #ccc +color-footer-background = #262a30 +color-mobile-nav-background = #191919 +color-twitter = #00aced +color-facebook = #3b5998 +color-pinterest = #cb2027 +color-google = #dd4b39 + +// Fonts +font-sans = -apple-system, BlinkMacSystemFont, + "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", + "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif +font-serif = Georgia, "Times New Roman", serif +font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace +font-icon = FontAwesome +font-icon-path = "fonts/fontawesome-webfont" +font-icon-version = "4.0.3" +font-size = 14px +line-height = 1.6em +line-height-title = 1.1em + +// Header +logo-size = 40px +subtitle-size = 16px +banner-height = 300px +banner-url = "images/banner.jpg" + +sidebar = hexo-config("sidebar") + +// Layout +block-margin = 50px +article-padding = 20px +mobile-nav-width = 280px +main-column = 9 +sidebar-column = 3 + +if sidebar and sidebar isnt bottom + _sidebar-column = sidebar-column +else + _sidebar-column = 0 + +// Grids +column-width = 80px +gutter-width = 20px +columns = main-column + _sidebar-column + +// Media queries +mq-mobile = "screen and (max-width: 479px)" +mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)" +mq-normal = "screen and (min-width: 768px)" \ No newline at end of file diff --git a/themes/landscape/source/css/fonts/FontAwesome.otf b/themes/landscape/source/css/fonts/FontAwesome.otf new file mode 100644 index 0000000..8b0f54e Binary files /dev/null and b/themes/landscape/source/css/fonts/FontAwesome.otf differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.eot b/themes/landscape/source/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..7c79c6a Binary files /dev/null and b/themes/landscape/source/css/fonts/fontawesome-webfont.eot differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.svg b/themes/landscape/source/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..45fdf33 --- /dev/null +++ b/themes/landscape/source/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.ttf b/themes/landscape/source/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..e89738d Binary files /dev/null and b/themes/landscape/source/css/fonts/fontawesome-webfont.ttf differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.woff b/themes/landscape/source/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8c1748a Binary files /dev/null and b/themes/landscape/source/css/fonts/fontawesome-webfont.woff differ diff --git a/themes/landscape/source/css/images/banner.jpg b/themes/landscape/source/css/images/banner.jpg new file mode 100644 index 0000000..b963e06 Binary files /dev/null and b/themes/landscape/source/css/images/banner.jpg differ diff --git a/themes/landscape/source/css/style.styl b/themes/landscape/source/css/style.styl new file mode 100644 index 0000000..c51f8e4 --- /dev/null +++ b/themes/landscape/source/css/style.styl @@ -0,0 +1,89 @@ +@import "nib" +@import "_variables" +@import "_util/mixin" +@import "_util/grid" + +global-reset() + +input, button + margin: 0 + padding: 0 + &::-moz-focus-inner + border: 0 + padding: 0 + +@font-face + font-family: FontAwesome + font-style: normal + font-weight: normal + src: url(font-icon-path + ".eot?v=#" + font-icon-version) + src: url(font-icon-path + ".eot?#iefix&v=#" + font-icon-version) format("embedded-opentype"), + url(font-icon-path + ".woff?v=#" + font-icon-version) format("woff"), + url(font-icon-path + ".ttf?v=#" + font-icon-version) format("truetype"), + url(font-icon-path + ".svg#fontawesomeregular?v=#" + font-icon-version) format("svg") + +html, body, #container + height: 100% + +body + background: color-background + font: font-size font-sans + -webkit-text-size-adjust: 100% + +.outer + clearfix() + max-width: (column-width + gutter-width) * columns + gutter-width + margin: 0 auto + padding: 0 gutter-width + +.inner + column(columns) + +.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 + transition: 0.2s ease-out + z-index: 1 + background: color-background + .mobile-nav-on & + left: mobile-nav-width + +if sidebar and sidebar isnt bottom + #main + @media mq-normal + column(main-column) + +if sidebar is left + @media mq-normal + #main + float: right + +@import "_extend" +@import "_partial/header" +@import "_partial/article" +@import "_partial/comment" +@import "_partial/archive" +@import "_partial/footer" +@import "_partial/highlight" +@import "_partial/mobile" + +if sidebar + @import "_partial/sidebar" \ No newline at end of file diff --git a/themes/landscape/source/fancybox/blank.gif b/themes/landscape/source/fancybox/blank.gif new file mode 100644 index 0000000..35d42e8 Binary files /dev/null and b/themes/landscape/source/fancybox/blank.gif differ diff --git a/themes/landscape/source/fancybox/fancybox_loading.gif b/themes/landscape/source/fancybox/fancybox_loading.gif new file mode 100644 index 0000000..a03a40c Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_loading.gif differ diff --git a/themes/landscape/source/fancybox/fancybox_loading@2x.gif b/themes/landscape/source/fancybox/fancybox_loading@2x.gif new file mode 100644 index 0000000..9205aeb Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_loading@2x.gif differ diff --git a/themes/landscape/source/fancybox/fancybox_overlay.png b/themes/landscape/source/fancybox/fancybox_overlay.png new file mode 100644 index 0000000..a439139 Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_overlay.png differ diff --git a/themes/landscape/source/fancybox/fancybox_sprite.png b/themes/landscape/source/fancybox/fancybox_sprite.png new file mode 100644 index 0000000..fd8d5ca Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_sprite.png differ diff --git a/themes/landscape/source/fancybox/fancybox_sprite@2x.png b/themes/landscape/source/fancybox/fancybox_sprite@2x.png new file mode 100644 index 0000000..d0e4779 Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_sprite@2x.png differ diff --git a/themes/landscape/source/fancybox/helpers/fancybox_buttons.png b/themes/landscape/source/fancybox/helpers/fancybox_buttons.png new file mode 100644 index 0000000..0787207 Binary files /dev/null and b/themes/landscape/source/fancybox/helpers/fancybox_buttons.png differ diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css new file mode 100644 index 0000000..a26273a --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css @@ -0,0 +1,97 @@ +#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/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js new file mode 100644 index 0000000..352bb5f --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js @@ -0,0 +1,122 @@ + /*! + * 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/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js new file mode 100644 index 0000000..62737a5 --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js @@ -0,0 +1,199 @@ +/*! + * 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/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css new file mode 100644 index 0000000..63d2943 --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css @@ -0,0 +1,55 @@ +#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/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js new file mode 100644 index 0000000..58c9719 --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js @@ -0,0 +1,165 @@ + /*! + * 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 += '
    15. '; + } + + this.wrap = $('
      ').addClass(opts.position).appendTo('body'); + this.list = $('
        ' + 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/themes/landscape/source/fancybox/jquery.fancybox.css b/themes/landscape/source/fancybox/jquery.fancybox.css new file mode 100644 index 0000000..c75d051 --- /dev/null +++ b/themes/landscape/source/fancybox/jquery.fancybox.css @@ -0,0 +1,273 @@ +/*! 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/themes/landscape/source/fancybox/jquery.fancybox.js b/themes/landscape/source/fancybox/jquery.fancybox.js new file mode 100644 index 0000000..7a0f8ac --- /dev/null +++ b/themes/landscape/source/fancybox/jquery.fancybox.js @@ -0,0 +1,2017 @@ +/*! + * 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/themes/landscape/source/fancybox/jquery.fancybox.pack.js b/themes/landscape/source/fancybox/jquery.fancybox.pack.js new file mode 100644 index 0000000..2db1280 --- /dev/null +++ b/themes/landscape/source/fancybox/jquery.fancybox.pack.js @@ -0,0 +1,46 @@ +/*! 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/themes/landscape/source/js/script.js b/themes/landscape/source/js/script.js new file mode 100644 index 0000000..1e58767 --- /dev/null +++ b/themes/landscape/source/js/script.js @@ -0,0 +1,137 @@ +(function($){ + // Search + var $searchWrap = $('#search-form-wrap'), + isSearchAnim = false, + searchAnimDuration = 200; + + var startSearchAnim = function(){ + isSearchAnim = true; + }; + + var stopSearchAnim = function(callback){ + setTimeout(function(){ + isSearchAnim = false; + callback && callback(); + }, searchAnimDuration); + }; + + $('#nav-search-btn').on('click', function(){ + if (isSearchAnim) return; + + startSearchAnim(); + $searchWrap.addClass('on'); + stopSearchAnim(function(){ + $('.search-form-input').focus(); + }); + }); + + $('.search-form-input').on('blur', function(){ + startSearchAnim(); + $searchWrap.removeClass('on'); + stopSearchAnim(); + }); + + // Share + $('body').on('click', function(){ + $('.article-share-box.on').removeClass('on'); + }).on('click', '.article-share-link', function(e){ + e.stopPropagation(); + + var $this = $(this), + url = $this.attr('data-url'), + encodedUrl = encodeURIComponent(url), + id = 'article-share-box-' + $this.attr('data-id'), + offset = $this.offset(); + + if ($('#' + id).length){ + var box = $('#' + id); + + if (box.hasClass('on')){ + box.removeClass('on'); + return; + } + } else { + var html = [ + '
      ', + '', + '
      ', + '', + '', + '', + '', + '
      ', + '
      ' + ].join(''); + + var box = $(html); + + $('body').append(box); + } + + $('.article-share-box.on').hide(); + + box.css({ + top: offset.top + 25, + left: offset.left + }).addClass('on'); + }).on('click', '.article-share-box', function(e){ + e.stopPropagation(); + }).on('click', '.article-share-box-input', function(){ + $(this).select(); + }).on('click', '.article-share-box-link', function(e){ + e.preventDefault(); + e.stopPropagation(); + + window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450'); + }); + + // Caption + $('.article-entry').each(function(i){ + $(this).find('img').each(function(){ + if ($(this).parent().hasClass('fancybox')) return; + + var alt = this.alt; + + if (alt) $(this).after('' + alt + ''); + + $(this).wrap(''); + }); + + $(this).find('.fancybox').each(function(){ + $(this).attr('rel', 'article' + i); + }); + }); + + if ($.fancybox){ + $('.fancybox').fancybox(); + } + + // Mobile nav + var $container = $('#container'), + isMobileNavAnim = false, + mobileNavAnimDuration = 200; + + var startMobileNavAnim = function(){ + isMobileNavAnim = true; + }; + + var stopMobileNavAnim = function(){ + setTimeout(function(){ + isMobileNavAnim = false; + }, mobileNavAnimDuration); + } + + $('#main-nav-toggle').on('click', function(){ + if (isMobileNavAnim) return; + + startMobileNavAnim(); + $container.toggleClass('mobile-nav-on'); + stopMobileNavAnim(); + }); + + $('#wrap').on('click', function(){ + if (isMobileNavAnim || !$container.hasClass('mobile-nav-on')) return; + + $container.removeClass('mobile-nav-on'); + }); +})(jQuery); \ No newline at end of file diff --git a/themes/next b/themes/next new file mode 160000 index 0000000..b73ab10 --- /dev/null +++ b/themes/next @@ -0,0 +1 @@ +Subproject commit b73ab10ea8d4ac90b9d39bd8321be833e6f9bf19 diff --git a/themes/next_old/.bowerrc b/themes/next_old/.bowerrc new file mode 100644 index 0000000..8013f26 --- /dev/null +++ b/themes/next_old/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "source/lib" +} diff --git a/themes/next_old/.editorconfig b/themes/next_old/.editorconfig new file mode 100644 index 0000000..f0627b9 --- /dev/null +++ b/themes/next_old/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.py] +indent_size = 4 diff --git a/themes/next_old/.gitattributes b/themes/next_old/.gitattributes new file mode 100644 index 0000000..7ead58e --- /dev/null +++ b/themes/next_old/.gitattributes @@ -0,0 +1,2 @@ +source/lib/* linguist-vendored +scripts/merge.js linguist-vendored diff --git a/themes/next_old/.github/CONTRIBUTING.md b/themes/next_old/.github/CONTRIBUTING.md new file mode 100644 index 0000000..9175b91 --- /dev/null +++ b/themes/next_old/.github/CONTRIBUTING.md @@ -0,0 +1,6 @@ +Before submitting an issue, please search for the issue [here](https://github.com/iissnan/hexo-theme-next/issues?utf8=%E2%9C%93&q=) to find if the issue is already reported. + +Also, you can search for answers on the [NexT Documentation Site](http://theme-next.iissnan.com/): + +- [常见问题 - 中文文档](http://theme-next.iissnan.com/faqs.html) +- FAQs (Work in progress) diff --git a/themes/next_old/.github/ISSUE_TEMPLATE.md b/themes/next_old/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..37d14dd --- /dev/null +++ b/themes/next_old/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,29 @@ +THIS REPO IS NOT SUPPORTED ANYMORE! +DON'T NEED CREATE ISSUE HERE! +NEXT MOVED HERE: https://github.com/theme-next/hexo-theme-next + +NexT is rebased into organization repo https://github.com/theme-next +If you want new feature, fix, or support, create new issue in NexT v6.x repo (desirable in English). + +There is instructions +on English: https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md +or Chinese: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md +how to update from v5.1.x to v 6.x + +You also may read this for details: https://github.com/iissnan/hexo-theme-next/issues/2061 + +*** + +该工程已不再提供任何支持与维护! +请大家不要再在这里创建issue了! +NexT主题仓库已移动到此处: https://github.com/theme-next/hexo-theme-next + +NexT已经rebase到theme-next组织(https://github.com/theme-next) 的repo中. +如果你想要求新的特性,bug修复或其他支持,请在新的v6.x的仓库下创建新issue(最好用英文,谢谢) + + +英文文档: (https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md) +或中文文档: (https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md) +如何从 v5.1.x 更新到 v 6.x + +相关细节参考这里: https://github.com/iissnan/hexo-theme-next/issues/2061 diff --git a/themes/next_old/.github/PULL_REQUEST_TEMPLATE.md b/themes/next_old/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..af32032 --- /dev/null +++ b/themes/next_old/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,87 @@ + + + + +## PR Checklist +**Please check if your PR fulfills the following requirements:** + +- [ ] The commit message follows [our guidelines](https://github.com/iissnan/hexo-theme-next/blob/master/.github/CONTRIBUTING.md). +- [ ] Tests for the changes have been added (for bug fixes / features). + - [ ] Muse | Mist have been tested. + - [ ] Pisces | Gemini have been tested. +- [ ] Docs have been added / updated (for bug fixes / features). + +## PR Type +**What kind of change does this PR introduce?** + +- [ ] Bugfix. +- [ ] Feature. +- [ ] Code style update (formatting, local variables). +- [ ] Refactoring (no functional changes, no api changes). +- [ ] Build related changes. +- [ ] CI related changes. +- [ ] Documentation content changes. +- [ ] Other... Please describe: + +## What is the current behavior? + + +Issue Number(s): N/A + +## What is the new behavior? +Description about this pull, in several words... + +* Screens with this changes: N/A +* Link to demo site with this changes: N/A + +### How to use? +In NexT `_config.yml`: +```yml +... +``` + +## Does this PR introduce a breaking change? +- [ ] Yes. +- [ ] No. + + + + + + diff --git a/themes/next_old/.github/browserstack_logo.png b/themes/next_old/.github/browserstack_logo.png new file mode 100644 index 0000000..0be37e7 Binary files /dev/null and b/themes/next_old/.github/browserstack_logo.png differ diff --git a/themes/next_old/.gitignore b/themes/next_old/.gitignore new file mode 100644 index 0000000..df03369 --- /dev/null +++ b/themes/next_old/.gitignore @@ -0,0 +1,20 @@ +.DS_Store +.idea/ +*.log +*.iml +yarn.lock +package-lock.json +node_modules/ + +# Ignore unused verdors' files +source/lib/fancybox/* +!source/lib/fancybox/source/ + +source/lib/font-awesome/less/ +source/lib/font-awesome/scss/ + +source/lib/ua-parser-js/* +!source/lib/ua-parser-js/dist/ + +source/lib/Han/* +!source/lib/Han/dist/ diff --git a/themes/next_old/.hound.yml b/themes/next_old/.hound.yml new file mode 100644 index 0000000..534bae8 --- /dev/null +++ b/themes/next_old/.hound.yml @@ -0,0 +1,4 @@ +javascript: + enabled: true + config_file: .jshintrc + ignore_file: .javascript_ignore diff --git a/themes/next_old/.javascript_ignore b/themes/next_old/.javascript_ignore new file mode 100644 index 0000000..ad0d1ea --- /dev/null +++ b/themes/next_old/.javascript_ignore @@ -0,0 +1,5 @@ +source/vendors/* +source/lib/* +source/js/src/affix.js +source/js/src/scrollspy.js +source/js/src/js.cookie.js diff --git a/themes/next_old/.jshintrc b/themes/next_old/.jshintrc new file mode 100644 index 0000000..a2d0ed3 --- /dev/null +++ b/themes/next_old/.jshintrc @@ -0,0 +1,27 @@ +{ + "asi": false, + "bitwise": true, + "browser": true, + "camelcase": true, + "curly": true, + "forin": true, + "immed": true, + "latedef": "nofunc", + "maxlen": 120, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "predef": [ + "$", + "jQuery", + "NexT", + "CONFIG" + ], + "quotmark": true, + "trailing": true, + "undef": true, + "unused": true, + + "expr": true +} diff --git a/themes/next_old/.stylintrc b/themes/next_old/.stylintrc new file mode 100644 index 0000000..38e6ac1 --- /dev/null +++ b/themes/next_old/.stylintrc @@ -0,0 +1,45 @@ +{ + "blocks": false, + "brackets": "always", + "colons": "always", + "colors": "always", + "commaSpace": "always", + "commentSpace": "always", + "cssLiteral": "never", + "customProperties": [], + "depthLimit": false, + "duplicates": true, + "efficient": "always", + "exclude": [], + "extendPref": false, + "globalDupe": false, + "groupOutputByFile": true, + "indentPref": false, + "leadingZero": "never", + "maxErrors": false, + "maxWarnings": false, + "mixed": false, + "mixins": [], + "namingConvention": "lowercase-dash", + "namingConventionStrict": false, + "none": "never", + "noImportant": true, + "parenSpace": false, + "placeholders": "always", + "prefixVarsWithDollar": "always", + "quotePref": false, + "reporterOptions": { + "columns": ["lineData", "severity", "description", "rule"], + "columnSplitter": " ", + "showHeaders": false, + "truncate": true + }, + "semicolons": "always", + "sortOrder": "grouped", + "stackedProperties": false, + "trailingWhitespace": "never", + "universal": false, + "valid": true, + "zeroUnits": "never", + "zIndexNormalize": false +} diff --git a/themes/next_old/.travis.yml b/themes/next_old/.travis.yml new file mode 100644 index 0000000..a607f87 --- /dev/null +++ b/themes/next_old/.travis.yml @@ -0,0 +1,17 @@ +language: node_js +node_js: node + +cache: + directories: + - node_modules + +install: npm install + +before_script: + - npm install -g gulp + +addons: + browserstack: + username: "ivannginx1" + access_key: + secure: "NutOhdgtUdBUXMPZhy8X1F1Jq+tan1LeNOV0FArBt15SNlxtNArqhiyTi4XnG9MPruX4306aGF2RBrKso+OiGNRdGtRGngH613Q0GWNtlC/boMqnI7fHqLIyCs6S12y2uA8PK4Ifxg9bZ0VtCTYYbMy+p1KvBM//L12vmtfdnby8z5Qvex3tB3dLoPOR50CKkINHJVDLm+iVRFrdz4/83oDsulZSRRGIaxu5taDWPIcp3fYZtre2Nc+RXcsyFDyjN7U0Hvr5tKBbloJxXEQEBv2xLkMOtp85nmCPD06s1Il8Wus1ux3raVsfUyaW5FpNX37Jeb5e00RQUM1wgU5m75H6qiGwDvQswbugJG0i/a2nNfsgVmbrSZdMnkHcx2Uxmrw4ejyEP5NSrJSBi05Ck1fQ4UsZ4Qkdf1fd04SI0LpLWt43eoNO/7rHKsQoP4LCX9gxKUuC075NEBLODyJ529RYfA6dKKwwH6o0ZbOgASmCoAWaM65g4+FHRnJcKL/Kj9ZWklQtRa7/ynlHaA65jefFS2lB8Ut6d3rXDDBih9mIrwV1uUaEH96xgAN42bgU/vY6FGzNkDOYZqj4YfsepDM0wbOsslFie7JZq7iFjsYvrXqLvYUMk37AZwQ2Sb6uH4tIT4Qw/4oZfDzA1En3/8HdZJ28nKW/lzjwMSqheIY=" diff --git a/themes/next_old/LICENSE b/themes/next_old/LICENSE new file mode 100644 index 0000000..0bf8716 --- /dev/null +++ b/themes/next_old/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-2017 iissnan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/next_old/README.cn.md b/themes/next_old/README.cn.md new file mode 100644 index 0000000..a202b7e --- /dev/null +++ b/themes/next_old/README.cn.md @@ -0,0 +1,384 @@ +

      本项目已停止维护。:warning:

      +

      社区维护的版本请移步这里:NexT v6 and v7 :triangular_flag_on_post:

      + +

      NexT

      + +

      NexT 是一个高质量并且优雅的Hexo 主题。这是精心制作做出来的 hexo 主题。

      + +[![Join the chat at https://gitter.im/iissnan/hexo-theme-next](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![mnt-image]][commits-url] +[![travis-image]][travis-url] +[![rel-image]][releases-url] +[![hexo-image]][hexo-url] +[![lic-image]](LICENSE) + +* NexT 使用文档 | [English Documentation](README.md) + +## 实时预览 Live Preview + + +* :heart_decoration: Muse 方案: [LEAFERx](https://leaferx.online) | [XiaMo](https://notes.wanghao.work) | [OAwan](https://oawan.me) +* :six_pointed_star: Mist 方案: [Jeff](https://blog.zzbd.org) | [uchuhimo](http://uchuhimo.me) | [xirong](http://www.ixirong.com) +* :pisces: Pisces 方案: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com) +* :gemini: Gemini 方案: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me) + + +更多 NexT 例子点击 [这里](https://github.com/iissnan/hexo-theme-next/issues/119). + +## 安装 Installation + +**1.** 在终端切换到**hexo 根**目录. 在hexo目录下一定有 `node_modules`, `source`, `themes` 和其他文件夹: + ```sh + $ cd hexo + $ ls + _config.yml node_modules package.json public scaffolds source themes + ``` + +**2.** 从 github 上获取主题 。这里有几种方式来获取主题: + +### 下载[最新发布的版本][releases-latest-url] Download tagged release version +   在大多数情况下 **稳定**。 推荐用户下载这个。 + + [![curl-tar-wget-image]][curl-tar-wget-url] + + ```sh + $ mkdir themes/next + $ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1 + ``` + +### 下载[标签发布版本][releases-url] Download tagged release version +   您必须定义版本。从[标签列表][tags-url]里选择版本替换`v5.1.2`。 + + [![curl-tar-image]][curl-tar-url] + + ```sh + $ mkdir themes/next + $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1 + ``` + + [![git-image]][git-url] + + ```sh + $ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next + ``` + +### 下载[最新的 master 分支][download-latest-url] Download latest master branch +  可能会 **不稳定**, 但是包含最新的特色,推荐开发者下载. + + [![curl-tar-image]][curl-tar-url] + + ```sh + $ mkdir themes/next + $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1 + ``` + + [![git-image]][git-url] + + ```sh + $ git clone https://github.com/iissnan/hexo-theme-next themes/next + ``` + + 使用克隆命令,你将得到**整个存储库**。而且在任何时候你都可以切换到任何标签发布版本。 + 获取标签列表: + + ```sh + $ cd themes/next + $ git tag -l + … + v5.0.0 + v5.0.1 + v5.1.0 + v5.1.1 + v5.1.2 + ``` + +   例如, 你想要切换到`v5.1.0` [标签发布版本][tags-url]. 输入以下命令: + + ```sh + $ git checkout tags/v5.1.0 + Note: checking out 'tags/v5.1.0'. + … + HEAD now on 1f72f68... CSS: Remove global list-style setting of ul + ``` + +   如果你想切换回 [master 分支][commits-url]的话, 输入这个命令: + + ```sh + $ git checkout master + ``` + +**3.** 在 **hexo 根目录下** 的配置文件`_config.yml`里设置主题: + + theme: next + +### Bugs +对于那些遇到 **Error: Cannot find module 'hexo-util'** [问题](https://github.com/iissnan/hexo-theme-next/issues/1490)的人, 请检查你的NPM 版本. + +- `版本 > 3`: 如果仍然不行的话,请移除 `node_modules` 文件 然后重新安装,使用 `npm install`命令。 +- `版本 < 3`: 请通过`npm install --save-dev hexo-util`命令添加`hexo-util`到你的站点包依赖里 + +## 更新 Update + +```sh +$ cd themes/next +$ git pull +``` + +### Bugs + +> 提交您的更改或存储它们,然后才能合并。 + +您必须提交,存储或放弃本地更改. 看 [here](https://stackoverflow.com/a/15745424/5861495) 是如何做的。 + +### 使用Hexo data files([#328](https://github.com/iissnan/hexo-theme-next/issues/328))配置主题 Theme configurations using Hexo data files #328 + + +目前升级 NexT 主题的时候并不是非常的流畅。若使用 `git pull` 的方式,很多时候可能会产生冲突;而下载新版本覆盖安装的方式又需要手动合并主题的 `_config.yml` 文件。 + +在此修改之前, NexT 建议将配置分离,一部分在 站点的配置文件中,另外一部分在主题的配置文件中。将需要自定的选项放置在 站点配置文件中,从而脱离避免更新主题时可能遇到的麻烦。这种方式是可行,但是有一些缺点: + +1. 配置分离成了两个部分 +2. 用户可能会疑惑一些选项该放置在哪里比较合适 + +为了解决这个问题, NexT 将会使用 Hexo 的 [Data Files](https://hexo.io/docs/data-files.html) 。然而由于 Data Files 是在 Hexo 3 版本时引进的,所以要使用这个特性,需要 Hexo 的版本不低于 3。 + +若你比较喜欢 Hexo 2.x 版本,可以继续使用原先的配置方式。 NexT 保持着向下兼容。 + + +#### 特性 Benefits + +通过这个特性,你可以将所有的主题配置放置在站点的 `source/_data/next.yml` 文件中。原先放置在 站点配置文件 中的选项可以迁移到新的位置,同时,主题配置文件可以不用做任何修改。若后续版本有配置相关的改动时,你仅需在 `next.yml` 中做相应调整即可 + + +#### 如何使用这个特性 How to use this feature + +1. 请先确保你所使用的 Hexo 版本在 3 以上 +2. 在站点的 `source/_data` 目录下新建 `next.yml` 文件(`_data`目录可能需要新建) +3. 迁移站点配置文件和主题配置文件中的配置到 `next.yml` 中 +4. 使用 `--config source/_data/next.yml` 参数启动服务器, 生成或者部署。\ +   例如: `hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml`。 + +## 特色 Features + +### 支持多国语言, 包括: +:cn: 简体中文 & 繁体中文
      +:us: 英语
      +:ru: 俄语
      +:fr: 法语
      +:de: 德语
      +:jp: 日语
      +:indonesia: 印度尼西亚语
      +:portugal: 葡萄牙语 (巴西)
      +:kr: 朝鲜语
      +:it: 意大利语
      +:netherlands: 荷兰语 + +默认语言是英语。 + +```yml +language: en +# language: zh-Hans +# language: zh-hk +# language: zh-tw +# language: ru +# language: fr-FR +# language: de +# language: ja +# language: id +# language: pt +# language: pt-BR +# language: ko +# language: it +# language: nl-NL +``` + +在站点配置文件`_config.yml`中可以将语言切换成中文 + +```yml +language: zh-Hans +``` + +### 评论支持 Comment support + +NexT 已经原生支持 `多说` and `Disqus` 评论系统。 + +添加以下代码到你的主题配置文件 `_config.yml`: + +```yml +duoshuo: + enable: true + shortname: your-duoshuo-shortname +``` + +或者 + +```yml +disqus_shortname: your-disqus-shortname +``` + +### 标签页 Tags page + +> 添加一个标签页面,里面包含您网站中的所有标签。 + +- 创建一个名为 `tags` 页面 + + hexo new page "tags" + +- 编辑标签页, 设置页面类型为`tags`. + + title: All tags + date: 2014-12-22 12:39:04 + type: "tags" + +- 添加 `tags` 到主题配置文件 `_config.yml` 里: + + menu: + home: / + archives: /archives + tags: /tags + +### 分类页 Categories page + +> 添加一个分类页面,里面包含您网站中的所有分类。 + +- 创建一个名为 `categories` 页面 + + hexo new page "categories" + +- 编辑分类页, 设置页面类型为 `categories`. + + title: All categories + date: 2014-12-22 12:39:04 + type: "categories" + +- 添加 `categories` 到主题配置文件 `_config.yml` 里: + + menu: + home: / + archives: /archives + categories: /categories + +### 社交媒体 Social Media + +NexT 可以自动添加链接到您的社交媒体帐户里: + +```yml +social: + GitHub: your-github-url + Twitter: your-twitter-url + Weibo: your-weibo-url + DouBan: your-douban-url + ZhiHu: your-zhihu-url +``` + +### Feed 链接 Feed link + +> 显示 feed 链接。 + +在主题配置文件`_config.yml`里设置`rss` , 如下所示: + +1. `rss: false` 会禁用 feed 链接。 +2. `rss: ` 使用站点 feed 链接。这是默认的选项。 + +    按照插件[hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed)的README中的安装说明进行操作。在完成这个插件的配置后,Feed链接也生成好了 + +3. `rss: http://your-feed-url` 设置你的 feed 链接. + +### 内置5种代码高亮主题 Up to 5 code highlight themes built-in + +NexT 使用的是 [Tomorrow 主题](https://github.com/chriskempson/tomorrow-theme) ,一共有5种主题供你选择。 +Next 默认使用 `normal`. 下面是 `normal` 和 `night` 主题的预览: + +![Tomorrow Normal Preview](http://iissnan.com/nexus/next/tomorrow-normal.png) +![Tomorrow Night Preview](http://iissnan.com/nexus/next/tomorrow-night.png) + +查看更多信息点击[Tomorrow 主题](https://github.com/chriskempson/tomorrow-theme)。 + +## 配置 Configuration + +NexT 的配置很少 + +```yml + +# Menu configuration. +menu: + home: / + archives: /archives + +# Favicon +favicon: /favicon.ico + +# Avatar (put the image into next/source/images/) +# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..) +avatar: /default_avatar.png + +# Code highlight theme +# available: normal | night | night eighties | night blue | night bright +highlight_theme: normal + +# Fancybox for image gallery +fancybox: true + +# Specify the date when the site was setup +since: 2013 + +``` + + +## 浏览器支持 Browser support + +![Browser support](http://iissnan.com/nexus/next/browser-support.png) + +[![Browser Stack](.github/browserstack_logo.png)](https://www.browserstack.com/) +>**BrowserStack** is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators. + +## 贡献 Contributing + +接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的`Pull Request`。 + +Any types of contribution are welcome. Thanks. + +**ATTENTION! Contributors on Chinese docs needed!**\ +Need to translate from [English docs](README.md) to Chinese docs.\ +Any help wanted!\ +Thank's a lot! + +## 开发 Development + +NexT 主旨在于简洁优雅且易于使用,所以首先要尽量确保 NexT 的简洁易用性。 + +NexT is built for easily use with elegant appearance. First things first, always keep things simple. + +## [开发历史 Changelog](https://github.com/iissnan/hexo-theme-next/wiki/Changelog) + + + +[browser-image]: https://img.shields.io/badge/browser-%20chrome%20%7C%20firefox%20%7C%20opera%20%7C%20safari%20%7C%20ie%20%3E%3D%209-lightgrey.svg +[browser-url]: https://www.browserstack.com + +[gitter-image]: https://badges.gitter.im/Join%20Chat.svg +[gitter-url]: https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge + +[travis-image]: https://travis-ci.org/iissnan/hexo-theme-next.svg?branch=master +[travis-url]: https://travis-ci.org/iissnan/hexo-theme-next?branch=master "Travis CI" + +[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%203.0-blue.svg +[hexo-url]: http://hexo.io + +[mnt-image]: https://img.shields.io/maintenance/yes/2017.svg +[rel-image]: https://img.shields.io/github/release/iissnan/hexo-theme-next.svg + +[lic-image]: https://img.shields.io/dub/l/vibe-d.svg + +[git-image]: https://img.shields.io/badge/install%20with%20-git-blue.svg +[curl-tar-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar-blue.svg +[curl-tar-wget-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar%20%7C%20wget-blue.svg +[git-url]: http://lmgtfy.com/?q=linux+git+install +[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install +[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install + +[download-latest-url]: https://github.com/iissnan/hexo-theme-next/archive/master.zip +[releases-latest-url]: https://github.com/iissnan/hexo-theme-next/releases/latest +[releases-url]: https://github.com/iissnan/hexo-theme-next/releases +[tags-url]: https://github.com/iissnan/hexo-theme-next/tags +[commits-url]: https://github.com/iissnan/hexo-theme-next/commits/master diff --git a/themes/next_old/README.md b/themes/next_old/README.md new file mode 100644 index 0000000..fa97eb7 --- /dev/null +++ b/themes/next_old/README.md @@ -0,0 +1,374 @@ +

      This repository is no longer maintained! :warning:

      +

      The community-maintained version is here: NexT v6 and v7 :triangular_flag_on_post:

      + +

      NexT

      + +

      NexT is a high quality elegant Hexo theme. It is crafted from scratch, with love.

      + +[![gitter-image]][gitter-url] +[![mnt-image]](https://github.com/theme-next/hexo-theme-next) +[![travis-image]][travis-url] +[![rel-image]][releases-url] +[![hexo-image]][hexo-url] +[![lic-image]](LICENSE) + +* [Chinese Documentation](README.cn.md) + +## Live Preview + +* :heart_decoration: Muse scheme: [LEAFERx](https://leaferx.online) | [XiaMo](https://notes.wanghao.work) | [OAwan](https://oawan.me) +* :six_pointed_star: Mist scheme: [Jeff](https://blog.zzbd.org) | [uchuhimo](http://uchuhimo.me) | [xirong](http://www.ixirong.com) +* :pisces: Pisces scheme: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com) +* :gemini: Gemini scheme: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me) + +More NexT examples [here](https://github.com/iissnan/hexo-theme-next/issues/119). + +## Installation + +**1.** Change dir to **hexo root** directory. There must be `node_modules`, `source`, `themes` and other directories: + ```sh + $ cd hexo + $ ls + _config.yml node_modules package.json public scaffolds source themes + ``` + +**2.** Get theme from GitHub. There are several variants to do it: + +### Download [latest release version][releases-latest-url]. + At most cases **stable**. Recommended for most users. + + [![curl-tar-wget-image]][curl-tar-wget-url] + + ```sh + $ mkdir themes/next + $ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1 + ``` + +### Download [tagged release version][releases-url]. + You must define version. Replace `v5.1.2` with any version from [tags list][tags-url]. + + [![curl-tar-image]][curl-tar-url] + + ```sh + $ mkdir themes/next + $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1 + ``` + + [![git-image]][git-url] + + ```sh + $ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next + ``` + +### Download [latest master branch][download-latest-url]. + May be **unstable**, but includes latest features. Recommended for developers. + + [![curl-tar-image]][curl-tar-url] + + ```sh + $ mkdir themes/next + $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1 + ``` + + [![git-image]][git-url] + + ```sh + $ git clone https://github.com/iissnan/hexo-theme-next themes/next + ``` + + Clone command will give you the **whole repository**. And in any time you can switch to any tagged release.\ + Get tags list: + + ```sh + $ cd themes/next + $ git tag -l + … + v5.0.0 + v5.0.1 + v5.1.0 + v5.1.1 + v5.1.2 + ``` + + For example, you want to switch on `v5.1.0` [tagged release version][tags-url]. Input the following command: + + ```sh + $ git checkout tags/v5.1.0 + Note: checking out 'tags/v5.1.0'. + … + HEAD now on 1f72f68... CSS: Remove global list-style setting of ul + ``` + + And if you want to switch back on [master branch][commits-url], input this command: + + ```sh + $ git checkout master + ``` + +**3.** Set theme in main **hexo root config** `_config.yml` file: + + theme: next + +### Bugs +For those who also encounter **Error: Cannot find module 'hexo-util'** [issue](https://github.com/iissnan/hexo-theme-next/issues/1490), please check your NPM version. + +- `> 3`: Still not work. Please remove `node_modules` directory and reinstall using `npm install`. +- `< 3`: Please add `hexo-util` explicitly via `npm install --save-dev hexo-util` to you site package deps. + +## Update + +```sh +$ cd themes/next +$ git pull +``` + +### Bugs + +> Commit your changes or stash them before you can merge + +You must Commit, Stash or Discard local changes. See [here](https://stackoverflow.com/a/15745424/5861495) how to do it. + +### Theme configurations using Hexo data files ([#328](https://github.com/iissnan/hexo-theme-next/issues/328)) + +Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via `git pull`, or need to merge configurations manually when upgrading to new releases. + + At present, NexT encourages users to store some options in site's `_config.yml` and other options in theme's `_config.yml`. This approach is applicable, but has some drawbacks: +1. Configurations are splited into two pieces +2. Users maybe confuse which place should be for options + +In order to resolve this issue, NexT will take advantage of Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature. + +If you prefer Hexo 2.x, you can still use the old approach for configurations. NexT is still compatible with Hexo 2.x. + +#### Benefits + +With this feature, now you can put all your configurations into one place (`source/_data/next.yml`), you don't need to touch `next/_config.yml`. If there are any new options in new releases, you just need to copy those options from `next/_config.yml`, paste into `_data/next.yml` and set their values to whatever you want. + +#### How to use this feature + +1. Please ensure you are using Hexo 3 (or above) +2. Create an file named `next.yml` in site's `source/_data` directory (create `_data` directory if it did not exist) +3. Copy NexT theme options both in site's `_config.yml` and theme's `_config.yml` into `next.yml`. +4. Use `--config source/_data/next.yml` parameter to start server, generate or deploy.\ + For example: `hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml`. + +## Features + +### Multiple languages support, including: +:cn: Simplified Chinese & Traditional Chinese.
      +:us: English
      +:ru: Russian
      +:fr: French
      +:de: German
      +:jp: Japanese
      +:indonesia: Indonesian
      +:portugal: Portuguese (Brazil)
      +:kr: Korean
      +:it: Italian
      +:netherlands: Dutch
      +:vietnam: Vietnamese + +Default language is English. + +```yml +language: en +# language: zh-Hans +# language: zh-hk +# language: zh-tw +# language: ru +# language: fr-FR +# language: de +# language: ja +# language: id +# language: pt +# language: pt-BR +# language: ko +# language: it +# language: nl-NL +# language: vi +``` + +Set `language` field as following in site `_config.yml` to change to Chinese. + +```yml +language: zh-Hans +``` + +### Comment support. + +NexT has native support for `DuoShuo` and `Disqus` comment systems. + +Add the following snippets to your `_config.yml`: + +```yml +duoshuo: + enable: true + shortname: your-duoshuo-shortname +``` + +OR + +```yml +disqus_shortname: your-disqus-shortname +``` + +### Tags page. + +> Add a tags page contains all tags in your site. + +- Create a page named `tags` + + hexo new page "tags" + +- Edit tags page, set page type to `tags`. + + title: All tags + date: 2014-12-22 12:39:04 + type: "tags" + +- Add `tags` to theme `_config.yml`: + + menu: + home: / + archives: /archives + tags: /tags + +### Categories page. + +> Add a categories page contains all categories in your site. + +- Create a page named `categories` + + hexo new page "categories" + +- Edit categories page, set page type to `categories`. + + title: All categories + date: 2014-12-22 12:39:04 + type: "categories" + +- Add `categories` to theme `_config.yml`: + + menu: + home: / + archives: /archives + categories: /categories + +### Social Media + +NexT can automatically add links to your Social Media accounts: + +```yml +social: + GitHub: your-github-url + Twitter: your-twitter-url + Weibo: your-weibo-url + DouBan: your-douban-url + ZhiHu: your-zhihu-url +``` + +### Feed link. + +> Show a feed link. + +Set `rss` field in theme's `_config.yml`, as the following value: + +1. `rss: false` will totally disable feed link. +2. `rss: ` use sites' feed link. This is the default option. + + Follow the installation instruction in the plugin's README. After the configuration is done for this plugin, the feed link is ready too. + +3. `rss: http://your-feed-url` set specific feed link. + +### Up to 5 code highlight themes built-in. + +NexT uses [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) with 5 themes for you to choose from. +Next use `normal` by default. Have a preview about `normal` and `night`: + +![Tomorrow Normal Preview](http://iissnan.com/nexus/next/tomorrow-normal.png) +![Tomorrow Night Preview](http://iissnan.com/nexus/next/tomorrow-night.png) + +Head over to [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) for more details. + +## Configuration + +NexT comes with few configurations. + +```yml + +# Menu configuration. +menu: + home: / + archives: /archives + +# Favicon +favicon: /favicon.ico + +# Avatar (put the image into next/source/images/) +# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..) +avatar: /default_avatar.png + +# Code highlight theme +# available: normal | night | night eighties | night blue | night bright +highlight_theme: normal + +# Fancybox for image gallery +fancybox: true + +# Specify the date when the site was setup +since: 2013 + +``` + +## Browser support + +![browser-image] + +[![Browser Stack](.github/browserstack_logo.png)](https://www.browserstack.com/) +>**BrowserStack** is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators. + +## Contributing + +Contribution is welcome, feel free to open an issue and fork. Waiting for your pull request. + + +[browser-image]: https://img.shields.io/badge/browser-%20chrome%20%7C%20firefox%20%7C%20opera%20%7C%20safari%20%7C%20ie%20%3E%3D%209-lightgrey.svg +[browser-url]: https://www.browserstack.com + +[gitter-image]: https://badges.gitter.im/Join%20Chat.svg +[gitter-url]: https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge + +[travis-image]: https://travis-ci.org/iissnan/hexo-theme-next.svg?branch=master +[travis-url]: https://travis-ci.org/iissnan/hexo-theme-next?branch=master "Travis CI" + +[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%203.0-blue.svg +[hexo-url]: http://hexo.io + +[mnt-image]: https://img.shields.io/maintenance/yes/2017.svg +[rel-image]: https://img.shields.io/github/release/iissnan/hexo-theme-next.svg + +[lic-image]: https://img.shields.io/dub/l/vibe-d.svg + +[git-image]: https://img.shields.io/badge/install%20with%20-git-blue.svg +[curl-tar-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar-blue.svg +[curl-tar-wget-image]: https://img.shields.io/badge/install%20with%20-curl%20%7C%20tar%20%7C%20wget-blue.svg +[git-url]: http://lmgtfy.com/?q=linux+git+install +[curl-tar-url]: http://lmgtfy.com/?q=linux+curl+tar+install +[curl-tar-wget-url]: http://lmgtfy.com/?q=linux+curl+tar+wget+install + +[download-latest-url]: https://github.com/iissnan/hexo-theme-next/archive/master.zip +[releases-latest-url]: https://github.com/iissnan/hexo-theme-next/releases/latest +[releases-url]: https://github.com/iissnan/hexo-theme-next/releases +[tags-url]: https://github.com/iissnan/hexo-theme-next/tags +[commits-url]: https://github.com/iissnan/hexo-theme-next/commits/master diff --git a/themes/next_old/_config.yml b/themes/next_old/_config.yml new file mode 100644 index 0000000..fd35d69 --- /dev/null +++ b/themes/next_old/_config.yml @@ -0,0 +1,813 @@ +# =============================================================== +# ========================= ATTENTION! ========================== +# =============================================================== +# NexT repository is moving here: https://github.com/theme-next +# =============================================================== +# It's rebase to v6.0.0 and future maintenance will resume there +# =============================================================== + +# --------------------------------------------------------------- +# Theme Core Configuration Settings +# --------------------------------------------------------------- + +# Set to true, if you want to fully override the default configuration. +# Useful if you don't want to inherit the theme _config.yml configurations. +override: false + +# --------------------------------------------------------------- +# Site Information Settings +# --------------------------------------------------------------- + +# To get or check favicons visit: https://realfavicongenerator.net +# Put your favicons into `hexo-site/source/` (recommend) or `hexo-site/themes/next/source/images/` directory. + +# Default NexT favicons placed in `hexo-site/themes/next/source/images/` directory. +# And if you want to place your icons in `hexo-site/source/` root directory, you must remove `/images` prefix from pathes. + +# For example, you put your favicons into `hexo-site/source/images` directory. +# Then need to rename & redefine they on any other names, otherwise icons from Next will rewrite your custom icons in Hexo. +favicon: + small: /images/favicon-16x16-next.png + medium: /images/favicon-32x32-next.png + apple_touch_icon: /images/apple-touch-icon-next.png + safari_pinned_tab: /images/logo.svg + #android_manifest: /images/manifest.json + #ms_browserconfig: /images/browserconfig.xml + +# Set default keywords (Use a comma to separate) +keywords: "Hexo, NexT" + +# Set rss to false to disable feed link. +# Leave rss as empty to use site's feed link. +# Set rss to specific value if you have burned your feed already. +rss: + +footer: + # Specify the date when the site was setup. + # If not defined, current year will be used. + #since: 2015 + + # Icon between year and copyright info. + icon: user + + # If not defined, will be used `author` from Hexo main config. + copyright: + # ------------------------------------------------------------- + # Hexo link (Powered by Hexo). + powered: true + + theme: + # Theme & scheme info link (Theme - NexT.scheme). + enable: true + # Version info of NexT after scheme info (vX.X.X). + version: true + # ------------------------------------------------------------- + # Any custom text can be defined here. + #custom_text: Hosted by GitHub Pages + +# --------------------------------------------------------------- +# SEO Settings +# --------------------------------------------------------------- + +# Canonical, set a canonical link tag in your hexo, you could use it for your SEO of blog. +# See: https://support.google.com/webmasters/answer/139066 +# Tips: Before you open this tag, remember set up your URL in hexo _config.yml ( ex. url: http://yourdomain.com ) +canonical: true + +# Change headers hierarchy on site-subtitle (will be main site description) and on all post/pages titles for better SEO-optimization. +seo: false + +# If true, will add site-subtitle to index page, added in main hexo config. +# subtitle: Subtitle +index_with_subtitle: false + + +# --------------------------------------------------------------- +# Menu Settings +# --------------------------------------------------------------- + +# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash from link value (/archives -> archives). +# Usage: `Key: /link/ || icon` +# Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive. +# Value before `||` delimeter is the target link. +# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded. +menu: + home: / || home + #about: /about/ || user + #tags: /tags/ || tags + #categories: /categories/ || th + archives: /archives/ || archive + #schedule: /schedule/ || calendar + #sitemap: /sitemap.xml || sitemap + #commonweal: /404/ || heartbeat + +# Enable/Disable menu icons. +menu_icons: + enable: true + + +# --------------------------------------------------------------- +# Scheme Settings +# --------------------------------------------------------------- + +# Schemes +#scheme: Muse +#scheme: Mist +#scheme: Pisces +scheme: Gemini + + +# --------------------------------------------------------------- +# Sidebar Settings +# --------------------------------------------------------------- + +# Social Links. +# Usage: `Key: permalink || icon` +# Key is the link label showing to end users. +# Value before `||` delimeter is the target permalink. +# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded. +#social: + #GitHub: https://github.com/yourname || github + #E-Mail: mailto:yourname@gmail.com || envelope + #Google: https://plus.google.com/yourname || google + #Twitter: https://twitter.com/yourname || twitter + #FB Page: https://www.facebook.com/yourname || facebook + #VK Group: https://vk.com/yourname || vk + #StackOverflow: https://stackoverflow.com/yourname || stack-overflow + #YouTube: https://youtube.com/yourname || youtube + #Instagram: https://instagram.com/yourname || instagram + #Skype: skype:yourname?call|chat || skype + +social_icons: + enable: true + icons_only: false + transition: false + +# Blog rolls +links_icon: link +links_title: Links +links_layout: block +#links_layout: inline +#links: + #Title: http://example.com/ + +# Sidebar Avatar +# in theme directory(source/images): /images/avatar.gif +# in site directory(source/uploads): /uploads/avatar.gif +#avatar: /images/avatar.gif + +# Table Of Contents in the Sidebar +toc: + enable: true + + # Automatically add list number to toc. + number: true + + # If true, all words will placed on next lines if header width longer then sidebar width. + wrap: false + +# Creative Commons 4.0 International License. +# http://creativecommons.org/ +# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero +#creative_commons: by-nc-sa +#creative_commons: + +sidebar: + # Sidebar Position, available value: left | right (only for Pisces | Gemini). + position: left + #position: right + + # Sidebar Display, available value (only for Muse | Mist): + # - post expand on posts automatically. Default. + # - always expand for all pages automatically + # - hide expand only when click on the sidebar toggle icon. + # - remove Totally remove sidebar including sidebar toggle. + display: post + #display: always + #display: hide + #display: remove + + # Sidebar offset from top menubar in pixels (only for Pisces | Gemini). + offset: 12 + + # Back to top in sidebar (only for Pisces | Gemini). + b2t: false + + # Scroll percent label in b2t button. + scrollpercent: false + + # Enable sidebar on narrow view (only for Muse | Mist). + onmobile: false + + +# --------------------------------------------------------------- +# Post Settings +# --------------------------------------------------------------- + +# Automatically scroll page to section which is under mark. +scroll_to_more: true + +# Automatically saving scroll position on each post/page in cookies. +save_scroll: false + +# Automatically excerpt description in homepage as preamble text. +excerpt_description: true + +# Automatically Excerpt. Not recommend. +# Please use in the post to control excerpt accurately. +auto_excerpt: + enable: false + length: 150 + +# Post meta display settings +post_meta: + item_text: true + created_at: true + updated_at: false + categories: true + +# Post wordcount display settings +# Dependencies: https://github.com/willin/hexo-wordcount +post_wordcount: + item_text: true + wordcount: false + min2read: false + totalcount: false + separated_meta: true + +# Wechat Subscriber +#wechat_subscriber: + #enabled: true + #qcode: /path/to/your/wechatqcode ex. /uploads/wechat-qcode.jpg + #description: ex. subscribe to my blog by scanning my public wechat account + +# Reward +#reward_comment: Donate comment here +#wechatpay: /images/wechatpay.jpg +#alipay: /images/alipay.jpg +#bitcoin: /images/bitcoin.png + +# Declare license on posts +post_copyright: + enable: false + license: CC BY-NC-SA 3.0 + license_url: https://creativecommons.org/licenses/by-nc-sa/3.0/ + + +# --------------------------------------------------------------- +# Misc Theme Settings +# --------------------------------------------------------------- + +# Reduce padding / margin indents on devices with narrow width. +mobile_layout_economy: false + +# Android Chrome header panel color ($black-deep). +android_chrome_color: "#222" + +# Custom Logo. +# !!Only available for Default Scheme currently. +# Options: +# enabled: [true/false] - Replace with specific image +# image: url-of-image - Images's url +custom_logo: + enabled: false + image: + +# Code Highlight theme +# Available value: +# normal | night | night eighties | night blue | night bright +# https://github.com/chriskempson/tomorrow-theme +highlight_theme: normal + + +# --------------------------------------------------------------- +# Font Settings +# - Find fonts on Google Fonts (https://www.google.com/fonts) +# - All fonts set here will have the following styles: +# light, light italic, normal, normal italic, bold, bold italic +# - Be aware that setting too much fonts will cause site running slowly +# - Introduce in 5.0.1 +# --------------------------------------------------------------- +# CAUTION! Safari Version 10.1.2 bug: https://github.com/iissnan/hexo-theme-next/issues/1844 +# To avoid space between header and sidebar in Pisces / Gemini themes recommended to use Web Safe fonts for `global` (and `logo`): +# Arial | Tahoma | Helvetica | Times New Roman | Courier New | Verdana | Georgia | Palatino | Garamond | Comic Sans MS | Trebuchet MS +# --------------------------------------------------------------- +font: + enable: false + + # Uri of fonts host. E.g. //fonts.googleapis.com (Default). + host: + + # Font options: + # `external: true` will load this font family from `host` above. + # `family: Times New Roman`. Without any quotes. + # `size: xx`. Use `px` as unit. + + # Global font settings used on element. + global: + external: true + family: Lato + size: + + # Font settings for Headlines (h1, h2, h3, h4, h5, h6). + # Fallback to `global` font settings. + headings: + external: true + family: + size: + + # Font settings for posts. + # Fallback to `global` font settings. + posts: + external: true + family: + + # Font settings for Logo. + # Fallback to `global` font settings. + logo: + external: true + family: + size: + + # Font settings for and code blocks. + codes: + external: true + family: + size: + + +# --------------------------------------------------------------- +# Third Party Services Settings +# --------------------------------------------------------------- + +# MathJax Support +mathjax: + enable: false + per_page: false + cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML + +# Han Support docs: https://hanzi.pro/ +han: false + +# Swiftype Search API Key +#swiftype_key: + +# Baidu Analytics ID +#baidu_analytics: + +# Duoshuo ShortName +#duoshuo_shortname: + +# Disqus +disqus: + enable: false + shortname: + count: true + +# Hypercomments +#hypercomments_id: + +# changyan +changyan: + enable: false + appid: + appkey: + + +# Valine. +# You can get your appid and appkey from https://leancloud.cn +# more info please open https://valine.js.org +valine: + enable: false + appid: # your leancloud application appid + appkey: # your leancloud application appkey + notify: false # mail notifier , https://github.com/xCss/Valine/wiki + verify: false # Verification code + placeholder: Just go go # comment box placeholder + avatar: mm # gravatar style + guest_info: nick,mail,link # custom comment header + pageSize: 10 # pagination size + + +# Support for youyan comments system. +# You can get your uid from http://www.uyan.cc +#youyan_uid: your uid + +# Support for LiveRe comments system. +# You can get your uid from https://livere.com/insight/myCode (General web site) +#livere_uid: your uid + +# Gitment +# Introduction: https://imsun.net/posts/gitment-introduction/ +# You can get your Github ID from https://api.github.com/users/ +gitment: + enable: false + mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway + count: true # Show comments count in post meta area + lazy: false # Comments lazy loading with a button + cleanly: false # Hide 'Powered by ...' on footer, and more + language: # Force language, or auto switch by theme + github_user: # MUST HAVE, Your Github ID + github_repo: # MUST HAVE, The repo you use to store Gitment comments + client_id: # MUST HAVE, Github client id for the Gitment + client_secret: # EITHER this or proxy_gateway, Github access secret token for the Gitment + proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect + redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled + +# Baidu Share +# Available value: +# button | slide +# Warning: Baidu Share does not support https. +#baidushare: +## type: button + +# Share +# This plugin is more useful in China, make sure you known how to use it. +# And you can find the use guide at official webiste: http://www.jiathis.com/. +# Warning: JiaThis does not support https. +#jiathis: + ##uid: Get this uid from http://www.jiathis.com/ +#add_this_id: + +# Share +#duoshuo_share: true + +# NeedMoreShare2 +# This plugin is a pure javascript sharing lib which is useful in China. +# See: https://github.com/revir/need-more-share2 +# Also see: https://github.com/DzmVasileusky/needShareButton +# iconStyle: default | box +# boxForm: horizontal | vertical +# position: top / middle / bottom + Left / Center / Right +# networks: Weibo,Wechat,Douban,QQZone,Twitter,Linkedin,Mailto,Reddit, +# Delicious,StumbleUpon,Pinterest,Facebook,GooglePlus,Slashdot, +# Technorati,Posterous,Tumblr,GoogleBookmarks,Newsvine, +# Evernote,Friendfeed,Vkontakte,Odnoklassniki,Mailru +needmoreshare2: + enable: false + postbottom: + enable: false + options: + iconStyle: box + boxForm: horizontal + position: bottomCenter + networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook + float: + enable: false + options: + iconStyle: box + boxForm: horizontal + position: middleRight + networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook + +# Google Webmaster tools verification setting +# See: https://www.google.com/webmasters/ +#google_site_verification: + +# Google Analytics +#google_analytics: + +# Bing Webmaster tools verification setting +# See: https://www.bing.com/webmaster/ +#bing_site_verification: + +# Yandex Webmaster tools verification setting +# See: https://webmaster.yandex.ru/ +#yandex_site_verification: + +# CNZZ count +#cnzz_siteid: + +# Application Insights +# See https://azure.microsoft.com/en-us/services/application-insights/ +# application_insights: + +# Make duoshuo show UA +# user_id must NOT be null when admin_enable is true! +# you can visit http://dev.duoshuo.com get duoshuo user id. +duoshuo_info: + ua_enable: true + admin_enable: false + user_id: 0 + #admin_nickname: Author + +# Post widgets & FB/VK comments settings. +# --------------------------------------------------------------- +# Facebook SDK Support. +# https://github.com/iissnan/hexo-theme-next/pull/410 +facebook_sdk: + enable: false + app_id: # + fb_admin: # + like_button: #true + webmaster: #true + +# Facebook comments plugin +# This plugin depends on Facebook SDK. +# If facebook_sdk.enable is false, Facebook comments plugin is unavailable. +facebook_comments_plugin: + enable: false + num_of_posts: 10 # min posts num is 1 + width: 100% # default width is 550px + scheme: light # default scheme is light (light or dark) + +# VKontakte API Support. +# To get your AppID visit https://vk.com/editapp?act=create +vkontakte_api: + enable: false + app_id: # + like: true + comments: true + num_of_posts: 10 + +# Star rating support to each article. +# To get your ID visit https://widgetpack.com +rating: + enable: false + id: # + color: fc6423 +# --------------------------------------------------------------- + +# Show number of visitors to each article. +# You can visit https://leancloud.cn get AppID and AppKey. +leancloud_visitors: + enable: false + app_id: # + app_key: # + +# Another tool to show number of visitors to each article. +# visit https://console.firebase.google.com/u/0/ to get apiKey and projectId +# visit https://firebase.google.com/docs/firestore/ to get more information about firestore +firestore: + enable: false + collection: articles #required, a string collection name to access firestore database + apiKey: #required + projectId: #required + bluebird: false #enable this if you want to include bluebird 3.5.1(core version) Promise polyfill + +# Show PV/UV of the website/page with busuanzi. +# Get more information on http://ibruce.info/2015/04/04/busuanzi/ +busuanzi_count: + # count values only if the other configs are false + enable: false + # custom uv span for the whole site + site_uv: true + site_uv_header: + site_uv_footer: + # custom pv span for the whole site + site_pv: true + site_pv_header: + site_pv_footer: + # custom pv span for one page only + page_pv: true + page_pv_header: + page_pv_footer: + + +# Tencent analytics ID +# tencent_analytics: + +# Tencent MTA ID +# tencent_mta: + + +# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO +baidu_push: false + +# Google Calendar +# Share your recent schedule to others via calendar page +# +# API Documentation: +# https://developers.google.com/google-apps/calendar/v3/reference/events/list +calendar: + enable: false + calendar_id: + api_key: + orderBy: startTime + offsetMax: 24 + offsetMin: 4 + timeZone: + showDeleted: false + singleEvents: true + maxResults: 250 + +# Algolia Search +algolia_search: + enable: false + hits: + per_page: 10 + labels: + input_placeholder: Search for Posts + hits_empty: "We didn't find any results for the search: ${query}" + hits_stats: "${hits} results found in ${time} ms" + +# Local search +# Dependencies: https://github.com/flashlab/hexo-generator-search +local_search: + enable: false + # if auto, trigger search by changing input + # if manual, trigger search by pressing enter key or search button + trigger: auto + # show top n results per article, show all results by setting to -1 + top_n_per_article: 1 + + +# --------------------------------------------------------------- +# Tags Settings +# --------------------------------------------------------------- + +# External URL with BASE64 encrypt & decrypt. +# Usage: {% exturl text url "title" %} +# Alias: {% extlink text url "title" %} +exturl: false + +# Note tag (bs-callout). +note: + # Note tag style values: + # - simple bs-callout old alert style. Default. + # - modern bs-callout new (v2-v3) alert style. + # - flat flat callout style with background, like on Mozilla or StackOverflow. + # - disabled disable all CSS styles import of note tag. + style: simple + icons: false + border_radius: 3 + # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). + # Offset also applied to label tag variables. This option can work with disabled note tag. + light_bg_offset: 0 + +# Label tag. +label: true + +# Tabs tag. +tabs: + enable: true + transition: + tabs: false + labels: true + border_radius: 0 + + +#! --------------------------------------------------------------- +#! DO NOT EDIT THE FOLLOWING SETTINGS +#! UNLESS YOU KNOW WHAT YOU ARE DOING +#! --------------------------------------------------------------- + +# Use velocity to animate everything. +motion: + enable: true + async: false + transition: + # Transition variants: + # fadeIn | fadeOut | flipXIn | flipXOut | flipYIn | flipYOut | flipBounceXIn | flipBounceXOut | flipBounceYIn | flipBounceYOut + # swoopIn | swoopOut | whirlIn | whirlOut | shrinkIn | shrinkOut | expandIn | expandOut + # bounceIn | bounceOut | bounceUpIn | bounceUpOut | bounceDownIn | bounceDownOut | bounceLeftIn | bounceLeftOut | bounceRightIn | bounceRightOut + # slideUpIn | slideUpOut | slideDownIn | slideDownOut | slideLeftIn | slideLeftOut | slideRightIn | slideRightOut + # slideUpBigIn | slideUpBigOut | slideDownBigIn | slideDownBigOut | slideLeftBigIn | slideLeftBigOut | slideRightBigIn | slideRightBigOut + # perspectiveUpIn | perspectiveUpOut | perspectiveDownIn | perspectiveDownOut | perspectiveLeftIn | perspectiveLeftOut | perspectiveRightIn | perspectiveRightOut + post_block: fadeIn + post_header: slideDownIn + post_body: slideDownIn + coll_header: slideLeftIn + # Only for Pisces | Gemini. + sidebar: slideUpIn + +# Fancybox +fancybox: true + +# Progress bar in the top during page loading. +pace: false +# Themes list: +#pace-theme-big-counter +#pace-theme-bounce +#pace-theme-barber-shop +#pace-theme-center-atom +#pace-theme-center-circle +#pace-theme-center-radar +#pace-theme-center-simple +#pace-theme-corner-indicator +#pace-theme-fill-left +#pace-theme-flash +#pace-theme-loading-bar +#pace-theme-mac-osx +#pace-theme-minimal +# For example +# pace_theme: pace-theme-center-simple +pace_theme: pace-theme-minimal + +# Canvas-nest +canvas_nest: false + +# three_waves +three_waves: false + +# canvas_lines +canvas_lines: false + +# canvas_sphere +canvas_sphere: false + +# Only fit scheme Pisces +# Canvas-ribbon +# size: The width of the ribbon. +# alpha: The transparency of the ribbon. +# zIndex: The display level of the ribbon. +canvas_ribbon: + enable: false + size: 300 + alpha: 0.6 + zIndex: -1 + +# Script Vendors. +# Set a CDN address for the vendor you want to customize. +# For example +# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js +# Be aware that you should use the same version as internal ones to avoid potential problems. +# Please use the https protocol of CDN files when you enable https on your site. +vendors: + # Internal path prefix. Please do not edit it. + _internal: lib + + # Internal version: 2.1.3 + jquery: + + # Internal version: 2.1.5 + # See: http://fancyapps.com/fancybox/ + fancybox: + fancybox_css: + + # Internal version: 1.0.6 + # See: https://github.com/ftlabs/fastclick + fastclick: + + # Internal version: 1.9.7 + # See: https://github.com/tuupola/jquery_lazyload + lazyload: + + # Internal version: 1.2.1 + # See: http://VelocityJS.org + velocity: + + # Internal version: 1.2.1 + # See: http://VelocityJS.org + velocity_ui: + + # Internal version: 0.7.9 + # See: https://faisalman.github.io/ua-parser-js/ + ua_parser: + + # Internal version: 4.6.2 + # See: http://fontawesome.io/ + fontawesome: + + # Internal version: 1 + # https://www.algolia.com + algolia_instant_js: + algolia_instant_css: + + # Internal version: 1.0.2 + # See: https://github.com/HubSpot/pace + # Or use direct links below: + # pace: //cdn.bootcss.com/pace/1.0.2/pace.min.js + # pace_css: //cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css + pace: + pace_css: + + # Internal version: 1.0.0 + # https://github.com/hustcc/canvas-nest.js + canvas_nest: + + # three + three: + + # three_waves + # https://github.com/jjandxa/three_waves + three_waves: + + # three_waves + # https://github.com/jjandxa/canvas_lines + canvas_lines: + + # three_waves + # https://github.com/jjandxa/canvas_sphere + canvas_sphere: + + # Internal version: 1.0.0 + # https://github.com/zproo/canvas-ribbon + canvas_ribbon: + + # Internal version: 3.3.0 + # https://github.com/ethantw/Han + han: + + # needMoreShare2 + # https://github.com/revir/need-more-share2 + needMoreShare2: + + +# Assets +css: css +js: js +images: images + +# Theme version +version: 5.1.4 diff --git a/themes/next_old/bower.json b/themes/next_old/bower.json new file mode 100644 index 0000000..d884845 --- /dev/null +++ b/themes/next_old/bower.json @@ -0,0 +1,37 @@ +{ + "name": "isn-next", + "version": "5.1.4", + "homepage": "https://github.com/iissnan/hexo-theme-next", + "authors": [ + "iissnan " + ], + "description": "Elegant theme for Hexo", + "repository": "https://github.com/iissnan/hexo-theme-next", + "keywords": [ + "hexo", + "notes", + "theme", + "iissnan", + "NexT" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "source/lib", + "test", + "tests", + "screenshots" + ], + "dependencies": { + "fancybox": "~2.1.5", + "velocity": "~1.2.1", + "jquery": "http://code.jquery.com/jquery-2.1.3.min.js", + "fastclick": "~1.0.6", + "font-awesome": "fontawesome#*", + "jquery_lazyload": "jquery.lazyload#~1.9.7", + "ua-parser-js": "~0.7.9", + "Han": "^3.3.0" + } +} diff --git a/themes/next_old/gulpfile.coffee b/themes/next_old/gulpfile.coffee new file mode 100644 index 0000000..c7d706b --- /dev/null +++ b/themes/next_old/gulpfile.coffee @@ -0,0 +1,54 @@ +fs = require('fs') +path = require('path') +gulp = require('gulp') +jshint = require('gulp-jshint') +stylish = require('jshint-stylish') +shell = require('gulp-shell') +yaml = require('js-yaml') + +gulp.task 'lint', -> + return gulp.src([ + './source/js/src/utils.js', + './source/js/src/motion.js', + './source/js/src/hook-duoshuo.js', + './source/js/src/algolia-search.js', + './source/js/src/bootstrap.js', + './source/js/src/post-details.js', + './source/js/src/schemes/pisces.js' + ]).pipe jshint() + .pipe jshint.reporter(stylish) + +gulp.task 'lint:stylus', shell.task [ + '"./node_modules/.bin/stylint" ./source/css/' +] + +gulp.task 'validate:config', (cb) -> + themeConfig = fs.readFileSync path.join(__dirname, '_config.yml') + + try + yaml.safeLoad(themeConfig) + cb() + catch error + cb new Error(error) + +gulp.task 'validate:languages', (cb) -> + languagesPath = path.join __dirname, 'languages' + languages = fs.readdirSync languagesPath + errors = [] + + for lang in languages + languagePath = path.join languagesPath, lang + try + yaml.safeLoad fs.readFileSync(languagePath), { + filename: path.relative(__dirname, languagePath) + } + catch error + errors.push error + + if errors.length == 0 + cb() + else + cb(errors) + + +gulp.task 'default', ['lint', 'validate:config', 'validate:languages'] diff --git a/themes/next_old/languages/de.yml b/themes/next_old/languages/de.yml new file mode 100644 index 0000000..8c74a69 --- /dev/null +++ b/themes/next_old/languages/de.yml @@ -0,0 +1,90 @@ +title: + archive: Archiv + category: Kategorie + tag: Tag + +author: Author + +menu: + home: Startseite + archives: Archiv + categories: Kategorien + tags: Tags + about: Über + feed: RSS + search: Suche + +sidebar: + overview: Übersicht + toc: Inhaltsverzeichnis + +post: + created: Post created + sticky: Sticky + posted: Veröffentlicht am + modified: Updated at + in: in + read_more: Weiterlesen + untitled: Unbenannt + toc_empty: Dieser Artikel hat kein Inhaltsverzeichnis + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Gesamt + tags: tags + +footer: + powered: "Erstellt mit %s" + theme: Theme + +counter: + tag_cloud: + zero: Keine Tags + one: Insgesamt ein Tag + other: "Insgesamt %d Tags" + + categories: + zero: Keine Kategorien + one: Insgesamt eine Kategorie + other: "Insgesamt %d Kategorien" + + archive_posts: + zero: Keine Artikel vorhanden. + one: Ein Artikel. + other: "Insgesamt %d Artikel." + +state: + posts: Artikel + pages: Seiten + tags: Tags + categories: Kategorien + +cheers: + um: Öhm.. + ok: OK + nice: Schön + good: Gut + great: Wunderbar + excellent: Exzellent + +keep_on: Bleib dran. + +symbol: + comma: '. ' + period: ', ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/default.yml b/themes/next_old/languages/default.yml new file mode 100644 index 0000000..b1fec61 --- /dev/null +++ b/themes/next_old/languages/default.yml @@ -0,0 +1,97 @@ +title: + archive: Archive + category: Category + tag: Tag + schedule: Schedule + +author: Author + +menu: + home: Home + archives: Archives + categories: Categories + tags: Tags + about: About + search: Search + schedule: Schedule + sitemap: Sitemap + commonweal: Commonweal 404 + +sidebar: + overview: Overview + toc: Table of Contents + +post: + created: Post created + modified: Post modified + sticky: Sticky + posted: Posted on + in: In + more: more + read_more: Read more + untitled: Untitled + toc_empty: This post does not have a Table of Contents + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Totally + tags: tags + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: No tags + one: 1 tag in total + other: "%d tags in total" + + categories: + zero: No categories + one: 1 category in total + other: "%d categories in total" + + archive_posts: + zero: No posts. + one: 1 post. + other: "%d posts in total." + +state: + posts: posts + pages: pages + tags: tags + categories: categories + +search: + placeholder: Searching... + +cheers: + um: Um.. + ok: OK + nice: Nice + good: Good + great: Great + excellent: Excellent + +keep_on: Keep on posting. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/en.yml b/themes/next_old/languages/en.yml new file mode 100644 index 0000000..37fe1db --- /dev/null +++ b/themes/next_old/languages/en.yml @@ -0,0 +1,99 @@ +title: + archive: Archive + category: Category + tag: Tag + schedule: Schedule + +author: Author + +menu: + home: Home + archives: Archives + categories: Categories + tags: Tags + about: About + search: Search + schedule: Schedule + sitemap: Sitemap + commonweal: Commonweal 404 + +sidebar: + overview: Overview + toc: Table of Contents + +post: + created: Post created + modified: Post modified + sticky: Sticky + posted: Posted on + in: In + more: more + read_more: Read more + untitled: Untitled + toc_empty: This post does not have a Table of Contents + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Totally + tags: tags + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: No tags + one: 1 tag in total + other: "%d tags in total" + + categories: + zero: No categories + one: 1 category in total + other: "%d categories in total" + + archive_posts: + zero: No posts. + one: 1 post. + other: "%d posts in total." + +state: + posts: posts + pages: pages + tags: tags + categories: categories + +search: + placeholder: Searching... + +cheers: + um: Um.. + ok: OK + nice: Nice + good: Good + great: Great + excellent: Excellent + +keep_on: Keep on posting. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin + +gitmentbutton: Show comments from Gitment diff --git a/themes/next_old/languages/fr-FR.yml b/themes/next_old/languages/fr-FR.yml new file mode 100644 index 0000000..6a3d2ae --- /dev/null +++ b/themes/next_old/languages/fr-FR.yml @@ -0,0 +1,88 @@ +title: + archive: Archive + category: Catégorie + tag: Tag + +author: Author + +menu: + home: Accueil + archives: Archives + categories: Categories + tags: Tags + about: A propos + search: recherche + +sidebar: + overview: Ensemble + toc: Table Des Matières + +post: + sticky: Sticky + posted: Posté le + modified: Updated at + in: In + read_more: Lire la suite + untitled: Non titré + toc_empty: This post does not have a Table of Contents + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Total + tags: tags + +footer: + powered: "Powered by %s" + theme: Thème + +counter: + tag_cloud: + zero: Aucun tags + one: 1 tag au total + other: "%d tags au total" + + categories: + zero: Aucun categories + one: 1 category au total + other: "%d categories au total" + + archive_posts: + zero: Aucun article. + one: 1 article. + other: "%d articles au total." + +state: + posts: articles + pages: pages + tags: tags + categories: categories + +cheers: + um: Um.. + ok: OK + nice: Jolie + good: Bien + great: Super + excellent: Excellent + +keep_on: Et ca ne fait que commencer. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/id.yml b/themes/next_old/languages/id.yml new file mode 100644 index 0000000..0e81fe4 --- /dev/null +++ b/themes/next_old/languages/id.yml @@ -0,0 +1,88 @@ +title: + archive: Arsip + category: Kategori + tag: Tag + +author: Penulis + +menu: + home: Beranda + archives: Arsip + categories: Kategori + tags: Tags + about: Tentang + search: Pencarian + +sidebar: + overview: Ikhtisar + toc: Daftar Isi + +post: + sticky: Sticky + posted: Diposting di + modified: Updated at + in: Di + read_more: Baca lebih + untitled: Tidak ada title + toc_empty: Posting ini tidak memiliki Daftar Isi + visitors: Pengunjung + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Total + tags: tags + +footer: + powered: "Powered by %s" + theme: Tema + +counter: + tag_cloud: + zero: Tidak ada tags + one: 1 total tag + other: "%d total tags" + + categories: + zero: Tidak ada kategori + one: 1 total categori + other: "%d total kategori" + + archive_posts: + zero: Tidak ada posting. + one: 1 posting. + other: "%d total posting." + +state: + posts: posting + pages: halaman + tags: tags + categories: kategori + +cheers: + um: Um.. + ok: OK + nice: Bagus + good: Bagus + great: Besar + excellent: Baik + +keep_on: Terus Posting. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/it.yml b/themes/next_old/languages/it.yml new file mode 100644 index 0000000..39aa40e --- /dev/null +++ b/themes/next_old/languages/it.yml @@ -0,0 +1,97 @@ +title: + archive: Archivio + category: Categoria + tag: Tag + schedule: Programma + +author: Autore + +menu: + home: Home + archives: Archivi + categories: Categorie + tags: Tags + about: Informazioni su + search: Cerca + schedule: Programma + sitemap: Sitemap + commonweal: Commonweal 404 + +sidebar: + overview: Panoramica + toc: Indice + +post: + created: Post creato + modified: Post modificato + sticky: Sticky + posted: Scritto il + in: In + more: espandi + read_more: Leggi di più + untitled: Senza titolo + toc_empty: Questo post non ha un indice + visitors: Visitatori + wordcount: Numero di parole nell'articolo + min2read: Tempo di lettura + totalcount: Numero totale di parole + copyright: + author: Autore + link: Link + license_title: Copyright + license_content: 'Tutti gli articoli in questo sito sono sotto licenza + %s salvo disposizione contraria.' + +page: + totally: Totale + tags: tags + +footer: + powered: "Powered by %s" + theme: Tema + +counter: + tag_cloud: + zero: Nessun tag + one: 1 tag in totale + other: "%d tags in totale." + + categories: + zero: Nessuna categoria + one: 1 categoria in totale + other: "%d categorie in totale." + + archive_posts: + zero: Nessun post. + one: 1 post. + other: "%d posts in totale." + +state: + posts: posts + pages: pagine + tags: tags + categories: categorie + +search: + placeholder: Cerca... + +cheers: + um: Mh.. + ok: OK + nice: Bello + good: Buono + great: Ottimo + excellent: Eccellente + +keep_on: Continua così. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Dona + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/ja.yml b/themes/next_old/languages/ja.yml new file mode 100644 index 0000000..990e5f2 --- /dev/null +++ b/themes/next_old/languages/ja.yml @@ -0,0 +1,88 @@ +title: + archive: アーカイブ + category: カテゴリ + tag: タグ + +author: Author + +menu: + home: ホーム + archives: アーカイブ + categories: カテゴリ + tags: タグ + about: About + search: 検索 + +sidebar: + overview: 概要 + toc: 見出し + +post: + sticky: 固定 + posted: 投稿日 + modified: Updated at + in: In + read_more: 続きを読む + untitled: 無題 + toc_empty: 見出しがありません + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: 全ページ + tags: タグ + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: タグなし + one: "全 1 タグ" + other: "全 %d タグ" + + categories: + zero: カテゴリなし + one: "全 1 カテゴリ" + other: "全 %d カテゴリ" + + archive_posts: + zero: ポストなし + one: "全 1 ポスト" + other: "全 %d ポスト" + +state: + posts: ポスト + pages: ページ + tags: タグ + categories: カテゴリ + +cheers: + um: うーん + ok: OK + nice: まあまあ + good: いいね + great: すごい + excellent: 最高 + +keep_on: もっと書こう! + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/ko.yml b/themes/next_old/languages/ko.yml new file mode 100644 index 0000000..df4e736 --- /dev/null +++ b/themes/next_old/languages/ko.yml @@ -0,0 +1,88 @@ +title: + archive: 아카이브 + category: 카테고리 + tag: 태그 + +author: 작성자 + +menu: + home: 홈 + archives: 아카이브 + categories: 카테고리 + tags: 태그 + about: About + search: 검색 + +sidebar: + overview: 흝어보기 + toc: 목차 + +post: + sticky: 고정 + posted: 작성일 + modified: Updated at + in: In + read_more: 더 읽어보기 + untitled: 제목 없음 + toc_empty: 목차 없음 + visitors: 방문객 + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: 모두 + tags: 태그 + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: 태그 없음 + one: 1개의 태그 + other: "총 %d개의 태그" + + categories: + zero: 카테고리 없음 + one: 1개의 카테고리 + other: "총 %d개의 카테고리" + + archive_posts: + zero: 포스트 없음 + one: 1개의 포스트 + other: "총 %d개의 포스트" + +state: + posts: 포스트 + pages: 페이지 + tags: 태그 + categories: 카테고리 + +cheers: + um: 음.. + ok: OK + nice: 잘했어요 + good: 좋아요 + great: 훌륭해요 + excellent: 완벽해요 + +keep_on: 포스트를 마저 작성하세요 + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/nl-NL.yml b/themes/next_old/languages/nl-NL.yml new file mode 100644 index 0000000..4acd836 --- /dev/null +++ b/themes/next_old/languages/nl-NL.yml @@ -0,0 +1,97 @@ +title: + archive: Archief + category: Categorie + tag: Label + schedule: Rooster + +author: Auteur + +menu: + home: Home + archives: Archieven + categories: Categorieën + tags: Labels + about: Over + search: Zoeken + schedule: Rooster + sitemap: Sitemap + commonweal: Gezond verstand 404 + +sidebar: + overview: Overzicht + toc: Inhoudsopgave + +post: + created: Post aangemaakt + modified: Post aangepast + sticky: Sticky + posted: Geplaatst op + in: In + more: meer + read_more: Lees meer + untitled: Naamloos + toc_empty: Deze post heeft geen inhoudsopgave + visitors: Bezoekers + wordcount: Aantal woorden in artikel + min2read: Leestijd + totalcount: Aantal woorden in site + copyright: + author: Post auteur + link: Post link + license_title: Copyright melding + license_content: 'Alle artikelen op deze blog zijn gelicenseerd onder + %s, mits niet anders aangegeven.' + +page: + totally: Totaal + tags: labels + +footer: + powered: "Mede mogelijk gemaakt door %s" + theme: Thema + +counter: + tag_cloud: + zero: Geen labels + one: 1 label in totaal + other: "%d labels in totaal" + + categories: + zero: Geen categorieën + one: 1 categorie in totaal + other: "%d categorieën in totaal" + + archive_posts: + zero: Geen posts. + one: 1 post. + other: "%d posts in totaal." + +state: + posts: posts + pages: pagina's + tags: labels + categories: categorieën + +search: + placeholder: Zoeken... + +cheers: + um: Um.. + ok: Oké + nice: Leuk + good: Goed + great: Geweldig + excellent: Uitstekend + +keep_on: Blijf posten. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Doneer + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/pt-BR.yml b/themes/next_old/languages/pt-BR.yml new file mode 100644 index 0000000..64f2da0 --- /dev/null +++ b/themes/next_old/languages/pt-BR.yml @@ -0,0 +1,88 @@ +title: + archive: Arquivo + category: Categoria + tag: Tag + +author: Autor + +menu: + home: Home + archives: Arquivos + categories: Categorias + tags: Tags + about: Sobre + search: Pesquisar + +sidebar: + overview: Visão geral + toc: Tabela de conteúdo + +post: + sticky: Sticky + posted: Postado em + modified: Updated at + in: Em + read_more: Leia mais + untitled: Sem título + toc_empty: Este post não possui tabela de conteúdo + visitors: Visitantes + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Totalmente + tags: tags + +footer: + powered: "Feito com %s" + theme: Tema + +counter: + tag_cloud: + zero: Sem tags + one: 1 tag no total de + other: "%d tags no total de" + + categories: + zero: Sem categoria + one: 1 categoria no total de + other: "%d categoria no total de" + + archive_posts: + zero: Sem posts. + one: 1 post. + other: "%d posts no total." + +state: + posts: Posts + pages: Páginas + tags: Tags + categories: Categorias + +cheers: + um: Uhmmmm... + ok: OK + nice: Bom + good: Muito Bom + great: Ótimo + excellent: Excelente + +keep_on: Continuar no post. + +symbol: + comma: '. ' + period: ', ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/pt.yml b/themes/next_old/languages/pt.yml new file mode 100644 index 0000000..9c83699 --- /dev/null +++ b/themes/next_old/languages/pt.yml @@ -0,0 +1,88 @@ +title: + archive: Arquivo + category: Categoria + tag: Tag + +author: Author + +menu: + home: Home + archives: Arquivos + categories: Categorias + tags: Tags + about: Sobre + search: Pesquisa + +sidebar: + overview: Visão Geral + toc: Tabela de Conteúdo + +post: + sticky: Sticky + posted: Postado em + modified: Updated at + in: Em + read_more: Ler mais + untitled: Sem título + toc_empty: Esta publicação não possui uma tabela de conteúdo + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Totalmente + tags: tags + +footer: + powered: "Desenvolvido com amor com %s" + theme: Tema + +counter: + tag_cloud: + zero: Sem tags + one: 1 tag no total + other: "%d tags no total" + + categories: + zero: Sem categorias + one: 1 categoria no total + other: "%d categorias no total" + + archive_posts: + zero: Sem publicações. + one: 1 post. + other: "%d publicações no total." + +state: + posts: publicações + pages: páginas + tags: tags + categories: categorias + +cheers: + um: Um.. + ok: OK + nice: Legal + good: Bom + great: Grandioso + excellent: Excelente + +keep_on: Mantenha-se publicando! + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Donate + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/ru.yml b/themes/next_old/languages/ru.yml new file mode 100644 index 0000000..55b6df1 --- /dev/null +++ b/themes/next_old/languages/ru.yml @@ -0,0 +1,105 @@ +title: + archive: Архив + category: Категория + tag: Тэг + schedule: Календарь + +author: Автор + +menu: + home: Главная + archives: Архив + categories: Категории + tags: Тэги + about: О сайте + search: Поиск + schedule: Календарь + sitemap: Карта сайта + +sidebar: + overview: Обзор + toc: Содержание + +post: + created: Дата создания записи + modified: Дата обновления записи + sticky: Ссылка + posted: Размещено + in: в категории + more: далее + read_more: Читать полностью + untitled: Без имени + toc_empty: Эта запись без оглавления + visitors: Просмотров + wordcount: Кол-во слов в статье + min2read: Время чтения в минутах + totalcount: Общее кол-во слов в записях + copyright: + author: Автор записи + link: Ссылка на запись + license_title: Информация об авторских правах + license_content: 'Все записи на этом сайте защищены лицензией + %s если не указано дополнительно.' + +page: + totally: Всего + tags: тэги + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: Нет тэгов. + one: 1 тэг. + two: "%d тэга всего." + three: "%d тэга всего." + four: "%d тэга всего." + other: "%d тэгов всего." + + categories: + zero: Нет категорий. + one: 1 категория. + two: "%d категории всего." + three: "%d категории всего." + four: "%d категории всего." + other: "%d категорий всего." + + archive_posts: + zero: Нет записей. + one: 1 запись. + two: "%d записи всего." + three: "%d записи всего." + four: "%d записи всего." + other: "%d записей всего." + +state: + posts: Архив + pages: Страницы + tags: Тэги + categories: Категории + +search: + placeholder: Поиск... + +cheers: + um: Эм.. + ok: OK + nice: Неплохо + good: Хорошо + great: Замечательно + excellent: Великолепно + +keep_on: Продолжаю писать. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Донат + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin diff --git a/themes/next_old/languages/vi.yml b/themes/next_old/languages/vi.yml new file mode 100644 index 0000000..1d46c26 --- /dev/null +++ b/themes/next_old/languages/vi.yml @@ -0,0 +1,99 @@ +title: + archive: Lưu Trữ + category: Phân Loại + tag: Thẻ + schedule: Danh Mục + +author: Tác giả + +menu: + home: Trang Chủ + archives: Lưu Trữ + categories: Đầu Mục + tags: Thẻ + about: Giới Thiệu + search: Tìm Kiếm + schedule: Danh Mục + sitemap: Bản đồ trang + commonweal: Commonweal 404 + +sidebar: + overview: Tổng Quan + toc: Mục Lục + +post: + created: Được tạo + modified: Được thay đổi + sticky: Đính + posted: Tạo lúc + in: Trong + more: thêm + read_more: Đọc tiếp + untitled: Không có tiêu đề + toc_empty: Bài viết này không có mục lục + visitors: Người xem + wordcount: Số từ trong bài viết + min2read: Thời gian đọc + totalcount: Số từ trong trang + copyright: + author: Người viết + link: Liên kết bài viết + license_title: Chú ý bản quyền + license_content: 'Tất cả bài viết trong blog này được đăng ký bởi + %s trừ khi có thông báo bổ sung.' + +page: + totally: Toàn bộ + tags: thẻ + +footer: + powered: "Cung cấp bởi %s" + theme: Giao Diện + +counter: + tag_cloud: + zero: Không có thẻ nào + one: có 1 thẻ tất cả + other: "có %d thẻ tất cả" + + categories: + zero: Không có trong mục nào + one: có 1 mục tất cả + other: "có %d mục tất cả" + + archive_posts: + zero: Không có bài viết. + one: 1 bài viết. + other: "tổng số %d bài viết." + +state: + posts: bài viết + pages: trang + tags: thẻ + categories: mục + +search: + placeholder: Đang tìm... + +cheers: + um: Um.. + ok: Đồng Ý + nice: Hay + good: Tốt + great: Tuyệt vời + excellent: Tuyệt cú mèo + +keep_on: Giữ tiến độ nha. + +symbol: + comma: ', ' + period: '. ' + colon: ':' + +reward: + donate: Tài trợ + wechatpay: WeChat Pay + alipay: Alipay + bitcoin: Bitcoin + +gitmentbutton: Hiển thị bình luận từ Gitment diff --git a/themes/next_old/languages/zh-Hans.yml b/themes/next_old/languages/zh-Hans.yml new file mode 100644 index 0000000..1159864 --- /dev/null +++ b/themes/next_old/languages/zh-Hans.yml @@ -0,0 +1,98 @@ +title: + archive: 归档 + category: 分类 + tag: 标签 + schedule: 日程表 + +author: 博主 + +menu: + home: 首页 + archives: 归档 + categories: 分类 + tags: 标签 + about: 关于 + search: 搜索 + schedule: 日程表 + sitemap: 站点地图 + commonweal: 公益404 + +sidebar: + overview: 站点概览 + toc: 文章目录 + +post: + created: 创建于 + modified: 更新于 + sticky: 置顶 + posted: 发表于 + in: 分类于 + read_more: 阅读全文 + untitled: 未命名 + toc_empty: 此文章未包含目录 + visitors: 阅读次数 + wordcount: 字数统计 + min2read: 阅读时长 + totalcount: Site words total count + copyright: + author: 本文作者 + link: 本文链接 + license_title: 版权声明 + license_content: '本博客所有文章除特别声明外,均采用 + %s 许可协议。转载请注明出处!' + +page: + totally: 共有 + tags: 标签 + +footer: + powered: "由 %s 强力驱动" + theme: 主题 + +counter: + tag_cloud: + zero: 暂无标签 + one: 目前共计 1 个标签 + other: "目前共计 %d 个标签" + + categories: + zero: 暂无分类 + one: 目前共计 1 个分类 + other: "目前共计 %d 个分类" + + archive_posts: + zero: 暂无日志。 + one: 目前共计 1 篇日志。 + other: "目前共计 %d 篇日志。" + +state: + posts: 日志 + pages: 页面 + tags: 标签 + categories: 分类 + +search: + placeholder: 搜索... + +cheers: + um: 嗯.. + ok: OK + nice: 好 + good: 很好 + great: 非常好 + excellent: 太棒了 + +keep_on: 继续努力。 + +symbol: + comma: ', ' + period: '。 ' + colon: ':' + +reward: + donate: 打赏 + wechatpay: 微信支付 + alipay: 支付宝 + bitcoin: 比特币 + +gitmentbutton: 显示 Gitment 评论 diff --git a/themes/next_old/languages/zh-hk.yml b/themes/next_old/languages/zh-hk.yml new file mode 100644 index 0000000..dddc1f3 --- /dev/null +++ b/themes/next_old/languages/zh-hk.yml @@ -0,0 +1,98 @@ +title: + archive: 歸檔 + category: 分類 + tag: 標籤 + schedule: 日程表 + +author: 博主 + +menu: + home: 首頁 + archives: 歸檔 + categories: 分類 + tags: 標籤 + about: 關於 + search: 檢索 + schedule: 日程表 + sitemap: 站點地圖 + commonweal: 公益404 + +sidebar: + overview: 本站概覽 + toc: 文章目錄 + +post: + created: 創建於 + modified: 更新於 + sticky: 置頂 + posted: 發表於 + in: 分類於 + read_more: 閱讀全文 + untitled: 未命名 + toc_empty: 此文章未包含目錄 + visitors: 閱讀次數 + wordcount: 字數統計 + min2read: 閱讀時長 + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: 共有 + tags: 標籤 + +footer: + powered: "由 %s 強力驅動" + theme: 主題 + +counter: + tag_cloud: + zero: 暫無標籤 + one: 目前共有 1 個標籤 + other: "目前共有 %d 個標籤" + + categories: + zero: 暫無分類 + one: 目前共有 1 個分類 + other: "目前共有 %d 個分類" + + archive_posts: + zero: 暫無文章。 + one: 目前共有 1 篇文章。 + other: "目前共有 %d 篇文章。" + +state: + posts: 文章 + pages: 頁面 + tags: 標籤 + categories: 分類 + +search: + placeholder: 搜索... + +cheers: + um: 嗯.. + ok: OK + nice: 好 + good: 很好 + great: 非常好 + excellent: 激爆好 + +keep_on: 繼續努力。 + +symbol: + comma: ', ' + period: '。 ' + colon: ':' + +reward: + donate: 打賞 + wechatpay: 微信支付 + alipay: 支付寶 + bitcoin: 比特幣 + +gitmentbutton: 顯示 Gitment 評論 diff --git a/themes/next_old/languages/zh-tw.yml b/themes/next_old/languages/zh-tw.yml new file mode 100644 index 0000000..1b87af5 --- /dev/null +++ b/themes/next_old/languages/zh-tw.yml @@ -0,0 +1,98 @@ +title: + archive: 歸檔 + category: 分類 + tag: 標籤 + schedule: 日程表 + +author: 博主 + +menu: + home: 首頁 + archives: 歸檔 + categories: 分類 + tags: 標籤 + about: 關於 + search: 檢索 + schedule: 日程表 + sitemap: 站點地圖 + commonweal: 公益404 + +sidebar: + overview: 本站概覽 + toc: 文章目錄 + +post: + created: 創建於 + modified: 更新於 + sticky: 置頂 + posted: 發表於 + in: 分類於 + read_more: 閱讀全文 + untitled: 未命名 + toc_empty: 此文章未包含目錄 + visitors: 閱讀次數 + wordcount: 字數統計 + min2read: 閱讀時長 + totalcount: Site words total count + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: 共有 + tags: 標籤 + +footer: + powered: "由 %s 強力驅動" + theme: 主題 + +counter: + tag_cloud: + zero: 暫無標籤 + one: 目前共計 1 個標籤 + other: "目前共計 %d 個標籤" + + categories: + zero: 暫無分類 + one: 目前共計 1 個分類 + other: "目前共計 %d 個分類" + + archive_posts: + zero: 暫無文章。 + one: 目前共計 1 篇文章。 + other: "目前共計 %d 篇文章。" + +state: + posts: 文章 + pages: 頁面 + tags: 標籤 + categories: 分類 + +search: + placeholder: 搜索... + +cheers: + um: 嗯.. + ok: OK + nice: 好 + good: 很好 + great: 非常好 + excellent: 非常屌 + +keep_on: 繼續努力。 + +symbol: + comma: ', ' + period: '。 ' + colon: ':' + +reward: + donate: 打賞 + wechatpay: 微信支付 + alipay: 支付寶 + bitcoin: 比特幣 + +gitmentbutton: 顯示 Gitment 評論 diff --git a/themes/next_old/layout/_custom/header.swig b/themes/next_old/layout/_custom/header.swig new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/themes/next_old/layout/_custom/header.swig @@ -0,0 +1 @@ + diff --git a/themes/next_old/layout/_custom/sidebar.swig b/themes/next_old/layout/_custom/sidebar.swig new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/themes/next_old/layout/_custom/sidebar.swig @@ -0,0 +1 @@ + diff --git a/themes/next_old/layout/_layout.swig b/themes/next_old/layout/_layout.swig new file mode 100644 index 0000000..9b52671 --- /dev/null +++ b/themes/next_old/layout/_layout.swig @@ -0,0 +1,92 @@ + + +{% set html_class = 'theme-next ' + theme.scheme %} +{% if theme.motion.enable %} + {% set html_class = html_class + ' use-motion' %} +{% endif %} + + + + {% include '_partials/head.swig' %} + {% block title %}{% endblock %} + {% include '_third-party/analytics/index.swig' %} + + + + + {% set container_class = "container " %} + {% if theme.sidebar.position %} + {% set container_class = container_class + 'sidebar-position-' + theme.sidebar.position %} + {% endif %} + +
      +
      + + + +
      +
      +
      +
      + {% block content %}{% endblock %} +
      + {% include '_third-party/duoshuo-hot-articles.swig' %} + {% include '_partials/comments.swig' %} +
      + {% if theme.sidebar.display !== 'remove' %} + {% block sidebar %}{% endblock %} + {% endif %} +
      +
      + +
      + +
      + + {% if not theme.sidebar.b2t %} +
      + + {% if theme.sidebar.scrollpercent %} + 0% + {% endif %} +
      + {% endif %} + + {% if theme.needmoreshare2.enable and theme.needmoreshare2.float.enable %} +
      + + + +
      + {% endif %} + +
      + + {% include '_scripts/vendors.swig' %} + {% include '_scripts/commons.swig' %} + + {% set scheme_script = '_scripts/schemes/' + theme.scheme | lower + '.swig' %} + {% include scheme_script %} + + {% block script_extra %}{% endblock %} + + {% include '_scripts/boostrap.swig' %} + + {% include '_third-party/comments/index.swig' %} + {% include '_third-party/search/index.swig' %} + {% include '_third-party/analytics/lean-analytics.swig' %} + {% include '_third-party/analytics/firestore.swig' %} + {% include '_third-party/seo/baidu-push.swig' %} + {% include '_third-party/needsharebutton.swig' %} + {% include '_third-party/rating.swig' %} + {% include '_third-party/mathjax.swig' %} + {% include '_third-party/scroll-cookie.swig' %} + {% include '_third-party/exturl.swig' %} + + diff --git a/themes/next_old/layout/_macro/post-collapse.swig b/themes/next_old/layout/_macro/post-collapse.swig new file mode 100644 index 0000000..1894d24 --- /dev/null +++ b/themes/next_old/layout/_macro/post-collapse.swig @@ -0,0 +1,34 @@ +{% macro render(post) %} + + + +{% endmacro %} diff --git a/themes/next_old/layout/_macro/post-copyright.swig b/themes/next_old/layout/_macro/post-copyright.swig new file mode 100644 index 0000000..4ad0490 --- /dev/null +++ b/themes/next_old/layout/_macro/post-copyright.swig @@ -0,0 +1,14 @@ +
        +
      • + {{ __('post.copyright.author') + __('symbol.colon') }} + {{ post.author | default(config.author) }} +
      • +
      • + {{ __('post.copyright.link') + __('symbol.colon') }} + {{ post.url | default(post.permalink) }} +
      • +
      • + {{ __('post.copyright.license_title') + __('symbol.colon') }} + {{ __('post.copyright.license_content', theme.post_copyright.license_url, theme.post_copyright.license) }} +
      • +
      diff --git a/themes/next_old/layout/_macro/post.swig b/themes/next_old/layout/_macro/post.swig new file mode 100644 index 0000000..12a6d58 --- /dev/null +++ b/themes/next_old/layout/_macro/post.swig @@ -0,0 +1,436 @@ +{% macro render(post, is_index, post_extra_class) %} + + {% set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %} + + {% set post_class = 'post post-type-' + post.type | default('normal') %} + {% if post_extra_class > 0 %} + {% set post_class = post_class + ' ' + post_extra_class | default('') %} + {% endif %} + {% if post.sticky > 0 %} + {% set post_class = post_class + ' ' + 'post-sticky' %} + {% endif %} + +
      + {##################} + {### POST BLOCK ###} + {##################} +
      + + + + + + + {% if not headlessPost %} +
      + + {# Not to show title for quote posts that do not have a title #} + {% if not (is_index and post.type === 'quote' and not post.title) %} + <{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title{% if post.direction && post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="name headline">{# + #}{# Link posts #}{# + #}{% if post.link %} + {% if post.sticky > 0 %} + {{ post.sticky }} + + + + {% endif %} + + {% else %}{# + #}{% if is_index %} + {% if post.sticky > 0 %} + + + + {% endif %} + {# + #}{% else %}{{ post.title }}{% endif %}{# + #}{% endif %}{# + #} + {% endif %} + + +
      + {% endif %} + + {#################} + {### POST BODY ###} + {#################} +
      + + {# Gallery support #} + {% if post.photos and post.photos.length %} +
      + {% set COLUMN_NUMBER = 3 %} + {% for photo in post.photos %} + {% if loop.index0 % COLUMN_NUMBER === 0 %}
      {% endif %} + + {% if loop.index0 % COLUMN_NUMBER === 2 %}
      {% endif %} + {% endfor %} + + {# Append end tag for `post-gallery-row` when (photos size mod COLUMN_NUMBER) is less than COLUMN_NUMBER #} + {% if post.photos.length % COLUMN_NUMBER > 0 %}
      {% endif %} +
      + {% endif %} + + {% if is_index %} + {% if post.description and theme.excerpt_description %} + {{ post.description }} + +
      + + {{ __('post.read_more') }} » + +
      + + {% elif post.excerpt %} + {{ post.excerpt }} + +
      + + {{ __('post.read_more') }} » + +
      + + {% elif theme.auto_excerpt.enable %} + {% set content = post.content | striptags %} + {{ content.substring(0, theme.auto_excerpt.length) }} + {% if content.length > theme.auto_excerpt.length %}...{% endif %} + +
      + + {{ __('post.read_more') }} » + +
      + + {% else %} + {% if post.type === 'picture' %} + {{ post.content }} + {% else %} + {{ post.content }} + {% endif %} + {% endif %} + {% else %} + {{ post.content }} + {% endif %} +
      + {#####################} + {### END POST BODY ###} + {#####################} + + {% if theme.wechat_subscriber.enabled and not is_index %} +
      + {% include 'wechat-subscriber.swig' %} +
      + {% endif %} + + {% if (theme.alipay or theme.wechatpay or theme.bitcoin) and not is_index %} +
      + {% include 'reward.swig' %} +
      + {% endif %} + + {% if theme.post_copyright.enable and not is_index %} +
      + {% include 'post-copyright.swig' with { post: post } %} +
      + {% endif %} + +
      + {% if post.tags and post.tags.length and not is_index %} + + {% endif %} + + {% if not is_index %} + {% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) or (theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable) %} +
      + {% if theme.rating.enable %} +
      +
      +
      + {% endif %} + + {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} + + {% endif %} + + {% if theme.needmoreshare2.enable and theme.needmoreshare2.postbottom.enable %} + {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} + + {% endif %} +
      + + + +
      + {% endif %} +
      + {% endif %} + {% endif %} + + {% if not is_index and (post.prev or post.next) %} +
      +
      + {% if post.next %} + + {% endif %} +
      + + + +
      + {% if post.prev %} + + {% endif %} +
      +
      + {% endif %} + + {% set isLast = loop.index % page.per_page === 0 %} + {% if is_index and not isLast %} +
      + {% endif %} +
      +
      + {######################} + {### END POST BLOCK ###} + {######################} + + +{% endmacro %} diff --git a/themes/next_old/layout/_macro/reward.swig b/themes/next_old/layout/_macro/reward.swig new file mode 100644 index 0000000..268436e --- /dev/null +++ b/themes/next_old/layout/_macro/reward.swig @@ -0,0 +1,30 @@ +
      +
      {{ theme.reward_comment }}
      + + +
      diff --git a/themes/next_old/layout/_macro/sidebar.swig b/themes/next_old/layout/_macro/sidebar.swig new file mode 100644 index 0000000..8f1229a --- /dev/null +++ b/themes/next_old/layout/_macro/sidebar.swig @@ -0,0 +1,175 @@ +{% macro render(is_post) %} + + + +{% endmacro %} diff --git a/themes/next_old/layout/_macro/wechat-subscriber.swig b/themes/next_old/layout/_macro/wechat-subscriber.swig new file mode 100644 index 0000000..b1d4364 --- /dev/null +++ b/themes/next_old/layout/_macro/wechat-subscriber.swig @@ -0,0 +1,4 @@ +
      + {{ theme.author }} wechat +
      {{ theme.wechat_subscriber.description }}
      +
      diff --git a/themes/next_old/layout/_partials/comments.swig b/themes/next_old/layout/_partials/comments.swig new file mode 100644 index 0000000..cee3114 --- /dev/null +++ b/themes/next_old/layout/_partials/comments.swig @@ -0,0 +1,70 @@ +{% if page.comments %} + + {% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %} +
      +
      +
      +
      + + {% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %} +
      +
      +
      +
      + + {% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %} +
      +
      +
      + + {% elseif theme.disqus.enable %} +
      +
      + +
      +
      + + {% elseif theme.hypercomments_id %} +
      +
      +
      + + {% elseif theme.youyan_uid %} +
      +
      +
      + + {% elseif theme.livere_uid %} +
      +
      +
      + + {% elseif theme.changyan.appid and theme.changyan.appkey %} +
      +
      +
      + + {% elseif theme.gitment.enable %} +
      + {% if theme.gitment.lazy %} +
      {{ __('gitmentbutton') }}
      + + {% else %} +
      + {% endif %} +
      + + {% elseif theme.valine.appid and theme.valine.appkey %} +
      +
      + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_partials/footer.swig b/themes/next_old/layout/_partials/footer.swig new file mode 100644 index 0000000..68e7e5e --- /dev/null +++ b/themes/next_old/layout/_partials/footer.swig @@ -0,0 +1,47 @@ + + +{% if theme.footer.powered %} +
      {# + #}{{ __('footer.powered', 'Hexo') }}{# +#}
      +{% endif %} + +{% if theme.footer.powered and theme.footer.theme.enable %} + +{% endif %} + +{% if theme.footer.theme.enable %} +
      {# + #}{{ __('footer.theme') }} — {# + #}{# + #}NexT.{{ theme.scheme }}{# + #}{% if theme.footer.theme.version %} v{{ theme.version }}{% endif %}{# +#}
      +{% endif %} + +{% if theme.footer.custom_text %} + +{% endif %} diff --git a/themes/next_old/layout/_partials/head.swig b/themes/next_old/layout/_partials/head.swig new file mode 100644 index 0000000..1e03db6 --- /dev/null +++ b/themes/next_old/layout/_partials/head.swig @@ -0,0 +1,158 @@ + + + + + + +{% if theme.pace %} + {% set pace_css_uri = url_for(theme.vendors._internal + '/pace/'+ theme.pace_theme +'.min.css?v=1.0.2') %} + {% set pace_js_uri = url_for(theme.vendors._internal + '/pace/pace.min.js?v=1.0.2') %} + {% if theme.vendors.pace %} + {% set pace_js_uri = theme.vendors.pace %} + {% endif %} + {% if theme.vendors.pace_css %} + {% set pace_css_uri = theme.vendors.pace_css %} + {% endif %} + + +{% endif %} + + +{% if theme.han %} + {% set Han_uri = url_for(theme.vendors._internal + '/Han/dist/han.min.css?v=3.3') %} + {% if theme.vendors.Han %} + {% set Han_uri = theme.vendors.Han %} + {% endif %} + +{% endif %} + + +{# #238, Disable Baidu tranformation #} + + + + +{% if theme.google_site_verification %} + +{% endif %} + +{% if theme.bing_site_verification %} + +{% endif %} + +{% if theme.yandex_site_verification %} + +{% endif %} + + +{% if theme.baidu_site_verification %} + +{% endif %} + + +{% if theme.qihu_site_verification %} + +{% endif %} + + +{% if theme.fancybox %} + {% set fancybox_css_uri = url_for(theme.vendors._internal + '/fancybox/source/jquery.fancybox.css?v=2.1.5') %} + {% if theme.vendors.fancybox_css %} + {% set fancybox_css_uri = theme.vendors.fancybox_css %} + {% endif %} + +{% endif %} + +{% include "./head/external-fonts.swig" %} + +{% set font_awesome_uri = url_for(theme.vendors._internal + '/font-awesome/css/font-awesome.min.css?v=4.6.2') %} +{% if theme.vendors.fontawesome %} + {% set font_awesome_uri = theme.vendors.fontawesome %} +{% endif %} + + + + +{% if theme.favicon.apple_touch_icon %} + +{% endif %} +{% if theme.favicon.medium %} + +{% endif %} +{% if theme.favicon.small %} + +{% endif %} +{% if theme.favicon.safari_pinned_tab %} + +{% endif %} +{% if theme.favicon.android_manifest %} + +{% endif %} +{% if theme.favicon.ms_browserconfig %} + +{% endif %} + +{% if page.keywords %} + +{% elif page.tags and page.tags.length %} + +{% elif theme.keywords %} + +{% endif %} + + +{% if theme.rss === '' and config.feed and config.feed.path %} + {% set theme.rss = config.feed.path %} +{% endif %} +{% if theme.rss %} + +{% endif %} + + +{% if theme.facebook_sdk.enable and theme.facebook_sdk.webmaster %} + + +{% endif %} + + +{{ + open_graph({ + twitter_id: theme.twitter, + google_plus: theme.google_plus, + fb_admins: theme.fb_admins, + fb_app_id: theme.fb_app_id + }) +}} + + +{# Export some HEXO Configurations to Front-End #} + + +{# Canonical, good for google search engine (SEO) : https://support.google.com/webmasters/answer/139066 #} +{% if theme.canonical %} + +{% endif %} + +{% include 'head/custom-head.swig' %} diff --git a/themes/next_old/layout/_partials/head/custom-head.swig b/themes/next_old/layout/_partials/head/custom-head.swig new file mode 100644 index 0000000..6aed40d --- /dev/null +++ b/themes/next_old/layout/_partials/head/custom-head.swig @@ -0,0 +1,3 @@ +{# +Custom head. +#} diff --git a/themes/next_old/layout/_partials/head/external-fonts.swig b/themes/next_old/layout/_partials/head/external-fonts.swig new file mode 100644 index 0000000..876e12e --- /dev/null +++ b/themes/next_old/layout/_partials/head/external-fonts.swig @@ -0,0 +1,51 @@ +{% if theme.font.enable %} + + {% set font_config = theme.font %} + {% set font_families = '' %} + {% set font_styles = ':300,300italic,400,400italic,700,700italic' %} + {% set font_found = false %} + + {% if font_config.global.family and font_config.global.external %} + {% set font_families += font_config.global.family + font_styles %} + {% set font_found = true %} + {% endif %} + + {% if font_config.headings.family and font_config.headings.external %} + {% if font_found %} + {% set font_families += '|' %} + {% endif %} + + {% set font_families += font_config.headings.family + font_styles %} + {% endif %} + + {% if font_config.posts.family and font_config.posts.external %} + {% if font_found %} + {% set font_families += '|' %} + {% endif %} + + {% set font_families += font_config.posts.family + font_styles %} + {% endif %} + + {% if font_config.logo.family and font_config.logo.external %} + {% if font_found %} + {% set font_families += '|' %} + {% endif %} + + {% set font_families += font_config.logo.family + font_styles %} + {% endif %} + + {% if font_config.codes.family and font_config.codes.external %} + {% if font_found %} + {% set font_families += '|' %} + {% endif %} + + {% set font_families += font_config.codes.family + font_styles %} + {% endif %} + + {% if font_families !== '' %} + {% set font_families += '&subset=latin,latin-ext' %} + {% set font_host = font_config.host | default('//fonts.googleapis.com') %} + + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_partials/header.swig b/themes/next_old/layout/_partials/header.swig new file mode 100644 index 0000000..81d5d74 --- /dev/null +++ b/themes/next_old/layout/_partials/header.swig @@ -0,0 +1,76 @@ +
      +
      + {% if theme.custom_logo.image and theme.scheme === 'Muse' %} +
      + + {{ config.title }} + +
      + {% endif %} + + + {% if theme.seo %} +

      {{ config.subtitle }}

      + {% else %} +

      {{ config.subtitle }}

      + {% endif %} +
      + + +
      + + + +{% include '../_custom/header.swig' %} diff --git a/themes/next_old/layout/_partials/page-header.swig b/themes/next_old/layout/_partials/page-header.swig new file mode 100644 index 0000000..1e1f890 --- /dev/null +++ b/themes/next_old/layout/_partials/page-header.swig @@ -0,0 +1,11 @@ +
      + + <{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{{ page.title }} + +{% if page.description %} + +{% endif %} + +
      diff --git a/themes/next_old/layout/_partials/pagination.swig b/themes/next_old/layout/_partials/pagination.swig new file mode 100644 index 0000000..5f96b99 --- /dev/null +++ b/themes/next_old/layout/_partials/pagination.swig @@ -0,0 +1,11 @@ +{% if page.prev or page.next %} + +{% endif %} diff --git a/themes/next_old/layout/_partials/search.swig b/themes/next_old/layout/_partials/search.swig new file mode 100644 index 0000000..a507d27 --- /dev/null +++ b/themes/next_old/layout/_partials/search.swig @@ -0,0 +1,9 @@ +{% if theme.algolia_search.enable %} + {% include '../_third-party/search/algolia-search/dom.swig' %} +{% elseif theme.swiftype_key %} + {% include 'search/swiftype.swig' %} +{% elseif theme.tinysou_Key %} + {% include 'search/tinysou.swig' %} +{% elseif theme.local_search.enable %} + {% include 'search/localsearch.swig' %} +{% endif %} diff --git a/themes/next_old/layout/_partials/search/localsearch.swig b/themes/next_old/layout/_partials/search/localsearch.swig new file mode 100644 index 0000000..f106aa0 --- /dev/null +++ b/themes/next_old/layout/_partials/search/localsearch.swig @@ -0,0 +1,16 @@ + diff --git a/themes/next_old/layout/_partials/search/swiftype.swig b/themes/next_old/layout/_partials/search/swiftype.swig new file mode 100644 index 0000000..732e0c1 --- /dev/null +++ b/themes/next_old/layout/_partials/search/swiftype.swig @@ -0,0 +1,12 @@ +
      + +
      + + diff --git a/themes/next_old/layout/_partials/search/tinysou.swig b/themes/next_old/layout/_partials/search/tinysou.swig new file mode 100644 index 0000000..2dfa3e3 --- /dev/null +++ b/themes/next_old/layout/_partials/search/tinysou.swig @@ -0,0 +1,3 @@ +
      + +
      diff --git a/themes/next_old/layout/_partials/share/add-this.swig b/themes/next_old/layout/_partials/share/add-this.swig new file mode 100644 index 0000000..ae0a6b4 --- /dev/null +++ b/themes/next_old/layout/_partials/share/add-this.swig @@ -0,0 +1,4 @@ + +
      + +
      diff --git a/themes/next_old/layout/_partials/share/baidushare.swig b/themes/next_old/layout/_partials/share/baidushare.swig new file mode 100644 index 0000000..6be4898 --- /dev/null +++ b/themes/next_old/layout/_partials/share/baidushare.swig @@ -0,0 +1,57 @@ +{% if theme.baidushare.type === "button" %} +
      + + + + + + + + + + +
      + +{% elseif theme.baidushare.type === "slide" %} + +{% endif %} + diff --git a/themes/next_old/layout/_partials/share/duoshuo_share.swig b/themes/next_old/layout/_partials/share/duoshuo_share.swig new file mode 100644 index 0000000..bfa26f4 --- /dev/null +++ b/themes/next_old/layout/_partials/share/duoshuo_share.swig @@ -0,0 +1,18 @@ +
      +
      + +
      +
      +
      +
      \ No newline at end of file diff --git a/themes/next_old/layout/_partials/share/jiathis.swig b/themes/next_old/layout/_partials/share/jiathis.swig new file mode 100644 index 0000000..3251352 --- /dev/null +++ b/themes/next_old/layout/_partials/share/jiathis.swig @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/themes/next_old/layout/_scripts/boostrap.swig b/themes/next_old/layout/_scripts/boostrap.swig new file mode 100644 index 0000000..5e95090 --- /dev/null +++ b/themes/next_old/layout/_scripts/boostrap.swig @@ -0,0 +1,9 @@ +{% + set boot_scripts = [ + 'src/bootstrap.js' + ] +%} + +{% for bs in boot_scripts %} + +{% endfor %} diff --git a/themes/next_old/layout/_scripts/commons.swig b/themes/next_old/layout/_scripts/commons.swig new file mode 100644 index 0000000..abc2971 --- /dev/null +++ b/themes/next_old/layout/_scripts/commons.swig @@ -0,0 +1,10 @@ +{% + set js_commons = [ + 'src/utils.js', + 'src/motion.js' + ] +%} + +{% for common in js_commons %} + +{% endfor %} diff --git a/themes/next_old/layout/_scripts/pages/post-details.swig b/themes/next_old/layout/_scripts/pages/post-details.swig new file mode 100644 index 0000000..6938779 --- /dev/null +++ b/themes/next_old/layout/_scripts/pages/post-details.swig @@ -0,0 +1,2 @@ + + diff --git a/themes/next_old/layout/_scripts/schemes/gemini.swig b/themes/next_old/layout/_scripts/schemes/gemini.swig new file mode 100644 index 0000000..5119eba --- /dev/null +++ b/themes/next_old/layout/_scripts/schemes/gemini.swig @@ -0,0 +1,10 @@ +{% + set scripts = [ + 'src/affix.js', + 'src/schemes/pisces.js' + ] +%} + +{% for script in scripts %} + +{% endfor %} diff --git a/themes/next_old/layout/_scripts/schemes/mist.swig b/themes/next_old/layout/_scripts/schemes/mist.swig new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/layout/_scripts/schemes/muse.swig b/themes/next_old/layout/_scripts/schemes/muse.swig new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/layout/_scripts/schemes/pisces.swig b/themes/next_old/layout/_scripts/schemes/pisces.swig new file mode 100644 index 0000000..5119eba --- /dev/null +++ b/themes/next_old/layout/_scripts/schemes/pisces.swig @@ -0,0 +1,10 @@ +{% + set scripts = [ + 'src/affix.js', + 'src/schemes/pisces.js' + ] +%} + +{% for script in scripts %} + +{% endfor %} diff --git a/themes/next_old/layout/_scripts/vendors.swig b/themes/next_old/layout/_scripts/vendors.swig new file mode 100644 index 0000000..d0b86fd --- /dev/null +++ b/themes/next_old/layout/_scripts/vendors.swig @@ -0,0 +1,49 @@ +{# Reset `window.Promise` when it was not a function. #} +{# IE refers the element whose id is `Promise` as `window.Promise`, this causes Velocity throwing an exception #} + + +{% set js_vendors = {} %} +{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %} +{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %} +{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %} +{% set js_vendors.velocity = 'velocity/velocity.min.js?v=1.2.1' %} +{% set js_vendors.velocity_ui = 'velocity/velocity.ui.min.js?v=1.2.1' %} + +{% if theme.fancybox %} + {% set js_vendors.fancybox = 'fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %} +{% endif %} +{% if theme.canvas_nest %} + {% set js_vendors.canvas_nest = 'canvas-nest/canvas-nest.min.js' %} +{% endif %} + +{% if theme.three_waves %} + {% set js_vendors.three = 'three/three.min.js' %} + {% set js_vendors.three_waves = 'three/three-waves.min.js' %} +{% endif %} + +{% if theme.canvas_lines %} + {% set js_vendors.three = 'three/three.min.js' %} + {% set js_vendors.canvas_lines = 'three/canvas_lines.min.js' %} +{% endif %} + +{% if theme.canvas_sphere %} + {% set js_vendors.three = 'three/three.min.js' %} + {% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %} +{% endif %} + +{% if theme.canvas_ribbon.enable and theme.scheme === 'Pisces'%} + {% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %} +{% endif %} + +{% for name, internal in js_vendors %} + {% set internal_script = url_for(theme.vendors._internal) + '/' + internal %} + {% if name == 'canvas_ribbon' %} + + {% else %} + + {% endif %} +{% endfor %} diff --git a/themes/next_old/layout/_third-party/analytics/analytics-with-widget.swig b/themes/next_old/layout/_third-party/analytics/analytics-with-widget.swig new file mode 100644 index 0000000..f2a4049 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/analytics-with-widget.swig @@ -0,0 +1,4 @@ +{% include 'busuanzi-counter.swig' %} +{% include 'tencent-mta.swig' %} +{% include 'tencent-analytics.swig' %} +{% include 'cnzz-analytics.swig' %} \ No newline at end of file diff --git a/themes/next_old/layout/_third-party/analytics/application-insights.swig b/themes/next_old/layout/_third-party/analytics/application-insights.swig new file mode 100644 index 0000000..c0af16f --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/application-insights.swig @@ -0,0 +1,11 @@ +{% if theme.application_insights %} + +{% endif %} \ No newline at end of file diff --git a/themes/next_old/layout/_third-party/analytics/baidu-analytics.swig b/themes/next_old/layout/_third-party/analytics/baidu-analytics.swig new file mode 100644 index 0000000..9ae1d83 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/baidu-analytics.swig @@ -0,0 +1,11 @@ +{% if theme.baidu_analytics %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/busuanzi-counter.swig b/themes/next_old/layout/_third-party/analytics/busuanzi-counter.swig new file mode 100644 index 0000000..721b2c8 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/busuanzi-counter.swig @@ -0,0 +1,21 @@ +{% if theme.busuanzi_count.enable %} +
      + + + {% if theme.busuanzi_count.site_uv %} + + {{ theme.busuanzi_count.site_uv_header }} + + {{ theme.busuanzi_count.site_uv_footer }} + + {% endif %} + + {% if theme.busuanzi_count.site_pv %} + + {{ theme.busuanzi_count.site_pv_header }} + + {{ theme.busuanzi_count.site_pv_footer }} + + {% endif %} +
      +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/cnzz-analytics.swig b/themes/next_old/layout/_third-party/analytics/cnzz-analytics.swig new file mode 100644 index 0000000..bffb73c --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/cnzz-analytics.swig @@ -0,0 +1,7 @@ +{% if theme.cnzz_siteid %} + +
      + +
      + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/facebook-sdk.swig b/themes/next_old/layout/_third-party/analytics/facebook-sdk.swig new file mode 100644 index 0000000..7b5a291 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/facebook-sdk.swig @@ -0,0 +1,19 @@ +{% if theme.facebook_sdk.enable %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/firestore.swig b/themes/next_old/layout/_third-party/analytics/firestore.swig new file mode 100644 index 0000000..7493c75 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/firestore.swig @@ -0,0 +1,99 @@ +{% if theme.firestore.enable %} + + + {% if theme.firestore.bluebird %} + + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/google-analytics.swig b/themes/next_old/layout/_third-party/analytics/google-analytics.swig new file mode 100644 index 0000000..c66d461 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/google-analytics.swig @@ -0,0 +1,10 @@ +{% if theme.google_analytics %} + +{% endif %} \ No newline at end of file diff --git a/themes/next_old/layout/_third-party/analytics/index.swig b/themes/next_old/layout/_third-party/analytics/index.swig new file mode 100644 index 0000000..78ae38e --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/index.swig @@ -0,0 +1,5 @@ +{% include 'facebook-sdk.swig' %} +{% include 'vkontakte-api.swig' %} +{% include 'google-analytics.swig' %} +{% include 'baidu-analytics.swig' %} +{% include 'application-insights.swig' %} diff --git a/themes/next_old/layout/_third-party/analytics/lean-analytics.swig b/themes/next_old/layout/_third-party/analytics/lean-analytics.swig new file mode 100644 index 0000000..2e8bb98 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/lean-analytics.swig @@ -0,0 +1,108 @@ +{% if theme.leancloud_visitors.enable %} + + {# custom analytics part create by xiamo #} + + + + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/tencent-analytics.swig b/themes/next_old/layout/_third-party/analytics/tencent-analytics.swig new file mode 100644 index 0000000..c2fab35 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/tencent-analytics.swig @@ -0,0 +1,10 @@ +{% if theme.tencent_analytics %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/tencent-mta.swig b/themes/next_old/layout/_third-party/analytics/tencent-mta.swig new file mode 100644 index 0000000..f4b6470 --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/tencent-mta.swig @@ -0,0 +1,14 @@ +{% if theme.tencent_mta %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/analytics/vkontakte-api.swig b/themes/next_old/layout/_third-party/analytics/vkontakte-api.swig new file mode 100644 index 0000000..913a8fc --- /dev/null +++ b/themes/next_old/layout/_third-party/analytics/vkontakte-api.swig @@ -0,0 +1,27 @@ +{% if theme.vkontakte_api.enable %} + +
      + + +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/changyan.swig b/themes/next_old/layout/_third-party/comments/changyan.swig new file mode 100644 index 0000000..d816b2c --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/changyan.swig @@ -0,0 +1,18 @@ +{% if theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} + {% if is_home() %} + + {% else %} + + + {% endif %} +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/disqus.swig b/themes/next_old/layout/_third-party/comments/disqus.swig new file mode 100644 index 0000000..2d14907 --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/disqus.swig @@ -0,0 +1,23 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %} + {% if theme.disqus.enable %} + + {% if theme.disqus.count %} + + {% endif %} + + {% if page.comments %} + + {% endif %} + + {% endif %} +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/duoshuo.swig b/themes/next_old/layout/_third-party/comments/duoshuo.swig new file mode 100644 index 0000000..c8499b2 --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/duoshuo.swig @@ -0,0 +1,33 @@ +{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %} + + {% if theme.duoshuo %} + {% set duoshuo_shortname = theme.duoshuo.shortname %} + {% else %} + {% set duoshuo_shortname = theme.duoshuo_shortname %} + {% endif %} + + + + {% if theme.duoshuo_info.ua_enable %} + {% if theme.duoshuo_info.admin_enable %} + {% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %} + + + {% endif %} + {% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %} + + + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/gitment.swig b/themes/next_old/layout/_third-party/comments/gitment.swig new file mode 100644 index 0000000..398779e --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/gitment.swig @@ -0,0 +1,59 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %} +{% if theme.gitment.enable and theme.gitment.client_id %} + + {% if theme.gitment.mint %} + {% set CommentsClass = "Gitmint" %} + + + {% else %} + {% set CommentsClass = "Gitment" %} + + + {% endif %} + + + {% if theme.gitment.cleanly %} + + {% endif %} + + {% if page.comments %} + + {% endif %} + +{% endif %} +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/hypercomments.swig b/themes/next_old/layout/_third-party/comments/hypercomments.swig new file mode 100644 index 0000000..de693e4 --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/hypercomments.swig @@ -0,0 +1,27 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname %} + + {% if theme.hypercomments_id %} + + + + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/index.swig b/themes/next_old/layout/_third-party/comments/index.swig new file mode 100644 index 0000000..b2da232 --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/index.swig @@ -0,0 +1,8 @@ +{% include 'duoshuo.swig' %} +{% include 'disqus.swig' %} +{% include 'hypercomments.swig' %} +{% include 'youyan.swig' %} +{% include 'livere.swig' %} +{% include 'changyan.swig' %} +{% include 'gitment.swig' %} +{% include 'valine.swig' %} diff --git a/themes/next_old/layout/_third-party/comments/livere.swig b/themes/next_old/layout/_third-party/comments/livere.swig new file mode 100644 index 0000000..9e1e165 --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/livere.swig @@ -0,0 +1,16 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not (theme.disqus.enable and theme.disqus.shortname) and not theme.hypercomments_id %} + + {% if page.comments and theme.livere_uid %} + + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/valine.swig b/themes/next_old/layout/_third-party/comments/valine.swig new file mode 100644 index 0000000..9bf5663 --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/valine.swig @@ -0,0 +1,23 @@ +{% if theme.valine.enable and theme.valine.appid and theme.valine.appkey %} + + + + +{% endif %} diff --git a/themes/next_old/layout/_third-party/comments/youyan.swig b/themes/next_old/layout/_third-party/comments/youyan.swig new file mode 100644 index 0000000..dbf3e8a --- /dev/null +++ b/themes/next_old/layout/_third-party/comments/youyan.swig @@ -0,0 +1,16 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) + and not theme.duoshuo_shortname + and not theme.disqus_shortname + and not theme.hypercomments_id %} + + {% if theme.youyan_uid %} + {% set uid = theme.youyan_uid %} + + {% if page.comments %} + + + + {% endif %} + {% endif %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/duoshuo-hot-articles.swig b/themes/next_old/layout/_third-party/duoshuo-hot-articles.swig new file mode 100644 index 0000000..2d1088d --- /dev/null +++ b/themes/next_old/layout/_third-party/duoshuo-hot-articles.swig @@ -0,0 +1,5 @@ +{# 多说热评文章 #} +{% if (theme.duoshuo_hotartical and page.title) %} +

      热评文章

      +
      +{% endif %} diff --git a/themes/next_old/layout/_third-party/exturl.swig b/themes/next_old/layout/_third-party/exturl.swig new file mode 100644 index 0000000..329ab50 --- /dev/null +++ b/themes/next_old/layout/_third-party/exturl.swig @@ -0,0 +1,3 @@ +{% if theme.exturl %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/mathjax.swig b/themes/next_old/layout/_third-party/mathjax.swig new file mode 100644 index 0000000..89db7b4 --- /dev/null +++ b/themes/next_old/layout/_third-party/mathjax.swig @@ -0,0 +1,23 @@ +{% if theme.mathjax.enable %} + {% if not theme.mathjax.per_page or (page.total or page.mathjax) %} + + + + + {% endif %} +{% endif %} diff --git a/themes/next_old/layout/_third-party/needsharebutton.swig b/themes/next_old/layout/_third-party/needsharebutton.swig new file mode 100644 index 0000000..73d8e4b --- /dev/null +++ b/themes/next_old/layout/_third-party/needsharebutton.swig @@ -0,0 +1,30 @@ +{% if theme.needmoreshare2.enable %} + {% set needmoreshare2_css = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.css') %} + {% if theme.vendors.needmoreshare2 %} + {% set needmoreshare2_css = theme.vendors.needmoreshare2_css %} + {% endif %} + + + {% set needmoreshare2_js = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.js') %} + {% if theme.vendors.needmoreshare2_js %} + {% set needmoreshare2_js = theme.vendors.needmoreshare2_js %} + {% endif %} + + + +{% endif %} \ No newline at end of file diff --git a/themes/next_old/layout/_third-party/rating.swig b/themes/next_old/layout/_third-party/rating.swig new file mode 100644 index 0000000..3b376ce --- /dev/null +++ b/themes/next_old/layout/_third-party/rating.swig @@ -0,0 +1,18 @@ +{% if theme.rating.enable and (not is_home() and is_post()) %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/schedule.swig b/themes/next_old/layout/_third-party/schedule.swig new file mode 100644 index 0000000..6db3a3c --- /dev/null +++ b/themes/next_old/layout/_third-party/schedule.swig @@ -0,0 +1,185 @@ +{% if theme.calendar.enable %} +{% if page.type == 'schedule' %} + + + +{% endif %} +{% endif %} diff --git a/themes/next_old/layout/_third-party/scroll-cookie.swig b/themes/next_old/layout/_third-party/scroll-cookie.swig new file mode 100644 index 0000000..9fbb0eb --- /dev/null +++ b/themes/next_old/layout/_third-party/scroll-cookie.swig @@ -0,0 +1,4 @@ +{% if theme.save_scroll %} + + +{% endif %} diff --git a/themes/next_old/layout/_third-party/search/algolia-search/assets.swig b/themes/next_old/layout/_third-party/search/algolia-search/assets.swig new file mode 100644 index 0000000..069504f --- /dev/null +++ b/themes/next_old/layout/_third-party/search/algolia-search/assets.swig @@ -0,0 +1,18 @@ +{% if theme.algolia_search.enable %} + + {# S: Include Algolia instantsearch.js library #} + {% set algolia_instant_css = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.css') %} + {% if theme.vendors.algolia_instant_css %} + {% set algolia_instant_css = theme.vendors.algolia_instant_css %} + {% endif %} + + + {% set algolia_instant_js = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.js') %} + {% if theme.vendors.algolia_instant_js %} + {% set algolia_instant_js = theme.vendors.algolia_instant_js %} + {% endif %} + + {# E: Include Algolia instantsearch.js library #} + + +{% endif %} diff --git a/themes/next_old/layout/_third-party/search/algolia-search/dom.swig b/themes/next_old/layout/_third-party/search/algolia-search/dom.swig new file mode 100644 index 0000000..a733bb1 --- /dev/null +++ b/themes/next_old/layout/_third-party/search/algolia-search/dom.swig @@ -0,0 +1,20 @@ +{% if theme.algolia_search.enable %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/search/index.swig b/themes/next_old/layout/_third-party/search/index.swig new file mode 100644 index 0000000..0a352bc --- /dev/null +++ b/themes/next_old/layout/_third-party/search/index.swig @@ -0,0 +1,3 @@ +{% include 'tinysou.swig' %} +{% include 'localsearch.swig' %} +{% include 'algolia-search/assets.swig' %} diff --git a/themes/next_old/layout/_third-party/search/localsearch.swig b/themes/next_old/layout/_third-party/search/localsearch.swig new file mode 100644 index 0000000..c373e5c --- /dev/null +++ b/themes/next_old/layout/_third-party/search/localsearch.swig @@ -0,0 +1,318 @@ +{% if theme.local_search.enable %} + +{% endif %} diff --git a/themes/next_old/layout/_third-party/search/tinysou.swig b/themes/next_old/layout/_third-party/search/tinysou.swig new file mode 100644 index 0000000..6e18684 --- /dev/null +++ b/themes/next_old/layout/_third-party/search/tinysou.swig @@ -0,0 +1,23 @@ +{% if config.tinysou_Key %} + +{% endif %} \ No newline at end of file diff --git a/themes/next_old/layout/_third-party/seo/baidu-push.swig b/themes/next_old/layout/_third-party/seo/baidu-push.swig new file mode 100644 index 0000000..ee6838f --- /dev/null +++ b/themes/next_old/layout/_third-party/seo/baidu-push.swig @@ -0,0 +1,16 @@ +{% if theme.baidu_push %} + +{% endif %} diff --git a/themes/next_old/layout/archive.swig b/themes/next_old/layout/archive.swig new file mode 100644 index 0000000..970491f --- /dev/null +++ b/themes/next_old/layout/archive.swig @@ -0,0 +1,62 @@ +{% extends '_layout.swig' %} +{% import '_macro/post-collapse.swig' as post_template %} +{% import '_macro/sidebar.swig' as sidebar_template %} + +{% block title %}{{ __('title.archive') }} | {{ config.title }}{% endblock %} + +{% block page_class %}page-archive{% endblock %} + +{% block content %} + + {#####################} + {### ARCHIVE BLOCK ###} + {#####################} +
      +
      + + + + {% set cheers %} + {% set posts_length = site.posts.length %} + {% if posts_length > 210 %} {% set cheers = 'excellent' %} + {% elif posts_length > 130 %} {% set cheers = 'great' %} + {% elif posts_length > 80 %} {% set cheers = 'good' %} + {% elif posts_length > 50 %} {% set cheers = 'nice' %} + {% elif posts_length > 30 %} {% set cheers = 'ok' %} + {% else %} + {% set cheers = 'um' %} + {% endif %} + {{ __('cheers.' + cheers) }}! {{ _p("counter.archive_posts", site.posts.length) }} {{ __('keep_on') }} + + + {% for post in page.posts %} + + {# Show year #} + {% set year %} + {% set post.year = date(post.date, 'YYYY') %} + + {% if post.year !== year %} + {% set year = post.year %} +
      + <{% if theme.seo %}h2{% else %}h1{% endif %} class="archive-year" id="archive-year-{{ year }}">{{ year }} +
      + {% endif %} + {# endshow #} + + {{ post_template.render(post) }} + + {% endfor %} + +
      +
      + {#########################} + {### END ARCHIVE BLOCK ###} + {#########################} + + {% include '_partials/pagination.swig' %} + +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(false) }} +{% endblock %} diff --git a/themes/next_old/layout/category.swig b/themes/next_old/layout/category.swig new file mode 100644 index 0000000..8e3aa72 --- /dev/null +++ b/themes/next_old/layout/category.swig @@ -0,0 +1,38 @@ +{% extends '_layout.swig' %} +{% import '_macro/post-collapse.swig' as post_template %} +{% import '_macro/sidebar.swig' as sidebar_template %} + +{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ config.title }}{% endblock %} + +{% block content %} + + {######################} + {### CATEGORY BLOCK ###} + {######################} +
      + +
      +
      + <{% if theme.seo %}h2{% else %}h1{% endif %}>{# + #}{{ page.category }}{# + #}{{ __('title.category') }} + +
      + + {% for post in page.posts %} + {{ post_template.render(post) }} + {% endfor %} +
      + +
      + {##########################} + {### END CATEGORY BLOCK ###} + {##########################} + + {% include '_partials/pagination.swig' %} + +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(false) }} +{% endblock %} diff --git a/themes/next_old/layout/index.swig b/themes/next_old/layout/index.swig new file mode 100644 index 0000000..995c28a --- /dev/null +++ b/themes/next_old/layout/index.swig @@ -0,0 +1,23 @@ +{% extends '_layout.swig' %} +{% import '_macro/post.swig' as post_template %} +{% import '_macro/sidebar.swig' as sidebar_template %} + +{% block title %}{{ config.title }}{% if theme.index_with_subtitle and config.subtitle %} - {{config.subtitle }}{% endif %}{% endblock %} + +{% block page_class %} + {% if is_home() %}page-home{% endif -%} +{% endblock %} + +{% block content %} +
      + {% for post in page.posts %} + {{ post_template.render(post, true) }} + {% endfor %} +
      + + {% include '_partials/pagination.swig' %} +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(false) }} +{% endblock %} diff --git a/themes/next_old/layout/page.swig b/themes/next_old/layout/page.swig new file mode 100644 index 0000000..83ad7bd --- /dev/null +++ b/themes/next_old/layout/page.swig @@ -0,0 +1,70 @@ +{% extends '_layout.swig' %} +{% import '_macro/sidebar.swig' as sidebar_template %} + + {% block title %}{# + #}{% set page_title_suffix = ' | ' + config.title %}{# + + #}{% if page.type === "categories" and not page.title %}{# + #}{{ __('title.category') + page_title_suffix }}{# + #}{% elif page.type === "tags" and not page.title %}{# + #}{{ __('title.tag') + page_title_suffix }}{# + #}{% else %}{# + #}{{ page.title + page_title_suffix }}{# + #}{% endif %}{# +#}{% endblock %} + +{% block page_class %}page-post-detail{% endblock %} + +{% block content %} + +
      + {##################} + {### PAGE BLOCK ###} + {##################} +
      + {% include '_partials/page-header.swig' %} + {#################} + {### PAGE BODY ###} + {#################} +
      + {# tagcloud page support #} + {% if page.type === "tags" %} +
      +
      + {{ _p('counter.tag_cloud', site.tags.length) }} +
      +
      + {{ tagcloud({min_font: 12, max_font: 30, amount: 300, color: true, start_color: '#ccc', end_color: '#111'}) }} +
      +
      + {% elif page.type === 'categories' %} +
      +
      + {{ _p('counter.categories', site.categories.length) }} +
      +
      + {{ list_categories() }} +
      +
      + {% else %} + {{ page.content }} + {% endif %} +
      + {#####################} + {### END PAGE BODY ###} + {#####################} +
      + {######################} + {### END PAGE BLOCK ###} + {######################} +
      + +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(false) }} +{% endblock %} + +{% block script_extra %} + {% include '_scripts/pages/post-details.swig' %} +{% endblock %} diff --git a/themes/next_old/layout/post.swig b/themes/next_old/layout/post.swig new file mode 100644 index 0000000..8274630 --- /dev/null +++ b/themes/next_old/layout/post.swig @@ -0,0 +1,37 @@ +{% extends '_layout.swig' %} +{% import '_macro/post.swig' as post_template %} +{% import '_macro/sidebar.swig' as sidebar_template %} + + +{% block title %}{{ page.title }} | {{ config.title }}{% endblock %} + +{% block page_class %}page-post-detail{% endblock %} + + +{% block content %} + +
      + {{ post_template.render(page) }} + +
      + {% if theme.jiathis %} + {% include '_partials/share/jiathis.swig' %} + {% elseif theme.baidushare %} + {% include '_partials/share/baidushare.swig' %} + {% elseif theme.add_this_id %} + {% include '_partials/share/add-this.swig' %} + {% elseif theme.duoshuo_shortname and theme.duoshuo_share %} + {% include '_partials/share/duoshuo_share.swig' %} + {% endif %} +
      +
      + +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(true) }} +{% endblock %} + +{% block script_extra %} + {% include '_scripts/pages/post-details.swig' %} +{% endblock %} diff --git a/themes/next_old/layout/schedule.swig b/themes/next_old/layout/schedule.swig new file mode 100644 index 0000000..216dfea --- /dev/null +++ b/themes/next_old/layout/schedule.swig @@ -0,0 +1,25 @@ +{% extends '_layout.swig' %} +{% import '_macro/sidebar.swig' as sidebar_template %} + +{% block title %}{{ __('title.schedule') }} | {{ config.title }}{% endblock %} + +{% block page_class %}page-post-detail page-calendar{% endblock %} + +{% block content %} + {######################} + {### SCHEDULE BLOCK ###} + {######################} +
      +
      +
        +
      +
      +
      + {##########################} + {### END SCHEDULE BLOCK ###} + {##########################} +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(false) }} +{% endblock %} diff --git a/themes/next_old/layout/tag.swig b/themes/next_old/layout/tag.swig new file mode 100644 index 0000000..e570ce8 --- /dev/null +++ b/themes/next_old/layout/tag.swig @@ -0,0 +1,37 @@ +{% extends '_layout.swig' %} +{% import '_macro/post-collapse.swig' as post_template %} +{% import '_macro/sidebar.swig' as sidebar_template %} + +{% block title %}{{ __('title.tag') }}: {{ page.tag }} | {{ config.title }}{% endblock %} + +{% block content %} + + {#################} + {### TAG BLOCK ###} + {#################} +
      + +
      +
      + <{% if theme.seo %}h2{% else %}h1{% endif %}>{# + #}{{ page.tag }}{# + #}{{ __('title.tag') }} + +
      + + {% for post in page.posts %} + {{ post_template.render(post) }} + {% endfor %} +
      + +
      + {#####################} + {### END TAG BLOCK ###} + {#####################} + + {% include '_partials/pagination.swig' %} +{% endblock %} + +{% block sidebar %} + {{ sidebar_template.render(false) }} +{% endblock %} diff --git a/themes/next_old/package.json b/themes/next_old/package.json new file mode 100644 index 0000000..8de1090 --- /dev/null +++ b/themes/next_old/package.json @@ -0,0 +1,38 @@ +{ + "name": "hexo-theme-next", + "version": "5.1.4", + "description": "Elegant theme for Hexo", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "gulp" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/iissnan/hexo-theme-next.git" + }, + "keywords": [ + "NexT", + "Hexo" + ], + "author": "iissnan ", + "maintainers": [ + "Ivan Nginx (https://almostover.ru)" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/iissnan/hexo-theme-next/issues" + }, + "homepage": "https://theme-next.iissnan.com", + "devDependencies": { + "coffee-script": "^1.10.0", + "gulp": "^3.9.0", + "gulp-jshint": "^1.12.0", + "gulp-shell": "^0.6.1", + "js-yaml": "^3.8.1", + "jshint-stylish": "^2.1.0", + "stylint": "^1.5.9" + } +} diff --git a/themes/next_old/scripts/merge-configs.js b/themes/next_old/scripts/merge-configs.js new file mode 100644 index 0000000..10c1eb6 --- /dev/null +++ b/themes/next_old/scripts/merge-configs.js @@ -0,0 +1,30 @@ +/* global hexo */ + +var merge = require('./merge'); + +/** + * Merge configs in _data/next.yml into hexo.theme.config. + * Note: configs in _data/next.yml will override configs in hexo.theme.config. + */ +hexo.on('generateBefore', function () { + if (hexo.locals.get) { + var data = hexo.locals.get('data'); + if ( data && data.next ) { + if ( data.next.override ) { + hexo.theme.config = data.next; + } else { + merge(hexo.theme.config, data.next); + } + } + } +}); + +hexo.on('generateAfter', function () { + hexo.log.warn("==============================================================="); + hexo.log.warn("========================= ATTENTION! =========================="); + hexo.log.warn("==============================================================="); + hexo.log.warn(" NexT repository is moving here: https://github.com/theme-next "); + hexo.log.warn("==============================================================="); + hexo.log.warn(" It's rebase to v6.0.0 and future maintenance will resume there"); + hexo.log.warn("==============================================================="); +}); diff --git a/themes/next_old/scripts/merge.js b/themes/next_old/scripts/merge.js new file mode 100644 index 0000000..f964663 --- /dev/null +++ b/themes/next_old/scripts/merge.js @@ -0,0 +1,2225 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function () { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) { + } +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function (value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) { + } + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (typeof key == 'number' && value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + if (!(isArray(source) || isTypedArray(source))) { + var props = baseKeysIn(source); + } + arrayEach(props || source, function (srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }); +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + newValue = srcValue; + if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else { + isCommon = false; + newValue = baseClone(srcValue, true); + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; + newValue = baseClone(srcValue, true); + } + else { + newValue = objValue; + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function (value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return (func + ''); + } catch (e) { + } + } + return ''; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function (object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; diff --git a/themes/next_old/scripts/tags/button.js b/themes/next_old/scripts/tags/button.js new file mode 100644 index 0000000..dfc0962 --- /dev/null +++ b/themes/next_old/scripts/tags/button.js @@ -0,0 +1,31 @@ +/* global hexo */ +// Usage: {% button /path/to/url/, text, icon [class], title %} +// Alias: {% btn /path/to/url/, text, icon [class], title %} + +function postButton(args) { + args = args.join(' ').split(','); + var url = args[0]; + var text = args[1] || ''; + var icon = args[2] || ''; + var title = args[3] || ''; + + if (!url) { + hexo.log.warn('URL can NOT be empty'); + } + + text = text.trim(); + icon = icon.trim(); + title = title.trim(); + + var result = [' 0 && result.push(' title="' + title + '"'); + result.push('>'); + icon.length > 0 && result.push(''); + text.length > 0 && result.push(text); + result.push(''); + + return result.join(''); +} + +hexo.extend.tag.register('button', postButton); +hexo.extend.tag.register('btn', postButton); diff --git a/themes/next_old/scripts/tags/center-quote.js b/themes/next_old/scripts/tags/center-quote.js new file mode 100644 index 0000000..93c5258 --- /dev/null +++ b/themes/next_old/scripts/tags/center-quote.js @@ -0,0 +1,12 @@ +/* global hexo */ +// Usage: {% centerquote %} Something {% endcenterquote %} +// Alias: {% cq %} Something {% endcq %} + +function centerQuote (args, content) { + return '
      ' + + hexo.render.renderSync({text: content, engine: 'markdown'}) + + '
      '; +} + +hexo.extend.tag.register('centerquote', centerQuote, {ends: true}); +hexo.extend.tag.register('cq', centerQuote, {ends: true}); diff --git a/themes/next_old/scripts/tags/exturl.js b/themes/next_old/scripts/tags/exturl.js new file mode 100644 index 0000000..901a9ce --- /dev/null +++ b/themes/next_old/scripts/tags/exturl.js @@ -0,0 +1,59 @@ +/* global hexo */ +// Usage: {% exturl text url "title" %} +// Alias: {% extlink text url "title" %} + +'use strict'; + +/*jshint camelcase: false */ +var util = require('hexo-util'); +/*jshint camelcase: true */ +var htmlTag = util.htmlTag; + +var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/; + +// Create Base64 Object +var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}; + +function extURL(args, content) { + var exturl = 'exturl'; + var url = ''; + var text = ['']; + var title = ''; + var item = ''; + var i = 0; + var len = args.length; + + // Find link URL and text + for (; i < len; i++) { + item = args[i]; + + if (rUrl.test(item)) { + url = Base64.encode(item); + break; + } else { + text.push(item); + } + } + + // Delete link URL and text from arguments + args = args.slice(i + 1); + + // Check if the link should be open in a new window + // and collect the last text as the link title + if (args.length) { + var shift = args[0]; + title = args.join(' '); + } + + var attrs = { + class: exturl, + 'data-url': url, + title: title + }; + + //console.log(url); + return htmlTag('span', attrs, text.join(' ')); +} + +hexo.extend.tag.register('exturl', extURL, {ends: false}); +hexo.extend.tag.register('extlink', extURL, {ends: false}); diff --git a/themes/next_old/scripts/tags/full-image.js b/themes/next_old/scripts/tags/full-image.js new file mode 100644 index 0000000..d4e0e4f --- /dev/null +++ b/themes/next_old/scripts/tags/full-image.js @@ -0,0 +1,26 @@ +/* global hexo */ +// Usage: {% fullimage /path/to/image, alt, title %} +// Alias: {% fi /path/to/image, alt, title %} + +function fullImage(args) { + args = args.join(' ').split(','); + var src = args[0]; + var alt = args[1] || ''; + var title = args[2] || ''; + + if (!src) { + hexo.log.warn('Image src can NOT be empty'); + } + alt = alt.trim(); + title = title.trim(); + + var image = [' 0 && image.push('alt="' + alt + '"'); + title.length > 0 && image.push('title="' + title + '"'); + image.push('/>'); + + return image.join(' '); +} + +hexo.extend.tag.register('fullimage', fullImage); +hexo.extend.tag.register('fi', fullImage); diff --git a/themes/next_old/scripts/tags/group-pictures.js b/themes/next_old/scripts/tags/group-pictures.js new file mode 100644 index 0000000..df7774b --- /dev/null +++ b/themes/next_old/scripts/tags/group-pictures.js @@ -0,0 +1,833 @@ +/* global hexo */ +// Usage: {% grouppicture group-layout %}{% endgrouppicture %} +// Alias: {% gp group-layout %}{% endgp %} + +function groupPicture(args, content) { + args = args[0].split('-'); + var group = parseInt(args[0]); + var layout = parseInt(args[1]); + + content = hexo.render.renderSync({text: content, engine: 'markdown'}); + + var pictures = content.match(//g); + + return '
      ' + + templates.dispatch(pictures, group, layout) + + '
      '; +} + +var templates = { + + dispatch: function (pictures, group, layout) { + var fn = 'group' + group + 'Layout' + layout; + fn = templates[fn] || templates.defaults; + return fn.call(templates, pictures); + }, + + /** + * 2-1 + * + * □ + * □ + * + * @param pictures + * @returns {string} + */ + group2Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1) + ]); + }, + + /** + * 2-2 + * + * □ □ + * + * @param pictures + */ + group2Layout2: function (pictures) { + return this.getHTML(pictures); + }, + + /** + * 3-1 + * + * □ □ □ + * + * @param pictures + */ + group3Layout1: function (pictures) { + return this.getHTML(pictures); + }, + + /** + * 3-2 + * + * □ + * □ □ + * + * @param pictures + */ + group3Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1) + ]); + }, + + /** + * 3-3 + * + * □ □ + * □ + * + * @param pictures + */ + group3Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2) + ]); + }, + + /** + * 4-1 + * + * □ + * □ □ + * □ + * + * @param pictures + */ + group4Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3) + ]); + }, + + /** + * 4-2 + * + * □ + * □ □ □ + * + * @param pictures + */ + group4Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1) + ]); + }, + + /** + * 4-3 + * + * □ □ + * □ □ + * + * @param pictures + */ + group4Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2) + ]); + }, + + /** + * 4-4 + * + * □ □ □ + * □ + * + * @param pictures + */ + group4Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3) + ]); + }, + + /** + * 5-1 + * + * □ + * □ □ + * □ □ + * + * @param pictures + */ + group5Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3) + ]); + }, + + /** + * 5-2 + * + * □ □ + * □ + * □ □ + * + * @param pictures + */ + group5Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 3), + pictures.slice(3) + ]); + }, + + /** + * 5-3 + * + * □ □ + * □ □ □ + * + * @param pictures + */ + group5Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2) + ]); + }, + + /** + * 5-4 + * + * □ □ □ + * □ □ + * + * @param pictures + */ + group5Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3) + ]); + }, + + /** + * 6-1 + * + * □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group6Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3) + ]); + }, + + /** + * 6-2 + * + * □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group6Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 4), + pictures.slice(4) + ]); + }, + + /** + * 6-3 + * + * □ □ + * □ + * □ □ □ + * + * @param pictures + */ + group6Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 3), + pictures.slice(3) + ]); + }, + + /** + * 6-4 + * + * □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group6Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 4), + pictures.slice(4) + ]); + }, + + /** + * 6-5 + * + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group6Layout5: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3) + ]); + }, + + /** + * 7-1 + * + * □ + * □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group7Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3, 5), + pictures.slice(5) + ]); + }, + + /** + * 7-2 + * + * □ + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group7Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 4), + pictures.slice(4) + ]); + }, + + /** + * 7-3 + * + * □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group7Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 4), + pictures.slice(4) + ]); + }, + + /** + * 7-4 + * + * □ □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group7Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 5), + pictures.slice(5) + ]); + }, + + /** + * 7-5 + * + * □ □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group7Layout5: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 5), + pictures.slice(5) + ]); + }, + + /** + * 8-1 + * + * □ + * □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group8Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3, 5), + pictures.slice(5) + ]); + }, + + /** + * 8-2 + * + * □ + * □ □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group8Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3, 6), + pictures.slice(6) + ]); + }, + + /** + * 8-3 + * + * □ + * □ □ □ + * □ □ + * □ □ + * @param pictures + */ + group8Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 4), + pictures.slice(4, 6), + pictures.slice(6) + ]); + }, + + /** + * 8-4 + * + * □ □ + * □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group8Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 4), + pictures.slice(4, 6), + pictures.slice(6) + ]); + }, + + /** + * 8-5 + * + * □ □ + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group8Layout5: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 5), + pictures.slice(5) + ]); + }, + + /** + * 8-6 + * + * □ □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group8Layout6: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 5), + pictures.slice(5) + ]); + }, + + /** + * 8-7 + * + * □ □ □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group8Layout7: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 6), + pictures.slice(6) + ]); + }, + + /** + * 9-1 + * + * □ + * □ □ + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group9Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 3), + pictures.slice(3, 6), + pictures.slice(6) + ]); + }, + + /** + * 9-2 + * + * □ + * □ □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group9Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 4), + pictures.slice(4, 6), + pictures.slice(6) + ]); + }, + + /** + * 9-3 + * + * □ □ + * □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group9Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 4), + pictures.slice(4, 6), + pictures.slice(6) + ]); + }, + + /** + * 9-4 + * + * □ □ + * □ □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group9Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 4), + pictures.slice(4, 7), + pictures.slice(7) + ]); + }, + + /** + * 9-5 + * + * □ □ + * □ □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group9Layout5: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 5), + pictures.slice(5, 7), + pictures.slice(7) + ]); + }, + + /** + * 9-6 + * + * □ □ □ + * □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group9Layout6: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 5), + pictures.slice(5, 7), + pictures.slice(7) + ]); + }, + + /** + * 9-7 + * + * □ □ □ + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group9Layout7: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 6), + pictures.slice(6) + ]); + }, + + /** + * 10-1 + * + * □ + * □ □ □ + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group10Layout1: function (pictures) { + return this.getHTML([ + pictures.slice(0, 1), + pictures.slice(1, 4), + pictures.slice(4, 7), + pictures.slice(7) + ]); + }, + + /** + * 10-2 + * + * □ □ + * □ □ + * □ □ □ + * □ □ □ + * + * @param pictures + */ + group10Layout2: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 4), + pictures.slice(4, 7), + pictures.slice(7) + ]); + }, + + /** + * 10-3 + * + * □ □ + * □ □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group10Layout3: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 5), + pictures.slice(5, 7), + pictures.slice(7) + ]); + }, + + /** + * 10-4 + * + * □ □ + * □ □ □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group10Layout4: function (pictures) { + return this.getHTML([ + pictures.slice(0, 2), + pictures.slice(2, 5), + pictures.slice(5, 8), + pictures.slice(8) + ]); + }, + + /** + * 10-5 + * + * □ □ □ + * □ □ + * □ □ + * □ □ □ + * + * @param pictures + */ + group10Layout5: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 5), + pictures.slice(5, 7), + pictures.slice(7) + ]); + }, + + /** + * 10-6 + * + * □ □ □ + * □ □ + * □ □ □ + * □ □ + * + * @param pictures + */ + group10Layout6: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 5), + pictures.slice(5, 8), + pictures.slice(8) + ]); + }, + + /** + * 10-7 + * + * □ □ □ + * □ □ □ + * □ □ + * □ □ + * + * @param pictures + */ + group10Layout7: function (pictures) { + return this.getHTML([ + pictures.slice(0, 3), + pictures.slice(3, 6), + pictures.slice(6, 8), + pictures.slice(8) + ]); + }, + + /** + * Defaults Layout + * + * □ □ □ + * □ □ □ + * ... + * + * @param pictures + */ + defaults: function (pictures) { + var ROW_SIZE = 3; + var rows = pictures.length / ROW_SIZE + 1; + var pictureArr = []; + + for (var i = 0; i < rows; i++) { + pictureArr.push(pictures.slice(i * ROW_SIZE, (i + 1) * ROW_SIZE)); + } + + return this.getHTML(pictureArr); + }, + + getHTML: function (rows) { + var rowHTML = ''; + + for (var i = 0; i < rows.length; i++) { + rowHTML += this.getRowHTML(rows[i]); + } + + return '
      ' + rowHTML + '
      '; + }, + + getRowHTML: function (pictures) { + return ( + '
      ' + + this.getColumnHTML(pictures) + + '
      ' + ); + }, + + getColumnHTML: function (pictures) { + var columns = []; + var columnWidth = 100 / pictures.length; + var columnStyle = ' style="width: ' + columnWidth + '%;"'; + + for (var i = 0; i < pictures.length; i++) { + columns.push('
      ' + pictures[i] + '
      '); + } + return columns.join(''); + } +}; + +hexo.extend.tag.register('grouppicture', groupPicture, {ends: true}); +hexo.extend.tag.register('gp', groupPicture, {ends: true}); diff --git a/themes/next_old/scripts/tags/label.js b/themes/next_old/scripts/tags/label.js new file mode 100644 index 0000000..57e54dd --- /dev/null +++ b/themes/next_old/scripts/tags/label.js @@ -0,0 +1,23 @@ +/** + * label.js | global hexo script. + * + * Usage: + * + * {% label [class]@Text %} + * + * [class] : default | primary | success | info | warning | danger. + * If not defined, default class will be selected. + */ + +function postLabel (args) { + args = args.join(' ').split('@'); + var classes = args[0] || 'default'; + var text = args[1] || ''; + + classes = classes.trim(); + !text && hexo.log.warn('Label text must be defined!'); + + return '' + text + ''; +} + +hexo.extend.tag.register('label', postLabel, { ends: false }); diff --git a/themes/next_old/scripts/tags/lazy-image.js b/themes/next_old/scripts/tags/lazy-image.js new file mode 100644 index 0000000..650d57a --- /dev/null +++ b/themes/next_old/scripts/tags/lazy-image.js @@ -0,0 +1,26 @@ +/* global hexo */ +// Usage: {% lazyimage /path/to/image, alt, title %} +// Alias: {% li /path/to/image, alt, title %} + +function lazyImage(args) { + args = args.join(' ').split(','); + var src = args[0]; + var alt = args[1] || ''; + var title = args[2] || ''; + + if (!src) { + hexo.log.warn('Image src can NOT be empty'); + } + alt = alt.trim(); + title = title.trim(); + + var image = [' 0 && image.push('alt="' + alt + '"'); + title.length > 0 && image.push('title="' + title + '"'); + image.push('/>'); + + return image.join(' '); +} + +hexo.extend.tag.register('lazyimage', lazyImage); +hexo.extend.tag.register('li', lazyImage); diff --git a/themes/next_old/scripts/tags/note.js b/themes/next_old/scripts/tags/note.js new file mode 100644 index 0000000..a5690a3 --- /dev/null +++ b/themes/next_old/scripts/tags/note.js @@ -0,0 +1,20 @@ +/** + * note.js | global hexo script. + * + * ATTENTION! No need to write this tag in 1 line if u don't want see probally bugs. + * + * Usage: + * + * {% note [class] %} + * Any content (support inline tags too). + * {% endnote %} + * + * [class] : default | primary | success | info | warning | danger. + * May be not defined. + */ + +function bscallOut (args, content) { + return '
      ' + hexo.render.renderSync({text: content, engine: 'markdown'}).trim() + '
      '; +} + +hexo.extend.tag.register('note', bscallOut, {ends: true}); diff --git a/themes/next_old/scripts/tags/tabs.js b/themes/next_old/scripts/tags/tabs.js new file mode 100644 index 0000000..9af8f68 --- /dev/null +++ b/themes/next_old/scripts/tags/tabs.js @@ -0,0 +1,78 @@ +/** + * tabs.js | global hexo script. + * + * Usage: + * + * {% tabs [Unique name], [index] %} + * + * Any content (support inline tags too). + * + * {% endtabs %} + * + * [Unique name] : Unique name of tabs block tag without comma. + * Will be used in #id's as prefix for each tab with their index numbers. + * If there are whitespaces in name, for generate #id all whitespaces will replaced by dashes. + * Only for current url of post/page must be unique! + * [index] : Index number of active tab. + * If not defined, first tab (1) will be selected. + * If index is -1, no tab will be selected. It's will be something like spoiler. + * May be not defined. + * [Tab caption] : Caption of current tab. + * If not caption specified, unique name with tab index suffix will be used as caption of tab. + * If not caption specified, but specified icon, caption will empty. + * May be not defined. + * [icon] : Font awesome icon. + * May be not defined. + */ + +'use strict'; + + function postTabs (args, content) { + var tabBlock = /\n([\w\W\s\S]*?)/g; + + var args = args.join(' ').split(','); + var tabName = args[0]; + var tabActive = args[1] || ''; + + var matches = []; + var match; + var tabId = 0; + var tabNav = ''; + var tabContent = ''; + + !tabName && hexo.log.warn('Tabs block must have unique name!'); + + while (match = tabBlock.exec(content)) { + matches.push(match[1]); + matches.push(match[2]); + } + + for (var i = 0; i < matches.length; i += 2) { + var tabParameters = matches[i].split('@'); + var postContent = matches[i + 1]; + var tabCaption = tabParameters[0] || ''; + var tabIcon = tabParameters[1] || ''; + var tabHref = ''; + + postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}); + + tabId += 1; + tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-'); + + ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId); + + var isOnlyicon = (tabIcon.length > 0 && tabCaption.length === 0) ? 'style="text-align: center;' : ''; + tabIcon.length > 0 && (tabIcon = ''); + + var isActive = ((tabActive.length > 0 && tabActive == tabId) || (tabActive.length === 0 && tabId == 1)) ? ' active' : ''; + tabNav += '
    16. ' + tabIcon + tabCaption + '
    17. '; + tabContent += '
      ' + postContent + '
      '; + } + + tabNav = ''; + tabContent = '
      ' + tabContent + '
      '; + + return '
      ' + tabNav + tabContent + '
      '; + } + + hexo.extend.tag.register('tabs', postTabs, {ends: true}); diff --git a/themes/next_old/source/css/_common/components/back-to-top-sidebar.styl b/themes/next_old/source/css/_common/components/back-to-top-sidebar.styl new file mode 100644 index 0000000..d23d35d --- /dev/null +++ b/themes/next_old/source/css/_common/components/back-to-top-sidebar.styl @@ -0,0 +1,25 @@ +.back-to-top { + display: none; + margin: 20px -10px -20px; + background: $body-bg-color; + font-size: $b2t-font-size; + opacity: $b2t-opacity; + cursor: pointer; + text-align: center; + -webkit-transform: translateZ(0); + the-transition(); + &:hover { opacity: 0.8; } + + +tablet() { + fixbutton() if hexo-config('sidebar.onmobile'); + hide() if not hexo-config('sidebar.onmobile'); + } + +mobile() { + fixbutton() if hexo-config('sidebar.onmobile'); + hide() if not hexo-config('sidebar.onmobile'); + } + + &.back-to-top-on { + display: block; + } +} diff --git a/themes/next_old/source/css/_common/components/back-to-top.styl b/themes/next_old/source/css/_common/components/back-to-top.styl new file mode 100644 index 0000000..1ae463a --- /dev/null +++ b/themes/next_old/source/css/_common/components/back-to-top.styl @@ -0,0 +1,31 @@ +.back-to-top { + box-sizing: border-box; + position: fixed; + bottom: $b2t-position-bottom; + right: $b2t-position-right; + z-index: $zindex-5; + padding: 0 6px; + width: hexo-config('sidebar.scrollpercent') ? initial : 24px; + background: $b2t-bg-color; + font-size: $b2t-font-size; + opacity: $b2t-opacity; + color: $b2t-color; + cursor: pointer; + text-align: center; + -webkit-transform: translateZ(0); + transition-property: bottom; + the-transition(); + + +tablet() { + fixbutton() if hexo-config('sidebar.onmobile'); + hide() if not hexo-config('sidebar.onmobile'); + } + +mobile() { + fixbutton() if hexo-config('sidebar.onmobile'); + hide() if not hexo-config('sidebar.onmobile'); + } + + &.back-to-top-on { + bottom: $b2t-position-bottom-on; + } +} diff --git a/themes/next_old/source/css/_common/components/buttons.styl b/themes/next_old/source/css/_common/components/buttons.styl new file mode 100644 index 0000000..7712646 --- /dev/null +++ b/themes/next_old/source/css/_common/components/buttons.styl @@ -0,0 +1,38 @@ +.btn { + display: inline-block; + padding: 0 20px; + font-size: $btn-default-font-size; + color: $btn-default-color; + background: $btn-default-bg; + border: $btn-default-border-width solid $btn-default-border-color; + text-decoration: none; + border-radius: $btn-default-radius; + transition-property: background-color; + the-transition(); + line-height: 2; + + &:hover { + border-color: $btn-default-hover-border-color; + color: $btn-default-hover-color; + background: $btn-default-hover-bg; + } + + +.btn { + margin: 0 0 8px 8px; + } + + .fa-fw { + width: (18em / 14); + text-align: left; + } +} + +.btn-bar { + display: block; + width: 22px; + height: 2px; + background: $text-color; + border-radius: 1px; + + &+.btn-bar { margin-top: 4px; } +} diff --git a/themes/next_old/source/css/_common/components/comments.styl b/themes/next_old/source/css/_common/components/comments.styl new file mode 100644 index 0000000..bf3edb9 --- /dev/null +++ b/themes/next_old/source/css/_common/components/comments.styl @@ -0,0 +1 @@ +.comments { margin: 60px 20px 0; } diff --git a/themes/next_old/source/css/_common/components/components.styl b/themes/next_old/source/css/_common/components/components.styl new file mode 100644 index 0000000..fe4a160 --- /dev/null +++ b/themes/next_old/source/css/_common/components/components.styl @@ -0,0 +1,16 @@ +@import "highlight"; +@import "tags"; + +@import "buttons"; +@import "pagination"; +@import "comments"; +@import "tag-cloud"; +@import hexo-config('sidebar.b2t') ? "back-to-top-sidebar" : "back-to-top"; + +@import "header"; +@import "post"; +@import "sidebar"; +@import "footer"; +@import "third-party"; + +@import "pages"; diff --git a/themes/next_old/source/css/_common/components/footer/footer.styl b/themes/next_old/source/css/_common/components/footer/footer.styl new file mode 100644 index 0000000..af7ce8c --- /dev/null +++ b/themes/next_old/source/css/_common/components/footer/footer.styl @@ -0,0 +1,30 @@ +.footer { + font-size: 14px; + color: $grey-dark; + + img { border: none; } +} + +.footer-inner { text-align: center; } + +.with-love { + display: inline-block; + margin: 0 5px; +} + +.powered-by, +.theme-info { display: inline-block; } + +.cc-license { + margin-top: 10px; + text-align: center; + + .cc-opacity { + opacity: 0.7; + border-bottom: none; + + &:hover { opacity: 0.9; } + } + + img { display: inline-block; } +} diff --git a/themes/next_old/source/css/_common/components/header/header.styl b/themes/next_old/source/css/_common/components/header/header.styl new file mode 100644 index 0000000..01f7f8a --- /dev/null +++ b/themes/next_old/source/css/_common/components/header/header.styl @@ -0,0 +1,9 @@ +.header { background: $head-bg; } + +.header-inner { position: relative; } + + +@import "headerband"; +@import "site-meta"; +@import "site-nav"; +@import "menu"; diff --git a/themes/next_old/source/css/_common/components/header/headerband.styl b/themes/next_old/source/css/_common/components/header/headerband.styl new file mode 100644 index 0000000..382dbd9 --- /dev/null +++ b/themes/next_old/source/css/_common/components/header/headerband.styl @@ -0,0 +1,4 @@ +.headband { + height: $headband-height; + background: $headband-bg; +} diff --git a/themes/next_old/source/css/_common/components/header/menu.styl b/themes/next_old/source/css/_common/components/header/menu.styl new file mode 100644 index 0000000..d2b0f05 --- /dev/null +++ b/themes/next_old/source/css/_common/components/header/menu.styl @@ -0,0 +1,32 @@ +// Menu +// -------------------------------------------------- +.menu { + margin-top: 20px; + padding-left: 0; + text-align: center; +} + +.menu .menu-item { + display: inline-block; + margin: 0 10px; + list-style: none; + + @media screen and (max-width: 767px) { + margin-top: 10px; + } + + a { + display: block; + font-size: 13px; + line-height: inherit; + border-bottom: 1px solid $menu-link-border; + transition-property: border-color; + the-transition(); + + &:hover { border-bottom-color: $menu-link-hover-border; } + } + + .fa { margin-right: 5px; } +} + +.use-motion .menu-item { opacity: 0; } diff --git a/themes/next_old/source/css/_common/components/header/site-meta.styl b/themes/next_old/source/css/_common/components/header/site-meta.styl new file mode 100644 index 0000000..efe31ec --- /dev/null +++ b/themes/next_old/source/css/_common/components/header/site-meta.styl @@ -0,0 +1,48 @@ +.site-meta { + margin: 0; + text-align: $site-meta-text-align; + + +mobile() { text-align: center; } +} + +.brand { + position: relative; + display: inline-block; + padding: 0 40px; + color: $brand-color; + background: $brand-bg; + border-bottom: none; + &:hover { color: $brand-hover-color; } +} + +.logo { + display: inline-block; + margin-right: 5px; + line-height: 36px; + vertical-align: top; +} + +.site-title { + display: inline-block; + vertical-align: top; + line-height: 36px; + font-size: $logo-font-size; + font-weight: normal; + font-family: $font-family-logo; +} + +.site-subtitle { + margin-top: 10px; + font-size: $subtitle-font-size; + color: $subtitle-color; +} + +.use-motion { + .brand { opacity: 0; } + + .logo, .site-title, .site-subtitle { + opacity: 0; + position: relative; + top: -10px; + } +} diff --git a/themes/next_old/source/css/_common/components/header/site-nav.styl b/themes/next_old/source/css/_common/components/header/site-nav.styl new file mode 100644 index 0000000..c6446e7 --- /dev/null +++ b/themes/next_old/source/css/_common/components/header/site-nav.styl @@ -0,0 +1,28 @@ +.site-nav-toggle { + display: none; + position: absolute; + top: 10px; + left: 10px; + +mobile() { + display: block; + } + + button { + margin-top: 2px; + padding: 9px 10px; + background: transparent; + border: none; + } +} + +.site-nav { + +mobile() { + display: none; + margin: 0 -10px; + padding: 0 10px; + clear: both; + border-top: 1px solid $gray-lighter; + } + +tablet() { display: block !important; } + +desktop() { display: block !important; } +} diff --git a/themes/next_old/source/css/_common/components/highlight/diff.styl b/themes/next_old/source/css/_common/components/highlight/diff.styl new file mode 100644 index 0000000..f779499 --- /dev/null +++ b/themes/next_old/source/css/_common/components/highlight/diff.styl @@ -0,0 +1,8 @@ +$highlight_theme = hexo-config("highlight_theme") + +if $highlight_theme == "normal" + $highlight-deletion = #fdd + $highlight-addition = #dfd +else + $highlight-deletion = #008000 + $highlight-addition = #800000 diff --git a/themes/next_old/source/css/_common/components/highlight/highlight.styl b/themes/next_old/source/css/_common/components/highlight/highlight.styl new file mode 100644 index 0000000..6b540fd --- /dev/null +++ b/themes/next_old/source/css/_common/components/highlight/highlight.styl @@ -0,0 +1,177 @@ +// https://github.com/chriskempson/tomorrow-theme + +@require "theme" +@require "diff" + +// Placeholder: $code-block +$code-block { + overflow: auto; + margin: 20px 0; + padding: 0; + font-size $code-font-size; + color: $highlight-foreground; + background: $highlight-background; + line-height: $line-height-code-block; +} + +pre, code { font-family: $code-font-family; } + +code { + padding: 2px 4px; + word-wrap: break-word; + color: $code-foreground; + background: $code-background; + border-radius: $code-border-radius; + font-size $code-font-size; +} + +pre { + @extend $code-block; + padding: 10px; + + code { + padding: 0; + color: $highlight-foreground; + background: none; + text-shadow: none; + } +} + +.highlight { + @extend $code-block; + border-radius: 1px + + pre { + border: none; + margin: 0; + padding: 10px 0; + } + + table { + margin: 0; + width: auto; + border: none; + } + + td { + border: none; + padding: 0; + } + + figcaption { + clearfix(); + font-size: 1em; + color: $highlight-foreground; + line-height: 1em; + margin-bottom: 1em; + + a { + float: right; + color: $highlight-foreground; + + &:hover { border-bottom-color: $highlight-foreground; } + } + } + + .gutter pre { + padding-left: 10px + padding-right: 10px + color: $highlight-gutter.color + text-align: right + background-color: $highlight-gutter.bg-color + } + + .code pre { + width: 100% + padding-left: 10px + padding-right: 10px + background-color: $highlight-background + } + + .line { height: 20px; } +} + + +.gutter { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.gist table { + width: auto; + + td { border: none; } +} + +// For diff highlight +pre .deletion { background: $highlight-deletion; } +pre .addition { background: $highlight-addition; } +pre .meta { color: $highlight-purple; } + +pre { + + .comment { color: $highlight-comment; } + + .variable + .attribute + .tag + .regexp + .ruby .constant + .xml .tag .title + .xml .pi + .xml .doctype + .html .doctype + .css .id + .css .class + .css .pseudo { + color: $highlight-red; + } + + .number + .preprocessor + .built_in + .literal + .params + .constant + .command { + color: $highlight-orange; + } + + .ruby .class .title + .css .rules .attribute + .string + .value + .inheritance + .header + .ruby .symbol + .xml .cdata + .special + .number + .formula { + color: $highlight-green; + } + + .title + .css .hexcolor { + color: $highlight-aqua; + } + + .function + .python .decorator + .python .title + .ruby .function .title + .ruby .title .keyword + .perl .sub + .javascript .title + .coffeescript .title { + color: $highlight-blue; + } + + .keyword + .javascript .function { + color: $highlight-purple; + } + +} diff --git a/themes/next_old/source/css/_common/components/highlight/theme.styl b/themes/next_old/source/css/_common/components/highlight/theme.styl new file mode 100644 index 0000000..ff1f4be --- /dev/null +++ b/themes/next_old/source/css/_common/components/highlight/theme.styl @@ -0,0 +1,92 @@ +$highlight_theme = hexo-config("highlight_theme") + + +if $highlight_theme == "normal" + $highlight-background = #f7f7f7 + $highlight-current-line = #efefef + $highlight-selection = #d6d6d6 + $highlight-foreground = #4d4d4c + $highlight-comment = #8e908c + $highlight-red = #c82829 + $highlight-orange = #f5871f + $highlight-yellow = #eab700 + $highlight-green = #718c00 + $highlight-aqua = #3e999f + $highlight-blue = #4271ae + $highlight-purple = #8959a8 + $highlight-gutter = { + color: #869194, + bg-color: #eff2f3 + } + +if $highlight_theme == "night" + $highlight-background = #1d1f21 + $highlight-current-line = #282a2e + $highlight-selection = #373b41 + $highlight-foreground = #c5c8c6 + $highlight-comment = #969896 + $highlight-red = #cc6666 + $highlight-orange = #de935f + $highlight-yellow = #f0c674 + $highlight-green = #b5bd68 + $highlight-aqua = #8abeb7 + $highlight-blue = #81a2be + $highlight-purple = #b294bb + $highlight-gutter = { + color: lighten($highlight-background, 50%), + bg-color: darken($highlight-background, 100%) + } + +if $highlight_theme == "night eighties" + $highlight-background = #2d2d2d + $highlight-current-line = #393939 + $highlight-selection = #515151 + $highlight-foreground = #cccccc + $highlight-comment = #999999 + $highlight-red = #f2777a + $highlight-orange = #f99157 + $highlight-yellow = #ffcc66 + $highlight-green = #99cc99 + $highlight-aqua = #66cccc + $highlight-blue = #6699cc + $highlight-purple = #cc99cc + $highlight-gutter = { + color: $highlight-comment, + bg-color: darken($highlight-background, 40%) + } + +if $highlight_theme == "night blue" + $highlight-background = #002451 + $highlight-current-line = #00346e + $highlight-selection = #003f8e + $highlight-foreground = #ffffff + $highlight-comment = #7285b7 + $highlight-red = #ff9da4 + $highlight-orange = #ffc58f + $highlight-yellow = #ffeead + $highlight-green = #d1f1a9 + $highlight-aqua = #99ffff + $highlight-blue = #bbdaff + $highlight-purple = #ebbbff + $highlight-gutter = { + color: $highlight-comment, + bg-color: darken($highlight-background, 60%) + } + +if $highlight_theme == "night bright" + $highlight-background = #000000 + $highlight-current-line = #2a2a2a + $highlight-selection = #424242 + $highlight-foreground = #eaeaea + $highlight-comment = #969896 + $highlight-red = #d54e53 + $highlight-orange = #e78c45 + $highlight-yellow = #e7c547 + $highlight-green = #b9ca4a + $highlight-aqua = #70c0b1 + $highlight-blue = #7aa6da + $highlight-purple = #c397d8 + $highlight-gutter = { + color: lighten($highlight-background, 40%), + bg-color: lighten($highlight-background, 16%) + } diff --git a/themes/next_old/source/css/_common/components/pages/archive.styl b/themes/next_old/source/css/_common/components/pages/archive.styl new file mode 100644 index 0000000..8a1363d --- /dev/null +++ b/themes/next_old/source/css/_common/components/pages/archive.styl @@ -0,0 +1,29 @@ +.page-archive { + + .archive-page-counter { + position: relative; + top: 3px; + left: 20px; + + +mobile() { + top: 5px; + } + } + + .posts-collapse { + + .archive-move-on { + position: absolute; + top: 11px; + left: 0; + margin-left: -6px; + width: 10px; + height: 10px; + opacity: 0.5; + background: $black-light; + border: 1px solid white; + + circle(); + } + } +} diff --git a/themes/next_old/source/css/_common/components/pages/categories.styl b/themes/next_old/source/css/_common/components/pages/categories.styl new file mode 100644 index 0000000..db3bb10 --- /dev/null +++ b/themes/next_old/source/css/_common/components/pages/categories.styl @@ -0,0 +1,27 @@ +.category-all-page { + .category-all-title { text-align: center; } + + .category-all { margin-top: 20px; } + + .category-list { + margin: 0; + padding: 0; + list-style: none; + } + + .category-list-item { margin: 5px 10px; } + + .category-list-count { + color: $grey; + &:before { + display: inline; + content: " (" + } + &:after { + display: inline; + content: ") " + } + } + + .category-list-child { padding-left: 10px; } +} diff --git a/themes/next_old/source/css/_common/components/pages/pages.styl b/themes/next_old/source/css/_common/components/pages/pages.styl new file mode 100644 index 0000000..cb14d04 --- /dev/null +++ b/themes/next_old/source/css/_common/components/pages/pages.styl @@ -0,0 +1,6 @@ +// Page specific styles + +@import "archive"; +@import "categories"; +@import "schedule"; +@import "post-detail"; diff --git a/themes/next_old/source/css/_common/components/pages/post-detail.styl b/themes/next_old/source/css/_common/components/pages/post-detail.styl new file mode 100644 index 0000000..3f26afd --- /dev/null +++ b/themes/next_old/source/css/_common/components/pages/post-detail.styl @@ -0,0 +1,6 @@ +.page-post-detail { + + .sidebar-toggle-line { background: $sidebar-highlight; } + + .comments { overflow: hidden; } +} diff --git a/themes/next_old/source/css/_common/components/pages/schedule.styl b/themes/next_old/source/css/_common/components/pages/schedule.styl new file mode 100644 index 0000000..18ec933 --- /dev/null +++ b/themes/next_old/source/css/_common/components/pages/schedule.styl @@ -0,0 +1,101 @@ +@keyframes dot-flash { + from {opacity: 1; transform:scale(1.1);} + to {opacity: 0; transform:scale(1);} +} + +#schedule { + ul#event-list { + padding-left: 30px + hr { + margin: 20px 0 45px 0!important + background: #222 + &:after { + display: inline-block + content: 'NOW' + background: #222 + color: #FFF + font-weight:bold + text-align: right + padding: 0 5px + } + } + li.event { + margin: 20px 0px + background: #F9F9F9 + padding-left: 10px + min-height: 40px + h2.event-summary { + margin: 0 + padding-bottom: 3px + &:before { + display: inline-block + font-family: FontAwesome + font-size: 8px + content: '\f111' + vertical-align: middle + margin-right: 25px + color: #bbb + } + } + span.event-relative-time { + display: inline-block + font-size: 12px + font-weight: 400 + padding-left: 12px + color: #bbb + } + span.event-details { + display: block + color: #bbb + margin-left: 56px + padding-top: 3px + padding-bottom: 6px + text-indent: -24px + line-height: 18px + &:before { + text-indent: 0 + display: inline-block + width: 14px + font-family: FontAwesome + text-align: center + margin-right: 9px + color: #bbb + } + &.event-location:before { + content: '\f041' + } + &.event-duration:before { + content: '\f017' + } + } + } + li.event-past { + background: #FCFCFC + & > * { + opacity: .6 + } + h2.event-summary { + color: #bbb + &:before { + color: #DFDFDF + } + } + } + li.event-now { + background: #222 + color: #FFF + padding: 15px 0 15px 10px + h2.event-summary { + &:before { + transform: scale(1.2) + color: #FFF + animation: dot-flash 1s alternate infinite ease-in-out; + } + } + * { + color: #FFF!important + } + } + } +} + diff --git a/themes/next_old/source/css/_common/components/pagination.styl b/themes/next_old/source/css/_common/components/pagination.styl new file mode 100644 index 0000000..a054ef0 --- /dev/null +++ b/themes/next_old/source/css/_common/components/pagination.styl @@ -0,0 +1,56 @@ +.pagination { + margin: 120px 0 40px; + text-align: center; + border-top: 1px solid $pagination-border; +} + +.page-number-basic { + display: inline-block; + position: relative; + top: -1px; + margin: 0 10px; + padding: 0 11px; + + +mobile() { margin: 0 5px; } +} + +.pagination { + .prev, .next, .page-number { + @extend .page-number-basic; + border-bottom: 0; + border-top: 1px solid $pagination-link-border; + transition-property: border-color; + the-transition(); + + &:hover { border-top-color: $pagination-link-hover-border; } + } + + .space { + @extend .page-number-basic; + padding: 0; + margin: 0; + } + + .prev { margin-left: 0; } + .next { margin-right: 0; } + + .page-number.current { + color: $pagination-active-color; + background: $pagination-active-bg; + border-top-color: $pagination-active-border; + } +} + +@media (max-width: 767px) + .pagination { border-top: none; } + + .pagination { + .prev, .next, .page-number { + margin-bottom: 10px; + border-top: 0; + border-bottom: 1px solid $pagination-link-border; + padding: 0 10px; + + &:hover { border-bottom-color: $pagination-link-hover-border; } + } + } diff --git a/themes/next_old/source/css/_common/components/post/post-button.styl b/themes/next_old/source/css/_common/components/post/post-button.styl new file mode 100644 index 0000000..fd0809f --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-button.styl @@ -0,0 +1,3 @@ +.post-button { + margin-top: 40px; +} diff --git a/themes/next_old/source/css/_common/components/post/post-collapse.styl b/themes/next_old/source/css/_common/components/post/post-collapse.styl new file mode 100644 index 0000000..6633a45 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-collapse.styl @@ -0,0 +1,111 @@ +// TODO: Refactor. + +@media (max-width: 767px) { + .posts-collapse { + margin: 0 20px; + + .post-title, .post-meta { + display: block; + width: auto; + text-align: left; + } + } +} + +.posts-collapse { + position: relative; + z-index: $zindex-1; + + &::after { + content: " "; + position: absolute; + top: 20px; + left: 0; + margin-left: -2px; + width: 4px; + height: 100%; + background: $whitesmoke; + z-index: $zindex-bottom; + } + + margin-left: $posts-collapse-left; + +mobile() { margin: 0 20px; } + + .collection-title { + position: relative; + margin: 60px 0; + + h1, h2 { margin-left: 20px; } + + small { color: $grey; margin-left: 5px; } + + &::before { + content: " "; + position: absolute; + left: 0; + top: 50%; + margin-left: -4px; + margin-top: -4px; + width: 8px; + height: 8px; + background: $grey; + circle(); + } + } + + .post { margin: 30px 0; } + + .post-header { + position: relative; + the-transition(); + transition-property: border; + border-bottom: 1px dashed $grey-light; + + &::before { + content: " "; + position: absolute; + left: 0; + top: 12px; + width: 6px; + height: 6px; + margin-left: -4px; + background: $grey; + circle(); + border: 1px solid white; + the-transition(); + transition-property: background; + } + } + + .post-header:hover { + border-bottom-color: $grey-dim; + + &::before { background: $black-deep; } + } + + .post-meta { + position: absolute; + font-size: 12px; + left: 20px; + top: 5px; + } + + .post-comments-count { display: none; } + + .post-title { + margin-left: 60px; + font-size: 16px; + font-weight: normal; + line-height: inherit; + + &::after { + margin-left: 3px; + opacity: 0.6; + } + + a { + color: $grey-dim; + border-bottom: none; + } + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-copyright.styl b/themes/next_old/source/css/_common/components/post/post-copyright.styl new file mode 100644 index 0000000..f1cc7cb --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-copyright.styl @@ -0,0 +1,7 @@ +.post-copyright { + margin: $post-copyright.margin; + padding: $post-copyright.padding; + border-left: $post-copyright.border.width $post-copyright.border.style $post-copyright.border.color; + background-color: $post-copyright.bg; + list-style: none; +} diff --git a/themes/next_old/source/css/_common/components/post/post-eof.styl b/themes/next_old/source/css/_common/components/post/post-eof.styl new file mode 100644 index 0000000..e430325 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-eof.styl @@ -0,0 +1,17 @@ +.posts-expand { + .post-eof { + display: block; + margin: $post-eof-margin-top auto $post-eof-margin-bottom; + width: 8%; + height: 1px; + background: $grey-light; + text-align: center; + } +} + + +.post:last-child { + .post-eof.post-eof.post-eof { + display: none; + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-expand.styl b/themes/next_old/source/css/_common/components/post/post-expand.styl new file mode 100644 index 0000000..8c6d8a5 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-expand.styl @@ -0,0 +1,64 @@ +// TODO: Refactor. + +.posts-expand { + padding-top: 40px; +} + +@media (max-width: 767px) { + .posts-expand { + margin: 0 20px; + } + + .post-body { + pre { + .gutter pre { + padding-right: 10px; + } + } + + .highlight { + margin-left: 0px; + margin-right: 0px; + padding: 0; + .gutter pre { + padding-right: 10px; + } + } + } +} + +.posts-expand .post-body { + +desktop() { text-align: justify; } + + + h2, h3, h4, h5, h6 { + padding-top: 10px; + + .header-anchor{ + float: right; + margin-left: 10px; + color: $grey-light; + border-bottom-style: none; + visibility: hidden; + + &:hover{ + color: inherit; + } + } + + &:hover .header-anchor{ + visibility: visible; + } + } + + ul li { list-style: circle; } + + img { + box-sizing: border-box; + margin: auto; + padding: 3px; + border: 1px solid $gray-lighter; + } +} + +.posts-expand .post-body .fancybox img { margin: 0 auto 25px; } diff --git a/themes/next_old/source/css/_common/components/post/post-gallery.styl b/themes/next_old/source/css/_common/components/post/post-gallery.styl new file mode 100644 index 0000000..b2385ae --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-gallery.styl @@ -0,0 +1,23 @@ +.post-gallery { + display: table; + table-layout: fixed; + width: 100%; + border-collapse: separate; +} + +.post-gallery-row { display: table-row; } + +.post-gallery .post-gallery-img { + display: table-cell; + text-align: center; + vertical-align: middle; + border: none; +} + +.post-gallery .post-gallery-img img { + max-width: 100%; + max-height: 100%; + border: none; +} + +.fancybox-close, .fancybox-close:hover { border: none; } diff --git a/themes/next_old/source/css/_common/components/post/post-meta.styl b/themes/next_old/source/css/_common/components/post/post-meta.styl new file mode 100644 index 0000000..d715203 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-meta.styl @@ -0,0 +1,49 @@ +.posts-expand .post-meta { + margin: 3px 0 60px 0; + color: $grey-dark; + font-family: $font-family-posts; + font-size: 12px; + text-align: center; + + .post-category-list { + display: inline-block; + margin: 0; + padding: 3px; + } + .post-category-list-link { color: $grey-dark; } + + .post-description { + font-size: 14px; + margin-top: 2px; + } +} + +.post-wordcount { + if !hexo-config('post_wordcount.separated_meta') { display: inline-block; } +} + +.post-meta-divider { + margin: 0 .5em; +} + +.post-meta-item-icon { + margin-right: 3px; + +tablet() { + display: inline-block; + } + +mobile() { + display: inline-block; + } +} +.post-meta-item-text { + +tablet() { + display: none; + } + +mobile() { + display: none; + } +} + +.posts-expand .post-comments-count { + +mobile() { display: none; } +} diff --git a/themes/next_old/source/css/_common/components/post/post-nav.styl b/themes/next_old/source/css/_common/components/post/post-nav.styl new file mode 100644 index 0000000..fa85838 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-nav.styl @@ -0,0 +1,57 @@ +.post-nav { + display: table; + margin-top: 15px; + width: 100%; + border-top: 1px solid $gainsboro; +} + +.post-nav-divider { + display: table-cell; + width: 10%; +} + +.post-nav-item { + display: table-cell; + padding: 10px 0 0 0; + width: 45%; + vertical-align: top; + + a { + position: relative; + display: block; + line-height: 25px; + font-size: 14px; + color: $link-color; + border-bottom: none; + + &:hover { + color: $link-hover-color; + border-bottom: none; + } + + &:active { top: 2px; } + } + + .fa { + position: absolute; + top: 8px; + left: 0; + font-size: 12px; + } + +} + +.post-nav-next { + a { padding-left: 15px; } +} + +.post-nav-prev { + text-align: right; + + a { padding-right: 15px; } + + .fa { + right: 0; + left: auto; + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-reward.styl b/themes/next_old/source/css/_common/components/post/post-reward.styl new file mode 100644 index 0000000..450a104 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-reward.styl @@ -0,0 +1,64 @@ +#rewardButton { + cursor: pointer; + border: 0; + outline: 0; + border-radius: 5px; + padding: 0; + margin: 0; + letter-spacing: normal; + text-transform: none; + text-indent: 0px; + text-shadow: none; +} +#rewardButton span { + display: inline-block; + width: 80px; + height: 35px; + border-radius: 5px; + color: #fff; + font-weight: 400; + font-style: normal; + font-variant: normal; + font-stretch: normal; + font-size: 18px; + font-family: "Microsoft Yahei"; + background: #F44336; +} +#rewardButton span:hover{ + background: #F7877F; +} +#QR{ + padding-top:20px; +} +#QR a{ + border:0; +} +#QR img{ + width: 180px; + max-width: 100%; + display: inline-block; + margin: 0.8em 2em 0 2em; +} +#wechat:hover p{ + animation: roll 0.1s infinite linear; + -webkit-animation: roll 0.1s infinite linear; + -moz-animation: roll 0.1s infinite linear; +} +#alipay:hover p{ + animation: roll 0.1s infinite linear; + -webkit-animation: roll 0.1s infinite linear; + -moz-animation: roll 0.1s infinite linear; +} +#bitcoin:hover p { + animation: roll 0.1s infinite linear; + -webkit-animation: roll 0.1s infinite linear; + -moz-animation: roll 0.1s infinite linear; +} +@keyframes roll { + from { + transform(rotateZ(30deg)); + } + to { + transform(rotateZ(-30deg)); + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-rtl.styl b/themes/next_old/source/css/_common/components/post/post-rtl.styl new file mode 100644 index 0000000..ea048b9 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-rtl.styl @@ -0,0 +1,11 @@ +.rtl { + &.post-body { + p, a, h1, h2, h3, h4, h5, h6, li, ul, ol { + direction: rtl; + font-family: UKIJ Ekran; + } + } + &.post-title { + font-family: UKIJ Ekran; + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-tags.styl b/themes/next_old/source/css/_common/components/post/post-tags.styl new file mode 100644 index 0000000..8c04ec7 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-tags.styl @@ -0,0 +1,10 @@ +.posts-expand .post-tags { + margin-top: 40px; + text-align: center; + + a { + display: inline-block; + margin-right: 10px; + font-size: 13px; + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-title.styl b/themes/next_old/source/css/_common/components/post/post-title.styl new file mode 100644 index 0000000..dcd1c06 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-title.styl @@ -0,0 +1,33 @@ +.posts-expand .post-title { + text-align: center; + word-break: break-word; + font-weight: $posts-expand-title-font-weight +} +.posts-expand .post-title-link { + display: inline-block; + position: relative; + color: $black-light; + border-bottom: none; + line-height: 1.2; + vertical-align: top; + + &::before { + content: ""; + position: absolute; + width: 100%; + height: 2px; + bottom: 0; + left: 0; + background-color: #000; + visibility: hidden; + transform: scaleX(0); + the-transition(); + } + + &:hover::before { + visibility: visible; + transform: scaleX(1); + } + + .fa { font-size: 16px; } +} diff --git a/themes/next_old/source/css/_common/components/post/post-type.styl b/themes/next_old/source/css/_common/components/post/post-type.styl new file mode 100644 index 0000000..c3d2510 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-type.styl @@ -0,0 +1,14 @@ +// TODO: Refactor. + +.page-home, .page-post-detail { + .post-type-quote { + .post-header, + .post-tags { + display: none; + } + + blockquote { + @extend .blockquote-center + } + } +} diff --git a/themes/next_old/source/css/_common/components/post/post-widgets.styl b/themes/next_old/source/css/_common/components/post/post-widgets.styl new file mode 100644 index 0000000..4914c5a --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post-widgets.styl @@ -0,0 +1,41 @@ +.post-widgets { + border-top: 1px solid #eee; + padding-top: 9px; + margin-top: 45px; + display: flex; + justify-content: center; + flex-wrap: wrap; + align-items: center; + + .post-meta-divider { + height: 28px; + color: $grey-dark; + } +} + +.wp_rating { + height: 20px; + margin-right: 10px; + text-align: center; + line-height: 20px; + padding-top: 6px; +} + +.social-like { + font-size: 14px; + text-align: center; + display: flex; + justify-content: center; +} + +.vk_like { + width: 85px; + height: 21px; + padding-top: 7px; + align-self: center; +} + +.fb_like { + height: 30px; + align-self: center; +} diff --git a/themes/next_old/source/css/_common/components/post/post.styl b/themes/next_old/source/css/_common/components/post/post.styl new file mode 100644 index 0000000..f8a05f7 --- /dev/null +++ b/themes/next_old/source/css/_common/components/post/post.styl @@ -0,0 +1,60 @@ +.post-body { + font-family: $font-family-posts; + +mobile() { + word-break: break-word; + } +} + +.post-body .fancybox img { + display: block !important; + margin: 0 auto; + cursor: pointer; + cursor: zoom-in; + cursor: -webkit-zoom-in; +} + +.post-body .image-caption { + margin: -20px auto 15px; + text-align: center; + font-size: $font-size-base; + color: $grey-dark; + font-weight: bold; + line-height: 1; +} + +.post-body .figure .caption { + @extend .post-body .image-caption; +} + +.post-sticky-flag { + display: inline-block; + font-size: 16px; + -ms-transform: rotate(30deg); + transform: rotate(30deg); +} + +.use-motion { + if hexo-config('motion.transition.post_block') { + .post-block, + .pagination, + .comments { opacity: 0; } + } + if hexo-config('motion.transition.post_header') { .post-header { opacity: 0; } } + if hexo-config('motion.transition.post_body') { .post-body { opacity: 0; } } + if hexo-config('motion.transition.coll_header') { .collection-title { opacity: 0; } } +} + +@import "post-expand"; +@import "post-collapse"; +@import "post-type"; +@import "post-title"; +@import "post-meta"; +@import "post-button"; +@import "post-tags"; +@import "post-nav"; +@import "post-eof"; +@import "post-gallery"; +@import "post-reward" if hexo-config('alipay') or hexo-config('wechatpay') or hexo-config('bitcoin'); +@import "post-copyright" if hexo-config('post_copyright.enable'); +@import "post-widgets" if (hexo-config('facebook_sdk.enable') and hexo-config('facebook_sdk.like_button')) or (hexo-config('vkontakte_api.enable') and hexo-config('vkontakte_api.like')) or hexo-config('rating.enable') or (hexo-config('needmoreshare2.enable') and hexo-config('needmoreshare2.postbottom.enable')); +@import "post-rtl"; diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-author-links.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-author-links.styl new file mode 100644 index 0000000..227e839 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-author-links.styl @@ -0,0 +1,23 @@ +.links-of-author { + margin-top: 20px; +} + +.links-of-author a { + display: inline-block; + vertical-align: middle; + margin-right: 10px; + margin-bottom: 10px; + border-bottom-color: $black-light; + font-size: 13px; + + &:before { + display: inline-block; + vertical-align: middle; + margin-right: 3px; + content: " "; + width: 4px; + height: 4px; + border-radius: 50%; + background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%); + } +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-author.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-author.styl new file mode 100644 index 0000000..14ac717 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-author.styl @@ -0,0 +1,22 @@ +.site-author-image { + display: block; + margin: 0 auto; + padding: $site-author-image-padding; + max-width: $site-author-image-width; + height: $site-author-image-height; + border: $site-author-image-border-width solid $site-author-image-border-color; +} + +.site-author-name { + margin: $site-author-name-margin; + text-align: $site-author-name-align; + color: $site-author-name-color; + font-weight: $site-author-name-weight; +} + +.site-description { + margin-top: $site-description-margin-top; + text-align: $site-description-align; + font-size: $site-description-font-size; + color: $site-description-color; +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-blogroll.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-blogroll.styl new file mode 100644 index 0000000..b677e68 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-blogroll.styl @@ -0,0 +1,25 @@ +.links-of-blogroll { font-size: 13px; } + +.links-of-blogroll-title { + margin-top: 20px; + font-size: 14px; + font-weight: $font-weight-bold; +} +.links-of-blogroll-list { + margin: 0; + padding: 0; + list-style: none; +} + +.links-of-blogroll-item { + padding: 2px 10px; + + a { + max-width: 280px; + box-sizing: border-box; + display: inline-block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-dimmer.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-dimmer.styl new file mode 100644 index 0000000..b2da3ce --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-dimmer.styl @@ -0,0 +1,21 @@ +.sidebar-active #sidebar-dimmer { + opacity: .7; + -webkit-transform: translateX(-150%); + transform: translateX(-150%); + transition: opacity .2s; +} + +#sidebar-dimmer { + display: none; + position: absolute; + top: 0; + left: 100%; + width: 200%; + height: 100%; + background: #000; + opacity: 0; + transition: opacity .2s,transform 0s .2s; + +mobile() { + display: block; + } +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-feed-link.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-feed-link.styl new file mode 100644 index 0000000..b3868a8 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-feed-link.styl @@ -0,0 +1,23 @@ +.feed-link { + margin-top: 20px; + + a { + display: inline-block; + padding: 0 15px; + color: rgb(252, 100, 35); + border: 1px solid rgb(252, 100, 35); + border-radius: 4px; + + i { + color: rgb(252, 100, 35); + font-size: 14px; + } + + &:hover { + color:white; + background: rgb(252, 100, 35); + + i { color: white; } + } + } +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-nav.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-nav.styl new file mode 100644 index 0000000..973eda7 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-nav.styl @@ -0,0 +1,29 @@ +// Sidebar Navigation + +.sidebar-nav { + margin: 0 0 20px; + padding-left: 0; +} +.sidebar-nav li { + display: inline-block; + cursor: pointer; + border-bottom: 1px solid transparent; + font-size: 14px; + color: $sidebar-nav-color; + + &:hover { color: $sidebar-nav-hover-color; } +} + +.page-post-detail .sidebar-nav-toc { padding: 0 5px; } + +.page-post-detail .sidebar-nav-overview { margin-left: 10px; } + +.sidebar-nav .sidebar-nav-active { + color: $sidebar-highlight; + border-bottom-color: $sidebar-highlight; + + &:hover { color: $sidebar-highlight; } +} + +.sidebar-panel { display: none; } +.sidebar-panel-active { display: block; } diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-toc.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-toc.styl new file mode 100644 index 0000000..27e15f0 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-toc.styl @@ -0,0 +1,60 @@ + +.post-toc-empty { + font-size: 14px; + color: $grey-dim; +} + +.post-toc-wrap { overflow: hidden; } + +.post-toc { overflow: auto; } + +.post-toc ol { + margin: 0; + padding: 0 2px 5px 10px; + text-align: left; + list-style: none; + font-size: 14px; + + & > ol { padding-left: 0; } + + a { + the-transition(); + transition-property: all; + color: $toc-link-color; + border-bottom-color: $toc-link-border-color; + + &:hover { + color: $toc-link-hover-color; + border-bottom-color: $toc-link-hover-border-color; + } + } +} + +.post-toc .nav-item { + overflow: hidden; + text-overflow: ellipsis; + text-align: justify; + white-space: nowrap if !hexo-config('toc.wrap'); + line-height: 1.8; +} + +.post-toc .nav .nav-child { display: none; } + +.post-toc .nav .active > .nav-child { display: block; } + +.post-toc .nav .active-current > .nav-child { + display: block; + & > .nav-item { display: block; } +} + +.post-toc .nav .active > a { + color: $toc-link-active-color; + border-bottom-color: $toc-link-active-border-color; +} + +.post-toc .nav .active-current > a { + color: $toc-link-active-current-color; + &:hover { + color: $toc-link-active-current-border-color; + } +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar-toggle.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar-toggle.styl new file mode 100644 index 0000000..c4b6a06 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar-toggle.styl @@ -0,0 +1,36 @@ +.sidebar-toggle { + position: fixed; + right: $b2t-position-right; + bottom: 45px; + width: 14px; + height: 14px; + padding: 5px; + background: $black-deep; + line-height: 0; + z-index: $zindex-5; + cursor: pointer; + -webkit-transform: translateZ(0); + + +tablet() { + fixbutton() if hexo-config('sidebar.onmobile'); + hide() if not hexo-config('sidebar.onmobile'); + } + +mobile() { + fixbutton() if hexo-config('sidebar.onmobile'); + hide() if not hexo-config('sidebar.onmobile'); + } +} + + + +.sidebar-toggle-line { + position: relative; + display: inline-block; + vertical-align: top; + height: 2px; + width: 100%; + background: white; + margin-top: 3px; + + &:first-child { margin-top: 0; } +} diff --git a/themes/next_old/source/css/_common/components/sidebar/sidebar.styl b/themes/next_old/source/css/_common/components/sidebar/sidebar.styl new file mode 100644 index 0000000..635cc94 --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/sidebar.styl @@ -0,0 +1,52 @@ +.sidebar { + position: fixed; + right: 0; + top: 0; + bottom: 0; + + width: 0; + z-index: $zindex-4; + box-shadow: inset 0 2px 6px black; + background: $black-deep; + -webkit-transform: translateZ(0); // http://stackoverflow.com/questions/17079857/position-fixed-broken-in-chrome-with-flash-behind + + a { + color: $grey-dark; + border-bottom-color: $black-light; + &:hover { color: $gainsboro; } + } + + +tablet() { + hide() if not hexo-config('sidebar.onmobile'); + } + +mobile() { + hide() if not hexo-config('sidebar.onmobile'); + } + +} + +.sidebar-inner { + position: relative; + padding: 20px 10px; + color: $grey-dark; + text-align: center; +} + +.site-overview-wrap { + overflow: hidden; +} + +.site-overview { + overflow-y: auto; + overflow-x: hidden; +} + +@import "sidebar-toggle"; +@import "sidebar-author"; +@import "site-state"; +@import "sidebar-feed-link"; +@import "sidebar-author-links"; +@import "sidebar-blogroll"; +@import "sidebar-nav"; +@import "sidebar-toc"; +@import "sidebar-dimmer" if hexo-config('sidebar.onmobile'); diff --git a/themes/next_old/source/css/_common/components/sidebar/site-state.styl b/themes/next_old/source/css/_common/components/sidebar/site-state.styl new file mode 100644 index 0000000..c05b0ea --- /dev/null +++ b/themes/next_old/source/css/_common/components/sidebar/site-state.styl @@ -0,0 +1,28 @@ +.site-state { + overflow: hidden; + line-height: 1.4; + white-space: nowrap; + text-align: $site-state-align; +} + +.site-state-item { + display: inline-block; + padding: 0 15px; + border-left: 1px solid $site-state-item-border-color; + + &:first-child { border-left: none; } + + a { border-bottom: none; } +} +.site-state-item-count { + display: block; + text-align: center; + color: $site-state-item-count-color; + font-weight: $font-weight-bold; + font-size: $site-state-item-count-font-size; +} + +.site-state-item-name { + font-size: $site-state-item-name-font-size; + color: $site-state-item-name-color; +} diff --git a/themes/next_old/source/css/_common/components/tag-cloud.styl b/themes/next_old/source/css/_common/components/tag-cloud.styl new file mode 100644 index 0000000..30b01c6 --- /dev/null +++ b/themes/next_old/source/css/_common/components/tag-cloud.styl @@ -0,0 +1,8 @@ +.tag-cloud { + text-align: center; + + a { + display: inline-block; + margin: 10px; + } +} \ No newline at end of file diff --git a/themes/next_old/source/css/_common/components/tags/blockquote-center.styl b/themes/next_old/source/css/_common/components/tags/blockquote-center.styl new file mode 100644 index 0000000..b0f3bcc --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/blockquote-center.styl @@ -0,0 +1,33 @@ +// Blockquote with all children centered. +.blockquote-center { + position: relative; + margin: 40px 0; + padding: 0; + border-left: none; + text-align: center; + + &::before, &::after { + position: absolute; + content: ' '; + display: block; + width: 100%; + height: 24px; + opacity: 0.2; + background-repeat: no-repeat; + background-position: 0 -6px; + background-size: 22px 22px; + } + &::before { + top: -20px; + background-image: url($center-quote-left); + border-top: 1px solid $grey-light; + } + &::after { + bottom: -20px; + background-image: url($center-quote-right); + border-bottom: 1px solid $grey-light; + background-position: 100% 8px; + } + + p, div { text-align: center; } +} diff --git a/themes/next_old/source/css/_common/components/tags/exturl.styl b/themes/next_old/source/css/_common/components/tags/exturl.styl new file mode 100644 index 0000000..49a1684 --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/exturl.styl @@ -0,0 +1,18 @@ +.exturl { + // Remove the gray background color from active links in IE 10. + background-color: transparent; + + cursor: pointer; + border-bottom: 1px solid #999; + + .fa { + font-size: 14px; + } +} + +// Improve readability when focused and also mouse hovered in all browsers. +.exturl:active, .exturl:hover { + outline: 0; + color: $black-deep; + border-bottom-color: $black-deep; +} diff --git a/themes/next_old/source/css/_common/components/tags/full-image.styl b/themes/next_old/source/css/_common/components/tags/full-image.styl new file mode 100644 index 0000000..11ae578 --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/full-image.styl @@ -0,0 +1,12 @@ +// Expand image to 126% with nagative margin-left/right on Desktop. +.full-image.full-image.full-image.full-image { + border: none; + max-width: 100%; + width: auto; + margin: 20px auto 25px; + +desktop() { + max-width: none; + width: $full-image-width; + margin: $full-image-margin-vertical $full-image-margin-horizontal; + } +} diff --git a/themes/next_old/source/css/_common/components/tags/group-pictures.styl b/themes/next_old/source/css/_common/components/tags/group-pictures.styl new file mode 100644 index 0000000..ce1461d --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/group-pictures.styl @@ -0,0 +1,35 @@ +.post .post-body .group-picture { + img { + box-sizing: border-box; + padding: 0 3px; + border: none; + } +} + +.post .group-picture-row { + overflow: hidden; + margin-top: 6px; + &:first-child { margin-top: 0; } +} + +.post .group-picture-column { float: left; } + +.page-post-detail .post-body .group-picture-column { + float: none; + margin-top: 10px; + width: auto !important; + img { margin: 0 auto; } +} + +.page-archive { + .group-picture-container { overflow: hidden; } + .group-picture-row { + float: left; + &:first-child { margin-top: 6px; } + } + + .group-picture-column { + max-width: 150px; + max-height: 150px; + } +} diff --git a/themes/next_old/source/css/_common/components/tags/label.styl b/themes/next_old/source/css/_common/components/tags/label.styl new file mode 100644 index 0000000..541dd2d --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/label.styl @@ -0,0 +1,12 @@ +.post-body .label { + display: inline; + padding: 0 2px; + white-space: nowrap; + + &.default { background-color: $label-default; } + &.primary { background-color: $label-primary; } + &.info { background-color: $label-info; } + &.success { background-color: $label-success; } + &.warning { background-color: $label-warning; } + &.danger { background-color: $label-danger; } +} diff --git a/themes/next_old/source/css/_common/components/tags/note-modern.styl b/themes/next_old/source/css/_common/components/tags/note-modern.styl new file mode 100644 index 0000000..cf7659e --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/note-modern.styl @@ -0,0 +1,183 @@ +.post-body .note { + note_icons = hexo-config('note.icons'); + + position: relative; + padding: 15px; + margin-bottom: 20px; + + border: 1px solid transparent; + background-color: $whitesmoke; + border-radius: unit(hexo-config('note.border_radius'), px) if hexo-config('note.border_radius') is a 'unit'; + + h2, h3, h4, h5, h6 { + if note_icons { + margin-top: 3px; + } else { + margin-top: 0; + } + margin-bottom: 0; + border-bottom: initial; + padding-top: 0 !important; + } + + p, ul, ol, table, pre, blockquote { + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } + } + + if note_icons { + &:not(.no-icon) { + padding-left: 45px; + &:before { + position: absolute; + font-family: 'FontAwesome'; + font-size: larger; + top: 13px; + left: 15px; + } + } + } + + &.default { + background-color: $note-modern-default-bg; + border-color: $note-modern-default-border; + color: $note-modern-default-text; + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-default-icon; + } + } + } + a { + &:not(.btn) { + color: $note-modern-default-text; + border-bottom: 1px solid $note-modern-default-text; + &:hover { + color: $note-modern-default-hover; + border-bottom: 1px solid $note-modern-default-hover; + } + } + } + } + + &.primary { + background-color: $note-modern-primary-bg; + border-color: $note-modern-primary-border; + color: $note-modern-primary-text; + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-primary-icon; + } + } + } + a { + &:not(.btn) { + color: $note-modern-primary-text; + border-bottom: 1px solid $note-modern-primary-text; + &:hover { + color: $note-modern-primary-hover; + border-bottom: 1px solid $note-modern-primary-hover; + } + } + } + } + + &.info { + background-color: $note-modern-info-bg; + border-color: $note-modern-info-border; + color: $note-modern-info-text; + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-info-icon; + } + } + } + a { + &:not(.btn) { + color: $note-modern-info-text; + border-bottom: 1px solid $note-modern-info-text; + &:hover { + color: $note-modern-info-hover; + border-bottom: 1px solid $note-modern-info-hover; + } + } + } + } + + &.success { + background-color: $note-modern-success-bg; + border-color: $note-modern-success-border; + color: $note-modern-success-text; + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-success-icon; + } + } + } + a { + &:not(.btn) { + color: $note-modern-success-text; + border-bottom: 1px solid $note-modern-success-text; + &:hover { + color: $note-modern-success-hover; + border-bottom: 1px solid $note-modern-success-hover; + } + } + } + } + + &.warning { + background-color: $note-modern-warning-bg; + border-color: $note-modern-warning-border; + color: $note-modern-warning-text; + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-warning-icon; + } + } + } + a { + &:not(.btn) { + color: $note-modern-warning-text; + border-bottom: 1px solid $note-modern-warning-text; + &:hover { + color: $note-modern-warning-hover; + border-bottom: 1px solid $note-modern-warning-hover; + } + } + } + } + + &.danger { + background-color: $note-modern-danger-bg; + border-color: $note-modern-danger-border; + color: $note-modern-danger-text; + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-danger-icon; + } + } + } + a { + &:not(.btn) { + color: $note-modern-danger-text; + border-bottom: 1px solid $note-modern-danger-text; + &:hover { + color: $note-modern-danger-hover; + border-bottom: 1px solid $note-modern-danger-hover; + } + } + } + } + +} diff --git a/themes/next_old/source/css/_common/components/tags/note.styl b/themes/next_old/source/css/_common/components/tags/note.styl new file mode 100644 index 0000000..4b234b0 --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/note.styl @@ -0,0 +1,161 @@ +.post-body .note { + note_style = hexo-config('note.style'); + note_icons = hexo-config('note.icons'); + + position: relative; + padding: 15px; + margin-bottom: 20px; + + if note_style == 'simple' { + border: 1px solid $gainsboro; + border-left-width: 5px; + } + if note_style == 'flat' { + border: initial; + border-left: 3px solid $gainsboro; + background-color: lighten($gainsboro, 65%); + } + border-radius: unit(hexo-config('note.border_radius'), px) if hexo-config('note.border_radius') is a 'unit'; + + h2, h3, h4, h5, h6 { + if note_icons { + margin-top: 3px; + } else { + margin-top: 0; + } + margin-bottom: 0; + border-bottom: initial; + padding-top: 0 !important; + } + + p, ul, ol, table, pre, blockquote { + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } + } + + if note_icons { + &:not(.no-icon) { + padding-left: 45px; + &:before { + position: absolute; + font-family: 'FontAwesome'; + font-size: larger; + top: 13px; + left: 15px; + } + } + } + + &.default { + if note_style == 'flat' { + background-color: $note-default-bg; + } + border-left-color: $note-default-border; + h2, h3, h4, h5, h6 { + color: $note-default-text; + } + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-default-icon; + color : $note-default-text; + } + } + } + } + + &.primary { + if note_style == 'flat' { + background-color: $note-primary-bg; + } + border-left-color: $note-primary-border; + h2, h3, h4, h5, h6 { + color: $note-primary-text; + } + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-primary-icon; + color : $note-primary-text; + } + } + } + } + + &.info { + if note_style == 'flat' { + background-color: $note-info-bg; + } + border-left-color: $note-info-border; + h2, h3, h4, h5, h6 { + color: $note-info-text; + } + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-info-icon; + color : $note-info-text; + } + } + } + } + + &.success { + if note_style == 'flat' { + background-color: $note-success-bg; + } + border-left-color: $note-success-border; + h2, h3, h4, h5, h6 { + color: $note-success-text; + } + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-success-icon; + color : $note-success-text; + } + } + } + } + + &.warning { + if note_style == 'flat' { + background-color: $note-warning-bg; + } + border-left-color: $note-warning-border; + h2, h3, h4, h5, h6 { + color: $note-warning-text; + } + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-warning-icon; + color : $note-warning-text; + } + } + } + } + + &.danger { + if note_style == 'flat' { + background-color: $note-danger-bg; + } + border-left-color: $note-danger-border; + h2, h3, h4, h5, h6 { + color: $note-danger-text; + } + if note_icons { + &:not(.no-icon) { + &:before { + content: $note-danger-icon; + color : $note-danger-text; + } + } + } + } + +} diff --git a/themes/next_old/source/css/_common/components/tags/tabs.styl b/themes/next_old/source/css/_common/components/tags/tabs.styl new file mode 100644 index 0000000..c3c27c4 --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/tabs.styl @@ -0,0 +1,99 @@ +.post-body .tabs { + position: relative; + display: block; + margin-bottom: 20px; + padding-top: 10px; + + // Read tabs border_radius from NexT config and set in "tbr px" to use it as string variable in this CSS section. + hexo-config('tabs.border_radius') is a 'unit' ? (tbr = unit(hexo-config('tabs.border_radius'), px)) : (tbr = 0) + + ul.nav-tabs { + margin: 0; + padding: 0; + display: flex; + margin-bottom: -1px; + + +mobile-smallest() { + display: block; + margin-bottom: 5px; + } + + li.tab { + list-style-type: none !important; + margin: 0 .25em 0 0; + border-top: 3px solid transparent; + border-left: 1px solid transparent; + border-right: 1px solid transparent; + + +mobile-smallest() { + margin: initial; + border-top: 1px solid transparent; + border-left: 3px solid transparent; + border-right: 1px solid transparent; + border-bottom: 1px solid transparent; + } + + if tbr > 0 { + border-radius: tbr tbr 0 0; + +mobile-smallest() { border-radius: tbr; } + } + if hexo-config('tabs.transition.tabs') { the-transition-ease-out(); } + + & a { + outline: 0; + border-bottom: initial; + display: block; + line-height: 1.8em; + padding: .25em .75em; + & i { width: (18em / 14); } + if hexo-config('tabs.transition.labels') { the-transition-ease-out(); } + } + + &.active { + border-top: 3px solid $orange; + border-left: 1px solid $table-border-color; + border-right: 1px solid $table-border-color; + background-color: #fff; + + +mobile-smallest() { + border-top: 1px solid $table-border-color; + border-left: 3px solid $orange; + border-right: 1px solid $table-border-color; + border-bottom: 1px solid $table-border-color; + } + + & a { + cursor: default; + color: $link-color; + } + } + } + + } + + .tab-content { + background-color: #fff; + + .tab-pane { + border: 1px solid $table-border-color; + padding: 20px 20px 0 20px; + if tbr > 0 { border-radius: tbr; } + + &:not(.active) { + hide(); + } + &.active { + show(); + if tbr > 0 { + &:nth-of-type(1) { + border-radius: 0 tbr tbr tbr; + +mobile-smallest() { border-radius: tbr; } + } + } + } + + } + + } + +} diff --git a/themes/next_old/source/css/_common/components/tags/tags.styl b/themes/next_old/source/css/_common/components/tags/tags.styl new file mode 100644 index 0000000..e7e027a --- /dev/null +++ b/themes/next_old/source/css/_common/components/tags/tags.styl @@ -0,0 +1,8 @@ +@import "full-image"; +@import "blockquote-center"; +@import "group-pictures"; +@import "exturl" if hexo-config('exturl'); +@import "note" if hexo-config('note.style') == 'simple' || hexo-config('note.style') == 'flat'; +@import "note-modern" if hexo-config('note.style') == 'modern'; +@import "label" if hexo-config('label'); +@import "tabs" if hexo-config('tabs.enable'); diff --git a/themes/next_old/source/css/_common/components/third-party/algolia-search.styl b/themes/next_old/source/css/_common/components/third-party/algolia-search.styl new file mode 100644 index 0000000..e2e9828 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/algolia-search.styl @@ -0,0 +1,125 @@ +.algolia-pop-overlay + position: fixed + width: 100% + height: 100% + top: 0 + left: 0 + z-index: 2080 + background-color: rgba(0, 0, 0, 0.3) + +.algolia-popup + overflow: hidden + padding: 0 + display: none + position: fixed + top: 10% + left: 50% + width: 700px + height: 80% + margin-left: -350px + background: #fff + color: #333 + z-index: 9999 + border-radius: 5px + +mobile() + padding: 0 + top: 0 + left: 0 + margin: 0 + width: 100% + height: 100% + border-radius: 0 + + .popup-btn-close + position: absolute + right: 14px + color: #4EBD79 + font-size: 14px + font-weight: bold + text-transform: uppercase + cursor: pointer + padding-left: 15px + border-left: 1px solid #eee + top: 10px + .fa + color: $grey-dark + font-size: 18px + &:hover .fa + color: $black-deep + +.algolia-search + padding: 10px 15px 5px + max-height: 50px + border-bottom: 1px solid #ccc + background: $whitesmoke + border-top-left-radius: 5px + border-top-right-radius: 5px + +.algolia-search-input-icon + display: inline-block + width: 20px + .fa + font-size: 18px + +.algolia-search-input + display: inline-block + width: calc(90% - 20px) + input + padding: 5px 0 + width: 100% + outline: none + border: none + background: transparent + +.algolia-powered + float: right + img + display: inline-block + height: 18px + vertical-align: middle + +.algolia-results + position: relative + overflow: auto + padding: 10px 30px + height: calc(100% - 50px) + + hr + margin: 10px 0 + + .highlight + font-style: normal + margin: 0 + padding: 0 2px + font-size: inherit + color: red + +.algolia-hits + margin-top: 20px + +.algolia-hit-item + margin: 15px 0 + +.algolia-hit-item-link + display: block + border-bottom: 1px dashed #ccc + the-transition() + +.algolia-pagination + .pagination + margin-top: 40px + border-top: none + padding: 0 + .pagination-item + display: inline-block + .page-number + border-top: none + &:hover + border-bottom: 1px solid $black-deep + + .current .page-number + @extend .pagination .page-number.current + + .disabled-item + visibility: hidden + diff --git a/themes/next_old/source/css/_common/components/third-party/baidushare.styl b/themes/next_old/source/css/_common/components/third-party/baidushare.styl new file mode 100644 index 0000000..fc42b71 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/baidushare.styl @@ -0,0 +1,12 @@ +.post-spread { + margin-top: 20px; + text-align: center; +} + +.bdshare-slide-button-box a { border: none; } + +.bdsharebuttonbox { + display: inline-block; + + a { border: none; } +} diff --git a/themes/next_old/source/css/_common/components/third-party/busuanzi-counter.styl b/themes/next_old/source/css/_common/components/third-party/busuanzi-counter.styl new file mode 100644 index 0000000..960fef6 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/busuanzi-counter.styl @@ -0,0 +1,30 @@ +if hexo-config("scheme") == Pisces + .busuanzi-count { + +tablet() { + width: auto; + } + +mobile() { + width: auto; + } + } + +.site-uv, +.site-pv, +.page-pv { + display: inline-block; + + .busuanzi-value { + margin: 0 5px; + } +} + +if hexo-config("busuanzi_count.site_pv") and hexo-config("busuanzi_count.site_uv") + .site-uv + { + margin-right: 10px; + + &::after { + content: "|"; + padding-left: 10px; + } + } diff --git a/themes/next_old/source/css/_common/components/third-party/duoshuo.styl b/themes/next_old/source/css/_common/components/third-party/duoshuo.styl new file mode 100644 index 0000000..3359518 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/duoshuo.styl @@ -0,0 +1,290 @@ + +.theme-next { + $duoshuoBaseBorderColor = #c7d4e1; + $duoshuoBaseBgColor = #f6f8fa; + + #ds-thread #ds-reset { + color: #555; + } + + #ds-thread #ds-reset .ds-replybox { + margin-bottom: 30px; + } + + #ds-thread #ds-reset .ds-replybox .ds-avatar, #ds-reset .ds-avatar img { + box-shadow: none; + } + + #ds-thread #ds-reset .ds-textarea-wrapper { + border-color: $duoshuoBaseBorderColor; + background: none; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + } + + + #ds-thread #ds-reset .ds-textarea-wrapper textarea { + height: 60px; + } + + #ds-reset .ds-rounded-top { + border-radius: 0; + } + + #ds-thread #ds-reset .ds-post-toolbar { + box-sizing: border-box; + border: 1px solid $duoshuoBaseBorderColor; + background: $duoshuoBaseBgColor; + } + + #ds-thread #ds-reset .ds-post-options { + height: 40px; + border: none; + background: none; + } + + #ds-thread #ds-reset .ds-toolbar-buttons { + top: 11px; + } + + #ds-thread #ds-reset .ds-sync { + top: 5px; + } + + #ds-thread #ds-reset .ds-post-button { + top: 4px; + right: 5px; + width: 90px; + height: 30px; + border: 1px solid #c5ced7; + border-radius: 3px; + background-image: linear-gradient(#fbfbfc, #f5f7f9); + color: #60676d; + } + + #ds-thread #ds-reset .ds-post-button:hover { + background-position: 0 -30px; + color: #60676d; + } + + #ds-thread #ds-reset .ds-comments-info { + padding: 10px 0; + } + + #ds-thread #ds-reset .ds-sort { + display: none; + } + + #ds-thread #ds-reset li.ds-tab a.ds-current { + border: none; + background: $duoshuoBaseBgColor; + color: #60676d; + + &:hover { + background-color: #e9f0f7; + color: #60676d; + } + } + + #ds-thread #ds-reset li.ds-tab a { + border-radius: 2px; + padding: 5px; + } + + #ds-thread #ds-reset .ds-login-buttons p { + color: #999; + line-height: 36px; + } + + #ds-thread #ds-reset .ds-login-buttons .ds-service-list li { + height: 28px; + } + + #ds-thread #ds-reset .ds-service-list a { + background: none; + padding: 5px; + border: 1px solid; + border-radius: 3px; + text-align: center; + + &:hover { + color: #fff; + background: #666; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-weibo { + color: #fc9b00; + border-color: #fc9b00; + + &:hover { + background: #fc9b00; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-qq { + color: #60a3ec; + border-color: #60a3ec; + + &:hover { + background: #60a3ec; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-renren { + color: #2e7ac4; + border-color: #2e7ac4; + + &:hover { + background: #2e7ac4; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-douban { + color: #37994c; + border-color: #37994c; + + &:hover { + background: #37994c; + } + } + #ds-thread #ds-reset .ds-service-list .ds-kaixin { + color: #fef20d; + border-color: #fef20d; + + &:hover { + background: #fef20d; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-netease { + color: #f00; + border-color: #f00; + + &:hover { + background: #f00; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-sohu { + color: #ffcb05; + border-color: #ffcb05; + + &:hover { + background: #ffcb05; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-baidu { + color: #2831e0; + border-color: #2831e0; + + &:hover { + background: #2831e0; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-google { + color: #166bec; + border-color: #166bec; + + &:hover { + background: #166bec; + } + } + + #ds-thread #ds-reset .ds-service-list .ds-weixin { + color: #00CE0D; + border-color: #00CE0D; + + &:hover { + background: #00CE0D; + } + } + #ds-thread #ds-reset .ds-service-list .ds-more-services { + border: none; + &:hover { + background: none; + } + } + +/*duoshuo UA style begin*/ + + #ds-reset .duoshuo-ua-admin { + display: inline-block; + color: red; + } + + #ds-reset .duoshuo-ua-platform, + #ds-reset .duoshuo-ua-browser { + color: #ccc; + + .fa { + display: inline-block; + margin-right: 3px; + } + } + + #ds-reset .duoshuo-ua-separator { + display: inline-block; + margin-left: 5px; + } + + .this_ua { + background-color: #ccc !important; + border-radius: 4px; + padding: 0 5px !important; + margin: 1px 1px !important; + border: 1px solid #BBB !important; + color: #fff; + display: inline-block !important; + } + + .this_ua.admin { + background-color: #d9534f !important; + border-color: #d9534f !important; + } + + .this_ua.platform.iOS, .this_ua.platform.Mac, .this_ua.platform.Windows { + background-color: #39b3d7 !important; + border-color: #46b8da !important; + } + + .this_ua.platform.Linux { + background-color: #3A3A3A !important; + border-color: #1F1F1F !important; + } + + .this_ua.platform.Android { + background-color: #00C47D !important; + border-color: #01B171 !important; + } + + .this_ua.browser.Mobile, .this_ua.browser.Chrome { + background-color: #5cb85c !important; + border-color: #4cae4c !important; + } + + .this_ua.browser.Firefox { + background-color: #f0ad4e !important; + border-color: #eea236 !important; + } + + .this_ua.browser.Maxthon, .this_ua.browser.IE { + background-color: #428bca !important; + border-color: #357ebd !important; + } + + .this_ua.browser.baidu, .this_ua.browser.UCBrowser, .this_ua.browser.Opera { + background-color: #d9534f !important; + border-color: #d43f3a !important; + } + + .this_ua.browser.Android, .this_ua.browser.QQBrowser { + background-color: #78ACE9 !important; + border-color: #4cae4c !important; + } + +/*duoshuo UA style end*/ + +} diff --git a/themes/next_old/source/css/_common/components/third-party/gitment.styl b/themes/next_old/source/css/_common/components/third-party/gitment.styl new file mode 100644 index 0000000..52babf0 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/gitment.styl @@ -0,0 +1,13 @@ +#gitment-display-button{ + display: inline-block; + padding: 0 15px; + color: #0a9caf; + cursor: pointer; + font-size: 14px; + border: 1px solid #0a9caf; + border-radius: 4px; +} +#gitment-display-button:hover{ + color: #fff; + background: #0a9caf; +} \ No newline at end of file diff --git a/themes/next_old/source/css/_common/components/third-party/han.styl b/themes/next_old/source/css/_common/components/third-party/han.styl new file mode 100644 index 0000000..d02c969 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/han.styl @@ -0,0 +1,3 @@ +.fa { + font-family: FontAwesome!important; +} diff --git a/themes/next_old/source/css/_common/components/third-party/jiathis.styl b/themes/next_old/source/css/_common/components/third-party/jiathis.styl new file mode 100644 index 0000000..d501fb5 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/jiathis.styl @@ -0,0 +1,10 @@ +.post-spread { + margin-top: 20px; + text-align: center; +} + +.jiathis_style { + display: inline-block; + + a { border: none; } +} \ No newline at end of file diff --git a/themes/next_old/source/css/_common/components/third-party/localsearch.styl b/themes/next_old/source/css/_common/components/third-party/localsearch.styl new file mode 100644 index 0000000..85f43cf --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/localsearch.styl @@ -0,0 +1,102 @@ +.local-search-pop-overlay + position: fixed + width: 100% + height: 100% + top: 0 + left: 0 + z-index: 2080 + background-color: rgba(0, 0, 0, 0.3) + +.local-search-popup + display: none + position: fixed + top: 10% + left: 50% + margin-left: -350px + width: 700px + height: 80% + padding: 0 + background: #fff + color: #333 + z-index: 9999 + border-radius: 5px + +mobile() + padding: 0 + top: 0 + left: 0 + margin: 0 + width: 100% + height: 100% + border-radius: 0 + + ul.search-result-list + padding: 0 + margin: 0 5px + + p.search-result + border-bottom: 1px dashed #ccc + padding: 5px 0 + + a.search-result-title + font-weight: bold + font-size: 16px + + .search-keyword + border-bottom: 1px dashed #f00 + font-weight: bold + color: #f00 + + .local-search-header + padding: 5px + height: 36px + background: #f5f5f5 + border-top-left-radius: 5px + border-top-right-radius: 5px + + #local-search-result + overflow: auto + position: relative + padding: 5px 25px + height: calc(100% - 55px) + + .local-search-input-wrapper + display: inline-block + width: calc(100% - 90px) + height: 36px + line-height: 36px + padding: 0 5px + + .local-search-input-wrapper input + padding: 8px 0 + height: 20px + display: block + width: 100% + outline: none + border: none + background: transparent + vertical-align: middle + + .search-icon, .popup-btn-close + display: inline-block + font-size: 18px + color: #999 + height: 36px + width: 18px + padding-left: 10px + padding-right: 10px + + .search-icon + float: left + + .popup-btn-close + border-left: 1px solid #eee + float: right + cursor: pointer + + #no-result + position: absolute + left: 50% + top: 50% + -webkit-transform: translate(-50%, -50%) + transform: translate(-50%, -50%) + color: #ccc diff --git a/themes/next_old/source/css/_common/components/third-party/needsharebutton.styl b/themes/next_old/source/css/_common/components/third-party/needsharebutton.styl new file mode 100644 index 0000000..2caae44 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/needsharebutton.styl @@ -0,0 +1,27 @@ +#needsharebutton-postbottom { + position: relative; + cursor: pointer; + height: 26px; + + .btn { + display: initial; + padding: 1px 4px; + border: 1px solid $btn-default-border-color; + border-radius: 3px; + } +} + +#needsharebutton-float { + position: fixed; + bottom: 38px; + left: -8px; + z-index: 9999; + cursor: pointer; + + .btn { + //display: initial; + padding: 0 10px 0 14px + border: 1px solid $btn-default-border-color; + border-radius: 4px; + } +} diff --git a/themes/next_old/source/css/_common/components/third-party/third-party.styl b/themes/next_old/source/css/_common/components/third-party/third-party.styl new file mode 100644 index 0000000..c2298d0 --- /dev/null +++ b/themes/next_old/source/css/_common/components/third-party/third-party.styl @@ -0,0 +1,9 @@ +@import "duoshuo"; +@import "gitment" if hexo-config('gitment.enable'); +@import "jiathis"; +@import "han"; +@import "baidushare"; +@import "localsearch"; +@import "busuanzi-counter"; +@import "algolia-search" if hexo-config('algolia_search.enable'); +@import "needsharebutton" if hexo-config('needmoreshare2.enable'); diff --git a/themes/next_old/source/css/_common/outline/outline.styl b/themes/next_old/source/css/_common/outline/outline.styl new file mode 100644 index 0000000..7337e18 --- /dev/null +++ b/themes/next_old/source/css/_common/outline/outline.styl @@ -0,0 +1,58 @@ +// +// Layout +// Note: Must name this file "outline" instead of "layout" +// Or Hexo will use it as template layout. +// ================================================= + + +html, body { height: 100%; } + +.container { + position: relative; + min-height: 100%; +} + + +// Header Section +// -------------------------------------------------- +.header-inner { + margin: 0 auto; + padding: 100px 0 70px; + width: $content-desktop; + + +desktop-large() { + .container & { width: $content-desktop-large; } + } +} + +// Main Section +// -------------------------------------------------- +.main { padding-bottom: $footer-height + $gap-between-main-and-footer; } +.main-inner { + margin: 0 auto; + width: $content-desktop; + + +desktop-large() { + .container & { width: $content-desktop-large; } + } +} + + +// Footer Section +// -------------------------------------------------- +.footer { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + min-height: $footer-height; +} +.footer-inner { + box-sizing: border-box; + margin: 20px auto; + width: $content-desktop; + + +desktop-large() { + .container & { width: $content-desktop-large; } + } +} diff --git a/themes/next_old/source/css/_common/scaffolding/base.styl b/themes/next_old/source/css/_common/scaffolding/base.styl new file mode 100644 index 0000000..74c77e3 --- /dev/null +++ b/themes/next_old/source/css/_common/scaffolding/base.styl @@ -0,0 +1,111 @@ + +::selection { + background: $selection-bg; + color: $selection-color; +} + +body { + position: relative; // Required by scrollspy + font-family: $font-family-base; + font-size: $font-size-base; + line-height: $line-height-base; + color: $text-color; + background: $body-bg-color; + + +mobile() { padding-right: 0 !important; } + +tablet() { padding-right: 0 !important; } + +desktop-large() { font-size: $font-size-large; } +} + +h1, h2, h3, h4, h5, h6 { + margin: 0; + padding: 0; + font-weight: bold; + line-height: 1.5; + font-family: $font-family-headings; +} + +h2, h3, h4, h5, h6 { margin: 20px 0 15px; } + +for headline in (1..6) { + h{headline} { + font-size: $font-size-headings-base - $font-size-headings-step * headline; + } + + +mobile() { + h{headline} { + font-size: $font-size-headings-base - $font-size-headings-step * headline - 4px; + } + } +} + +p { margin: 0 0 20px 0; } + +a { + color: $link-color; + text-decoration: none; + outline: none; + border-bottom: 1px solid $grey-dark; + word-wrap: break-word; + + &:hover { + color: $link-hover-color; + border-bottom-color: $link-decoration-hover-color; + } +} + +blockquote { + margin: 0; + padding: 0; +} + +img { + display: block; + margin: auto; + max-width: 100%; + height: auto; +} + + +hr { + margin: 40px 0; + height: 3px; + border: none; + background-color: $gray-lighter; + background-image: repeating-linear-gradient( + -45deg, + white, + white 4px, + transparent 4px, + transparent 8px + ); +} + +blockquote { + padding: 0 15px; + color: $grey-dim; + border-left: 4px solid $gray-lighter; + + cite::before { + content: "-"; + padding: 0 5px; + } +} + +dt { font-weight: $font-weight-bolder; } + +dd { + margin: 0; + padding: 0; +} + +kbd { + border: 1px solid $grey-light; + border-radius: 0.2em; + box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); + background-color: #f9f9f9; + font-family: inherit; + background-image: -webkit-linear-gradient(top, #eee, white, #eee); + padding: 0.1em 0.3em; + white-space: nowrap; +} diff --git a/themes/next_old/source/css/_common/scaffolding/helpers.styl b/themes/next_old/source/css/_common/scaffolding/helpers.styl new file mode 100644 index 0000000..a00d0bb --- /dev/null +++ b/themes/next_old/source/css/_common/scaffolding/helpers.styl @@ -0,0 +1,67 @@ +// +// Helpers +// ================================================= + + + +// Alignment +.text-left { text-align: left; } +.text-center { text-align: center; } +.text-right { text-align: right; } +.text-justify { text-align: justify; } +.text-nowrap { white-space: nowrap; } + + +// Transformation +.text-lowercase { text-transform: lowercase; } +.text-uppercase { text-transform: uppercase; } +.text-capitalize { text-transform: capitalize; } + + +// Center-align a block level element. +.center-block { + display: block; + margin-left: auto; + margin-right: auto; +} + + +// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/ +.clearfix { + clearfix(); +} + +.pullquote { + width: 45%; + + &.left { + float: left; + margin-left: 5px; + margin-right: 10px; + } + + &.right { + float: right; + margin-left: 10px; + margin-right: 5px; + } +} + +.affix.affix.affix { position: fixed; } + +.translation { + margin-top: -20px; + font-size: 14px; + color: $grey-dark; +} + +// https://davidwalsh.name/detect-scrollbar-width +.scrollbar-measure { + width: 100px; + height: 100px; + overflow: scroll; + position: absolute; + top: -9999px; +} + +.use-motion .motion-element { opacity: 0; } diff --git a/themes/next_old/source/css/_common/scaffolding/mobile.styl b/themes/next_old/source/css/_common/scaffolding/mobile.styl new file mode 100644 index 0000000..191fbfd --- /dev/null +++ b/themes/next_old/source/css/_common/scaffolding/mobile.styl @@ -0,0 +1,121 @@ +/* +// > 1600px ++desktop-large() { + +} + +// > 992px ++desktop() { + +} + +// > 768px & < 991px ++tablet() { + +} + + +// < 767px ++mobile() { + +} +*/ + +// < 567px ++mobile-small() { + + // For Muse & Mist schemes only vertical economy. + .header-inner { + margin-bottom: initial !important; + } + .main-inner { + margin-top: initial !important; + } + + // For Pisces & Gemini schemes only wider width (remove main blocks in Gemini). + .content-wrap { + padding: initial !important; + } + + // For all schemes wider width. + .posts-expand { + padding-top: $content-mobile-padding !important; + // For Muse & Mist & Pisces schemes only wider width. + margin: initial !important; + + .post-header { + padding: 0 18px; + } + + .post-meta { + margin: 3px 0 10px 0 !important; + } + + } + + .post-block { + // Inside posts blocks content padding (default 40px). + padding: $content-mobile-padding 0 !important; + } + + .post-body { + // For headers narrow width. + h2, h3, h4, h5, h6 { + margin: 10px 18px 8px; + } + // Rewrite paddings & margins inside tags. + .note, .tabs .tab-content .tab-pane { + h2, h3, h4, h5, h6 { + margin: 0 5px; + } + } + + // For paragraphs narrow width. + p { + margin: 0 0 10px 0; + padding: 0 18px; + } + + // Rewrite paddings & margins inside tags. + .note > p, .tabs .tab-content .tab-pane > p { + padding: 0 5px; + } + + .video-container .fluid-vids { + margin-bottom: 10px !important; + } + + .note { + padding: 10px !important; + margin-bottom: 10px !important; + + if hexo-config('note.icons') { + &:not(.no-icon) { + padding-left: 35px !important; + &:before { + top: 8px !important; + left: 12px !important; + } + } + } + } + + .tabs .tab-content .tab-pane { + padding: 10px 10px 0 10px !important; + } + } + + // Need to refactor into flex. + .post-nav { + padding-bottom: 2px; + //padding: 2px 8px; + } + +} + +/* +// < 413px ++mobile-smallest() { + +} +*/ diff --git a/themes/next_old/source/css/_common/scaffolding/normalize.styl b/themes/next_old/source/css/_common/scaffolding/normalize.styl new file mode 100644 index 0000000..81c6f31 --- /dev/null +++ b/themes/next_old/source/css/_common/scaffolding/normalize.styl @@ -0,0 +1,427 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} \ No newline at end of file diff --git a/themes/next_old/source/css/_common/scaffolding/scaffolding.styl b/themes/next_old/source/css/_common/scaffolding/scaffolding.styl new file mode 100644 index 0000000..b5d3500 --- /dev/null +++ b/themes/next_old/source/css/_common/scaffolding/scaffolding.styl @@ -0,0 +1,9 @@ +// +// Scaffolding +// ================================================= + +@import "normalize"; +@import "base"; +@import "helpers"; +@import "tables"; +@import "mobile" if hexo-config('mobile_layout_economy'); diff --git a/themes/next_old/source/css/_common/scaffolding/tables.styl b/themes/next_old/source/css/_common/scaffolding/tables.styl new file mode 100644 index 0000000..c653b81 --- /dev/null +++ b/themes/next_old/source/css/_common/scaffolding/tables.styl @@ -0,0 +1,33 @@ +table { + margin: 20px 0; + width: $table-width; + border-collapse: collapse; + border-spacing: 0; + border: 1px solid $table-border-color; + font-size: $table-font-size; + table-layout: fixed; + word-wrap: break-all; +} +table>tbody>tr { + &:nth-of-type(odd) { background-color: $table-row-odd-bg-color; } + &:hover { background-color: $table-row-hover-bg-color; } +} + +caption, th, td { + padding: $table-cell-padding; + text-align: $table-content-alignment; + vertical-align: $table-content-vertical; + font-weight: normal; +} + +th, td { + border-bottom: 3px solid $table-cell-border-bottom-color; + border-right: 1px solid $table-cell-border-right-color; +} + +th { + padding-bottom: 10px; + font-weight: $table-th-font-weight; +} + +td { border-bottom-width: 1px; } diff --git a/themes/next_old/source/css/_custom/custom.styl b/themes/next_old/source/css/_custom/custom.styl new file mode 100644 index 0000000..63937f7 --- /dev/null +++ b/themes/next_old/source/css/_custom/custom.styl @@ -0,0 +1 @@ +// Custom styles. diff --git a/themes/next_old/source/css/_mixins/Gemini.styl b/themes/next_old/source/css/_mixins/Gemini.styl new file mode 100644 index 0000000..eb4102e --- /dev/null +++ b/themes/next_old/source/css/_mixins/Gemini.styl @@ -0,0 +1 @@ +@import "Pisces.styl"; diff --git a/themes/next_old/source/css/_mixins/Mist.styl b/themes/next_old/source/css/_mixins/Mist.styl new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/source/css/_mixins/Muse.styl b/themes/next_old/source/css/_mixins/Muse.styl new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/source/css/_mixins/Pisces.styl b/themes/next_old/source/css/_mixins/Pisces.styl new file mode 100644 index 0000000..34543b1 --- /dev/null +++ b/themes/next_old/source/css/_mixins/Pisces.styl @@ -0,0 +1,17 @@ +sidebar-inline-links-item() { + margin: 5px 0 0; + if !hexo-config('social_icons.icons_only') { width: 50%; } + + & a { + max-width: 216px; + box-sizing: border-box; + display: inline-block; + margin-right: 0; + margin-bottom: 0; + padding: 0 5px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + if hexo-config('social_icons.transition') { the-transition(); } + } +} diff --git a/themes/next_old/source/css/_mixins/base.styl b/themes/next_old/source/css/_mixins/base.styl new file mode 100644 index 0000000..0e787f7 --- /dev/null +++ b/themes/next_old/source/css/_mixins/base.styl @@ -0,0 +1,92 @@ +the-transition() { + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} + +the-transition-ease-in() { + transition-duration: 0.2s; + transition-timing-function: ease-in; + transition-delay: 0s; +} + +the-transition-ease-out() { + transition-duration: 0.2s; + transition-timing-function: ease-out; + transition-delay: 0s; +} + +mobile-smallest() { + @media (max-width: 413px) { + {block} + } +} + +mobile-small() { + @media (max-width: 567px) { + {block} + } +} + +mobile() { + @media (max-width: 767px) { + {block} + } +} + +tablet() { + @media (min-width: 768px) and (max-width: 991px) { + {block} + } +} + +desktop() { + @media (min-width: 992px) { + {block} + } +} + +desktop-large() { + @media (min-width: 1600px) { + {block} + } +} + +circle() { + border-radius: 50%; +} + +transform() { + -webkit-transform: arguments + -moz-transform: arguments + -ms-transform: arguments + -o-transform: arguments + transform: arguments +} + +hide() { + display: none !important; +} + +show() { + display: block !important; +} + +fixbutton() { + right: 20px; + opacity: 0.8; +} + +random-color($min, $max) { + return floor(math(0, 'random') * ($max - $min + 1) + $min); +} + +// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/ +clearfix() { + &:before, + &:after { + content: " "; + display: table; + } + &:after { clear: both; } +} diff --git a/themes/next_old/source/css/_mixins/custom.styl b/themes/next_old/source/css/_mixins/custom.styl new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/source/css/_schemes/Gemini/index.styl b/themes/next_old/source/css/_schemes/Gemini/index.styl new file mode 100644 index 0000000..95dd34d --- /dev/null +++ b/themes/next_old/source/css/_schemes/Gemini/index.styl @@ -0,0 +1,243 @@ +@import "../Pisces/_layout"; +@import "../Pisces/_brand"; +@import "../Pisces/_menu"; +@import "../Pisces/_sidebar"; +// Import _posts if want to justify text-align on mobile. +//@import "../Pisces/_posts"; + +// ================================================= +// Rewrite _layout.styl +// ================================================= +// Sidebar padding used as main desktop content padding for sidebar padding and post blocks padding too. + +// In main NexT config set `sidebar: offset: 12` option as main padding. +// In `source/css/_variables/Gemini.styl` there are variables for other resolutions: +// $content-tablet-paddin = 10px; +// $content-mobile-padding = 8px; +// P.S. If u want to change this paddings u may set this variables into `source/css/_variables/custom.styl`. + +// So, it will 12px in Desktop, 10px in Tablets and 8px in Mobiles for all possible paddings. +// ================================================= +// Read values from NexT config and set they as local variables to use as string variables (in any CSS section). +hexo-config('sidebar.offset') is a 'unit' ? (sboffset = unit(hexo-config('sidebar.offset'), px)) : (sboffset = 0) +use_seo = hexo-config('seo'); + +// ================================================= +// Desktop layout styles. +// ================================================= +// Post blocks. +.content-wrap { + padding: initial; + background: initial; + box-shadow: initial; + border-radius: initial; +} + +// Post & Comments blocks. +.post-block { + padding: $content-desktop-padding; + background: white; + box-shadow: $box-shadow-inner; + border-radius: $border-radius-inner; +} + +// When blocks are siblings (homepage). +#posts > article + article { + .post-block { + margin-top: sboffset; + // Rewrite shadows & borders because all blocks have offsets. + box-shadow: $box-shadow; + border-radius: $border-radius; + } +} + +// Comments blocks. +.comments { + padding: $content-desktop-padding; + margin: initial; + margin-top: sboffset; + background: white; + box-shadow: $box-shadow; + border-radius: $border-radius; +} + +// Top main padding from header to posts (default 40px). +.posts-expand { + padding-top: initial; +} + +// Post navigation items. +.post-nav-divider { + width: 4%; +} +.post-nav-item { + width: 48%; +} + +// Post delimiters. +.post-eof, +.post-spread { + hide(); +} + +// Pagination. +.pagination { + .prev, .next, .page-number { + margin-bottom: initial; + top: initial; + } + margin: sboffset 0 0; + border-top: initial; + background: white; + box-shadow: $box-shadow; + border-radius: $border-radius; + padding: 10px 0 10px; +} + +// Footer alignment. +.main { + padding-bottom: initial; +} +.footer { + bottom: auto; +} + +// ================================================= +// Headers. +// ================================================= +// No need anymore? +.post-header { + h1, h2 { + margin: initial; + } +} +.posts-expand .post-title-link { + line-height: inherit; +} +.posts-expand .post-title { + font-size: 1.7em; +} +.post-body { + h1 { + font-size: 1.6em; + border-bottom: 1px solid $body-bg-color; + } + h2 { + font-size: 1.45em; + border-bottom: 1px solid $body-bg-color; + } + h3 { + font-size: 1.3em; + if use_seo { + border-bottom: 1px solid $body-bg-color; + } else { + border-bottom: 1px dotted $body-bg-color; + } + } + h4 { + font-size: 1.2em; + if use_seo { + border-bottom: 1px dotted $body-bg-color; + } + } + h5 { + font-size: 1.07em; + } + h6 { + font-size: 1.03em; + } +} + +// ================================================= +// > 768px & < 991px +// ================================================= ++tablet() { + + // Posts in blocks. + .content-wrap { + padding: $content-tablet-padding; + } + .posts-expand { + margin: initial; + + // Components inside Posts. + .post-button { + margin-top: ($content-tablet-padding * 2); + } + } + + .post-block { + // Inside posts blocks content padding (default 40px). + padding: ($content-tablet-padding * 2); + // Rewrite shadows & borders because all blocks have offsets. + box-shadow: $box-shadow; + border-radius: $border-radius; + } + + // Only if blocks are siblings need bottom margin (homepage). + #posts > article + article { + .post-block { + margin-top: $content-tablet-padding; + } + } + + .comments { + margin-top: $content-tablet-padding; + padding: $content-tablet-padding ($content-tablet-padding * 2); + //padding: initial; + //padding-top: $content-tablet-padding; + } + + .pagination { + margin: $content-tablet-padding 0 0; + } + +} +// ================================================= +// < 767px +// ================================================= ++mobile() { + + // Posts in blocks. + .content-wrap { + padding: $content-mobile-padding; + } + .posts-expand { + margin: initial; + + // Components inside Posts. + .post-button { + margin-top: sboffset; + //padding-bottom : 15px; + } + img { + padding: initial !important; + } + } + + .post-block { + // Inside posts blocks content padding (default 40px). + padding: sboffset; + min-height: auto; + // Rewrite shadows & borders because all blocks have offsets. + box-shadow: $box-shadow; + border-radius: $border-radius; + } + + // Only if blocks are siblings need bottom margin (homepage). + #posts > article + article { + .post-block { + margin-top: $content-mobile-padding; + } + } + + .comments { + margin-top: $content-mobile-padding; + padding: 0 sboffset; + } + + .pagination { + margin: $content-mobile-padding 0 0; + } + +} diff --git a/themes/next_old/source/css/_schemes/Mist/_base.styl b/themes/next_old/source/css/_schemes/Mist/_base.styl new file mode 100644 index 0000000..97dc4cb --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/_base.styl @@ -0,0 +1,12 @@ +// Tags +// -------------------------------------------------- +h1, h2, h3, h4, h5, h6 { margin: 20px 0 10px; } + +p { margin: 0 0 25px 0; } + +a { border-bottom-color: $grey-light; } + +hr { + margin: 20px 0; + height: 2px; +} diff --git a/themes/next_old/source/css/_schemes/Mist/_header.styl b/themes/next_old/source/css/_schemes/Mist/_header.styl new file mode 100644 index 0000000..a191649 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/_header.styl @@ -0,0 +1,63 @@ +// Header +// -------------------------------------------------- +.header { background: $whitesmoke; } +.header-inner { + padding: 25px 0 20px; + clearfix(); + + +mobile() { + width: auto; + margin-bottom: 50px; + padding: 10px; + } +} + +.site-meta { + float: left; + margin-left: -20px; + line-height: normal; + + +mobile() { + margin-left: 10px; + } + + .brand { + padding: 2px 1px; + background: none; + + +mobile() { display: block; } + } + + .logo { display: none; } + + .site-title { + font-size: 22px; + font-weight: bolder; + + +mobile() { line-height: 34px; } + } +} + + +.logo-line-before, +.logo-line-after { + display: block; + overflow: hidden; + margin: 0 auto; + width: 75%; + + +mobile() { display: none; } + + i { + position: relative; + display: block; + height: 2px; + background: $black-deep; + +mobile() { height: 3px; } + } +} + +.use-motion { + .logo-line-before i { left: -100%; } + .logo-line-after i { right: -100%; } +} diff --git a/themes/next_old/source/css/_schemes/Mist/_logo.styl b/themes/next_old/source/css/_schemes/Mist/_logo.styl new file mode 100644 index 0000000..571b407 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/_logo.styl @@ -0,0 +1 @@ +.site-subtitle { display: none; } diff --git a/themes/next_old/source/css/_schemes/Mist/_menu.styl b/themes/next_old/source/css/_schemes/Mist/_menu.styl new file mode 100644 index 0000000..fa0cd4e --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/_menu.styl @@ -0,0 +1,46 @@ +// Menu +// -------------------------------------------------- +.site-nav-toggle { + position: static; + float: right; +} + + +.menu { + float: right; + margin: 8px 0 0 0; + + +mobile() { + margin: 20px 0 0 0; + padding: 0; + } + + br { display: none; } + + .menu-item { + margin: 0; + +mobile() { display: block; } + } + + .menu-item a { + padding: 0 10px; + background: none; + border: none; + border-radius: 2px; + transition-property: background; + + +mobile() { + text-align: left; + } + + &:hover { background: #e1e1e1; } + } + + a::before { + display: none; + + +mobile() { display: block; } + } + + +mobile() { float: none; } +} diff --git a/themes/next_old/source/css/_schemes/Mist/_posts-expanded.styl b/themes/next_old/source/css/_schemes/Mist/_posts-expanded.styl new file mode 100644 index 0000000..4ca1b29 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/_posts-expanded.styl @@ -0,0 +1,67 @@ +// Post Expanded +// -------------------------------------------------- +.posts-expand { + padding-top: 0; + + .post-title, + .post-meta { + text-align: $site-meta-text-align; + +mobile() { text-align: center; } + } + .post-eof { display: none; } + + .post { margin-top: 120px; } + .post:first-child { margin-top: 0; } + + .post-meta { + margin-top: 5px; + margin-bottom: 20px; + } + + .post-title { + position: relative; + font-size: $font-size-headings-base; + font-weight: 400; + +mobile() { font-size: $font-size-headings-small; } + +desktop-large() { font-size: $font-size-headings-large; } + } + .post-title:hover:before { background: $black-deep; } + + .post-body { + +mobile() { font-size: $font-size-small; } + } + + .post-body img { margin: 0; } + + .post-tags { + text-align: left; + a { + padding: 1px 5px; + background: $whitesmoke; + border-bottom: none; + } + a:hover { background: $grey-light; } + } + .post-nav { margin-top: 40px; } +} + +.post-button { + margin-top: 20px; + text-align: left; + + a { + padding: 0; + font-size: $font-size-base; + //color: $grey-dim; + background: none; + border: none; + border-bottom: 2px solid $grey-dim; + transition-property: border; + + +mobile() { font-size: $font-size-small; } + +desktop-large() { font-size: $font-size-large; } + + + &:hover { border-bottom-color: $black-deep; } + } +} diff --git a/themes/next_old/source/css/_schemes/Mist/_search.styl b/themes/next_old/source/css/_schemes/Mist/_search.styl new file mode 100644 index 0000000..6cd7b2c --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/_search.styl @@ -0,0 +1,5 @@ +// Search +// -------------------------------------------------- +.site-search form { + display: none; +} \ No newline at end of file diff --git a/themes/next_old/source/css/_schemes/Mist/index.styl b/themes/next_old/source/css/_schemes/Mist/index.styl new file mode 100644 index 0000000..7d047f4 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/index.styl @@ -0,0 +1,91 @@ +// +// Mist scheme +// ================================================= + +@import "_base"; +@import "outline/outline"; +@import "_header"; +@import "_logo"; +@import "_menu"; +@import "_search.styl"; +@import "_posts-expanded"; +@import "sidebar/sidebar-blogroll"; + + +// Components +// -------------------------------------------------- +.btn { + padding: 0 10px; + border-width: 2px; + border-radius: 0; +} + +.headband { display: none; } + + +// Search +// -------------------------------------------------- +.site-search { + position: relative; + float: right; + margin-top: 5px; + padding-top: 3px; + + +mobile() { + float: none; + padding: 0 10px; + } +} + + +// Page - Container +// -------------------------------------------------- +.container .main-inner { + +mobile() { width: auto; } +} + + +// Page - Post details +// -------------------------------------------------- +.page-post-detail { + .post-title, + .post-meta { text-align: center; } + + .post-title:before { display: none; } + + .post-meta { margin-bottom: 60px; } +} + + +// Pagination +// -------------------------------------------------- +.pagination { + margin: 120px 0 0; + text-align: left; + + +mobile() { + margin: 80px 10px 0; + text-align: center; + } +} + +// Footer +// -------------------------------------------------- +.footer { + margin-top: 80px; + padding: 10px 0; + background: $whitesmoke; + color: $grey-dim; +} +.footer-inner { + margin: 0 auto; + text-align: left; + + +mobile() { + width: auto; + text-align: center; + } +} + +// Helpers +// -------------------------------------------------- diff --git a/themes/next_old/source/css/_schemes/Mist/outline/outline.styl b/themes/next_old/source/css/_schemes/Mist/outline/outline.styl new file mode 100644 index 0000000..12c0bae --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/outline/outline.styl @@ -0,0 +1 @@ +.main-inner { margin-top: 80px; } diff --git a/themes/next_old/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl b/themes/next_old/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl new file mode 100644 index 0000000..6db1ed7 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl @@ -0,0 +1 @@ +.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; } diff --git a/themes/next_old/source/css/_schemes/Muse/_layout.styl b/themes/next_old/source/css/_schemes/Muse/_layout.styl new file mode 100644 index 0000000..0107472 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Muse/_layout.styl @@ -0,0 +1,9 @@ +.header-inner, .container .main-inner, .footer-inner { + +mobile() { width: auto; } +} + +// embed tag +embed { + display: block; + margin: 0px auto 25px auto; +} diff --git a/themes/next_old/source/css/_schemes/Muse/_logo.styl b/themes/next_old/source/css/_schemes/Muse/_logo.styl new file mode 100644 index 0000000..1d0437a --- /dev/null +++ b/themes/next_old/source/css/_schemes/Muse/_logo.styl @@ -0,0 +1,21 @@ +.custom-logo { + .site-meta-headline { text-align: center; } + + .brand { background: none; } + + .site-title { + margin: 10px auto 0; + font-size: 24px; + color: $black-deep; + a { border: none; } + } + + +} + +.custom-logo-image { + margin: 0 auto; + padding: 5px; + max-width: 150px; + background: white; +} diff --git a/themes/next_old/source/css/_schemes/Muse/_menu.styl b/themes/next_old/source/css/_schemes/Muse/_menu.styl new file mode 100644 index 0000000..59a6449 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Muse/_menu.styl @@ -0,0 +1,33 @@ +.site-nav { + +mobile() { + position: absolute; + left: 0; + top: 52px; + margin: 0; + width: 100%; + padding: 0; + background: white; + border-bottom: 1px solid $gray-lighter; + z-index: $zindex-3; + } +} + +.menu { + +mobile() { text-align: left; } +} +.menu .menu-item { + +mobile() { + display: block; + margin: 0 10px; + vertical-align: top; + } + + br { + +mobile() { display: none; } + } + + a { + +mobile() { padding: 5px 10px; } + } + .fa { margin-right: 0; } +} diff --git a/themes/next_old/source/css/_schemes/Muse/_search.styl b/themes/next_old/source/css/_schemes/Muse/_search.styl new file mode 100644 index 0000000..6cd7b2c --- /dev/null +++ b/themes/next_old/source/css/_schemes/Muse/_search.styl @@ -0,0 +1,5 @@ +// Search +// -------------------------------------------------- +.site-search form { + display: none; +} \ No newline at end of file diff --git a/themes/next_old/source/css/_schemes/Muse/index.styl b/themes/next_old/source/css/_schemes/Muse/index.styl new file mode 100644 index 0000000..35effe8 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Muse/index.styl @@ -0,0 +1,5 @@ +@import "_layout.styl"; +@import "_logo.styl"; +@import "_menu.styl"; +@import "_search.styl"; +@import "sidebar/sidebar-blogroll"; diff --git a/themes/next_old/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl b/themes/next_old/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl new file mode 100644 index 0000000..6db1ed7 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl @@ -0,0 +1 @@ +.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; } diff --git a/themes/next_old/source/css/_schemes/Pisces/_brand.styl b/themes/next_old/source/css/_schemes/Pisces/_brand.styl new file mode 100644 index 0000000..c85ee8f --- /dev/null +++ b/themes/next_old/source/css/_schemes/Pisces/_brand.styl @@ -0,0 +1,30 @@ +.site-brand-wrapper { + position: relative; +} + +.site-meta { + padding: 20px 0; + color: white; + background: $black-deep; + + +tablet() { + box-shadow: 0 0 16px rgba(0,0,0,0.5); + } + +mobile() { + box-shadow: 0 0 16px rgba(0,0,0,0.5); + } +} + +.brand { + padding: 0; + background: none; + + &:hover { color: white; } +} + +.site-subtitle { + margin: 10px 10px 0; + font-weight: initial; +} + +.site-search form { display: none; } diff --git a/themes/next_old/source/css/_schemes/Pisces/_layout.styl b/themes/next_old/source/css/_schemes/Pisces/_layout.styl new file mode 100644 index 0000000..f7e5e0d --- /dev/null +++ b/themes/next_old/source/css/_schemes/Pisces/_layout.styl @@ -0,0 +1,130 @@ +.header { + position: relative; + margin: 0 auto; + width: $main-desktop; + + +tablet() { + width: auto; + } + +mobile() { + width: auto; + } +} + +.header-inner { + position: absolute; + top: 0; + overflow: hidden; + padding: 0; + width: 240px; + background: white; + box-shadow: $box-shadow-inner; + border-radius: $border-radius-inner; + + +desktop-large() { + .container & { width: 240px; } + } + +tablet() { + position: relative; + width: auto; + border-radius: initial; + } + +mobile() { + position: relative; + width: auto; + border-radius: initial; + } +} + +.main { + clearfix(); + +tablet() { + padding-bottom: 100px; + } + +mobile() { + padding-bottom: 100px; + } +} + +.container .main-inner { + width: $main-desktop; + + +tablet() { + width: auto; + } + +mobile() { + width: auto; + } +} + +.content-wrap { + float: right; + box-sizing: border-box; + padding: $content-desktop-padding; + width: $content-desktop; + background: white; + min-height: 700px; + box-shadow: $box-shadow-inner; + border-radius: $border-radius-inner; + + +tablet() { + width: 100%; + padding: 20px; + border-radius: initial; + } + +mobile() { + width: 100%; + padding: 20px; + min-height: auto; + border-radius: initial; + } +} + +.sidebar { + position: static; + float: left; + margin-top: 300px; + width: $sidebar-desktop; + background: $body-bg-color; + box-shadow: none; + + +tablet() { + display: none; + } + +mobile() { + display: none; + } +} + +.sidebar-toggle { display: none; } + + +.footer-inner { + width: $main-desktop; + padding-left: 260px; + + +tablet() { + width: auto; + padding-left: 0 !important; + padding-right: 0 !important; + } + +mobile() { + width: auto; + padding-left: 0 !important; + padding-right: 0 !important; + } +} + + + +.sidebar-position-right { + .header-inner { right: 0; } + .content-wrap { float: left; } + .sidebar { float: right; } + + .footer-inner { + padding-left: 0; + padding-right: 260px; + } +} + diff --git a/themes/next_old/source/css/_schemes/Pisces/_menu.styl b/themes/next_old/source/css/_schemes/Pisces/_menu.styl new file mode 100644 index 0000000..21986ac --- /dev/null +++ b/themes/next_old/source/css/_schemes/Pisces/_menu.styl @@ -0,0 +1,67 @@ +.site-nav { + border-top: none; + + +tablet() { + display: none !important; + } +} + +.site-nav-on { + +tablet() { + display: block !important; + } +} + +.menu .menu-item { + display: block; + margin: 0; + + a { + position: relative; + box-sizing: border-box; + padding: 5px 20px; + text-align: left; + line-height: inherit; + transition-property: background-color; + the-transition(); + + &:hover { + background: #f9f9f9; + border-bottom-color: white; + } + } + + br { display: none; } +} + +.menu-item-active a { + @extend .menu .menu-item a:hover; + + &:after { + content: " "; + position: absolute; + top: 50%; + margin-top: -3px; + right: 15px; + width: 6px; + height: 6px; + border-radius: 50%; + background-color: $grey; + } +} + +.btn-bar { + background-color: white; +} + +.site-nav-toggle { + left: 20px; + top: 50%; + + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + + +tablet() { + display: block; + } +} diff --git a/themes/next_old/source/css/_schemes/Pisces/_posts.styl b/themes/next_old/source/css/_schemes/Pisces/_posts.styl new file mode 100644 index 0000000..498409d --- /dev/null +++ b/themes/next_old/source/css/_schemes/Pisces/_posts.styl @@ -0,0 +1,5 @@ +.post-body { + +mobile() { + text-align: justify; + } +} diff --git a/themes/next_old/source/css/_schemes/Pisces/_sidebar.styl b/themes/next_old/source/css/_schemes/Pisces/_sidebar.styl new file mode 100644 index 0000000..9adfb55 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Pisces/_sidebar.styl @@ -0,0 +1,124 @@ +.use-motion .sidebar .motion-element { opacity: 1; } + +.sidebar { + margin-left: -100%; + right: auto; + bottom: auto; + + // Do NOT delete this line + // or Affix (position: fixed) will not work in Google Chrome. + -webkit-transform: none; +} + + +.sidebar-inner { +//padding: 20px 10px 0; + box-sizing: border-box; + width: 240px; + color: $text-color; + background: white; + box-shadow: $box-shadow; + border-radius: $border-radius; + if (hexo-config('motion.enable') and hexo-config('motion.transition.sidebar')) { opacity: 0; } + + &.affix { + position: fixed; + top: $sidebar-offset; + } + + &.affix-bottom { + position: absolute; + } + +} + +.site-overview { + //margin: 0 2px; + text-align: left; +} + +.site-author { + clearfix(); +} + +.sidebar a { + color: $black-light; + + &:hover { color: $black-deep; } +} + +.site-state-item { + padding: 0 10px; +} + +.links-of-author-item { + a:before { display: none; } + a { + border-bottom: none; + text-decoration: underline; + } +} + +.feed-link { + border-top: 1px dotted $grey-light; + border-bottom: 1px dotted $grey-light; + text-align: center; +} + +.feed-link a { + display: block; + color: $orange; + border: none; + + &:hover { + background: none; + color: darken($orange, 20%); + + i { color: darken($orange, 20%); } + } +} + +.links-of-author { + //clearfix(); + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.links-of-author-item { + sidebar-inline-links-item(); + + a { + display: block; + text-decoration: none; + + &:hover { + border-radius: 4px; + background: $gainsboro; + } + } + + .fa { + margin-right: 2px; + font-size: 16px; + } + .fa-globe { font-size: 15px; } +} + + +.links-of-blogroll { + text-align: center; + margin-top: 20px; + padding: 3px 0 0; + border-top: 1px dotted $grey-light; +} +.links-of-blogroll-title { margin-top: 0; } +.links-of-blogroll-item { padding: 0; } +.links-of-blogroll-inline { + clearfix(); + + .links-of-blogroll-item { + sidebar-inline-links-item(); + display: inline-block; + if !hexo-config('social_icons.icons_only') { width: unset; } + } +} diff --git a/themes/next_old/source/css/_schemes/Pisces/index.styl b/themes/next_old/source/css/_schemes/Pisces/index.styl new file mode 100644 index 0000000..cda4936 --- /dev/null +++ b/themes/next_old/source/css/_schemes/Pisces/index.styl @@ -0,0 +1,5 @@ +@import "_layout"; +@import "_brand"; +@import "_menu"; +@import "_sidebar"; +@import "_posts"; diff --git a/themes/next_old/source/css/_variables/Gemini.styl b/themes/next_old/source/css/_variables/Gemini.styl new file mode 100644 index 0000000..4d6e7e0 --- /dev/null +++ b/themes/next_old/source/css/_variables/Gemini.styl @@ -0,0 +1,21 @@ +// Variables of Gemini scheme +// ================================================= + +@import "Pisces.styl"; + +// Settings for some of the most global styles. +// -------------------------------------------------- +$body-bg-color = #eee +$main-desktop = 75% +$sidebar-desktop = 240px +$content-desktop = calc(100% - 252px) + +// Borders. +// -------------------------------------------------- +$box-shadow-inner = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12) +$box-shadow = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12), 0 -1px .5px 0 rgba(0,0,0,.09) + +$border-radius-inner = initial +$border-radius = initial +//$border-radius-inner = 0 0 3px 3px; +//$border-radius = 3px; diff --git a/themes/next_old/source/css/_variables/Mist.styl b/themes/next_old/source/css/_variables/Mist.styl new file mode 100644 index 0000000..8ead36e --- /dev/null +++ b/themes/next_old/source/css/_variables/Mist.styl @@ -0,0 +1,13 @@ +// Variables of Mist scheme +// ================================================= + +$font-size-headings-base = 26px + +$brand-color = $black-deep +$brand-hover-color = $brand-color + +$site-meta-text-align = left +$posts-collapse-left = 0 + +$btn-default-color = $link-color +$btn-default-bg = transparent diff --git a/themes/next_old/source/css/_variables/Muse.styl b/themes/next_old/source/css/_variables/Muse.styl new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/source/css/_variables/Pisces.styl b/themes/next_old/source/css/_variables/Pisces.styl new file mode 100644 index 0000000..320aeb1 --- /dev/null +++ b/themes/next_old/source/css/_variables/Pisces.styl @@ -0,0 +1,77 @@ +// Variables of Pisces scheme +// ================================================= + +// Settings for some of the most global styles. +// -------------------------------------------------- +$body-bg-color = #f5f7f9 + + +// Borders +// -------------------------------------------------- +$box-shadow-inner = initial; +$box-shadow = initial; + +$border-radius-inner = initial; +$border-radius = initial; + + +// Header +// -------------------------------------------------- +$subtitle-color = $gray-lighter + +// Sidebar +// -------------------------------------------------- +$sidebar-offset = unit(hexo-config('sidebar.offset'), px) if hexo-config('sidebar.offset') is a 'unit' + +$sidebar-nav-hover-color = $orange +$sidebar-highlight = $orange + +$site-author-image-width = 120px +$site-author-image-border-width = 1px +$site-author-image-border-color = $gainsboro + +$site-author-name-margin = 0 +$site-author-name-color = $black-deep +$site-author-name-align = center +$site-author-name-weight = $font-weight-bold + +$site-description-font-size = 13px +$site-description-color = $grey-dark +$site-description-margin-top = 0 +$site-description-align = center + +$site-state-item-count-font-size = 16px +$site-state-item-name-font-size = 13px +$site-state-item-name-color = $grey-dark +$site-state-item-border-color = $gainsboro + +$toc-link-color = $grey-dim +$toc-link-border-color = $grey-light +$toc-link-hover-color = black +$toc-link-hover-border-color = black +$toc-link-active-color = $sidebar-highlight +$toc-link-active-border-color = $sidebar-highlight +$toc-link-active-current-color = $sidebar-highlight +$toc-link-active-current-border-color = $sidebar-highlight + + +// Components +// -------------------------------------------------- + +// Button +$btn-default-radius = 2px +$btn-default-bg = white +$btn-default-color = $text-color +$btn-default-border-color = $text-color +$btn-default-hover-color = white +$btn-default-hover-bg = $black-deep + +// Full Image Tag +$full-image-width = 118% +$full-image-margin-horizontal = -9% +$full-image-margin-vertical = 0 + +// Back to top +$b2t-opacity = .6 +$b2t-position-bottom = -100px +$b2t-position-bottom-on = 30px diff --git a/themes/next_old/source/css/_variables/base.styl b/themes/next_old/source/css/_variables/base.styl new file mode 100644 index 0000000..fcd7830 --- /dev/null +++ b/themes/next_old/source/css/_variables/base.styl @@ -0,0 +1,416 @@ +// +// Variables +// ================================================= + + + +// Colors +// colors for use across theme. +// -------------------------------------------------- + +$whitesmoke = #f5f5f5 +$gainsboro = #eee +$gray-lighter = #ddd +$grey-light = #ccc +$grey = #bbb +$grey-dark = #999 +$grey-dim = #666 +$black-light = #555 +$black-dim = #333 +$black-deep = #222 +$red = #ff2a2a +$blue-bright = #87daff +$blue = #0684bd +$blue-deep = #262a30 +$orange = #fc6423 + + + +// Scaffolding +// Settings for some of the most global styles. +// -------------------------------------------------- + +// Global text color on +$text-color = $black-light + +// Global link color. +$link-color = $black-light +$link-hover-color = $black-deep +$link-decoration-color = $grey-light +$link-decoration-hover-color = $black-deep + +// Global border color. +$border-color = $grey-light + +// Background color for +$body-bg-color = white + +// Selection +$selection-bg = $blue-deep +$selection-color = white + + + +// Typography +// Font, line-height, and elements colors. +// -------------------------------------------------- + + +get_font_family(config) { + custom_family = hexo-config('font.' + config + '.family') + return custom_family is a 'string' ? custom_family : null +} + +// Font families. +$font-family-chinese = "PingFang SC", "Microsoft YaHei" + +$font-family-base = $font-family-chinese, sans-serif +$font-family-base = get_font_family('global'), $font-family-chinese, sans-serif if get_font_family('global') + +$font-family-logo = $font-family-base +$font-family-logo = get_font_family('logo'), $font-family-base if get_font_family('logo') + +$font-family-headings = $font-family-base +$font-family-headings = get_font_family('headings'), $font-family-base if get_font_family('headings') + +$font-family-posts = $font-family-base +$font-family-posts = get_font_family('posts'), $font-family-base if get_font_family('posts') + +$font-family-monospace = consolas, Menlo, $font-family-chinese, monospace +$font-family-monospace = get_font_family('codes'), consolas, Menlo, $font-family-chinese, monospace if get_font_family('codes') + +$font-family-icons = 'FontAwesome' + + +// Font Weight +$font-weight-lighter = 200 +$font-weight-light = 300 +$font-weight-normal = 400 +$font-weight-bold = 600 +$font-weight-bolder = 700 + + +// Font size +$font-size-base = 14px +$font-size-base = unit(hexo-config('font.global.size'), px) if hexo-config('font.global.size') is a 'unit' +$font-size-small = $font-size-base - 2px +$font-size-smaller = $font-size-base - 4px +$font-size-large = $font-size-base + 2px +$font-size-larger = $font-size-base + 4px + + +// Headings font size +$font-size-headings-step = 2px +$font-size-headings-base = 24px +$font-size-headings-base = unit(hexo-config('font.headings.size'), px) if hexo-config('font.headings.size') is a 'unit' +$font-size-headings-small = $font-size-headings-base - $font-size-headings-step +$font-size-headings-smaller = $font-size-headings-small - $font-size-headings-step +$font-size-headings-large = $font-size-headings-base + $font-size-headings-step +$font-size-headings-larger = $font-size-headings-large + $font-size-headings-step + +// Global line height +$line-height-base = 2 +$line-height-code-block = 1.6 // Can't be less than 1.3 + + + +// Z-index master list +// -------------------------------------------------- +$zindex-bottom = -1 +$zindex-1 = 1010 +$zindex-2 = 1020 +$zindex-3 = 1030 +$zindex-4 = 1040 +$zindex-5 = 1050 + + + +// Table +// -------------------------------------------------- +$table-width = 100% +$table-border-color = $gray-lighter +$table-font-size = 14px +$table-content-alignment = left +$table-content-vertical = middle +$table-th-font-weight = 700 +$table-cell-padding = 8px +$table-cell-border-right-color = $gainsboro +$table-cell-border-bottom-color = $gray-lighter +$table-row-odd-bg-color = #f9f9f9 +$table-row-hover-bg-color = $whitesmoke + + + +// Code & Code Blocks +// -------------------------------------------------- +$code-font-family = $font-family-monospace +$code-font-size = 13px +$code-font-size = unit(hexo-config('font.codes.size'), px) if hexo-config('font.codes.size') is a 'unit' +$code-border-radius = 3px +$code-foreground = $black-light +$code-background = $gainsboro + + + +// Buttons +// -------------------------------------------------- + +$btn-font-weight = normal + +$btn-default-radius = 0 +$btn-default-bg = $black-deep +$btn-default-color = white +$btn-default-font-size = 14px +$btn-default-border-width = 2px +$btn-default-border-color = $black-deep +$btn-default-hover-bg = white +$btn-default-hover-color = $black-deep +$btn-default-hover-border-color = $black-deep + + + +// Pagination +// -------------------------------------------------- + +$pagination-border = $gainsboro + +$pagination-link-bg = transparent +$pagination-link-color = $link-color +$pagination-link-border = $gainsboro + +$pagination-link-hover-bg = transparent +$pagination-link-hover-color = $link-color +$pagination-link-hover-border = $black-deep + +$pagination-active-bg = $grey-light +$pagination-active-color = white +$pagination-active-border = $grey-light + + + +// Layout sizes +// -------------------------------------------------- + +$main-desktop = 960px +$main-desktop-large = 1200px + +$content-desktop = 700px +$content-desktop-large = 900px + +$content-desktop-padding = 40px +$content-tablet-padding = 10px +$content-mobile-padding = 8px + +$sidebar-desktop = 240px + +$footer-height = 50px + +$gap-between-main-and-footer = 100px + + + +// Headband +// -------------------------------------------------- +$headband-height = 3px +$headband-bg = $black-deep + + + +// Section Header +// Variables for header section elements. +// -------------------------------------------------- + +$head-bg = transparent + +// Site Meta +$site-meta-text-align = center +$brand-color = white +$brand-hover-color = white +$brand-bg = $black-deep + +$logo-font-size = 20px +$logo-font-size = unit(hexo-config('font.logo.size'), px) if hexo-config('font.logo.size') is a 'unit' + +$site-subtitle-color = $grey-dark +$subtitle-font-size = 13px +$subtitle-color = $grey-dark + +// Menu +$menu-link-border = transparent +$menu-link-hover-border = $black-deep + + + +// Posts Expand +// -------------------------------------------------- +$posts-expand-title-font-weight = $font-weight-normal +$post-copyright = { + margin: 2em 0 0, + padding: .5em 1em, + bg: #f9f9f9, + border: { + width: 3px, + style: solid, + color: #ff1700 + } +} + + +// Posts Collpase +// -------------------------------------------------- +$posts-collapse-left = 55px +$posts-collapse-left-mobile = 5px + + +// Sidebar +// Variables for sidebar section elements. +// -------------------------------------------------- +$sidebar-nav-color = $black-light +$sidebar-nav-hover-color = $whitesmoke +$sidebar-highlight = $blue-bright + +$site-author-image-padding = 2px +$site-author-image-width = 96px +$site-author-image-height = auto +$site-author-image-border-width = 2px +$site-author-image-border-color = $black-dim + +$site-author-name-margin = 5px 0 0 +$site-author-name-color = $whitesmoke +$site-author-name-align = center +$site-author-name-weight = normal + +$site-description-font-size = 14px +$site-description-color = $grey-dark +$site-description-margin-top = 5px +$site-description-align = center + +$site-state-align = center +$site-state-item-count-font-size = 18px +$site-state-item-count-color = inherit +$site-state-item-name-font-size = 13px +$site-state-item-name-color = inherit +$site-state-item-border-color = $black-dim + +$toc-link-color = $grey-dark +$toc-link-border-color = $black-light +$toc-link-hover-color = $grey-light +$toc-link-hover-border-color = $grey-light +$toc-link-active-color = $sidebar-highlight +$toc-link-active-border-color = $sidebar-highlight +$toc-link-active-current-color = $sidebar-highlight +$toc-link-active-current-border-color = $sidebar-highlight + + +// Components +// -------------------------------------------------- + +// Back to top +$b2t-opacity = 1 +$b2t-position-bottom = -100px +$b2t-position-bottom-on = 19px +$b2t-position-right = 30px +$b2t-font-size = 12px +$b2t-color = white +$b2t-bg-color = $black-deep + +// full-image +$full-image-width = 110% +$full-image-margin-horizontal = -5% +$full-image-margin-vertical = 25px + +// .post-expand .post-eof +// In Muse scheme, margin above and below the post separator +$post-eof-margin-top = 80px // or 160px for more white space +$post-eof-margin-bottom = 60px // or 120px for less white space + + +// Iconography +// Icons SVG Base64 +// -------------------------------------------------- + +// blockquote-center icon +$center-quote-left = '../images/quote-l.svg' +$center-quote-right = '../images/quote-r.svg' + + +// Note colors +// -------------------------------------------------- +// Read note light_bg_offset from NexT config and set in "lbg%" to use it as string variable. +hexo-config('note.light_bg_offset') is a 'unit' ? (lbg = unit(hexo-config('note.light_bg_offset'),"%")) : (lbg = 0) + +// Default +$note-default-border = #777 +$note-default-bg = lighten(spin($note-default-border, 0), 94% + lbg) +$note-default-text = $note-default-border +$note-default-icon = "\f0a9" + +$note-modern-default-border = #e1e1e1 +$note-modern-default-bg = lighten(spin($note-modern-default-border, 10), 60% + (lbg * 4)) +$note-modern-default-text = $grey-dim +$note-modern-default-hover = darken(spin($note-modern-default-text, -10), 32%) + +// Primary +$note-primary-border = #6f42c1 +$note-primary-bg = lighten(spin($note-primary-border, 10), 92% + lbg) +$note-primary-text = $note-primary-border +$note-primary-icon = "\f055" + +$note-modern-primary-border = #e1c2ff +$note-modern-primary-bg = lighten(spin($note-modern-primary-border, 10), 40% + (lbg * 4)) +$note-modern-primary-text = #6f42c1 +$note-modern-primary-hover = darken(spin($note-modern-primary-text, -10), 22%) + +// Info +$note-info-border = #428bca +$note-info-bg = lighten(spin($note-info-border, -10), 91% + lbg) +$note-info-text = $note-info-border +$note-info-icon = "\f05a" + +$note-modern-info-border = #b3e5ef +$note-modern-info-bg = lighten(spin($note-modern-info-border, 10), 50% + (lbg * 4)) +$note-modern-info-text = #31708f +$note-modern-info-hover = darken(spin($note-modern-info-text, -10), 32%) + +// Success +$note-success-border = #5cb85c +$note-success-bg = lighten(spin($note-success-border, 10), 90% + lbg) +$note-success-text = $note-success-border +$note-success-icon = "\f058" + +$note-modern-success-border = #d0e6be +$note-modern-success-bg = lighten(spin($note-modern-success-border, 10), 40% + (lbg * 4)) +$note-modern-success-text = #3c763d +$note-modern-success-hover = darken(spin($note-modern-success-text, -10), 27%) + +// Warning +$note-warning-border = #f0ad4e +$note-warning-bg = lighten(spin($note-warning-border, 10), 88% + lbg) +$note-warning-text = $note-warning-border +$note-warning-icon = "\f06a" + +$note-modern-warning-border = #fae4cd +$note-modern-warning-bg = lighten(spin($note-modern-warning-border, 10), 43% + (lbg * 4)) +$note-modern-warning-text = #8a6d3b +$note-modern-warning-hover = darken(spin($note-modern-warning-text, -10), 18%) + +// Danger +$note-danger-border = #d9534f +$note-danger-bg = lighten(spin($note-danger-border, -10), 92% + lbg) +$note-danger-text = $note-danger-border +$note-danger-icon = "\f056" + +$note-modern-danger-border = #ebcdd2 +$note-modern-danger-bg = lighten(spin($note-modern-danger-border, 10), 35% + (lbg * 4)) +$note-modern-danger-text = #a94442 +$note-modern-danger-hover = darken(spin($note-modern-danger-text, -10), 22%) + + +// Label colors +// -------------------------------------------------- +$label-default = lighten(spin($note-default-border, 0), 89% + lbg) +$label-primary = lighten(spin($note-primary-border, 10), 87% + lbg) +$label-info = lighten(spin($note-info-border, -10), 86% + lbg) +$label-success = lighten(spin($note-success-border, 10), 85% + lbg) +$label-warning = lighten(spin($note-warning-border, 10), 83% + lbg) +$label-danger = lighten(spin($note-danger-border, -10), 87% + lbg) diff --git a/themes/next_old/source/css/_variables/custom.styl b/themes/next_old/source/css/_variables/custom.styl new file mode 100644 index 0000000..e69de29 diff --git a/themes/next_old/source/css/main.styl b/themes/next_old/source/css/main.styl new file mode 100644 index 0000000..d46298d --- /dev/null +++ b/themes/next_old/source/css/main.styl @@ -0,0 +1,45 @@ +// CSS Style Guide: http://codeguide.co/#css + + + +$scheme = hexo-config('scheme') ? hexo-config('scheme') : 'Muse'; +$variables = base $scheme custom; +$mixins = base $scheme custom; + + + +// Variables Layer +// -------------------------------------------------- +for $variable in $variables + @import "_variables/" + $variable + + +// Mixins Layer +// -------------------------------------------------- +for $mixin in $mixins + @import "_mixins/" + $mixin; + + + +// Common Layer +// -------------------------------------------------- + +// Scaffolding +@import "_common/scaffolding"; + +// Layout +@import "_common/outline"; + +// Components +@import "_common/components"; + + +// Schemes Layer +// -------------------------------------------------- +@import "_schemes/" + $scheme; + + + +// Custom Layer +// -------------------------------------------------- +@import "_custom/custom"; diff --git a/themes/next_old/source/fonts/.gitkeep b/themes/next_old/source/fonts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/images/algolia_logo.svg b/themes/next_old/source/images/algolia_logo.svg similarity index 100% rename from images/algolia_logo.svg rename to themes/next_old/source/images/algolia_logo.svg diff --git a/images/apple-touch-icon-next.png b/themes/next_old/source/images/apple-touch-icon-next.png similarity index 100% rename from images/apple-touch-icon-next.png rename to themes/next_old/source/images/apple-touch-icon-next.png diff --git a/themes/next_old/source/images/avatar.gif b/themes/next_old/source/images/avatar.gif new file mode 100644 index 0000000..9899025 Binary files /dev/null and b/themes/next_old/source/images/avatar.gif differ diff --git a/images/cc-by-nc-nd.svg b/themes/next_old/source/images/cc-by-nc-nd.svg similarity index 100% rename from images/cc-by-nc-nd.svg rename to themes/next_old/source/images/cc-by-nc-nd.svg diff --git a/images/cc-by-nc-sa.svg b/themes/next_old/source/images/cc-by-nc-sa.svg similarity index 100% rename from images/cc-by-nc-sa.svg rename to themes/next_old/source/images/cc-by-nc-sa.svg diff --git a/images/cc-by-nc.svg b/themes/next_old/source/images/cc-by-nc.svg similarity index 100% rename from images/cc-by-nc.svg rename to themes/next_old/source/images/cc-by-nc.svg diff --git a/images/cc-by-nd.svg b/themes/next_old/source/images/cc-by-nd.svg similarity index 100% rename from images/cc-by-nd.svg rename to themes/next_old/source/images/cc-by-nd.svg diff --git a/images/cc-by-sa.svg b/themes/next_old/source/images/cc-by-sa.svg similarity index 100% rename from images/cc-by-sa.svg rename to themes/next_old/source/images/cc-by-sa.svg diff --git a/images/cc-by.svg b/themes/next_old/source/images/cc-by.svg similarity index 100% rename from images/cc-by.svg rename to themes/next_old/source/images/cc-by.svg diff --git a/images/cc-zero.svg b/themes/next_old/source/images/cc-zero.svg similarity index 100% rename from images/cc-zero.svg rename to themes/next_old/source/images/cc-zero.svg diff --git a/images/favicon-16x16-next.png b/themes/next_old/source/images/favicon-16x16-next.png similarity index 100% rename from images/favicon-16x16-next.png rename to themes/next_old/source/images/favicon-16x16-next.png diff --git a/images/favicon-32x32-next.png b/themes/next_old/source/images/favicon-32x32-next.png similarity index 100% rename from images/favicon-32x32-next.png rename to themes/next_old/source/images/favicon-32x32-next.png diff --git a/themes/next_old/source/images/loading.gif b/themes/next_old/source/images/loading.gif new file mode 100644 index 0000000..efb6768 Binary files /dev/null and b/themes/next_old/source/images/loading.gif differ diff --git a/images/logo.svg b/themes/next_old/source/images/logo.svg similarity index 100% rename from images/logo.svg rename to themes/next_old/source/images/logo.svg diff --git a/themes/next_old/source/images/placeholder.gif b/themes/next_old/source/images/placeholder.gif new file mode 100644 index 0000000..efb6768 Binary files /dev/null and b/themes/next_old/source/images/placeholder.gif differ diff --git a/images/quote-l.svg b/themes/next_old/source/images/quote-l.svg similarity index 100% rename from images/quote-l.svg rename to themes/next_old/source/images/quote-l.svg diff --git a/images/quote-r.svg b/themes/next_old/source/images/quote-r.svg similarity index 100% rename from images/quote-r.svg rename to themes/next_old/source/images/quote-r.svg diff --git a/themes/next_old/source/images/searchicon.png b/themes/next_old/source/images/searchicon.png new file mode 100644 index 0000000..14a16ca Binary files /dev/null and b/themes/next_old/source/images/searchicon.png differ diff --git a/themes/next_old/source/js/src/affix.js b/themes/next_old/source/js/src/affix.js new file mode 100644 index 0000000..11a3d39 --- /dev/null +++ b/themes/next_old/source/js/src/affix.js @@ -0,0 +1,162 @@ +/* ======================================================================== + * Bootstrap: affix.js v3.3.5 + * http://getbootstrap.com/javascript/#affix + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // AFFIX CLASS DEFINITION + // ====================== + + var Affix = function (element, options) { + this.options = $.extend({}, Affix.DEFAULTS, options) + + this.$target = $(this.options.target) + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) + + this.$element = $(element) + this.affixed = null + this.unpin = null + this.pinnedOffset = null + + this.checkPosition() + } + + Affix.VERSION = '3.3.5' + + Affix.RESET = 'affix affix-top affix-bottom' + + Affix.DEFAULTS = { + offset: 0, + target: window + } + + Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { + var scrollTop = this.$target.scrollTop() + var position = this.$element.offset() + var targetHeight = this.$target.height() + + if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false + + if (this.affixed == 'bottom') { + if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' + return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' + } + + var initializing = this.affixed == null + var colliderTop = initializing ? scrollTop : position.top + var colliderHeight = initializing ? targetHeight : height + + if (offsetTop != null && scrollTop <= offsetTop) return 'top' + if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' + + return false + } + + Affix.prototype.getPinnedOffset = function () { + if (this.pinnedOffset) return this.pinnedOffset + this.$element.removeClass(Affix.RESET).addClass('affix') + var scrollTop = this.$target.scrollTop() + var position = this.$element.offset() + return (this.pinnedOffset = position.top - scrollTop) + } + + Affix.prototype.checkPositionWithEventLoop = function () { + setTimeout($.proxy(this.checkPosition, this), 1) + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var height = this.$element.height() + var offset = this.options.offset + var offsetTop = offset.top + var offsetBottom = offset.bottom + var scrollHeight = Math.max($(document).height(), $(document.body).height()) + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) + + var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) + + if (this.affixed != affix) { + if (this.unpin != null) this.$element.css('top', '') + + var affixType = 'affix' + (affix ? '-' + affix : '') + var e = $.Event(affixType + '.bs.affix') + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + + this.$element + .removeClass(Affix.RESET) + .addClass(affixType) + .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') + } + + if (affix == 'bottom') { + this.$element.offset({ + top: scrollHeight - height - offsetBottom + }) + } + } + + + // AFFIX PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.affix') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.affix + + $.fn.affix = Plugin + $.fn.affix.Constructor = Affix + + + // AFFIX NO CONFLICT + // ================= + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + // AFFIX DATA-API + // ============== + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + var data = $spy.data() + + data.offset = data.offset || {} + + if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom + if (data.offsetTop != null) data.offset.top = data.offsetTop + + Plugin.call($spy, data) + }) + }) + +}(jQuery); diff --git a/themes/next_old/source/js/src/algolia-search.js b/themes/next_old/source/js/src/algolia-search.js new file mode 100644 index 0000000..9787e2a --- /dev/null +++ b/themes/next_old/source/js/src/algolia-search.js @@ -0,0 +1,115 @@ +/* global instantsearch: true */ +/*jshint camelcase: false */ + +$(document).ready(function () { + var algoliaSettings = CONFIG.algolia; + var isAlgoliaSettingsValid = algoliaSettings.applicationID && + algoliaSettings.apiKey && + algoliaSettings.indexName; + + if (!isAlgoliaSettingsValid) { + window.console.error('Algolia Settings are invalid.'); + return; + } + + var search = instantsearch({ + appId: algoliaSettings.applicationID, + apiKey: algoliaSettings.apiKey, + indexName: algoliaSettings.indexName, + searchFunction: function (helper) { + var searchInput = $('#algolia-search-input').find('input'); + + if (searchInput.val()) { + helper.search(); + } + } + }); + + // Registering Widgets + [ + instantsearch.widgets.searchBox({ + container: '#algolia-search-input', + placeholder: algoliaSettings.labels.input_placeholder + }), + + instantsearch.widgets.hits({ + container: '#algolia-hits', + hitsPerPage: algoliaSettings.hits.per_page || 10, + templates: { + item: function (data) { + var link = data.permalink ? data.permalink : (CONFIG.root + data.path); + return ( + '' + + data._highlightResult.title.value + + '' + ); + }, + empty: function (data) { + return ( + '
      ' + + algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query) + + '
      ' + ); + } + }, + cssClasses: { + item: 'algolia-hit-item' + } + }), + + instantsearch.widgets.stats({ + container: '#algolia-stats', + templates: { + body: function (data) { + var stats = algoliaSettings.labels.hits_stats + .replace(/\$\{hits}/, data.nbHits) + .replace(/\$\{time}/, data.processingTimeMS); + return ( + stats + + '' + + ' Algolia' + + '' + + '
      ' + ); + } + } + }), + + instantsearch.widgets.pagination({ + container: '#algolia-pagination', + scrollTo: false, + showFirstLast: false, + labels: { + first: '', + last: '', + previous: '', + next: '' + }, + cssClasses: { + root: 'pagination', + item: 'pagination-item', + link: 'page-number', + active: 'current', + disabled: 'disabled-item' + } + }) + ].forEach(search.addWidget, search); + + search.start(); + + $('.popup-trigger').on('click', function(e) { + e.stopPropagation(); + $('body') + .append('
      ') + .css('overflow', 'hidden'); + $('.popup').toggle(); + $('#algolia-search-input').find('input').focus(); + }); + + $('.popup-btn-close').click(function(){ + $('.popup').hide(); + $('.algolia-pop-overlay').remove(); + $('body').css('overflow', ''); + }); + +}); diff --git a/themes/next_old/source/js/src/bootstrap.js b/themes/next_old/source/js/src/bootstrap.js new file mode 100644 index 0000000..d9c33ed --- /dev/null +++ b/themes/next_old/source/js/src/bootstrap.js @@ -0,0 +1,52 @@ +/* global NexT: true */ + +$(document).ready(function () { + + $(document).trigger('bootstrap:before'); + + NexT.utils.isMobile() && window.FastClick.attach(document.body); + + NexT.utils.lazyLoadPostsImages(); + + NexT.utils.registerESCKeyEvent(); + + NexT.utils.registerBackToTop(); + + // Mobile top menu bar. + $('.site-nav-toggle button').on('click', function () { + var $siteNav = $('.site-nav'); + var ON_CLASS_NAME = 'site-nav-on'; + var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME); + var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown'; + var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass'; + + $siteNav.stop()[animateAction]('fast', function () { + $siteNav[animateCallback](ON_CLASS_NAME); + }); + }); + + /** + * Register JS handlers by condition option. + * Need to add config option in Front-End at 'layout/_partials/head.swig' file. + */ + CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox(); + CONFIG.tabs && NexT.utils.registerTabsTag(); + + NexT.utils.embeddedVideoTransformer(); + NexT.utils.addActiveClassToMenuItem(); + + + // Define Motion Sequence. + NexT.motion.integrator + .add(NexT.motion.middleWares.logo) + .add(NexT.motion.middleWares.menu) + .add(NexT.motion.middleWares.postList) + .add(NexT.motion.middleWares.sidebar); + + $(document).trigger('motion:before'); + + // Bootstrap Motion. + CONFIG.motion.enable && NexT.motion.integrator.bootstrap(); + + $(document).trigger('bootstrap:after'); +}); diff --git a/themes/next_old/source/js/src/exturl.js b/themes/next_old/source/js/src/exturl.js new file mode 100644 index 0000000..b85062a --- /dev/null +++ b/themes/next_old/source/js/src/exturl.js @@ -0,0 +1,15 @@ +/* global NexT: true */ + +$(document).ready(function () { + + // Create Base64 Object + var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}; + + $('.exturl').on('click', function () { + var $exturl = $(this).attr('data-url'); + var $decurl = Base64.decode($exturl); + window.open($decurl, '_blank'); + return false; + }); + +}); diff --git a/themes/next_old/source/js/src/hook-duoshuo.js b/themes/next_old/source/js/src/hook-duoshuo.js new file mode 100644 index 0000000..ca64dbd --- /dev/null +++ b/themes/next_old/source/js/src/hook-duoshuo.js @@ -0,0 +1,115 @@ +/* global DUOSHUO: true */ +/* jshint camelcase: false */ + +typeof DUOSHUO !== 'undefined' ? + hookTemplate() : + ($('#duoshuo-script')[0].onload = hookTemplate); + + +function hookTemplate() { + var post = DUOSHUO.templates.post; + + DUOSHUO.templates.post = function (e, t) { + var rs = post(e, t); + var agent = e.post.agent; + var userId = e.post.author.user_id; + var admin = ''; + + if (userId && (userId == CONFIG.duoshuo.userId)) { + admin = '' + CONFIG.duoshuo.author + ''; + } + + if (agent && /^Mozilla/.test(agent)) { + rs = rs.replace(/<\/div>

      /, admin + getAgentInfo(agent) + '

      '); + } + + return rs; + }; +} + +function getAgentInfo(string) { + $.ua.set(string); + + var UNKNOWN = 'Unknown'; + var sua = $.ua; + var separator = isMobile() ? '

      ' : ''; + var osName = sua.os.name || UNKNOWN; + var osVersion = sua.os.version || UNKNOWN; + var browserName = sua.browser.name || UNKNOWN; + var browserVersion = sua.browser.version || UNKNOWN; + var iconMapping = { + os: { + android : 'android', + linux : 'linux', + windows : 'windows', + ios : 'apple', + 'mac os': 'apple', + unknown : 'desktop' + }, + browser: { + chrome : 'chrome', + chromium : 'chrome', + firefox : 'firefox', + opera : 'opera', + safari : 'safari', + ie : 'internet-explorer', + wechat : 'wechat', + qq : 'qq', + unknown : 'globe' + } + }; + var osIcon = iconMapping.os[osName.toLowerCase()]; + var browserIcon = iconMapping.browser[getBrowserKey()]; + + return separator + + '' + + '' + + osName + ' ' + osVersion + + '' + separator + + '' + + '' + + browserName + ' ' + browserVersion + + ''; + + function getBrowserKey () { + var key = browserName.toLowerCase(); + + if (key.match(/WeChat/i)) { + return 'wechat'; + } + + if (key.match(/QQBrowser/i)) { + return 'qq'; + } + + return key; + } + + function isMobile() { + var userAgent = window.navigator.userAgent; + + var isiPad = userAgent.match(/iPad/i) !== null; + var mobileUA = [ + 'iphone', 'android', 'phone', 'mobile', + 'wap', 'netfront', 'x11', 'java', 'opera mobi', + 'opera mini', 'ucweb', 'windows ce', 'symbian', + 'symbianos', 'series', 'webos', 'sony', + 'blackberry', 'dopod', 'nokia', 'samsung', + 'palmsource', 'xda', 'pieplus', 'meizu', + 'midp' ,'cldc' , 'motorola', 'foma', + 'docomo', 'up.browser', 'up.link', 'blazer', + 'helio', 'hosin', 'huawei', 'novarra', + 'coolpad', 'webos', 'techfaith', 'palmsource', + 'alcatel', 'amoi', 'ktouch', 'nexian', + 'ericsson', 'philips', 'sagem', 'wellcom', + 'bunjalloo', 'maui', 'smartphone', 'iemobile', + 'spice', 'bird', 'zte-', 'longcos', + 'pantech', 'gionee', 'portalmmm', 'jig browser', + 'hiptop', 'benq', 'haier', '^lct', + '320x320', '240x320', '176x220' + ]; + var pattern = new RegExp(mobileUA.join('|'), 'i'); + + return !isiPad && userAgent.match(pattern); + } +} diff --git a/themes/next_old/source/js/src/js.cookie.js b/themes/next_old/source/js/src/js.cookie.js new file mode 100644 index 0000000..c6c3975 --- /dev/null +++ b/themes/next_old/source/js/src/js.cookie.js @@ -0,0 +1,165 @@ +/*! + * JavaScript Cookie v2.1.4 + * https://github.com/js-cookie/js-cookie + * + * Copyright 2006, 2015 Klaus Hartl & Fagner Brack + * Released under the MIT license + */ +;(function (factory) { + var registeredInModuleLoader = false; + if (typeof define === 'function' && define.amd) { + define(factory); + registeredInModuleLoader = true; + } + if (typeof exports === 'object') { + module.exports = factory(); + registeredInModuleLoader = true; + } + if (!registeredInModuleLoader) { + var OldCookies = window.Cookies; + var api = window.Cookies = factory(); + api.noConflict = function () { + window.Cookies = OldCookies; + return api; + }; + } +}(function () { + function extend () { + var i = 0; + var result = {}; + for (; i < arguments.length; i++) { + var attributes = arguments[ i ]; + for (var key in attributes) { + result[key] = attributes[key]; + } + } + return result; + } + + function init (converter) { + function api (key, value, attributes) { + var result; + if (typeof document === 'undefined') { + return; + } + + // Write + + if (arguments.length > 1) { + attributes = extend({ + path: '/' + }, api.defaults, attributes); + + if (typeof attributes.expires === 'number') { + var expires = new Date(); + expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); + attributes.expires = expires; + } + + // We're using "expires" because "max-age" is not supported by IE + attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; + + try { + result = JSON.stringify(value); + if (/^[\{\[]/.test(result)) { + value = result; + } + } catch (e) {} + + if (!converter.write) { + value = encodeURIComponent(String(value)) + .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); + } else { + value = converter.write(value, key); + } + + key = encodeURIComponent(String(key)); + key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); + key = key.replace(/[\(\)]/g, escape); + + var stringifiedAttributes = ''; + + for (var attributeName in attributes) { + if (!attributes[attributeName]) { + continue; + } + stringifiedAttributes += '; ' + attributeName; + if (attributes[attributeName] === true) { + continue; + } + stringifiedAttributes += '=' + attributes[attributeName]; + } + return (document.cookie = key + '=' + value + stringifiedAttributes); + } + + // Read + + if (!key) { + result = {}; + } + + // To prevent the for loop in the first place assign an empty array + // in case there are no cookies at all. Also prevents odd result when + // calling "get()" + var cookies = document.cookie ? document.cookie.split('; ') : []; + var rdecode = /(%[0-9A-Z]{2})+/g; + var i = 0; + + for (; i < cookies.length; i++) { + var parts = cookies[i].split('='); + var cookie = parts.slice(1).join('='); + + if (cookie.charAt(0) === '"') { + cookie = cookie.slice(1, -1); + } + + try { + var name = parts[0].replace(rdecode, decodeURIComponent); + cookie = converter.read ? + converter.read(cookie, name) : converter(cookie, name) || + cookie.replace(rdecode, decodeURIComponent); + + if (this.json) { + try { + cookie = JSON.parse(cookie); + } catch (e) {} + } + + if (key === name) { + result = cookie; + break; + } + + if (!key) { + result[name] = cookie; + } + } catch (e) {} + } + + return result; + } + + api.set = api; + api.get = function (key) { + return api.call(api, key); + }; + api.getJSON = function () { + return api.apply({ + json: true + }, [].slice.call(arguments)); + }; + api.defaults = {}; + + api.remove = function (key, attributes) { + api(key, '', extend(attributes, { + expires: -1 + })); + }; + + api.withConverter = init; + + return api; + } + + return init(function () {}); +})); diff --git a/themes/next_old/source/js/src/motion.js b/themes/next_old/source/js/src/motion.js new file mode 100644 index 0000000..1129179 --- /dev/null +++ b/themes/next_old/source/js/src/motion.js @@ -0,0 +1,352 @@ +/* global NexT: true */ + +$(document).ready(function () { + NexT.motion = {}; + + var sidebarToggleLines = { + lines: [], + push: function (line) { + this.lines.push(line); + }, + init: function () { + this.lines.forEach(function (line) { + line.init(); + }); + }, + arrow: function () { + this.lines.forEach(function (line) { + line.arrow(); + }); + }, + close: function () { + this.lines.forEach(function (line) { + line.close(); + }); + } + }; + + function SidebarToggleLine(settings) { + this.el = $(settings.el); + this.status = $.extend({}, { + init: { + width: '100%', + opacity: 1, + left: 0, + rotateZ: 0, + top: 0 + } + }, settings.status); + } + + SidebarToggleLine.prototype.init = function () { + this.transform('init'); + }; + SidebarToggleLine.prototype.arrow = function () { + this.transform('arrow'); + }; + SidebarToggleLine.prototype.close = function () { + this.transform('close'); + }; + SidebarToggleLine.prototype.transform = function (status) { + this.el.velocity('stop').velocity(this.status[status]); + }; + + var sidebarToggleLine1st = new SidebarToggleLine({ + el: '.sidebar-toggle-line-first', + status: { + arrow: {width: '50%', rotateZ: '-45deg', top: '2px'}, + close: {width: '100%', rotateZ: '-45deg', top: '5px'} + } + }); + var sidebarToggleLine2nd = new SidebarToggleLine({ + el: '.sidebar-toggle-line-middle', + status: { + arrow: {width: '90%'}, + close: {opacity: 0} + } + }); + var sidebarToggleLine3rd = new SidebarToggleLine({ + el: '.sidebar-toggle-line-last', + status: { + arrow: {width: '50%', rotateZ: '45deg', top: '-2px'}, + close: {width: '100%', rotateZ: '45deg', top: '-5px'} + } + }); + + sidebarToggleLines.push(sidebarToggleLine1st); + sidebarToggleLines.push(sidebarToggleLine2nd); + sidebarToggleLines.push(sidebarToggleLine3rd); + + var SIDEBAR_WIDTH = '320px'; + var SIDEBAR_DISPLAY_DURATION = 200; + var xPos, yPos; + + var sidebarToggleMotion = { + toggleEl: $('.sidebar-toggle'), + dimmerEl: $('#sidebar-dimmer'), + sidebarEl: $('.sidebar'), + isSidebarVisible: false, + init: function () { + this.toggleEl.on('click', this.clickHandler.bind(this)); + this.dimmerEl.on('click', this.clickHandler.bind(this)); + this.toggleEl.on('mouseenter', this.mouseEnterHandler.bind(this)); + this.toggleEl.on('mouseleave', this.mouseLeaveHandler.bind(this)); + this.sidebarEl.on('touchstart', this.touchstartHandler.bind(this)); + this.sidebarEl.on('touchend', this.touchendHandler.bind(this)); + this.sidebarEl.on('touchmove', function(e){e.preventDefault();}); + + $(document) + .on('sidebar.isShowing', function () { + NexT.utils.isDesktop() && $('body').velocity('stop').velocity( + {paddingRight: SIDEBAR_WIDTH}, + SIDEBAR_DISPLAY_DURATION + ); + }) + .on('sidebar.isHiding', function () { + }); + }, + clickHandler: function () { + this.isSidebarVisible ? this.hideSidebar() : this.showSidebar(); + this.isSidebarVisible = !this.isSidebarVisible; + }, + mouseEnterHandler: function () { + if (this.isSidebarVisible) { + return; + } + sidebarToggleLines.arrow(); + }, + mouseLeaveHandler: function () { + if (this.isSidebarVisible) { + return; + } + sidebarToggleLines.init(); + }, + touchstartHandler: function(e) { + xPos = e.originalEvent.touches[0].clientX; + yPos = e.originalEvent.touches[0].clientY; + }, + touchendHandler: function(e) { + var _xPos = e.originalEvent.changedTouches[0].clientX; + var _yPos = e.originalEvent.changedTouches[0].clientY; + if (_xPos-xPos > 30 && Math.abs(_yPos-yPos) < 20) { + this.clickHandler(); + } + }, + showSidebar: function () { + var self = this; + + sidebarToggleLines.close(); + + this.sidebarEl.velocity('stop').velocity({ + width: SIDEBAR_WIDTH + }, { + display: 'block', + duration: SIDEBAR_DISPLAY_DURATION, + begin: function () { + $('.sidebar .motion-element').velocity( + 'transition.slideRightIn', + { + stagger: 50, + drag: true, + complete: function () { + self.sidebarEl.trigger('sidebar.motion.complete'); + } + } + ); + }, + complete: function () { + self.sidebarEl.addClass('sidebar-active'); + self.sidebarEl.trigger('sidebar.didShow'); + } + } + ); + + this.sidebarEl.trigger('sidebar.isShowing'); + }, + hideSidebar: function () { + NexT.utils.isDesktop() && $('body').velocity('stop').velocity({paddingRight: 0}); + this.sidebarEl.find('.motion-element').velocity('stop').css('display', 'none'); + this.sidebarEl.velocity('stop').velocity({width: 0}, {display: 'none'}); + + sidebarToggleLines.init(); + + this.sidebarEl.removeClass('sidebar-active'); + this.sidebarEl.trigger('sidebar.isHiding'); + + // Prevent adding TOC to Overview if Overview was selected when close & open sidebar. + if (!!$('.post-toc-wrap')) { + if ($('.site-overview-wrap').css('display') === 'block') { + $('.post-toc-wrap').removeClass('motion-element'); + } else { + $('.post-toc-wrap').addClass('motion-element'); + } + } + } + }; + sidebarToggleMotion.init(); + + NexT.motion.integrator = { + queue: [], + cursor: -1, + add: function (fn) { + this.queue.push(fn); + return this; + }, + next: function () { + this.cursor++; + var fn = this.queue[this.cursor]; + $.isFunction(fn) && fn(NexT.motion.integrator); + }, + bootstrap: function () { + this.next(); + } + }; + + NexT.motion.middleWares = { + logo: function (integrator) { + var sequence = []; + var $brand = $('.brand'); + var $title = $('.site-title'); + var $subtitle = $('.site-subtitle'); + var $logoLineTop = $('.logo-line-before i'); + var $logoLineBottom = $('.logo-line-after i'); + + $brand.size() > 0 && sequence.push({ + e: $brand, + p: {opacity: 1}, + o: {duration: 200} + }); + + NexT.utils.isMist() && hasElement([$logoLineTop, $logoLineBottom]) && + sequence.push( + getMistLineSettings($logoLineTop, '100%'), + getMistLineSettings($logoLineBottom, '-100%') + ); + + hasElement($title) && sequence.push({ + e: $title, + p: {opacity: 1, top: 0}, + o: { duration: 200 } + }); + + hasElement($subtitle) && sequence.push({ + e: $subtitle, + p: {opacity: 1, top: 0}, + o: {duration: 200} + }); + + if (CONFIG.motion.async) { + integrator.next(); + } + + if (sequence.length > 0) { + sequence[sequence.length - 1].o.complete = function () { + integrator.next(); + }; + $.Velocity.RunSequence(sequence); + } else { + integrator.next(); + } + + + function getMistLineSettings (element, translateX) { + return { + e: $(element), + p: {translateX: translateX}, + o: { + duration: 500, + sequenceQueue: false + } + }; + } + + /** + * Check if $elements exist. + * @param {jQuery|Array} $elements + * @returns {boolean} + */ + function hasElement ($elements) { + $elements = Array.isArray($elements) ? $elements : [$elements]; + return $elements.every(function ($element) { + return $.isFunction($element.size) && $element.size() > 0; + }); + } + }, + + menu: function (integrator) { + + if (CONFIG.motion.async) { + integrator.next(); + } + + $('.menu-item').velocity('transition.slideDownIn', { + display: null, + duration: 200, + complete: function () { + integrator.next(); + } + }); + }, + + postList: function (integrator) { + //var $post = $('.post'); + var $postBlock = $('.post-block, .pagination, .comments'); + var $postBlockTransition = CONFIG.motion.transition.post_block; + var $postHeader = $('.post-header'); + var $postHeaderTransition = CONFIG.motion.transition.post_header; + var $postBody = $('.post-body'); + var $postBodyTransition = CONFIG.motion.transition.post_body; + var $collHeader = $('.collection-title, .archive-year'); + var $collHeaderTransition = CONFIG.motion.transition.coll_header; + var $sidebarAffix = $('.sidebar-inner'); + var $sidebarAffixTransition = CONFIG.motion.transition.sidebar; + var hasPost = $postBlock.size() > 0; + + hasPost ? postMotion() : integrator.next(); + + if (CONFIG.motion.async) { + integrator.next(); + } + + function postMotion () { + var postMotionOptions = window.postMotionOptions || { + stagger: 100, + drag: true + }; + postMotionOptions.complete = function () { + // After motion complete need to remove transform from sidebar to let affix work on Pisces | Gemini. + if (CONFIG.motion.transition.sidebar && (NexT.utils.isPisces() || NexT.utils.isGemini())) { + $sidebarAffix.css({ 'transform': 'initial' }); + } + integrator.next(); + }; + + //$post.velocity('transition.slideDownIn', postMotionOptions); + if (CONFIG.motion.transition.post_block) { + $postBlock.velocity('transition.' + $postBlockTransition, postMotionOptions); + } + if (CONFIG.motion.transition.post_header) { + $postHeader.velocity('transition.' + $postHeaderTransition, postMotionOptions); + } + if (CONFIG.motion.transition.post_body) { + $postBody.velocity('transition.' + $postBodyTransition, postMotionOptions); + } + if (CONFIG.motion.transition.coll_header) { + $collHeader.velocity('transition.' + $collHeaderTransition, postMotionOptions); + } + // Only for Pisces | Gemini. + if (CONFIG.motion.transition.sidebar && (NexT.utils.isPisces() || NexT.utils.isGemini())) { + $sidebarAffix.velocity('transition.' + $sidebarAffixTransition, postMotionOptions); + } + } + }, + + sidebar: function (integrator) { + if (CONFIG.sidebar.display === 'always') { + NexT.utils.displaySidebar(); + } + integrator.next(); + } + }; + +}); diff --git a/themes/next_old/source/js/src/post-details.js b/themes/next_old/source/js/src/post-details.js new file mode 100644 index 0000000..a82bcc2 --- /dev/null +++ b/themes/next_old/source/js/src/post-details.js @@ -0,0 +1,99 @@ +/* global NexT: true */ + +$(document).ready(function () { + + initScrollSpy(); + + function initScrollSpy () { + var tocSelector = '.post-toc'; + var $tocElement = $(tocSelector); + var activeCurrentSelector = '.active-current'; + + $tocElement + .on('activate.bs.scrollspy', function () { + var $currentActiveElement = $(tocSelector + ' .active').last(); + + removeCurrentActiveClass(); + $currentActiveElement.addClass('active-current'); + + // Scrolling to center active TOC element if TOC content is taller then viewport. + $tocElement.scrollTop($currentActiveElement.offset().top - $tocElement.offset().top + $tocElement.scrollTop() - ($tocElement.height() / 2)); + }) + .on('clear.bs.scrollspy', removeCurrentActiveClass); + + $('body').scrollspy({ target: tocSelector }); + + function removeCurrentActiveClass () { + $(tocSelector + ' ' + activeCurrentSelector) + .removeClass(activeCurrentSelector.substring(1)); + } + } + +}); + +$(document).ready(function () { + var html = $('html'); + var TAB_ANIMATE_DURATION = 200; + var hasVelocity = $.isFunction(html.velocity); + + $('.sidebar-nav li').on('click', function () { + var item = $(this); + var activeTabClassName = 'sidebar-nav-active'; + var activePanelClassName = 'sidebar-panel-active'; + if (item.hasClass(activeTabClassName)) { + return; + } + + var currentTarget = $('.' + activePanelClassName); + var target = $('.' + item.data('target')); + + hasVelocity ? + currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () { + target + .velocity('stop') + .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION) + .addClass(activePanelClassName); + }) : + currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () { + currentTarget.hide(); + target + .stop() + .css({'opacity': 0, 'display': 'block'}) + .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () { + currentTarget.removeClass(activePanelClassName); + target.addClass(activePanelClassName); + }); + }); + + item.siblings().removeClass(activeTabClassName); + item.addClass(activeTabClassName); + }); + + // TOC item animation navigate & prevent #item selector in adress bar. + $('.post-toc a').on('click', function (e) { + e.preventDefault(); + var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href')); + var offset = $(targetSelector).offset().top; + + hasVelocity ? + html.velocity('stop').velocity('scroll', { + offset: offset + 'px', + mobileHA: false + }) : + $('html, body').stop().animate({ + scrollTop: offset + }, 500); + }); + + // Expand sidebar on post detail page by default, when post has a toc. + var $tocContent = $('.post-toc-content'); + var isSidebarCouldDisplay = CONFIG.sidebar.display === 'post' || + CONFIG.sidebar.display === 'always'; + var hasTOC = $tocContent.length > 0 && $tocContent.html().trim().length > 0; + if (isSidebarCouldDisplay && hasTOC) { + CONFIG.motion.enable ? + (NexT.motion.middleWares.sidebar = function () { + NexT.utils.displaySidebar(); + }) : NexT.utils.displaySidebar(); + } +}); diff --git a/themes/next_old/source/js/src/schemes/pisces.js b/themes/next_old/source/js/src/schemes/pisces.js new file mode 100644 index 0000000..0e6e426 --- /dev/null +++ b/themes/next_old/source/js/src/schemes/pisces.js @@ -0,0 +1,57 @@ +$(document).ready(function () { + + var sidebarInner = $('.sidebar-inner'); + + initAffix(); + resizeListener(); + + function initAffix () { + var headerOffset = getHeaderOffset(), + footerOffset = getFooterOffset(), + sidebarHeight = $('#sidebar').height() + NexT.utils.getSidebarb2tHeight(), + contentHeight = $('#content').height(); + + // Not affix if sidebar taller then content (to prevent bottom jumping). + if (headerOffset + sidebarHeight < contentHeight) { + sidebarInner.affix({ + offset: { + top: headerOffset - CONFIG.sidebar.offset, + bottom: footerOffset + } + }); + } + + setSidebarMarginTop(headerOffset).css({ 'margin-left': 'initial' }); + } + + function resizeListener () { + var mql = window.matchMedia('(min-width: 991px)'); + mql.addListener(function(e){ + if(e.matches){ + recalculateAffixPosition(); + } + }); + } + + function getHeaderOffset () { + return $('.header-inner').height() + CONFIG.sidebar.offset; + } + + function getFooterOffset () { + var footerInner = $('.footer-inner'), + footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight(), + footerOffset = footerInner.outerHeight(true) + footerMargin; + return footerOffset; + } + + function setSidebarMarginTop (headerOffset) { + return $('#sidebar').css({ 'margin-top': headerOffset }); + } + + function recalculateAffixPosition () { + $(window).off('.affix'); + sidebarInner.removeData('bs.affix').removeClass('affix affix-top affix-bottom'); + initAffix(); + } + +}); diff --git a/themes/next_old/source/js/src/scroll-cookie.js b/themes/next_old/source/js/src/scroll-cookie.js new file mode 100644 index 0000000..34ff200 --- /dev/null +++ b/themes/next_old/source/js/src/scroll-cookie.js @@ -0,0 +1,23 @@ +$(document).ready(function() { + + // Set relative link path (without domain) + var rpath = window.location.href.replace(window.location.origin, ""); + + // Write position in cookie + var timeout; + $(window).on("scroll", function() { + clearTimeout(timeout); + timeout = setTimeout(function () { + Cookies.set("scroll-cookie", ($(window).scrollTop() + "|" + rpath), { expires: 365, path: '' }); + }, 250); + }); + + // Read position from cookie + if (Cookies.get("scroll-cookie") !== undefined) { + var cvalues = Cookies.get("scroll-cookie").split('|'); + if (cvalues[1] == rpath) { + $(window).scrollTop(cvalues[0]); + } + } + +}); diff --git a/themes/next_old/source/js/src/scrollspy.js b/themes/next_old/source/js/src/scrollspy.js new file mode 100644 index 0000000..f5c5c6c --- /dev/null +++ b/themes/next_old/source/js/src/scrollspy.js @@ -0,0 +1,182 @@ +/* ======================================================================== +* Bootstrap: scrollspy.js v3.3.2 +* http://getbootstrap.com/javascript/#scrollspy +* ======================================================================== +* Copyright 2011-2015 Twitter, Inc. +* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) +* ======================================================================== */ + +/** + * Custom by iissnan + * + * - Add a `clear.bs.scrollspy` event. + * - Esacpe targets selector. + */ + + ++function ($) { + 'use strict'; + + // SCROLLSPY CLASS DEFINITION + // ========================== + + function ScrollSpy(element, options) { + this.$body = $(document.body) + this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) + this.options = $.extend({}, ScrollSpy.DEFAULTS, options) + this.selector = (this.options.target || '') + ' .nav li > a' + this.offsets = [] + this.targets = [] + this.activeTarget = null + this.scrollHeight = 0 + + this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) + this.refresh() + this.process() + } + + ScrollSpy.VERSION = '3.3.2' + + ScrollSpy.DEFAULTS = { + offset: 10 + } + + ScrollSpy.prototype.getScrollHeight = function () { + return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) + } + + ScrollSpy.prototype.refresh = function () { + var that = this + var offsetMethod = 'offset' + var offsetBase = 0 + + this.offsets = [] + this.targets = [] + this.scrollHeight = this.getScrollHeight() + + if (!$.isWindow(this.$scrollElement[0])) { + offsetMethod = 'position' + offsetBase = this.$scrollElement.scrollTop() + } + + this.$body + .find(this.selector) + .map(function () { + var $el = $(this) + var href = $el.data('target') || $el.attr('href') + var $href = /^#./.test(href) && $(NexT.utils.escapeSelector(href)) // Need to escape selector. + + return ($href + && $href.length + && $href.is(':visible') + && [[$href[offsetMethod]().top + offsetBase, href]]) || null + }) + .sort(function (a, b) { return a[0] - b[0] }) + .each(function () { + that.offsets.push(this[0]) + that.targets.push(this[1]) + }) + + + } + + ScrollSpy.prototype.process = function () { + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + var scrollHeight = this.getScrollHeight() + var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() + var offsets = this.offsets + var targets = this.targets + var activeTarget = this.activeTarget + var i + + if (this.scrollHeight != scrollHeight) { + this.refresh() + } + + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) + } + + if (activeTarget && scrollTop < offsets[0]) { + $(this.selector).trigger('clear.bs.scrollspy') // Add a custom event. + this.activeTarget = null + return this.clear() + } + + for (i = offsets.length; i--;) { + activeTarget != targets[i] + && scrollTop >= offsets[i] + && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) + && this.activate(targets[i]) + } + } + + ScrollSpy.prototype.activate = function (target) { + this.activeTarget = target + + this.clear() + + var selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]' + + var active = $(selector) + .parents('li') + .addClass('active') + + if (active.parent('.dropdown-menu').length) { + active = active + .closest('li.dropdown') + .addClass('active') + } + + active.trigger('activate.bs.scrollspy') + } + + ScrollSpy.prototype.clear = function () { + $(this.selector) + .parentsUntil(this.options.target, '.active') + .removeClass('active') + } + + + // SCROLLSPY PLUGIN DEFINITION + // =========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.scrollspy') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.scrollspy + + $.fn.scrollspy = Plugin + $.fn.scrollspy.Constructor = ScrollSpy + + + // SCROLLSPY NO CONFLICT + // ===================== + + $.fn.scrollspy.noConflict = function () { + $.fn.scrollspy = old + return this + } + + + // SCROLLSPY DATA-API + // ================== + + $(window).on('load.bs.scrollspy.data-api', function () { + $('[data-spy="scroll"]').each(function () { + var $spy = $(this) + Plugin.call($spy, $spy.data()) + }) + }) + +}(jQuery); diff --git a/themes/next_old/source/js/src/utils.js b/themes/next_old/source/js/src/utils.js new file mode 100644 index 0000000..c1621ef --- /dev/null +++ b/themes/next_old/source/js/src/utils.js @@ -0,0 +1,339 @@ +/* global NexT: true */ + +NexT.utils = NexT.$u = { + /** + * Wrap images with fancybox support. + */ + wrapImageWithFancyBox: function () { + $('.content img') + .not('[hidden]') + .not('.group-picture img, .post-gallery img') + .each(function () { + var $image = $(this); + var imageTitle = $image.attr('title'); + var $imageWrapLink = $image.parent('a'); + + if ($imageWrapLink.size() < 1) { + var imageLink = ($image.attr('data-original')) ? this.getAttribute('data-original') : this.getAttribute('src'); + $imageWrapLink = $image.wrap('').parent('a'); + } + + $imageWrapLink.addClass('fancybox fancybox.image'); + $imageWrapLink.attr('rel', 'group'); + + if (imageTitle) { + $imageWrapLink.append('

      ' + imageTitle + '

      '); + + //make sure img title tag will show correctly in fancybox + $imageWrapLink.attr('title', imageTitle); + } + }); + + $('.fancybox').fancybox({ + helpers: { + overlay: { + locked: false + } + } + }); + }, + + lazyLoadPostsImages: function () { + $('#posts').find('img').lazyload({ + //placeholder: '/images/loading.gif', + effect: 'fadeIn', + threshold : 0 + }); + }, + + /** + * Tabs tag listener (without twitter bootstrap). + */ + registerTabsTag: function () { + var tNav = '.tabs ul.nav-tabs '; + + // Binding `nav-tabs` & `tab-content` by real time permalink changing. + $(function() { + $(window).bind('hashchange', function() { + var tHash = location.hash; + if (tHash !== '') { + $(tNav + 'li:has(a[href="' + tHash + '"])').addClass('active').siblings().removeClass('active'); + $(tHash).addClass('active').siblings().removeClass('active'); + } + }).trigger('hashchange'); + }); + + $(tNav + '.tab').on('click', function (href) { + href.preventDefault(); + // Prevent selected tab to select again. + if(!$(this).hasClass('active')){ + + // Add & Remove active class on `nav-tabs` & `tab-content`. + $(this).addClass('active').siblings().removeClass('active'); + var tActive = $(this).find('a').attr('href'); + $(tActive).addClass('active').siblings().removeClass('active'); + + // Clear location hash in browser if #permalink exists. + if (location.hash !== '') { + history.pushState('', document.title, window.location.pathname + window.location.search); + } + } + }); + + }, + + registerESCKeyEvent: function () { + $(document).on('keyup', function (event) { + var shouldDismissSearchPopup = event.which === 27 && + $('.search-popup').is(':visible'); + if (shouldDismissSearchPopup) { + $('.search-popup').hide(); + $('.search-popup-overlay').remove(); + $('body').css('overflow', ''); + } + }); + }, + + registerBackToTop: function () { + var THRESHOLD = 50; + var $top = $('.back-to-top'); + + $(window).on('scroll', function () { + $top.toggleClass('back-to-top-on', window.pageYOffset > THRESHOLD); + + var scrollTop = $(window).scrollTop(); + var contentVisibilityHeight = NexT.utils.getContentVisibilityHeight(); + var scrollPercent = (scrollTop) / (contentVisibilityHeight); + var scrollPercentRounded = Math.round(scrollPercent*100); + var scrollPercentMaxed = (scrollPercentRounded > 100) ? 100 : scrollPercentRounded; + $('#scrollpercent>span').html(scrollPercentMaxed); + }); + + $top.on('click', function () { + $('body').velocity('scroll'); + }); + }, + + /** + * Transform embedded video to support responsive layout. + * @see http://toddmotto.com/fluid-and-responsive-youtube-and-vimeo-videos-with-fluidvids-js/ + */ + embeddedVideoTransformer: function () { + var $iframes = $('iframe'); + + // Supported Players. Extend this if you need more players. + var SUPPORTED_PLAYERS = [ + 'www.youtube.com', + 'player.vimeo.com', + 'player.youku.com', + 'music.163.com', + 'www.tudou.com' + ]; + var pattern = new RegExp( SUPPORTED_PLAYERS.join('|') ); + + $iframes.each(function () { + var iframe = this; + var $iframe = $(this); + var oldDimension = getDimension($iframe); + var newDimension; + + if (this.src.search(pattern) > 0) { + + // Calculate the video ratio based on the iframe's w/h dimensions + var videoRatio = getAspectRadio(oldDimension.width, oldDimension.height); + + // Replace the iframe's dimensions and position the iframe absolute + // This is the trick to emulate the video ratio + $iframe.width('100%').height('100%') + .css({ + position: 'absolute', + top: '0', + left: '0' + }); + + + // Wrap the iframe in a new
      which uses a dynamically fetched padding-top property + // based on the video's w/h dimensions + var wrap = document.createElement('div'); + wrap.className = 'fluid-vids'; + wrap.style.position = 'relative'; + wrap.style.marginBottom = '20px'; + wrap.style.width = '100%'; + wrap.style.paddingTop = videoRatio + '%'; + // Fix for appear inside tabs tag. + (wrap.style.paddingTop === '') && (wrap.style.paddingTop = '50%'); + + // Add the iframe inside our newly created
      + var iframeParent = iframe.parentNode; + iframeParent.insertBefore(wrap, iframe); + wrap.appendChild(iframe); + + // Additional adjustments for 163 Music + if (this.src.search('music.163.com') > 0) { + newDimension = getDimension($iframe); + var shouldRecalculateAspect = newDimension.width > oldDimension.width || + newDimension.height < oldDimension.height; + + // 163 Music Player has a fixed height, so we need to reset the aspect radio + if (shouldRecalculateAspect) { + wrap.style.paddingTop = getAspectRadio(newDimension.width, oldDimension.height) + '%'; + } + } + } + }); + + function getDimension($element) { + return { + width: $element.width(), + height: $element.height() + }; + } + + function getAspectRadio(width, height) { + return height / width * 100; + } + }, + + /** + * Add `menu-item-active` class name to menu item + * via comparing location.path with menu item's href. + */ + addActiveClassToMenuItem: function () { + var path = window.location.pathname; + path = path === '/' ? path : path.substring(0, path.length - 1); + $('.menu-item a[href^="' + path + '"]:first').parent().addClass('menu-item-active'); + }, + + hasMobileUA: function () { + var nav = window.navigator; + var ua = nav.userAgent; + var pa = /iPad|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian/g; + + return pa.test(ua); + }, + + isTablet: function () { + return window.screen.width < 992 && window.screen.width > 767 && this.hasMobileUA(); + }, + + isMobile: function () { + return window.screen.width < 767 && this.hasMobileUA(); + }, + + isDesktop: function () { + return !this.isTablet() && !this.isMobile(); + }, + + /** + * Escape meta symbols in jQuery selectors. + * + * @param selector + * @returns {string|void|XML|*} + */ + escapeSelector: function (selector) { + return selector.replace(/[!"$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, '\\$&'); + }, + + displaySidebar: function () { + if (!this.isDesktop() || this.isPisces() || this.isGemini()) { + return; + } + $('.sidebar-toggle').trigger('click'); + }, + + isMist: function () { + return CONFIG.scheme === 'Mist'; + }, + + isPisces: function () { + return CONFIG.scheme === 'Pisces'; + }, + + isGemini: function () { + return CONFIG.scheme === 'Gemini'; + }, + + getScrollbarWidth: function () { + var $div = $('
      ').addClass('scrollbar-measure').prependTo('body'); + var div = $div[0]; + var scrollbarWidth = div.offsetWidth - div.clientWidth; + + $div.remove(); + + return scrollbarWidth; + }, + + getContentVisibilityHeight: function () { + var docHeight = $('#content').height(), + winHeight = $(window).height(), + contentVisibilityHeight = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight); + return contentVisibilityHeight; + }, + + getSidebarb2tHeight: function () { + //var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? document.getElementsByClassName('back-to-top')[0].clientHeight : 0; + var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? $('.back-to-top').height() : 0; + //var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? 24 : 0; + return sidebarb2tHeight; + }, + + getSidebarSchemePadding: function () { + var sidebarNavHeight = ($('.sidebar-nav').css('display') == 'block') ? $('.sidebar-nav').outerHeight(true) : 0, + sidebarInner = $('.sidebar-inner'), + sidebarPadding = sidebarInner.innerWidth() - sidebarInner.width(), + sidebarSchemePadding = this.isPisces() || this.isGemini() ? + ((sidebarPadding * 2) + sidebarNavHeight + (CONFIG.sidebar.offset * 2) + this.getSidebarb2tHeight()) : + ((sidebarPadding * 2) + (sidebarNavHeight / 2)); + return sidebarSchemePadding; + } + + /** + * Affix behaviour for Sidebar. + * + * @returns {Boolean} + */ +// needAffix: function () { +// return this.isPisces() || this.isGemini(); +// } +}; + +$(document).ready(function () { + + initSidebarDimension(); + + /** + * Init Sidebar & TOC inner dimensions on all pages and for all schemes. + * Need for Sidebar/TOC inner scrolling if content taller then viewport. + */ + function initSidebarDimension () { + var updateSidebarHeightTimer; + + $(window).on('resize', function () { + updateSidebarHeightTimer && clearTimeout(updateSidebarHeightTimer); + + updateSidebarHeightTimer = setTimeout(function () { + var sidebarWrapperHeight = document.body.clientHeight - NexT.utils.getSidebarSchemePadding(); + + updateSidebarHeight(sidebarWrapperHeight); + }, 0); + }); + + // Initialize Sidebar & TOC Width. + var scrollbarWidth = NexT.utils.getScrollbarWidth(); + if ($('.site-overview-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) { + $('.site-overview').css('width', 'calc(100% + ' + scrollbarWidth + 'px)'); + } + if ($('.post-toc-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) { + $('.post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)'); + } + + // Initialize Sidebar & TOC Height. + updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding()); + } + + function updateSidebarHeight (height) { + height = height || 'auto'; + $('.site-overview, .post-toc').css('max-height', height); + } + +}); diff --git a/themes/next_old/source/lib/Han/dist/font/han-space.otf b/themes/next_old/source/lib/Han/dist/font/han-space.otf new file mode 100644 index 0000000..845b1bc Binary files /dev/null and b/themes/next_old/source/lib/Han/dist/font/han-space.otf differ diff --git a/themes/next_old/source/lib/Han/dist/font/han-space.woff b/themes/next_old/source/lib/Han/dist/font/han-space.woff new file mode 100644 index 0000000..6ccc84f Binary files /dev/null and b/themes/next_old/source/lib/Han/dist/font/han-space.woff differ diff --git a/themes/next_old/source/lib/Han/dist/font/han.otf b/themes/next_old/source/lib/Han/dist/font/han.otf new file mode 100644 index 0000000..2ce2f46 Binary files /dev/null and b/themes/next_old/source/lib/Han/dist/font/han.otf differ diff --git a/themes/next_old/source/lib/Han/dist/font/han.woff b/themes/next_old/source/lib/Han/dist/font/han.woff new file mode 100644 index 0000000..011e06c Binary files /dev/null and b/themes/next_old/source/lib/Han/dist/font/han.woff differ diff --git a/themes/next_old/source/lib/Han/dist/font/han.woff2 b/themes/next_old/source/lib/Han/dist/font/han.woff2 new file mode 100644 index 0000000..02c49af Binary files /dev/null and b/themes/next_old/source/lib/Han/dist/font/han.woff2 differ diff --git a/themes/next_old/source/lib/Han/dist/han.css b/themes/next_old/source/lib/Han/dist/han.css new file mode 100644 index 0000000..9bafab6 --- /dev/null +++ b/themes/next_old/source/lib/Han/dist/han.css @@ -0,0 +1,1168 @@ +@charset "UTF-8"; + +/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ +/*! Han.css: the CSS typography framework optimised for Hanzi */ + +/* normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +menu, +nav, +section, +summary { + /* 1 */ + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; +} +audio:not([controls]) { + display: none; + height: 0; +} +progress { + vertical-align: baseline; +} +template, +[hidden] { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline-width: 0; +} +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} +b, +strong { + font-weight: inherit; +} +b, +strong { + font-weight: bolder; +} +dfn { + font-style: italic; +} +h1 { + font-size: 2em; + margin: .67em 0; +} +mark { + background-color: #ff0; + color: #000; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -.25em; +} +sup { + top: -.5em; +} +img { + border-style: none; +} +svg:not(:root) { + overflow: hidden; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} +figure { + margin: 1em 40px; +} +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} +button, +input, +select, +textarea { + font: inherit; +} +optgroup { + font-weight: bold; +} +button, +input, +select { + /* 2 */ + overflow: visible; +} +button, +input, +select, +textarea { + /* 1 */ + margin: 0; +} +button, +select { + /* 1 */ + text-transform: none; +} +button, +[type="button"], +[type="reset"], +[type="submit"] { + cursor: pointer; +} +[disabled] { + cursor: default; +} +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +button:-moz-focusring, +input:-moz-focusring { + outline: 1px dotted ButtonText; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: .35em .625em .75em; +} +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} +textarea { + overflow: auto; +} +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} +[type="search"] { + -webkit-appearance: textfield; +} +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +@font-face { + font-family: "Han Heiti"; + src: local("Hiragino Sans GB"), local("Lantinghei TC Extralight"), local("Lantinghei SC Extralight"), local(FZLTXHB--B51-0), local(FZLTZHK--GBK1-0), local("Pingfang SC Light"), local("Pingfang TC Light"), local("Pingfang-SC-Light"), local("Pingfang-TC-Light"), local("Pingfang SC"), local("Pingfang TC"), local("Heiti SC Light"), local(STHeitiSC-Light), local("Heiti SC"), local("Heiti TC Light"), local(STHeitiTC-Light), local("Heiti TC"), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR"), local("Noto Sans CJK JP"), local("Noto Sans CJK SC"), local("Noto Sans CJK TC"), local("Source Han Sans K"), local("Source Han Sans KR"), local("Source Han Sans JP"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Droid Sans Fallback"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Heiti"; + src: local(YuGothic), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"); +} +@font-face { + font-family: "Han Heiti CNS"; + src: local("Pingfang TC Light"), local("Pingfang-TC-Light"), local("Pingfang TC"), local("Heiti TC Light"), local(STHeitiTC-Light), local("Heiti TC"), local("Lantinghei TC Extralight"), local(FZLTXHB--B51-0), local("Lantinghei TC"), local("Microsoft Jhenghei"), local("Microsoft Yahei"), local("Noto Sans CJK TC"), local("Source Han Sans TC"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Source Han Sans HK"), local("Droid Sans Fallback"); +} +@font-face { + font-family: "Han Heiti GB"; + src: local("Hiragino Sans GB"), local("Pingfang SC Light"), local("Pingfang-SC-Light"), local("Pingfang SC"), local("Lantinghei SC Extralight"), local(FZLTXHK--GBK1-0), local("Lantinghei SC"), local("Heiti SC Light"), local(STHeitiSC-Light), local("Heiti SC"), local("Microsoft Yahei"), local("Noto Sans CJK SC"), local("Source Han Sans SC"), local("Source Han Sans CN"), local("Droid Sans Fallback"); +} +@font-face { + font-family: "Han Heiti"; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Lantinghei SC Demibold"), local(FZLTZHB--B51-0), local(FZLTZHK--GBK1-0), local("Pingfang-SC-Semibold"), local("Pingfang-TC-Semibold"), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Microsoft Yahei Bold"), local("Microsoft Jhenghei Bold"), local(MicrosoftYahei-Bold), local(MicrosoftJhengHeiBold), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR Bold"), local("Noto Sans CJK JP Bold"), local("Noto Sans CJK SC Bold"), local("Noto Sans CJK TC Bold"), local(NotoSansCJKkr-Bold), local(NotoSansCJKjp-Bold), local(NotoSansCJKsc-Bold), local(NotoSansCJKtc-Bold), local("Source Han Sans K Bold"), local(SourceHanSansK-Bold), local("Source Han Sans K"), local("Source Han Sans KR Bold"), local("Source Han Sans JP Bold"), local("Source Han Sans CN Bold"), local("Source Han Sans HK Bold"), local("Source Han Sans TW Bold"), local("Source Han Sans TWHK Bold"), local("SourceHanSansKR-Bold"), local("SourceHanSansJP-Bold"), local("SourceHanSansCN-Bold"), local("SourceHanSansHK-Bold"), local("SourceHanSansTW-Bold"), local("SourceHanSansTWHK-Bold"), local("Source Han Sans KR"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Heiti"; + font-weight: 600; + src: local("YuGothic Bold"), local("Hiragino Kaku Gothic ProN W6"), local("Hiragino Kaku Gothic Pro W6"), local(YuGo-Bold), local(HiraKakuProN-W6), local(HiraKakuPro-W6); +} +@font-face { + font-family: "Han Heiti CNS"; + font-weight: 600; + src: local("Pingfang TC Semibold"), local("Pingfang-TC-Semibold"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Lantinghei TC Demibold"), local(FZLTXHB--B51-0), local("Microsoft Jhenghei Bold"), local(MicrosoftJhengHeiBold), local("Microsoft Jhenghei"), local("Microsoft Yahei Bold"), local(MicrosoftYahei-Bold), local("Noto Sans CJK TC Bold"), local(NotoSansCJKtc-Bold), local("Noto Sans CJK TC"), local("Source Han Sans TC Bold"), local("SourceHanSansTC-Bold"), local("Source Han Sans TC"), local("Source Han Sans TW Bold"), local("SourceHanSans-TW"), local("Source Han Sans TW"), local("Source Han Sans TWHK Bold"), local("SourceHanSans-TWHK"), local("Source Han Sans TWHK"), local("Source Han Sans HK"), local("SourceHanSans-HK"), local("Source Han Sans HK"); +} +@font-face { + font-family: "Han Heiti GB"; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Pingfang SC Semibold"), local("Pingfang-SC-Semibold"), local("Lantinghei SC Demibold"), local(FZLTZHK--GBK1-0), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Microsoft Yahei Bold"), local(MicrosoftYahei-Bold), local("Microsoft Yahei"), local("Noto Sans CJK SC Bold"), local(NotoSansCJKsc-Bold), local("Noto Sans CJK SC"), local("Source Han Sans SC Bold"), local("SourceHanSansSC-Bold"), local("Source Han Sans CN Bold"), local("SourceHanSansCN-Bold"), local("Source Han Sans SC"), local("Source Han Sans CN"); +} +@font-face { + font-family: "Han Songti"; + src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local(STSong), local("Lisong Pro"), local(SimSun), local(PMingLiU); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Songti"; + src: local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); +} +@font-face { + font-family: "Han Songti CNS"; + src: local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local("Lisong Pro"), local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local(STSong), local(PMingLiU), local(SimSun); +} +@font-face { + font-family: "Han Songti GB"; + src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local(STSong), local(SimSun), local(PMingLiU); +} +@font-face { + font-family: "Han Songti"; + font-weight: 600; + src: local("STSongti SC Bold"), local("STSongti TC Bold"), local(STSongti-SC-Bold), local(STSongti-TC-Bold), local("STSongti SC"), local("STSongti TC"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Songti"; + font-weight: 600; + src: local("YuMincho Demibold"), local("Hiragino Mincho ProN W6"), local("Hiragino Mincho Pro W6"), local(YuMin-Demibold), local(HiraMinProN-W6), local(HiraMinPro-W6), local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"); +} +@font-face { + font-family: "Han Songti CNS"; + font-weight: 600; + src: local("STSongti TC Bold"), local("STSongti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold), local("STSongti TC"), local("STSongti SC"); +} +@font-face { + font-family: "Han Songti GB"; + font-weight: 600; + src: local("STSongti SC Bold"), local(STSongti-SC-Bold), local("STSongti SC"); +} +@font-face { + font-family: cursive; + src: local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"), local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Kaiti"; + src: local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"), local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Kaiti CNS"; + src: local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Kaiti GB"; + src: local("Kaiti SC Regular"), local(STKaiTi-SC-Regular), local("Kaiti SC"), local(STKaiti), local(Kai), local(Kaiti), local(DFKai-SB); +} +@font-face { + font-family: cursive; + font-weight: 600; + src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti SC Bold"), local(STKaiti-SC-Bold), local("Kaiti TC"), local("Kaiti SC"); +} +@font-face { + font-family: "Han Kaiti"; + font-weight: 600; + src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti SC Bold"), local(STKaiti-SC-Bold), local("Kaiti TC"), local("Kaiti SC"); +} +@font-face { + font-family: "Han Kaiti CNS"; + font-weight: 600; + src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti TC"); +} +@font-face { + font-family: "Han Kaiti GB"; + font-weight: 600; + src: local("Kaiti SC Bold"), local(STKaiti-SC-Bold); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Fangsong"; + src: local(STFangsong), local(FangSong); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Fangsong CNS"; + src: local(STFangsong), local(FangSong); +} +@font-face { + unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; + font-family: "Han Fangsong GB"; + src: local(STFangsong), local(FangSong); +} +@font-face { + font-family: "Biaodian Sans"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Serif"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; +} +@font-face { + font-family: "Biaodian Sans"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Serif"; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; +} +@font-face { + font-family: "Biaodian Sans"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Serif"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Yakumono Sans"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Arial Unicode MS"), local("MS Gothic"); + unicode-range: U+2014; +} +@font-face { + font-family: "Yakumono Serif"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"), local("Microsoft Yahei"); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; +} +@font-face { + font-family: "Biaodian Sans"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Serif"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local("MS Mincho"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Yakumono Sans"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"); + unicode-range: U+2026; +} +@font-face { + font-family: "Yakumono Serif"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); + unicode-range: U+2026; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + font-weight: bold; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + font-weight: bold; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; +} +@font-face { + font-family: "Biaodian Sans"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Serif"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); + unicode-range: U+25CF; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("MS Gothic"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU); + unicode-range: U+3002, U+FF0C, U+3001; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU), local("MS Gothic"); + unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local(STSongti-TC-Regular), local("Lisong Pro"), local("Heiti TC"), local(PMingLiU); + unicode-range: U+3002, U+FF0C, U+3001; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); + unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local("MS Gothic"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Songti SC"), local(STSongti), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local("MS Mincho"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); + unicode-range: U+FF0D, U+FF0F, U+FF3C; +} +@font-face { + font-family: "Biaodian Pro Sans"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Serif"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; +} +@font-face { + font-family: "Biaodian Basic"; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Basic"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Sans"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans CNS"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Sans GB"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif CNS"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Biaodian Pro Serif GB"; + font-weight: bold; + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+2014, U+2026, U+00B7; +} +@font-face { + font-family: "Latin Italic Serif"; + src: local("Georgia Italic"), local("Times New Roman Italic"), local(Georgia-Italic), local(TimesNewRomanPS-ItalicMT), local(Times-Italic); +} +@font-face { + font-family: "Latin Italic Serif"; + font-weight: 700; + src: local("Georgia Bold Italic"), local("Times New Roman Bold Italic"), local(Georgia-BoldItalic), local(TimesNewRomanPS-BoldItalicMT), local(Times-Italic); +} +@font-face { + font-family: "Latin Italic Sans"; + src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); +} +@font-face { + font-family: "Latin Italic Sans"; + font-weight: 700; + src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral TF Sans"; + src: local(Skia), local("Neutraface 2 Text"), local(Candara), local(Corbel); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral TF Serif"; + src: local(Georgia), local("Hoefler Text"), local("Big Caslon"); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral TF Italic Serif"; + src: local("Georgia Italic"), local("Hoefler Text Italic"), local(Georgia-Italic), local(HoeflerText-Italic); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Sans"; + src: local("Helvetica Neue"), local(Helvetica), local(Arial); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Sans"; + src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Sans"; + font-weight: bold; + src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Serif"; + src: local(Palatino), local("Palatino Linotype"), local("Times New Roman"); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Serif"; + src: local("Palatino Italic"), local("Palatino Italic Linotype"), local("Times New Roman Italic"), local(Palatino-Italic), local(Palatino-Italic-Linotype), local(TimesNewRomanPS-ItalicMT); +} +@font-face { + unicode-range: U+0030-0039; + font-family: "Numeral LF Italic Serif"; + font-weight: bold; + src: local("Palatino Bold Italic"), local("Palatino Bold Italic Linotype"), local("Times New Roman Bold Italic"), local(Palatino-BoldItalic), local(Palatino-BoldItalic-Linotype), local(TimesNewRomanPS-BoldItalicMT); +} +@font-face { + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; + font-family: "Zhuyin Kaiti"; +} +@font-face { + unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; + font-family: "Zhuyin Heiti"; + src: local("Hiragino Sans GB"), local("Heiti TC"), local("Microsoft Jhenghei"), url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); +} +@font-face { + font-family: "Zhuyin Heiti"; + src: local("Heiti TC"), local("Microsoft Jhenghei"), url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + unicode-range: U+3127; +} +@font-face { + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + font-family: "Zhuyin Heiti"; + unicode-range: U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+31B4, U+31B5, U+31B6, U+31B7, U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; +} +@font-face { + src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); + font-family: "Romanization Sans"; + unicode-range: U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; +} +html:lang(zh-Latn), +html:lang(ja-Latn), +html:not(:lang(zh)):not(:lang(ja)), +html *:lang(zh-Latn), +html *:lang(ja-Latn), +html *:not(:lang(zh)):not(:lang(ja)), +article strong:lang(zh-Latn), +article strong:lang(ja-Latn), +article strong:not(:lang(zh)):not(:lang(ja)), +article strong *:lang(zh-Latn), +article strong *:lang(ja-Latn), +article strong *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +html:lang(zh), +html:lang(zh-Hant), +[lang^="zh"], +[lang*="Hant"], +[lang="zh-TW"], +[lang="zh-HK"], +article strong:lang(zh), +article strong:lang(zh-Hant) { + font-family: "Biaodian Pro Sans CNS", "Helvetica Neue", Helvetica, Arial, "Zhuyin Heiti", "Han Heiti", sans-serif; +} +html:lang(zh).no-unicoderange, +html:lang(zh-Hant).no-unicoderange, +.no-unicoderange [lang^="zh"], +.no-unicoderange [lang*="Hant"], +.no-unicoderange [lang="zh-TW"], +.no-unicoderange [lang="zh-HK"], +.no-unicoderange article strong:lang(zh), +.no-unicoderange article strong:lang(zh-Hant) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +html:lang(zh-Hans), +html:lang(zh-CN), +[lang*="Hans"], +[lang="zh-CN"], +article strong:lang(zh-Hans), +article strong:lang(zh-CN) { + font-family: "Biaodian Pro Sans GB", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; +} +html:lang(zh-Hans).no-unicoderange, +html:lang(zh-CN).no-unicoderange, +.no-unicoderange [lang*="Hans"], +.no-unicoderange [lang="zh-CN"], +.no-unicoderange article strong:lang(zh-Hans), +.no-unicoderange article strong:lang(zh-CN) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; +} +html:lang(ja), +[lang^="ja"], +article strong:lang(ja) { + font-family: "Yakumono Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; +} +html:lang(ja).no-unicoderange, +.no-unicoderange [lang^="ja"], +.no-unicoderange article strong:lang(ja) { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +article blockquote i:lang(zh-Latn), +article blockquote var:lang(zh-Latn), +article blockquote i:lang(ja-Latn), +article blockquote var:lang(ja-Latn), +article blockquote i:not(:lang(zh)):not(:lang(ja)), +article blockquote var:not(:lang(zh)):not(:lang(ja)), +article blockquote i *:lang(zh-Latn), +article blockquote var *:lang(zh-Latn), +article blockquote i *:lang(ja-Latn), +article blockquote var *:lang(ja-Latn), +article blockquote i *:not(:lang(zh)):not(:lang(ja)), +article blockquote var *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +article blockquote i:lang(zh), +article blockquote var:lang(zh), +article blockquote i:lang(zh-Hant), +article blockquote var:lang(zh-Hant) { + font-family: "Biaodian Pro Sans CNS", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Zhuyin Heiti", "Han Heiti", sans-serif; +} +.no-unicoderange article blockquote i:lang(zh), +.no-unicoderange article blockquote var:lang(zh), +.no-unicoderange article blockquote i:lang(zh-Hant), +.no-unicoderange article blockquote var:lang(zh-Hant) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +.no-unicoderange article blockquote i:lang(zh), +.no-unicoderange article blockquote var:lang(zh), +.no-unicoderange article blockquote i:lang(zh-Hant), +.no-unicoderange article blockquote var:lang(zh-Hant) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} +article blockquote i:lang(zh-Hans), +article blockquote var:lang(zh-Hans), +article blockquote i:lang(zh-CN), +article blockquote var:lang(zh-CN) { + font-family: "Biaodian Pro Sans GB", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; +} +.no-unicoderange article blockquote i:lang(zh-Hans), +.no-unicoderange article blockquote var:lang(zh-Hans), +.no-unicoderange article blockquote i:lang(zh-CN), +.no-unicoderange article blockquote var:lang(zh-CN) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; +} +article blockquote i:lang(ja), +article blockquote var:lang(ja) { + font-family: "Yakumono Sans", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.no-unicoderange article blockquote i:lang(ja), +.no-unicoderange article blockquote var:lang(ja) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; +} +article figure blockquote:lang(zh-Latn), +article figure blockquote:lang(ja-Latn), +article figure blockquote:not(:lang(zh)):not(:lang(ja)), +article figure blockquote *:lang(zh-Latn), +article figure blockquote *:lang(ja-Latn), +article figure blockquote *:not(:lang(zh)):not(:lang(ja)) { + font-family: Georgia, "Times New Roman", "Han Songti", cursive, serif; +} +article figure blockquote:lang(zh), +article figure blockquote:lang(zh-Hant) { + font-family: "Biaodian Pro Serif CNS", "Numeral LF Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Songti", serif; +} +.no-unicoderange article figure blockquote:lang(zh), +.no-unicoderange article figure blockquote:lang(zh-Hant) { + font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Songti", serif; +} +article figure blockquote:lang(zh-Hans), +article figure blockquote:lang(zh-CN) { + font-family: "Biaodian Pro Serif GB", "Numeral LF Serif", Georgia, "Times New Roman", "Han Songti GB", serif; +} +.no-unicoderange article figure blockquote:lang(zh-Hans), +.no-unicoderange article figure blockquote:lang(zh-CN) { + font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Songti GB", serif; +} +article figure blockquote:lang(ja) { + font-family: "Yakumono Serif", "Numeral LF Serif", Georgia, "Times New Roman", serif; +} +.no-unicoderange article figure blockquote:lang(ja) { + font-family: "Numeral LF Serif", Georgia, "Times New Roman", serif; +} +article blockquote:lang(zh-Latn), +article blockquote:lang(ja-Latn), +article blockquote:not(:lang(zh)):not(:lang(ja)), +article blockquote *:lang(zh-Latn), +article blockquote *:lang(ja-Latn), +article blockquote *:not(:lang(zh)):not(:lang(ja)) { + font-family: Georgia, "Times New Roman", "Han Kaiti", cursive, serif; +} +article blockquote:lang(zh), +article blockquote:lang(zh-Hant) { + font-family: "Biaodian Pro Serif CNS", "Numeral LF Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Kaiti", cursive, serif; +} +.no-unicoderange article blockquote:lang(zh), +.no-unicoderange article blockquote:lang(zh-Hant) { + font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; +} +article blockquote:lang(zh-Hans), +article blockquote:lang(zh-CN) { + font-family: "Biaodian Pro Serif GB", "Numeral LF Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; +} +.no-unicoderange article blockquote:lang(zh-Hans), +.no-unicoderange article blockquote:lang(zh-CN) { + font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; +} +article blockquote:lang(ja) { + font-family: "Yakumono Serif", "Numeral LF Serif", Georgia, "Times New Roman", cursive, serif; +} +.no-unicoderange article blockquote:lang(ja) { + font-family: "Numeral LF Serif", Georgia, "Times New Roman", cursive, serif; +} +i:lang(zh-Latn), +var:lang(zh-Latn), +i:lang(ja-Latn), +var:lang(ja-Latn), +i:not(:lang(zh)):not(:lang(ja)), +var:not(:lang(zh)):not(:lang(ja)), +i *:lang(zh-Latn), +var *:lang(zh-Latn), +i *:lang(ja-Latn), +var *:lang(ja-Latn), +i *:not(:lang(zh)):not(:lang(ja)), +var *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; +} +i:lang(zh), +var:lang(zh), +i:lang(zh-Hant), +var:lang(zh-Hant) { + font-family: "Biaodian Pro Serif CNS", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Kaiti", cursive, serif; +} +.no-unicoderange i:lang(zh), +.no-unicoderange var:lang(zh), +.no-unicoderange i:lang(zh-Hant), +.no-unicoderange var:lang(zh-Hant) { + font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; +} +i:lang(zh-Hans), +var:lang(zh-Hans), +i:lang(zh-CN), +var:lang(zh-CN) { + font-family: "Biaodian Pro Serif GB", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; +} +.no-unicoderange i:lang(zh-Hans), +.no-unicoderange var:lang(zh-Hans), +.no-unicoderange i:lang(zh-CN), +.no-unicoderange var:lang(zh-CN) { + font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; +} +i:lang(ja), +var:lang(ja) { + font-family: "Yakumono Serif", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", cursive, serif; +} +.no-unicoderange i:lang(ja), +.no-unicoderange var:lang(ja) { + font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", cursive, serif; +} +code:lang(zh-Latn), +kbd:lang(zh-Latn), +samp:lang(zh-Latn), +pre:lang(zh-Latn), +code:lang(ja-Latn), +kbd:lang(ja-Latn), +samp:lang(ja-Latn), +pre:lang(ja-Latn), +code:not(:lang(zh)):not(:lang(ja)), +kbd:not(:lang(zh)):not(:lang(ja)), +samp:not(:lang(zh)):not(:lang(ja)), +pre:not(:lang(zh)):not(:lang(ja)), +code *:lang(zh-Latn), +kbd *:lang(zh-Latn), +samp *:lang(zh-Latn), +pre *:lang(zh-Latn), +code *:lang(ja-Latn), +kbd *:lang(ja-Latn), +samp *:lang(ja-Latn), +pre *:lang(ja-Latn), +code *:not(:lang(zh)):not(:lang(ja)), +kbd *:not(:lang(zh)):not(:lang(ja)), +samp *:not(:lang(zh)):not(:lang(ja)), +pre *:not(:lang(zh)):not(:lang(ja)) { + font-family: Menlo, Consolas, Courier, "Han Heiti", monospace, monospace, sans-serif; +} +code:lang(zh), +kbd:lang(zh), +samp:lang(zh), +pre:lang(zh), +code:lang(zh-Hant), +kbd:lang(zh-Hant), +samp:lang(zh-Hant), +pre:lang(zh-Hant) { + font-family: "Biaodian Pro Sans CNS", Menlo, Consolas, Courier, "Zhuyin Heiti", "Han Heiti", monospace, monospace, sans-serif; +} +.no-unicoderange code:lang(zh), +.no-unicoderange kbd:lang(zh), +.no-unicoderange samp:lang(zh), +.no-unicoderange pre:lang(zh), +.no-unicoderange code:lang(zh-Hant), +.no-unicoderange kbd:lang(zh-Hant), +.no-unicoderange samp:lang(zh-Hant), +.no-unicoderange pre:lang(zh-Hant) { + font-family: Menlo, Consolas, Courier, "Han Heiti", monospace, monospace, sans-serif; +} +code:lang(zh-Hans), +kbd:lang(zh-Hans), +samp:lang(zh-Hans), +pre:lang(zh-Hans), +code:lang(zh-CN), +kbd:lang(zh-CN), +samp:lang(zh-CN), +pre:lang(zh-CN) { + font-family: "Biaodian Pro Sans GB", Menlo, Consolas, Courier, "Han Heiti GB", monospace, monospace, sans-serif; +} +.no-unicoderange code:lang(zh-Hans), +.no-unicoderange kbd:lang(zh-Hans), +.no-unicoderange samp:lang(zh-Hans), +.no-unicoderange pre:lang(zh-Hans), +.no-unicoderange code:lang(zh-CN), +.no-unicoderange kbd:lang(zh-CN), +.no-unicoderange samp:lang(zh-CN), +.no-unicoderange pre:lang(zh-CN) { + font-family: Menlo, Consolas, Courier, "Han Heiti GB", monospace, monospace, sans-serif; +} +code:lang(ja), +kbd:lang(ja), +samp:lang(ja), +pre:lang(ja) { + font-family: "Yakumono Sans", Menlo, Consolas, Courier, monospace, monospace, sans-serif; +} +.no-unicoderange code:lang(ja), +.no-unicoderange kbd:lang(ja), +.no-unicoderange samp:lang(ja), +.no-unicoderange pre:lang(ja) { + font-family: Menlo, Consolas, Courier, monospace, monospace, sans-serif; +} +html, +.no-unicoderange h-char.bd-liga, +.no-unicoderange h-char[unicode="b7"], +ruby h-zhuyin, +h-ruby h-zhuyin, +ruby h-zhuyin h-diao, +h-ruby h-zhuyin h-diao, +ruby.romanization rt, +h-ruby.romanization rt, +ruby [annotation] rt, +h-ruby [annotation] rt { + -moz-font-feature-settings: "liga"; + -ms-font-feature-settings: "liga"; + -webkit-font-feature-settings: "liga"; + font-feature-settings: "liga"; +} +html, +[lang^="zh"], +[lang*="Hant"], +[lang="zh-TW"], +[lang="zh-HK"], +[lang*="Hans"], +[lang="zh-CN"], +article strong, +code, +kbd, +samp, +pre, +article blockquote i, +article blockquote var { + -moz-font-feature-settings: "liga=1, locl=0"; + -ms-font-feature-settings: "liga", "locl" 0; + -webkit-font-feature-settings: "liga", "locl" 0; + font-feature-settings: "liga", "locl" 0; +} +.no-unicoderange h-char.bd-cop:lang(zh-Hant), +.no-unicoderange h-char.bd-cop:lang(zh-TW), +.no-unicoderange h-char.bd-cop:lang(zh-HK) { + font-family: -apple-system, "Han Heiti CNS"; +} +.no-unicoderange h-char.bd-liga, +.no-unicoderange h-char[unicode="b7"] { + font-family: "Biaodian Basic", "Han Heiti"; +} +.no-unicoderange h-char[unicode="2018"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="2019"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="201c"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="201d"]:lang(zh-Hans), +.no-unicoderange h-char[unicode="2018"]:lang(zh-CN), +.no-unicoderange h-char[unicode="2019"]:lang(zh-CN), +.no-unicoderange h-char[unicode="201c"]:lang(zh-CN), +.no-unicoderange h-char[unicode="201d"]:lang(zh-CN) { + font-family: "Han Heiti GB"; +} +i, +var { + font-style: inherit; +} +.no-unicoderange ruby h-zhuyin, +.no-unicoderange h-ruby h-zhuyin, +.no-unicoderange ruby h-zhuyin h-diao, +.no-unicoderange h-ruby h-zhuyin h-diao { + font-family: "Zhuyin Kaiti", cursive, serif; +} +ruby h-diao, +h-ruby h-diao { + font-family: "Zhuyin Kaiti", cursive, serif; +} +ruby.romanization rt, +h-ruby.romanization rt, +ruby [annotation] rt, +h-ruby [annotation] rt { + font-family: "Romanization Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; +} diff --git a/themes/next_old/source/lib/Han/dist/han.js b/themes/next_old/source/lib/Han/dist/han.js new file mode 100644 index 0000000..75976c6 --- /dev/null +++ b/themes/next_old/source/lib/Han/dist/han.js @@ -0,0 +1,3005 @@ +/*! + * 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co + * Han.css: the CSS typography framework optimised for Hanzi + */ + +void function( global, factory ) { + + // CommonJS + if ( typeof module === 'object' && typeof module.exports === 'object' ) { + module.exports = factory( global, true ) + // AMD + } else if ( typeof define === 'function' && define.amd ) { + define(function() { return factory( global, true ) }) + // Global namespace + } else { + factory( global ) + } + +}( typeof window !== 'undefined' ? window : this, function( window, noGlobalNS ) { + +'use strict' + +var document = window.document + +var root = document.documentElement + +var body = document.body + +var VERSION = '3.3.0' + +var ROUTINE = [ + // Initialise the condition with feature-detecting + // classes (Modernizr-alike), binding onto the root + // element, possibly ``. + 'initCond', + + // Address element normalisation + 'renderElem', + + // Handle Biaodian + /* 'jinzify', */ + 'renderJiya', + 'renderHanging', + + // Address Biaodian correction + 'correctBiaodian', + + // Address Hanzi and Western script mixed spacing + 'renderHWS', + + // Address presentational correction to combining ligatures + 'substCombLigaWithPUA' + + // Address semantic correction to inaccurate characters + // **Note:** inactivated by default + /* 'substInaccurateChar', */ +] + +// Define Han +var Han = function( context, condition ) { + return new Han.fn.init( context, condition ) +} + +var init = function() { + if ( arguments[ 0 ] ) { + this.context = arguments[ 0 ] + } + if ( arguments[ 1 ] ) { + this.condition = arguments[ 1 ] + } + return this +} + +Han.version = VERSION + +Han.fn = Han.prototype = { + version: VERSION, + + constructor: Han, + + // Body as the default target context + context: body, + + // Root element as the default condition + condition: root, + + // Default rendering routine + routine: ROUTINE, + + init: init, + + setRoutine: function( routine ) { + if ( Array.isArray( routine )) { + this.routine = routine + } + return this + }, + + // Note that the routine set up here will execute + // only once. The method won't alter the routine in + // the instance or in the prototype chain. + render: function( routine ) { + var it = this + var routine = Array.isArray( routine ) + ? routine + : this.routine + + routine + .forEach(function( method ) { + if ( + typeof method === 'string' && + typeof it[ method ] === 'function' + ) { + it[ method ]() + } else if ( + Array.isArray( method ) && + typeof it[ method[0] ] === 'function' + ) { + it[ method.shift() ].apply( it, method ) + } + }) + return this + } +} + +Han.fn.init.prototype = Han.fn + +/** + * Shortcut for `render()` under the default + * situation. + * + * Once initialised, replace `Han.init` with the + * instance for future usage. + */ +Han.init = function() { + return Han.init = Han().render() +} + +var UNICODE = { + /** + * Western punctuation (西文標點符號) + */ + punct: { + base: '[\u2026,.;:!?\u203D_]', + sing: '[\u2010-\u2014\u2026]', + middle: '[\\\/~\\-&\u2010-\u2014_]', + open: '[\'"‘“\\(\\[\u00A1\u00BF\u2E18\u00AB\u2039\u201A\u201C\u201E]', + close: '[\'"”’\\)\\]\u00BB\u203A\u201B\u201D\u201F]', + end: '[\'"”’\\)\\]\u00BB\u203A\u201B\u201D\u201F\u203C\u203D\u2047-\u2049,.;:!?]', + }, + + /** + * CJK biaodian (CJK標點符號) + */ + biaodian: { + base: '[︰.、,。:;?!ー]', + liga: '[—…⋯]', + middle: '[·\/-゠\uFF06\u30FB\uFF3F]', + open: '[「『《〈(〔[{【〖]', + close: '[」』》〉)〕]}】〗]', + end: '[」』》〉)〕]}】〗︰.、,。:;?!ー]' + }, + + /** + * CJK-related blocks (CJK相關字符區段) + * + * 1. 中日韓統一意音文字:[\u4E00-\u9FFF] + Basic CJK unified ideographs + * 2. 擴展-A區:[\u3400-\u4DB5] + Extended-A + * 3. 擴展-B區:[\u20000-\u2A6D6]([\uD840-\uD869][\uDC00-\uDED6]) + Extended-B + * 4. 擴展-C區:[\u2A700-\u2B734](\uD86D[\uDC00-\uDF3F]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD869[\uDF00-\uDFFF]) + Extended-C + * 5. 擴展-D區:[\u2B740-\u2B81D](急用漢字,\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]) + Extended-D + * 6. 擴展-E區:[\u2B820-\u2F7FF](暫未支援) + Extended-E (not supported yet) + * 7. 擴展-F區(暫未支援) + Extended-F (not supported yet) + * 8. 筆畫區:[\u31C0-\u31E3] + Strokes + * 9. 意音數字「〇」:[\u3007] + Ideographic number zero + * 10. 相容意音文字及補充:[\uF900-\uFAFF][\u2F800-\u2FA1D](不使用) + Compatibility ideograph and supplement (not supported) + + 12 exceptions: + [\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29] + + https://zh.wikipedia.org/wiki/中日韓統一表意文字#cite_note-1 + + * 11. 康熙字典及簡化字部首:[\u2F00-\u2FD5\u2E80-\u2EF3] + Kangxi and supplement radicals + * 12. 意音文字描述字元:[\u2FF0-\u2FFA] + Ideographic description characters + */ + hanzi: { + base: '[\u4E00-\u9FFF\u3400-\u4DB5\u31C0-\u31E3\u3007\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD800-\uDBFF][\uDC00-\uDFFF]', + desc: '[\u2FF0-\u2FFA]', + radical: '[\u2F00-\u2FD5\u2E80-\u2EF3]' + }, + + /** + * Latin script blocks (拉丁字母區段) + * + * 1. 基本拉丁字母:A-Za-z + Basic Latin + * 2. 阿拉伯數字:0-9 + Digits + * 3. 補充-1:[\u00C0-\u00FF] + Latin-1 supplement + * 4. 擴展-A區:[\u0100-\u017F] + Extended-A + * 5. 擴展-B區:[\u0180-\u024F] + Extended-B + * 5. 擴展-C區:[\u2C60-\u2C7F] + Extended-C + * 5. 擴展-D區:[\uA720-\uA7FF] + Extended-D + * 6. 附加區:[\u1E00-\u1EFF] + Extended additional + * 7. 變音組字符:[\u0300-\u0341\u1DC0-\u1DFF] + Combining diacritical marks + */ + latin: { + base: '[A-Za-z0-9\u00C0-\u00FF\u0100-\u017F\u0180-\u024F\u2C60-\u2C7F\uA720-\uA7FF\u1E00-\u1EFF]', + combine: '[\u0300-\u0341\u1DC0-\u1DFF]' + }, + + /** + * Elli̱niká (Greek) script blocks (希臘字母區段) + * + * 1. 希臘字母及擴展:[\u0370–\u03FF\u1F00-\u1FFF] + Basic Greek & Greek Extended + * 2. 阿拉伯數字:0-9 + Digits + * 3. 希臘字母變音組字符:[\u0300-\u0345\u1DC0-\u1DFF] + Combining diacritical marks + */ + ellinika: { + base: '[0-9\u0370-\u03FF\u1F00-\u1FFF]', + combine: '[\u0300-\u0345\u1DC0-\u1DFF]' + }, + + /** + * Kirillica (Cyrillic) script blocks (西里爾字母區段) + * + * 1. 西里爾字母及補充:[\u0400-\u0482\u048A-\u04FF\u0500-\u052F] + Basic Cyrillic and supplement + * 2. 擴展B區:[\uA640-\uA66E\uA67E-\uA697] + Extended-B + * 3. 阿拉伯數字:0-9 + Digits + * 4. 西里爾字母組字符:[\u0483-\u0489\u2DE0-\u2DFF\uA66F-\uA67D\uA69F](位擴展A、B區) + Cyrillic combining diacritical marks (in extended-A, B) + */ + kirillica: { + base: '[0-9\u0400-\u0482\u048A-\u04FF\u0500-\u052F\uA640-\uA66E\uA67E-\uA697]', + combine: '[\u0483-\u0489\u2DE0-\u2DFF\uA66F-\uA67D\uA69F]' + }, + + /** + * Kana (假名) + * + * 1. 日文假名:[\u30A2\u30A4\u30A6\u30A8\u30AA-\u30FA\u3042\u3044\u3046\u3048\u304A-\u3094\u309F\u30FF] + Japanese Kana + * 2. 假名補充[\u1B000\u1B001](\uD82C[\uDC00-\uDC01]) + Kana supplement + * 3. 日文假名小寫:[\u3041\u3043\u3045\u3047\u3049\u30A1\u30A3\u30A5\u30A7\u30A9\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u31F0-\u31FF] + Japanese small Kana + * 4. 假名組字符:[\u3099-\u309C] + Kana combining characters + * 5. 半形假名:[\uFF66-\uFF9F] + Halfwidth Kana + * 6. 符號:[\u309D\u309E\u30FB-\u30FE] + Marks + */ + kana: { + base: '[\u30A2\u30A4\u30A6\u30A8\u30AA-\u30FA\u3042\u3044\u3046\u3048\u304A-\u3094\u309F\u30FF]|\uD82C[\uDC00-\uDC01]', + small: '[\u3041\u3043\u3045\u3047\u3049\u30A1\u30A3\u30A5\u30A7\u30A9\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u31F0-\u31FF]', + combine: '[\u3099-\u309C]', + half: '[\uFF66-\uFF9F]', + mark: '[\u30A0\u309D\u309E\u30FB-\u30FE]' + }, + + /** + * Eonmun (Hangul, 諺文) + * + * 1. 諺文音節:[\uAC00-\uD7A3] + Eonmun (Hangul) syllables + * 2. 諺文字母:[\u1100-\u11FF\u314F-\u3163\u3131-\u318E\uA960-\uA97C\uD7B0-\uD7FB] + Eonmun (Hangul) letters + * 3. 半形諺文字母:[\uFFA1-\uFFDC] + Halfwidth Eonmun (Hangul) letters + */ + eonmun: { + base: '[\uAC00-\uD7A3]', + letter: '[\u1100-\u11FF\u314F-\u3163\u3131-\u318E\uA960-\uA97C\uD7B0-\uD7FB]', + half: '[\uFFA1-\uFFDC]' + }, + + /** + * Zhuyin (注音符號, Mandarin & Dialect Phonetic Symbols) + * + * 1. 國語注音、方言音符號:[\u3105-\u312D][\u31A0-\u31BA] + Bopomofo phonetic symbols + * 2. 平上去聲調號:[\u02D9\u02CA\u02C5\u02C7\u02EA\u02EB\u02CB] (**註:**國語三聲包含乙個不合規範的符號) + Level, rising, departing tones + * 3. 入聲調號:[\u31B4-\u31B7][\u0358\u030d]? + Checked (entering) tones + */ + zhuyin: { + base: '[\u3105-\u312D\u31A0-\u31BA]', + initial: '[\u3105-\u3119\u312A-\u312C\u31A0-\u31A3]', + medial: '[\u3127-\u3129]', + final: '[\u311A-\u3129\u312D\u31A4-\u31B3\u31B8-\u31BA]', + tone: '[\u02D9\u02CA\u02C5\u02C7\u02CB\u02EA\u02EB]', + checked: '[\u31B4-\u31B7][\u0358\u030d]?' + } +} + +var TYPESET = (function() { + var rWhite = '[\\x20\\t\\r\\n\\f]' + // Whitespace characters + // http://www.w3.org/TR/css3-selectors/#whitespace + + var rPtOpen = UNICODE.punct.open + var rPtClose = UNICODE.punct.close + var rPtEnd = UNICODE.punct.end + var rPtMid = UNICODE.punct.middle + var rPtSing = UNICODE.punct.sing + var rPt = rPtOpen + '|' + rPtEnd + '|' + rPtMid + + var rBDOpen = UNICODE.biaodian.open + var rBDClose = UNICODE.biaodian.close + var rBDEnd = UNICODE.biaodian.end + var rBDMid = UNICODE.biaodian.middle + var rBDLiga = UNICODE.biaodian.liga + '{2}' + var rBD = rBDOpen + '|' + rBDEnd + '|' + rBDMid + + var rKana = UNICODE.kana.base + UNICODE.kana.combine + '?' + var rKanaS = UNICODE.kana.small + UNICODE.kana.combine + '?' + var rKanaH = UNICODE.kana.half + var rEon = UNICODE.eonmun.base + '|' + UNICODE.eonmun.letter + var rEonH = UNICODE.eonmun.half + + var rHan = UNICODE.hanzi.base + '|' + UNICODE.hanzi.desc + '|' + UNICODE.hanzi.radical + '|' + rKana + + var rCbn = UNICODE.ellinika.combine + var rLatn = UNICODE.latin.base + rCbn + '*' + var rGk = UNICODE.ellinika.base + rCbn + '*' + + var rCyCbn = UNICODE.kirillica.combine + var rCy = UNICODE.kirillica.base + rCyCbn + '*' + + var rAlph = rLatn + '|' + rGk + '|' + rCy + + // For words like `it's`, `Jones’s` or `'99` + var rApo = '[\u0027\u2019]' + var rChar = rHan + '|(?:' + rAlph + '|' + rApo + ')+' + + var rZyS = UNICODE.zhuyin.initial + var rZyJ = UNICODE.zhuyin.medial + var rZyY = UNICODE.zhuyin.final + var rZyD = UNICODE.zhuyin.tone + '|' + UNICODE.zhuyin.checked + + return { + /* Character-level selector (字級選擇器) + */ + char: { + punct: { + all: new RegExp( '(' + rPt + ')', 'g' ), + open: new RegExp( '(' + rPtOpen + ')', 'g' ), + end: new RegExp( '(' + rPtEnd + ')', 'g' ), + sing: new RegExp( '(' + rPtSing + ')', 'g' ) + }, + + biaodian: { + all: new RegExp( '(' + rBD + ')', 'g' ), + open: new RegExp( '(' + rBDOpen + ')', 'g' ), + close: new RegExp( '(' + rBDClose + ')', 'g' ), + end: new RegExp( '(' + rBDEnd + ')', 'g' ), + liga: new RegExp( '(' + rBDLiga + ')', 'g' ) + }, + + hanzi: new RegExp( '(' + rHan + ')', 'g' ), + + latin: new RegExp( '(' + rLatn + ')', 'ig' ), + ellinika: new RegExp( '(' + rGk + ')', 'ig' ), + kirillica: new RegExp( '(' + rCy + ')', 'ig' ), + + kana: new RegExp( '(' + rKana + '|' + rKanaS + '|' + rKanaH + ')', 'g' ), + eonmun: new RegExp( '(' + rEon + '|' + rEonH + ')', 'g' ) + }, + + /* Word-level selectors (詞級選擇器) + */ + group: { + biaodian: [ + new RegExp( '((' + rBD + '){2,})', 'g' ), + new RegExp( '(' + rBDLiga + rBDOpen + ')', 'g' ) + ], + punct: null, + hanzi: new RegExp( '(' + rHan + ')+', 'g' ), + western: new RegExp( '(' + rLatn + '|' + rGk + '|' + rCy + '|' + rPt + ')+', 'ig' ), + kana: new RegExp( '(' + rKana + '|' + rKanaS + '|' + rKanaH + ')+', 'g' ), + eonmun: new RegExp( '(' + rEon + '|' + rEonH + '|' + rPt + ')+', 'g' ) + }, + + /* Punctuation Rules (禁則) + */ + jinze: { + hanging: new RegExp( rWhite + '*([、,。.])(?!' + rBDEnd + ')', 'ig' ), + touwei: new RegExp( '(' + rBDOpen + '+)(' + rChar + ')(' + rBDEnd + '+)', 'ig' ), + tou: new RegExp( '(' + rBDOpen + '+)(' + rChar + ')', 'ig' ), + wei: new RegExp( '(' + rChar + ')(' + rBDEnd + '+)', 'ig' ), + middle: new RegExp( '(' + rChar + ')(' + rBDMid + ')(' + rChar + ')', 'ig' ) + }, + + zhuyin: { + form: new RegExp( '^\u02D9?(' + rZyS + ')?(' + rZyJ + ')?(' + rZyY + ')?(' + rZyD + ')?$' ), + diao: new RegExp( '(' + rZyD + ')', 'g' ) + }, + + /* Hanzi and Western mixed spacing (漢字西文混排間隙) + * - Basic mode + * - Strict mode + */ + hws: { + base: [ + new RegExp( '('+ rHan + ')(' + rAlph + '|' + rPtOpen + ')', 'ig' ), + new RegExp( '('+ rAlph + '|' + rPtEnd + ')(' + rHan + ')', 'ig' ) + ], + + strict: [ + new RegExp( '('+ rHan + ')' + rWhite + '?(' + rAlph + '|' + rPtOpen + ')', 'ig' ), + new RegExp( '('+ rAlph + '|' + rPtEnd + ')' + rWhite + '?(' + rHan + ')', 'ig' ) + ] + }, + + // The feature displays the following characters + // in its variant form for font consistency and + // presentational reason. Meanwhile, this won't + // alter the original character in the DOM. + 'display-as': { + 'ja-font-for-hant': [ + // '夠 够', + '查 査', + '啟 啓', + '鄉 鄕', + '值 値', + '污 汚' + ], + + 'comb-liga-pua': [ + [ '\u0061[\u030d\u0358]', '\uDB80\uDC61' ], + [ '\u0065[\u030d\u0358]', '\uDB80\uDC65' ], + [ '\u0069[\u030d\u0358]', '\uDB80\uDC69' ], + [ '\u006F[\u030d\u0358]', '\uDB80\uDC6F' ], + [ '\u0075[\u030d\u0358]', '\uDB80\uDC75' ], + + [ '\u31B4[\u030d\u0358]', '\uDB8C\uDDB4' ], + [ '\u31B5[\u030d\u0358]', '\uDB8C\uDDB5' ], + [ '\u31B6[\u030d\u0358]', '\uDB8C\uDDB6' ], + [ '\u31B7[\u030d\u0358]', '\uDB8C\uDDB7' ] + ], + + 'comb-liga-vowel': [ + [ '\u0061[\u030d\u0358]', '\uDB80\uDC61' ], + [ '\u0065[\u030d\u0358]', '\uDB80\uDC65' ], + [ '\u0069[\u030d\u0358]', '\uDB80\uDC69' ], + [ '\u006F[\u030d\u0358]', '\uDB80\uDC6F' ], + [ '\u0075[\u030d\u0358]', '\uDB80\uDC75' ] + ], + + 'comb-liga-zhuyin': [ + [ '\u31B4[\u030d\u0358]', '\uDB8C\uDDB4' ], + [ '\u31B5[\u030d\u0358]', '\uDB8C\uDDB5' ], + [ '\u31B6[\u030d\u0358]', '\uDB8C\uDDB6' ], + [ '\u31B7[\u030d\u0358]', '\uDB8C\uDDB7' ] + ] + }, + + // The feature actually *converts* the character + // in the DOM for semantic reason. + // + // Note that this could be aggressive. + 'inaccurate-char': [ + [ '[\u2022\u2027]', '\u00B7' ], + [ '\u22EF\u22EF', '\u2026\u2026' ], + [ '\u2500\u2500', '\u2014\u2014' ], + [ '\u2035', '\u2018' ], + [ '\u2032', '\u2019' ], + [ '\u2036', '\u201C' ], + [ '\u2033', '\u201D' ] + ] + } +})() + +Han.UNICODE = UNICODE +Han.TYPESET = TYPESET + +// Aliases +Han.UNICODE.cjk = Han.UNICODE.hanzi +Han.UNICODE.greek = Han.UNICODE.ellinika +Han.UNICODE.cyrillic = Han.UNICODE.kirillica +Han.UNICODE.hangul = Han.UNICODE.eonmun +Han.UNICODE.zhuyin.ruyun = Han.UNICODE.zhuyin.checked + +Han.TYPESET.char.cjk = Han.TYPESET.char.hanzi +Han.TYPESET.char.greek = Han.TYPESET.char.ellinika +Han.TYPESET.char.cyrillic = Han.TYPESET.char.kirillica +Han.TYPESET.char.hangul = Han.TYPESET.char.eonmun + +Han.TYPESET.group.hangul = Han.TYPESET.group.eonmun +Han.TYPESET.group.cjk = Han.TYPESET.group.hanzi + +var $ = { + /** + * Query selectors which return arrays of the resulted + * node lists. + */ + id: function( selector, $context ) { + return ( $context || document ).getElementById( selector ) + }, + + tag: function( selector, $context ) { + return this.makeArray( + ( $context || document ).getElementsByTagName( selector ) + ) + }, + + qs: function( selector, $context ) { + return ( $context || document ).querySelector( selector ) + }, + + qsa: function( selector, $context ) { + return this.makeArray( + ( $context || document ).querySelectorAll( selector ) + ) + }, + + parent: function( $node, selector ) { + return selector + ? (function() { + if ( typeof $.matches !== 'function' ) return + + while (!$.matches( $node, selector )) { + if ( + !$node || + $node === document.documentElement + ) { + $node = undefined + break + } + $node = $node.parentNode + } + return $node + })() + : $node + ? $node.parentNode : undefined + }, + + /** + * Create a document fragment, a text node with text + * or an element with/without classes. + */ + create: function( name, clazz ) { + var $elmt = '!' === name + ? document.createDocumentFragment() + : '' === name + ? document.createTextNode( clazz || '' ) + : document.createElement( name ) + + try { + if ( clazz ) { + $elmt.className = clazz + } + } catch (e) {} + + return $elmt + }, + + /** + * Clone a DOM node (text, element or fragment) deeply + * or childlessly. + */ + clone: function( $node, deep ) { + return $node.cloneNode( + typeof deep === 'boolean' + ? deep + : true + ) + }, + + /** + * Remove a node (text, element or fragment). + */ + remove: function( $node ) { + return $node.parentNode.removeChild( $node ) + }, + + /** + * Set attributes all in once with an object. + */ + setAttr: function( target, attr ) { + if ( typeof attr !== 'object' ) return + var len = attr.length + + // Native `NamedNodeMap``: + if ( + typeof attr[0] === 'object' && + 'name' in attr[0] + ) { + for ( var i = 0; i < len; i++ ) { + if ( attr[ i ].value !== undefined ) { + target.setAttribute( attr[ i ].name, attr[ i ].value ) + } + } + + // Plain object: + } else { + for ( var name in attr ) { + if ( + attr.hasOwnProperty( name ) && + attr[ name ] !== undefined + ) { + target.setAttribute( name, attr[ name ] ) + } + } + } + return target + }, + + /** + * Indicate whether or not the given node is an + * element. + */ + isElmt: function( $node ) { + return $node && $node.nodeType === Node.ELEMENT_NODE + }, + + /** + * Indicate whether or not the given node should + * be ignored (`` or comments). + */ + isIgnorable: function( $node ) { + if ( !$node ) return false + + return ( + $node.nodeName === 'WBR' || + $node.nodeType === Node.COMMENT_NODE + ) + }, + + /** + * Convert array-like objects into real arrays. + */ + makeArray: function( object ) { + return Array.prototype.slice.call( object ) + }, + + /** + * Extend target with an object. + */ + extend: function( target, object ) { + if (( + typeof target === 'object' || + typeof target === 'function' ) && + typeof object === 'object' + ) { + for ( var name in object ) { + if (object.hasOwnProperty( name )) { + target[ name ] = object[ name ] + } + } + } + return target + } +} + +var Fibre = +/*! + * Fibre.js v0.2.1 | MIT License | github.com/ethantw/fibre.js + * Based on findAndReplaceDOMText + */ + +function( Finder ) { + +'use strict' + +var VERSION = '0.2.1' +var NON_INLINE_PROSE = Finder.NON_INLINE_PROSE +var AVOID_NON_PROSE = Finder.PRESETS.prose.filterElements + +var global = window || {} +var document = global.document || undefined + +function matches( node, selector, bypassNodeType39 ) { + var Efn = Element.prototype + var matches = Efn.matches || Efn.mozMatchesSelector || Efn.msMatchesSelector || Efn.webkitMatchesSelector + + if ( node instanceof Element ) { + return matches.call( node, selector ) + } else if ( bypassNodeType39 ) { + if ( /^[39]$/.test( node.nodeType )) return true + } + return false +} + +if ( typeof document === 'undefined' ) throw new Error( 'Fibre requires a DOM-supported environment.' ) + +var Fibre = function( context, preset ) { + return new Fibre.fn.init( context, preset ) +} + +Fibre.version = VERSION +Fibre.matches = matches + +Fibre.fn = Fibre.prototype = { + constructor: Fibre, + + version: VERSION, + + finder: [], + + context: undefined, + + portionMode: 'retain', + + selector: {}, + + preset: 'prose', + + init: function( context, noPreset ) { + if ( !!noPreset ) this.preset = null + + this.selector = { + context: null, + filter: [], + avoid: [], + boundary: [] + } + + if ( !context ) { + throw new Error( 'A context is required for Fibre to initialise.' ) + } else if ( context instanceof Node ) { + if ( context instanceof Document ) this.context = context.body || context + else this.context = context + } else if ( typeof context === 'string' ) { + this.context = document.querySelector( context ) + this.selector.context = context + } + return this + }, + + filterFn: function( node ) { + var filter = this.selector.filter.join( ', ' ) || '*' + var avoid = this.selector.avoid.join( ', ' ) || null + var result = matches( node, filter, true ) && !matches( node, avoid ) + return ( this.preset === 'prose' ) ? AVOID_NON_PROSE( node ) && result : result + }, + + boundaryFn: function( node ) { + var boundary = this.selector.boundary.join( ', ' ) || null + var result = matches( node, boundary ) + return ( this.preset === 'prose' ) ? NON_INLINE_PROSE( node ) || result : result + }, + + filter: function( selector ) { + if ( typeof selector === 'string' ) { + this.selector.filter.push( selector ) + } + return this + }, + + endFilter: function( all ) { + if ( all ) { + this.selector.filter = [] + } else { + this.selector.filter.pop() + } + return this + }, + + avoid: function( selector ) { + if ( typeof selector === 'string' ) { + this.selector.avoid.push( selector ) + } + return this + }, + + endAvoid: function( all ) { + if ( all ) { + this.selector.avoid = [] + } else { + this.selector.avoid.pop() + } + return this + }, + + addBoundary: function( selector ) { + if ( typeof selector === 'string' ) { + this.selector.boundary.push( selector ) + } + return this + }, + + removeBoundary: function() { + this.selector.boundary = [] + return this + }, + + setMode: function( portionMode ) { + this.portionMode = portionMode === 'first' ? 'first' : 'retain' + return this + }, + + replace: function( regexp, newSubStr ) { + var it = this + it.finder.push(Finder( it.context, { + find: regexp, + replace: newSubStr, + filterElements: function( currentNode ) { + return it.filterFn( currentNode ) + }, + forceContext: function( currentNode ) { + return it.boundaryFn( currentNode ) + }, + portionMode: it.portionMode + })) + return it + }, + + wrap: function( regexp, strElemName ) { + var it = this + it.finder.push(Finder( it.context, { + find: regexp, + wrap: strElemName, + filterElements: function( currentNode ) { + return it.filterFn( currentNode ) + }, + forceContext: function( currentNode ) { + return it.boundaryFn( currentNode ) + }, + portionMode: it.portionMode + })) + return it + }, + + revert: function( level ) { + var max = this.finder.length + var level = Number( level ) || ( level === 0 ? Number(0) : + ( level === 'all' ? max : 1 )) + + if ( typeof max === 'undefined' || max === 0 ) return this + else if ( level > max ) level = max + + for ( var i = level; i > 0; i-- ) { + this.finder.pop().revert() + } + return this + } +} + +// Deprecated API(s) +Fibre.fn.filterOut = Fibre.fn.avoid + +// Make sure init() inherit from Fibre() +Fibre.fn.init.prototype = Fibre.fn + +return Fibre + +}( + +/** + * findAndReplaceDOMText v 0.4.3 + * @author James Padolsey http://james.padolsey.com + * @license http://unlicense.org/UNLICENSE + * + * Matches the text of a DOM node against a regular expression + * and replaces each match (or node-separated portions of the match) + * in the specified element. + */ + (function() { + + var PORTION_MODE_RETAIN = 'retain' + var PORTION_MODE_FIRST = 'first' + var doc = document + var toString = {}.toString + var hasOwn = {}.hasOwnProperty + function isArray(a) { + return toString.call(a) == '[object Array]' + } + + function escapeRegExp(s) { + return String(s).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') + } + + function exposed() { + // Try deprecated arg signature first: + return deprecated.apply(null, arguments) || findAndReplaceDOMText.apply(null, arguments) + } + + function deprecated(regex, node, replacement, captureGroup, elFilter) { + if ((node && !node.nodeType) && arguments.length <= 2) { + return false + } + var isReplacementFunction = typeof replacement == 'function' + if (isReplacementFunction) { + replacement = (function(original) { + return function(portion, match) { + return original(portion.text, match.startIndex) + } + }(replacement)) + } + + // Awkward support for deprecated argument signature (<0.4.0) + var instance = findAndReplaceDOMText(node, { + + find: regex, + + wrap: isReplacementFunction ? null : replacement, + replace: isReplacementFunction ? replacement : '$' + (captureGroup || '&'), + + prepMatch: function(m, mi) { + + // Support captureGroup (a deprecated feature) + + if (!m[0]) throw 'findAndReplaceDOMText cannot handle zero-length matches' + if (captureGroup > 0) { + var cg = m[captureGroup] + m.index += m[0].indexOf(cg) + m[0] = cg + } + + m.endIndex = m.index + m[0].length + m.startIndex = m.index + m.index = mi + return m + }, + filterElements: elFilter + }) + exposed.revert = function() { + return instance.revert() + } + return true + } + + /** + * findAndReplaceDOMText + * + * Locates matches and replaces with replacementNode + * + * @param {Node} node Element or Text node to search within + * @param {RegExp} options.find The regular expression to match + * @param {String|Element} [options.wrap] A NodeName, or a Node to clone + * @param {String|Function} [options.replace='$&'] What to replace each match with + * @param {Function} [options.filterElements] A Function to be called to check whether to + * process an element. (returning true = process element, + * returning false = avoid element) + */ + function findAndReplaceDOMText(node, options) { + return new Finder(node, options) + } + + exposed.NON_PROSE_ELEMENTS = { + br:1, hr:1, + // Media / Source elements: + script:1, style:1, img:1, video:1, audio:1, canvas:1, svg:1, map:1, object:1, + // Input elements + input:1, textarea:1, select:1, option:1, optgroup: 1, button:1 + } + exposed.NON_CONTIGUOUS_PROSE_ELEMENTS = { + + // Elements that will not contain prose or block elements where we don't + // want prose to be matches across element borders: + + // Block Elements + address:1, article:1, aside:1, blockquote:1, dd:1, div:1, + dl:1, fieldset:1, figcaption:1, figure:1, footer:1, form:1, h1:1, h2:1, h3:1, + h4:1, h5:1, h6:1, header:1, hgroup:1, hr:1, main:1, nav:1, noscript:1, ol:1, + output:1, p:1, pre:1, section:1, ul:1, + // Other misc. elements that are not part of continuous inline prose: + br:1, li: 1, summary: 1, dt:1, details:1, rp:1, rt:1, rtc:1, + // Media / Source elements: + script:1, style:1, img:1, video:1, audio:1, canvas:1, svg:1, map:1, object:1, + // Input elements + input:1, textarea:1, select:1, option:1, optgroup: 1, button:1, + // Table related elements: + table:1, tbody:1, thead:1, th:1, tr:1, td:1, caption:1, col:1, tfoot:1, colgroup:1 + + } + exposed.NON_INLINE_PROSE = function(el) { + return hasOwn.call(exposed.NON_CONTIGUOUS_PROSE_ELEMENTS, el.nodeName.toLowerCase()) + } + // Presets accessed via `options.preset` when calling findAndReplaceDOMText(): + exposed.PRESETS = { + prose: { + forceContext: exposed.NON_INLINE_PROSE, + filterElements: function(el) { + return !hasOwn.call(exposed.NON_PROSE_ELEMENTS, el.nodeName.toLowerCase()) + } + } + } + exposed.Finder = Finder + /** + * Finder -- encapsulates logic to find and replace. + */ + function Finder(node, options) { + + var preset = options.preset && exposed.PRESETS[options.preset] + options.portionMode = options.portionMode || PORTION_MODE_RETAIN + if (preset) { + for (var i in preset) { + if (hasOwn.call(preset, i) && !hasOwn.call(options, i)) { + options[i] = preset[i] + } + } + } + + this.node = node + this.options = options + // ENable match-preparation method to be passed as option: + this.prepMatch = options.prepMatch || this.prepMatch + this.reverts = [] + this.matches = this.search() + if (this.matches.length) { + this.processMatches() + } + + } + + Finder.prototype = { + + /** + * Searches for all matches that comply with the instance's 'match' option + */ + search: function() { + + var match + var matchIndex = 0 + var offset = 0 + var regex = this.options.find + var textAggregation = this.getAggregateText() + var matches = [] + var self = this + regex = typeof regex === 'string' ? RegExp(escapeRegExp(regex), 'g') : regex + matchAggregation(textAggregation) + function matchAggregation(textAggregation) { + for (var i = 0, l = textAggregation.length; i < l; ++i) { + + var text = textAggregation[i] + if (typeof text !== 'string') { + // Deal with nested contexts: (recursive) + matchAggregation(text) + continue + } + + if (regex.global) { + while (match = regex.exec(text)) { + matches.push(self.prepMatch(match, matchIndex++, offset)) + } + } else { + if (match = text.match(regex)) { + matches.push(self.prepMatch(match, 0, offset)) + } + } + + offset += text.length + } + } + + return matches + }, + + /** + * Prepares a single match with useful meta info: + */ + prepMatch: function(match, matchIndex, characterOffset) { + + if (!match[0]) { + throw new Error('findAndReplaceDOMText cannot handle zero-length matches') + } + + match.endIndex = characterOffset + match.index + match[0].length + match.startIndex = characterOffset + match.index + match.index = matchIndex + return match + }, + + /** + * Gets aggregate text within subject node + */ + getAggregateText: function() { + + var elementFilter = this.options.filterElements + var forceContext = this.options.forceContext + return getText(this.node) + /** + * Gets aggregate text of a node without resorting + * to broken innerText/textContent + */ + function getText(node, txt) { + + if (node.nodeType === 3) { + return [node.data] + } + + if (elementFilter && !elementFilter(node)) { + return [] + } + + var txt = [''] + var i = 0 + if (node = node.firstChild) do { + + if (node.nodeType === 3) { + txt[i] += node.data + continue + } + + var innerText = getText(node) + if ( + forceContext && + node.nodeType === 1 && + (forceContext === true || forceContext(node)) + ) { + txt[++i] = innerText + txt[++i] = '' + } else { + if (typeof innerText[0] === 'string') { + // Bridge nested text-node data so that they're + // not considered their own contexts: + // I.e. ['some', ['thing']] -> ['something'] + txt[i] += innerText.shift() + } + if (innerText.length) { + txt[++i] = innerText + txt[++i] = '' + } + } + } while (node = node.nextSibling) + return txt + } + + }, + + /** + * Steps through the target node, looking for matches, and + * calling replaceFn when a match is found. + */ + processMatches: function() { + + var matches = this.matches + var node = this.node + var elementFilter = this.options.filterElements + var startPortion, + endPortion, + innerPortions = [], + curNode = node, + match = matches.shift(), + atIndex = 0, // i.e. nodeAtIndex + matchIndex = 0, + portionIndex = 0, + doAvoidNode, + nodeStack = [node] + out: while (true) { + + if (curNode.nodeType === 3) { + + if (!endPortion && curNode.length + atIndex >= match.endIndex) { + + // We've found the ending + endPortion = { + node: curNode, + index: portionIndex++, + text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex), + indexInMatch: atIndex - match.startIndex, + indexInNode: match.startIndex - atIndex, // always zero for end-portions + endIndexInNode: match.endIndex - atIndex, + isEnd: true + } + } else if (startPortion) { + // Intersecting node + innerPortions.push({ + node: curNode, + index: portionIndex++, + text: curNode.data, + indexInMatch: atIndex - match.startIndex, + indexInNode: 0 // always zero for inner-portions + }) + } + + if (!startPortion && curNode.length + atIndex > match.startIndex) { + // We've found the match start + startPortion = { + node: curNode, + index: portionIndex++, + indexInMatch: 0, + indexInNode: match.startIndex - atIndex, + endIndexInNode: match.endIndex - atIndex, + text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex) + } + } + + atIndex += curNode.data.length + } + + doAvoidNode = curNode.nodeType === 1 && elementFilter && !elementFilter(curNode) + if (startPortion && endPortion) { + + curNode = this.replaceMatch(match, startPortion, innerPortions, endPortion) + // processMatches has to return the node that replaced the endNode + // and then we step back so we can continue from the end of the + // match: + + atIndex -= (endPortion.node.data.length - endPortion.endIndexInNode) + startPortion = null + endPortion = null + innerPortions = [] + match = matches.shift() + portionIndex = 0 + matchIndex++ + if (!match) { + break; // no more matches + } + + } else if ( + !doAvoidNode && + (curNode.firstChild || curNode.nextSibling) + ) { + // Move down or forward: + if (curNode.firstChild) { + nodeStack.push(curNode) + curNode = curNode.firstChild + } else { + curNode = curNode.nextSibling + } + continue + } + + // Move forward or up: + while (true) { + if (curNode.nextSibling) { + curNode = curNode.nextSibling + break + } + curNode = nodeStack.pop() + if (curNode === node) { + break out + } + } + + } + + }, + + /** + * Reverts ... TODO + */ + revert: function() { + // Reversion occurs backwards so as to avoid nodes subsequently + // replaced during the matching phase (a forward process): + for (var l = this.reverts.length; l--;) { + this.reverts[l]() + } + this.reverts = [] + }, + + prepareReplacementString: function(string, portion, match, matchIndex) { + var portionMode = this.options.portionMode + if ( + portionMode === PORTION_MODE_FIRST && + portion.indexInMatch > 0 + ) { + return '' + } + string = string.replace(/\$(\d+|&|`|')/g, function($0, t) { + var replacement + switch(t) { + case '&': + replacement = match[0] + break + case '`': + replacement = match.input.substring(0, match.startIndex) + break + case '\'': + replacement = match.input.substring(match.endIndex) + break + default: + replacement = match[+t] + } + return replacement + }) + if (portionMode === PORTION_MODE_FIRST) { + return string + } + + if (portion.isEnd) { + return string.substring(portion.indexInMatch) + } + + return string.substring(portion.indexInMatch, portion.indexInMatch + portion.text.length) + }, + + getPortionReplacementNode: function(portion, match, matchIndex) { + + var replacement = this.options.replace || '$&' + var wrapper = this.options.wrap + if (wrapper && wrapper.nodeType) { + // Wrapper has been provided as a stencil-node for us to clone: + var clone = doc.createElement('div') + clone.innerHTML = wrapper.outerHTML || new XMLSerializer().serializeToString(wrapper) + wrapper = clone.firstChild + } + + if (typeof replacement == 'function') { + replacement = replacement(portion, match, matchIndex) + if (replacement && replacement.nodeType) { + return replacement + } + return doc.createTextNode(String(replacement)) + } + + var el = typeof wrapper == 'string' ? doc.createElement(wrapper) : wrapper + replacement = doc.createTextNode( + this.prepareReplacementString( + replacement, portion, match, matchIndex + ) + ) + if (!replacement.data) { + return replacement + } + + if (!el) { + return replacement + } + + el.appendChild(replacement) + return el + }, + + replaceMatch: function(match, startPortion, innerPortions, endPortion) { + + var matchStartNode = startPortion.node + var matchEndNode = endPortion.node + var preceedingTextNode + var followingTextNode + if (matchStartNode === matchEndNode) { + + var node = matchStartNode + if (startPortion.indexInNode > 0) { + // Add `before` text node (before the match) + preceedingTextNode = doc.createTextNode(node.data.substring(0, startPortion.indexInNode)) + node.parentNode.insertBefore(preceedingTextNode, node) + } + + // Create the replacement node: + var newNode = this.getPortionReplacementNode( + endPortion, + match + ) + node.parentNode.insertBefore(newNode, node) + if (endPortion.endIndexInNode < node.length) { // ????? + // Add `after` text node (after the match) + followingTextNode = doc.createTextNode(node.data.substring(endPortion.endIndexInNode)) + node.parentNode.insertBefore(followingTextNode, node) + } + + node.parentNode.removeChild(node) + this.reverts.push(function() { + if (preceedingTextNode === newNode.previousSibling) { + preceedingTextNode.parentNode.removeChild(preceedingTextNode) + } + if (followingTextNode === newNode.nextSibling) { + followingTextNode.parentNode.removeChild(followingTextNode) + } + newNode.parentNode.replaceChild(node, newNode) + }) + return newNode + } else { + // Replace matchStartNode -> [innerMatchNodes...] -> matchEndNode (in that order) + + preceedingTextNode = doc.createTextNode( + matchStartNode.data.substring(0, startPortion.indexInNode) + ) + followingTextNode = doc.createTextNode( + matchEndNode.data.substring(endPortion.endIndexInNode) + ) + var firstNode = this.getPortionReplacementNode( + startPortion, + match + ) + var innerNodes = [] + for (var i = 0, l = innerPortions.length; i < l; ++i) { + var portion = innerPortions[i] + var innerNode = this.getPortionReplacementNode( + portion, + match + ) + portion.node.parentNode.replaceChild(innerNode, portion.node) + this.reverts.push((function(portion, innerNode) { + return function() { + innerNode.parentNode.replaceChild(portion.node, innerNode) + } + }(portion, innerNode))) + innerNodes.push(innerNode) + } + + var lastNode = this.getPortionReplacementNode( + endPortion, + match + ) + matchStartNode.parentNode.insertBefore(preceedingTextNode, matchStartNode) + matchStartNode.parentNode.insertBefore(firstNode, matchStartNode) + matchStartNode.parentNode.removeChild(matchStartNode) + matchEndNode.parentNode.insertBefore(lastNode, matchEndNode) + matchEndNode.parentNode.insertBefore(followingTextNode, matchEndNode) + matchEndNode.parentNode.removeChild(matchEndNode) + this.reverts.push(function() { + preceedingTextNode.parentNode.removeChild(preceedingTextNode) + firstNode.parentNode.replaceChild(matchStartNode, firstNode) + followingTextNode.parentNode.removeChild(followingTextNode) + lastNode.parentNode.replaceChild(matchEndNode, lastNode) + }) + return lastNode + } + } + + } + return exposed +}()) + +); + +var isNodeNormalizeNormal = (function() { + //// Disabled `Node.normalize()` for temp due to + //// issue below in IE11. + //// See: http://stackoverflow.com/questions/22337498/why-does-ie11-handle-node-normalize-incorrectly-for-the-minus-symbol + var div = $.create( 'div' ) + + div.appendChild($.create( '', '0-' )) + div.appendChild($.create( '', '2' )) + div.normalize() + + return div.firstChild.length !== 2 +})() + +function getFuncOrElmt( obj ) { + return ( + typeof obj === 'function' || + obj instanceof Element + ) + ? obj + : undefined +} + +function createBDGroup( portion ) { + var clazz = portion.index === 0 && portion.isEnd + ? 'biaodian cjk' + : 'biaodian cjk portion ' + ( + portion.index === 0 + ? 'is-first' + : portion.isEnd + ? 'is-end' + : 'is-inner' + ) + + var $elmt = $.create( 'h-char-group', clazz ) + $elmt.innerHTML = portion.text + return $elmt +} + +function createBDChar( char ) { + var div = $.create( 'div' ) + var unicode = char.charCodeAt( 0 ).toString( 16 ) + + div.innerHTML = ( + '' + char + '' + ) + return div.firstChild +} + +function getBDType( char ) { + return char.match( TYPESET.char.biaodian.open ) + ? 'bd-open' + : char.match( TYPESET.char.biaodian.close ) + ? 'bd-close bd-end' + : char.match( TYPESET.char.biaodian.end ) + ? ( + /(?:\u3001|\u3002|\uff0c)/i.test( char ) + ? 'bd-end bd-cop' + : 'bd-end' + ) + : char.match(new RegExp( UNICODE.biaodian.liga )) + ? 'bd-liga' + : char.match(new RegExp( UNICODE.biaodian.middle )) + ? 'bd-middle' + : '' +} + +$.extend( Fibre.fn, { + normalize: function() { + if ( isNodeNormalizeNormal ) { + this.context.normalize() + } + return this + }, + + // Force punctuation & biaodian typesetting rules to be applied. + jinzify: function( selector ) { + return ( + this + .filter( selector || null ) + .avoid( 'h-jinze' ) + .replace( + TYPESET.jinze.touwei, + function( portion, match ) { + var elem = $.create( 'h-jinze', 'touwei' ) + elem.innerHTML = match[0] + return (( portion.index === 0 && portion.isEnd ) || portion.index === 1 ) ? elem : '' + } + ) + .replace( + TYPESET.jinze.wei, + function( portion, match ) { + var elem = $.create( 'h-jinze', 'wei' ) + elem.innerHTML = match[0] + return portion.index === 0 ? elem : '' + } + ) + .replace( + TYPESET.jinze.tou, + function( portion, match ) { + var elem = $.create( 'h-jinze', 'tou' ) + elem.innerHTML = match[0] + return (( portion.index === 0 && portion.isEnd ) || portion.index === 1 ) + ? elem : '' + } + ) + .replace( + TYPESET.jinze.middle, + function( portion, match ) { + var elem = $.create( 'h-jinze', 'middle' ) + elem.innerHTML = match[0] + return (( portion.index === 0 && portion.isEnd ) || portion.index === 1 ) + ? elem : '' + } + ) + .endAvoid() + .endFilter() + ) + }, + + groupify: function( option ) { + var option = $.extend({ + biaodian: false, + //punct: false, + hanzi: false, // Includes Kana + kana: false, + eonmun: false, + western: false // Includes Latin, Greek and Cyrillic + }, option || {}) + + this.avoid( 'h-word, h-char-group' ) + + if ( option.biaodian ) { + this.replace( + TYPESET.group.biaodian[0], createBDGroup + ).replace( + TYPESET.group.biaodian[1], createBDGroup + ) + } + + if ( option.hanzi || option.cjk ) { + this.wrap( + TYPESET.group.hanzi, $.clone($.create( 'h-char-group', 'hanzi cjk' )) + ) + } + if ( option.western ) { + this.wrap( + TYPESET.group.western, $.clone($.create( 'h-word', 'western' )) + ) + } + if ( option.kana ) { + this.wrap( + TYPESET.group.kana, $.clone($.create( 'h-char-group', 'kana' )) + ) + } + if ( option.eonmun || option.hangul ) { + this.wrap( + TYPESET.group.eonmun, $.clone($.create( 'h-word', 'eonmun hangul' )) + ) + } + + this.endAvoid() + return this + }, + + charify: function( option ) { + var option = $.extend({ + avoid: true, + biaodian: false, + punct: false, + hanzi: false, // Includes Kana + latin: false, + ellinika: false, + kirillica: false, + kana: false, + eonmun: false + }, option || {}) + + if ( option.avoid ) { + this.avoid( 'h-char' ) + } + + if ( option.biaodian ) { + this.replace( + TYPESET.char.biaodian.all, + getFuncOrElmt( option.biaodian ) + || + function( portion ) { return createBDChar( portion.text ) } + ).replace( + TYPESET.char.biaodian.liga, + getFuncOrElmt( option.biaodian ) + || + function( portion ) { return createBDChar( portion.text ) } + ) + } + if ( option.hanzi || option.cjk ) { + this.wrap( + TYPESET.char.hanzi, + getFuncOrElmt( option.hanzi || option.cjk ) + || + $.clone($.create( 'h-char', 'hanzi cjk' )) + ) + } + if ( option.punct ) { + this.wrap( + TYPESET.char.punct.all, + getFuncOrElmt( option.punct ) + || + $.clone($.create( 'h-char', 'punct' )) + ) + } + if ( option.latin ) { + this.wrap( + TYPESET.char.latin, + getFuncOrElmt( option.latin ) + || + $.clone($.create( 'h-char', 'alphabet latin' )) + ) + } + if ( option.ellinika || option.greek ) { + this.wrap( + TYPESET.char.ellinika, + getFuncOrElmt( option.ellinika || option.greek ) + || + $.clone($.create( 'h-char', 'alphabet ellinika greek' )) + ) + } + if ( option.kirillica || option.cyrillic ) { + this.wrap( + TYPESET.char.kirillica, + getFuncOrElmt( option.kirillica || option.cyrillic ) + || + $.clone($.create( 'h-char', 'alphabet kirillica cyrillic' )) + ) + } + if ( option.kana ) { + this.wrap( + TYPESET.char.kana, + getFuncOrElmt( option.kana ) + || + $.clone($.create( 'h-char', 'kana' )) + ) + } + if ( option.eonmun || option.hangul ) { + this.wrap( + TYPESET.char.eonmun, + getFuncOrElmt( option.eonmun || option.hangul ) + || + $.clone($.create( 'h-char', 'eonmun hangul' )) + ) + } + + this.endAvoid() + return this + } +}) + +$.extend( Han, { + isNodeNormalizeNormal: isNodeNormalizeNormal, + find: Fibre, + createBDGroup: createBDGroup, + createBDChar: createBDChar +}) + +$.matches = Han.find.matches + +void [ + 'setMode', + 'wrap', 'replace', 'revert', + 'addBoundary', 'removeBoundary', + 'avoid', 'endAvoid', + 'filter', 'endFilter', + 'jinzify', 'groupify', 'charify' +].forEach(function( method ) { + Han.fn[ method ] = function() { + if ( !this.finder ) { + // Share the same selector + this.finder = Han.find( this.context ) + } + + this.finder[ method ]( arguments[ 0 ], arguments[ 1 ] ) + return this + } +}) + +var Locale = {} + +function writeOnCanvas( text, font ) { + var canvas = $.create( 'canvas' ) + var context + + canvas.width = '50' + canvas.height = '20' + canvas.style.display = 'none' + + body.appendChild( canvas ) + + context = canvas.getContext( '2d' ) + context.textBaseline = 'top' + context.font = '15px ' + font + ', sans-serif' + context.fillStyle = 'black' + context.strokeStyle = 'black' + context.fillText( text, 0, 0 ) + + return { + node: canvas, + context: context, + remove: function() { + $.remove( canvas, body ) + } + } +} + +function compareCanvases( treat, control ) { + var ret + var a = treat.context + var b = control.context + + try { + for ( var j = 1; j <= 20; j++ ) { + for ( var i = 1; i <= 50; i++ ) { + if ( + typeof ret === 'undefined' && + a.getImageData(i, j, 1, 1).data[3] !== b.getImageData(i, j, 1, 1).data[3] + ) { + ret = false + break + } else if ( typeof ret === 'boolean' ) { + break + } + + if ( i === 50 && j === 20 && typeof ret === 'undefined' ) { + ret = true + } + } + } + + // Remove and clean from memory + treat.remove() + control.remove() + treat = null + control = null + + return ret + } catch (e) {} + return false +} + +function detectFont( treat, control, text ) { + var treat = treat + var control = control || 'sans-serif' + var text = text || '辭Q' + var ret + + control = writeOnCanvas( text, control ) + treat = writeOnCanvas( text, treat ) + + return !compareCanvases( treat, control ) +} + +Locale.writeOnCanvas = writeOnCanvas +Locale.compareCanvases = compareCanvases +Locale.detectFont = detectFont + +Locale.support = (function() { + + var PREFIX = 'Webkit Moz ms'.split(' ') + + // Create an element for feature detecting + // (in `testCSSProp`) + var elem = $.create( 'h-test' ) + + function testCSSProp( prop ) { + var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1) + var allProp = ( prop + ' ' + PREFIX.join( ucProp + ' ' ) + ucProp ).split(' ') + var ret + + allProp.forEach(function( prop ) { + if ( typeof elem.style[ prop ] === 'string' ) { + ret = true + } + }) + return ret || false + } + + function injectElementWithStyle( rule, callback ) { + var fakeBody = body || $.create( 'body' ) + var div = $.create( 'div' ) + var container = body ? div : fakeBody + var callback = typeof callback === 'function' ? callback : function() {} + var style, ret, docOverflow + + style = [ '' ].join('') + + container.innerHTML += style + fakeBody.appendChild( div ) + + if ( !body ) { + fakeBody.style.background = '' + fakeBody.style.overflow = 'hidden' + docOverflow = root.style.overflow + + root.style.overflow = 'hidden' + root.appendChild( fakeBody ) + } + + // Callback + ret = callback( container, rule ) + + // Remove the injected scope + $.remove( container ) + if ( !body ) { + root.style.overflow = docOverflow + } + return !!ret + } + + function getStyle( elem, prop ) { + var ret + + if ( window.getComputedStyle ) { + ret = document.defaultView.getComputedStyle( elem, null ).getPropertyValue( prop ) + } else if ( elem.currentStyle ) { + // for IE + ret = elem.currentStyle[ prop ] + } + return ret + } + + return { + columnwidth: testCSSProp( 'columnWidth' ), + + fontface: (function() { + var ret + + injectElementWithStyle( + '@font-face { font-family: font; src: url("//"); }', + function( node, rule ) { + var style = $.qsa( 'style', node )[0] + var sheet = style.sheet || style.styleSheet + var cssText = sheet ? + ( sheet.cssRules && sheet.cssRules[0] ? + sheet.cssRules[0].cssText : sheet.cssText || '' + ) : '' + + ret = /src/i.test( cssText ) && + cssText.indexOf( rule.split(' ')[0] ) === 0 + } + ) + + return ret + })(), + + ruby: (function() { + var ruby = $.create( 'ruby' ) + var rt = $.create( 'rt' ) + var rp = $.create( 'rp' ) + var ret + + ruby.appendChild( rp ) + ruby.appendChild( rt ) + root.appendChild( ruby ) + + // Browsers that support ruby hide the `` via `display: none` + ret = ( + getStyle( rp, 'display' ) === 'none' || + // but in IE, `` has `display: inline`, so the test needs other conditions: + getStyle( ruby, 'display' ) === 'ruby' && + getStyle( rt, 'display' ) === 'ruby-text' + ) ? true : false + + // Remove and clean from memory + root.removeChild( ruby ) + ruby = null + rt = null + rp = null + + return ret + })(), + + 'ruby-display': (function() { + var div = $.create( 'div' ) + + div.innerHTML = '' + return div.querySelector( 'h-test-a' ).style.display === 'ruby' && div.querySelector( 'h-test-b' ).style.display === 'ruby-text-container' + })(), + + 'ruby-interchar': (function() { + var IC = 'inter-character' + var div = $.create( 'div' ) + var css + + div.innerHTML = '' + css = div.querySelector( 'h-test' ).style + return css.rubyPosition === IC || css.WebkitRubyPosition === IC || css.MozRubyPosition === IC || css.msRubyPosition === IC + })(), + + textemphasis: testCSSProp( 'textEmphasis' ), + + // Address feature support test for `unicode-range` via + // detecting whether it's Arial (supported) or + // Times New Roman (not supported). + unicoderange: (function() { + var ret + + injectElementWithStyle( + '@font-face{font-family:test-for-unicode-range;src:local(Arial),local("Droid Sans")}@font-face{font-family:test-for-unicode-range;src:local("Times New Roman"),local(Times),local("Droid Serif");unicode-range:U+270C}', + function() { + ret = !Locale.detectFont( + 'test-for-unicode-range', // treatment group + 'Arial, "Droid Sans"', // control group + 'Q' // ASCII characters only + ) + } + ) + return ret + })(), + + writingmode: testCSSProp( 'writingMode' ) + } +})() + +Locale.initCond = function( target ) { + var target = target || root + var ret = '' + var clazz + + for ( var feature in Locale.support ) { + clazz = ( Locale.support[ feature ] ? '' : 'no-' ) + feature + + target.classList.add( clazz ) + ret += clazz + ' ' + } + return ret +} + +var SUPPORT_IC = Locale.support[ 'ruby-interchar' ] + +// 1. Simple ruby polyfill; +// 2. Inter-character polyfill for Zhuyin +function renderSimpleRuby( $ruby ) { + var frag = $.create( '!' ) + var clazz = $ruby.classList + var $rb, $ru + + frag.appendChild( $.clone( $ruby )) + + $ + .tag( 'rt', frag.firstChild ) + .forEach(function( $rt ) { + var $rb = $.create( '!' ) + var airb = [] + var irb + + // Consider the previous nodes the implied + // ruby base + do { + irb = ( irb || $rt ).previousSibling + if ( !irb || irb.nodeName.match( /((?:h\-)?r[ubt])/i )) break + + $rb.insertBefore( $.clone( irb ), $rb.firstChild ) + airb.push( irb ) + } while ( !irb.nodeName.match( /((?:h\-)?r[ubt])/i )) + + // Create a real `` to append. + $ru = clazz.contains( 'zhuyin' ) ? createZhuyinRu( $rb, $rt ) : createNormalRu( $rb, $rt ) + + // Replace the ruby text with the new ``, + // and remove the original implied ruby base(s) + try { + $rt.parentNode.replaceChild( $ru, $rt ) + airb.map( $.remove ) + } catch ( e ) {} + }) + return createCustomRuby( frag ) +} + +function renderInterCharRuby( $ruby ) { + var frag = $.create( '!' ) + frag.appendChild( $.clone( $ruby )) + + $ + .tag( 'rt', frag.firstChild ) + .forEach(function( $rt ) { + var $rb = $.create( '!' ) + var airb = [] + var irb, $zhuyin + + // Consider the previous nodes the implied + // ruby base + do { + irb = ( irb || $rt ).previousSibling + if ( !irb || irb.nodeName.match( /((?:h\-)?r[ubt])/i )) break + + $rb.insertBefore( $.clone( irb ), $rb.firstChild ) + airb.push( irb ) + } while ( !irb.nodeName.match( /((?:h\-)?r[ubt])/i )) + + $zhuyin = $.create( 'rt' ) + $zhuyin.innerHTML = getZhuyinHTML( $rt ) + $rt.parentNode.replaceChild( $zhuyin, $rt ) + }) + return frag.firstChild +} + +// 3. Complex ruby polyfill +// - Double-lined annotation; +// - Right-angled annotation. +function renderComplexRuby( $ruby ) { + var frag = $.create( '!' ) + var clazz = $ruby.classList + var $cloned, $rb, $ru, maxspan + + frag.appendChild( $.clone( $ruby )) + $cloned = frag.firstChild + + $rb = $ru = $.tag( 'rb', $cloned ) + maxspan = $rb.length + + // First of all, deal with Zhuyin containers + // individually + // + // Note that we only support one single Zhuyin + // container in each complex ruby + void function( $rtc ) { + if ( !$rtc ) return + + $ru = $ + .tag( 'rt', $rtc ) + .map(function( $rt, i ) { + if ( !$rb[ i ] ) return + var ret = createZhuyinRu( $rb[ i ], $rt ) + + try { + $rb[ i ].parentNode.replaceChild( ret, $rb[ i ] ) + } catch ( e ) {} + return ret + }) + + // Remove the container once it's useless + $.remove( $rtc ) + $cloned.setAttribute( 'rightangle', 'true' ) + }( $cloned.querySelector( 'rtc.zhuyin' )) + + // Then, normal annotations other than Zhuyin + $ + .qsa( 'rtc:not(.zhuyin)', $cloned ) + .forEach(function( $rtc, order ) { + var ret + ret = $ + .tag( 'rt', $rtc ) + .map(function( $rt, i ) { + var rbspan = Number( $rt.getAttribute( 'rbspan' ) || 1 ) + var span = 0 + var aRb = [] + var $rb, ret + + if ( rbspan > maxspan ) rbspan = maxspan + + do { + try { + $rb = $ru.shift() + aRb.push( $rb ) + } catch (e) {} + + if ( typeof $rb === 'undefined' ) break + span += Number( $rb.getAttribute( 'span' ) || 1 ) + } while ( rbspan > span ) + + if ( rbspan < span ) { + if ( aRb.length > 1 ) { + console.error( 'An impossible `rbspan` value detected.', ruby ) + return + } + aRb = $.tag( 'rb', aRb[0] ) + $ru = aRb.slice( rbspan ).concat( $ru ) + aRb = aRb.slice( 0, rbspan ) + span = rbspan + } + + ret = createNormalRu( aRb, $rt, { + 'class': clazz, + span: span, + order: order + }) + + try { + aRb[0].parentNode.replaceChild( ret, aRb.shift() ) + aRb.map( $.remove ) + } catch (e) {} + return ret + }) + $ru = ret + if ( order === 1 ) $cloned.setAttribute( 'doubleline', 'true' ) + + // Remove the container once it's useless + $.remove( $rtc ) + }) + return createCustomRuby( frag ) +} + +// Create a new fake `` element so the +// style sheets will render it as a polyfill, +// which also helps to avoid the UA style. +function createCustomRuby( frag ) { + var $ruby = frag.firstChild + var hruby = $.create( 'h-ruby' ) + + hruby.innerHTML = $ruby.innerHTML + $.setAttr( hruby, $ruby.attributes ) + hruby.normalize() + return hruby +} + +function simplifyRubyClass( elem ) { + if ( !elem instanceof Element ) return elem + var clazz = elem.classList + + if ( clazz.contains( 'pinyin' )) clazz.add( 'romanization' ) + else if ( clazz.contains( 'romanization' )) clazz.add( 'annotation' ) + else if ( clazz.contains( 'mps' )) clazz.add( 'zhuyin' ) + else if ( clazz.contains( 'rightangle' )) clazz.add( 'complex' ) + return elem +} + +/** + * Create and return a new `` element + * according to the given contents + */ +function createNormalRu( $rb, $rt, attr ) { + var $ru = $.create( 'h-ru' ) + var $rt = $.clone( $rt ) + var attr = attr || {} + attr.annotation = 'true' + + if ( Array.isArray( $rb )) { + $ru.innerHTML = $rb.map(function( rb ) { + if ( typeof rb === 'undefined' ) return '' + return rb.outerHTML + }).join('') + $rt.outerHTML + } else { + $ru.appendChild( $.clone( $rb )) + $ru.appendChild( $rt ) + } + + $.setAttr( $ru, attr ) + return $ru +} + +/** + * Create and return a new `` element + * in Zhuyin form + */ +function createZhuyinRu( $rb, $rt ) { + var $rb = $.clone( $rb ) + + // Create an element to return + var $ru = $.create( 'h-ru' ) + $ru.setAttribute( 'zhuyin', true ) + + // - + // - + // - + // - + // - + // - + // - + $ru.appendChild( $rb ) + $ru.innerHTML += getZhuyinHTML( $rt ) + return $ru +} + +/** + * Create a Zhuyin-form HTML string + */ +function getZhuyinHTML( rt ) { + // #### Explanation #### + // * `zhuyin`: the entire phonetic annotation + // * `yin`: the plain pronunciation (w/out tone) + // * `diao`: the tone + // * `len`: the length of the plain pronunciation (`yin`) + var zhuyin = typeof rt === 'string' ? rt : rt.textContent + var yin, diao, len + + yin = zhuyin.replace( TYPESET.zhuyin.diao, '' ) + len = yin ? yin.length : 0 + diao = zhuyin + .replace( yin, '' ) + .replace( /[\u02C5]/g, '\u02C7' ) + .replace( /[\u030D]/g, '\u0358' ) + return len === 0 ? '' : '' + yin + '' + diao + '' +} + +/** + * Normalize `ruby` elements + */ +$.extend( Locale, { + + // Address normalisation for both simple and complex + // rubies (interlinear annotations) + renderRuby: function( context, target ) { + var target = target || 'ruby' + var $target = $.qsa( target, context ) + + $.qsa( 'rtc', context ) + .concat( $target ).map( simplifyRubyClass ) + + $target + .forEach(function( $ruby ) { + var clazz = $ruby.classList + var $new + + if ( clazz.contains( 'complex' )) $new = renderComplexRuby( $ruby ) + else if ( clazz.contains( 'zhuyin' )) $new = SUPPORT_IC ? renderInterCharRuby( $ruby ) : renderSimpleRuby( $ruby ) + + // Finally, replace it + if ( $new ) $ruby.parentNode.replaceChild( $new, $ruby ) + }) + }, + + simplifyRubyClass: simplifyRubyClass, + getZhuyinHTML: getZhuyinHTML, + renderComplexRuby: renderComplexRuby, + renderSimpleRuby: renderSimpleRuby, + renderInterCharRuby: renderInterCharRuby + + // ### TODO list ### + // + // * Debug mode + // * Better error-tolerance +}) + +/** + * Normalisation rendering mechanism + */ +$.extend( Locale, { + + // Render and normalise the given context by routine: + // + // ruby -> u, ins -> s, del -> em + // + renderElem: function( context ) { + this.renderRuby( context ) + this.renderDecoLine( context ) + this.renderDecoLine( context, 's, del' ) + this.renderEm( context ) + }, + + // Traverse all target elements and address + // presentational corrections if any two of + // them are adjacent to each other. + renderDecoLine: function( context, target ) { + var $$target = $.qsa( target || 'u, ins', context ) + var i = $$target.length + + traverse: while ( i-- ) { + var $this = $$target[ i ] + var $prev = null + + // Ignore all `` and comments in between, + // and add class `.adjacent` once two targets + // are next to each other. + ignore: do { + $prev = ( $prev || $this ).previousSibling + + if ( !$prev ) { + continue traverse + } else if ( $$target[ i-1 ] === $prev ) { + $this.classList.add( 'adjacent' ) + } + } while ( $.isIgnorable( $prev )) + } + }, + + // Traverse all target elements to render + // emphasis marks. + renderEm: function( context, target ) { + var method = target ? 'qsa' : 'tag' + var target = target || 'em' + var $target = $[ method ]( target, context ) + + $target + .forEach(function( elem ) { + var $elem = Han( elem ) + + if ( Locale.support.textemphasis ) { + $elem + .avoid( 'rt, h-char' ) + .charify({ biaodian: true, punct: true }) + } else { + $elem + .avoid( 'rt, h-char, h-char-group' ) + .jinzify() + .groupify({ western: true }) + .charify({ + hanzi: true, + biaodian: true, + punct: true, + latin: true, + ellinika: true, + kirillica: true + }) + } + }) + } +}) + +Han.normalize = Locale +Han.localize = Locale +Han.support = Locale.support +Han.detectFont = Locale.detectFont + +Han.fn.initCond = function() { + this.condition.classList.add( 'han-js-rendered' ) + Han.normalize.initCond( this.condition ) + return this +} + +void [ + 'Elem', + 'DecoLine', + 'Em', + 'Ruby' +].forEach(function( elem ) { + var method = 'render' + elem + + Han.fn[ method ] = function( target ) { + Han.normalize[ method ]( this.context, target ) + return this + } +}) + +$.extend( Han.support, { + // Assume that all devices support Heiti for we + // use `sans-serif` to do the comparison. + heiti: true, + // 'heiti-gb': true, + + songti: Han.detectFont( '"Han Songti"' ), + 'songti-gb': Han.detectFont( '"Han Songti GB"' ), + + kaiti: Han.detectFont( '"Han Kaiti"' ), + // 'kaiti-gb': Han.detectFont( '"Han Kaiti GB"' ), + + fangsong: Han.detectFont( '"Han Fangsong"' ) + // 'fangsong-gb': Han.detectFont( '"Han Fangsong GB"' ) +}) + +Han.correctBiaodian = function( context ) { + var context = context || document + var finder = Han.find( context ) + + finder + .avoid( 'h-char' ) + .replace( /([‘“])/g, function( portion ) { + var $char = Han.createBDChar( portion.text ) + $char.classList.add( 'bd-open', 'punct' ) + return $char + }) + .replace( /([’”])/g, function( portion ) { + var $char = Han.createBDChar( portion.text ) + $char.classList.add( 'bd-close', 'bd-end', 'punct' ) + return $char + }) + + return Han.support.unicoderange + ? finder + : finder.charify({ biaodian: true }) +} + +Han.correctBasicBD = Han.correctBiaodian +Han.correctBD = Han.correctBiaodian + +$.extend( Han.fn, { + biaodian: null, + + correctBiaodian: function() { + this.biaodian = Han.correctBiaodian( this.context ) + return this + }, + + revertCorrectedBiaodian: function() { + try { + this.biaodian.revert( 'all' ) + } catch (e) {} + return this + } +}) + +// Legacy support (deprecated): +Han.fn.correctBasicBD = Han.fn.correctBiaodian +Han.fn.revertBasicBD = Han.fn.revertCorrectedBiaodian + +var hws = '<>' + +var $hws = $.create( 'h-hws' ) +$hws.setAttribute( 'hidden', '' ) +$hws.innerHTML = ' ' + +function sharingSameParent( $a, $b ) { + return $a && $b && $a.parentNode === $b.parentNode +} + +function properlyPlaceHWSBehind( $node, text ) { + var $elmt = $node + var text = text || '' + + if ( + $.isElmt( $node.nextSibling ) || + sharingSameParent( $node, $node.nextSibling ) + ) { + return text + hws + } else { + // One of the parental elements of the current text + // node would definitely have a next sibling, since + // it is of the first portion and not `isEnd`. + while ( !$elmt.nextSibling ) { + $elmt = $elmt.parentNode + } + if ( $node !== $elmt ) { + $elmt.insertAdjacentHTML( 'afterEnd', '' ) + } + } + return text +} + +function firstStepLabel( portion, mat ) { + return portion.isEnd && portion.index === 0 + ? mat[1] + hws + mat[2] + : portion.index === 0 + ? properlyPlaceHWSBehind( portion.node, portion.text ) + : portion.text +} + +function real$hwsElmt( portion ) { + return portion.index === 0 + ? $.clone( $hws ) + : '' +} + +var last$hwsIdx + +function apostrophe( portion ) { + var $elmt = portion.node.parentNode + + if ( portion.index === 0 ) { + last$hwsIdx = portion.endIndexInNode-2 + } + + if ( + $elmt.nodeName.toLowerCase() === 'h-hws' && ( + portion.index === 1 || portion.indexInMatch === last$hwsIdx + )) { + $elmt.classList.add( 'quote-inner' ) + } + return portion.text +} + +function curveQuote( portion ) { + var $elmt = portion.node.parentNode + + if ( $elmt.nodeName.toLowerCase() === 'h-hws' ) { + $elmt.classList.add( 'quote-outer' ) + } + return portion.text +} + +$.extend( Han, { + renderHWS: function( context, strict ) { + // Elements to be filtered according to the + // HWS rendering mode. + var AVOID = strict + ? 'textarea, code, kbd, samp, pre' + : 'textarea' + + var mode = strict ? 'strict' : 'base' + var context = context || document + var finder = Han.find( context ) + + finder + .avoid( AVOID ) + + // Basic situations: + // - 字a => 字a + // - A字 => A字 + .replace( Han.TYPESET.hws[ mode ][0], firstStepLabel ) + .replace( Han.TYPESET.hws[ mode ][1], firstStepLabel ) + + // Convert text nodes `` into real element nodes: + .replace( new RegExp( '(' + hws + ')+', 'g' ), real$hwsElmt ) + + // Deal with: + // - '' => '字' + // - "" => "字" + .replace( /([\'"])\s(.+?)\s\1/g, apostrophe ) + + // Deal with: + // - “字” + // - ‘字’ + .replace( /\s[‘“]/g, curveQuote ) + .replace( /[’”]\s/g, curveQuote ) + .normalize() + + // Return the finder instance for future usage + return finder + } +}) + +$.extend( Han.fn, { + renderHWS: function( strict ) { + Han.renderHWS( this.context, strict ) + return this + }, + + revertHWS: function() { + $.tag( 'h-hws', this.context ) + .forEach(function( hws ) { + $.remove( hws ) + }) + this.HWS = [] + return this + } +}) + +var HANGABLE_CLASS = 'bd-hangable' +var HANGABLE_AVOID = 'h-char.bd-hangable' +var HANGABLE_CS_HTML = '' + +var matches = Han.find.matches + +function detectSpaceFont() { + var div = $.create( 'div' ) + var ret + + div.innerHTML = 'a ba b' + body.appendChild( div ) + ret = div.firstChild.offsetWidth !== div.lastChild.offsetWidth + $.remove( div ) + return ret +} + +function insertHangableCS( $jinze ) { + var $cs = $jinze.nextSibling + + if ( $cs && matches( $cs, 'h-cs.jinze-outer' )) { + $cs.classList.add( 'hangable-outer' ) + } else { + $jinze.insertAdjacentHTML( + 'afterend', + HANGABLE_CS_HTML + ) + } +} + +Han.support['han-space'] = detectSpaceFont() + +$.extend( Han, { + detectSpaceFont: detectSpaceFont, + isSpaceFontLoaded: detectSpaceFont(), + + renderHanging: function( context ) { + var context = context || document + var finder = Han.find( context ) + + finder + .avoid( 'textarea, code, kbd, samp, pre' ) + .avoid( HANGABLE_AVOID ) + .replace( + TYPESET.jinze.hanging, + function( portion ) { + if ( /^[\x20\t\r\n\f]+$/.test( portion.text )) { + return '' + } + + var $elmt = portion.node.parentNode + var $jinze, $new, $bd, biaodian + + if ( $jinze = $.parent( $elmt, 'h-jinze' )) { + insertHangableCS( $jinze ) + } + + biaodian = portion.text.trim() + + $new = Han.createBDChar( biaodian ) + $new.innerHTML = '' + biaodian + '' + $new.classList.add( HANGABLE_CLASS ) + + $bd = $.parent( $elmt, 'h-char.biaodian' ) + + return !$bd + ? $new + : (function() { + $bd.classList.add( HANGABLE_CLASS ) + + return matches( $elmt, 'h-inner, h-inner *' ) + ? biaodian + : $new.firstChild + })() + } + ) + return finder + } +}) + +$.extend( Han.fn, { + renderHanging: function() { + var classList = this.condition.classList + Han.isSpaceFontLoaded = detectSpaceFont() + + if ( + Han.isSpaceFontLoaded && + classList.contains( 'no-han-space' ) + ) { + classList.remove( 'no-han-space' ) + classList.add( 'han-space' ) + } + + Han.renderHanging( this.context ) + return this + }, + + revertHanging: function() { + $.qsa( + 'h-char.bd-hangable, h-cs.hangable-outer', + this.context + ).forEach(function( $elmt ) { + var classList = $elmt.classList + classList.remove( 'bd-hangable' ) + classList.remove( 'hangable-outer' ) + }) + return this + } +}) + +var JIYA_CLASS = 'bd-jiya' +var JIYA_AVOID = 'h-char.bd-jiya' +var CONSECUTIVE_CLASS = 'bd-consecutive' +var JIYA_CS_HTML = '' + +var matches = Han.find.matches + +function trimBDClass( clazz ) { + return clazz.replace( + /(biaodian|cjk|bd-jiya|bd-consecutive|bd-hangable)/gi, '' + ).trim() +} + +function charifyBiaodian( portion ) { + var biaodian = portion.text + var $elmt = portion.node.parentNode + var $bd = $.parent( $elmt, 'h-char.biaodian' ) + var $new = Han.createBDChar( biaodian ) + var $jinze + + $new.innerHTML = '' + biaodian + '' + $new.classList.add( JIYA_CLASS ) + + if ( $jinze = $.parent( $elmt, 'h-jinze' )) { + insertJiyaCS( $jinze ) + } + + return !$bd + ? $new + : (function() { + $bd.classList.add( JIYA_CLASS ) + + return matches( $elmt, 'h-inner, h-inner *' ) + ? biaodian + : $new.firstChild + })() +} + +var prevBDType, $$prevCS + +function locateConsecutiveBD( portion ) { + var prev = prevBDType + var $elmt = portion.node.parentNode + var $bd = $.parent( $elmt, 'h-char.biaodian' ) + var $jinze = $.parent( $bd, 'h-jinze' ) + var classList + + classList = $bd.classList + + if ( prev ) { + $bd.setAttribute( 'prev', prev ) + } + + if ( $$prevCS && classList.contains( 'bd-open' )) { + $$prevCS.pop().setAttribute( 'next', 'bd-open' ) + } + + $$prevCS = undefined + + if ( portion.isEnd ) { + prevBDType = undefined + classList.add( CONSECUTIVE_CLASS, 'end-portion' ) + } else { + prevBDType = trimBDClass($bd.getAttribute( 'class' )) + classList.add( CONSECUTIVE_CLASS ) + } + + if ( $jinze ) { + $$prevCS = locateCS( $jinze, { + prev: prev, + 'class': trimBDClass($bd.getAttribute( 'class' )) + }) + } + return portion.text +} + +function insertJiyaCS( $jinze ) { + if ( + matches( $jinze, '.tou, .touwei' ) && + !matches( $jinze.previousSibling, 'h-cs.jiya-outer' ) + ) { + $jinze.insertAdjacentHTML( 'beforebegin', JIYA_CS_HTML ) + } + if ( + matches( $jinze, '.wei, .touwei' ) && + !matches( $jinze.nextSibling, 'h-cs.jiya-outer' ) + ) { + $jinze.insertAdjacentHTML( 'afterend', JIYA_CS_HTML ) + } +} + +function locateCS( $jinze, attr ) { + var $prev, $next + + if (matches( $jinze, '.tou, .touwei' )) { + $prev = $jinze.previousSibling + + if (matches( $prev, 'h-cs' )) { + $prev.className = 'jinze-outer jiya-outer' + $prev.setAttribute( 'prev', attr.prev ) + } + } + if (matches( $jinze, '.wei, .touwei' )) { + $next = $jinze.nextSibling + + if (matches( $next, 'h-cs' )) { + $next.className = 'jinze-outer jiya-outer ' + attr[ 'class' ] + $next.removeAttribute( 'prev' ) + } + } + return [ $prev, $next ] +} + +Han.renderJiya = function( context ) { + var context = context || document + var finder = Han.find( context ) + + finder + .avoid( 'textarea, code, kbd, samp, pre, h-cs' ) + + .avoid( JIYA_AVOID ) + .charify({ + avoid: false, + biaodian: charifyBiaodian + }) + // End avoiding `JIYA_AVOID`: + .endAvoid() + + .avoid( 'textarea, code, kbd, samp, pre, h-cs' ) + .replace( TYPESET.group.biaodian[0], locateConsecutiveBD ) + .replace( TYPESET.group.biaodian[1], locateConsecutiveBD ) + + return finder +} + +$.extend( Han.fn, { + renderJiya: function() { + Han.renderJiya( this.context ) + return this + }, + + revertJiya: function() { + $.qsa( + 'h-char.bd-jiya, h-cs.jiya-outer', + this.context + ).forEach(function( $elmt ) { + var classList = $elmt.classList + classList.remove( 'bd-jiya' ) + classList.remove( 'jiya-outer' ) + }) + return this + } +}) + +var QUERY_RU_W_ANNO = 'h-ru[annotation]' +var SELECTOR_TO_IGNORE = 'textarea, code, kbd, samp, pre' + +function createCompareFactory( font, treat, control ) { + return function() { + var a = Han.localize.writeOnCanvas( treat, font ) + var b = Han.localize.writeOnCanvas( control, font ) + return Han.localize.compareCanvases( a, b ) + } +} + +function isVowelCombLigaNormal() { + return createCompareFactory( '"Romanization Sans"', '\u0061\u030D', '\uDB80\uDC61' ) +} + +function isVowelICombLigaNormal() { + return createCompareFactory( '"Romanization Sans"', '\u0069\u030D', '\uDB80\uDC69' ) +} + +function isZhuyinCombLigaNormal() { + return createCompareFactory( '"Zhuyin Kaiti"', '\u31B4\u0358', '\uDB8C\uDDB4' ) +} + +function createSubstFactory( regexToSubst ) { + return function( context ) { + var context = context || document + var finder = Han.find( context ).avoid( SELECTOR_TO_IGNORE ) + + regexToSubst + .forEach(function( pattern ) { + finder + .replace( + new RegExp( pattern[ 0 ], 'ig' ), + function( portion, match ) { + var ret = $.clone( charCombLiga ) + + // Put the original content in an inner container + // for better presentational effect of hidden text + ret.innerHTML = '' + match[0] + '' + ret.setAttribute( 'display-as', pattern[ 1 ] ) + return portion.index === 0 ? ret : '' + } + ) + }) + return finder + } +} + +var charCombLiga = $.create( 'h-char', 'comb-liga' ) + +$.extend( Han, { + isVowelCombLigaNormal: isVowelCombLigaNormal(), + isVowelICombLigaNormal: isVowelICombLigaNormal(), + isZhuyinCombLigaNormal: isZhuyinCombLigaNormal(), + + isCombLigaNormal: isVowelICombLigaNormal()(), // ### Deprecated + + substVowelCombLiga: createSubstFactory( Han.TYPESET[ 'display-as' ][ 'comb-liga-vowel' ] ), + substZhuyinCombLiga: createSubstFactory( Han.TYPESET[ 'display-as' ][ 'comb-liga-zhuyin' ] ), + substCombLigaWithPUA: createSubstFactory( Han.TYPESET[ 'display-as' ][ 'comb-liga-pua' ] ), + + substInaccurateChar: function( context ) { + var context = context || document + var finder = Han.find( context ) + + finder.avoid( SELECTOR_TO_IGNORE ) + + Han.TYPESET[ 'inaccurate-char' ] + .forEach(function( pattern ) { + finder + .replace( + new RegExp( pattern[ 0 ], 'ig' ), + pattern[ 1 ] + ) + }) + } +}) + +$.extend( Han.fn, { + 'comb-liga-vowel': null, + 'comb-liga-vowel-i': null, + 'comb-liga-zhuyin': null, + 'inaccurate-char': null, + + substVowelCombLiga: function() { + this['comb-liga-vowel'] = Han.substVowelCombLiga( this.context ) + return this + }, + + substVowelICombLiga: function() { + this['comb-liga-vowel-i'] = Han.substVowelICombLiga( this.context ) + return this + }, + + substZhuyinCombLiga: function() { + this['comb-liga-zhuyin'] = Han.substZhuyinCombLiga( this.context ) + return this + }, + + substCombLigaWithPUA: function() { + if ( !Han.isVowelCombLigaNormal()) { + this['comb-liga-vowel'] = Han.substVowelCombLiga( this.context ) + } else if ( !Han.isVowelICombLigaNormal()) { + this['comb-liga-vowel-i'] = Han.substVowelICombLiga( this.context ) + } + + if ( !Han.isZhuyinCombLigaNormal()) { + this['comb-liga-zhuyin'] = Han.substZhuyinCombLiga( this.context ) + } + return this + }, + + revertVowelCombLiga: function() { + try { + this['comb-liga-vowel'].revert( 'all' ) + } catch (e) {} + return this + }, + + revertVowelICombLiga: function() { + try { + this['comb-liga-vowel-i'].revert( 'all' ) + } catch (e) {} + return this + }, + + revertZhuyinCombLiga: function() { + try { + this['comb-liga-zhuyin'].revert( 'all' ) + } catch (e) {} + return this + }, + + revertCombLigaWithPUA: function() { + try { + this['comb-liga-vowel'].revert( 'all' ) + this['comb-liga-vowel-i'].revert( 'all' ) + this['comb-liga-zhuyin'].revert( 'all' ) + } catch (e) {} + return this + }, + + substInaccurateChar: function() { + this['inaccurate-char'] = Han.substInaccurateChar( this.context ) + return this + }, + + revertInaccurateChar: function() { + try { + this['inaccurate-char'].revert( 'all' ) + } catch (e) {} + return this + } +}) + +window.addEventListener( 'DOMContentLoaded', function() { + var initContext + + // Use the shortcut under the default situation + if ( root.classList.contains( 'han-init' )) { + Han.init() + + // Consider ‘a configured context’ the special + // case of the default situation. Will have to + // replace the `Han.init` with the instance as + // well (for future usage). + } else if ( initContext = document.querySelector( '.han-init-context' )) { + Han.init = Han( initContext ).render() + } +}) + +// Expose to global namespace +if ( typeof noGlobalNS === 'undefined' || noGlobalNS === false ) { + window.Han = Han +} + +return Han +}); + diff --git a/themes/next_old/source/lib/Han/dist/han.min.css b/themes/next_old/source/lib/Han/dist/han.min.css new file mode 100644 index 0000000..29c753e --- /dev/null +++ b/themes/next_old/source/lib/Han/dist/han.min.css @@ -0,0 +1,6 @@ +@charset "UTF-8"; + +/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ +/*! Han.css: the CSS typography framework optimised for Hanzi */ + +progress,sub,sup{vertical-align:baseline}button,hr,input,select{overflow:visible}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{cursor:pointer}[disabled]{cursor:default}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button:-moz-focusring,input:-moz-focusring{outline:ButtonText dotted 1px}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:"Han Heiti";src:local("Hiragino Sans GB"),local("Lantinghei TC Extralight"),local("Lantinghei SC Extralight"),local(FZLTXHB--B51-0),local(FZLTZHK--GBK1-0),local("Pingfang SC Light"),local("Pingfang TC Light"),local("Pingfang-SC-Light"),local("Pingfang-TC-Light"),local("Pingfang SC"),local("Pingfang TC"),local("Heiti SC Light"),local(STHeitiSC-Light),local("Heiti SC"),local("Heiti TC Light"),local(STHeitiTC-Light),local("Heiti TC"),local("Microsoft Yahei"),local("Microsoft Jhenghei"),local("Noto Sans CJK KR"),local("Noto Sans CJK JP"),local("Noto Sans CJK SC"),local("Noto Sans CJK TC"),local("Source Han Sans K"),local("Source Han Sans KR"),local("Source Han Sans JP"),local("Source Han Sans CN"),local("Source Han Sans HK"),local("Source Han Sans TW"),local("Source Han Sans TWHK"),local("Droid Sans Fallback")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Heiti";src:local(YuGothic),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro")}@font-face{font-family:"Han Heiti CNS";src:local("Pingfang TC Light"),local("Pingfang-TC-Light"),local("Pingfang TC"),local("Heiti TC Light"),local(STHeitiTC-Light),local("Heiti TC"),local("Lantinghei TC Extralight"),local(FZLTXHB--B51-0),local("Lantinghei TC"),local("Microsoft Jhenghei"),local("Microsoft Yahei"),local("Noto Sans CJK TC"),local("Source Han Sans TC"),local("Source Han Sans TW"),local("Source Han Sans TWHK"),local("Source Han Sans HK"),local("Droid Sans Fallback")}@font-face{font-family:"Han Heiti GB";src:local("Hiragino Sans GB"),local("Pingfang SC Light"),local("Pingfang-SC-Light"),local("Pingfang SC"),local("Lantinghei SC Extralight"),local(FZLTXHK--GBK1-0),local("Lantinghei SC"),local("Heiti SC Light"),local(STHeitiSC-Light),local("Heiti SC"),local("Microsoft Yahei"),local("Noto Sans CJK SC"),local("Source Han Sans SC"),local("Source Han Sans CN"),local("Droid Sans Fallback")}@font-face{font-family:"Han Heiti";font-weight:600;src:local("Hiragino Sans GB W6"),local(HiraginoSansGB-W6),local("Lantinghei TC Demibold"),local("Lantinghei SC Demibold"),local(FZLTZHB--B51-0),local(FZLTZHK--GBK1-0),local("Pingfang-SC-Semibold"),local("Pingfang-TC-Semibold"),local("Heiti SC Medium"),local("STHeitiSC-Medium"),local("Heiti SC"),local("Heiti TC Medium"),local("STHeitiTC-Medium"),local("Heiti TC"),local("Microsoft Yahei Bold"),local("Microsoft Jhenghei Bold"),local(MicrosoftYahei-Bold),local(MicrosoftJhengHeiBold),local("Microsoft Yahei"),local("Microsoft Jhenghei"),local("Noto Sans CJK KR Bold"),local("Noto Sans CJK JP Bold"),local("Noto Sans CJK SC Bold"),local("Noto Sans CJK TC Bold"),local(NotoSansCJKkr-Bold),local(NotoSansCJKjp-Bold),local(NotoSansCJKsc-Bold),local(NotoSansCJKtc-Bold),local("Source Han Sans K Bold"),local(SourceHanSansK-Bold),local("Source Han Sans K"),local("Source Han Sans KR Bold"),local("Source Han Sans JP Bold"),local("Source Han Sans CN Bold"),local("Source Han Sans HK Bold"),local("Source Han Sans TW Bold"),local("Source Han Sans TWHK Bold"),local("SourceHanSansKR-Bold"),local("SourceHanSansJP-Bold"),local("SourceHanSansCN-Bold"),local("SourceHanSansHK-Bold"),local("SourceHanSansTW-Bold"),local("SourceHanSansTWHK-Bold"),local("Source Han Sans KR"),local("Source Han Sans CN"),local("Source Han Sans HK"),local("Source Han Sans TW"),local("Source Han Sans TWHK")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Heiti";font-weight:600;src:local("YuGothic Bold"),local("Hiragino Kaku Gothic ProN W6"),local("Hiragino Kaku Gothic Pro W6"),local(YuGo-Bold),local(HiraKakuProN-W6),local(HiraKakuPro-W6)}@font-face{font-family:"Han Heiti CNS";font-weight:600;src:local("Pingfang TC Semibold"),local("Pingfang-TC-Semibold"),local("Heiti TC Medium"),local("STHeitiTC-Medium"),local("Heiti TC"),local("Lantinghei TC Demibold"),local(FZLTXHB--B51-0),local("Microsoft Jhenghei Bold"),local(MicrosoftJhengHeiBold),local("Microsoft Jhenghei"),local("Microsoft Yahei Bold"),local(MicrosoftYahei-Bold),local("Noto Sans CJK TC Bold"),local(NotoSansCJKtc-Bold),local("Noto Sans CJK TC"),local("Source Han Sans TC Bold"),local("SourceHanSansTC-Bold"),local("Source Han Sans TC"),local("Source Han Sans TW Bold"),local("SourceHanSans-TW"),local("Source Han Sans TW"),local("Source Han Sans TWHK Bold"),local("SourceHanSans-TWHK"),local("Source Han Sans TWHK"),local("Source Han Sans HK"),local("SourceHanSans-HK"),local("Source Han Sans HK")}@font-face{font-family:"Han Heiti GB";font-weight:600;src:local("Hiragino Sans GB W6"),local(HiraginoSansGB-W6),local("Pingfang SC Semibold"),local("Pingfang-SC-Semibold"),local("Lantinghei SC Demibold"),local(FZLTZHK--GBK1-0),local("Heiti SC Medium"),local("STHeitiSC-Medium"),local("Heiti SC"),local("Microsoft Yahei Bold"),local(MicrosoftYahei-Bold),local("Microsoft Yahei"),local("Noto Sans CJK SC Bold"),local(NotoSansCJKsc-Bold),local("Noto Sans CJK SC"),local("Source Han Sans SC Bold"),local("SourceHanSansSC-Bold"),local("Source Han Sans CN Bold"),local("SourceHanSansCN-Bold"),local("Source Han Sans SC"),local("Source Han Sans CN")}@font-face{font-family:"Han Songti";src:local("Songti SC Regular"),local(STSongti-SC-Regular),local("Songti SC"),local("Songti TC Regular"),local(STSongti-TC-Regular),local("Songti TC"),local(STSong),local("Lisong Pro"),local(SimSun),local(PMingLiU)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Songti";src:local(YuMincho),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho")}@font-face{font-family:"Han Songti CNS";src:local("Songti TC Regular"),local(STSongti-TC-Regular),local("Songti TC"),local("Lisong Pro"),local("Songti SC Regular"),local(STSongti-SC-Regular),local("Songti SC"),local(STSong),local(PMingLiU),local(SimSun)}@font-face{font-family:"Han Songti GB";src:local("Songti SC Regular"),local(STSongti-SC-Regular),local("Songti SC"),local(STSong),local(SimSun),local(PMingLiU)}@font-face{font-family:"Han Songti";font-weight:600;src:local("STSongti SC Bold"),local("STSongti TC Bold"),local(STSongti-SC-Bold),local(STSongti-TC-Bold),local("STSongti SC"),local("STSongti TC")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Songti";font-weight:600;src:local("YuMincho Demibold"),local("Hiragino Mincho ProN W6"),local("Hiragino Mincho Pro W6"),local(YuMin-Demibold),local(HiraMinProN-W6),local(HiraMinPro-W6),local(YuMincho),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro")}@font-face{font-family:"Han Songti CNS";font-weight:600;src:local("STSongti TC Bold"),local("STSongti SC Bold"),local(STSongti-TC-Bold),local(STSongti-SC-Bold),local("STSongti TC"),local("STSongti SC")}@font-face{font-family:"Han Songti GB";font-weight:600;src:local("STSongti SC Bold"),local(STSongti-SC-Bold),local("STSongti SC")}@font-face{font-family:cursive;src:local("Kaiti TC Regular"),local(STKaiTi-TC-Regular),local("Kaiti TC"),local("Kaiti SC"),local(STKaiti),local(BiauKai),local("標楷體"),local(DFKaiShu-SB-Estd-BF),local(Kaiti),local(DFKai-SB)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Kaiti";src:local("Kaiti TC Regular"),local(STKaiTi-TC-Regular),local("Kaiti TC"),local("Kaiti SC"),local(STKaiti),local(BiauKai),local("標楷體"),local(DFKaiShu-SB-Estd-BF),local(Kaiti),local(DFKai-SB)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Kaiti CNS";src:local(BiauKai),local("標楷體"),local(DFKaiShu-SB-Estd-BF),local("Kaiti TC Regular"),local(STKaiTi-TC-Regular),local("Kaiti TC")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Kaiti GB";src:local("Kaiti SC Regular"),local(STKaiTi-SC-Regular),local("Kaiti SC"),local(STKaiti),local(Kai),local(Kaiti),local(DFKai-SB)}@font-face{font-family:cursive;font-weight:600;src:local("Kaiti TC Bold"),local(STKaiTi-TC-Bold),local("Kaiti SC Bold"),local(STKaiti-SC-Bold),local("Kaiti TC"),local("Kaiti SC")}@font-face{font-family:"Han Kaiti";font-weight:600;src:local("Kaiti TC Bold"),local(STKaiTi-TC-Bold),local("Kaiti SC Bold"),local(STKaiti-SC-Bold),local("Kaiti TC"),local("Kaiti SC")}@font-face{font-family:"Han Kaiti CNS";font-weight:600;src:local("Kaiti TC Bold"),local(STKaiTi-TC-Bold),local("Kaiti TC")}@font-face{font-family:"Han Kaiti GB";font-weight:600;src:local("Kaiti SC Bold"),local(STKaiti-SC-Bold)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Fangsong";src:local(STFangsong),local(FangSong)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Fangsong CNS";src:local(STFangsong),local(FangSong)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Fangsong GB";src:local(STFangsong),local(FangSong)}@font-face{font-family:"Biaodian Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Serif";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Serif";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Yakumono Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Arial Unicode MS"),local("MS Gothic");unicode-range:U+2014}@font-face{font-family:"Yakumono Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho"),local("Microsoft Yahei");unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Sans CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Serif CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Sans GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Serif GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(Meiryo),local("MS Gothic"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local("MS Mincho"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Yakumono Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(Meiryo),local("MS Gothic");unicode-range:U+2026}@font-face{font-family:"Yakumono Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho");unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Serif CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSongti),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Serif GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSongti),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Pro Sans GB";font-weight:700;src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Lisong Pro"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Pro Serif GB";font-weight:700;src:local("Lisong Pro"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Sans";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Serif";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Serif";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans CNS";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Serif CNS";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans GB";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Serif GB";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("MS Gothic");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Heiti TC"),local("Lihei Pro"),local("Microsoft Jhenghei"),local(PMingLiU);unicode-range:U+3002,U+FF0C,U+3001}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Heiti TC"),local("Lihei Pro"),local("Microsoft Jhenghei"),local(PMingLiU),local("MS Gothic");unicode-range:U+FF1B,U+FF1A,U+FF1F,U+FF01}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho");unicode-range:U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Serif CNS";src:local(STSongti-TC-Regular),local("Lisong Pro"),local("Heiti TC"),local(PMingLiU);unicode-range:U+3002,U+FF0C,U+3001}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local(PMingLiU),local("MS Mincho");unicode-range:U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local("MS Gothic");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Songti SC"),local(STSongti),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun),local("MS Mincho");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local(PMingLiU),local("MS Mincho");unicode-range:U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Yu Gothic"),local(YuGothic),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Yu Mincho"),local(YuMincho),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Yu Gothic"),local(YuGothic),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Yu Mincho"),local(YuMincho),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Yu Gothic"),local(YuGothic),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Yu Mincho"),local(YuMincho),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Basic";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Basic";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Sans";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans CNS";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans GB";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Serif";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Serif CNS";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Serif GB";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Latin Italic Serif";src:local("Georgia Italic"),local("Times New Roman Italic"),local(Georgia-Italic),local(TimesNewRomanPS-ItalicMT),local(Times-Italic)}@font-face{font-family:"Latin Italic Serif";font-weight:700;src:local("Georgia Bold Italic"),local("Times New Roman Bold Italic"),local(Georgia-BoldItalic),local(TimesNewRomanPS-BoldItalicMT),local(Times-Italic)}@font-face{font-family:"Latin Italic Sans";src:local("Helvetica Neue Italic"),local("Helvetica Oblique"),local("Arial Italic"),local(HelveticaNeue-Italic),local(Helvetica-LightOblique),local(Arial-ItalicMT)}@font-face{font-family:"Latin Italic Sans";font-weight:700;src:local("Helvetica Neue Bold Italic"),local("Helvetica Bold Oblique"),local("Arial Bold Italic"),local(HelveticaNeue-BoldItalic),local(Helvetica-BoldOblique),local(Arial-BoldItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral TF Sans";src:local(Skia),local("Neutraface 2 Text"),local(Candara),local(Corbel)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral TF Serif";src:local(Georgia),local("Hoefler Text"),local("Big Caslon")}@font-face{unicode-range:U+0030-0039;font-family:"Numeral TF Italic Serif";src:local("Georgia Italic"),local("Hoefler Text Italic"),local(Georgia-Italic),local(HoeflerText-Italic)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Sans";src:local("Helvetica Neue"),local(Helvetica),local(Arial)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Sans";src:local("Helvetica Neue Italic"),local("Helvetica Oblique"),local("Arial Italic"),local(HelveticaNeue-Italic),local(Helvetica-LightOblique),local(Arial-ItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Sans";font-weight:700;src:local("Helvetica Neue Bold Italic"),local("Helvetica Bold Oblique"),local("Arial Bold Italic"),local(HelveticaNeue-BoldItalic),local(Helvetica-BoldOblique),local(Arial-BoldItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Serif";src:local(Palatino),local("Palatino Linotype"),local("Times New Roman")}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Serif";src:local("Palatino Italic"),local("Palatino Italic Linotype"),local("Times New Roman Italic"),local(Palatino-Italic),local(Palatino-Italic-Linotype),local(TimesNewRomanPS-ItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Serif";font-weight:700;src:local("Palatino Bold Italic"),local("Palatino Bold Italic Linotype"),local("Times New Roman Bold Italic"),local(Palatino-BoldItalic),local(Palatino-BoldItalic-Linotype),local(TimesNewRomanPS-BoldItalicMT)}@font-face{src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+3105-312D,U+31A0-31BA,U+02D9,U+02CA,U+02C5,U+02C7,U+02CB,U+02EA-02EB,U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075;font-family:"Zhuyin Kaiti"}@font-face{unicode-range:U+3105-312D,U+31A0-31BA,U+02D9,U+02CA,U+02C5,U+02C7,U+02CB,U+02EA-02EB,U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075;font-family:"Zhuyin Heiti";src:local("Hiragino Sans GB"),local("Heiti TC"),local("Microsoft Jhenghei"),url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype")}@font-face{font-family:"Zhuyin Heiti";src:local("Heiti TC"),local("Microsoft Jhenghei"),url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+3127}@font-face{src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");font-family:"Zhuyin Heiti";unicode-range:U+02D9,U+02CA,U+02C5,U+02C7,U+02CB,U+02EA-02EB,U+31B4,U+31B5,U+31B6,U+31B7,U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075}@font-face{src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");font-family:"Romanization Sans";unicode-range:U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075}article strong :lang(ja-Latn),article strong :lang(zh-Latn),article strong :not(:lang(zh)):not(:lang(ja)),article strong:lang(ja-Latn),article strong:lang(zh-Latn),article strong:not(:lang(zh)):not(:lang(ja)),html :lang(ja-Latn),html :lang(zh-Latn),html :not(:lang(zh)):not(:lang(ja)),html:lang(ja-Latn),html:lang(zh-Latn),html:not(:lang(zh)):not(:lang(ja)){font-family:"Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}[lang*=Hant],[lang=zh-TW],[lang=zh-HK],[lang^=zh],article strong:lang(zh),article strong:lang(zh-Hant),html:lang(zh),html:lang(zh-Hant){font-family:"Biaodian Pro Sans CNS","Helvetica Neue",Helvetica,Arial,"Zhuyin Heiti","Han Heiti",sans-serif}.no-unicoderange [lang*=Hant],.no-unicoderange [lang=zh-TW],.no-unicoderange [lang=zh-HK],.no-unicoderange [lang^=zh],.no-unicoderange article strong:lang(zh),.no-unicoderange article strong:lang(zh-Hant),html:lang(zh).no-unicoderange,html:lang(zh-Hant).no-unicoderange{font-family:"Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}[lang*=Hans],[lang=zh-CN],article strong:lang(zh-CN),article strong:lang(zh-Hans),html:lang(zh-CN),html:lang(zh-Hans){font-family:"Biaodian Pro Sans GB","Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}.no-unicoderange [lang*=Hans],.no-unicoderange [lang=zh-CN],.no-unicoderange article strong:lang(zh-CN),.no-unicoderange article strong:lang(zh-Hans),html:lang(zh-CN).no-unicoderange,html:lang(zh-Hans).no-unicoderange{font-family:"Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}[lang^=ja],article strong:lang(ja),html:lang(ja){font-family:"Yakumono Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.no-unicoderange [lang^=ja],.no-unicoderange article strong:lang(ja),html:lang(ja).no-unicoderange{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}article blockquote i :lang(ja-Latn),article blockquote i :lang(zh-Latn),article blockquote i :not(:lang(zh)):not(:lang(ja)),article blockquote i:lang(ja-Latn),article blockquote i:lang(zh-Latn),article blockquote i:not(:lang(zh)):not(:lang(ja)),article blockquote var :lang(ja-Latn),article blockquote var :lang(zh-Latn),article blockquote var :not(:lang(zh)):not(:lang(ja)),article blockquote var:lang(ja-Latn),article blockquote var:lang(zh-Latn),article blockquote var:not(:lang(zh)):not(:lang(ja)){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}article blockquote i:lang(zh),article blockquote i:lang(zh-Hant),article blockquote var:lang(zh),article blockquote var:lang(zh-Hant){font-family:"Biaodian Pro Sans CNS","Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Zhuyin Heiti","Han Heiti",sans-serif}.no-unicoderange article blockquote i:lang(zh),.no-unicoderange article blockquote i:lang(zh-Hant),.no-unicoderange article blockquote var:lang(zh),.no-unicoderange article blockquote var:lang(zh-Hant){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}article blockquote i:lang(zh-CN),article blockquote i:lang(zh-Hans),article blockquote var:lang(zh-CN),article blockquote var:lang(zh-Hans){font-family:"Biaodian Pro Sans GB","Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}.no-unicoderange article blockquote i:lang(zh-CN),.no-unicoderange article blockquote i:lang(zh-Hans),.no-unicoderange article blockquote var:lang(zh-CN),.no-unicoderange article blockquote var:lang(zh-Hans){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}article blockquote i:lang(ja),article blockquote var:lang(ja){font-family:"Yakumono Sans","Latin Italic Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.no-unicoderange article blockquote i:lang(ja),.no-unicoderange article blockquote var:lang(ja){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,sans-serif}article figure blockquote :lang(ja-Latn),article figure blockquote :lang(zh-Latn),article figure blockquote :not(:lang(zh)):not(:lang(ja)),article figure blockquote:lang(ja-Latn),article figure blockquote:lang(zh-Latn),article figure blockquote:not(:lang(zh)):not(:lang(ja)){font-family:Georgia,"Times New Roman","Han Songti",cursive,serif}article figure blockquote:lang(zh),article figure blockquote:lang(zh-Hant){font-family:"Biaodian Pro Serif CNS","Numeral LF Serif",Georgia,"Times New Roman","Zhuyin Kaiti","Han Songti",serif}.no-unicoderange article figure blockquote:lang(zh),.no-unicoderange article figure blockquote:lang(zh-Hant){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Songti",serif}article figure blockquote:lang(zh-CN),article figure blockquote:lang(zh-Hans){font-family:"Biaodian Pro Serif GB","Numeral LF Serif",Georgia,"Times New Roman","Han Songti GB",serif}.no-unicoderange article figure blockquote:lang(zh-CN),.no-unicoderange article figure blockquote:lang(zh-Hans){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Songti GB",serif}article figure blockquote:lang(ja){font-family:"Yakumono Serif","Numeral LF Serif",Georgia,"Times New Roman",serif}.no-unicoderange article figure blockquote:lang(ja){font-family:"Numeral LF Serif",Georgia,"Times New Roman",serif}article blockquote :lang(ja-Latn),article blockquote :lang(zh-Latn),article blockquote :not(:lang(zh)):not(:lang(ja)),article blockquote:lang(ja-Latn),article blockquote:lang(zh-Latn),article blockquote:not(:lang(zh)):not(:lang(ja)){font-family:Georgia,"Times New Roman","Han Kaiti",cursive,serif}article blockquote:lang(zh),article blockquote:lang(zh-Hant){font-family:"Biaodian Pro Serif CNS","Numeral LF Serif",Georgia,"Times New Roman","Zhuyin Kaiti","Han Kaiti",cursive,serif}.no-unicoderange article blockquote:lang(zh),.no-unicoderange article blockquote:lang(zh-Hant){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Kaiti",cursive,serif}article blockquote:lang(zh-CN),article blockquote:lang(zh-Hans){font-family:"Biaodian Pro Serif GB","Numeral LF Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}.no-unicoderange article blockquote:lang(zh-CN),.no-unicoderange article blockquote:lang(zh-Hans){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}article blockquote:lang(ja){font-family:"Yakumono Serif","Numeral LF Serif",Georgia,"Times New Roman",cursive,serif}.no-unicoderange article blockquote:lang(ja){font-family:"Numeral LF Serif",Georgia,"Times New Roman",cursive,serif}i :lang(ja-Latn),i :lang(zh-Latn),i :not(:lang(zh)):not(:lang(ja)),i:lang(ja-Latn),i:lang(zh-Latn),i:not(:lang(zh)):not(:lang(ja)),var :lang(ja-Latn),var :lang(zh-Latn),var :not(:lang(zh)):not(:lang(ja)),var:lang(ja-Latn),var:lang(zh-Latn),var:not(:lang(zh)):not(:lang(ja)){font-family:"Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti",cursive,serif}i:lang(zh),i:lang(zh-Hant),var:lang(zh),var:lang(zh-Hant){font-family:"Biaodian Pro Serif CNS","Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Zhuyin Kaiti","Han Kaiti",cursive,serif}.no-unicoderange i:lang(zh),.no-unicoderange i:lang(zh-Hant),.no-unicoderange var:lang(zh),.no-unicoderange var:lang(zh-Hant){font-family:"Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti",cursive,serif}i:lang(zh-CN),i:lang(zh-Hans),var:lang(zh-CN),var:lang(zh-Hans){font-family:"Biaodian Pro Serif GB","Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}.no-unicoderange i:lang(zh-CN),.no-unicoderange i:lang(zh-Hans),.no-unicoderange var:lang(zh-CN),.no-unicoderange var:lang(zh-Hans){font-family:"Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}i:lang(ja),var:lang(ja){font-family:"Yakumono Serif","Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman",cursive,serif}.no-unicoderange i:lang(ja),.no-unicoderange var:lang(ja){font-family:"Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman",cursive,serif}code :lang(ja-Latn),code :lang(zh-Latn),code :not(:lang(zh)):not(:lang(ja)),code:lang(ja-Latn),code:lang(zh-Latn),code:not(:lang(zh)):not(:lang(ja)),kbd :lang(ja-Latn),kbd :lang(zh-Latn),kbd :not(:lang(zh)):not(:lang(ja)),kbd:lang(ja-Latn),kbd:lang(zh-Latn),kbd:not(:lang(zh)):not(:lang(ja)),pre :lang(ja-Latn),pre :lang(zh-Latn),pre :not(:lang(zh)):not(:lang(ja)),pre:lang(ja-Latn),pre:lang(zh-Latn),pre:not(:lang(zh)):not(:lang(ja)),samp :lang(ja-Latn),samp :lang(zh-Latn),samp :not(:lang(zh)):not(:lang(ja)),samp:lang(ja-Latn),samp:lang(zh-Latn),samp:not(:lang(zh)):not(:lang(ja)){font-family:Menlo,Consolas,Courier,"Han Heiti",monospace,monospace,sans-serif}code:lang(zh),code:lang(zh-Hant),kbd:lang(zh),kbd:lang(zh-Hant),pre:lang(zh),pre:lang(zh-Hant),samp:lang(zh),samp:lang(zh-Hant){font-family:"Biaodian Pro Sans CNS",Menlo,Consolas,Courier,"Zhuyin Heiti","Han Heiti",monospace,monospace,sans-serif}.no-unicoderange code:lang(zh),.no-unicoderange code:lang(zh-Hant),.no-unicoderange kbd:lang(zh),.no-unicoderange kbd:lang(zh-Hant),.no-unicoderange pre:lang(zh),.no-unicoderange pre:lang(zh-Hant),.no-unicoderange samp:lang(zh),.no-unicoderange samp:lang(zh-Hant){font-family:Menlo,Consolas,Courier,"Han Heiti",monospace,monospace,sans-serif}code:lang(zh-CN),code:lang(zh-Hans),kbd:lang(zh-CN),kbd:lang(zh-Hans),pre:lang(zh-CN),pre:lang(zh-Hans),samp:lang(zh-CN),samp:lang(zh-Hans){font-family:"Biaodian Pro Sans GB",Menlo,Consolas,Courier,"Han Heiti GB",monospace,monospace,sans-serif}.no-unicoderange code:lang(zh-CN),.no-unicoderange code:lang(zh-Hans),.no-unicoderange kbd:lang(zh-CN),.no-unicoderange kbd:lang(zh-Hans),.no-unicoderange pre:lang(zh-CN),.no-unicoderange pre:lang(zh-Hans),.no-unicoderange samp:lang(zh-CN),.no-unicoderange samp:lang(zh-Hans){font-family:Menlo,Consolas,Courier,"Han Heiti GB",monospace,monospace,sans-serif}code:lang(ja),kbd:lang(ja),pre:lang(ja),samp:lang(ja){font-family:"Yakumono Sans",Menlo,Consolas,Courier,monospace,monospace,sans-serif}.no-unicoderange code:lang(ja),.no-unicoderange kbd:lang(ja),.no-unicoderange pre:lang(ja),.no-unicoderange samp:lang(ja){font-family:Menlo,Consolas,Courier,monospace,monospace,sans-serif}.no-unicoderange h-char.bd-liga,.no-unicoderange h-char[unicode=b7],h-ruby [annotation] rt,h-ruby h-zhuyin,h-ruby h-zhuyin h-diao,h-ruby.romanization rt,html,ruby [annotation] rt,ruby h-zhuyin,ruby h-zhuyin h-diao,ruby.romanization rt{-moz-font-feature-settings:"liga";-ms-font-feature-settings:"liga";-webkit-font-feature-settings:"liga";font-feature-settings:"liga"}[lang*=Hant],[lang*=Hans],[lang=zh-TW],[lang=zh-HK],[lang=zh-CN],[lang^=zh],article blockquote i,article blockquote var,article strong,code,html,kbd,pre,samp{-moz-font-feature-settings:"liga=1, locl=0";-ms-font-feature-settings:"liga","locl" 0;-webkit-font-feature-settings:"liga","locl" 0;font-feature-settings:"liga","locl" 0}.no-unicoderange h-char.bd-cop:lang(zh-HK),.no-unicoderange h-char.bd-cop:lang(zh-Hant),.no-unicoderange h-char.bd-cop:lang(zh-TW){font-family:-apple-system,"Han Heiti CNS"}.no-unicoderange h-char.bd-liga,.no-unicoderange h-char[unicode=b7]{font-family:"Biaodian Basic","Han Heiti"}.no-unicoderange h-char[unicode="2018"]:lang(zh-CN),.no-unicoderange h-char[unicode="2018"]:lang(zh-Hans),.no-unicoderange h-char[unicode="2019"]:lang(zh-CN),.no-unicoderange h-char[unicode="2019"]:lang(zh-Hans),.no-unicoderange h-char[unicode="201c"]:lang(zh-CN),.no-unicoderange h-char[unicode="201c"]:lang(zh-Hans),.no-unicoderange h-char[unicode="201d"]:lang(zh-CN),.no-unicoderange h-char[unicode="201d"]:lang(zh-Hans){font-family:"Han Heiti GB"}i,var{font-style:inherit}.no-unicoderange h-ruby h-zhuyin,.no-unicoderange h-ruby h-zhuyin h-diao,.no-unicoderange ruby h-zhuyin,.no-unicoderange ruby h-zhuyin h-diao,h-ruby h-diao,ruby h-diao{font-family:"Zhuyin Kaiti",cursive,serif}h-ruby [annotation] rt,h-ruby.romanization rt,ruby [annotation] rt,ruby.romanization rt{font-family:"Romanization Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif} \ No newline at end of file diff --git a/themes/next_old/source/lib/Han/dist/han.min.js b/themes/next_old/source/lib/Han/dist/han.min.js new file mode 100644 index 0000000..a557ad3 --- /dev/null +++ b/themes/next_old/source/lib/Han/dist/han.min.js @@ -0,0 +1,5 @@ +/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ +/*! Han.css: the CSS typography framework optimised for Hanzi */ + +void function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,!0):"function"==typeof define&&define.amd?define(function(){return b(a,!0)}):b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){return"function"==typeof a||a instanceof Element?a:void 0}function d(a){var b=0===a.index&&a.isEnd?"biaodian cjk":"biaodian cjk portion "+(0===a.index?"is-first":a.isEnd?"is-end":"is-inner"),c=S.create("h-char-group",b);return c.innerHTML=a.text,c}function e(a){var b=S.create("div"),c=a.charCodeAt(0).toString(16);return b.innerHTML=''+a+"",b.firstChild}function f(a){return a.match(R["char"].biaodian.open)?"bd-open":a.match(R["char"].biaodian.close)?"bd-close bd-end":a.match(R["char"].biaodian.end)?/(?:\u3001|\u3002|\uff0c)/i.test(a)?"bd-end bd-cop":"bd-end":a.match(new RegExp(Q.biaodian.liga))?"bd-liga":a.match(new RegExp(Q.biaodian.middle))?"bd-middle":""}function g(a,b){var c,d=S.create("canvas");return d.width="50",d.height="20",d.style.display="none",L.appendChild(d),c=d.getContext("2d"),c.textBaseline="top",c.font="15px "+b+", sans-serif",c.fillStyle="black",c.strokeStyle="black",c.fillText(a,0,0),{node:d,context:c,remove:function(){S.remove(d,L)}}}function h(a,b){var c,d=a.context,e=b.context;try{for(var f=1;20>=f;f++)for(var g=1;50>=g;g++){if("undefined"==typeof c&&d.getImageData(g,f,1,1).data[3]!==e.getImageData(g,f,1,1).data[3]){c=!1;break}if("boolean"==typeof c)break;50===g&&20===f&&"undefined"==typeof c&&(c=!0)}return a.remove(),b.remove(),a=null,b=null,c}catch(h){}return!1}function i(a,b,c){var a=a,b=b||"sans-serif",c=c||"\u8fadQ";return b=g(c,b),a=g(c,a),!h(a,b)}function j(a){var b,c=S.create("!"),d=a.classList;return c.appendChild(S.clone(a)),S.tag("rt",c.firstChild).forEach(function(a){var c,e=S.create("!"),f=[];do{if(c=(c||a).previousSibling,!c||c.nodeName.match(/((?:h\-)?r[ubt])/i))break;e.insertBefore(S.clone(c),e.firstChild),f.push(c)}while(!c.nodeName.match(/((?:h\-)?r[ubt])/i));b=d.contains("zhuyin")?p(e,a):o(e,a);try{a.parentNode.replaceChild(b,a),f.map(S.remove)}catch(g){}}),m(c)}function k(a){var b=S.create("!");return b.appendChild(S.clone(a)),S.tag("rt",b.firstChild).forEach(function(a){var b,c,d=S.create("!"),e=[];do{if(b=(b||a).previousSibling,!b||b.nodeName.match(/((?:h\-)?r[ubt])/i))break;d.insertBefore(S.clone(b),d.firstChild),e.push(b)}while(!b.nodeName.match(/((?:h\-)?r[ubt])/i));c=S.create("rt"),c.innerHTML=q(a),a.parentNode.replaceChild(c,a)}),b.firstChild}function l(a){var b,c,d,e,f=S.create("!"),g=a.classList;return f.appendChild(S.clone(a)),b=f.firstChild,c=d=S.tag("rb",b),e=c.length,void function(a){a&&(d=S.tag("rt",a).map(function(a,b){if(c[b]){var d=p(c[b],a);try{c[b].parentNode.replaceChild(d,c[b])}catch(e){}return d}}),S.remove(a),b.setAttribute("rightangle","true"))}(b.querySelector("rtc.zhuyin")),S.qsa("rtc:not(.zhuyin)",b).forEach(function(a,c){var f;f=S.tag("rt",a).map(function(a,b){var f,h,i=Number(a.getAttribute("rbspan")||1),j=0,k=[];i>e&&(i=e);do{try{f=d.shift(),k.push(f)}catch(l){}if("undefined"==typeof f)break;j+=Number(f.getAttribute("span")||1)}while(i>j);if(j>i){if(k.length>1)return void console.error("An impossible `rbspan` value detected.",ruby);k=S.tag("rb",k[0]),d=k.slice(i).concat(d),k=k.slice(0,i),j=i}h=o(k,a,{"class":g,span:j,order:c});try{k[0].parentNode.replaceChild(h,k.shift()),k.map(S.remove)}catch(l){}return h}),d=f,1===c&&b.setAttribute("doubleline","true"),S.remove(a)}),m(f)}function m(a){var b=a.firstChild,c=S.create("h-ruby");return c.innerHTML=b.innerHTML,S.setAttr(c,b.attributes),c.normalize(),c}function n(a){if(!a instanceof Element)return a;var b=a.classList;return b.contains("pinyin")?b.add("romanization"):b.contains("romanization")?b.add("annotation"):b.contains("mps")?b.add("zhuyin"):b.contains("rightangle")&&b.add("complex"),a}function o(a,b,c){var d=S.create("h-ru"),b=S.clone(b),c=c||{};return c.annotation="true",Array.isArray(a)?d.innerHTML=a.map(function(a){return"undefined"==typeof a?"":a.outerHTML}).join("")+b.outerHTML:(d.appendChild(S.clone(a)),d.appendChild(b)),S.setAttr(d,c),d}function p(a,b){var a=S.clone(a),c=S.create("h-ru");return c.setAttribute("zhuyin",!0),c.appendChild(a),c.innerHTML+=q(b),c}function q(a){var b,c,d,e="string"==typeof a?a:a.textContent;return b=e.replace(R.zhuyin.diao,""),d=b?b.length:0,c=e.replace(b,"").replace(/[\u02C5]/g,"\u02c7").replace(/[\u030D]/g,"\u0358"),0===d?"":''+b+""+c+""}function r(a,b){return a&&b&&a.parentNode===b.parentNode}function s(a,b){var c=a,b=b||"";if(S.isElmt(a.nextSibling)||r(a,a.nextSibling))return b+X;for(;!c.nextSibling;)c=c.parentNode;return a!==c&&c.insertAdjacentHTML("afterEnd",""),b}function t(a,b){return a.isEnd&&0===a.index?b[1]+X+b[2]:0===a.index?s(a.node,a.text):a.text}function u(a){return 0===a.index?S.clone(Y):""}function v(a){var b=a.node.parentNode;return 0===a.index&&(Z=a.endIndexInNode-2),"h-hws"!==b.nodeName.toLowerCase()||1!==a.index&&a.indexInMatch!==Z||b.classList.add("quote-inner"),a.text}function w(a){var b=a.node.parentNode;return"h-hws"===b.nodeName.toLowerCase()&&b.classList.add("quote-outer"),a.text}function x(){var a,b=S.create("div");return b.innerHTML="a ba b",L.appendChild(b),a=b.firstChild.offsetWidth!==b.lastChild.offsetWidth,S.remove(b),a}function y(a){var b=a.nextSibling;b&&ba(b,"h-cs.jinze-outer")?b.classList.add("hangable-outer"):a.insertAdjacentHTML("afterend",aa)}function z(a){return a.replace(/(biaodian|cjk|bd-jiya|bd-consecutive|bd-hangable)/gi,"").trim()}function A(a){var b,c=a.text,d=a.node.parentNode,e=S.parent(d,"h-char.biaodian"),f=O.createBDChar(c);return f.innerHTML=""+c+"",f.classList.add(ea),(b=S.parent(d,"h-jinze"))&&C(b),e?function(){return e.classList.add(ea),ba(d,"h-inner, h-inner *")?c:f.firstChild}():f}function B(a){var b,c=ca,d=a.node.parentNode,e=S.parent(d,"h-char.biaodian"),f=S.parent(e,"h-jinze");return b=e.classList,c&&e.setAttribute("prev",c),da&&b.contains("bd-open")&&da.pop().setAttribute("next","bd-open"),da=void 0,a.isEnd?(ca=void 0,b.add(ga,"end-portion")):(ca=z(e.getAttribute("class")),b.add(ga)),f&&(da=D(f,{prev:c,"class":z(e.getAttribute("class"))})),a.text}function C(a){ba(a,".tou, .touwei")&&!ba(a.previousSibling,"h-cs.jiya-outer")&&a.insertAdjacentHTML("beforebegin",ha),ba(a,".wei, .touwei")&&!ba(a.nextSibling,"h-cs.jiya-outer")&&a.insertAdjacentHTML("afterend",ha)}function D(a,b){var c,d;return ba(a,".tou, .touwei")&&(c=a.previousSibling,ba(c,"h-cs")&&(c.className="jinze-outer jiya-outer",c.setAttribute("prev",b.prev))),ba(a,".wei, .touwei")&&(d=a.nextSibling,ba(d,"h-cs")&&(d.className="jinze-outer jiya-outer "+b["class"],d.removeAttribute("prev"))),[c,d]}function E(a,b,c){return function(){var d=O.localize.writeOnCanvas(b,a),e=O.localize.writeOnCanvas(c,a);return O.localize.compareCanvases(d,e)}}function F(){return E('"Romanization Sans"',"a\u030d","\udb80\udc61")}function G(){return E('"Romanization Sans"',"i\u030d","\udb80\udc69")}function H(){return E('"Zhuyin Kaiti"',"\u31b4\u0358","\udb8c\uddb4")}function I(a){return function(b){var b=b||J,c=O.find(b).avoid(ia);return a.forEach(function(a){c.replace(new RegExp(a[0],"ig"),function(b,c){var d=S.clone(ja);return d.innerHTML=""+c[0]+"",d.setAttribute("display-as",a[1]),0===b.index?d:""})}),c}}var J=a.document,K=J.documentElement,L=J.body,M="3.3.0",N=["initCond","renderElem","renderJiya","renderHanging","correctBiaodian","renderHWS","substCombLigaWithPUA"],O=function(a,b){return new O.fn.init(a,b)},P=function(){return arguments[0]&&(this.context=arguments[0]),arguments[1]&&(this.condition=arguments[1]),this};O.version=M,O.fn=O.prototype={version:M,constructor:O,context:L,condition:K,routine:N,init:P,setRoutine:function(a){return Array.isArray(a)&&(this.routine=a),this},render:function(a){var b=this,a=Array.isArray(a)?a:this.routine;return a.forEach(function(a){"string"==typeof a&&"function"==typeof b[a]?b[a]():Array.isArray(a)&&"function"==typeof b[a[0]]&&b[a.shift()].apply(b,a)}),this}},O.fn.init.prototype=O.fn,O.init=function(){return O.init=O().render()};var Q={punct:{base:"[\u2026,.;:!?\u203d_]",sing:"[\u2010-\u2014\u2026]",middle:"[\\/~\\-&\u2010-\u2014_]",open:"['\"\u2018\u201c\\(\\[\xa1\xbf\u2e18\xab\u2039\u201a\u201c\u201e]",close:"['\"\u201d\u2019\\)\\]\xbb\u203a\u201b\u201d\u201f]",end:"['\"\u201d\u2019\\)\\]\xbb\u203a\u201b\u201d\u201f\u203c\u203d\u2047-\u2049,.;:!?]"},biaodian:{base:"[\ufe30\uff0e\u3001\uff0c\u3002\uff1a\uff1b\uff1f\uff01\u30fc]",liga:"[\u2014\u2026\u22ef]",middle:"[\xb7\uff3c\uff0f\uff0d\u30a0\uff06\u30fb\uff3f]",open:"[\u300c\u300e\u300a\u3008\uff08\u3014\uff3b\uff5b\u3010\u3016]",close:"[\u300d\u300f\u300b\u3009\uff09\u3015\uff3d\uff5d\u3011\u3017]",end:"[\u300d\u300f\u300b\u3009\uff09\u3015\uff3d\uff5d\u3011\u3017\ufe30\uff0e\u3001\uff0c\u3002\uff1a\uff1b\uff1f\uff01\u30fc]"},hanzi:{base:"[\u4e00-\u9fff\u3400-\u4db5\u31c0-\u31e3\u3007\ufa0e\ufa0f\ufa11\ufa13\ufa14\ufa1f\ufa21\ufa23\ufa24\ufa27-\ufa29]|[\ud800-\udbff][\udc00-\udfff]",desc:"[\u2ff0-\u2ffa]",radical:"[\u2f00-\u2fd5\u2e80-\u2ef3]"},latin:{base:"[A-Za-z0-9\xc0-\xff\u0100-\u017f\u0180-\u024f\u2c60-\u2c7f\ua720-\ua7ff\u1e00-\u1eff]",combine:"[\u0300-\u0341\u1dc0-\u1dff]"},ellinika:{base:"[0-9\u0370-\u03ff\u1f00-\u1fff]",combine:"[\u0300-\u0345\u1dc0-\u1dff]"},kirillica:{base:"[0-9\u0400-\u0482\u048a-\u04ff\u0500-\u052f\ua640-\ua66e\ua67e-\ua697]",combine:"[\u0483-\u0489\u2de0-\u2dff\ua66f-\ua67d\ua69f]"},kana:{base:"[\u30a2\u30a4\u30a6\u30a8\u30aa-\u30fa\u3042\u3044\u3046\u3048\u304a-\u3094\u309f\u30ff]|\ud82c[\udc00-\udc01]",small:"[\u3041\u3043\u3045\u3047\u3049\u30a1\u30a3\u30a5\u30a7\u30a9\u3063\u3083\u3085\u3087\u308e\u3095\u3096\u30c3\u30e3\u30e5\u30e7\u30ee\u30f5\u30f6\u31f0-\u31ff]",combine:"[\u3099-\u309c]",half:"[\uff66-\uff9f]",mark:"[\u30a0\u309d\u309e\u30fb-\u30fe]"},eonmun:{base:"[\uac00-\ud7a3]",letter:"[\u1100-\u11ff\u314f-\u3163\u3131-\u318e\ua960-\ua97c\ud7b0-\ud7fb]",half:"[\uffa1-\uffdc]"},zhuyin:{base:"[\u3105-\u312d\u31a0-\u31ba]",initial:"[\u3105-\u3119\u312a-\u312c\u31a0-\u31a3]",medial:"[\u3127-\u3129]","final":"[\u311a-\u3129\u312d\u31a4-\u31b3\u31b8-\u31ba]",tone:"[\u02d9\u02ca\u02c5\u02c7\u02cb\u02ea\u02eb]",checked:"[\u31b4-\u31b7][\u0358\u030d]?"}},R=function(){var a="[\\x20\\t\\r\\n\\f]",b=Q.punct.open,c=(Q.punct.close,Q.punct.end),d=Q.punct.middle,e=Q.punct.sing,f=b+"|"+c+"|"+d,g=Q.biaodian.open,h=Q.biaodian.close,i=Q.biaodian.end,j=Q.biaodian.middle,k=Q.biaodian.liga+"{2}",l=g+"|"+i+"|"+j,m=Q.kana.base+Q.kana.combine+"?",n=Q.kana.small+Q.kana.combine+"?",o=Q.kana.half,p=Q.eonmun.base+"|"+Q.eonmun.letter,q=Q.eonmun.half,r=Q.hanzi.base+"|"+Q.hanzi.desc+"|"+Q.hanzi.radical+"|"+m,s=Q.ellinika.combine,t=Q.latin.base+s+"*",u=Q.ellinika.base+s+"*",v=Q.kirillica.combine,w=Q.kirillica.base+v+"*",x=t+"|"+u+"|"+w,y="['\u2019]",z=r+"|(?:"+x+"|"+y+")+",A=Q.zhuyin.initial,B=Q.zhuyin.medial,C=Q.zhuyin["final"],D=Q.zhuyin.tone+"|"+Q.zhuyin.checked;return{"char":{punct:{all:new RegExp("("+f+")","g"),open:new RegExp("("+b+")","g"),end:new RegExp("("+c+")","g"),sing:new RegExp("("+e+")","g")},biaodian:{all:new RegExp("("+l+")","g"),open:new RegExp("("+g+")","g"),close:new RegExp("("+h+")","g"),end:new RegExp("("+i+")","g"),liga:new RegExp("("+k+")","g")},hanzi:new RegExp("("+r+")","g"),latin:new RegExp("("+t+")","ig"),ellinika:new RegExp("("+u+")","ig"),kirillica:new RegExp("("+w+")","ig"),kana:new RegExp("("+m+"|"+n+"|"+o+")","g"),eonmun:new RegExp("("+p+"|"+q+")","g")},group:{biaodian:[new RegExp("(("+l+"){2,})","g"),new RegExp("("+k+g+")","g")],punct:null,hanzi:new RegExp("("+r+")+","g"),western:new RegExp("("+t+"|"+u+"|"+w+"|"+f+")+","ig"),kana:new RegExp("("+m+"|"+n+"|"+o+")+","g"),eonmun:new RegExp("("+p+"|"+q+"|"+f+")+","g")},jinze:{hanging:new RegExp(a+"*([\u3001\uff0c\u3002\uff0e])(?!"+i+")","ig"),touwei:new RegExp("("+g+"+)("+z+")("+i+"+)","ig"),tou:new RegExp("("+g+"+)("+z+")","ig"),wei:new RegExp("("+z+")("+i+"+)","ig"),middle:new RegExp("("+z+")("+j+")("+z+")","ig")},zhuyin:{form:new RegExp("^\u02d9?("+A+")?("+B+")?("+C+")?("+D+")?$"),diao:new RegExp("("+D+")","g")},hws:{base:[new RegExp("("+r+")("+x+"|"+b+")","ig"),new RegExp("("+x+"|"+c+")("+r+")","ig")],strict:[new RegExp("("+r+")"+a+"?("+x+"|"+b+")","ig"),new RegExp("("+x+"|"+c+")"+a+"?("+r+")","ig")]},"display-as":{"ja-font-for-hant":["\u67e5 \u67fb","\u555f \u5553","\u9109 \u9115","\u503c \u5024","\u6c61 \u6c5a"],"comb-liga-pua":[["a[\u030d\u0358]","\udb80\udc61"],["e[\u030d\u0358]","\udb80\udc65"],["i[\u030d\u0358]","\udb80\udc69"],["o[\u030d\u0358]","\udb80\udc6f"],["u[\u030d\u0358]","\udb80\udc75"],["\u31b4[\u030d\u0358]","\udb8c\uddb4"],["\u31b5[\u030d\u0358]","\udb8c\uddb5"],["\u31b6[\u030d\u0358]","\udb8c\uddb6"],["\u31b7[\u030d\u0358]","\udb8c\uddb7"]],"comb-liga-vowel":[["a[\u030d\u0358]","\udb80\udc61"],["e[\u030d\u0358]","\udb80\udc65"],["i[\u030d\u0358]","\udb80\udc69"],["o[\u030d\u0358]","\udb80\udc6f"],["u[\u030d\u0358]","\udb80\udc75"]],"comb-liga-zhuyin":[["\u31b4[\u030d\u0358]","\udb8c\uddb4"],["\u31b5[\u030d\u0358]","\udb8c\uddb5"],["\u31b6[\u030d\u0358]","\udb8c\uddb6"],["\u31b7[\u030d\u0358]","\udb8c\uddb7"]]},"inaccurate-char":[["[\u2022\u2027]","\xb7"],["\u22ef\u22ef","\u2026\u2026"],["\u2500\u2500","\u2014\u2014"],["\u2035","\u2018"],["\u2032","\u2019"],["\u2036","\u201c"],["\u2033","\u201d"]]}}();O.UNICODE=Q,O.TYPESET=R,O.UNICODE.cjk=O.UNICODE.hanzi,O.UNICODE.greek=O.UNICODE.ellinika,O.UNICODE.cyrillic=O.UNICODE.kirillica,O.UNICODE.hangul=O.UNICODE.eonmun,O.UNICODE.zhuyin.ruyun=O.UNICODE.zhuyin.checked,O.TYPESET["char"].cjk=O.TYPESET["char"].hanzi,O.TYPESET["char"].greek=O.TYPESET["char"].ellinika,O.TYPESET["char"].cyrillic=O.TYPESET["char"].kirillica,O.TYPESET["char"].hangul=O.TYPESET["char"].eonmun,O.TYPESET.group.hangul=O.TYPESET.group.eonmun,O.TYPESET.group.cjk=O.TYPESET.group.hanzi;var S={id:function(a,b){return(b||J).getElementById(a)},tag:function(a,b){return this.makeArray((b||J).getElementsByTagName(a))},qs:function(a,b){return(b||J).querySelector(a)},qsa:function(a,b){return this.makeArray((b||J).querySelectorAll(a))},parent:function(a,b){return b?function(){if("function"==typeof S.matches){for(;!S.matches(a,b);){if(!a||a===J.documentElement){a=void 0;break}a=a.parentNode}return a}}():a?a.parentNode:void 0},create:function(a,b){var c="!"===a?J.createDocumentFragment():""===a?J.createTextNode(b||""):J.createElement(a);try{b&&(c.className=b)}catch(d){}return c},clone:function(a,b){return a.cloneNode("boolean"==typeof b?b:!0)},remove:function(a){return a.parentNode.removeChild(a)},setAttr:function(a,b){if("object"==typeof b){var c=b.length;if("object"==typeof b[0]&&"name"in b[0])for(var d=0;c>d;d++)void 0!==b[d].value&&a.setAttribute(b[d].name,b[d].value);else for(var e in b)b.hasOwnProperty(e)&&void 0!==b[e]&&a.setAttribute(e,b[e]);return a}},isElmt:function(a){return a&&a.nodeType===Node.ELEMENT_NODE},isIgnorable:function(a){return a?"WBR"===a.nodeName||a.nodeType===Node.COMMENT_NODE:!1},makeArray:function(a){return Array.prototype.slice.call(a)},extend:function(a,b){if(("object"==typeof a||"function"==typeof a)&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}},T=function(b){function c(a,b,c){var d=Element.prototype,e=d.matches||d.mozMatchesSelector||d.msMatchesSelector||d.webkitMatchesSelector;return a instanceof Element?e.call(a,b):c&&/^[39]$/.test(a.nodeType)?!0:!1}var d="0.2.1",e=b.NON_INLINE_PROSE,f=b.PRESETS.prose.filterElements,g=a||{},h=g.document||void 0;if("undefined"==typeof h)throw new Error("Fibre requires a DOM-supported environment.");var i=function(a,b){return new i.fn.init(a,b)};return i.version=d,i.matches=c,i.fn=i.prototype={constructor:i,version:d,finder:[],context:void 0,portionMode:"retain",selector:{},preset:"prose",init:function(a,b){if(b&&(this.preset=null),this.selector={context:null,filter:[],avoid:[],boundary:[]},!a)throw new Error("A context is required for Fibre to initialise.");return a instanceof Node?a instanceof Document?this.context=a.body||a:this.context=a:"string"==typeof a&&(this.context=h.querySelector(a),this.selector.context=a),this},filterFn:function(a){var b=this.selector.filter.join(", ")||"*",d=this.selector.avoid.join(", ")||null,e=c(a,b,!0)&&!c(a,d);return"prose"===this.preset?f(a)&&e:e},boundaryFn:function(a){var b=this.selector.boundary.join(", ")||null,d=c(a,b);return"prose"===this.preset?e(a)||d:d},filter:function(a){return"string"==typeof a&&this.selector.filter.push(a),this},endFilter:function(a){return a?this.selector.filter=[]:this.selector.filter.pop(),this},avoid:function(a){return"string"==typeof a&&this.selector.avoid.push(a),this},endAvoid:function(a){return a?this.selector.avoid=[]:this.selector.avoid.pop(),this},addBoundary:function(a){return"string"==typeof a&&this.selector.boundary.push(a),this},removeBoundary:function(){return this.selector.boundary=[],this},setMode:function(a){return this.portionMode="first"===a?"first":"retain",this},replace:function(a,c){var d=this;return d.finder.push(b(d.context,{find:a,replace:c,filterElements:function(a){return d.filterFn(a)},forceContext:function(a){return d.boundaryFn(a)},portionMode:d.portionMode})),d},wrap:function(a,c){var d=this;return d.finder.push(b(d.context,{find:a,wrap:c,filterElements:function(a){return d.filterFn(a)},forceContext:function(a){return d.boundaryFn(a)},portionMode:d.portionMode})),d},revert:function(a){var b=this.finder.length,a=Number(a)||(0===a?Number(0):"all"===a?b:1);if("undefined"==typeof b||0===b)return this;a>b&&(a=b);for(var c=a;c>0;c--)this.finder.pop().revert();return this}},i.fn.filterOut=i.fn.avoid,i.fn.init.prototype=i.fn,i}(function(){function a(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function b(){return c.apply(null,arguments)||d.apply(null,arguments)}function c(a,c,e,f,g){if(c&&!c.nodeType&&arguments.length<=2)return!1;var h="function"==typeof e;h&&(e=function(a){return function(b,c){return a(b.text,c.startIndex)}}(e));var i=d(c,{find:a,wrap:h?null:e,replace:h?e:"$"+(f||"&"),prepMatch:function(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";if(f>0){var c=a[f];a.index+=a[0].indexOf(c),a[0]=c}return a.endIndex=a.index+a[0].length,a.startIndex=a.index,a.index=b,a},filterElements:g});return b.revert=function(){return i.revert()},!0}function d(a,b){return new e(a,b)}function e(a,c){var d=c.preset&&b.PRESETS[c.preset];if(c.portionMode=c.portionMode||f,d)for(var e in d)i.call(d,e)&&!i.call(c,e)&&(c[e]=d[e]);this.node=a,this.options=c,this.prepMatch=c.prepMatch||this.prepMatch,this.reverts=[],this.matches=this.search(),this.matches.length&&this.processMatches()}var f="retain",g="first",h=J,i=({}.toString,{}.hasOwnProperty);return b.NON_PROSE_ELEMENTS={br:1,hr:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1},b.NON_CONTIGUOUS_PROSE_ELEMENTS={address:1,article:1,aside:1,blockquote:1,dd:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,nav:1,noscript:1,ol:1,output:1,p:1,pre:1,section:1,ul:1,br:1,li:1,summary:1,dt:1,details:1,rp:1,rt:1,rtc:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1,table:1,tbody:1,thead:1,th:1,tr:1,td:1,caption:1,col:1,tfoot:1,colgroup:1},b.NON_INLINE_PROSE=function(a){return i.call(b.NON_CONTIGUOUS_PROSE_ELEMENTS,a.nodeName.toLowerCase())},b.PRESETS={prose:{forceContext:b.NON_INLINE_PROSE,filterElements:function(a){return!i.call(b.NON_PROSE_ELEMENTS,a.nodeName.toLowerCase())}}},b.Finder=e,e.prototype={search:function(){function b(a){for(var g=0,j=a.length;j>g;++g){var k=a[g];if("string"==typeof k){if(f.global)for(;c=f.exec(k);)h.push(i.prepMatch(c,d++,e));else(c=k.match(f))&&h.push(i.prepMatch(c,0,e));e+=k.length}else b(k)}}var c,d=0,e=0,f=this.options.find,g=this.getAggregateText(),h=[],i=this;return f="string"==typeof f?RegExp(a(f),"g"):f,b(g),h},prepMatch:function(a,b,c){if(!a[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return a.endIndex=c+a.index+a[0].length,a.startIndex=c+a.index,a.index=b,a},getAggregateText:function(){function a(d,e){if(3===d.nodeType)return[d.data];if(b&&!b(d))return[];var e=[""],f=0;if(d=d.firstChild)do if(3!==d.nodeType){var g=a(d);c&&1===d.nodeType&&(c===!0||c(d))?(e[++f]=g,e[++f]=""):("string"==typeof g[0]&&(e[f]+=g.shift()),g.length&&(e[++f]=g,e[++f]=""))}else e[f]+=d.data;while(d=d.nextSibling);return e}var b=this.options.filterElements,c=this.options.forceContext;return a(this.node)},processMatches:function(){var a,b,c,d=this.matches,e=this.node,f=this.options.filterElements,g=[],h=e,i=d.shift(),j=0,k=0,l=0,m=[e];a:for(;;){if(3===h.nodeType&&(!b&&h.length+j>=i.endIndex?b={node:h,index:l++,text:h.data.substring(i.startIndex-j,i.endIndex-j),indexInMatch:j-i.startIndex,indexInNode:i.startIndex-j,endIndexInNode:i.endIndex-j,isEnd:!0}:a&&g.push({node:h,index:l++,text:h.data,indexInMatch:j-i.startIndex,indexInNode:0}),!a&&h.length+j>i.startIndex&&(a={node:h,index:l++,indexInMatch:0,indexInNode:i.startIndex-j,endIndexInNode:i.endIndex-j,text:h.data.substring(i.startIndex-j,i.endIndex-j)}),j+=h.data.length),c=1===h.nodeType&&f&&!f(h),a&&b){if(h=this.replaceMatch(i,a,g,b),j-=b.node.data.length-b.endIndexInNode,a=null,b=null,g=[],i=d.shift(),l=0,k++,!i)break}else if(!c&&(h.firstChild||h.nextSibling)){h.firstChild?(m.push(h),h=h.firstChild):h=h.nextSibling;continue}for(;;){if(h.nextSibling){h=h.nextSibling;break}if(h=m.pop(),h===e)break a}}},revert:function(){for(var a=this.reverts.length;a--;)this.reverts[a]();this.reverts=[]},prepareReplacementString:function(a,b,c,d){var e=this.options.portionMode;return e===g&&b.indexInMatch>0?"":(a=a.replace(/\$(\d+|&|`|')/g,function(a,b){var d;switch(b){case"&":d=c[0];break;case"`":d=c.input.substring(0,c.startIndex);break;case"'":d=c.input.substring(c.endIndex);break;default:d=c[+b]}return d}),e===g?a:b.isEnd?a.substring(b.indexInMatch):a.substring(b.indexInMatch,b.indexInMatch+b.text.length))},getPortionReplacementNode:function(a,b,c){var d=this.options.replace||"$&",e=this.options.wrap;if(e&&e.nodeType){var f=h.createElement("div");f.innerHTML=e.outerHTML||(new XMLSerializer).serializeToString(e),e=f.firstChild}if("function"==typeof d)return d=d(a,b,c),d&&d.nodeType?d:h.createTextNode(String(d));var g="string"==typeof e?h.createElement(e):e;return d=h.createTextNode(this.prepareReplacementString(d,a,b,c)),d.data&&g?(g.appendChild(d),g):d},replaceMatch:function(a,b,c,d){var e,f,g=b.node,i=d.node;if(g===i){var j=g;b.indexInNode>0&&(e=h.createTextNode(j.data.substring(0,b.indexInNode)),j.parentNode.insertBefore(e,j));var k=this.getPortionReplacementNode(d,a);return j.parentNode.insertBefore(k,j),d.endIndexInNoden;++n){var p=c[n],q=this.getPortionReplacementNode(p,a);p.node.parentNode.replaceChild(q,p.node),this.reverts.push(function(a,b){return function(){b.parentNode.replaceChild(a.node,b)}}(p,q)),m.push(q)}var r=this.getPortionReplacementNode(d,a);return g.parentNode.insertBefore(e,g),g.parentNode.insertBefore(l,g),g.parentNode.removeChild(g),i.parentNode.insertBefore(r,i),i.parentNode.insertBefore(f,i),i.parentNode.removeChild(i),this.reverts.push(function(){e.parentNode.removeChild(e),l.parentNode.replaceChild(g,l),f.parentNode.removeChild(f),r.parentNode.replaceChild(i,r)}),r}},b}()),U=function(){var a=S.create("div");return a.appendChild(S.create("","0-")),a.appendChild(S.create("","2")),a.normalize(),2!==a.firstChild.length}();S.extend(T.fn,{normalize:function(){return U&&this.context.normalize(),this},jinzify:function(a){return this.filter(a||null).avoid("h-jinze").replace(R.jinze.touwei,function(a,b){var c=S.create("h-jinze","touwei");return c.innerHTML=b[0],0===a.index&&a.isEnd||1===a.index?c:""}).replace(R.jinze.wei,function(a,b){var c=S.create("h-jinze","wei");return c.innerHTML=b[0],0===a.index?c:""}).replace(R.jinze.tou,function(a,b){var c=S.create("h-jinze","tou");return c.innerHTML=b[0],0===a.index&&a.isEnd||1===a.index?c:""}).replace(R.jinze.middle,function(a,b){var c=S.create("h-jinze","middle");return c.innerHTML=b[0],0===a.index&&a.isEnd||1===a.index?c:""}).endAvoid().endFilter()},groupify:function(a){var a=S.extend({biaodian:!1,hanzi:!1,kana:!1,eonmun:!1,western:!1},a||{});return this.avoid("h-word, h-char-group"),a.biaodian&&this.replace(R.group.biaodian[0],d).replace(R.group.biaodian[1],d),(a.hanzi||a.cjk)&&this.wrap(R.group.hanzi,S.clone(S.create("h-char-group","hanzi cjk"))),a.western&&this.wrap(R.group.western,S.clone(S.create("h-word","western"))),a.kana&&this.wrap(R.group.kana,S.clone(S.create("h-char-group","kana"))),(a.eonmun||a.hangul)&&this.wrap(R.group.eonmun,S.clone(S.create("h-word","eonmun hangul"))),this.endAvoid(),this},charify:function(a){var a=S.extend({avoid:!0,biaodian:!1,punct:!1,hanzi:!1,latin:!1,ellinika:!1,kirillica:!1,kana:!1,eonmun:!1},a||{});return a.avoid&&this.avoid("h-char"),a.biaodian&&this.replace(R["char"].biaodian.all,c(a.biaodian)||function(a){return e(a.text)}).replace(R["char"].biaodian.liga,c(a.biaodian)||function(a){return e(a.text)}),(a.hanzi||a.cjk)&&this.wrap(R["char"].hanzi,c(a.hanzi||a.cjk)||S.clone(S.create("h-char","hanzi cjk"))),a.punct&&this.wrap(R["char"].punct.all,c(a.punct)||S.clone(S.create("h-char","punct"))),a.latin&&this.wrap(R["char"].latin,c(a.latin)||S.clone(S.create("h-char","alphabet latin"))),(a.ellinika||a.greek)&&this.wrap(R["char"].ellinika,c(a.ellinika||a.greek)||S.clone(S.create("h-char","alphabet ellinika greek"))),(a.kirillica||a.cyrillic)&&this.wrap(R["char"].kirillica,c(a.kirillica||a.cyrillic)||S.clone(S.create("h-char","alphabet kirillica cyrillic"))),a.kana&&this.wrap(R["char"].kana,c(a.kana)||S.clone(S.create("h-char","kana"))),(a.eonmun||a.hangul)&&this.wrap(R["char"].eonmun,c(a.eonmun||a.hangul)||S.clone(S.create("h-char","eonmun hangul"))),this.endAvoid(),this}}),S.extend(O,{isNodeNormalizeNormal:U,find:T,createBDGroup:d,createBDChar:e}),S.matches=O.find.matches,void["setMode","wrap","replace","revert","addBoundary","removeBoundary","avoid","endAvoid","filter","endFilter","jinzify","groupify","charify"].forEach(function(a){O.fn[a]=function(){return this.finder||(this.finder=O.find(this.context)),this.finder[a](arguments[0],arguments[1]),this}});var V={};V.writeOnCanvas=g,V.compareCanvases=h,V.detectFont=i,V.support=function(){function b(a){var b,c=a.charAt(0).toUpperCase()+a.slice(1),d=(a+" "+e.join(c+" ")+c).split(" ");return d.forEach(function(a){"string"==typeof f.style[a]&&(b=!0)}),b||!1}function c(a,b){var c,d,e,f=L||S.create("body"),g=S.create("div"),h=L?g:f,b="function"==typeof b?b:function(){};return c=[""].join(""),h.innerHTML+=c,f.appendChild(g),L||(f.style.background="",f.style.overflow="hidden",e=K.style.overflow,K.style.overflow="hidden",K.appendChild(f)),d=b(h,a),S.remove(h),L||(K.style.overflow=e),!!d}function d(b,c){var d;return a.getComputedStyle?d=J.defaultView.getComputedStyle(b,null).getPropertyValue(c):b.currentStyle&&(d=b.currentStyle[c]),d}var e="Webkit Moz ms".split(" "),f=S.create("h-test");return{columnwidth:b("columnWidth"),fontface:function(){var a;return c('@font-face { font-family: font; src: url("//"); }',function(b,c){var d=S.qsa("style",b)[0],e=d.sheet||d.styleSheet,f=e?e.cssRules&&e.cssRules[0]?e.cssRules[0].cssText:e.cssText||"":"";a=/src/i.test(f)&&0===f.indexOf(c.split(" ")[0])}),a}(),ruby:function(){var a,b=S.create("ruby"),c=S.create("rt"),e=S.create("rp");return b.appendChild(e),b.appendChild(c),K.appendChild(b),a="none"===d(e,"display")||"ruby"===d(b,"display")&&"ruby-text"===d(c,"display")?!0:!1,K.removeChild(b),b=null,c=null,e=null,a}(),"ruby-display":function(){var a=S.create("div");return a.innerHTML='',"ruby"===a.querySelector("h-test-a").style.display&&"ruby-text-container"===a.querySelector("h-test-b").style.display}(),"ruby-interchar":function(){var a,b="inter-character",c=S.create("div");return c.innerHTML='',a=c.querySelector("h-test").style,a.rubyPosition===b||a.WebkitRubyPosition===b||a.MozRubyPosition===b||a.msRubyPosition===b}(),textemphasis:b("textEmphasis"),unicoderange:function(){var a;return c('@font-face{font-family:test-for-unicode-range;src:local(Arial),local("Droid Sans")}@font-face{font-family:test-for-unicode-range;src:local("Times New Roman"),local(Times),local("Droid Serif");unicode-range:U+270C}',function(){a=!V.detectFont("test-for-unicode-range",'Arial, "Droid Sans"',"Q")}),a}(),writingmode:b("writingMode")}}(),V.initCond=function(a){var b,a=a||K,c="";for(var d in V.support)b=(V.support[d]?"":"no-")+d,a.classList.add(b),c+=b+" ";return c};var W=V.support["ruby-interchar"];S.extend(V,{renderRuby:function(a,b){var b=b||"ruby",c=S.qsa(b,a);S.qsa("rtc",a).concat(c).map(n),c.forEach(function(a){var b,c=a.classList;c.contains("complex")?b=l(a):c.contains("zhuyin")&&(b=W?k(a):j(a)),b&&a.parentNode.replaceChild(b,a)})},simplifyRubyClass:n,getZhuyinHTML:q,renderComplexRuby:l,renderSimpleRuby:j,renderInterCharRuby:k}),S.extend(V,{renderElem:function(a){this.renderRuby(a),this.renderDecoLine(a),this.renderDecoLine(a,"s, del"),this.renderEm(a)},renderDecoLine:function(a,b){var c=S.qsa(b||"u, ins",a),d=c.length;a:for(;d--;){var e=c[d],f=null;do{if(f=(f||e).previousSibling,!f)continue a;c[d-1]===f&&e.classList.add("adjacent")}while(S.isIgnorable(f))}},renderEm:function(a,b){var c=b?"qsa":"tag",b=b||"em",d=S[c](b,a);d.forEach(function(a){var b=O(a);V.support.textemphasis?b.avoid("rt, h-char").charify({biaodian:!0,punct:!0}):b.avoid("rt, h-char, h-char-group").jinzify().groupify({western:!0}).charify({hanzi:!0,biaodian:!0,punct:!0,latin:!0,ellinika:!0,kirillica:!0})})}}),O.normalize=V,O.localize=V,O.support=V.support,O.detectFont=V.detectFont,O.fn.initCond=function(){return this.condition.classList.add("han-js-rendered"),O.normalize.initCond(this.condition),this},void["Elem","DecoLine","Em","Ruby"].forEach(function(a){var b="render"+a;O.fn[b]=function(a){return O.normalize[b](this.context,a),this}}),S.extend(O.support,{heiti:!0,songti:O.detectFont('"Han Songti"'),"songti-gb":O.detectFont('"Han Songti GB"'),kaiti:O.detectFont('"Han Kaiti"'),fangsong:O.detectFont('"Han Fangsong"')}),O.correctBiaodian=function(a){var a=a||J,b=O.find(a);return b.avoid("h-char").replace(/([\u2018\u201c])/g,function(a){var b=O.createBDChar(a.text);return b.classList.add("bd-open","punct"),b}).replace(/([\u2019\u201d])/g,function(a){var b=O.createBDChar(a.text);return b.classList.add("bd-close","bd-end","punct"),b}),O.support.unicoderange?b:b.charify({biaodian:!0})},O.correctBasicBD=O.correctBiaodian,O.correctBD=O.correctBiaodian,S.extend(O.fn,{biaodian:null,correctBiaodian:function(){return this.biaodian=O.correctBiaodian(this.context),this},revertCorrectedBiaodian:function(){try{this.biaodian.revert("all")}catch(a){}return this}}),O.fn.correctBasicBD=O.fn.correctBiaodian,O.fn.revertBasicBD=O.fn.revertCorrectedBiaodian;var X="<>",Y=S.create("h-hws");Y.setAttribute("hidden",""),Y.innerHTML=" ";var Z;S.extend(O,{renderHWS:function(a,b){var c=b?"textarea, code, kbd, samp, pre":"textarea",d=b?"strict":"base",a=a||J,e=O.find(a); +return e.avoid(c).replace(O.TYPESET.hws[d][0],t).replace(O.TYPESET.hws[d][1],t).replace(new RegExp("("+X+")+","g"),u).replace(/([\'"])\s(.+?)\s\1/g,v).replace(/\s[\u2018\u201c]/g,w).replace(/[\u2019\u201d]\s/g,w).normalize(),e}}),S.extend(O.fn,{renderHWS:function(a){return O.renderHWS(this.context,a),this},revertHWS:function(){return S.tag("h-hws",this.context).forEach(function(a){S.remove(a)}),this.HWS=[],this}});var $="bd-hangable",_="h-char.bd-hangable",aa='',ba=O.find.matches;O.support["han-space"]=x(),S.extend(O,{detectSpaceFont:x,isSpaceFontLoaded:x(),renderHanging:function(a){var a=a||J,b=O.find(a);return b.avoid("textarea, code, kbd, samp, pre").avoid(_).replace(R.jinze.hanging,function(a){if(/^[\x20\t\r\n\f]+$/.test(a.text))return"";var b,c,d,e,f=a.node.parentNode;return(b=S.parent(f,"h-jinze"))&&y(b),e=a.text.trim(),c=O.createBDChar(e),c.innerHTML=""+e+"",c.classList.add($),d=S.parent(f,"h-char.biaodian"),d?function(){return d.classList.add($),ba(f,"h-inner, h-inner *")?e:c.firstChild}():c}),b}}),S.extend(O.fn,{renderHanging:function(){var a=this.condition.classList;return O.isSpaceFontLoaded=x(),O.isSpaceFontLoaded&&a.contains("no-han-space")&&(a.remove("no-han-space"),a.add("han-space")),O.renderHanging(this.context),this},revertHanging:function(){return S.qsa("h-char.bd-hangable, h-cs.hangable-outer",this.context).forEach(function(a){var b=a.classList;b.remove("bd-hangable"),b.remove("hangable-outer")}),this}});var ca,da,ea="bd-jiya",fa="h-char.bd-jiya",ga="bd-consecutive",ha='',ba=O.find.matches;O.renderJiya=function(a){var a=a||J,b=O.find(a);return b.avoid("textarea, code, kbd, samp, pre, h-cs").avoid(fa).charify({avoid:!1,biaodian:A}).endAvoid().avoid("textarea, code, kbd, samp, pre, h-cs").replace(R.group.biaodian[0],B).replace(R.group.biaodian[1],B),b},S.extend(O.fn,{renderJiya:function(){return O.renderJiya(this.context),this},revertJiya:function(){return S.qsa("h-char.bd-jiya, h-cs.jiya-outer",this.context).forEach(function(a){var b=a.classList;b.remove("bd-jiya"),b.remove("jiya-outer")}),this}});var ia="textarea, code, kbd, samp, pre",ja=S.create("h-char","comb-liga");return S.extend(O,{isVowelCombLigaNormal:F(),isVowelICombLigaNormal:G(),isZhuyinCombLigaNormal:H(),isCombLigaNormal:G()(),substVowelCombLiga:I(O.TYPESET["display-as"]["comb-liga-vowel"]),substZhuyinCombLiga:I(O.TYPESET["display-as"]["comb-liga-zhuyin"]),substCombLigaWithPUA:I(O.TYPESET["display-as"]["comb-liga-pua"]),substInaccurateChar:function(a){var a=a||J,b=O.find(a);b.avoid(ia),O.TYPESET["inaccurate-char"].forEach(function(a){b.replace(new RegExp(a[0],"ig"),a[1])})}}),S.extend(O.fn,{"comb-liga-vowel":null,"comb-liga-vowel-i":null,"comb-liga-zhuyin":null,"inaccurate-char":null,substVowelCombLiga:function(){return this["comb-liga-vowel"]=O.substVowelCombLiga(this.context),this},substVowelICombLiga:function(){return this["comb-liga-vowel-i"]=O.substVowelICombLiga(this.context),this},substZhuyinCombLiga:function(){return this["comb-liga-zhuyin"]=O.substZhuyinCombLiga(this.context),this},substCombLigaWithPUA:function(){return O.isVowelCombLigaNormal()?O.isVowelICombLigaNormal()||(this["comb-liga-vowel-i"]=O.substVowelICombLiga(this.context)):this["comb-liga-vowel"]=O.substVowelCombLiga(this.context),O.isZhuyinCombLigaNormal()||(this["comb-liga-zhuyin"]=O.substZhuyinCombLiga(this.context)),this},revertVowelCombLiga:function(){try{this["comb-liga-vowel"].revert("all")}catch(a){}return this},revertVowelICombLiga:function(){try{this["comb-liga-vowel-i"].revert("all")}catch(a){}return this},revertZhuyinCombLiga:function(){try{this["comb-liga-zhuyin"].revert("all")}catch(a){}return this},revertCombLigaWithPUA:function(){try{this["comb-liga-vowel"].revert("all"),this["comb-liga-vowel-i"].revert("all"),this["comb-liga-zhuyin"].revert("all")}catch(a){}return this},substInaccurateChar:function(){return this["inaccurate-char"]=O.substInaccurateChar(this.context),this},revertInaccurateChar:function(){try{this["inaccurate-char"].revert("all")}catch(a){}return this}}),a.addEventListener("DOMContentLoaded",function(){var a;K.classList.contains("han-init")?O.init():(a=J.querySelector(".han-init-context"))&&(O.init=O(a).render())}),("undefined"==typeof b||b===!1)&&(a.Han=O),O}); \ No newline at end of file diff --git a/themes/next_old/source/lib/algolia-instant-search/instantsearch.min.css b/themes/next_old/source/lib/algolia-instant-search/instantsearch.min.css new file mode 100644 index 0000000..590f6f9 --- /dev/null +++ b/themes/next_old/source/lib/algolia-instant-search/instantsearch.min.css @@ -0,0 +1 @@ +/*! instantsearch.js 1.5.0 | © Algolia Inc. and other contributors; Licensed MIT | github.com/algolia/instantsearch.js */.ais-search-box--powered-by{font-size:.8em;text-align:right;margin-top:2px}.ais-search-box--powered-by-link{display:inline-block;width:45px;height:16px;text-indent:101%;overflow:hidden;white-space:nowrap;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAAAgCAYAAABwzXTcAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjVlhTJlAAAIJElEQVRoQ+1Za2xURRTugqJVEBAlhICBRFEQeRfodssqiDZaS8vu3dsXVlAbxReJwVfAoqJ/sBqE3S1IgqgBrY9EQ6KJiUAokUfpvQUKogIBlKbyEEUolNL6ndkzw9129+72YaFJv+Rk737nzMyZ756dmXs3oQtd6EJ7oaioqJvX603kr1cl8vPzb+TLzo3MzMx+Xk0r03y+0x5Ne4vpqwoohjeQ4yHYcaYiwcGfVz+ysrIGQfBGsqtWdE37lvLz+nwnmVLIyMjoBd9GxPwL/wKmOw4zCgr6YPBNSGILEviYaVt0dtHxK/DK/BFXq2lad3Z1DJDUqzIBYZrmYldUdLToI4r29HCWmLozUPmEK2AUOgOmRysttRXKTnSPxzMWfD37q0B13DJTUFBwPQatlgKKJJAsu6Oio0VPDlQsTgmajWEWMOaxOyLsRCdQccGez87OHshUxwAJzZbiIYFKkaSmXdJ1fRiHRERHi+4MGk+mBMwXnSVGPj7nQPS3qeLZHRGxRL9ScCAxk8Ur92Rnj5VCItHlHBMRrRDdQRXl8/nG4eaOp5uKz57sC8OkoDEkOWCO5K8CtJRgabnT6TfuS/ZXOKet2duPXVHRDqI7svLz+yPnJCxH07ANuGFDiQ+5WwF0NkWJrOuziEOCm5n7Jy8v7yYRGAHxio4kEyHuK+j3oIyXRr8o2G/wrUXMGIonQbFe18Kq3Ms39By/orw3KnsxKr06fHkxLjkDxubkEuNhMVAE2Ikuni98vsMYtwafQaYVwLvQ9qg1X2mI/xXzyuXQlgGNP+NO/kxLS7tOcOhMda7rz4rACIhH9Ky8vEGY+G4ZZ2ua9hi1gbhvQvBDScu3DUC1j8X1YSV0wDgLsX9m7tJl3lw9onRPDzGoBTFFp1NLyL+WaQUU5GSZG+IuIeYCrhskJ3ivN6o+EYFJDuCOaNBipuXGepI73gMq4k8pluh0E5GsXLoo8U1IMgPLyhDYYExqNL6/Lv1S9FT/7sHOkp0TXCvNYbgBp0hUfB6A2D6rsKn+7YMh9nvOoHkxJL6xLiGhMSzXtoiOfHqDn41ch5MmFC+O1ihEtDnP7c5QHDeJDTSQx8QGTH4E0wLwLWVfo0fXU5kOQyzR0ecL0o/EvoI1O95ZlzcpugAmiKVjKwu+1f2+0Yc9As5VZb3gX4JfQn9XwEyH+HUi1m/kc4hAW0S3A3J9TeaNOWQybQ8aEA0O8IDbmFagM6zsFP5PmA5DTNF5WUH7c7QZMR2GaKK7Ssw0FvyMe2XlIKYVUkrMR4Q/YB6b4t85HKIv5Pj9CY2Xq/3/Ep2qX+aN4prPtD0w2ftlI0z2GaatsJ5qztLPinkFO9Fzc3P7ghfrH/r5nulmiCY6qnhVSEQz4gkKIvvJD2sQS8yqfb3wifWeuN2jOazdRIewibQszszJuYO0yMnJuUXmjbZFHGYPTHAdN7iQOWtWxKMXfPNkx5FujJ3oEHOk9KGfpUw3QzTRsWHuCAloZDFlQaMDN+Ugqrocy8tUJulG/Mg34lGm2iR6YWHhteDnIq8diLmo8gwV0zH5HTGxRcddu1kOhg6PotGCKKbWdVg5N1eIIfpo1VbT3mW6GWxE30cCulbscjOlkLRsb7+UQGUuVOvGlABu0JdC9IChCqS1olNlg9+ocqOY0PG2FrHi1YHi4xJd15+2NorTaLO9h7sQsBOdTieqLX5VTDdD9OXFLCMBm26MdqANV7QpMXWm2iK69VS1AXmm0AmGfOIX4PUmS398omPjFME0oKZtsTPEqDM22qljJcFOdLTtDv4E+2vkM0BT2FR6sRAwaJQyZYuJ2Gyx5NSj2htSPzDpiVGg1aLzfga+mqqeaQX6L0HmjRh70a27Lib5KdNRgZjelsSq3W73NewKEx1xYaITwJVY/IuYDkM00Scv2zGOBETF1+MkM4npqIDga8RNwhMqUwKtFt3n+13wmlbGVBhaJDom9o4MxoQfYtoW6PQLNYDXqx65cX2r4n2+j5hWoN0e/BmOoeUpgDFH0qsFXA+FPQ5/lezDKjoBoq8Ta3TQ/MPl3zWK6XBAOMQtCglu1qcsN8NeScvcIV5d01cadqIjF9o8qd0p+rODaYW4RedBjnBwjbVq7QChPJYBPmda9Ef9sO88fC/NnDnzLnYL4MFqBvk4xt6aiO5ebfSBoLu5gmtxXZzsr0hyBXb1xRFxYHKwwivXfrJkv/EyN1VAn4tk/8hvPebyIK3J5ItR6Qssee1Ageh4drkbn7dT4fC8ZL/RRUeDqZZA2zeIVqAd7eSnud05JKEee3GtnsyEYUlhlwK4MWi3HiZeOVjsF/g+VN+biE6gN4nOYOV3UtiIhvO5028+xU3CgD5vg7B/yzFwXSf3FzvR6Y9s+Lar3GwMbW1Ex7kbHW0iw12bwHRcQPILVVtdn8Y0wYF+52LwChhV+3PMN8N0TARVQu9bJtKLMFAO5HGvSh7VFIpsikaHeNQPGt9A5JMkNG2asP2wJfSuhgMjwpOdPQp5fY0xTiD/vUxL0X8Q88JphWkF8Q5K1+dj7hVoby2Yi+Bq0G4nPkvRdjo36XiI5aaF/zNiUur9DN0Mpu3gmFx8JHH8inKxRLQUcmlpKWhesN4Zc+b0aukcrwSivuynR2lUkHjHjqo53lpBumABKjcRolbBluJ6FpaWKVTNWJ4eQLXQXnD5DwJ852ZdaAsgsvoTwM5wU1Z3hp9spwCqeigELcbS8RPE/QvX9M6iAd/rcH0YtrbJptyFdoYD1dwjPT39hnifD7rQhTiRkPAfxnOcWpCmnRwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;vertical-align:middle}.ais-pagination--item{display:inline-block;padding:3px}.ais-range-slider--value,.ais-range-slider--value-sub{font-size:.8em;padding-top:15px}.ais-pagination--item__disabled{visibility:hidden}.ais-hierarchical-menu--list__lvl1,.ais-hierarchical-menu--list__lvl2{margin-left:10px}.ais-range-slider--target{position:relative;direction:ltr;background:#F3F4F7;height:6px;margin-top:2em;margin-bottom:2em}.ais-range-slider--base{height:100%;position:relative;z-index:1;border-top:1px solid #DDD;border-bottom:1px solid #DDD;border-left:2px solid #DDD;border-right:2px solid #DDD}.ais-range-slider--origin{position:absolute;right:0;top:0;left:0;bottom:0}.ais-range-slider--connect{background:#46AEDA}.ais-range-slider--background{background:#F3F4F7}.ais-range-slider--handle{width:20px;height:20px;position:relative;z-index:1;background:#FFF;border:1px solid #46AEDA;border-radius:50%;cursor:pointer}.ais-range-slider--handle-lower{left:-10px;bottom:7px}.ais-range-slider--handle-upper{right:10px;bottom:7px}.ais-range-slider--tooltip{position:absolute;background:#FFF;top:-22px;font-size:.8em}.ais-range-slider--pips{box-sizing:border-box;position:absolute;height:3em;top:100%;left:0;width:100%}.ais-range-slider--value{width:40px;position:absolute;text-align:center;margin-left:-20px}.ais-range-slider--marker{position:absolute;background:#DDD;margin-left:-1px;width:1px;height:5px}.ais-range-slider--marker-sub{background:#DDD;width:2px;margin-left:-2px;height:13px}.ais-range-slider--marker-large{background:#DDD;width:2px;margin-left:-2px;height:12px}.ais-star-rating--star,.ais-star-rating--star__empty{display:inline-block;width:1em;height:1em}.ais-range-slider--marker-large:first-child{margin-left:0}.ais-star-rating--item{vertical-align:middle}.ais-star-rating--item__active{font-weight:700}.ais-star-rating--star:before{content:'\2605';color:#FBAE00}.ais-star-rating--star__empty:before{content:'\2606';color:#FBAE00}.ais-star-rating--link__disabled .ais-star-rating--star:before,.ais-star-rating--link__disabled .ais-star-rating--star__empty:before{color:#C9C9C9}.ais-root__collapsible .ais-header{cursor:pointer}.ais-root__collapsed .ais-body,.ais-root__collapsed .ais-footer{display:none} \ No newline at end of file diff --git a/themes/next_old/source/lib/algolia-instant-search/instantsearch.min.js b/themes/next_old/source/lib/algolia-instant-search/instantsearch.min.js new file mode 100644 index 0000000..2bd5d59 --- /dev/null +++ b/themes/next_old/source/lib/algolia-instant-search/instantsearch.min.js @@ -0,0 +1,15 @@ +/*! instantsearch.js 1.5.0 | © Algolia Inc. and other contributors; Licensed MIT | github.com/algolia/instantsearch.js */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.instantsearch=t():e.instantsearch=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o);e.exports=i["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),n(2),n(3);var o=n(4),i=r(o),a=n(5),s=r(a),u=n(99),l=r(u),c=n(222),f=r(c),p=n(400),d=r(p),h=n(404),m=r(h),v=n(408),g=r(v),y=n(411),b=r(y),_=n(416),C=r(_),w=n(420),x=r(w),P=n(422),E=r(P),R=n(424),S=r(R),O=n(425),T=r(O),k=n(432),N=r(k),j=n(437),A=r(j),M=n(439),F=r(M),I=n(443),D=r(I),U=n(444),L=r(U),H=n(447),V=r(H),B=n(450),q=r(B),W=n(220),K=r(W),Q=(0,i["default"])(s["default"]);Q.widgets={clearAll:f["default"],currentRefinedValues:d["default"],hierarchicalMenu:m["default"],hits:g["default"],hitsPerPageSelector:b["default"],menu:C["default"],refinementList:x["default"],numericRefinementList:E["default"],numericSelector:S["default"],pagination:T["default"],priceRanges:N["default"],searchBox:A["default"],rangeSlider:F["default"],sortBySelector:D["default"],starRating:L["default"],stats:V["default"],toggle:q["default"]},Q.version=K["default"],Q.createQueryString=l["default"].url.getQueryStringFromState,t["default"]=Q},function(e,t){"use strict";Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e})},function(e,t){"use strict";var n={};if(!Object.setPrototypeOf&&!n.__proto__){var r=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:r.call(Object,e)}}},function(e,t){"use strict";function n(e){var t=function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return new(r.apply(e,[null].concat(n)))};return t.__proto__=e,t.prototype=e.prototype,t}var r=Function.prototype.bind;e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){return"#"}function u(e,t){if(!t.getConfiguration)return e;var n=t.getConfiguration(e);return(0,y["default"])({},e,n,function(e,t){return Array.isArray(e)?(0,_["default"])(e,t):void 0})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;te;e+=2){var t=re[e],n=re[e+1];t(n),re[e]=void 0,re[e+1]=void 0}G=0}function v(){try{var e=n(11);return Q=e.runOnLoop||e.runOnContext,f()}catch(t){return h()}}function g(e,t){var n=this,r=n._state;if(r===se&&!e||r===ue&&!t)return this;var o=new this.constructor(b),i=n._result;if(r){var a=arguments[r-1];X(function(){F(r,o,a,i)})}else N(n,o,e,t);return o}function y(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(b);return S(n,e),n}function b(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function C(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return le.error=t,le}}function x(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function P(e,t,n){X(function(e){var r=!1,o=x(n,t,function(n){r||(r=!0,t!==n?S(e,n):T(e,n))},function(t){r||(r=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,k(e,o))},e)}function E(e,t){t._state===se?T(e,t._result):t._state===ue?k(e,t._result):N(t,void 0,function(t){S(e,t)},function(t){k(e,t)})}function R(e,t,n){t.constructor===e.constructor&&n===oe&&constructor.resolve===ie?E(e,t):n===le?k(e,le.error):void 0===n?T(e,t):s(n)?P(e,t,n):T(e,t)}function S(e,t){e===t?k(e,_()):a(t)?R(e,t,w(t)):T(e,t)}function O(e){e._onerror&&e._onerror(e._result),j(e)}function T(e,t){e._state===ae&&(e._result=t,e._state=se,0!==e._subscribers.length&&X(j,e))}function k(e,t){e._state===ae&&(e._state=ue,e._result=t,X(O,e))}function N(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+se]=n,o[i+ue]=r,0===i&&e._state&&X(j,e)}function j(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;aa;a++)N(r.resolve(e[a]),void 0,t,n);return o}function L(e){var t=this,n=new t(b);return k(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function V(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(e){this._id=he++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&H(),this instanceof B?I(this,e):V())}function q(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&T(this.promise,this._result))):k(this.promise,this._validationError())}function W(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=me)}var K;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,$,z,Y=K,G=0,X=function(e,t){re[G]=e,re[G+1]=t,G+=2,2===G&&($?$(m):z())},J="undefined"!=typeof window?window:void 0,Z=J||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3);z=te?c():ee?p():ne?d():void 0===J?v():h();var oe=g,ie=y,ae=void 0,se=1,ue=2,le=new A,ce=new A,fe=D,pe=U,de=L,he=0,me=B;B.all=fe,B.race=pe,B.resolve=ie,B.reject=de,B._setScheduler=u,B._setAsap=l,B._asap=X,B.prototype={constructor:B,then:oe,"catch":function(e){return this.then(null,e)}};var ve=q;q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&e>n;n++)this._eachEntry(t[n],n)},q.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===ie){var o=w(e);if(o===oe&&e._state!==ae)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===me){var i=new n(b);R(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},q.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ae&&(this._remaining--,e===ue?k(r,n):this._result[t]=n),0===this._remaining&&T(r,this._result)},q.prototype._willSettleAt=function(e,t){var n=this;N(e,void 0,function(e){n._settledAt(se,t,e)},function(e){n._settledAt(ue,t,e)})};var ge=W,ye={Promise:me,polyfill:ge};n(12).amd?(r=function(){return ye}.call(t,n,t,i),!(void 0!==r&&(i.exports=r))):"undefined"!=typeof i&&i.exports?i.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),ge()}).call(this)}).call(t,n(9),function(){return this}(),n(10)(e))},function(e,t){function n(){l=!1,a.length?u=a.concat(u):c=-1,u.length&&r()}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(a=u,u=[];++c1)for(var n=1;n=u.hosts[e.hostType].length&&(d||!h)?u._promise.reject(r):(u.hostIndex[e.hostType]=++u.hostIndex[e.hostType]%u.hosts[e.hostType].length,r instanceof c.RequestTimeout?v():(d||(f=1/0),t(n,s)))}function v(){return u.hostIndex[e.hostType]=++u.hostIndex[e.hostType]%u.hosts[e.hostType].length,s.timeout=u.requestTimeout*(f+1),t(n,s)}var g;if(u._useCache&&(g=e.url),u._useCache&&r&&(g+="_body_"+s.body),u._useCache&&a&&void 0!==a[g])return i("serving response from cache"),u._promise.resolve(JSON.parse(a[g]));if(f>=u.hosts[e.hostType].length)return!h||d?(i("could not get any response"),u._promise.reject(new c.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+u.applicationID))):(i("switching to fallback"),f=0,s.method=e.fallback.method,s.url=e.fallback.url,s.jsonBody=e.fallback.body,s.jsonBody&&(s.body=l(s.jsonBody)),o=u._computeRequestHeaders(),s.timeout=u.requestTimeout*(f+1),u.hostIndex[e.hostType]=0,d=!0,t(u._request.fallback,s));var y=u.hosts[e.hostType][u.hostIndex[e.hostType]]+s.url,b={body:s.body,jsonBody:s.jsonBody,method:s.method,headers:o,timeout:s.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",b.method,y,b.headers,b.timeout),n===u._request.fallback&&i("using fallback"),n.call(u,y,b).then(p,m)}var r,o,i=n(42)("algoliasearch:"+e.url),a=e.cache,u=this,f=0,d=!1,h=u._useFallback&&u._request.fallback&&e.fallback;this.apiKey.length>p&&void 0!==e.body&&void 0!==e.body.params?(e.body.apiKey=this.apiKey,o=this._computeRequestHeaders(!1)):o=this._computeRequestHeaders(),void 0!==e.body&&(r=l(e.body)),i("request start");var m=t(u._request,{url:e.url,method:e.method,body:r,jsonBody:e.body,timeout:u.requestTimeout*(f+1)});return e.callback?void m.then(function(t){s(function(){e.callback(null,t)},u._setTimeout||setTimeout)},function(t){s(function(){e.callback(t)},u._setTimeout||setTimeout)}):m},_getSearchParams:function(e,t){if(void 0===e||null===e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?l(e[n]):e[n]));return t},_computeRequestHeaders:function(e){var t=n(15),r={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return e!==!1&&(r["x-algolia-api-key"]=this.apiKey),this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},r.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,n){var r=this;return 1!==arguments.length&&"function"!=typeof t||(n=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:n})},addObjects:function(e,t){var r=n(34),o="Usage: index.addObjects(arrayOfObjects[, callback])";if(!r(e))throw new Error(o);for(var i=this,a={requests:[]},s=0;sa&&(t=a),"published"!==e.status?c._promise.delay(t).then(n):e})}function r(e){s(function(){t(null,e)},c._setTimeout||setTimeout)}function o(e){s(function(){t(e)},c._setTimeout||setTimeout)}var i=100,a=5e3,u=0,l=this,c=l.as,f=n();return t?void f.then(r,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var n=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){var o=n(34),i="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!o(e))throw new Error(i);1!==arguments.length&&"function"!=typeof t||(r=t,t=null);var a={acl:e};return t&&(a.validity=t.validity,a.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,a.maxHitsPerQuery=t.maxHitsPerQuery,a.description=t.description,t.queryParameters&&(a.queryParameters=this.as._getSearchParams(t.queryParameters,"")),a.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:a,hostType:"write",callback:r})},addUserKeyWithValidity:u(function(e,t,n){return this.addUserKey(e,t,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,o){var i=n(34),a="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!i(t))throw new Error(a);2!==arguments.length&&"function"!=typeof r||(o=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.description=r.description,r.queryParameters&&(s.queryParameters=this.as._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:s,hostType:"write",callback:o})},_search:function(e,t,n){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:n})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},function(e,t,n){"use strict";function r(e,t){var r=n(15),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=e||"Unknown error",t&&r(t,function(e,t){o[t]=e})}function o(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return i(n,r),n}var i=n(7);i(r,Error),e.exports={AlgoliaSearchError:r,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail"," +``` + +The script must be loaded prior to instantiating FastClick on any element of the page. + +To instantiate FastClick on the `body`, which is the recommended method of use: + +```js +if ('addEventListener' in document) { + document.addEventListener('DOMContentLoaded', function() { + FastClick.attach(document.body); + }, false); +} +``` + +Or, if you're using jQuery: + +```js +$(function() { + FastClick.attach(document.body); +}); +``` + +If you're using Browserify or another CommonJS-style module system, the `FastClick.attach` function will be returned when you call `require('fastclick')`. As a result, the easiest way to use FastClick with these loaders is as follows: + +```js +var attachFastClick = require('fastclick'); +attachFastClick(document.body); +``` + +### Minified ### + +Run `make` to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to `build/fastclick.min.js` or you can [download a pre-minified version](http://build.origami.ft.com/bundles/js?modules=fastclick). + +Note: the pre-minified version is built using [our build service](http://origami.ft.com/docs/developer-guide/build-service/) which exposes the `FastClick` object through `Origami.fastclick` and will have the Browserify/CommonJS API (see above). + +```js +var attachFastClick = Origami.fastclick; +attachFastClick(document.body); +``` + +### AMD ### + +FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as [RequireJS](http://requirejs.org/). Note that when using the AMD style require, the full `FastClick` object will be returned, _not_ `FastClick.attach` + +```js +var FastClick = require('fastclick'); +FastClick.attach(document.body, options); +``` + +### Package managers ### + +You can install FastClick using [Component](https://github.com/component/component), [npm](https://npmjs.org/package/fastclick) or [Bower](http://bower.io/). + +For Ruby, there's a third-party gem called [fastclick-rails](http://rubygems.org/gems/fastclick-rails). For .NET there's a [NuGet package](http://nuget.org/packages/FastClick). + +## Advanced ## + +### Ignore certain elements with `needsclick` ### + +Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the `needsclick` class. +```html +Ignored by FastClick +``` + +#### Use case 1: non-synthetic click required #### + +Internally, FastClick uses `document.createEvent` to fire a synthetic `click` event as soon as `touchend` is fired by the browser. It then suppresses the additional `click` event created by the browser after that. In some cases, the non-synthetic `click` event created by the browser is required, as described in the [triggering focus example](http://ftlabs.github.com/fastclick/examples/focus.html). + +This is where the `needsclick` class comes in. Add the class to any element that requires a non-synthetic click. + +#### Use case 2: Twitter Bootstrap 2.2.2 dropdowns #### + +Another example of when to use the `needsclick` class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own `touchstart` listener for dropdowns, so you want to tell FastClick to ignore those. If you don't, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after. + +```html +Dropdown +``` + +## Examples ## + +FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this: + +* [basic use](http://ftlabs.github.com/fastclick/examples/layer.html) showing the increase in perceived responsiveness +* [triggering focus](http://ftlabs.github.com/fastclick/examples/focus.html) on an input element from a `click` handler +* [input element](http://ftlabs.github.com/fastclick/examples/input.html) which never receives clicks but gets fast focus + +## Tests ## + +There are no automated tests. The files in `tests/` are manual reduced test cases. We've had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it's not so trivial to test. + +## Credits and collaboration ## + +FastClick is maintained by [Rowan Beentje](http://twitter.com/rowanbeentje), [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia) and [Matthew Andrews](http://twitter.com/andrewsmatt) at [FT Labs](http://labs.ft.com). All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request. diff --git a/themes/next_old/source/lib/fastclick/bower.json b/themes/next_old/source/lib/fastclick/bower.json new file mode 100644 index 0000000..18e1abd --- /dev/null +++ b/themes/next_old/source/lib/fastclick/bower.json @@ -0,0 +1,12 @@ +{ + "name": "fastclick", + "main": "lib/fastclick.js", + "ignore": [ + "**/.*", + "component.json", + "package.json", + "Makefile", + "tests", + "examples" + ] +} diff --git a/themes/next_old/source/lib/fastclick/lib/fastclick.js b/themes/next_old/source/lib/fastclick/lib/fastclick.js new file mode 100644 index 0000000..3af4f9d --- /dev/null +++ b/themes/next_old/source/lib/fastclick/lib/fastclick.js @@ -0,0 +1,841 @@ +;(function () { + 'use strict'; + + /** + * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. + * + * @codingstandard ftlabs-jsv2 + * @copyright The Financial Times Limited [All Rights Reserved] + * @license MIT License (see LICENSE.txt) + */ + + /*jslint browser:true, node:true*/ + /*global define, Event, Node*/ + + + /** + * Instantiate fast-clicking listeners on the specified layer. + * + * @constructor + * @param {Element} layer The layer to listen on + * @param {Object} [options={}] The options to override the defaults + */ + function FastClick(layer, options) { + var oldOnClick; + + options = options || {}; + + /** + * Whether a click is currently being tracked. + * + * @type boolean + */ + this.trackingClick = false; + + + /** + * Timestamp for when click tracking started. + * + * @type number + */ + this.trackingClickStart = 0; + + + /** + * The element being tracked for a click. + * + * @type EventTarget + */ + this.targetElement = null; + + + /** + * X-coordinate of touch start event. + * + * @type number + */ + this.touchStartX = 0; + + + /** + * Y-coordinate of touch start event. + * + * @type number + */ + this.touchStartY = 0; + + + /** + * ID of the last touch, retrieved from Touch.identifier. + * + * @type number + */ + this.lastTouchIdentifier = 0; + + + /** + * Touchmove boundary, beyond which a click will be cancelled. + * + * @type number + */ + this.touchBoundary = options.touchBoundary || 10; + + + /** + * The FastClick layer. + * + * @type Element + */ + this.layer = layer; + + /** + * The minimum time between tap(touchstart and touchend) events + * + * @type number + */ + this.tapDelay = options.tapDelay || 200; + + /** + * The maximum time for a tap + * + * @type number + */ + this.tapTimeout = options.tapTimeout || 700; + + if (FastClick.notNeeded(layer)) { + return; + } + + // Some old versions of Android don't have Function.prototype.bind + function bind(method, context) { + return function() { return method.apply(context, arguments); }; + } + + + var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel']; + var context = this; + for (var i = 0, l = methods.length; i < l; i++) { + context[methods[i]] = bind(context[methods[i]], context); + } + + // Set up event handlers as required + if (deviceIsAndroid) { + layer.addEventListener('mouseover', this.onMouse, true); + layer.addEventListener('mousedown', this.onMouse, true); + layer.addEventListener('mouseup', this.onMouse, true); + } + + layer.addEventListener('click', this.onClick, true); + layer.addEventListener('touchstart', this.onTouchStart, false); + layer.addEventListener('touchmove', this.onTouchMove, false); + layer.addEventListener('touchend', this.onTouchEnd, false); + layer.addEventListener('touchcancel', this.onTouchCancel, false); + + // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) + // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick + // layer when they are cancelled. + if (!Event.prototype.stopImmediatePropagation) { + layer.removeEventListener = function(type, callback, capture) { + var rmv = Node.prototype.removeEventListener; + if (type === 'click') { + rmv.call(layer, type, callback.hijacked || callback, capture); + } else { + rmv.call(layer, type, callback, capture); + } + }; + + layer.addEventListener = function(type, callback, capture) { + var adv = Node.prototype.addEventListener; + if (type === 'click') { + adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) { + if (!event.propagationStopped) { + callback(event); + } + }), capture); + } else { + adv.call(layer, type, callback, capture); + } + }; + } + + // If a handler is already declared in the element's onclick attribute, it will be fired before + // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and + // adding it as listener. + if (typeof layer.onclick === 'function') { + + // Android browser on at least 3.2 requires a new reference to the function in layer.onclick + // - the old one won't work if passed to addEventListener directly. + oldOnClick = layer.onclick; + layer.addEventListener('click', function(event) { + oldOnClick(event); + }, false); + layer.onclick = null; + } + } + + /** + * Windows Phone 8.1 fakes user agent string to look like Android and iPhone. + * + * @type boolean + */ + var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0; + + /** + * Android requires exceptions. + * + * @type boolean + */ + var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone; + + + /** + * iOS requires exceptions. + * + * @type boolean + */ + var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone; + + + /** + * iOS 4 requires an exception for select elements. + * + * @type boolean + */ + var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent); + + + /** + * iOS 6.0-7.* requires the target element to be manually derived + * + * @type boolean + */ + var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent); + + /** + * BlackBerry requires exceptions. + * + * @type boolean + */ + var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0; + + /** + * Determine whether a given element requires a native click. + * + * @param {EventTarget|Element} target Target DOM element + * @returns {boolean} Returns true if the element needs a native click + */ + FastClick.prototype.needsClick = function(target) { + switch (target.nodeName.toLowerCase()) { + + // Don't send a synthetic click to disabled inputs (issue #62) + case 'button': + case 'select': + case 'textarea': + if (target.disabled) { + return true; + } + + break; + case 'input': + + // File inputs need real clicks on iOS 6 due to a browser bug (issue #68) + if ((deviceIsIOS && target.type === 'file') || target.disabled) { + return true; + } + + break; + case 'label': + case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames + case 'video': + return true; + } + + return (/\bneedsclick\b/).test(target.className); + }; + + + /** + * Determine whether a given element requires a call to focus to simulate click into element. + * + * @param {EventTarget|Element} target Target DOM element + * @returns {boolean} Returns true if the element requires a call to focus to simulate native click. + */ + FastClick.prototype.needsFocus = function(target) { + switch (target.nodeName.toLowerCase()) { + case 'textarea': + return true; + case 'select': + return !deviceIsAndroid; + case 'input': + switch (target.type) { + case 'button': + case 'checkbox': + case 'file': + case 'image': + case 'radio': + case 'submit': + return false; + } + + // No point in attempting to focus disabled inputs + return !target.disabled && !target.readOnly; + default: + return (/\bneedsfocus\b/).test(target.className); + } + }; + + + /** + * Send a click event to the specified element. + * + * @param {EventTarget|Element} targetElement + * @param {Event} event + */ + FastClick.prototype.sendClick = function(targetElement, event) { + var clickEvent, touch; + + // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) + if (document.activeElement && document.activeElement !== targetElement) { + document.activeElement.blur(); + } + + touch = event.changedTouches[0]; + + // Synthesise a click event, with an extra attribute so it can be tracked + clickEvent = document.createEvent('MouseEvents'); + clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); + clickEvent.forwardedTouchEvent = true; + targetElement.dispatchEvent(clickEvent); + }; + + FastClick.prototype.determineEventType = function(targetElement) { + + //Issue #159: Android Chrome Select Box does not open with a synthetic click event + if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') { + return 'mousedown'; + } + + return 'click'; + }; + + + /** + * @param {EventTarget|Element} targetElement + */ + FastClick.prototype.focus = function(targetElement) { + var length; + + // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. + if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { + length = targetElement.value.length; + targetElement.setSelectionRange(length, length); + } else { + targetElement.focus(); + } + }; + + + /** + * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it. + * + * @param {EventTarget|Element} targetElement + */ + FastClick.prototype.updateScrollParent = function(targetElement) { + var scrollParent, parentElement; + + scrollParent = targetElement.fastClickScrollParent; + + // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the + // target element was moved to another parent. + if (!scrollParent || !scrollParent.contains(targetElement)) { + parentElement = targetElement; + do { + if (parentElement.scrollHeight > parentElement.offsetHeight) { + scrollParent = parentElement; + targetElement.fastClickScrollParent = parentElement; + break; + } + + parentElement = parentElement.parentElement; + } while (parentElement); + } + + // Always update the scroll top tracker if possible. + if (scrollParent) { + scrollParent.fastClickLastScrollTop = scrollParent.scrollTop; + } + }; + + + /** + * @param {EventTarget} targetElement + * @returns {Element|EventTarget} + */ + FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) { + + // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node. + if (eventTarget.nodeType === Node.TEXT_NODE) { + return eventTarget.parentNode; + } + + return eventTarget; + }; + + + /** + * On touch start, record the position and scroll offset. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onTouchStart = function(event) { + var targetElement, touch, selection; + + // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111). + if (event.targetTouches.length > 1) { + return true; + } + + targetElement = this.getTargetElementFromEventTarget(event.target); + touch = event.targetTouches[0]; + + if (deviceIsIOS) { + + // Only trusted events will deselect text on iOS (issue #49) + selection = window.getSelection(); + if (selection.rangeCount && !selection.isCollapsed) { + return true; + } + + if (!deviceIsIOS4) { + + // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23): + // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched + // with the same identifier as the touch event that previously triggered the click that triggered the alert. + // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an + // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform. + // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string, + // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long, + // random integers, it's safe to to continue if the identifier is 0 here. + if (touch.identifier && touch.identifier === this.lastTouchIdentifier) { + event.preventDefault(); + return false; + } + + this.lastTouchIdentifier = touch.identifier; + + // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and: + // 1) the user does a fling scroll on the scrollable layer + // 2) the user stops the fling scroll with another tap + // then the event.target of the last 'touchend' event will be the element that was under the user's finger + // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check + // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42). + this.updateScrollParent(targetElement); + } + } + + this.trackingClick = true; + this.trackingClickStart = event.timeStamp; + this.targetElement = targetElement; + + this.touchStartX = touch.pageX; + this.touchStartY = touch.pageY; + + // Prevent phantom clicks on fast double-tap (issue #36) + if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { + event.preventDefault(); + } + + return true; + }; + + + /** + * Based on a touchmove event object, check whether the touch has moved past a boundary since it started. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.touchHasMoved = function(event) { + var touch = event.changedTouches[0], boundary = this.touchBoundary; + + if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) { + return true; + } + + return false; + }; + + + /** + * Update the last position. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onTouchMove = function(event) { + if (!this.trackingClick) { + return true; + } + + // If the touch has moved, cancel the click tracking + if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { + this.trackingClick = false; + this.targetElement = null; + } + + return true; + }; + + + /** + * Attempt to find the labelled control for the given label element. + * + * @param {EventTarget|HTMLLabelElement} labelElement + * @returns {Element|null} + */ + FastClick.prototype.findControl = function(labelElement) { + + // Fast path for newer browsers supporting the HTML5 control attribute + if (labelElement.control !== undefined) { + return labelElement.control; + } + + // All browsers under test that support touch events also support the HTML5 htmlFor attribute + if (labelElement.htmlFor) { + return document.getElementById(labelElement.htmlFor); + } + + // If no for attribute exists, attempt to retrieve the first labellable descendant element + // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label + return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); + }; + + + /** + * On touch end, determine whether to send a click event at once. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onTouchEnd = function(event) { + var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement; + + if (!this.trackingClick) { + return true; + } + + // Prevent phantom clicks on fast double-tap (issue #36) + if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { + this.cancelNextClick = true; + return true; + } + + if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) { + return true; + } + + // Reset to prevent wrong click cancel on input (issue #156). + this.cancelNextClick = false; + + this.lastClickTime = event.timeStamp; + + trackingClickStart = this.trackingClickStart; + this.trackingClick = false; + this.trackingClickStart = 0; + + // On some iOS devices, the targetElement supplied with the event is invalid if the layer + // is performing a transition or scroll, and has to be re-detected manually. Note that + // for this to function correctly, it must be called *after* the event target is checked! + // See issue #57; also filed as rdar://13048589 . + if (deviceIsIOSWithBadTarget) { + touch = event.changedTouches[0]; + + // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null + targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement; + targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent; + } + + targetTagName = targetElement.tagName.toLowerCase(); + if (targetTagName === 'label') { + forElement = this.findControl(targetElement); + if (forElement) { + this.focus(targetElement); + if (deviceIsAndroid) { + return false; + } + + targetElement = forElement; + } + } else if (this.needsFocus(targetElement)) { + + // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through. + // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37). + if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) { + this.targetElement = null; + return false; + } + + this.focus(targetElement); + this.sendClick(targetElement, event); + + // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open. + // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others) + if (!deviceIsIOS || targetTagName !== 'select') { + this.targetElement = null; + event.preventDefault(); + } + + return false; + } + + if (deviceIsIOS && !deviceIsIOS4) { + + // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled + // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42). + scrollParent = targetElement.fastClickScrollParent; + if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) { + return true; + } + } + + // Prevent the actual click from going though - unless the target node is marked as requiring + // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. + if (!this.needsClick(targetElement)) { + event.preventDefault(); + this.sendClick(targetElement, event); + } + + return false; + }; + + + /** + * On touch cancel, stop tracking the click. + * + * @returns {void} + */ + FastClick.prototype.onTouchCancel = function() { + this.trackingClick = false; + this.targetElement = null; + }; + + + /** + * Determine mouse events which should be permitted. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onMouse = function(event) { + + // If a target element was never set (because a touch event was never fired) allow the event + if (!this.targetElement) { + return true; + } + + if (event.forwardedTouchEvent) { + return true; + } + + // Programmatically generated events targeting a specific element should be permitted + if (!event.cancelable) { + return true; + } + + // Derive and check the target element to see whether the mouse event needs to be permitted; + // unless explicitly enabled, prevent non-touch click events from triggering actions, + // to prevent ghost/doubleclicks. + if (!this.needsClick(this.targetElement) || this.cancelNextClick) { + + // Prevent any user-added listeners declared on FastClick element from being fired. + if (event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } else { + + // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) + event.propagationStopped = true; + } + + // Cancel the event + event.stopPropagation(); + event.preventDefault(); + + return false; + } + + // If the mouse event is permitted, return true for the action to go through. + return true; + }; + + + /** + * On actual clicks, determine whether this is a touch-generated click, a click action occurring + * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or + * an actual click which should be permitted. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onClick = function(event) { + var permitted; + + // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early. + if (this.trackingClick) { + this.targetElement = null; + this.trackingClick = false; + return true; + } + + // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target. + if (event.target.type === 'submit' && event.detail === 0) { + return true; + } + + permitted = this.onMouse(event); + + // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through. + if (!permitted) { + this.targetElement = null; + } + + // If clicks are permitted, return true for the action to go through. + return permitted; + }; + + + /** + * Remove all FastClick's event listeners. + * + * @returns {void} + */ + FastClick.prototype.destroy = function() { + var layer = this.layer; + + if (deviceIsAndroid) { + layer.removeEventListener('mouseover', this.onMouse, true); + layer.removeEventListener('mousedown', this.onMouse, true); + layer.removeEventListener('mouseup', this.onMouse, true); + } + + layer.removeEventListener('click', this.onClick, true); + layer.removeEventListener('touchstart', this.onTouchStart, false); + layer.removeEventListener('touchmove', this.onTouchMove, false); + layer.removeEventListener('touchend', this.onTouchEnd, false); + layer.removeEventListener('touchcancel', this.onTouchCancel, false); + }; + + + /** + * Check whether FastClick is needed. + * + * @param {Element} layer The layer to listen on + */ + FastClick.notNeeded = function(layer) { + var metaViewport; + var chromeVersion; + var blackberryVersion; + var firefoxVersion; + + // Devices that don't support touch don't need FastClick + if (typeof window.ontouchstart === 'undefined') { + return true; + } + + // Chrome version - zero for other browsers + chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; + + if (chromeVersion) { + + if (deviceIsAndroid) { + metaViewport = document.querySelector('meta[name=viewport]'); + + if (metaViewport) { + // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) + if (metaViewport.content.indexOf('user-scalable=no') !== -1) { + return true; + } + // Chrome 32 and above with width=device-width or less don't need FastClick + if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) { + return true; + } + } + + // Chrome desktop doesn't need FastClick (issue #15) + } else { + return true; + } + } + + if (deviceIsBlackBerry10) { + blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); + + // BlackBerry 10.3+ does not require Fastclick library. + // https://github.com/ftlabs/fastclick/issues/251 + if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) { + metaViewport = document.querySelector('meta[name=viewport]'); + + if (metaViewport) { + // user-scalable=no eliminates click delay. + if (metaViewport.content.indexOf('user-scalable=no') !== -1) { + return true; + } + // width=device-width (or less than device-width) eliminates click delay. + if (document.documentElement.scrollWidth <= window.outerWidth) { + return true; + } + } + } + } + + // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97) + if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') { + return true; + } + + // Firefox version - zero for other browsers + firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; + + if (firefoxVersion >= 27) { + // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896 + + metaViewport = document.querySelector('meta[name=viewport]'); + if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) { + return true; + } + } + + // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version + // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx + if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') { + return true; + } + + return false; + }; + + + /** + * Factory method for creating a FastClick object + * + * @param {Element} layer The layer to listen on + * @param {Object} [options={}] The options to override the defaults + */ + FastClick.attach = function(layer, options) { + return new FastClick(layer, options); + }; + + + if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { + + // AMD. Register as an anonymous module. + define(function() { + return FastClick; + }); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = FastClick.attach; + module.exports.FastClick = FastClick; + } else { + window.FastClick = FastClick; + } +}()); diff --git a/themes/next_old/source/lib/fastclick/lib/fastclick.min.js b/themes/next_old/source/lib/fastclick/lib/fastclick.min.js new file mode 100644 index 0000000..cf06427 --- /dev/null +++ b/themes/next_old/source/lib/fastclick/lib/fastclick.min.js @@ -0,0 +1 @@ +!function(){"use strict";function t(e,o){function i(t,e){return function(){return t.apply(e,arguments)}}var r;if(o=o||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=o.touchBoundary||10,this.layer=e,this.tapDelay=o.tapDelay||200,this.tapTimeout=o.tapTimeout||700,!t.notNeeded(e)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],c=this,s=0,u=a.length;u>s;s++)c[a[s]]=i(c[a[s]],c);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),r=o&&/OS [6-7]_\d/.test(navigator.userAgent),a=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,a,c,s,u,l=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,a=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,r&&(u=t.changedTouches[0],l=document.elementFromPoint(u.pageX-window.pageXOffset,u.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),c=l.tagName.toLowerCase(),"label"===c){if(e=this.findControl(l)){if(this.focus(l),n)return!1;l=e}}else if(this.needsFocus(l))return t.timeStamp-a>100||o&&window.top!==window&&"input"===c?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,t),o&&"select"===c||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(s=l.fastClickScrollParent,s&&s.fastClickLastScrollTop!==s.scrollTop)?!0:(this.needsClick(l)||(t.preventDefault(),this.sendClick(l,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,o,i,r;if("undefined"==typeof window.ontouchstart)return!0;if(o=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(o>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(a&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(); \ No newline at end of file diff --git a/themes/next_old/source/lib/font-awesome/.bower.json b/themes/next_old/source/lib/font-awesome/.bower.json new file mode 100644 index 0000000..fb98b1d --- /dev/null +++ b/themes/next_old/source/lib/font-awesome/.bower.json @@ -0,0 +1,36 @@ +{ + "name": "font-awesome", + "description": "Font Awesome", + "keywords": [], + "homepage": "http://fontawesome.io", + "dependencies": {}, + "devDependencies": {}, + "license": [ + "OFL-1.1", + "MIT", + "CC-BY-3.0" + ], + "main": [ + "less/font-awesome.less", + "scss/font-awesome.scss" + ], + "ignore": [ + "*/.*", + "*.json", + "src", + "*.yml", + "Gemfile", + "Gemfile.lock", + "*.md" + ], + "version": "4.7.0", + "_release": "4.7.0", + "_resolution": { + "type": "version", + "tag": "v4.7.0", + "commit": "a3fe90fa5f6fac55d197f9cbd18e3f57dafb716c" + }, + "_source": "https://github.com/FortAwesome/Font-Awesome.git", + "_target": "*", + "_originalSource": "fontawesome" +} \ No newline at end of file diff --git a/themes/next_old/source/lib/font-awesome/.gitignore b/themes/next_old/source/lib/font-awesome/.gitignore new file mode 100644 index 0000000..39c4f20 --- /dev/null +++ b/themes/next_old/source/lib/font-awesome/.gitignore @@ -0,0 +1,33 @@ +*.pyc +*.egg-info +*.db +*.db.old +*.swp +*.db-journal + +.coverage +.DS_Store +.installed.cfg +_gh_pages/* + +.idea/* +.svn/* +src/website/static/* +src/website/media/* + +bin +cfcache +develop-eggs +dist +downloads +eggs +parts +tmp +.sass-cache +node_modules + +src/website/settingslocal.py +stunnel.log + +.ruby-version +.bundle diff --git a/themes/next_old/source/lib/font-awesome/.npmignore b/themes/next_old/source/lib/font-awesome/.npmignore new file mode 100644 index 0000000..54a691f --- /dev/null +++ b/themes/next_old/source/lib/font-awesome/.npmignore @@ -0,0 +1,42 @@ +*.pyc +*.egg-info +*.db +*.db.old +*.swp +*.db-journal + +.coverage +.DS_Store +.installed.cfg +_gh_pages/* + +.idea/* +.svn/* +src/website/static/* +src/website/media/* + +bin +cfcache +develop-eggs +dist +downloads +eggs +parts +tmp +.sass-cache +node_modules + +src/website/settingslocal.py +stunnel.log + +.ruby-version + +# don't need these in the npm package. +src/ +_config.yml +bower.json +component.json +composer.json +CONTRIBUTING.md +Gemfile +Gemfile.lock diff --git a/lib/font-awesome/HELP-US-OUT.txt b/themes/next_old/source/lib/font-awesome/HELP-US-OUT.txt similarity index 100% rename from lib/font-awesome/HELP-US-OUT.txt rename to themes/next_old/source/lib/font-awesome/HELP-US-OUT.txt diff --git a/themes/next_old/source/lib/font-awesome/bower.json b/themes/next_old/source/lib/font-awesome/bower.json new file mode 100644 index 0000000..9e21126 --- /dev/null +++ b/themes/next_old/source/lib/font-awesome/bower.json @@ -0,0 +1,22 @@ +{ + "name": "font-awesome", + "description": "Font Awesome", + "keywords": [], + "homepage": "http://fontawesome.io", + "dependencies": {}, + "devDependencies": {}, + "license": ["OFL-1.1", "MIT", "CC-BY-3.0"], + "main": [ + "less/font-awesome.less", + "scss/font-awesome.scss" + ], + "ignore": [ + "*/.*", + "*.json", + "src", + "*.yml", + "Gemfile", + "Gemfile.lock", + "*.md" + ] +} diff --git a/lib/font-awesome/css/font-awesome.css b/themes/next_old/source/lib/font-awesome/css/font-awesome.css similarity index 100% rename from lib/font-awesome/css/font-awesome.css rename to themes/next_old/source/lib/font-awesome/css/font-awesome.css diff --git a/lib/font-awesome/css/font-awesome.css.map b/themes/next_old/source/lib/font-awesome/css/font-awesome.css.map similarity index 100% rename from lib/font-awesome/css/font-awesome.css.map rename to themes/next_old/source/lib/font-awesome/css/font-awesome.css.map diff --git a/lib/font-awesome/css/font-awesome.min.css b/themes/next_old/source/lib/font-awesome/css/font-awesome.min.css similarity index 100% rename from lib/font-awesome/css/font-awesome.min.css rename to themes/next_old/source/lib/font-awesome/css/font-awesome.min.css diff --git a/themes/next_old/source/lib/font-awesome/fonts/FontAwesome.otf b/themes/next_old/source/lib/font-awesome/fonts/FontAwesome.otf new file mode 100644 index 0000000..401ec0f Binary files /dev/null and b/themes/next_old/source/lib/font-awesome/fonts/FontAwesome.otf differ diff --git a/lib/font-awesome/fonts/fontawesome-webfont.eot b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from lib/font-awesome/fonts/fontawesome-webfont.eot rename to themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.eot diff --git a/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.svg b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.ttf b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.ttf differ diff --git a/lib/font-awesome/fonts/fontawesome-webfont.woff b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from lib/font-awesome/fonts/fontawesome-webfont.woff rename to themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.woff diff --git a/lib/font-awesome/fonts/fontawesome-webfont.woff2 b/themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from lib/font-awesome/fonts/fontawesome-webfont.woff2 rename to themes/next_old/source/lib/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/themes/next_old/source/lib/jquery/.bower.json b/themes/next_old/source/lib/jquery/.bower.json new file mode 100644 index 0000000..30b67e0 --- /dev/null +++ b/themes/next_old/source/lib/jquery/.bower.json @@ -0,0 +1,15 @@ +{ + "name": "jquery", + "_cacheHeaders": { + "ETag": "\"5492efef-14960\"", + "Last-Modified": "Thu, 18 Dec 2014 15:17:03 GMT", + "Content-Length": "84320", + "Content-Type": "application/x-javascript" + }, + "_release": "e-tag:5492efef-", + "main": "index.js", + "_source": "http://code.jquery.com/jquery-2.1.3.min.js", + "_target": "*", + "_originalSource": "http://code.jquery.com/jquery-2.1.3.min.js", + "_direct": true +} \ No newline at end of file diff --git a/themes/next_old/source/lib/jquery/index.js b/themes/next_old/source/lib/jquery/index.js new file mode 100644 index 0000000..25714ed --- /dev/null +++ b/themes/next_old/source/lib/jquery/index.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | 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=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",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 d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,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!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));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,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},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,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),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):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;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,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"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=hb(),z=hb(),A=hb(),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=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),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")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){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 gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(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 mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.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.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(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(".#.+[+~]")}),jb(function(a){var b=g.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=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||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,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,match:X,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(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||gb.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]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.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(cb,db).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=gb.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(Q," ")+" ").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;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(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:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).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 Z.test(a.nodeName)},input:function(a){return Y.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(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=[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(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(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=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.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(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(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}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(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(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==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=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir: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},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.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.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&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 n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||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&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},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().done(c.resolve).fail(c.reject).progress(c.notify):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=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;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||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;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};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),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){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c) +},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),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=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){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])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(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 L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=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(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.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=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(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.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!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&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(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)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(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 kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");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 J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("