diff --git a/2016/04/06/Linux/Kali-Linux/index.html b/2016/04/06/Linux/Kali-Linux/index.html index 556c5e1d..d71524b5 100644 --- a/2016/04/06/Linux/Kali-Linux/index.html +++ b/2016/04/06/Linux/Kali-Linux/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Kali Linux | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + | + + + + + + + + + + + + @@ -657,11 +763,14 @@

+ - + - - - + - - - + - + - + @@ -721,57 +824,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -782,6 +871,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Ubuntu 14.04 更换内核重启出现:Missing Modules | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + | + + + + + + + + + + + + @@ -661,11 +767,14 @@

- - + - - - + - - - + - + - + @@ -725,57 +828,43 @@
+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -786,6 +875,7 @@
- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + APK保护方法 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -667,11 +773,14 @@

- - + - - - + - - - + - + - + @@ -731,57 +834,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -792,6 +881,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 2016腾讯游戏安全竞赛第一轮Android题分析 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -667,11 +773,14 @@

+ - + - - - + - - - + - + - + @@ -731,57 +834,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -792,6 +881,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 正则表达式必知必会 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -684,11 +790,14 @@

- - + - - - + - - - + - + - + @@ -748,57 +851,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -809,6 +898,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Trie树 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -631,11 +736,14 @@

Trie树

+ + + - - + - - - + - - - + - + - + @@ -695,57 +797,43 @@

Trie树

- + - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -756,6 +844,7 @@

Trie树

+ diff --git "a/2016/05/18/Programming/\346\220\234\347\264\242\344\271\213\346\236\232\344\270\276/index.html" "b/2016/05/18/Programming/\346\220\234\347\264\242\344\271\213\346\236\232\344\270\276/index.html" index 2a32fefa..55928c4f 100644 --- "a/2016/05/18/Programming/\346\220\234\347\264\242\344\271\213\346\236\232\344\270\276/index.html" +++ "b/2016/05/18/Programming/\346\220\234\347\264\242\344\271\213\346\236\232\344\270\276/index.html" @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 搜索之枚举 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -631,11 +736,14 @@

搜索之枚举

+ + + - - + - - - + - - - + - + - + @@ -695,57 +797,43 @@

搜索之枚举

- + - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -756,6 +844,7 @@

搜索之枚举

+ diff --git "a/2016/05/19/Programming/\346\234\200\351\225\277\345\233\236\346\226\207\345\255\220\344\270\262/index.html" "b/2016/05/19/Programming/\346\234\200\351\225\277\345\233\236\346\226\207\345\255\220\344\270\262/index.html" index a1926e82..9c4cd65f 100644 --- "a/2016/05/19/Programming/\346\234\200\351\225\277\345\233\236\346\226\207\345\255\220\344\270\262/index.html" +++ "b/2016/05/19/Programming/\346\234\200\351\225\277\345\233\236\346\226\207\345\255\220\344\270\262/index.html" @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 最长回文子串 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -663,11 +769,14 @@

+ - + - - - + - - - + - + - + @@ -727,57 +830,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -788,6 +877,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 软件调试书单 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -635,11 +740,14 @@

软件调试书单

+ + + - - + - - - + - - - + - + - + @@ -699,57 +801,43 @@

软件调试书单

- + - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -760,6 +848,7 @@

软件调试书单

+ diff --git "a/2016/06/15/Debug/\350\275\257\344\273\266\350\260\203\350\257\225\347\232\204\345\216\237\345\210\231/index.html" "b/2016/06/15/Debug/\350\275\257\344\273\266\350\260\203\350\257\225\347\232\204\345\216\237\345\210\231/index.html" index c2a74301..e6b7c617 100644 --- "a/2016/06/15/Debug/\350\275\257\344\273\266\350\260\203\350\257\225\347\232\204\345\216\237\345\210\231/index.html" +++ "b/2016/06/15/Debug/\350\275\257\344\273\266\350\260\203\350\257\225\347\232\204\345\216\237\345\210\231/index.html" @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 软件调试的原则 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -658,11 +764,14 @@

+ - + - - - + - - - + - + - + @@ -722,57 +825,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -783,6 +872,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 主要的调试器操作 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -669,11 +775,14 @@

- - + - - - + - - - + - + - + @@ -733,57 +836,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -794,6 +883,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Apktool学习指南 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -658,11 +764,14 @@

+ - + - - - + - - - + - + - + @@ -722,57 +825,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -783,6 +872,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + IDA PRO 插件 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -657,11 +763,14 @@

+ - + - - - + - - - + - + - + @@ -721,57 +824,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -782,6 +871,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 搜索之BFS | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -630,11 +735,14 @@

搜索之BFS

+ + + - - + - - - + - - - + - + - + @@ -694,57 +796,43 @@

搜索之BFS

- + - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -755,6 +843,7 @@

搜索之BFS

+ diff --git "a/2016/06/29/Programming/\347\241\254\345\270\201\351\227\256\351\242\230\357\274\232\350\264\252\345\277\203\347\256\227\346\263\225/index.html" "b/2016/06/29/Programming/\347\241\254\345\270\201\351\227\256\351\242\230\357\274\232\350\264\252\345\277\203\347\256\227\346\263\225/index.html" index 734f46d4..032d5278 100644 --- "a/2016/06/29/Programming/\347\241\254\345\270\201\351\227\256\351\242\230\357\274\232\350\264\252\345\277\203\347\256\227\346\263\225/index.html" +++ "b/2016/06/29/Programming/\347\241\254\345\270\201\351\227\256\351\242\230\357\274\232\350\264\252\345\277\203\347\256\227\346\263\225/index.html" @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 硬币问题(DFS) | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -664,11 +770,14 @@

+ - + - - - + - - - + - + - + @@ -728,57 +831,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -789,6 +878,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Ubuntu 14.04 界面设置方法 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -657,11 +763,14 @@

+ - + - - - + - - - + - + - + @@ -721,57 +824,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -782,6 +871,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 调试器gdb的基本使用方法(1) | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -855,11 +961,14 @@

- - + - - - + - - - + - + - + @@ -919,57 +1022,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -980,6 +1069,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 调试器gdb的基本使用方法(2) | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -905,11 +1011,14 @@

+ - + - - - + - - - + - + - + @@ -969,57 +1072,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -1030,6 +1119,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux栈溢出利用之DynELF实例 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -657,11 +763,14 @@

- - + - - - + - - - + - + - + @@ -721,57 +824,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -782,6 +871,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux栈溢出利用之return to dl-resolve实例 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -658,11 +764,14 @@

- - + - - - + - - - + - + - + @@ -722,57 +825,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -783,6 +872,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux栈溢出漏洞利用小结 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -656,11 +762,14 @@

+ - + - - - + - - - + - + - + @@ -720,57 +823,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -781,6 +870,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux栈溢出利用之return to dl-resolve payload 构造原理(一) | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -665,11 +771,14 @@

- - + - - - + - - - + - + - + @@ -729,57 +832,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -790,6 +879,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux栈溢出利用之return to dl-resolve payload 构造原理(二) | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -666,11 +772,14 @@

- - + - - - + - - - + - + - + @@ -730,57 +833,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -791,6 +880,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux堆溢出之fastbin实例 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -658,11 +764,14 @@

- - + - - - + - - - + - + - + @@ -722,57 +825,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -783,6 +872,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux堆漏洞之Double free | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -663,11 +769,14 @@

- - + - - - + - - - + - + - + @@ -727,57 +830,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -788,6 +877,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux堆漏洞之off-by-one | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -669,11 +775,14 @@

- - + - - - + - - - + - + - + @@ -733,57 +836,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -794,6 +883,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + Linux堆漏洞之Use after free实例 | 不要说话 @@ -140,7 +136,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -661,11 +767,14 @@

+ - + - - - + - - - + - + - + @@ -725,57 +828,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -786,6 +875,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + ARM32 汇编语言 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -739,11 +845,14 @@

- - + - - - + - - - + - + - + @@ -803,57 +906,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -864,6 +953,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + ARM64 汇编语言 | 不要说话 @@ -138,7 +134,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -663,11 +773,14 @@

- - + - - - + - - - + - + - + @@ -727,57 +834,43 @@

+ - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -788,6 +881,7 @@

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Linux Shell 命令 | 不要说话 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + + +
+
+
+ +
+ + +
+ + + + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Linux Shell 命令 + + + +

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

0x01. Linux基础命令

    +
  1. find
    功能: 查找文件并执行指定操作
    常用参数:
    -name 指定文件名
    -gid,uid, group, user
    -path 指定查找路径
    -type 指定文件类型(b块设备、c字符设备、d目录、f普通文件、l符号链接文件)
    -exec

    +
  2. +
  3. locate/mlocate/updatedb
    功能: locate利用事先建立的系统中所有文件名称及路径的locate数据库,实现快速定位给定的文件。 mlocate是locate命令的安全增强版,4locate命令实际是mlocate命令的符号连接。
    经验: 由于locate指令基于数据库进行查询,第一次允许前,必须使用updatedb执行创建locate数据库,并定时更新locate数据库。

    +
  4. +
  5. dd
    功能: 用于复制文件并对原文件的内容进行转换和格式化处理。
    参数: conv=<关键字,关键字,..> 将文件按指定关键字的方式转换(在,前后无空格)

    +
  6. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
conv参数说明
ascii将ebcdic码转换成ascii码
block输出cbs指定的字节数
lcase将大写字母转换成小写字母
ucase将小写字母转换成大写字母
swab交换每对输入字节,读入的字节是奇数,最后字节简单的复制到输出
sync用0填充每个输入块的末尾,使其大小为选项ibs的值
+
1
2
3
# 复制文件并将文件中的小写字母全部转换成大写字
[demo@hust#] dd if=test.sh conv=ucase of=newtest
1
+
    +
  1. ln
    功能: ln 命令用来为文件创建连接,连接类型分为硬连接(hard link)和符号连接(symbolic link)两种。默认的连接类型是硬连接,使用“-s”选项创建符号连接。
    语法: ln sourcefile targetfile
    硬连接和符号连接区别:
    (1)硬连接要创建一个具有相同索引节点的连接文件;符号连接文件中保存的是源文件存放的路径。因此删除源文件后,硬连接没影响,符号连接失效
    (2)创建硬连接时,源文件和目标文件必须在同一个硬盘分区下,不能跨分区。符号连接可以跨分区。因为索引节点在不同的分区中自成体系。
    (3)互为硬连接的两个文件等同于一个文件,删除两者任何一个,不影响另外一个文件。修改两者任何一个,另外一个文件内容发生同样变化。
    (4)ln命令默认创建连接为硬连接,不能为目录创建硬连接。为目录建立连接,必须使用符号连接。

    +
  2. +
  3. unlink
    功能: 使用系统调用函数unlink删除指定文件。只能删除普通文件,不能删除目录。

    +
  4. +
  5. rename
    功能: rename用字符串替换的方式批量改变文件名。本质是采用替换的方式将文件名中的指定字符串替换为目标字符串,使用shell通配符。

    +
  6. +
+

0x02. Linux 文本处理

1. sed(文本转换和过滤)

功能: sed是一个单行流式文本编辑器,被用来在输入流(文本输入或命令管道)上处理基本的文本转换。还具有强大的文本过滤功能。
原理: sed在工作时,首先将文本文件的一行内容读取到临时缓冲区(模式空间),然后对文本进行处理,处理完成后将缓冲区中的文本显示到标准输出设备;然后继续处理下一行文本,重复此过程,直到文件结束。sed还有内部命令,常用的有d删除指定的行,s替换指定的文本,i插入文本。
参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数功能
-e <脚本>添加脚本到命令中去执行
-f <脚本文件>添加脚本文件到命令中去执行
-i <后缀>直接在文件中进行替换
-l <数字>指定行的最大字符长度
-r在脚本中使用扩展的规则表达式
-s 或 -separate每个文件看做单独的,而不是将所有文件看做一个长的文本流
-u 或 -unbuffered从文件中加载最少的数据量,增加清空输出缓冲区的频率
+

注意:
(1)使用sed处理文本文件时,原文本内容不发生改变。
(2)sed命令通常被用来自动编辑或处理一个或多个文本文件,可以极大的简化对文本文件的反复操作和。
(3)sed的内部命令最好使用单引号括起来。

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
# 删除文件的第一行
[demo@hust#] sed -e '1d' /etc/fstab

# 删除多行内容
[demo@hust#] sed -e '1,3d' /etc/fstab

# 删除文件中以'#'开头的行,sed命令中'/'之间为正则表达式
[demo@hust#] sed -e '/^#/d' /etc/xinetd.conf

# 将一行中第一处符合模式的内容替换掉,如果要替换所有内容,则命令尾部加上参数g
[demo@hust#] sed -e 's/defaults/hello/' //etc/fstab

# 替换所有指定内容
[demo@hust#] sed -e 's/defaults/hello/g' /etc/fstab

# 已匹配字符串标记 &
[demo@hust#] echo this is an example | sed 's/\w\+/[&]/g'
[this] [is] [an] [example]

# 子串匹配标记(\1),匹配给定样式的其中一部分
# \(pattern\)用于匹配子串,第一个子串,\1;第二个子串,\2。
[demo@hust#] echo this is digit 7 in a number | sed 's/digit \([0-9]\)/\1/'
this is 7 in a number

# sed表达式通常用单引号来引用,不过也可以使用双引号。双引号会通过对表达式求值进行扩展
[demo@hust#] text=hello
[demo@hust#] echo hello world | sed "s/$text/HELLO/"
HElLO world

+

sed正则表达式
命令p用于显示模式空间的内容。默认情况下,sed把输入行打印在屏幕上,选项-n用于取消默认的打印操作。当选项-n和命令p同时出现时,sed可打印选定的内容。
选项-r用于在脚本中使用扩展的规则表达式

1
2
3
4
5
6
7
8
# 从文件file.txt中找到合适的电话号码:xxx-xxx-xxxx or (xxx) xxx-xxxx
[demo@hust#] sed -n -r '/^([0-9]{3}-|\([0-9]{3}\) )[0-9]{3}-[0-9]{4}$/ p' file.txt

# 从文件mail.txt中找到合适的邮箱地址
[demo@hust#] sed -n -r '/^[0-Z_]{3,}@(\.[0-Z]{2,})+$/ p' mail.txt

# 从文件ip.txt中找到合适的ip地址
[demo@hust#] sed -n -r '/^$/ p' ip.txt

+

2. wc

功能: 用于统计文本文件的字节数、单词数和行数。
参数: -c统计字节数, -w统计单词数, -l统计行数。

+

3. uniq

功能: uniq 用于报告或忽略文件中的重复行
参数:
-c 在行首显示该行重复出现的次数;
-d 仅输出文件中重复行的内容;
-u 仅显示不重复的行的内容;
注意:
(1)uniq仅能对有序文件进行去除重复行的操作
(2)uniq要求文件中的各个字段用空白分割开

+

4. sort

功能: 将文件进行排序,并将排序结果输出到标准输出。
参数:
-k 位置1 设置比较关键字的位置。关键字的默认位置为1
-r 反序排序
-m 合并已排序的文件,不执行排序操作
-o 将排序结构保存到输出文件中

+

5. comm

功能: 以行为单位比较两个文件,并将比较结果显示到标准输出。
参数:
-1 不显示在第一个文件中出现的内容
-2 不显示在第二个文件中出现的内容
-3 不显示同时在两个文件中都出现的内容

+

6. cut

功能: 将文本按列进行切分,也可以指定分隔每列的定界符。
参数:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
参数说明
-b <起始字节-结束字节>仅显示行中指定字节范围的内容
-c <起始字符-结束字符>仅显示行中指定范围的字符
-d <分隔符>设置字段的分隔符
-f <起始字段-结束字段>显示指定的字段内容
+
1
2
3
4
5
6
7
8
9

# 提取特定的字段或列
# cut -f FIELD_LIST filename FIELD_LIST是需要显示的列,由列号组成,逗号分隔
# 显示第2列和第3列
[demo@hust#] cut -f 2,3 filename

# --complement选项对提取的字段进行补集运算
# 显示除第3列以外的所有列
[demo@hust#] cut -f 3 --complement filename
+

7. tr

功能: 对来自标准输入的内容进行字符替换、字符删除以及重复字符压缩
参数: tr [options] set1 set2
说明: 将来自stdin的输入字符从set1映射到set2,然后将输出写入stdout(标准输出)。set1和set2是字符类或字符集。如果两个字符集的长度不相等,那么set2会不断重复其最后一个字符,直到长度与set1相同。

+
1
2
3
4
5
6
7
8
9
10
11
12
13
# 字符替换,由大写转换成小写
[demo@hust#] echo "HELLO WHO IS THIS" | tr 'A-Z' 'a-z'

# 字符删除,-d选项:删除字符
[demo@hust#] echo "HEllo 123 world 456" | tr -d '0-9'
HEllo world

# 重复字符压缩,-s选项:仅保留连续出现的字符的第一个字符,删除其余字符
[demo@hust#] echo "GNU is not UNIX. Recursive ?" | tr -s ' '
GNU is not UNIX. Recursive ?

# 字符集补集, -c选项,使用set1的补集。
[demo@hust#] tr -c [set1] [set2]
+

8. awk

(1)简介:
awk 是一个强大的文本分析工具,相对于grep的查找,awk在其对数据分析并生成报告时,显得尤为强大。awk 有3个不同版本:awk、nawk和gawk。一般指gawk,gawk是awk的GNU版本。

+

(2)使用方法:
awk '{pattern + action}' {filenames}
其中 pattern 表示 awk 在数据中查找的内容,而action是在找到匹配内容时所执行的一系列命令。

+

awk 语言的最基本功能是在文件或者字符串中基于指定规则浏览和抽取信息,awk抽取信息后,才能进行其他文本操作。完整的awk脚本通常用来格式化文本文件中的信息。
通常,awk是以文件的一行为处理单位,awk每接收文件的一行,然后执行相应的命令,来处理文本。

+

(3)调用awk
有三种方式调用awk

1
2
3
4
5
6
7
8
9
10
11
12
13
1. 命令行方式
awk [-F field-separator] 'command' input-files
其中,commands 是真正awk命令,[-F域分隔符]是可选的。 input-file(s) 是待处理的文件。
在awk中,文件的每一行中,由域分隔符分开的每一项称为一个域。
通常,在不指名-F域分隔符的情况下,默认的域分隔符是空格。

2. shell脚本方式
将所有的awk命令插入一个文件,并使awk程序可执行,然后awk命令解释器作为脚本的首行,一遍通过键入脚本名称来调用。
#!/bin/awk

3. 将所有的awk命令插入一个单独文件,然后调用
awk -f awk-script-file input-file(s)
中,-f选项加载awk-script-file中的awk脚本,input-file(s)跟上面的是一样的。

+

(4)入门实例
注意: awk中的命令需要用大括号{}括起来。

+

awk 工作流程:
[demo@hust#] last -n 5 | awk '{print $1}'
说明: 读入有换行符分割的一条记录,然后将记录按指定的域分隔符划分域、填充域。则$0表示所有域,$1表示第一个域,$n表示第n个域。 默认域分隔符是 空白键[tab]键

+

[demo@hust#] cat /etc/passwd |awk -F ':' 'BEGIN {print "name,shell"} {print $1","$7} END {print "blue,/bin/nosh"}'
说明: 先执行BEGIN,然后读取文件,读入有换行符分割的一条记录,然后将记录按指定的域分隔符划分域、填充域,$0则表示所有域,$1则表示第一个域,$n表示第n个域,随后执行模式所对应的动作action。直到所有的记录都读完,最后执行END操作。

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 显示/etc/passwd的账户
[demo@hust#] cat /etc/passwd |awk -F ':' '{print $1}'

# 显示/etc/passwd的账户和账户对应的shell,而账户与shell之间以tab键分割
[demo@hust#] cat /etc/passwd |awk -F ':' '{print $1"\t"$7}'

# 搜索/etc/passwd有root关键字的所有行
[demo@hust#] awk -F: '/root/' /etc/passwd

# 找root开头的
[demo@hust#] awk -F: '/^root/' /etc/passwd

# 搜索/etc/passwd有root关键字的所有行,并显示对应的shell
[demo@hust#] awk -F: '/root/{print $7}' /etc/passwd
+

(5)awk内置变量
awk有许多内置变量用来设置环境信息,这些变量可以被改变,下面给出了最常用的一些变量。

1
2
3
4
5
6
7
8
9
10
11
ARGC               命令行参数个数
ARGV 命令行参数排列
ENVIRON 支持队列中系统环境变量的使用
FILENAME awk浏览的文件名
FNR 浏览文件的记录数
FS 设置输入域分隔符,等价于命令行 -F选项
NF 浏览记录的域的个数
NR 已读的记录数
OFS 输出域分隔符
ORS 输出记录分隔符
RS 控制记录分隔符

+

print和printf
awk中同时提供了print和printf两种打印输出的函数。
其中print函数的参数可以是变量、数值或者字符串。字符串必须用双引号引用,参数用逗号分隔。如果没有逗号,参数就串联在一起而无法区分。这里,逗号的作用与输出文件的分隔符的作用是一样的,只是后者是空格而已。
printf函数,其用法和c语言中printf基本相似,可以格式化字符串,输出复杂时,printf更加好用,代码更易懂。

+

(6)awk 编程

+
    +
  1. 变量和赋值
    awk可以自定义变量

    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    # 统计/etc/passwd的账户人数
    # count是自定义变量,action{}可以有多个语句,以;号隔开
    awk 'BEGIN {count = 0; print "[start] user count is ", count} {count++} END {print "[end] user count is ", count}' /etc/passwd

    # 统计某个文件夹下的文件占有字节数
    ls -l | awk 'BEGIN {size = 0;} {size += $5} END {printf("[end] size is %d", size);}'

    # 以M为单位显示
    ls -l | awk 'BEGIN {size = 0;} {size = size + $5;} END {print "[end] size is ", size/1024/1024, "M"}'
    +
  2. +
  3. 条件语句
    awk中的条件语句是从C语言中借鉴来的

    +
  4. +
  5. 循环语句
    awk中的循环语句同样借鉴于C语言,支持while、do/while、for、break、continue,这些关键字的语义和C语言中的语义完全相同。

    +
  6. +
  7. 数组
    因为awk中数组的下标可以是数字和字母,数组的下标被称为关键字。

    +
  8. +
+ + +
+ + + + + + + + + + + + + + + + + +
+ + + +
+ + +
+ + +
+ + + + + + +
+ + + + + + + + + + +
+
+ +
+ +
+ + +
+ + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2016/04/index.html b/archives/2016/04/index.html index 4a2f155d..60f2a3c5 100644 --- a/archives/2016/04/index.html +++ b/archives/2016/04/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -597,11 +681,14 @@

+ + + - - + - - - + - - - + - + - + @@ -661,9 +742,8 @@

- + - @@ -672,42 +752,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -718,6 +783,7 @@

+ diff --git a/archives/2016/05/index.html b/archives/2016/05/index.html index 8c12d894..83ea8e68 100644 --- a/archives/2016/05/index.html +++ b/archives/2016/05/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -671,11 +751,14 @@

+ + + - - + - - - + - - - + - + - + @@ -735,9 +812,8 @@

- + - @@ -746,42 +822,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -792,6 +853,7 @@

+ diff --git a/archives/2016/06/index.html b/archives/2016/06/index.html index ea2d75fa..c012c8f2 100644 --- a/archives/2016/06/index.html +++ b/archives/2016/06/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -745,11 +821,14 @@

+ + + - - + - - - + - - - + - + - + @@ -809,9 +882,8 @@

- + - @@ -820,42 +892,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -866,6 +923,7 @@

+ diff --git a/archives/2016/07/index.html b/archives/2016/07/index.html index 4c66560e..0d55fbbb 100644 --- a/archives/2016/07/index.html +++ b/archives/2016/07/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -597,11 +681,14 @@

+ + + - - + - - - + - - - + - + - + @@ -661,9 +742,8 @@

- + - @@ -672,42 +752,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -718,6 +783,7 @@

+ diff --git a/archives/2016/10/index.html b/archives/2016/10/index.html index 86d0bf78..994fd772 100644 --- a/archives/2016/10/index.html +++ b/archives/2016/10/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -597,11 +681,14 @@

+ + + - - + - - - + - - - + - + - + @@ -661,9 +742,8 @@

- + - @@ -672,42 +752,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -718,6 +783,7 @@

+ diff --git a/archives/2016/11/index.html b/archives/2016/11/index.html index 830f9155..7a97bb19 100644 --- a/archives/2016/11/index.html +++ b/archives/2016/11/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -560,11 +646,14 @@

+ + + - - + - - - + - - - + - + - + @@ -624,9 +707,8 @@

- + - @@ -635,42 +717,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -681,6 +748,7 @@

+ diff --git a/archives/2016/index.html b/archives/2016/index.html index 8d1d56f3..ad42cb85 100644 --- a/archives/2016/index.html +++ b/archives/2016/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -860,11 +930,14 @@

+ + + - - + - - - + - - - + - + - + @@ -924,9 +991,8 @@

- + - @@ -935,42 +1001,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -981,6 +1032,7 @@

+ diff --git a/archives/2016/page/2/index.html b/archives/2016/page/2/index.html index c3a3e723..97a932f7 100644 --- a/archives/2016/page/2/index.html +++ b/archives/2016/page/2/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -860,11 +930,14 @@

+ + + - - + - - - + - - - + - + - + @@ -924,9 +991,8 @@

- + - @@ -935,42 +1001,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -981,6 +1032,7 @@

+ diff --git a/archives/2016/page/3/index.html b/archives/2016/page/3/index.html index 02a8a111..ad31db67 100644 --- a/archives/2016/page/3/index.html +++ b/archives/2016/page/3/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -601,11 +685,14 @@

+ + + - - + - - - + - - - + - + - + @@ -665,9 +746,8 @@

- + - @@ -676,42 +756,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -722,6 +787,7 @@

+ diff --git a/archives/2017/02/index.html b/archives/2017/02/index.html index 252b639f..9348fe92 100644 --- a/archives/2017/02/index.html +++ b/archives/2017/02/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -560,11 +646,14 @@

+ + + - - + - - - + - - - + - + - + @@ -624,9 +707,8 @@

- + - @@ -635,42 +717,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -681,6 +748,7 @@

+ diff --git a/archives/2017/03/index.html b/archives/2017/03/index.html index 31ac00ec..33febde3 100644 --- a/archives/2017/03/index.html +++ b/archives/2017/03/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -634,11 +716,14 @@

+ + + - - + - - - + - - - + - + - + @@ -698,9 +777,8 @@

- + - @@ -709,42 +787,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -755,6 +818,7 @@

+ diff --git a/archives/2017/index.html b/archives/2017/index.html index b88bc420..4244a8ad 100644 --- a/archives/2017/index.html +++ b/archives/2017/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -708,11 +786,14 @@

+ + + - - + - - - + - - - + - + - + @@ -772,9 +847,8 @@

- + - @@ -783,42 +857,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -829,6 +888,7 @@

+ diff --git a/tags/RegExp/index.html b/archives/2018/03/index.html similarity index 53% rename from tags/RegExp/index.html rename to archives/2018/03/index.html index f007a000..7928b7d9 100644 --- a/tags/RegExp/index.html +++ b/archives/2018/03/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - - 标签: RegExp | 不要说话 + + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -501,11 +611,14 @@

+ + + - - + - - - + - - - + - + - + @@ -565,9 +672,8 @@

- + - @@ -576,42 +682,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -622,6 +713,7 @@

+ diff --git "a/tags/\345\255\227\347\254\246\344\270\262\345\244\204\347\220\206/index.html" b/archives/2018/index.html similarity index 53% rename from "tags/\345\255\227\347\254\246\344\270\262\345\244\204\347\220\206/index.html" rename to archives/2018/index.html index 3a281dcc..a02f8823 100644 --- "a/tags/\345\255\227\347\254\246\344\270\262\345\244\204\347\220\206/index.html" +++ b/archives/2018/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - - 标签: 字符串处理 | 不要说话 + + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -501,11 +611,14 @@

+ + + - - + - - - + - - - + - + - + @@ -565,9 +672,8 @@

- + - @@ -576,42 +682,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -622,6 +713,7 @@

+ diff --git a/archives/index.html b/archives/index.html index d080fde9..77f16940 100644 --- a/archives/index.html +++ b/archives/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -865,11 +940,14 @@

+ + + - - + - - - + - - - + - + - + @@ -929,9 +1001,8 @@

- + - @@ -940,42 +1011,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -986,6 +1042,7 @@

+ diff --git a/archives/page/2/index.html b/archives/page/2/index.html index efb1c2e8..9c03051b 100644 --- a/archives/page/2/index.html +++ b/archives/page/2/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -860,11 +930,14 @@

+ + + - - + - - - + - - - + - + - + @@ -924,9 +991,8 @@

- + - @@ -935,42 +1001,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -981,6 +1032,7 @@

+ diff --git a/archives/page/3/index.html b/archives/page/3/index.html index 935cc13b..088d4b3a 100644 --- a/archives/page/3/index.html +++ b/archives/page/3/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 归档 | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -823,11 +930,14 @@

+ + + - - + - - - + - - - + - + - + @@ -887,9 +991,8 @@

- + - @@ -898,42 +1001,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -944,6 +1032,7 @@

+ diff --git a/categories/Linux/index.html b/categories/Linux/index.html index ad037178..43b02a64 100644 --- a/categories/Linux/index.html +++ b/categories/Linux/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 分类: Linux | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -726,11 +824,14 @@

+ + + - - + - - - + - - - + - + - + @@ -790,9 +885,8 @@

- + - @@ -801,42 +895,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -847,6 +926,7 @@

+ diff --git a/categories/Mobile-Security/index.html b/categories/Mobile-Security/index.html index 6a20fafd..43da3ad4 100644 --- a/categories/Mobile-Security/index.html +++ b/categories/Mobile-Security/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 分类: Mobile Security | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -614,11 +694,14 @@

+ + + - - + - - - + - - - + - + - + @@ -678,9 +755,8 @@

- + - @@ -689,42 +765,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -735,6 +796,7 @@

+ diff --git a/categories/Programming/index.html b/categories/Programming/index.html index ab9a90ec..844e0f5d 100644 --- a/categories/Programming/index.html +++ b/categories/Programming/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 分类: Programming | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -614,11 +694,14 @@

+ + + - - + - - - + - - - + - + - + @@ -678,9 +755,8 @@

- + - @@ -689,42 +765,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -735,6 +796,7 @@

+ diff --git a/categories/Security/index.html b/categories/Security/index.html index 5265892c..d1a31f49 100644 --- a/categories/Security/index.html +++ b/categories/Security/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 分类: Security | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -754,11 +824,14 @@

+ + + - - + - - - + - - - + - + - + @@ -818,9 +885,8 @@

- + - @@ -829,42 +895,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -875,6 +926,7 @@

+ diff --git a/categories/index.html b/categories/index.html index a1b37601..5a2b850e 100644 --- a/categories/index.html +++ b/categories/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + categories | 不要说话 @@ -134,7 +130,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -523,11 +615,14 @@

categories

+ + + - - + - - - + - - - + - + - + @@ -587,57 +676,43 @@

categories

- + - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -648,6 +723,7 @@

categories

+ diff --git a/css/main.css b/css/main.css index 86b1bb6e..50dc2a4c 100644 --- a/css/main.css +++ b/css/main.css @@ -189,7 +189,7 @@ body { font-size: 14px; line-height: 2; color: #555; - background: #f5f7f9; + background: #fff; } @media (max-width: 767px) { body { @@ -201,7 +201,7 @@ body { padding-right: 0 !important; } } -@media (min-width: 1600px) { +@media (min-width: 1200px) { body { font-size: 16px; } @@ -227,70 +227,113 @@ h6 { margin: 20px 0 15px; } h1 { - font-size: 22px; + font-size: 24px; +} +h1 code { + font-size: 24px; } @media (max-width: 767px) { h1 { - font-size: 18px; + font-size: 20px; + } + h1 code { + font-size: 20px; } } h2 { - font-size: 20px; + font-size: 22px; +} +h2 code { + font-size: 22px; } @media (max-width: 767px) { h2 { - font-size: 16px; + font-size: 18px; + } + h2 code { + font-size: 18px; } } h3 { - font-size: 18px; + font-size: 20px; +} +h3 code { + font-size: 20px; } @media (max-width: 767px) { h3 { - font-size: 14px; + font-size: 16px; + } + h3 code { + font-size: 16px; } } h4 { - font-size: 16px; + font-size: 18px; +} +h4 code { + font-size: 18px; } @media (max-width: 767px) { h4 { - font-size: 12px; + font-size: 14px; + } + h4 code { + font-size: 14px; } } h5 { - font-size: 14px; + font-size: 16px; +} +h5 code { + font-size: 16px; } @media (max-width: 767px) { h5 { - font-size: 10px; + font-size: 12px; + } + h5 code { + font-size: 12px; } } h6 { - font-size: 12px; + font-size: 14px; +} +h6 code { + font-size: 14px; } @media (max-width: 767px) { h6 { - font-size: 8px; + font-size: 10px; + } + h6 code { + font-size: 10px; } } p { margin: 0 0 20px 0; } -a { +a, +span.exturl { + overflow-wrap: break-word; + word-wrap: break-word; + background-color: transparent; color: #555; text-decoration: none; outline: none; border-bottom: 1px solid #999; - word-wrap: break-word; + cursor: pointer; } -a:hover { +a:hover, +span.exturl:hover { color: #222; border-bottom-color: #222; } -blockquote { - margin: 0; - padding: 0; +video { + max-width: 100%; + display: block; + margin-left: auto; + margin-right: auto; } img { display: block; @@ -306,6 +349,7 @@ hr { background-image: repeating-linear-gradient(-45deg, #fff, #fff 4px, transparent 4px, transparent 8px); } blockquote { + margin: 0; padding: 0 15px; color: #666; border-left: 4px solid #ddd; @@ -399,15 +443,16 @@ kbd { .use-motion .motion-element { opacity: 0; } -table { +.table-container { margin: 20px 0; + overflow: auto; + -webkit-overflow-scrolling: touch; +} +table { width: 100%; border-collapse: collapse; border-spacing: 0; - border: 1px solid #ddd; font-size: 14px; - table-layout: fixed; - word-wrap: break-all; } table>tbody>tr:nth-of-type(odd) { background-color: #f9f9f9; @@ -425,8 +470,8 @@ td { } th, td { + border: 1px solid #ddd; border-bottom: 3px solid #ddd; - border-right: 1px solid #eee; } th { padding-bottom: 10px; @@ -441,42 +486,49 @@ body { } .container { position: relative; - min-height: 100%; } .header-inner { margin: 0 auto; padding: 100px 0 70px; width: 700px; } +@media (min-width: 1200px) { + .container .header-inner { + width: 800px; + } +} @media (min-width: 1600px) { .container .header-inner { width: 900px; } } -.main { - padding-bottom: 150px; -} .main-inner { margin: 0 auto; width: 700px; } +@media (min-width: 1200px) { + .container .main-inner { + width: 800px; + } +} @media (min-width: 1600px) { .container .main-inner { width: 900px; } } .footer { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - min-height: 50px; + padding: 20px 0; } .footer-inner { box-sizing: border-box; - margin: 20px auto; + margin: 0px auto; width: 700px; } +@media (min-width: 1200px) { + .container .footer-inner { + width: 800px; + } +} @media (min-width: 1600px) { .container .footer-inner { width: 900px; @@ -497,8 +549,9 @@ code { font-family: consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace; } code { - padding: 2px 4px; + overflow-wrap: break-word; word-wrap: break-word; + padding: 2px 4px; color: #555; background: #eee; border-radius: 3px; @@ -535,6 +588,10 @@ pre code { color: #4d4d4c; line-height: 1em; margin-bottom: 1em; + margin: 0em; + padding: 0.5em; + background: #eee; + border-bottom: 1px solid #e9e9e9; } .highlight figcaption:before, .highlight figcaption:after { @@ -594,6 +651,7 @@ pre .comment { pre .variable, pre .attribute, pre .tag, +pre .name, pre .regexp, pre .ruby .constant, pre .xml .tag .title, @@ -608,6 +666,7 @@ pre .css .pseudo { pre .number, pre .preprocessor, pre .built_in, +pre .builtin-name, pre .literal, pre .params, pre .constant, @@ -617,13 +676,13 @@ pre .command { 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 .number, pre .formula { color: #718c00; } @@ -645,11 +704,8 @@ pre .keyword, pre .javascript .function { color: #8959a8; } -.full-image.full-image.full-image.full-image { +.posts-expand .post-body img.full-image { border: none; - max-width: 100%; - width: auto; - margin: 20px auto 25px; } .blockquote-center, .page-home .post-type-quote blockquote, @@ -735,6 +791,29 @@ pre .javascript .function { max-width: 150px; max-height: 150px; } +.post-body .label { + display: inline; + padding: 0 2px; + white-space: nowrap; +} +.post-body .label.default { + background-color: #f0f0f0; +} +.post-body .label.primary { + background-color: #efe6f7; +} +.post-body .label.info { + background-color: #e5f2f8; +} +.post-body .label.success { + background-color: #e7f4e9; +} +.post-body .label.warning { + background-color: #fcf6e1; +} +.post-body .label.danger { + background-color: #fae8eb; +} .post-body .note { position: relative; padding: 15px; @@ -829,29 +908,6 @@ pre .javascript .function { .post-body .note.danger h6 { color: #d9534f; } -.post-body .label { - display: inline; - padding: 0 2px; - white-space: nowrap; -} -.post-body .label.default { - background-color: #f0f0f0; -} -.post-body .label.primary { - background-color: #efe6f7; -} -.post-body .label.info { - background-color: #e5f2f8; -} -.post-body .label.success { - background-color: #e7f4e9; -} -.post-body .label.warning { - background-color: #fcf6e1; -} -.post-body .label.danger { - background-color: #fae8eb; -} .post-body .tabs { position: relative; display: block; @@ -935,10 +991,10 @@ pre .javascript .function { padding: 0 20px; font-size: 14px; color: #555; - background: #fff; - border: 2px solid #555; + background: transparent; + border: 2px solid #222; text-decoration: none; - border-radius: 2px; + border-radius: 0; transition-property: background-color; transition-duration: 0.2s; transition-timing-function: ease-in-out; @@ -947,8 +1003,8 @@ pre .javascript .function { } .btn:hover { border-color: #222; - color: #fff; - background: #222; + color: #222; + background: #fff; } .btn +.btn { margin: 0 0 8px 8px; @@ -1050,6 +1106,9 @@ pre .javascript .function { display: inline-block; margin: 10px; } +.tag-cloud a:hover { + color: #222 !important; +} .back-to-top { box-sizing: border-box; position: fixed; @@ -1060,7 +1119,7 @@ pre .javascript .function { width: 24px; background: #222; font-size: 12px; - opacity: 0.6; + opacity: 1; color: #fff; cursor: pointer; text-align: center; @@ -1081,7 +1140,7 @@ pre .javascript .function { } } .back-to-top.back-to-top-on { - bottom: 30px; + bottom: 19px; } .header { background: transparent; @@ -1095,7 +1154,7 @@ pre .javascript .function { } .site-meta { margin: 0; - text-align: center; + text-align: left; } @media (max-width: 767px) { .site-meta { @@ -1106,12 +1165,12 @@ pre .javascript .function { position: relative; display: inline-block; padding: 0 40px; - color: #fff; + color: #222; background: #222; border-bottom: none; } .brand:hover { - color: #fff; + color: #222; } .logo { display: inline-block; @@ -1130,14 +1189,15 @@ pre .javascript .function { .site-subtitle { margin-top: 10px; font-size: 13px; - color: #ddd; + color: #999; } .use-motion .brand { opacity: 0; } .use-motion .logo, .use-motion .site-title, -.use-motion .site-subtitle { +.use-motion .site-subtitle, +.use-motion .custom-logo-image { opacity: 0; position: relative; top: -10px; @@ -1193,7 +1253,8 @@ pre .javascript .function { margin-top: 10px; } } -.menu .menu-item a { +.menu .menu-item a, +.menu .menu-item span.exturl { display: block; font-size: 13px; line-height: inherit; @@ -1204,7 +1265,7 @@ pre .javascript .function { transition-delay: 0s; } .menu .menu-item a:hover, -.menu-item-active a { +.menu .menu-item span.exturl:hover { border-bottom-color: #222; } .menu .menu-item .fa { @@ -1214,12 +1275,13 @@ pre .javascript .function { opacity: 0; } .post-body { + overflow-wrap: break-word; + word-wrap: break-word; font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; } -@media (max-width: 767px) { - .post-body { - word-break: break-word; - } +.post-body .exturl .fa { + font-size: 14px; + margin-left: 4px; } .post-body .fancybox img { display: block !important; @@ -1317,18 +1379,15 @@ pre .javascript .function { .posts-expand .post-body h6:hover .header-anchor { visibility: visible; } -.posts-expand .post-body ul li { +.posts-expand .post-body ul > li { list-style: circle; } .posts-expand .post-body img { box-sizing: border-box; - margin: auto; + margin: 0 auto 25px; padding: 3px; border: 1px solid #ddd; } -.posts-expand .post-body .fancybox img { - margin: 0 auto 25px; -} @media (max-width: 767px) { .posts-collapse { margin: 0 20px; @@ -1343,7 +1402,7 @@ pre .javascript .function { .posts-collapse { position: relative; z-index: 1010; - margin-left: 55px; + margin-left: 0; } .posts-collapse::after { content: " "; @@ -1437,7 +1496,8 @@ pre .javascript .function { margin-left: 3px; opacity: 0.6; } -.posts-collapse .post-title a { +.posts-collapse .post-title a, +.posts-collapse .post-title span.exturl { color: #666; border-bottom: none; } @@ -1448,8 +1508,9 @@ pre .javascript .function { display: none; } .posts-expand .post-title { + overflow-wrap: break-word; + word-wrap: break-word; text-align: center; - word-break: break-word; font-weight: 400; } .posts-expand .post-title-link { @@ -1487,7 +1548,8 @@ pre .javascript .function { transform: scaleX(1); } .posts-expand .post-title-link .fa { - font-size: 16px; + font-size: 20px; + margin-left: 5px; } .posts-expand .post-meta { margin: 3px 0 60px 0; @@ -1508,6 +1570,10 @@ pre .javascript .function { font-size: 14px; margin-top: 2px; } +.posts-expand .post-meta time { + border-bottom: 1px dashed #999; + cursor: help; +} .post-meta-divider { margin: 0 0.5em; } @@ -1534,11 +1600,6 @@ pre .javascript .function { display: none; } } -@media (max-width: 767px) { - .posts-expand .post-comments-count { - display: none; - } -} .post-button { margin-top: 40px; } @@ -1583,23 +1644,20 @@ pre .javascript .function { top: 2px; } .post-nav-item .fa { - position: absolute; - top: 8px; - left: 0; font-size: 12px; + margin-right: 5px; } .post-nav-next a { - padding-left: 15px; + padding-left: 5px; } .post-nav-prev { text-align: right; } .post-nav-prev a { - padding-right: 15px; + padding-right: 5px; } .post-nav-prev .fa { - right: 0; - left: auto; + margin-left: 5px; } .posts-expand .post-eof { display: block; @@ -1696,6 +1754,20 @@ pre .javascript .function { overflow-y: auto; overflow-x: hidden; } +.cc-license { + margin-top: 10px; + text-align: center; +} +.cc-license .cc-opacity { + opacity: 0.7; + border-bottom: none; +} +.cc-license .cc-opacity:hover { + opacity: 0.9; +} +.cc-license img { + display: inline-block; +} .sidebar-toggle { position: fixed; right: 30px; @@ -1735,20 +1807,21 @@ pre .javascript .function { display: block; margin: 0 auto; padding: 2px; - max-width: 120px; + max-width: 96px; height: auto; - border: 1px solid #eee; + border: 2px solid #333; + opacity: 1; } .site-author-name { - margin: 0; + margin: 5px 0 0; text-align: center; - color: #222; - font-weight: 600; + color: #f5f5f5; + font-weight: normal; } .site-description { - margin-top: 0; + margin-top: 5px; text-align: center; - font-size: 13px; + font-size: 14px; color: #999; } .site-state { @@ -1756,11 +1829,12 @@ pre .javascript .function { line-height: 1.4; white-space: nowrap; text-align: center; + margin-top: 10px; } .site-state-item { display: inline-block; padding: 0 15px; - border-left: 1px solid #eee; + border-left: 1px solid #333; } .site-state-item:first-child { border-left: none; @@ -1773,14 +1847,14 @@ pre .javascript .function { text-align: center; color: inherit; font-weight: 600; - font-size: 16px; + font-size: 18px; } .site-state-item-name { font-size: 13px; - color: #999; + color: inherit; } .feed-link { - margin-top: 20px; + margin-top: 10px; } .feed-link a { display: inline-block; @@ -1821,7 +1895,7 @@ pre .javascript .function { width: 4px; height: 4px; border-radius: 50%; - background: #b85411; + background: #c1ff0f; } .links-of-blogroll { font-size: 13px; @@ -1839,7 +1913,8 @@ pre .javascript .function { .links-of-blogroll-item { padding: 2px 10px; } -.links-of-blogroll-item a { +.links-of-blogroll-item a, +.links-of-blogroll-item span.exturl { max-width: 280px; box-sizing: border-box; display: inline-block; @@ -1859,7 +1934,7 @@ pre .javascript .function { color: #555; } .sidebar-nav li:hover { - color: #fc6423; + color: #f5f5f5; } .page-post-detail .sidebar-nav-toc { padding: 0 5px; @@ -1868,11 +1943,11 @@ pre .javascript .function { margin-left: 10px; } .sidebar-nav .sidebar-nav-active { - color: #fc6423; - border-bottom-color: #fc6423; + color: #87daff; + border-bottom-color: #87daff; } .sidebar-nav .sidebar-nav-active:hover { - color: #fc6423; + color: #87daff; } .sidebar-panel { display: none; @@ -1905,12 +1980,12 @@ pre .javascript .function { transition-timing-function: ease-in-out; transition-delay: 0s; transition-property: all; - color: #666; - border-bottom-color: #ccc; + color: #999; + border-bottom-color: #555; } .post-toc ol a:hover { - color: #000; - border-bottom-color: #000; + color: #ccc; + border-bottom-color: #ccc; } .post-toc .nav-item { overflow: hidden; @@ -1931,14 +2006,14 @@ pre .javascript .function { display: block; } .post-toc .nav .active > a { - color: #fc6423; - border-bottom-color: #fc6423; + color: #87daff; + border-bottom-color: #87daff; } .post-toc .nav .active-current > a { - color: #fc6423; + color: #87daff; } .post-toc .nav .active-current > a:hover { - color: #fc6423; + color: #87daff; } .footer { font-size: 14px; @@ -1953,50 +2028,131 @@ pre .javascript .function { .with-love { display: inline-block; margin: 0 5px; + color: #808080; } .powered-by, .theme-info { display: inline-block; } -.cc-license { - margin-top: 10px; - text-align: center; -} -.cc-license .cc-opacity { - opacity: 0.7; - border-bottom: none; -} -.cc-license .cc-opacity:hover { - opacity: 0.9; -} -.cc-license img { - display: inline-block; -} -.post-spread { - margin-top: 20px; - text-align: center; +@-moz-keyframes iconAnimate { + 0%, 100% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } + 10%, 30% { + -webkit-transform: scale(0.9); + -moz-transform: scale(0.9); + -ms-transform: scale(0.9); + -o-transform: scale(0.9); + transform: scale(0.9); + } + 20%, 40%, 60%, 80% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + 50%, 70% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } } -.jiathis_style { - display: inline-block; -} -.jiathis_style a { - border: none; -} -.fa { - font-family: FontAwesome !important; -} -.post-spread { - margin-top: 20px; - text-align: center; -} -.bdshare-slide-button-box a { - border: none; +@-webkit-keyframes iconAnimate { + 0%, 100% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } + 10%, 30% { + -webkit-transform: scale(0.9); + -moz-transform: scale(0.9); + -ms-transform: scale(0.9); + -o-transform: scale(0.9); + transform: scale(0.9); + } + 20%, 40%, 60%, 80% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + 50%, 70% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } } -.bdsharebuttonbox { - display: inline-block; +@-o-keyframes iconAnimate { + 0%, 100% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } + 10%, 30% { + -webkit-transform: scale(0.9); + -moz-transform: scale(0.9); + -ms-transform: scale(0.9); + -o-transform: scale(0.9); + transform: scale(0.9); + } + 20%, 40%, 60%, 80% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + 50%, 70% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } } -.bdsharebuttonbox a { - border: none; +@keyframes iconAnimate { + 0%, 100% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } + 10%, 30% { + -webkit-transform: scale(0.9); + -moz-transform: scale(0.9); + -ms-transform: scale(0.9); + -o-transform: scale(0.9); + transform: scale(0.9); + } + 20%, 40%, 60%, 80% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + 50%, 70% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } } .local-search-pop-overlay { position: fixed; @@ -2109,26 +2265,6 @@ pre .javascript .function { transform: translate(-50%, -50%); color: #ccc; } -@media (min-width: 768px) and (max-width: 991px) { - .busuanzi-count { - width: auto; - } -} -@media (max-width: 767px) { - .busuanzi-count { - width: auto; - } -} -.site-uv, -.site-pv, -.page-pv { - display: inline-block; -} -.site-uv .busuanzi-value, -.site-pv .busuanzi-value, -.page-pv .busuanzi-value { - margin: 0 5px; -} .page-archive .archive-page-counter { position: relative; top: 3px; @@ -2151,6 +2287,10 @@ pre .javascript .function { border: 1px solid #fff; border-radius: 50%; } +.page-archive .fa-external-link { + font-size: 15px; + margin-left: 5px; +} .category-all-page .category-all-title { text-align: center; } @@ -2247,9 +2387,10 @@ pre .javascript .function { } #schedule ul#event-list li.event-past { background: #fcfcfc; + padding: 15px 0 15px 10px; } #schedule ul#event-list li.event-past > * { - opacity: 0.6; + opacity: 0.9; } #schedule ul#event-list li.event-past h2.event-summary { color: #bbb; @@ -2274,6 +2415,23 @@ pre .javascript .function { #schedule ul#event-list li.event-now * { color: #fff !important; } +#schedule ul#event-list li.event-future { + background: #222; + color: #fff; + padding: 15px 0 15px 10px; +} +#schedule ul#event-list li.event-future h2.event-summary:before { + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -ms-transform: scale(1.2); + -o-transform: scale(1.2); + transform: scale(1.2); + color: #fff; + animation: dot-flash 1s alternate infinite ease-in-out; +} +#schedule ul#event-list li.event-future * { + color: #fff !important; +} @-moz-keyframes dot-flash { from { opacity: 1; @@ -2347,7 +2505,7 @@ pre .javascript .function { } } .page-post-detail .sidebar-toggle-line { - background: #fc6423; + background: #87daff; } .page-post-detail .comments { overflow: hidden; @@ -2370,424 +2528,338 @@ ul.breadcrumb li+li:before { ul.breadcrumb li+li:last-child { font-weight: bold; } -.header { - position: relative; - margin: 0 auto; - width: 960px; -} -@media (min-width: 768px) and (max-width: 991px) { - .header { - width: auto; - } -} -@media (max-width: 767px) { - .header { - width: auto; - } +a { + border-bottom-color: #ccc; } -.header-inner { - position: absolute; - top: 0; - overflow: hidden; - padding: 0; - width: 240px; - background: #fff; - box-shadow: initial; - border-radius: initial; +hr { + margin: 20px 0; + height: 2px; } -@media (min-width: 1600px) { - .container .header-inner { - width: 240px; - } +.main-inner { + margin-top: 80px; } -@media (min-width: 768px) and (max-width: 991px) { - .header-inner { - position: relative; - width: auto; - border-radius: initial; - } +.header { + background: #f5f5f5; } -@media (max-width: 767px) { - .header-inner { - position: relative; - width: auto; - border-radius: initial; - } +.header-inner { + padding: 25px 0 20px; } -.main:before, -.main:after { +.header-inner:before, +.header-inner:after { content: " "; display: table; } -.main:after { +.header-inner:after { clear: both; } -@media (min-width: 768px) and (max-width: 991px) { - .main { - padding-bottom: 100px; - } -} -@media (max-width: 767px) { - .main { - padding-bottom: 100px; - } -} -.container .main-inner { - width: 960px; -} -@media (min-width: 768px) and (max-width: 991px) { - .container .main-inner { - width: auto; - } -} @media (max-width: 767px) { - .container .main-inner { + .header-inner { width: auto; + margin-bottom: 50px; + padding: 10px; } } -.content-wrap { - float: right; - box-sizing: border-box; - padding: 40px; - width: 700px; - background: #fff; - min-height: 700px; - box-shadow: initial; - border-radius: initial; -} -@media (min-width: 768px) and (max-width: 991px) { - .content-wrap { - width: 100%; - padding: 20px; - border-radius: initial; - } +.site-meta { + float: left; + margin-left: -20px; + line-height: normal; } @media (max-width: 767px) { - .content-wrap { - width: 100%; - padding: 20px; - min-height: auto; - border-radius: initial; + .site-meta { + margin-left: 10px; } } -.sidebar { - position: static; - float: left; - margin-top: 300px; - width: 240px; - background: #f5f7f9; - box-shadow: none; -} -@media (min-width: 768px) and (max-width: 991px) { - .sidebar { - display: none; - } +.site-meta .brand { + padding: 2px 1px; + background: none; } @media (max-width: 767px) { - .sidebar { - display: none; + .site-meta .brand { + display: block; } } -.sidebar-toggle { +.site-meta .logo { display: none; } -.footer-inner { - width: 960px; - padding-left: 260px; -} -@media (min-width: 768px) and (max-width: 991px) { - .footer-inner { - width: auto; - padding-left: 0 !important; - padding-right: 0 !important; - } +.site-meta .site-title { + font-size: 22px; + font-weight: bolder; } @media (max-width: 767px) { - .footer-inner { - width: auto; - padding-left: 0 !important; - padding-right: 0 !important; + .site-meta .site-title { + line-height: 34px; } } -.sidebar-position-right .header-inner { - right: 0; -} -.sidebar-position-right .content-wrap { - float: left; -} -.sidebar-position-right .sidebar { - float: right; +.logo-line-before, +.logo-line-after { + display: block; + overflow: hidden; + margin: 0 auto; + width: 75%; } -.sidebar-position-right .footer-inner { - padding-left: 0; - padding-right: 260px; +@media (max-width: 767px) { + .logo-line-before, + .logo-line-after { + display: none; + } } -.site-brand-wrapper { +.logo-line-before i, +.logo-line-after i { position: relative; -} -.site-meta { - padding: 20px 0; - color: #fff; + display: block; + height: 2px; background: #222; } -@media (min-width: 768px) and (max-width: 991px) { - .site-meta { - box-shadow: 0 0 16px rgba(0,0,0,0.5); - } -} @media (max-width: 767px) { - .site-meta { - box-shadow: 0 0 16px rgba(0,0,0,0.5); + .logo-line-before i, + .logo-line-after i { + height: 3px; } } -.brand { - padding: 0; - background: none; +.use-motion .logo-line-before i { + left: -100%; } -.brand:hover { - color: #fff; +.use-motion .logo-line-after i { + right: -100%; } .site-subtitle { - margin: 10px 10px 0; - font-weight: initial; -} -.site-search form { display: none; } -.site-nav { - border-top: none; +.site-nav-toggle { + position: static; + float: right; +} +.menu-item-active a, +.menu .menu-item a:hover, +.menu .menu-item span.exturl:hover { + background: #e1e1e1; } -@media (min-width: 768px) and (max-width: 991px) { - .site-nav { - display: none !important; - } +.menu { + margin: 8px 0 0 0; } -@media (min-width: 768px) and (max-width: 991px) { - .site-nav-on { - display: block !important; +@media (max-width: 767px) { + .menu { + margin: 20px 0 0 0; + padding: 0; } } +.menu br { + display: none; +} .menu .menu-item { - display: block; margin: 0; } -.menu .menu-item a { - position: relative; - box-sizing: border-box; - padding: 5px 20px; - text-align: left; - line-height: inherit; - transition-property: background-color; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; - transition-delay: 0s; -} -.menu .menu-item a:hover, -.menu-item-active a { - background: #f9f9f9; - border-bottom-color: #fff; +@media (max-width: 767px) { + .menu .menu-item { + display: block; + } } .menu .menu-item .badge { display: inline-block; - padding: 2px 5px; + padding: 1px 4px; + margin-left: 5px; font-weight: 700; line-height: 1; - color: #fff; + color: #555; text-align: center; white-space: nowrap; - vertical-align: middle; - background-color: #ccc; + background-color: #fff; border-radius: 10px; - float: right; - margin: 0.35em 0 0 0; text-shadow: 1px 1px 0px rgba(0,0,0,0.1); } -.menu .menu-item br { - display: none; +@media (max-width: 767px) { + .menu .menu-item .badge { + float: right; + margin: 0.35em 0 0 0; + } } -.menu-item-active a:after { - content: " "; - position: absolute; - top: 50%; - margin-top: -3px; - right: 15px; - width: 6px; - height: 6px; - border-radius: 50%; - background-color: #bbb; +.menu .menu-item a, +.menu .menu-item span.exturl { + padding: 0 10px; + border: none; + border-radius: 2px; + transition-property: background; } -.btn-bar { - background-color: #fff; +@media (max-width: 767px) { + .menu .menu-item a, + .menu .menu-item span.exturl { + text-align: left; + } } -.site-nav-toggle { - left: 20px; - top: 50%; - -webkit-transform: translateY(-50%); - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -ms-transform: translateY(-50%); - -o-transform: translateY(-50%); - transform: translateY(-50%); +@media (hover: none) { + .menu .menu-item a:hover, + .menu .menu-item span.exturl:hover { + background: none; + } } -@media (min-width: 768px) and (max-width: 991px) { - .site-nav-toggle { +.menu a::before { + display: none; +} +@media (max-width: 767px) { + .menu a::before { display: block; } } -.use-motion .sidebar .motion-element { - opacity: 1; +@media (max-width: 767px) { + .menu { + float: none; + } } -.sidebar { - margin-left: -100%; - right: auto; - bottom: auto; - -webkit-transform: none; +.site-search form { + display: none; } -.sidebar-inner { - box-sizing: border-box; - width: 240px; - color: #555; - background: #fff; - box-shadow: initial; - border-radius: initial; - opacity: 0; +.posts-expand { + padding-top: 0; } -.sidebar-inner.affix { - position: fixed; - top: 12px; +.posts-expand .post-title, +.posts-expand .post-meta { + text-align: left; } -.sidebar-inner.affix-bottom { - position: absolute; +@media (max-width: 767px) { + .posts-expand .post-title, + .posts-expand .post-meta { + text-align: center; + } } -.site-overview { - text-align: left; +.posts-expand .post-eof { + display: none; } -.site-author:before, -.site-author:after { - content: " "; - display: table; +.posts-expand .post { + margin-top: 120px; } -.site-author:after { - clear: both; +.posts-expand .post:first-child { + margin-top: 0; } -.sidebar a, -.sidebar .exturl { - color: #555; +.posts-expand .post-meta { + margin-top: 5px; + margin-bottom: 20px; } -.sidebar a:hover, -.sidebar .exturl:hover { - color: #222; +.posts-expand .post-title { + position: relative; + font-size: 26px; + font-weight: 400; } -.site-state-item { - padding: 0 10px; +@media (max-width: 767px) { + .posts-expand .post-title { + font-size: 22px; + } } -.links-of-author-item a:before, -.links-of-author-item .exturl:before { - display: none; +@media (min-width: 1200px) { + .posts-expand .post-title { + font-size: 26px; + } +} +.posts-expand .post-title:hover:before { + background: #222; } -.links-of-author-item a, -.links-of-author-item .exturl { +@media (max-width: 767px) { + .posts-expand .post-body { + font-size: 14px; + } +} +.posts-expand .post-body img { + margin: 0; +} +.posts-expand .post-tags { + text-align: left; +} +.posts-expand .post-tags a { + padding: 1px 5px; + background: #f5f5f5; border-bottom: none; - text-decoration: underline; } -.feed-link { - border-top: 1px dotted #ccc; - border-bottom: 1px dotted #ccc; - text-align: center; +.posts-expand .post-tags a:hover { + background: #ccc; } -.feed-link a { - display: block; - color: #fc6423; - border: none; +.posts-expand .post-nav { + margin-top: 40px; } -.feed-link a:hover { - background: none; - color: #e34603; +.post-button { + margin-top: 20px; + text-align: left; } -.feed-link a:hover i { - color: #e34603; +.post-button a { + padding: 0; + font-size: 14px; + background: none; + border: none; + border-bottom: 2px solid #666; + transition-property: border; } -.links-of-author { - display: flex; - flex-wrap: wrap; - justify-content: center; +@media (max-width: 767px) { + .post-button a { + font-size: 12px; + } } -.links-of-author .exturl { - font-size: 13px; +@media (min-width: 1200px) { + .post-button a { + font-size: 16px; + } } -.links-of-author-item { - margin: 5px 0 0; - width: 50%; +.post-button a:hover { + border-bottom-color: #222; } -.links-of-author-item a, -.links-of-author-item .exturl { - max-width: 216px; - box-sizing: border-box; +.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; - margin-right: 0; - margin-bottom: 0; - padding: 0 5px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; } -.links-of-author-item a, -.links-of-author-item .exturl { - display: block; - text-decoration: none; +.btn { + padding: 0 10px; + border-width: 2px; + border-radius: 0; } -.links-of-author-item a:hover, -.links-of-author-item .exturl:hover { - border-radius: 4px; - background: #eee; +.headband { + display: none; } -.links-of-author-item .fa { - margin-right: 2px; - font-size: 16px; +.site-search { + position: relative; + float: right; + margin-top: 5px; + padding-top: 3px; } -.links-of-author-item .fa-globe { - font-size: 15px; +@media (max-width: 767px) { + .site-search { + float: none; + padding: 0 10px; + } } -.links-of-blogroll { +@media (max-width: 767px) { + .container .main-inner { + width: auto; + } +} +.page-post-detail .post-title, +.page-post-detail .post-meta { text-align: center; - margin-top: 20px; - padding: 3px 0 0; - border-top: 1px dotted #ccc; } -.links-of-blogroll-title { - margin-top: 0; +.page-post-detail .post-title:before { + display: none; } -.links-of-blogroll-item { - padding: 0; +.page-post-detail .post-meta { + margin-bottom: 60px; } -.links-of-blogroll-inline:before, -.links-of-blogroll-inline:after { - content: " "; - display: table; +.pagination { + margin: 120px 0 0; + text-align: left; } -.links-of-blogroll-inline:after { - clear: both; +@media (max-width: 767px) { + .pagination { + margin: 80px 10px 0; + text-align: center; + } } -.links-of-blogroll-inline .links-of-blogroll-item { - margin: 5px 0 0; - width: 50%; - display: inline-block; - width: unset; +.footer { + margin-top: 80px; + padding: 10px 0; + background: #f5f5f5; + color: #666; } -.links-of-blogroll-inline .links-of-blogroll-item a, -.links-of-blogroll-inline .links-of-blogroll-item .exturl { - 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; +.footer-inner { + margin: 0 auto; + text-align: left; } @media (max-width: 767px) { - .post-body { - text-align: justify; + .footer-inner { + width: auto; + text-align: center; } } diff --git a/index.html b/index.html index 0270d5dc..c3bb1c93 100644 --- a/index.html +++ b/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -2043,11 +2567,14 @@

- - + - - - + - - - + - + - + @@ -2107,9 +2628,8 @@

+ - @@ -2118,42 +2638,27 @@

- + - - - - - - - - - - - - + - - + - - - + @@ -2164,6 +2669,7 @@

= scrollHeight - offsetBottom)) return 'bottom' + if (offsetTop != null && scrollTop <= offsetTop) return 'top'; + if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'; - return false - } + 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.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.checkPositionWithEventLoop = function() { + setTimeout($.proxy(this.checkPosition, this), 1); + }; - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return + 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()) + 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) + /* eslint-disable */ + 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); + /* eslint-enable */ - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) + var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom); - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') + if (this.affixed !== affix) { + if (this.unpin != null) this.$element.css('top', ''); - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') + var affixType = 'affix' + (affix ? '-' + affix : ''); + var e = new $.Event(affixType + '.bs.affix'); - this.$element.trigger(e) + this.$element.trigger(e); - if (e.isDefaultPrevented()) return + if (e.isDefaultPrevented()) return; - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + this.affixed = affix; + this.unpin = affix === 'bottom' ? this.getPinnedOffset() : null; this.$element .removeClass(Affix.RESET) .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') + .trigger(affixType.replace('affix', 'affixed') + '.bs.affix'); } - if (affix == 'bottom') { + 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]() - }) + 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 + var old = $.fn.affix; + $.fn.affix = Plugin; + $.fn.affix.Constructor = Affix; // AFFIX NO CONFLICT // ================= - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - + $.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() + $(window).on('load', function() { + $('[data-spy="affix"]').each(function() { + var $spy = $(this); + var data = $spy.data(); - data.offset = data.offset || {} + data.offset = data.offset || {}; - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop + /* eslint-disable */ + if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom; + if (data.offsetTop != null) data.offset.top = data.offsetTop; + /* eslint-enable */ - Plugin.call($spy, data) - }) - }) + Plugin.call($spy, data); + }); + }); -}(jQuery); +}(jQuery)); diff --git a/js/src/algolia-search.js b/js/src/algolia-search.js index 9787e2ac..06decd8c 100644 --- a/js/src/algolia-search.js +++ b/js/src/algolia-search.js @@ -1,11 +1,10 @@ -/* global instantsearch: true */ -/*jshint camelcase: false */ +/* global instantsearch, CONFIG */ -$(document).ready(function () { +$(document).ready(function() { var algoliaSettings = CONFIG.algolia; - var isAlgoliaSettingsValid = algoliaSettings.applicationID && - algoliaSettings.apiKey && - algoliaSettings.indexName; + var isAlgoliaSettingsValid = algoliaSettings.applicationID + && algoliaSettings.apiKey + && algoliaSettings.indexName; if (!isAlgoliaSettingsValid) { window.console.error('Algolia Settings are invalid.'); @@ -13,10 +12,10 @@ $(document).ready(function () { } var search = instantsearch({ - appId: algoliaSettings.applicationID, - apiKey: algoliaSettings.apiKey, - indexName: algoliaSettings.indexName, - searchFunction: function (helper) { + appId : algoliaSettings.applicationID, + apiKey : algoliaSettings.apiKey, + indexName : algoliaSettings.indexName, + searchFunction: function(helper) { var searchInput = $('#algolia-search-input').find('input'); if (searchInput.val()) { @@ -28,27 +27,27 @@ $(document).ready(function () { // Registering Widgets [ instantsearch.widgets.searchBox({ - container: '#algolia-search-input', + container : '#algolia-search-input', placeholder: algoliaSettings.labels.input_placeholder }), instantsearch.widgets.hits({ - container: '#algolia-hits', + container : '#algolia-hits', hitsPerPage: algoliaSettings.hits.per_page || 10, - templates: { - item: function (data) { - var link = data.permalink ? data.permalink : (CONFIG.root + data.path); + templates : { + item: function(data) { + var link = data.permalink ? data.permalink : CONFIG.root + data.path; return ( - '' + - data._highlightResult.title.value + - '' + '' + + data._highlightResult.title.value + + '' ); }, - empty: function (data) { + empty: function(data) { return ( - '
' + - algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query) + - '
' + '
' + + algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query) + + '
' ); } }, @@ -60,36 +59,36 @@ $(document).ready(function () { instantsearch.widgets.stats({ container: '#algolia-stats', templates: { - body: function (data) { + body: function(data) { var stats = algoliaSettings.labels.hits_stats - .replace(/\$\{hits}/, data.nbHits) - .replace(/\$\{time}/, data.processingTimeMS); + .replace(/\$\{hits}/, data.nbHits) + .replace(/\$\{time}/, data.processingTimeMS); return ( - stats + - '' + - ' Algolia' + - '' + - '
' + stats + + '' + + ' Algolia' + + '' + + '
' ); } } }), instantsearch.widgets.pagination({ - container: '#algolia-pagination', - scrollTo: false, + container : '#algolia-pagination', + scrollTo : false, showFirstLast: false, - labels: { - first: '', - last: '', + labels : { + first : '', + last : '', previous: '', - next: '' + next : '' }, cssClasses: { - root: 'pagination', - item: 'pagination-item', - link: 'page-number', - active: 'current', + root : 'pagination', + item : 'pagination-item', + link : 'page-number', + active : 'current', disabled: 'disabled-item' } }) @@ -106,7 +105,7 @@ $(document).ready(function () { $('#algolia-search-input').find('input').focus(); }); - $('.popup-btn-close').click(function(){ + $('.popup-btn-close').click(function() { $('.popup').hide(); $('.algolia-pop-overlay').remove(); $('body').css('overflow', ''); diff --git a/js/src/exturl.js b/js/src/exturl.js index b85062ad..806a29ef 100644 --- a/js/src/exturl.js +++ b/js/src/exturl.js @@ -1,11 +1,10 @@ -/* global NexT: true */ - -$(document).ready(function () { +$(document).ready(function() { // Create Base64 Object + /* eslint-disable */ 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 () { + $('.exturl').on('click', function() { var $exturl = $(this).attr('data-url'); var $decurl = Base64.decode($exturl); window.open($decurl, '_blank'); diff --git a/js/src/js.cookie.js b/js/src/js.cookie.js index c6c39758..97b4fea1 100644 --- a/js/src/js.cookie.js +++ b/js/src/js.cookie.js @@ -5,6 +5,7 @@ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ + ;(function (factory) { var registeredInModuleLoader = false; if (typeof define === 'function' && define.amd) { diff --git a/js/src/motion.js b/js/src/motion.js index c6b72257..a0951fbd 100644 --- a/js/src/motion.js +++ b/js/src/motion.js @@ -1,25 +1,25 @@ -/* global NexT: true */ +/* global NexT, CONFIG */ -$(document).ready(function () { +$(document).ready(function() { NexT.motion = {}; var sidebarToggleLines = { lines: [], - push: function (line) { + push : function(line) { this.lines.push(line); }, - init: function () { - this.lines.forEach(function (line) { + init: function() { + this.lines.forEach(function(line) { line.init(); }); }, - arrow: function () { - this.lines.forEach(function (line) { + arrow: function() { + this.lines.forEach(function(line) { line.arrow(); }); }, - close: function () { - this.lines.forEach(function (line) { + close: function() { + this.lines.forEach(function(line) { line.close(); }); } @@ -29,44 +29,44 @@ $(document).ready(function () { this.el = $(settings.el); this.status = $.extend({}, { init: { - width: '100%', + width : '100%', opacity: 1, - left: 0, + left : 0, rotateZ: 0, - top: 0 + top : 0 } }, settings.status); } - SidebarToggleLine.prototype.init = function () { + SidebarToggleLine.prototype.init = function() { this.transform('init'); }; - SidebarToggleLine.prototype.arrow = function () { + SidebarToggleLine.prototype.arrow = function() { this.transform('arrow'); }; - SidebarToggleLine.prototype.close = function () { + SidebarToggleLine.prototype.close = function() { this.transform('close'); }; - SidebarToggleLine.prototype.transform = function (status) { + SidebarToggleLine.prototype.transform = function(status) { this.el.velocity('stop').velocity(this.status[status]); }; var sidebarToggleLine1st = new SidebarToggleLine({ - el: '.sidebar-toggle-line-first', + 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', + el : '.sidebar-toggle-line-middle', status: { arrow: {width: '90%'}, close: {opacity: 0} } }); var sidebarToggleLine3rd = new SidebarToggleLine({ - el: '.sidebar-toggle-line-last', + el : '.sidebar-toggle-line-last', status: { arrow: {width: '50%', rotateZ: '45deg', top: '-2px'}, close: {width: '100%', rotateZ: '45deg', top: '-5px'} @@ -77,45 +77,45 @@ $(document).ready(function () { sidebarToggleLines.push(sidebarToggleLine2nd); sidebarToggleLines.push(sidebarToggleLine3rd); - var SIDEBAR_WIDTH = '320px'; + var SIDEBAR_WIDTH = CONFIG.sidebar.width ? CONFIG.sidebar.width : '320px'; var SIDEBAR_DISPLAY_DURATION = 200; var xPos, yPos; var sidebarToggleMotion = { - toggleEl: $('.sidebar-toggle'), - dimmerEl: $('#sidebar-dimmer'), - sidebarEl: $('.sidebar'), + toggleEl : $('.sidebar-toggle'), + dimmerEl : $('#sidebar-dimmer'), + sidebarEl : $('.sidebar'), isSidebarVisible: false, - init: function () { + 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();}); + this.sidebarEl.on('touchmove', function(e) { e.preventDefault(); }); $(document) - .on('sidebar.isShowing', function () { + .on('sidebar.isShowing', function() { NexT.utils.isDesktop() && $('body').velocity('stop').velocity( {paddingRight: SIDEBAR_WIDTH}, SIDEBAR_DISPLAY_DURATION ); }) - .on('sidebar.isHiding', function () { + .on('sidebar.isHiding', function() { }); }, - clickHandler: function () { + clickHandler: function() { this.isSidebarVisible ? this.hideSidebar() : this.showSidebar(); this.isSidebarVisible = !this.isSidebarVisible; }, - mouseEnterHandler: function () { + mouseEnterHandler: function() { if (this.isSidebarVisible) { return; } sidebarToggleLines.arrow(); }, - mouseLeaveHandler: function () { + mouseLeaveHandler: function() { if (this.isSidebarVisible) { return; } @@ -128,42 +128,41 @@ $(document).ready(function () { 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(); + if (_xPos - xPos > 30 && Math.abs(_yPos - yPos) < 20) { + this.clickHandler(); } }, - showSidebar: function () { + 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'); - } + 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'); - } + } + ); + }, + complete: function() { + self.sidebarEl.addClass('sidebar-active'); + self.sidebarEl.trigger('sidebar.didShow'); } - ); + }); this.sidebarEl.trigger('sidebar.isShowing'); }, - hideSidebar: function () { + 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'}); @@ -174,7 +173,7 @@ $(document).ready(function () { this.sidebarEl.trigger('sidebar.isHiding'); // Prevent adding TOC to Overview if Overview was selected when close & open sidebar. - if (!!$('.post-toc-wrap')) { + if ($('.post-toc-wrap')) { if ($('.site-overview-wrap').css('display') === 'block') { $('.post-toc-wrap').removeClass('motion-element'); } else { @@ -186,26 +185,27 @@ $(document).ready(function () { sidebarToggleMotion.init(); NexT.motion.integrator = { - queue: [], + queue : [], cursor: -1, - add: function (fn) { + add : function(fn) { this.queue.push(fn); return this; }, - next: function () { + next: function() { this.cursor++; var fn = this.queue[this.cursor]; $.isFunction(fn) && fn(NexT.motion.integrator); }, - bootstrap: function () { + bootstrap: function() { this.next(); } }; - NexT.motion.middleWares = { - logo: function (integrator) { + NexT.motion.middleWares = { + logo: function(integrator) { var sequence = []; var $brand = $('.brand'); + var $image = $('.custom-logo-image'); var $title = $('.site-title'); var $subtitle = $('.site-subtitle'); var $logoLineTop = $('.logo-line-before i'); @@ -217,16 +217,49 @@ $(document).ready(function () { o: {duration: 200} }); - NexT.utils.isMist() && hasElement([$logoLineTop, $logoLineBottom]) && - sequence.push( + /** + * 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 $element.length > 0; + }); + } + + 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} + }); + } + + NexT.utils.isMist() && hasElement([$logoLineTop, $logoLineBottom]) + && sequence.push( getMistLineSettings($logoLineTop, '100%'), getMistLineSettings($logoLineBottom, '-100%') ); + NexT.utils.isMuse() && hasElement($image) && pushImageToSequence(); + hasElement($title) && sequence.push({ e: $title, p: {opacity: 1, top: 0}, - o: { duration: 200 } + o: {duration: 200} }); hasElement($subtitle) && sequence.push({ @@ -235,60 +268,41 @@ $(document).ready(function () { o: {duration: 200} }); + (NexT.utils.isPisces() || NexT.utils.isGemini()) && hasElement($image) && pushImageToSequence(); + if (CONFIG.motion.async) { integrator.next(); } if (sequence.length > 0) { - sequence[sequence.length - 1].o.complete = function () { + sequence[sequence.length - 1].o.complete = function() { integrator.next(); }; + /* eslint-disable */ $.Velocity.RunSequence(sequence); + /* eslint-enable */ } 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 $element.length > 0; - }); - } }, - menu: function (integrator) { + menu: function(integrator) { if (CONFIG.motion.async) { integrator.next(); } $('.menu-item').velocity('transition.slideDownIn', { - display: null, + display : null, duration: 200, - complete: function () { + complete: function() { integrator.next(); } }); }, - postList: function (integrator) { + postList: function(integrator) { + //var $post = $('.post'); var $postBlock = $('.post-block, .pagination, .comments'); var $postBlockTransition = CONFIG.motion.transition.post_block; @@ -302,18 +316,12 @@ $(document).ready(function () { var $sidebarAffixTransition = CONFIG.motion.transition.sidebar; var hasPost = $postBlock.length > 0; - hasPost ? postMotion() : integrator.next(); - - if (CONFIG.motion.async) { - integrator.next(); - } - - function postMotion () { + function postMotion() { var postMotionOptions = window.postMotionOptions || { - stagger: 100, - drag: true - }; - postMotionOptions.complete = function () { + 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' }); @@ -339,9 +347,15 @@ $(document).ready(function () { $sidebarAffix.velocity('transition.' + $sidebarAffixTransition, postMotionOptions); } } + + hasPost ? postMotion() : integrator.next(); + + if (CONFIG.motion.async) { + integrator.next(); + } }, - sidebar: function (integrator) { + sidebar: function(integrator) { if (CONFIG.sidebar.display === 'always') { NexT.utils.displaySidebar(); } diff --git a/js/src/bootstrap.js b/js/src/next-boot.js similarity index 84% rename from js/src/bootstrap.js rename to js/src/next-boot.js index b8767b32..f9c02d32 100644 --- a/js/src/bootstrap.js +++ b/js/src/next-boot.js @@ -1,10 +1,10 @@ -/* global NexT: true */ +/* global NexT, CONFIG */ -$(document).ready(function () { +$(document).ready(function() { $(document).trigger('bootstrap:before'); - /** + /** * Register JS handlers by condition option. * Need to add config option in Front-End at 'layout/_partials/head.swig' file. */ @@ -13,17 +13,17 @@ $(document).ready(function () { NexT.utils.registerESCKeyEvent(); - NexT.utils.registerBackToTop(); + CONFIG.back2top && NexT.utils.registerBackToTop(); // Mobile top menu bar. - $('.site-nav-toggle button').on('click', function () { + $('.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.stop()[animateAction]('fast', function() { $siteNav[animateCallback](ON_CLASS_NAME); }); }); @@ -36,8 +36,6 @@ $(document).ready(function () { CONFIG.tabs && NexT.utils.registerTabsTag(); NexT.utils.embeddedVideoTransformer(); - NexT.utils.addActiveClassToMenuItem(); - // Define Motion Sequence. NexT.motion.integrator diff --git a/js/src/post-details.js b/js/src/post-details.js index bfb6e6b1..e47f1bb5 100644 --- a/js/src/post-details.js +++ b/js/src/post-details.js @@ -1,16 +1,19 @@ -/* global NexT: true */ +/* global NexT, CONFIG */ -$(document).ready(function () { +$(document).ready(function() { - initScrollSpy(); - - function initScrollSpy () { + function initScrollSpy() { var tocSelector = '.post-toc'; var $tocElement = $(tocSelector); var activeCurrentSelector = '.active-current'; + function removeCurrentActiveClass() { + $(tocSelector + ' ' + activeCurrentSelector) + .removeClass(activeCurrentSelector.substring(1)); + } + $tocElement - .on('activate.bs.scrollspy', function () { + .on('activate.bs.scrollspy', function() { var $currentActiveElement = $(tocSelector + ' .active').last(); removeCurrentActiveClass(); @@ -22,21 +25,17 @@ $(document).ready(function () { .on('clear.bs.scrollspy', removeCurrentActiveClass); $('body').scrollspy({ target: tocSelector }); - - function removeCurrentActiveClass () { - $(tocSelector + ' ' + activeCurrentSelector) - .removeClass(activeCurrentSelector.substring(1)); - } } + initScrollSpy(); }); -$(document).ready(function () { +$(document).ready(function() { var html = $('html'); var TAB_ANIMATE_DURATION = 200; var hasVelocity = $.isFunction(html.velocity); - $('.sidebar-nav li').on('click', function () { + $('.sidebar-nav li').on('click', function() { var item = $(this); var activeTabClassName = 'sidebar-nav-active'; var activePanelClassName = 'sidebar-panel-active'; @@ -47,19 +46,19 @@ $(document).ready(function () { var currentTarget = $('.' + activePanelClassName); var target = $('.' + item.data('target')); - hasVelocity ? - currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () { + 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.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function() { currentTarget.hide(); target .stop() .css({'opacity': 0, 'display': 'block'}) - .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () { + .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function() { currentTarget.removeClass(activePanelClassName); target.addClass(activePanelClassName); }); @@ -70,17 +69,17 @@ $(document).ready(function () { }); // TOC item animation navigate & prevent #item selector in adress bar. - $('.post-toc a').on('click', function (e) { + $('.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', + hasVelocity + ? html.velocity('stop').velocity('scroll', { + offset : offset + 'px', mobileHA: false - }) : - $('html, body').stop().animate({ + }) + : $('html, body').stop().animate({ scrollTop: offset }, 500); }); @@ -90,15 +89,16 @@ $(document).ready(function () { var display = CONFIG.page.sidebar; if (typeof display !== 'boolean') { // There's no definition sidebar in the page front-matter - var isSidebarCouldDisplay = CONFIG.sidebar.display === 'post' || - CONFIG.sidebar.display === 'always'; + var isSidebarCouldDisplay = CONFIG.sidebar.display === 'post' + || CONFIG.sidebar.display === 'always'; var hasTOC = $tocContent.length > 0 && $tocContent.html().trim().length > 0; display = isSidebarCouldDisplay && hasTOC; } if (display) { - CONFIG.motion.enable ? - (NexT.motion.middleWares.sidebar = function () { - NexT.utils.displaySidebar(); - }) : NexT.utils.displaySidebar(); + CONFIG.motion.enable + ? NexT.motion.middleWares.sidebar = function() { + NexT.utils.displaySidebar(); + } + : NexT.utils.displaySidebar(); } }); diff --git a/js/src/schemes/muse.js b/js/src/schemes/muse.js new file mode 100644 index 00000000..a0e2c566 --- /dev/null +++ b/js/src/schemes/muse.js @@ -0,0 +1,9 @@ +$(document).ready(function() { + function updateFooterPosition() { + var containerHeight = $('#footer').attr('position') ? $('.container').height() + $('#footer').outerHeight(true) : $('.container').height(); + if (containerHeight < window.innerHeight) $('#footer').css({ 'position': 'fixed', 'bottom': 0, 'left': 0, 'right': 0 }).attr('position', 'fixed'); + else $('#footer').removeAttr('style position'); + } + updateFooterPosition(); + $(window).on('resize scroll', updateFooterPosition); +}); diff --git a/js/src/schemes/pisces.js b/js/src/schemes/pisces.js index 0e6e4267..8c6e896f 100644 --- a/js/src/schemes/pisces.js +++ b/js/src/schemes/pisces.js @@ -1,57 +1,57 @@ -$(document).ready(function () { +/* global NexT, CONFIG */ + +$(document).ready(function() { var sidebarInner = $('.sidebar-inner'); + var sidebarOffset = CONFIG.sidebar.offset || 12; - initAffix(); - resizeListener(); + function getHeaderOffset() { + return $('.header-inner').height() + sidebarOffset; + } + + function getFooterOffset() { + var footer = $('#footer'); + var footerInner = $('.footer-inner'); + var footerMargin = footer.outerHeight() - footerInner.outerHeight(); + var footerOffset = footer.outerHeight() + footerMargin; + return footerOffset; + } - function initAffix () { - var headerOffset = getHeaderOffset(), - footerOffset = getFooterOffset(), - sidebarHeight = $('#sidebar').height() + NexT.utils.getSidebarb2tHeight(), - contentHeight = $('#content').height(); + function initAffix() { + var headerOffset = getHeaderOffset(); + var footerOffset = getFooterOffset(); + var sidebarHeight = $('#sidebar').height() + NexT.utils.getSidebarb2tHeight(); + var contentHeight = $('#content').height(); - // Not affix if sidebar taller then content (to prevent bottom jumping). + // Not affix if sidebar taller than content (to prevent bottom jumping). if (headerOffset + sidebarHeight < contentHeight) { sidebarInner.affix({ offset: { - top: headerOffset - CONFIG.sidebar.offset, + top : headerOffset - sidebarOffset, bottom: footerOffset } }); + sidebarInner.affix('checkPosition'); } - 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; + $('#sidebar').css({ 'margin-top': headerOffset, 'margin-left': 'auto' }); } - function setSidebarMarginTop (headerOffset) { - return $('#sidebar').css({ 'margin-top': headerOffset }); - } - - function recalculateAffixPosition () { + function recalculateAffixPosition() { $(window).off('.affix'); sidebarInner.removeData('bs.affix').removeClass('affix affix-top affix-bottom'); initAffix(); } + function resizeListener() { + var mql = window.matchMedia('(min-width: 992px)'); + mql.addListener(function(e) { + if (e.matches) { + recalculateAffixPosition(); + } + }); + } + + initAffix(); + resizeListener(); }); diff --git a/js/src/scroll-cookie.js b/js/src/scroll-cookie.js index 34ff200b..2db1f8af 100644 --- a/js/src/scroll-cookie.js +++ b/js/src/scroll-cookie.js @@ -1,23 +1,25 @@ $(document).ready(function() { + /* global Cookies */ + // Set relative link path (without domain) - var rpath = window.location.href.replace(window.location.origin, ""); + var rpath = window.location.href.replace(window.location.origin, ''); // Write position in cookie var timeout; - $(window).on("scroll", function() { + $(window).on('scroll', function() { clearTimeout(timeout); - timeout = setTimeout(function () { - Cookies.set("scroll-cookie", ($(window).scrollTop() + "|" + rpath), { expires: 365, path: '' }); + 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]); - } + if (Cookies.get('scroll-cookie') !== undefined) { + var cvalues = Cookies.get('scroll-cookie').split('|'); + if (cvalues[1] === rpath) { + $(window).scrollTop(cvalues[0]); + } } }); diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index f5c5c6cb..7efacace 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -7,176 +7,173 @@ * ======================================================================== */ /** - * Custom by iissnan + * Customized by iissnan & Ivan.Nginx * * - Add a `clear.bs.scrollspy` event. * - Esacpe targets selector. + * - Refactored with eslint-config-theme-next style. */ +/* global NexT */ -+function ($) { +(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() + 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.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.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 + ScrollSpy.prototype.refresh = function() { + var that = this; + var offsetMethod = 'offset'; + var offsetBase = 0; - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() + this.offsets = []; + this.targets = []; + this.scrollHeight = this.getScrollHeight(); if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() + 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. + .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 + && [[$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]) + .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() + 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) + 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() + $(this.selector).trigger('clear.bs.scrollspy'); // Add a custom event. + this.activeTarget = null; + return this.clear(); } for (i = offsets.length; i--;) { - activeTarget != targets[i] + activeTarget !== targets[i] && scrollTop >= offsets[i] && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) - && this.activate(targets[i]) + && this.activate(targets[i]); } - } + }; - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target + ScrollSpy.prototype.activate = function(target) { + this.activeTarget = target; - this.clear() + this.clear(); - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' + var selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]'; var active = $(selector) .parents('li') - .addClass('active') + .addClass('active'); if (active.parent('.dropdown-menu').length) { active = active .closest('li.dropdown') - .addClass('active') + .addClass('active'); } - active.trigger('activate.bs.scrollspy') - } + active.trigger('activate.bs.scrollspy'); + }; - ScrollSpy.prototype.clear = function () { + ScrollSpy.prototype.clear = function() { $(this.selector) .parentsUntil(this.options.target, '.active') - .removeClass('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]() - }) + 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 + var old = $.fn.scrollspy; + $.fn.scrollspy = Plugin; + $.fn.scrollspy.Constructor = ScrollSpy; // SCROLLSPY NO CONFLICT // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - + $.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); + $(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/js/src/utils.js b/js/src/utils.js index 62034cb9..8f28eb29 100644 --- a/js/src/utils.js +++ b/js/src/utils.js @@ -1,26 +1,26 @@ -/* global NexT: true */ +/* global NexT, CONFIG */ NexT.utils = NexT.$u = { + /** * Wrap images with fancybox support. */ - wrapImageWithFancyBox: function () { + wrapImageWithFancyBox: function() { $('.content img') - .not('[hidden]') + .not(':hidden') .not('.group-picture img, .post-gallery img') - .each(function () { + .each(function() { var $image = $(this); var imageTitle = $image.attr('title'); var $imageWrapLink = $image.parent('a'); if ($imageWrapLink.length < 1) { - var imageLink = ($image.attr('data-original')) ? this.getAttribute('data-original') : this.getAttribute('src'); + 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'); } - $imageWrapLink.addClass('fancybox fancybox.image'); - $imageWrapLink.attr('rel', 'group'); - if (imageTitle) { $imageWrapLink.append('

' + imageTitle + '

'); @@ -30,6 +30,7 @@ NexT.utils = NexT.$u = { }); $('.fancybox').fancybox({ + loop: true, helpers: { overlay: { locked: false @@ -38,35 +39,35 @@ NexT.utils = NexT.$u = { }); }, - lazyLoadPostsImages: function () { + lazyLoadPostsImages: function() { $('#posts').find('img').lazyload({ //placeholder: '/images/loading.gif', - effect: 'fadeIn', - threshold : 0 + effect : 'fadeIn', + threshold: 0 }); }, /** * Tabs tag listener (without twitter bootstrap). */ - registerTabsTag: function () { + 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 !== '') { + if (tHash !== '' && !tHash.match(/%\S{2}/)) { $(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) { + $(tNav + '.tab').on('click', function(href) { href.preventDefault(); // Prevent selected tab to select again. - if(!$(this).hasClass('active')){ + if (!$(this).hasClass('active')) { // Add & Remove active class on `nav-tabs` & `tab-content`. $(this).addClass('active').siblings().removeClass('active'); @@ -79,13 +80,12 @@ NexT.utils = NexT.$u = { } } }); - }, - registerESCKeyEvent: function () { - $(document).on('keyup', function (event) { - var shouldDismissSearchPopup = event.which === 27 && - $('.search-popup').is(':visible'); + 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(); @@ -94,23 +94,32 @@ NexT.utils = NexT.$u = { }); }, - registerBackToTop: function () { + registerBackToTop: function() { var THRESHOLD = 50; var $top = $('.back-to-top'); - $(window).on('scroll', function () { + function initBackToTop() { $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; + var scrollPercent = scrollTop / contentVisibilityHeight; + var scrollPercentRounded = Math.round(scrollPercent * 100); + var scrollPercentMaxed = scrollPercentRounded > 100 ? 100 : scrollPercentRounded; $('#scrollpercent>span').html(scrollPercentMaxed); + } + + // For init back to top in sidebar if page was scrolled after page refresh. + $(window).on('load', function() { + initBackToTop(); + }); + + $(window).on('scroll', function() { + initBackToTop(); }); - $top.on('click', function () { - $('body').velocity('scroll'); + $top.on('click', function() { + $.isFunction($('html').velocity) ? $('body').velocity('scroll') : $('html, body').animate({ scrollTop: 0 }); }); }, @@ -118,7 +127,7 @@ NexT.utils = NexT.$u = { * Transform embedded video to support responsive layout. * @see http://toddmotto.com/fluid-and-responsive-youtube-and-vimeo-videos-with-fluidvids-js/ */ - embeddedVideoTransformer: function () { + embeddedVideoTransformer: function() { var $iframes = $('iframe'); // Supported Players. Extend this if you need more players. @@ -129,9 +138,20 @@ NexT.utils = NexT.$u = { 'music.163.com', 'www.tudou.com' ]; - var pattern = new RegExp( SUPPORTED_PLAYERS.join('|') ); + var pattern = new RegExp(SUPPORTED_PLAYERS.join('|')); + + function getDimension($element) { + return { + width : $element.width(), + height: $element.height() + }; + } + + function getAspectRadio(width, height) { + return height / width * 100; + } - $iframes.each(function () { + $iframes.each(function() { var iframe = this; var $iframe = $(this); var oldDimension = getDimension($iframe); @@ -147,11 +167,10 @@ NexT.utils = NexT.$u = { $iframe.width('100%').height('100%') .css({ position: 'absolute', - top: '0', - left: '0' + 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'); @@ -171,8 +190,8 @@ NexT.utils = NexT.$u = { // 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; + 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) { @@ -182,29 +201,9 @@ NexT.utils = NexT.$u = { } }); - 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 () { + 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; @@ -212,15 +211,15 @@ NexT.utils = NexT.$u = { return pa.test(ua); }, - isTablet: function () { + isTablet: function() { return window.screen.width < 992 && window.screen.width > 767 && this.hasMobileUA(); }, - isMobile: function () { + isMobile: function() { return window.screen.width < 767 && this.hasMobileUA(); }, - isDesktop: function () { + isDesktop: function() { return !this.isTablet() && !this.isMobile(); }, @@ -230,88 +229,89 @@ NexT.utils = NexT.$u = { * @param selector * @returns {string|void|XML|*} */ - escapeSelector: function (selector) { - return selector.replace(/[!"$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, '\\$&'); + escapeSelector: function(selector) { + return selector.replace(/[!"$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g, '\\$&'); }, - displaySidebar: function () { + displaySidebar: function() { if (!this.isDesktop() || this.isPisces() || this.isGemini()) { return; } $('.sidebar-toggle').trigger('click'); }, - isMist: function () { + isMuse: function() { + return CONFIG.scheme === 'Muse'; + }, + + isMist: function() { return CONFIG.scheme === 'Mist'; }, - isPisces: function () { + isPisces: function() { return CONFIG.scheme === 'Pisces'; }, - isGemini: function () { + isGemini: function() { return CONFIG.scheme === 'Gemini'; }, - getScrollbarWidth: function () { + 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); + getContentVisibilityHeight: function() { + var docHeight = $('.container').height(); + var winHeight = $(window).height(); + var 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; + getSidebarb2tHeight: function() { + var sidebarb2tHeight = (CONFIG.back2top && CONFIG.back2top_sidebar) ? $('.back-to-top').height() : 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)); + getSidebarSchemePadding: function() { + var sidebarNavHeight = $('.sidebar-nav').css('display') === 'block' ? $('.sidebar-nav').outerHeight(true) : 0; + var sidebarInner = $('.sidebar-inner'); + var sidebarPadding = sidebarInner.innerWidth() - sidebarInner.width(); + var sidebarOffset = CONFIG.sidebar.offset ? CONFIG.sidebar.offset : 12; + var sidebarSchemePadding = this.isPisces() || this.isGemini() + ? (sidebarPadding * 2) + sidebarNavHeight + sidebarOffset + this.getSidebarb2tHeight() + : (sidebarPadding * 2) + (sidebarNavHeight / 2); return sidebarSchemePadding; } - - /** - * Affix behaviour for Sidebar. - * - * @returns {Boolean} - */ -// needAffix: function () { -// return this.isPisces() || this.isGemini(); -// } }; -$(document).ready(function () { +$(document).ready(function() { - initSidebarDimension(); + function wrapTable() { + $('table').not('figure table').wrap('
'); + } /** * 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 () { + + function updateSidebarHeight(height) { + height = height || 'auto'; + $('.site-overview, .post-toc').css('max-height', height); + } + + function initSidebarDimension() { var updateSidebarHeightTimer; - $(window).on('resize', function () { + $(window).on('resize', function() { updateSidebarHeightTimer && clearTimeout(updateSidebarHeightTimer); - updateSidebarHeightTimer = setTimeout(function () { + updateSidebarHeightTimer = setTimeout(function() { var sidebarWrapperHeight = document.body.clientHeight - NexT.utils.getSidebarSchemePadding(); updateSidebarHeight(sidebarWrapperHeight); @@ -320,20 +320,16 @@ $(document).ready(function () { // 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)'); - } + 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); - } - + initSidebarDimension(); + wrapTable(); }); diff --git a/page/2/index.html b/page/2/index.html index 2979b628..d424b7ff 100644 --- a/page/2/index.html +++ b/page/2/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + +
+ @@ -2376,11 +2757,14 @@

+ - + - - - + - - - + - + - + @@ -2440,9 +2818,8 @@

+ - @@ -2451,42 +2828,27 @@

- + - - - - - - - - - - - - + - - + - - - + @@ -2497,6 +2859,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + +

+ @@ -1829,11 +2356,14 @@

+ - + - - - + - - - + - + - + @@ -1893,9 +2417,8 @@

+ - @@ -1904,42 +2427,27 @@

- + - - - - - - - - - - - - + - - + - - - + @@ -1950,6 +2458,7 @@

- - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - - 标签: 软件调试 | 不要说话 + + 标签: Algorithm | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -613,11 +694,14 @@

+ + + - - + - - - + - - - + - + - + @@ -677,9 +755,8 @@

- + - @@ -688,42 +765,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -734,6 +796,7 @@

+ diff --git a/tags/Android-Reverse/index.html b/tags/Android-Reverse/index.html index 4687886c..ab4dccca 100644 --- a/tags/Android-Reverse/index.html +++ b/tags/Android-Reverse/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 标签: Android Reverse | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -613,11 +694,14 @@

+ + + - - + - - - + - - - + - + - + @@ -677,9 +755,8 @@

- + - @@ -688,42 +765,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -734,6 +796,7 @@

+ diff --git a/tags/Debug/index.html b/tags/Debug/index.html new file mode 100644 index 00000000..8ccdee86 --- /dev/null +++ b/tags/Debug/index.html @@ -0,0 +1,837 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: Debug | 不要说话 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Kali/index.html b/tags/Linux/index.html similarity index 56% rename from tags/Kali/index.html rename to tags/Linux/index.html index fa7823a2..40a2cb01 100644 --- a/tags/Kali/index.html +++ b/tags/Linux/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - - 标签: Kali | 不要说话 + + 标签: Linux | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -501,11 +590,14 @@

+ + + - - + - - - + - - - + - + - + @@ -565,9 +651,8 @@

- + - @@ -576,42 +661,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -622,6 +692,7 @@

+ diff --git a/tags/PWN/index.html b/tags/PWN/index.html index dceee977..1b92316a 100644 --- a/tags/PWN/index.html +++ b/tags/PWN/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + 标签: PWN | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -725,11 +798,14 @@

+ + + - - + - - - + - - - + - + - + @@ -789,9 +859,8 @@

- + - @@ -800,42 +869,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -846,6 +900,7 @@

+ diff --git a/tags/Reverse/index.html b/tags/Reverse/index.html deleted file mode 100644 index d28efd12..00000000 --- a/tags/Reverse/index.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: Reverse | 不要说话 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/tags/\346\220\234\347\264\242\347\256\227\346\263\225/index.html" b/tags/Shell/index.html similarity index 53% rename from "tags/\346\220\234\347\264\242\347\256\227\346\263\225/index.html" rename to tags/Shell/index.html index 03e05506..6b5465fe 100644 --- "a/tags/\346\220\234\347\264\242\347\256\227\346\263\225/index.html" +++ b/tags/Shell/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - - 标签: 搜索算法 | 不要说话 + + 标签: Shell | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -557,11 +616,14 @@

+ + + - - + - - - + - - - + - + - + @@ -621,9 +677,8 @@

- + - @@ -632,42 +687,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -678,6 +718,7 @@

+ diff --git a/tags/index.html b/tags/index.html index d3094d1b..4a5f3d71 100644 --- a/tags/index.html +++ b/tags/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - + tags | 不要说话 @@ -134,7 +130,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -547,11 +629,14 @@

tags

+ + + - - + - - - + - - - + - + - + @@ -611,57 +690,43 @@

tags

- + - - - + + - - + - - - - - - - - - - - - + + - + - - - + @@ -672,6 +737,7 @@

tags

+ diff --git a/tags/ubuntu/index.html b/tags/ubuntu/index.html index a1ba05f3..e554e631 100644 --- a/tags/ubuntu/index.html +++ b/tags/ubuntu/index.html @@ -2,15 +2,7 @@ - - - - - - - - @@ -19,12 +11,17 @@ + + + + + + + - - @@ -47,23 +44,23 @@ - - + - + - + - + - + + @@ -71,13 +68,15 @@ - - 标签: ubuntu | 不要说话 + + 标签: Ubuntu | 不要说话 @@ -133,7 +129,7 @@ - + + + + + + + + + + + + + + + + + + + + @@ -529,11 +616,14 @@

+ + + - - + - - - + - - - + - + - + @@ -593,9 +677,8 @@

- + - @@ -604,42 +687,27 @@

- - + - - - - - - - - - - - - + - - + - - - + @@ -650,6 +718,7 @@

+ diff --git "a/tags/\346\240\221\347\273\223\346\236\204/index.html" "b/tags/\346\240\221\347\273\223\346\236\204/index.html" deleted file mode 100644 index 4aea52c7..00000000 --- "a/tags/\346\240\221\347\273\223\346\236\204/index.html" +++ /dev/null @@ -1,636 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标签: 树结构 | 不要说话 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -