├── 404.php ├── LICENSE ├── README.md ├── archive.php ├── comments.php ├── css └── main.css ├── fonts ├── icon-default │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ ├── icomoon.woff │ └── selection.json ├── icon-feather │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ ├── icomoon.woff │ └── selection.json ├── icon-fifty-shades │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ ├── icomoon.woff │ └── selection.json ├── icon-icomoon │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ └── icomoon.woff └── icon-linecons │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ ├── icomoon.woff │ └── selection.json ├── footer.php ├── functions.php ├── header.php ├── images ├── bkdefault_avatar.jpg ├── cc-by-nc-nd.svg ├── cc-by-nc-sa.svg ├── cc-by-nc.svg ├── cc-by-nd.svg ├── cc-by-sa.svg ├── cc-by.svg ├── cc-zero.svg ├── loading.gif ├── placeholder.gif ├── quote-l.svg ├── quote-r.svg └── searchicon.png ├── index.php ├── js ├── bootstrap.js ├── bootstrap.scrollspy.js ├── fancy-box.js ├── helpers.js ├── hook-duoshuo.js ├── lazyload.js ├── motion.js ├── motion_fallback.js ├── motion_global.js ├── nav-toggle.js ├── post_sidebar.js └── ua-parser.min.js ├── page-archive.php ├── page-categories.php ├── page-link.php ├── page-tags.php ├── page.php ├── post.php ├── screenshot.png ├── search.php ├── sidebar.php └── vendors ├── fancybox └── source │ ├── blank.gif │ ├── fancybox_loading.gif │ ├── fancybox_loading@2x.gif │ ├── fancybox_overlay.png │ ├── fancybox_sprite.png │ ├── fancybox_sprite@2x.png │ ├── helpers │ ├── fancybox_buttons.png │ ├── jquery.fancybox-buttons.css │ ├── jquery.fancybox-buttons.js │ ├── jquery.fancybox-media.js │ ├── jquery.fancybox-thumbs.css │ └── jquery.fancybox-thumbs.js │ ├── jquery.fancybox.css │ ├── jquery.fancybox.js │ └── jquery.fancybox.pack.js ├── fastclick ├── LICENSE ├── README.html ├── bower.json └── lib │ ├── fastclick.js │ └── fastclick.min.js ├── font-awesome ├── HELP-US-OUT.txt ├── bower.json ├── css │ ├── font-awesome.css │ ├── font-awesome.css.map │ └── font-awesome.min.css └── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── jquery └── index.js └── velocity ├── bower.json ├── velocity.js ├── velocity.min.js ├── velocity.ui.js └── velocity.ui.min.js /404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | is('index')): ?><?php $this->options->title(); ?> 10 | 11 | <?php $this->archiveTitle('.', '', ' - '); ?><?php $this->options->title(); ?> 12 | 13 | 16 | 17 | 18 | 94 | header("generator=&template=&"); ?> 95 | 96 | 97 |
98 |
99 |
100 |
101 | 404 102 |
103 |
104 |
105 |

每一个平凡的日常
都是连续发生中的奇迹

106 | 返回首页 107 |
108 | 111 |
112 |
113 | footer(); ?> 114 | 115 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 zgq354 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # typecho-theme-next 2 | 3 | Hexo 主题 [Next.Mist](https://github.com/iissnan/hexo-theme-next) 的 Typecho 移植版。 4 | 5 | ## 特性 6 | 1. 支持typecho原生评论(评论样式来自cho的Navy主题) 7 | 2. 侧边栏显示友情链接,友情链接在启用 [Hanny](http://www.imhan.com/) 的 [Links插件](http://www.imhan.com/tag/%E5%8F%8B%E6%83%85%E9%93%BE%E6%8E%A5/) 才会显示 8 | 3. 自带分类、归档、标签页面模板 9 | 10 | ## 使用方法 11 | 1. 点击 download zip 下载最新源码,解压,将其中文件夹重命名为 next 并上传至博客的 `/usr/themes` 目录下 12 | 2. 在 Typecho 后台启用 13 | 3. 新建分类页,缩略名为 `categories`,自定义模板选择 `categories` 14 | 4. 新建归档页,缩略名为 `archive`,自定义模板选择 `archive` 15 | 5. 新建标签页,缩略名为 `tags`,自定义模板选择 `tags` 16 | 6. 前往外观设置设置头像,昵称等等 17 | 18 | ## 相关链接 19 | 20 | * NexT.Pisces:[NexT.Pisces](https://github.com/newraina/typecho-theme-NexTPisces) 21 | 22 | ## License 23 | 24 | Open sourced under the MIT license. 25 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 2 | need('header.php'); ?> 3 | 4 |
5 |
6 |
7 |
8 | 9 | 10 | 11 | archiveTitle(array( 12 | 'category' => _t('分类 %s 下的文章'), 13 | 'search' => _t('包含关键字 %s 的文章'), 14 | 'tag' => _t('标签 %s 下的文章'), 15 | 'author' => _t('%s 发布的文章') 16 | ), '', ''); ?> 17 | 18 | next()): 22 | $year_tmp = date('Y',$this->created); 23 | $mon_tmp = date('m',$this->created); 24 | //var_dump($year_tmp); 25 | $y=$year; $m=$mon; 26 | //if ($mon != $mon_tmp && $mon > 0) $output .= ''; 27 | //if ($year != $year_tmp && $year > 0) $output .= ''; 28 | if ($year != $year_tmp) { 29 | $year = $year_tmp; 30 | //$output .= '
'. $year .' 年
    '; //输出年份 31 | $output .= '
    32 |

    '.$year.'

    33 |
    34 | '; //输出年份 35 | } 36 | $output .=' 48 | '; 49 | endwhile; 50 | echo $output; 51 | ?> 52 |
53 |
54 |
55 | need('sidebar.php'); ?> 56 |
57 | need('footer.php'); ?> -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 |
2 | options->next_comments)): ?> 3 | allow('comment')): ?> 4 | 5 |
6 | 7 | 8 | 9 | 10 | comments()->to($comments); ?> 11 | have()): ?> 12 | commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?> 13 | listComments(); ?> 14 | pageNav('« ', ' »',5,'...',array('wrapTag' => 'nav','wrapClass' =>'pagination','itemTag'=>'','prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current')); ?> 15 | 16 | allow('comment')): ?> 17 |
18 |
19 | cancelReply(); ?> 20 |
21 | 22 |
23 |
24 |

25 | 26 |

27 |
28 |
29 | user->hasLogin()): ?> 30 |

user->screenName(); ?>. »

31 | 32 |

33 | 34 | 35 |

36 |

37 | 38 | 39 |

40 |

41 | 42 | 43 |

44 | 45 |

46 | 47 |

48 |
49 |
50 |
51 |
52 | 53 | 54 | 55 |
-------------------------------------------------------------------------------- /fonts/icon-default/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-default/icomoon.eot -------------------------------------------------------------------------------- /fonts/icon-default/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /fonts/icon-default/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-default/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icon-default/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-default/icomoon.woff -------------------------------------------------------------------------------- /fonts/icon-default/selection.json: -------------------------------------------------------------------------------- 1 | {"IcoMoonType":"selection","icons":[{"icon":{"paths":["M170 470v84h86v-84h-86zM86 598v-172h852v172h-852zM256 298v-84h-86v84h86zM86 170h852v172h-852v-172zM170 726v84h86v-84h-86zM86 854v-172h852v172h-852z"],"attrs":[{}],"isMulticolor":false,"tags":["storage"],"defaultCode":57532,"grid":24},"attrs":[{}],"properties":{"order":392,"id":188,"prevSize":24,"code":57532,"name":"storage","ligatures":"storage"},"setIdx":0,"setId":0,"iconIdx":188},{"icon":{"paths":["M512 746q-74 0-133-41t-85-107h436q-26 66-85 107t-133 41zM362 470q-26 0-45-19t-19-45 19-45 45-19 45 19 19 45-19 45-45 19zM662 470q-26 0-45-19t-19-45 19-45 45-19 45 19 19 45-19 45-45 19zM512 854q140 0 241-101t101-241-101-241-241-101-241 101-101 241 101 241 241 101zM512 86q176 0 301 125t125 301-125 301-301 125-301-125-125-301 125-301 301-125z"],"attrs":[{}],"isMulticolor":false,"tags":["insert_emoticon"],"defaultCode":57576,"grid":24},"attrs":[{}],"properties":{"order":384,"id":232,"prevSize":24,"code":57576,"name":"insert_emoticon","ligatures":"insert_emoticon"},"setIdx":0,"setId":0,"iconIdx":232},{"icon":{"paths":["M512 768q106 0 181-75t75-181-75-181-181-75q-52 0-106 24 66 30 107 93t41 139-41 139-107 93q54 24 106 24zM854 370l140 142-140 142v200h-200l-142 140-142-140h-200v-200l-140-142 140-142v-200h200l142-140 142 140h200v200z"],"attrs":[{}],"isMulticolor":false,"tags":["brightness_4"],"defaultCode":57662,"grid":24},"attrs":[{}],"properties":{"order":383,"id":318,"prevSize":24,"code":57662,"name":"brightness_4","ligatures":"brightness_4"},"setIdx":0,"setId":0,"iconIdx":318},{"icon":{"paths":["M500 810q86 0 145-59t59-145q0-88-24-172-62 82-198 110-120 26-120 132 0 56 40 95t98 39zM576 28q128 104 203 253t75 317q0 140-100 240t-242 100-242-100-100-240q0-216 138-380v16q0 66 44 112t110 46q64 0 105-45t41-113q0-40-8-92t-16-82z"],"attrs":[{}],"isMulticolor":false,"tags":["whatshot"],"defaultCode":57947,"grid":24},"attrs":[{}],"properties":{"order":390,"id":603,"prevSize":24,"code":57947,"name":"whatshot","ligatures":"whatshot"},"setIdx":0,"setId":0,"iconIdx":603},{"icon":{"paths":["M726 128q34 0 59 26t25 60v682l-298-128-298 128v-682q0-34 25-60t59-26h428z"],"attrs":[{}],"isMulticolor":false,"tags":["bookmark"],"defaultCode":57979,"grid":24},"attrs":[{}],"properties":{"order":389,"id":635,"prevSize":24,"code":57979,"name":"bookmark","ligatures":"bookmark"},"setIdx":0,"setId":0,"iconIdx":635},{"icon":{"paths":["M516 792q96-86 142-130t100-104 75-106 21-90q0-64-43-106t-107-42q-50 0-93 28t-59 72h-80q-16-44-59-72t-93-28q-64 0-107 42t-43 106q0 44 21 90t75 106 100 104 142 130l4 4zM704 128q100 0 167 68t67 166q0 58-22 113t-81 123-107 114-154 142l-62 56-62-54q-138-124-199-186t-113-146-52-162q0-98 67-166t167-68q116 0 192 90 76-90 192-90z"],"attrs":[{}],"isMulticolor":false,"tags":["favorite_outline"],"defaultCode":58002,"grid":24},"attrs":[{}],"properties":{"order":385,"id":658,"prevSize":24,"code":58002,"name":"favorite_outline","ligatures":"favorite_outline"},"setIdx":0,"setId":0,"iconIdx":658},{"icon":{"paths":["M426 854h-212v-342h-128l426-384 426 384h-128v342h-212v-256h-172v256z"],"attrs":[{}],"isMulticolor":false,"tags":["home"],"defaultCode":58014,"grid":24},"attrs":[{}],"properties":{"order":391,"id":670,"prevSize":24,"code":58014,"name":"home","ligatures":"home"},"setIdx":0,"setId":0,"iconIdx":670},{"icon":{"paths":["M598 128h298v298h-86v-152l-418 418-60-60 418-418h-152v-86zM810 810v-298h86v298q0 34-26 60t-60 26h-596q-36 0-61-26t-25-60v-596q0-34 25-60t61-26h298v86h-298v596h596z"],"attrs":[{}],"isMulticolor":false,"tags":["open_in_new"],"defaultCode":58034,"grid":24},"attrs":[{}],"properties":{"order":386,"id":690,"prevSize":24,"code":58034,"name":"open_in_new","ligatures":"open_in_new"},"setIdx":0,"setId":0,"iconIdx":690},{"icon":{"paths":["M406 598q80 0 136-56t56-136-56-136-136-56-136 56-56 136 56 136 136 56zM662 598l212 212-64 64-212-212v-34l-12-12q-76 66-180 66-116 0-197-80t-81-196 81-197 197-81 196 81 80 197q0 104-66 180l12 12h34z"],"attrs":[{}],"isMulticolor":false,"tags":["search"],"defaultCode":58058,"grid":24},"attrs":[{}],"properties":{"order":393,"id":714,"prevSize":24,"code":58058,"name":"search","ligatures":"search"},"setIdx":0,"setId":0,"iconIdx":714},{"icon":{"paths":["M768 256h170v470h-170v-470zM86 726v-470h170v470h-170zM298 810v-640h428v640h-428z"],"attrs":[{}],"isMulticolor":false,"tags":["view_carousel"],"defaultCode":58109,"grid":24},"attrs":[{}],"properties":{"order":387,"id":765,"prevSize":24,"code":58109,"name":"view_carousel","ligatures":"view_carousel"},"setIdx":0,"setId":0,"iconIdx":765}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"autoHost":true,"showSelector":true,"selector":"","showMetrics":true,"showMetadata":true,"showVersion":true},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":4473924,"bgColor":16777215,"classSelector":".icon"},"historySize":100,"showCodes":true,"quickUsageToken":{"UntitledProject":"NGQ3ZDQyOTcwODQxMzQ5NWMwZDZjNDBmNzUxM2JhYTUjMSMxNDIzMTI2NDkyIyMj"},"showLiga":true,"fontHostingName":false}} -------------------------------------------------------------------------------- /fonts/icon-feather/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-feather/icomoon.eot -------------------------------------------------------------------------------- /fonts/icon-feather/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /fonts/icon-feather/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-feather/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icon-feather/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-feather/icomoon.woff -------------------------------------------------------------------------------- /fonts/icon-feather/selection.json: -------------------------------------------------------------------------------- 1 | {"IcoMoonType":"selection","icons":[{"icon":{"paths":["M298.667 42.667h426.667q53 0 90.5 37.5t37.5 90.5v810.667l-341.333-256-341.333 256v-810.667q0-53 37.5-90.5t90.5-37.5zM725.333 128h-426.667q-17.667 0-30.167 12.5t-12.5 30.167v640l256-192 256 192v-640q0-17.667-12.5-30.167t-30.167-12.5z"],"attrs":[],"isMulticolor":false,"tags":["ribbon"],"defaultCode":57353,"grid":24},"attrs":[],"properties":{"id":9,"order":138,"prevSize":24,"code":57353,"name":"ribbon"},"setIdx":0,"setId":0,"iconIdx":9},{"icon":{"paths":["M512 170.667q131 0 255 46t225 135.333q14.333 12.333 14.333 32 0 16.667-10.667 28.333l-2 2q-12.333 12.333-30 12.333-16.667 0-28.333-10.667-89-78.667-198.5-119.333t-224.833-40.667-224.833 40.667-198.5 119.333q-11.667 10.667-28.333 10.667-19.667 0-32-14.333-10.667-11.667-10.667-28.333 0-19.667 14.333-32 101.333-89.333 225.167-135.333t254.833-46zM512.333 682.667q58 0 107.667 29.333 10 6 15.667 15.833t5.667 21.167-6 21.333q-3 5-6.667 8.667-12.333 12.333-30.333 12.333-12 0-21.333-5.667-30.333-17.667-64.667-17.667-34.667 0-65 17.667-10.667 6-21.667 6-24.333 0-37-21-6-10-6-21.333 0-24.333 21-37 50.333-29.667 108.667-29.667zM512 427q80.667 0 157 26.667t140 79q15.667 12.667 15.667 33 0 15.333-9.667 27-2 2.667-2.667 3.333-12.333 12.333-30 12.333-15.667 0-27.333-9.667-52-42.667-114.667-64.667t-128.333-22-128.333 22-114.667 64.667q-11.667 9.667-27 9.667-20.333 0-33-15.667-9.667-11.667-9.667-27 0-20.333 15.667-33 63.333-52.333 140-79t157-26.667z"],"attrs":[],"isMulticolor":false,"tags":["signal","wave"],"defaultCode":57361,"grid":24},"attrs":[],"properties":{"id":11,"order":137,"prevSize":24,"code":57361,"name":"signal"},"setIdx":0,"setId":0,"iconIdx":11},{"icon":{"paths":["M512 42.667q87.333 0 169 10.5t149.833 30.667 109.333 53.667 41.167 75.833v597.333q0 42.333-41.167 75.833t-109.333 53.667-149.833 30.667-169 10.5-169-10.5-149.833-30.667-109.333-53.667-41.167-75.833v-597.333q0-42.333 41.167-75.833t109.333-53.667 149.833-30.667 169-10.5zM896 810v-194.333q-65.333 33-168.333 50t-215.667 17-215.667-17-168.333-50v195q2 7.333 17.833 17.667t48.5 22.333 76 22 107 16.667 134.667 6.667 134.667-6.667 107-16.833 76-22.167 48.5-22.333 17.833-18zM896 511.333v-194.333q-65.333 33-168.333 50t-215.667 17-215.667-17-168.333-50v195q2 7.333 17.833 17.667t48.5 22.333 76 22 107 16.667 134.667 6.667 134.667-6.667 106.833-16.667 75.833-22 48.667-22.5 18-18.167zM512 128q-70.333 0-133.667 6.667t-106.333 16.5-75.833 21.667-49.167 22.333-19 18.167q2.667 7.667 19 18.167t49.167 22.333 75.833 21.667 106.333 16.5 133.667 6.667 133.667-6.667 106.333-16.5 75.833-21.667 49.167-22.333 19-18.167q-2.667-7.667-19-18.167t-49.167-22.333-75.833-21.667-106.333-16.5-133.667-6.667z"],"attrs":[],"isMulticolor":false,"tags":["server"],"defaultCode":57378,"grid":24},"attrs":[],"properties":{"id":22,"order":134,"prevSize":24,"code":57378,"name":"server"},"setIdx":0,"setId":0,"iconIdx":22},{"icon":{"paths":["M753.333 85.333q69.667 0 128.5 34.333t93.167 93.167 34.333 128.5q0 50-19.167 97.167t-55.833 83.833l-422.333 422.333-422.333-422.333q-36.667-36.667-55.833-83.833t-19.167-97.167q0-69.667 34.333-128.5t93.167-93.167 128.5-34.333q50.333 0 97.167 19t83.833 56l60.333 60.333 60.333-60.333q36.667-36.667 83.833-55.833t97.167-19.167zM753.333 170.667q-33.333 0-64.667 12.667t-56 37.333l-120.667 120.667-120.667-120.667q-24.667-24.667-56-37.333t-64.667-12.667q-46.667 0-85.833 22.833t-62 62-22.833 85.833q0 33.333 12.667 64.667t37.333 56l362 362 362-362q24.667-24.667 37.333-56t12.667-64.667q0-46.667-22.833-85.833t-62-62-85.833-22.833z"],"attrs":[],"isMulticolor":false,"tags":["heart"],"defaultCode":57380,"grid":24},"attrs":[],"properties":{"id":24,"order":136,"prevSize":24,"code":57380,"name":"heart"},"setIdx":0,"setId":0,"iconIdx":24},{"icon":{"paths":["M0 298.667l512-256 512 256-512 256zM512 821.667l416-208.333 96 48-512 256.333-512-256.333 96-48zM512 640.333l416-208 96 48-512 256-512-256 96-48zM833.333 298.667l-321.333-160.667-321.333 160.667 321.333 160.667z"],"attrs":[],"isMulticolor":false,"tags":["layers"],"defaultCode":57393,"grid":24},"attrs":[],"properties":{"id":31,"order":133,"prevSize":24,"code":57393,"name":"layers"},"setIdx":0,"setId":0,"iconIdx":31},{"icon":{"paths":["M426.667 42.667q78 0 149.167 30.5t122.5 81.833 81.833 122.5 30.5 149.167q0 67-21.833 128.333t-62.167 111.333l242.333 242q12.333 12.333 12.333 30.333 0 18.333-12.167 30.5t-30.5 12.167q-18 0-30.333-12.333l-242-242.333q-50 40.333-111.333 62.167t-128.333 21.833q-78 0-149.167-30.5t-122.5-81.833-81.833-122.5-30.5-149.167 30.5-149.167 81.833-122.5 122.5-81.833 149.167-30.5zM426.667 128q-60.667 0-116 23.667t-95.333 63.667-63.667 95.333-23.667 116 23.667 116 63.667 95.333 95.333 63.667 116 23.667 116-23.667 95.333-63.667 63.667-95.333 23.667-116-23.667-116-63.667-95.333-95.333-63.667-116-23.667z"],"attrs":[],"isMulticolor":false,"tags":["search"],"defaultCode":57398,"grid":24},"attrs":[],"properties":{"id":36,"order":140,"prevSize":24,"code":57398,"name":"search"},"setIdx":0,"setId":0,"iconIdx":36},{"icon":{"paths":["M240.333 325.667l271.667-271.667 271.667 271.667q55.333 55.333 83.833 126t28.5 145.667q0 75.333-28.5 145.667t-83.833 125.667-126 84-145.667 28.667-145.667-28.667-126-84q-55-55.333-83.667-125.833t-28.667-145.5 28.667-145.667 83.667-126zM723.333 386l-211.333-211.333-211.333 211.333q-42.667 43-65 98t-22.333 113.333 22.167 113.167 65.167 97.833 98 65.333 113.333 22.333q58.667 0 113.5-22.333t97.833-65.333 65.167-97.667 22.167-113.333q0-58.333-22.167-113.333t-65.167-98z"],"attrs":[],"isMulticolor":false,"tags":["drop"],"defaultCode":57443,"grid":24},"attrs":[],"properties":{"id":63,"order":131,"prevSize":24,"code":57443,"name":"drop","ligatures":""},"setIdx":0,"setId":0,"iconIdx":63},{"icon":{"paths":["M512 0q69.667 0 128.5 34.333t93.167 93.167 34.333 128.5v128q0 53.333-20.667 101t-57.667 83q97.333 15.333 173 45.167t118.5 70.5 42.833 85.667v84q0 53-37.5 90.5t-90.5 37.5h-768q-53 0-90.5-37.5t-37.5-90.5v-84.333q0-45 42.833-85.667t118.333-70.5 172.833-44.833q-36.667-35.667-57.333-83.167t-20.667-100.833v-128q0-69.667 34.333-128.5t93.167-93.167 128.5-34.333zM512 640q-92.667 0-178.833 14.833t-150.167 41.5q-25.667 10.667-45.833 22.667t-30.667 21.667-15.833 16.833-5.333 11.5v84.333q0 17.667 12.5 30.167t30.167 12.5h768q17.667 0 30.167-12.5t12.5-30.167v-84q0-4.333-5.333-11.5t-15.833-16.833-30.667-21.667-45.833-23q-64-26.667-150.167-41.5t-178.833-14.833zM512 85.333q-70.667 0-120.667 50t-50 120.667v128q0 70.667 50 120.667t120.667 50 120.667-50 50-120.667v-128q0-70.667-50-120.667t-120.667-50z"],"attrs":[],"isMulticolor":false,"tags":["head"],"defaultCode":57460,"grid":24},"attrs":[],"properties":{"id":74,"order":135,"prevSize":24,"code":57460,"name":"head"},"setIdx":0,"setId":0,"iconIdx":74},{"icon":{"paths":["M298.667 42.667q35.333 0 76 8.833t78.333 21.333l75.333 25t78.333 21.333 76 8.833q36 0 71-4.333t59.667-10.667 44.167-12.667 29.167-10.667l9.333-4.333v597.333q-3.333 1.667-10 4.5t-28.167 10.333-44.833 13-58.833 10.167-71.5 4.667q-35.333 0-76-8.833t-78.333-21.333l-75.333-25t-78.333-21.333-76-8.833q-63.667 0-128 14.333v284.333q0 17.667-12.5 30.167t-30.167 12.5-30.167-12.5-12.5-30.167v-853.333q3.333-1.667 10-4.5t28.167-10.333 44.833-13 58.833-10.167 71.5-4.667zM298.667 128q-65.333 0-128 17v422.333q64-12.667 128-12.667 47.333 0 94.667 10.833t107.667 30.833q7.667 2.667 28.833 9.833t31 10.333 28.833 8.667 31.833 8 29.5 4.667 31.667 2.167q65.333 0 128-17v-422.333q-64 12.667-128 12.667-47.333 0-94.667-10.833t-107.667-30.833q-7.667-2.667-28.833-9.833t-31-10.333-28.833-8.667-31.833-8-29.5-4.667-31.667-2.167z"],"attrs":[],"isMulticolor":false,"tags":["flag"],"defaultCode":57608,"grid":24},"attrs":[],"properties":{"id":108,"order":132,"prevSize":24,"code":57608,"name":"flag"},"setIdx":0,"setId":0,"iconIdx":108},{"icon":{"paths":["M170.667 42.667h298.667q17.667 0 30.167 12.5t12.5 30.167-12.5 30.167-30.167 12.5h-298.667q-17.667 0-30.167 12.5t-12.5 30.167v682.667q0 17.667 12.5 30.167t30.167 12.5h682.667q17.667 0 30.167-12.5t12.5-30.167v-298.667q0-17.667 12.5-30.167t30.167-12.5 30.167 12.5 12.5 30.167v298.667q0 53-37.5 90.5t-90.5 37.5h-682.667q-53 0-90.5-37.5t-37.5-90.5v-682.667q0-53 37.5-90.5t90.5-37.5zM682.667 42.667h256q17.667 0 30.167 12.5t12.5 30.167v256q0 17.667-12.5 30.167t-30.167 12.5-30.167-12.5-12.5-30.167v-153l-354 354q-12.333 12.333-30 12.333-18.333 0-30.5-12.167t-12.167-30.5q0-17.667 12.333-30l354-354h-153q-17.667 0-30.167-12.5t-12.5-30.167 12.5-30.167 30.167-12.5z"],"attrs":[],"isMulticolor":false,"tags":["open"],"defaultCode":57640,"grid":24},"attrs":[],"properties":{"id":128,"order":139,"prevSize":24,"code":57640,"name":"open"},"setIdx":0,"setId":0,"iconIdx":128}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"autoHost":true,"showSelector":true,"selector":"","showMetrics":true,"showMetadata":true,"showVersion":true},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":4473924,"bgColor":16777215,"classSelector":".icon"},"historySize":100,"showCodes":true,"quickUsageToken":{"UntitledProject":"NGQ3ZDQyOTcwODQxMzQ5NWMwZDZjNDBmNzUxM2JhYTUjMSMxNDIzMTI2NDkyIyMj"},"showLiga":true,"fontHostingName":false}} -------------------------------------------------------------------------------- /fonts/icon-fifty-shades/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-fifty-shades/icomoon.eot -------------------------------------------------------------------------------- /fonts/icon-fifty-shades/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /fonts/icon-fifty-shades/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-fifty-shades/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icon-fifty-shades/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-fifty-shades/icomoon.woff -------------------------------------------------------------------------------- /fonts/icon-fifty-shades/selection.json: -------------------------------------------------------------------------------- 1 | {"IcoMoonType":"selection","icons":[{"icon":{"paths":["M960 448c-35.376 0-64 28.656-64 64v384h-768v-384c0-35.344-28.624-64-64-64s-64 28.656-64 64v448c0 35.344 28.624 64 64 64h896c35.376 0 64-28.656 64-64v-448c0-35.344-28.624-64-64-64zM448 640c0 35.344 28.624 64 64 64s64-28.656 64-64v-384h192l-256-256-256 256h192v384z"],"attrs":[],"isMulticolor":false,"tags":["out","upload","load","outbox"],"grid":16},"attrs":[],"properties":{"id":1,"order":403,"prevSize":16,"code":58880,"name":"out"},"setIdx":0,"setId":0,"iconIdx":1},{"icon":{"paths":["M1005.376 396.968l-378.218-378.186c-14.434-14.496-33.802-20.088-52.736-18.526h-124.844c-18.932-1.562-38.302 4.030-52.736 18.526l-76.792 76.794-0-95.32h-191.952v287.272l-109.474 109.44c-14.496 14.496-20.056 33.834-18.494 52.736v126.404c0 35.336 28.618 63.986 63.982 63.986h63.984v319.918c0 35.336 28.618 63.984 63.984 63.984h639.84c35.366 0 63.984-28.648 63.984-63.984v-319.916h63.982c35.368 0 63.984-28.65 63.984-63.986v-126.404c1.564-18.904-3.996-38.242-18.494-52.738zM895.904 512.126h-127.968v383.902h-127.966v-255.932h-255.936v255.934h-127.968v-383.904h-127.968v-35.492l348.412-348.412h70.982l348.412 348.412v35.492z"],"attrs":[],"isMulticolor":false,"tags":["home","house","building"],"grid":16},"attrs":[],"properties":{"id":4,"order":394,"prevSize":16,"code":58881,"name":"home"},"setIdx":0,"setId":0,"iconIdx":4},{"icon":{"paths":["M544 0h-64c-194.438 0-352 157.594-352 352 0 136.796 78.018 255.364 192 313.624v38.376c0 35.344 28.624 64 64 64h256c35.376 0 64-28.656 64-64v-38.39c113.964-58.266 192-176.824 192-313.61 0-194.406-157.624-352-352-352zM576 573.714v66.286h-128v-66.286c-108.534-15.532-192-108.866-192-221.714 0-123.718 100.312-224 224-224h64c123.688 0 224 100.282 224 224 0 112.85-83.466 206.184-192 221.714zM416 832h192c17.688 0 32 14.344 32 32s-14.312 32-32 32h-192c-17.688 0-32-14.344-32-32s14.312-32 32-32zM480 960h64c17.688 0 32 14.344 32 32s-14.312 32-32 32h-64c-17.688 0-32-14.344-32-32s14.312-32 32-32z"],"attrs":[],"isMulticolor":false,"tags":["light bulb","idea","bulb"],"grid":16},"attrs":[],"properties":{"id":5,"order":398,"prevSize":16,"code":58882,"name":"lightbulb"},"setIdx":0,"setId":0,"iconIdx":5},{"icon":{"paths":["M866.412 85.244c-35.778-19.724-134.4-68.29-198.738-81.634-66.828-13.876-166.26 247.054-197.87 248.206-51.27 1.834-6.222-178.144 42.498-251.816-76.038 50.774-211.122 118.94-242.73 197.34-61.104 151.512 113.244 424.172 20.222 439.852-28.996 4.884-109.326-188.038-130.17-246.898-58.926 112.624-14.56 218.058 34.16 349.786v8.18c-1.868 7.124-3.484 13.94-5.166 20.876h5.166v191.148c0 35.218 28.498 63.716 63.714 63.716 35.218 0 63.716-28.498 63.716-63.716v-191.148-2.022c118.908-13.378 174.846 25.604 256.294-128.832-49.714 20.562-148.96-42.094-128.366-71.682 41.378-59.546 210.562 3.362 318.394-179.668-170.678 45.484-190.838-19.724-192.456-43.494-3.422-49.216 170.616-23.146 249.95-91.56 45.988-39.668 101.116-133.656 41.382-166.634z"],"attrs":[],"isMulticolor":false,"tags":["feather","quill","write","blog"],"grid":16},"attrs":[],"properties":{"id":7,"order":402,"prevSize":16,"code":58883,"name":"feather"},"setIdx":0,"setId":0,"iconIdx":7},{"icon":{"paths":["M995.828 995.826c-37.566 37.564-98.45 37.564-136.016 0l-169.726-169.726c-69.776 44.764-152.26 71.434-241.318 71.434-247.83 0-448.768-200.908-448.768-448.768s200.938-448.766 448.768-448.766c247.862 0 448.768 200.904 448.768 448.766 0 89.028-26.704 171.542-71.436 241.352l169.728 169.726c37.562 37.564 37.562 98.418 0 135.982zM448.768 128.218c-177.022 0-320.548 143.494-320.548 320.546s143.526 320.548 320.548 320.548c177.052 0 320.548-143.496 320.548-320.548s-143.496-320.546-320.548-320.546z"],"attrs":[],"isMulticolor":false,"tags":["search","find","lookup","magnifier"],"grid":16},"attrs":[],"properties":{"id":10,"order":395,"prevSize":16,"code":58884,"name":"search"},"setIdx":0,"setId":0,"iconIdx":10},{"icon":{"paths":["M512 192l-384-192h-64c-35.376 0-64 28.656-64 64v704c0 35.376 28.624 64 64 64l448 192 448-192c35.376 0 64-28.624 64-64v-704c0-35.344-28.624-64-64-64h-64M448 864l-320-160v-512l320 106.656v565.344zM896 704l-320 160v-565.344l320-106.656v512z"],"attrs":[],"isMulticolor":false,"tags":["book","read","bookmark"],"grid":16},"attrs":[],"properties":{"id":20,"order":401,"prevSize":16,"code":58885,"name":"book"},"setIdx":0,"setId":0,"iconIdx":20},{"icon":{"paths":["M960 1024h-896c-35.344 0-64-28.624-64-64v-896c0-35.376 28.656-64 64-64h640l-128 128h-448v768h768v-448l128-128v640c0 35.376-28.656 64-64 64zM256 768v-192l576-576h64l128 128v64l-576 576h-192zM544 544l352-352-64-64-352 352 64 64zM384 576l-64 64v64h64l64-64-64-64z"],"attrs":[],"isMulticolor":false,"tags":["compose","write","blog","edit"],"grid":16},"attrs":[],"properties":{"id":34,"order":397,"prevSize":16,"code":58886,"name":"compose"},"setIdx":0,"setId":0,"iconIdx":34},{"icon":{"paths":["M384 576h-320c-35.376 0-64 28.624-64 64v320c0 35.376 28.624 64 64 64h320c35.376 0 64-28.624 64-64v-320c0-35.376-28.624-64-64-64zM320 896h-192v-192h192v192zM384 0h-320c-35.376 0-64 28.624-64 64v320c0 35.376 28.624 64 64 64h320c35.376 0 64-28.624 64-64v-320c0-35.376-28.624-64-64-64zM320 320h-192v-192h192v192zM960 576h-320c-35.376 0-64 28.624-64 64v320c0 35.376 28.624 64 64 64h320c35.376 0 64-28.624 64-64v-320c0-35.376-28.624-64-64-64zM896 896h-192v-192h192v192zM960 0h-320c-35.376 0-64 28.624-64 64v320c0 35.376 28.624 64 64 64h320c35.376 0 64-28.624 64-64v-320c0-35.376-28.624-64-64-64zM896 320h-192v-192h192v192z"],"attrs":[],"isMulticolor":false,"tags":["grid","apps","squares","blocks"],"grid":16},"attrs":[],"properties":{"id":42,"order":400,"prevSize":16,"code":58887,"name":"grid"},"setIdx":0,"setId":0,"iconIdx":42},{"icon":{"paths":["M763.688 490.812c2.374-13.936 4.312-28.124 4.312-42.812v-192c0-141.376-114.624-256-256-256s-256 114.624-256 256v192c0 14.688 1.938 28.876 4.312 42.812-154.874 55-260.312 157.938-260.312 277.188v192c0 35.376 28.624 64 64 64h896c35.376 0 64-28.624 64-64v-192c0-119.25-105.438-222.188-260.312-277.188zM384 256c0-70.688 57.312-128 128-128s128 57.312 128 128v192c0 70.688-57.312 128-128 128s-128-57.312-128-128v-192zM896 896h-768v-128c0-69.124 73.624-129.188 183.188-163 46.874 59.876 118.936 99 200.812 99s153.938-39.124 200.812-99c109.564 33.812 183.188 93.876 183.188 163v128z"],"attrs":[],"isMulticolor":false,"tags":["user","profile","avatar"],"grid":16},"attrs":[],"properties":{"id":55,"order":396,"prevSize":16,"code":58888,"name":"user"},"setIdx":0,"setId":0,"iconIdx":55},{"icon":{"paths":["M1024 384c0 283.938-512 640-512 640s-512-356.062-512-640c-0.562-28.312 2.376-60.062 0-96-10.562-158.688 128.938-288 288-288 91.062 0 171.25 62.062 224 128 52.75-65.938 132.938-128 224-128 159.062 0 298.562 129.312 288 288-2.376 35.938 0.562 67.688 0 96zM896 288c7.938-88-71.624-160-160-160-165.812 0-160 128-160 128 0 35.376-28.624 64-64 64s-64-28.624-64-64c0 0 5.812-128-160-128-88.376 0-167.938 72-160 160 3.25 36.124-2.062 69.25 0.876 96-0.062 0-0.75 0-0.876 0 4-0.938-22 188.562 383.25 478.438 0.312-0.188 0.5-0.376 0.75-0.562 0.25 0.188 0.438 0.376 0.75 0.562 405.25-289.876 379.25-479.376 383.25-478.438-0.124 0-0.812 0-0.876 0 2.938-26.75-2.374-59.876 0.876-96z"],"attrs":[],"isMulticolor":false,"tags":["heart","love","like","favorite"],"grid":16},"attrs":[],"properties":{"id":57,"order":399,"prevSize":16,"code":58889,"name":"heart"},"setIdx":0,"setId":0,"iconIdx":57}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"autoHost":true,"showSelector":true,"selector":"","showMetrics":true,"showMetadata":true,"showVersion":true},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":4473924,"bgColor":16777215,"classSelector":".icon"},"historySize":100,"showCodes":true,"quickUsageToken":{"UntitledProject":"NGQ3ZDQyOTcwODQxMzQ5NWMwZDZjNDBmNzUxM2JhYTUjMSMxNDIzMTI2NDkyIyMj"},"showLiga":true,"fontHostingName":false}} -------------------------------------------------------------------------------- /fonts/icon-icomoon/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-icomoon/icomoon.eot -------------------------------------------------------------------------------- /fonts/icon-icomoon/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /fonts/icon-icomoon/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-icomoon/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icon-icomoon/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-icomoon/icomoon.woff -------------------------------------------------------------------------------- /fonts/icon-linecons/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-linecons/icomoon.eot -------------------------------------------------------------------------------- /fonts/icon-linecons/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-linecons/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icon-linecons/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/fonts/icon-linecons/icomoon.woff -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 2 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | is('post')): ?> 42 | 43 | 44 | 45 | 46 | is('page','archive')||$this->is('archive')): ?> 47 | 50 | 51 | 52 | 53 | 61 | 62 | 63 | options->next_comments)): ?> 64 | 65 | 76 | 77 | 78 | 79 | footer(); ?> 80 | 81 | 82 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | siteUrl; 7 | 8 | $next_name = new Typecho_Widget_Helper_Form_Element_Text('next_name', NULL, '', _t('侧边栏显示的昵称'), _t('显示在头像下方')); 9 | $next_name->input->setAttribute('class', 'w-100 mono'); 10 | $form->addInput($next_name); 11 | 12 | 13 | $next_gravatar = new Typecho_Widget_Helper_Form_Element_Text('next_gravatar', NULL, '', _t('侧边栏头像'), _t('填写 Gravatar 头像的邮箱地址')); 14 | $next_gravatar->input->setAttribute('class', 'w-100 mono'); 15 | $form->addInput($next_gravatar->addRule('email', '请填写一个邮箱地址')); 16 | 17 | $next_tips = new Typecho_Widget_Helper_Form_Element_Text('next_tips', NULL, '一个高端大气上档次的网站', _t('站点描述'), _t('将显示在侧边栏的昵称下方')); 18 | $form->addInput($next_tips); 19 | 20 | $next_cdn = new Typecho_Widget_Helper_Form_Element_Text('next_cdn', NULL, $siteUrl, _t('CDN 镜像地址'), _t('静态文件 CDN 镜像加速地址,加速js和css,如七牛,又拍云等
格式参考:'.$siteUrl.'
不用请留空或者保持默认')); 21 | $form->addInput($next_cdn); 22 | 23 | $sidebar = new Typecho_Widget_Helper_Form_Element_Radio('sidebar', 24 | array(_t('始终自动弹出'), 25 | _t('文章中有目录时弹出'), 26 | _t('不自动弹出') 27 | ), 28 | 1, _t('侧边栏自动弹出设置')); 29 | 30 | $form->addInput($sidebar); 31 | 32 | $next_comments = new Typecho_Widget_Helper_Form_Element_Text('next_comments', NULL, '', _t('多说评论'), _t('填写多说评论的short_name,如果使用自带评论则不填')); 33 | 34 | $form->addInput($next_comments); 35 | 36 | $search_form = new Typecho_Widget_Helper_Form_Element_Checkbox('search_form', 37 | array('Motion' => _t('启用动画效果'), 38 | 'ShowSearch' => _t('显示搜索框'), 39 | 'ShowFeed' => _t('显示 RSS 订阅'), 40 | ), 41 | array('ShowSearch','ShowFeed','Motion'), _t('其他设置')); 42 | 43 | $form->addInput($search_form->multiMode()); 44 | } 45 | 46 | function getGravatar($email, $s = 40, $d = 'mm', $g = 'g') { 47 | 48 | $hash = md5($email); 49 | 50 | $avatar = "//cdn.v2ex.com/gravatar/$hash?s=$s&d=$d&r=$g"; 51 | 52 | return $avatar; 53 | 54 | } 55 | 56 | function getTagCount() 57 | { 58 | $tags = Typecho_Widget::widget('Widget_Metas_Tag_Cloud'); 59 | // 获取标签数目 60 | $count = 0; 61 | while ($tags->next()): 62 | $count++; 63 | endwhile; 64 | return $count; 65 | } 66 | 67 | /* 68 | function themeFields($layout) { 69 | $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO')); 70 | $layout->addItem($logoUrl); 71 | } 72 | */ 73 | function themeInit($archive) { 74 | 75 | //归档列表全部输出 76 | if ($archive->is('archive')&& !$archive->is('search')) { 77 | $archive->parameter->pageSize = 10000; // 自定义条数 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | options->next_cdn) && $this->options->next_cdn){ 5 | define('__TYPECHO_THEME_URL__', Typecho_Common::url(__TYPECHO_THEME_DIR__ . '/' . basename(dirname(__FILE__)) , $this->options->next_cdn)); 6 | } 7 | ?> 8 | theme-next-mist"> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 45 | <?php $this->archiveTitle(array( 46 | 'category' => _t('分类 %s 下的文章'), 47 | 'search' => _t('包含关键字 %s 的文章'), 48 | 'tag' => _t('标签 %s 下的文章'), 49 | 'author' => _t('%s 发布的文章') 50 | ), '', ' - '); ?><?php $this->options->title(); ?> 51 | 52 | 53 | header(); ?> 54 | 55 | 56 | 57 | 58 | 59 |
is('page','archive')||$this->is('archive')) echo "page-archive";?>"> 60 | 61 |
62 | 63 | 111 | 112 | -------------------------------------------------------------------------------- /images/bkdefault_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/images/bkdefault_avatar.jpg -------------------------------------------------------------------------------- /images/cc-by-nc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /images/cc-by-nd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 81 | 88 | 93 | 97 | 106 | 110 | 111 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /images/cc-by.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /images/cc-zero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 38 | 45 | 46 | 47 | 53 | 57 | 63 | 66 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/images/loading.gif -------------------------------------------------------------------------------- /images/placeholder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/images/placeholder.gif -------------------------------------------------------------------------------- /images/quote-l.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /images/quote-r.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /images/searchicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/images/searchicon.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 13 | ?> 14 |
15 |
16 |
17 |
18 | 19 | next()): ?> 20 | 61 | 62 |
63 | pageNav('« ', ' »',5,'...',array('wrapTag' => 'nav','wrapClass' =>'pagination','itemTag'=>'','prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current')); ?> 64 |
65 |
66 | 67 | need('sidebar.php'); ?> 68 |
69 | 70 | need('footer.php'); ?> 71 | -------------------------------------------------------------------------------- /js/bootstrap.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | 3 | isMobile() && FastClick.attach(document.body); 4 | /* 5 | $("#posts").find('img').lazyload({ 6 | placeholder: "{{ url_for(theme.images) }}/loading.gif", 7 | effect: "fadeIn" 8 | }); 9 | */ 10 | $('.back-to-top').on('click', function () { 11 | $('body').velocity('scroll'); 12 | }); 13 | 14 | $('.site-nav-toggle button').on('click', function () { 15 | var $siteNav = $('.site-nav'); 16 | var ON_CLASS_NAME = 'site-nav-on'; 17 | var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME); 18 | var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown'; 19 | var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass'; 20 | 21 | $siteNav.stop()[animateAction]('fast', function () { 22 | $siteNav[animateCallback](ON_CLASS_NAME); 23 | }); 24 | }); 25 | 26 | // Define Motion Sequence. 27 | motionIntegrator 28 | .add(motionMiddleWares.logo) 29 | .add(motionMiddleWares.menu) 30 | .add(motionMiddleWares.postList) 31 | .add(motionMiddleWares.sidebar); 32 | 33 | // Bootstrap Motion. 34 | CONFIG.motion && motionIntegrator.bootstrap(); 35 | }); 36 | -------------------------------------------------------------------------------- /js/bootstrap.scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: scrollspy.js v3.3.2 3 | * http://getbootstrap.com/javascript/#scrollspy 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | /** 10 | * Custom by iissnan 11 | * 12 | * - Add a `clear.bs.scrollspy` event. 13 | * - Esacpe targets selector. 14 | */ 15 | 16 | 17 | +function ($) { 18 | 'use strict'; 19 | 20 | // SCROLLSPY CLASS DEFINITION 21 | // ========================== 22 | 23 | function ScrollSpy(element, options) { 24 | this.$body = $(document.body) 25 | this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 26 | this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 27 | this.selector = (this.options.target || '') + ' .nav li > a' 28 | this.offsets = [] 29 | this.targets = [] 30 | this.activeTarget = null 31 | this.scrollHeight = 0 32 | 33 | this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 34 | this.refresh() 35 | this.process() 36 | } 37 | 38 | ScrollSpy.VERSION = '3.3.2' 39 | 40 | ScrollSpy.DEFAULTS = { 41 | offset: 10 42 | } 43 | 44 | ScrollSpy.prototype.getScrollHeight = function () { 45 | return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 46 | } 47 | 48 | ScrollSpy.prototype.refresh = function () { 49 | var that = this 50 | var offsetMethod = 'offset' 51 | var offsetBase = 0 52 | 53 | this.offsets = [] 54 | this.targets = [] 55 | this.scrollHeight = this.getScrollHeight() 56 | 57 | if (!$.isWindow(this.$scrollElement[0])) { 58 | offsetMethod = 'position' 59 | offsetBase = this.$scrollElement.scrollTop() 60 | } 61 | 62 | this.$body 63 | .find(this.selector) 64 | .map(function () { 65 | var $el = $(this) 66 | var href = $el.data('target') || $el.attr('href') 67 | var $href = /^#./.test(href) && $(escapeSelector(href)) // Need to escape selector. 68 | 69 | return ($href 70 | && $href.length 71 | && $href.is(':visible') 72 | && [[$href[offsetMethod]().top + offsetBase, href]]) || null 73 | }) 74 | .sort(function (a, b) { return a[0] - b[0] }) 75 | .each(function () { 76 | that.offsets.push(this[0]) 77 | that.targets.push(this[1]) 78 | }) 79 | 80 | 81 | } 82 | 83 | ScrollSpy.prototype.process = function () { 84 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 85 | var scrollHeight = this.getScrollHeight() 86 | var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 87 | var offsets = this.offsets 88 | var targets = this.targets 89 | var activeTarget = this.activeTarget 90 | var i 91 | 92 | if (this.scrollHeight != scrollHeight) { 93 | this.refresh() 94 | } 95 | 96 | if (scrollTop >= maxScroll) { 97 | return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 98 | } 99 | 100 | if (activeTarget && scrollTop < offsets[0]) { 101 | $(this.selector).trigger('clear.bs.scrollspy') // Add a custom event. 102 | this.activeTarget = null 103 | return this.clear() 104 | } 105 | 106 | for (i = offsets.length; i--;) { 107 | activeTarget != targets[i] 108 | && scrollTop >= offsets[i] 109 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 110 | && this.activate(targets[i]) 111 | } 112 | } 113 | 114 | ScrollSpy.prototype.activate = function (target) { 115 | this.activeTarget = target 116 | 117 | this.clear() 118 | 119 | var selector = this.selector + 120 | '[data-target="' + target + '"],' + 121 | this.selector + '[href="' + target + '"]' 122 | 123 | var active = $(selector) 124 | .parents('li') 125 | .addClass('active') 126 | 127 | if (active.parent('.dropdown-menu').length) { 128 | active = active 129 | .closest('li.dropdown') 130 | .addClass('active') 131 | } 132 | 133 | active.trigger('activate.bs.scrollspy') 134 | } 135 | 136 | ScrollSpy.prototype.clear = function () { 137 | $(this.selector) 138 | .parentsUntil(this.options.target, '.active') 139 | .removeClass('active') 140 | } 141 | 142 | 143 | // SCROLLSPY PLUGIN DEFINITION 144 | // =========================== 145 | 146 | function Plugin(option) { 147 | return this.each(function () { 148 | var $this = $(this) 149 | var data = $this.data('bs.scrollspy') 150 | var options = typeof option == 'object' && option 151 | 152 | if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 153 | if (typeof option == 'string') data[option]() 154 | }) 155 | } 156 | 157 | var old = $.fn.scrollspy 158 | 159 | $.fn.scrollspy = Plugin 160 | $.fn.scrollspy.Constructor = ScrollSpy 161 | 162 | 163 | // SCROLLSPY NO CONFLICT 164 | // ===================== 165 | 166 | $.fn.scrollspy.noConflict = function () { 167 | $.fn.scrollspy = old 168 | return this 169 | } 170 | 171 | 172 | // SCROLLSPY DATA-API 173 | // ================== 174 | 175 | $(window).on('load.bs.scrollspy.data-api', function () { 176 | $('[data-spy="scroll"]').each(function () { 177 | var $spy = $(this) 178 | Plugin.call($spy, $spy.data()) 179 | }) 180 | }) 181 | 182 | }(jQuery); 183 | -------------------------------------------------------------------------------- /js/fancy-box.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('.content img').not('.group-picture img').each(function () { 3 | 4 | var $image = $(this); 5 | var imageTitle = $image.attr('title'); 6 | var $imageWrapLink = $image.parent('a'); 7 | 8 | if ($imageWrapLink.size() < 1) { 9 | $imageWrapLink = $image.wrap('').parent('a'); 10 | } 11 | 12 | $imageWrapLink.addClass('fancybox'); 13 | $imageWrapLink.attr('rel', 'group'); 14 | 15 | if (imageTitle) { 16 | $imageWrapLink.append('

' + imageTitle + '

'); 17 | $imageWrapLink.attr("title", imageTitle); //make sure img title tag will show correctly in fancybox 18 | } 19 | }); 20 | }); 21 | 22 | $('.fancybox').fancybox({ 23 | helpers: { 24 | overlay: { 25 | locked: false 26 | } 27 | } 28 | }); 29 | 30 | 31 | -------------------------------------------------------------------------------- /js/helpers.js: -------------------------------------------------------------------------------- 1 | function hasMobileUA () { 2 | var nav = window.navigator; 3 | var ua = nav.userAgent; 4 | var pa = /iPad|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian/g; 5 | 6 | return pa.test(ua); 7 | } 8 | 9 | function isDesktop () { 10 | return screen.width > 991 && !hasMobileUA(); 11 | } 12 | 13 | function isTablet () { 14 | return screen.width < 992 && screen.width > 767 && hasMobileUA(); 15 | } 16 | 17 | function isMobile () { 18 | return screen.width < 767 && hasMobileUA(); 19 | } 20 | 21 | function escapeSelector (selector) { 22 | return selector.replace(/[!"$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&") 23 | } 24 | 25 | function displaySidebar () { 26 | if (!isDesktop()) { 27 | return; 28 | } 29 | $('.sidebar-toggle').trigger('click'); 30 | } 31 | 32 | function isMist () { 33 | return CONFIG.scheme === 'Mist'; 34 | } 35 | -------------------------------------------------------------------------------- /js/hook-duoshuo.js: -------------------------------------------------------------------------------- 1 | if (typeof DUOSHUO !== 'undefined') hookDUOSHUO_tp(); 2 | else $('#duoshuo-script')[0].onload = hookDUOSHUO_tp; 3 | 4 | function hookDUOSHUO_tp() { 5 | var _D_post = DUOSHUO.templates.post 6 | DUOSHUO.templates.post = function (e, t) { 7 | var rs = _D_post(e, t); 8 | var agent = e.post.agent; 9 | var isAdmin; 10 | if (typeof duoshuo_user_ID !== 'undefined') { 11 | if (e.post.author.user_id && (e.post.author.user_id == duoshuo_user_ID)) { 12 | if (duoshuo_admin_nickname) { 13 | isAdmin = '' + duoshuo_admin_nickname + ''; 14 | } else { 15 | isAdmin = '博主'; 16 | } 17 | } else { 18 | isAdmin = ''; 19 | } 20 | } else { 21 | isAdmin = ''; 22 | } 23 | if (agent && /^Mozilla/.test(agent)) rs = rs.replace(/<\/div>

/, isAdmin + showUa(agent) + '

'); 24 | return rs; 25 | } 26 | } 27 | //移动客户端判断 28 | function checkMobile() { 29 | var isiPad = navigator.userAgent.match(/iPad/i) !== null; 30 | if (isiPad) { 31 | return false; 32 | } 33 | var isMobile = navigator.userAgent.match(/iphone|android|phone|mobile|wap|netfront|x11|java|opera mobi|opera mini|ucweb|windows ce|symbian|symbianos|series|webos|sony|blackberry|dopod|nokia|samsung|palmsource|xda|pieplus|meizu|midp|cldc|motorola|foma|docomo|up.browser|up.link|blazer|helio|hosin|huawei|novarra|coolpad|webos|techfaith|palmsource|alcatel|amoi|ktouch|nexian|ericsson|philips|sagem|wellcom|bunjalloo|maui|smartphone|iemobile|spice|bird|zte-|longcos|pantech|gionee|portalmmm|jig browser|hiptop|benq|haier|^lct|320x320|240x320|176x220/i) != null; 34 | if (isMobile) { 35 | return true; 36 | } 37 | return false; 38 | } 39 | 40 | function showUa(string) { 41 | $.ua.set(string); 42 | var sua = $.ua; 43 | var br = '  '; 44 | var osIco = ' '; 45 | var browserIco = ' ' 46 | var osName = sua.os.name; 47 | var browserName = sua.browser.name; 48 | if (checkMobile()) br = '

'; 49 | 50 | if (osName.match(/Android/i)) osIco = ' '; 51 | if (osName.match(/linux/i)) osIco = ' '; 52 | if (osName.match(/mac os|ios/i)) osIco = ' '; 53 | if (sua.os.version == 'x86_64') sua.os.version = 'x64'; 54 | 55 | if (browserName.match(/chrome|chromium/i)) browserIco = ' '; 56 | if (browserName.match(/firefox/i)) browserIco = ' '; 57 | if (browserName.match(/opera/i)) browserIco = ' '; 58 | if (browserName.match(/safari/i)) browserIco = ' '; 59 | if (browserName.match(/ie/i)) browserIco = ' '; 60 | if (browserName.match(/WeChat/i)) browserIco = ' '; 61 | if (browserName.match(/QQBrowser/i)) browserIco = ' '; 62 | 63 | return br + '' + osIco + 64 | sua.os.name + ' ' + sua.os.version + '' + br + 65 | '' + browserIco + 66 | sua.browser.name + '|' + sua.browser.version + ''; 67 | } 68 | -------------------------------------------------------------------------------- /js/lazyload.js: -------------------------------------------------------------------------------- 1 | /*! Lazy Load 1.9.5 - MIT license - Copyright 2010-2015 Mika Tuupola */ 2 | !function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document); 3 | -------------------------------------------------------------------------------- /js/motion.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | var motionIntegrator = { 3 | queue: [], 4 | cursor: -1, 5 | add: function (fn) { 6 | this.queue.push(fn); 7 | return this; 8 | }, 9 | next: function () { 10 | this.cursor++; 11 | var fn = this.queue[this.cursor]; 12 | $.isFunction(fn) && fn(motionIntegrator); 13 | }, 14 | bootstrap: function () { 15 | this.next(); 16 | } 17 | }; 18 | 19 | var sidebarToggleLines = { 20 | lines: [], 21 | push: function (line) { 22 | this.lines.push(line); 23 | }, 24 | init: function () { 25 | this.lines.forEach(function (line) { 26 | line.init(); 27 | }); 28 | }, 29 | arrow: function () { 30 | this.lines.forEach(function (line) { 31 | line.arrow(); 32 | }); 33 | }, 34 | close: function () { 35 | this.lines.forEach(function (line) { 36 | line.close(); 37 | }); 38 | } 39 | }; 40 | 41 | function SidebarToggleLine(settings) { 42 | this.el = $(settings.el); 43 | this.status = $.extend({}, { 44 | init: { 45 | width: '100%', 46 | opacity: 1, 47 | left: 0, 48 | rotateZ: 0, 49 | top: 0 50 | } 51 | }, settings.status); 52 | } 53 | 54 | SidebarToggleLine.prototype.init = function () { 55 | this.transform('init'); 56 | }; 57 | SidebarToggleLine.prototype.arrow = function () { 58 | this.transform('arrow'); 59 | }; 60 | SidebarToggleLine.prototype.close = function () { 61 | this.transform('close'); 62 | }; 63 | SidebarToggleLine.prototype.transform = function (status) { 64 | this.el.velocity('stop').velocity(this.status[status]); 65 | }; 66 | 67 | var sidebarToggleLine1st = new SidebarToggleLine({ 68 | el: '.sidebar-toggle-line-first', 69 | status: { 70 | arrow: {width: '50%', rotateZ: '-45deg', top: '2px'}, 71 | close: {width: '100%', rotateZ: '-45deg', top: '5px'} 72 | } 73 | }); 74 | var sidebarToggleLine2nd = new SidebarToggleLine({ 75 | el: '.sidebar-toggle-line-middle', 76 | status: { 77 | arrow: {width: '90%'}, 78 | close: {opacity: 0} 79 | } 80 | }); 81 | var sidebarToggleLine3rd = new SidebarToggleLine({ 82 | el: '.sidebar-toggle-line-last', 83 | status: { 84 | arrow: {width: '50%', rotateZ: '45deg', top: '-2px'}, 85 | close: {width: '100%', rotateZ: '45deg', top: '-5px'} 86 | } 87 | }); 88 | 89 | sidebarToggleLines.push(sidebarToggleLine1st); 90 | sidebarToggleLines.push(sidebarToggleLine2nd); 91 | sidebarToggleLines.push(sidebarToggleLine3rd); 92 | 93 | var SIDEBAR_WIDTH = '320px'; 94 | var SIDEBAR_DISPLAY_DURATION = 200; 95 | 96 | var sidebarToggleMotion = { 97 | toggleEl: $('.sidebar-toggle'), 98 | sidebarEl: $('.sidebar'), 99 | isSidebarVisible: false, 100 | init: function () { 101 | this.toggleEl.on('click', this.clickHandler.bind(this)); 102 | this.toggleEl.on('mouseenter', this.mouseEnterHandler.bind(this)); 103 | this.toggleEl.on('mouseleave', this.mouseLeaveHandler.bind(this)); 104 | 105 | $(document) 106 | .on('sidebar.isShowing', function () { 107 | isDesktop() && $('body').velocity('stop').velocity( 108 | {paddingRight: SIDEBAR_WIDTH}, 109 | SIDEBAR_DISPLAY_DURATION 110 | ); 111 | }) 112 | .on('sidebar.isHiding', function () { 113 | }); 114 | }, 115 | clickHandler: function () { 116 | this.isSidebarVisible ? this.hideSidebar() : this.showSidebar(); 117 | this.isSidebarVisible = !this.isSidebarVisible; 118 | }, 119 | mouseEnterHandler: function () { 120 | if (this.isSidebarVisible) { 121 | return; 122 | } 123 | sidebarToggleLines.arrow(); 124 | }, 125 | mouseLeaveHandler: function () { 126 | if (this.isSidebarVisible) { 127 | return; 128 | } 129 | sidebarToggleLines.init(); 130 | }, 131 | showSidebar: function () { 132 | var self = this; 133 | 134 | sidebarToggleLines.close(); 135 | 136 | this.sidebarEl.velocity('stop').velocity({ 137 | width: SIDEBAR_WIDTH 138 | }, { 139 | display: 'block', 140 | duration: SIDEBAR_DISPLAY_DURATION, 141 | begin: function () { 142 | $('.sidebar .motion-element').velocity( 143 | 'transition.slideRightIn', 144 | { 145 | stagger: 50, 146 | drag: true, 147 | complete: function () { 148 | self.sidebarEl.trigger('sidebar.motion.complete'); 149 | } 150 | } 151 | ); 152 | }, 153 | complete: function () { 154 | self.sidebarEl.addClass('sidebar-active'); 155 | self.sidebarEl.trigger('sidebar.didShow'); 156 | } 157 | } 158 | ); 159 | 160 | this.sidebarEl.trigger('sidebar.isShowing'); 161 | }, 162 | hideSidebar: function () { 163 | isDesktop() && $('body').velocity('stop').velocity({paddingRight: 0}); 164 | this.sidebarEl.find('.motion-element').velocity('stop').css('display', 'none'); 165 | this.sidebarEl.velocity('stop').velocity({width: 0}, {display: 'none'}); 166 | 167 | sidebarToggleLines.init(); 168 | 169 | this.sidebarEl.removeClass('sidebar-active'); 170 | this.sidebarEl.trigger('sidebar.isHiding'); 171 | 172 | //在 post 页面下按下隐藏 sidebar 时如果当前选中的是“站点概览”,将 toc 去除 motion 效果 173 | //防止再次打开时会出现在“站点概览”下的 bug 174 | if (!!$('.post-toc-wrap')) { 175 | if ($('.site-overview').css('display') === 'block') { 176 | $('.post-toc-wrap').removeClass('motion-element'); 177 | } 178 | } 179 | } 180 | }; 181 | sidebarToggleMotion.init(); 182 | 183 | var motionMiddleWares = { 184 | logo: function (integrator) { 185 | var sequence = []; 186 | var $brand = $('.brand'); 187 | var $title = $('.site-title'); 188 | var $subtitle = $('.site-subtitle'); 189 | var $logoLineTop = $('.logo-line-before i'); 190 | var $logoLineBottom = $('.logo-line-after i'); 191 | 192 | $brand.size() > 0 && sequence.push({ 193 | e: $brand, 194 | p: {opacity: 1}, 195 | o: {duration: 200} 196 | }); 197 | 198 | isMist() && hasElement([$logoLineTop, $logoLineBottom]) && 199 | sequence.push( 200 | getMistLineSettings($logoLineTop, "100%"), 201 | getMistLineSettings($logoLineBottom, "-100%") 202 | ); 203 | 204 | hasElement($title) && sequence.push({ 205 | e: $title, 206 | p: {opacity: 1, top: 0}, 207 | o: { duration: 200 } 208 | }); 209 | 210 | hasElement($subtitle) && sequence.push({ 211 | e: $subtitle, 212 | p: {opacity: 1, top: 0}, 213 | o: {duration: 200} 214 | }); 215 | 216 | if (sequence.length > 0) { 217 | sequence[sequence.length - 1].o.complete = function () { 218 | integrator.next(); 219 | }; 220 | $.Velocity.RunSequence(sequence); 221 | } else { 222 | integrator.next(); 223 | } 224 | 225 | 226 | function getMistLineSettings (element, translateX) { 227 | return { 228 | e: $(element), 229 | p: {translateX: translateX}, 230 | o: { 231 | duration: 500, 232 | sequenceQueue: false 233 | } 234 | }; 235 | } 236 | 237 | /** 238 | * Check if $elements exist. 239 | * @param {jQuery|Array} $elements 240 | * @returns {boolean} 241 | */ 242 | function hasElement ($elements) { 243 | $elements = Array.isArray($elements) ? $elements : [$elements]; 244 | return $elements.every(function ($element) { 245 | return $.isFunction($element.size) && $element.size() > 0; 246 | }); 247 | } 248 | }, 249 | 250 | menu: function (integrator) { 251 | $('.menu-item').velocity('transition.slideDownIn', { 252 | display: null, 253 | duration: 200, 254 | complete: function () { 255 | integrator.next(); 256 | } 257 | }); 258 | }, 259 | 260 | postList: function (integrator) { 261 | var $post = $('.post'); 262 | var hasPost = $post.size() > 0; 263 | 264 | hasPost ? postMotion() : integrator.next(); 265 | 266 | function postMotion () { 267 | var postMotionOptions = window.postMotionOptions || { 268 | stagger: 100, 269 | drag: true 270 | }; 271 | postMotionOptions.complete = function () { 272 | integrator.next(); 273 | }; 274 | 275 | $post.velocity('transition.slideDownIn', postMotionOptions); 276 | } 277 | }, 278 | 279 | sidebar: function (integrator) { 280 | if (CONFIG.sidebar === 'always') { 281 | displaySidebar(); 282 | } 283 | integrator.next(); 284 | } 285 | }; 286 | 287 | window.motionMiddleWares = motionMiddleWares; 288 | window.motionIntegrator = motionIntegrator; 289 | }); 290 | -------------------------------------------------------------------------------- /js/motion_fallback.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | var isSidebarVisible; 3 | var DURATION = 300; 4 | var SIDEBAR_WIDTH = 320; 5 | 6 | sidebar(); 7 | backToTop(); 8 | 9 | function sidebar() { 10 | $('.sidebar-toggle').on('click', function () { 11 | var sidebarWidth = isSidebarVisible ? 0 : SIDEBAR_WIDTH; 12 | $('.sidebar').animate({ 13 | width: sidebarWidth 14 | }, DURATION); 15 | isSidebarVisible = !isSidebarVisible; 16 | }); 17 | } 18 | 19 | function backToTop() { 20 | $('.back-to-top').on('click', function () { 21 | $('html, body').animate({ 22 | scrollTop: 0 23 | }, DURATION); 24 | }); 25 | } 26 | 27 | }); 28 | -------------------------------------------------------------------------------- /js/motion_global.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | var body = $('body'); 3 | var isSidebarVisible = false; 4 | var sidebarToggle = $('.sidebar-toggle'); 5 | var sidebarToggleLine1st = $('.sidebar-toggle-line-first'); 6 | var sidebarToggleLine2nd = $('.sidebar-toggle-line-middle'); 7 | var sidebarToggleLine3rd = $('.sidebar-toggle-line-last'); 8 | var sidebar = $('.sidebar'); 9 | 10 | var SIDEBAR_WIDTH = '320px'; 11 | var SIDEBAR_DISPLAY_DURATION = 300; 12 | 13 | var sidebarToggleLineStatusInit = {width: '100%', opacity: 1, left: 0, rotateZ: 0, top: 0}; 14 | 15 | var sidebarToggleLine1stStatusInit = sidebarToggleLineStatusInit; 16 | var sidebarToggleLine1stStatusArrow = {width: '50%', rotateZ: '-45deg', top: '2px'}; 17 | var sidebarToggleLine1stStatusClose = {width: '100%', rotateZ: '-45deg', top: '5px'}; 18 | 19 | var sidebarToggleLine2ndStatusInit = sidebarToggleLineStatusInit; 20 | var sidebarToggleLine2ndStatusArrow = {width: '90%'}; 21 | var sidebarToggleLine2ndStatusClose = {opacity: 0}; 22 | 23 | var sidebarToggleLine3rdStatusInit = sidebarToggleLineStatusInit; 24 | var sidebarToggleLine3rdStatusArrow = {width: '50%', rotateZ: '45deg', top: '-2px'}; 25 | var sidebarToggleLine3rdStatusClose = {width: '100%', rotateZ: '45deg', top: '-5px'}; 26 | 27 | LogoAndMenuMotion(); 28 | sidebarToggleMotion(); 29 | postsListMotion(); 30 | backToTopMotion(); 31 | 32 | //add motion effect to toc 33 | $('.sidebar-nav-toc') && $('.post-toc-wrap').addClass('motion-element'); 34 | 35 | 36 | //当前选择的是目录列表时添加 class 'motion-element' 37 | sidebar.bind('click', function(e){ 38 | if(!!$('.sidebar-nav-toc') && e.target == $('.sidebar-nav-toc')[0]){ 39 | $('.post-toc-wrap').addClass('motion-element'); 40 | }}); 41 | 42 | //防止 humberger 被选择导致 sidebar 上方出现高亮 43 | document.onselectstart = function(e) { 44 | if((e.target == sidebarToggle[0]) || (e.target == $('.sidebar-toggle-line-wrap')[0]) || (e.target == sidebarToggleLine1st[0]) || (e.target == sidebarToggleLine2nd[0]) || (e.target == sidebarToggleLine3rd[0])){ 45 | e.preventDefault(); 46 | } 47 | }; 48 | 49 | $(document) 50 | .on('sidebar.isShowing', function () { 51 | //添加 “.velocity('stop')” 用以中止动画 52 | isDesktop() && body.velocity('stop').velocity( 53 | {paddingRight: SIDEBAR_WIDTH}, 54 | SIDEBAR_DISPLAY_DURATION 55 | ); 56 | // sidebar 内容的效果应该在sidebarsidebarShowMotion内触发 57 | // sidebarContentMotion(); 58 | }) 59 | .on('sidebar.isHiding', function () {}); 60 | 61 | function LogoAndMenuMotion() { 62 | var sequence = [ 63 | { e: $('.brand'), p: { opacity: 1 }, o: { duration: 100 } }, 64 | { e: $('.logo'), p: { opacity: 1, top: 0 }, o: { duration: 50} } 65 | ]; 66 | 67 | isMist() && sequence.push( 68 | { e: $('.logo-line-before i'), p: { translateX: "100%" }, o: { duration: 500, sequenceQueue: false } }, 69 | { e: $('.logo-line-after i'), p: { translateX: "-100%" }, o: { duration: 500, sequenceQueue: false } } 70 | ); 71 | 72 | sequence.push({ e: $('.site-title'), p: { opacity: 1, top: 0 }, o: { duration: 200 } }); 73 | 74 | $.Velocity.RunSequence(sequence); 75 | $('.menu-item').velocity('transition.slideDownIn', {display: null}); 76 | } 77 | 78 | 79 | function backToTopMotion () { 80 | var b2top = $('.back-to-top'); 81 | b2top.on('click', function () { 82 | body.velocity('scroll'); 83 | }); 84 | } 85 | 86 | function sidebarShowMotion () { 87 | 88 | sidebarToggleLine1st.velocity('stop').velocity(sidebarToggleLine1stStatusClose); 89 | sidebarToggleLine2nd.velocity('stop').velocity(sidebarToggleLine2ndStatusClose); 90 | sidebarToggleLine3rd.velocity('stop').velocity(sidebarToggleLine3rdStatusClose); 91 | 92 | //添加 “.velocity('stop')” 用以中止动画 93 | sidebar.velocity('stop').velocity({width: SIDEBAR_WIDTH}, { 94 | display: 'block', 95 | duration: SIDEBAR_DISPLAY_DURATION, 96 | //将 sidebar 内容动画效果函数移动到这里 97 | begin: function(e) { 98 | sidebarContentMotion(); 99 | }, 100 | complete: function () { 101 | sidebar.addClass('sidebar-active'); 102 | sidebar.trigger('sidebar.didShow'); 103 | } 104 | }); 105 | sidebar.trigger('sidebar.isShowing'); 106 | } 107 | 108 | function sidebarHideMotion () { 109 | //添加 “.velocity('stop')” 用以中止动画 110 | isDesktop() && body.velocity('stop').velocity({paddingRight: 0}); 111 | // sidebar 内容动画中止和隐藏 112 | $('.sidebar .motion-element').velocity('stop').css('display','none');; 113 | // sidebar 动画中止和隐藏 114 | sidebar.velocity('stop').velocity({width: 0}, {display: 'none'}); 115 | 116 | sidebarToggleLine1st.velocity('stop').velocity(sidebarToggleLine1stStatusInit); 117 | sidebarToggleLine2nd.velocity('stop').velocity(sidebarToggleLine2ndStatusInit); 118 | sidebarToggleLine3rd.velocity('stop').velocity(sidebarToggleLine3rdStatusInit); 119 | 120 | sidebar.removeClass('sidebar-active'); 121 | sidebar.trigger('sidebar.isHiding'); 122 | 123 | //在 post 页面下按下隐藏 sidebar 时如果当前选中的是“站点概览”,将 toc 去除 motion 效果 124 | //防止再次打开时会出现在“站点概览”下的 bug 125 | if(!!$('.post-toc-wrap')){ 126 | if($('.site-overview').css('display') == 'block'){ 127 | $('.post-toc-wrap').removeClass('motion-element'); 128 | } 129 | // else { 130 | // $('.post-toc-wrap').addClass('motion-element'); 131 | // } 132 | } 133 | } 134 | 135 | function sidebarContentMotion () { 136 | $('.sidebar .motion-element') 137 | .velocity('transition.slideRightIn',{ 138 | stagger: 50, 139 | drag: true, 140 | complete: function () { 141 | sidebar.trigger('sidebar.motion.complete'); 142 | } 143 | } 144 | ); 145 | } 146 | 147 | function postsListMotion () { 148 | var postMotionOptions = window.postMotionOptions || {stagger: 300, drag: true}; 149 | $('.post').velocity('transition.slideDownIn', postMotionOptions); 150 | } 151 | 152 | function sidebarToggleMotion () { 153 | sidebarToggle.on('click', function () { 154 | isSidebarVisible ? sidebarHideMotion() : sidebarShowMotion(); 155 | isSidebarVisible = !isSidebarVisible; 156 | }); 157 | 158 | sidebarToggle.hover(function () { 159 | if (isSidebarVisible) {return} 160 | sidebarToggleLine1st.velocity('stop').velocity(sidebarToggleLine1stStatusArrow); 161 | sidebarToggleLine2nd.velocity('stop').velocity(sidebarToggleLine2ndStatusArrow); 162 | sidebarToggleLine3rd.velocity('stop').velocity(sidebarToggleLine3rdStatusArrow); 163 | }, function () { 164 | if (isSidebarVisible) {return} 165 | sidebarToggleLine1st.velocity('stop').velocity(sidebarToggleLine1stStatusInit); 166 | sidebarToggleLine2nd.velocity('stop').velocity(sidebarToggleLine2ndStatusInit); 167 | sidebarToggleLine3rd.velocity('stop').velocity(sidebarToggleLine3rdStatusInit); 168 | }); 169 | } 170 | }); 171 | -------------------------------------------------------------------------------- /js/nav-toggle.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | $('.site-nav-toggle button').on('click', function () { 3 | var $siteNav = $('.site-nav'); 4 | var ON_CLASS_NAME = 'site-nav-on'; 5 | var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME); 6 | var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown'; 7 | var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass'; 8 | 9 | $siteNav.stop()[animateAction]('fast', function () { 10 | $siteNav[animateCallback](ON_CLASS_NAME); 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /js/post_sidebar.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | var tocSelector = '.post-toc'; 3 | var $tocSelector = $(tocSelector); 4 | var activeCurrentSelector = '.active-current'; 5 | 6 | $tocSelector 7 | .on('activate.bs.scrollspy', function () { 8 | var $currentActiveElement = $(tocSelector + ' .active').last(); 9 | 10 | removeCurrentActiveClass(); 11 | $currentActiveElement.addClass('active-current'); 12 | 13 | $tocSelector[0].scrollTop = $currentActiveElement.position().top; 14 | }) 15 | .on('clear.bs.scrollspy', function () { 16 | removeCurrentActiveClass(); 17 | }); 18 | 19 | function removeCurrentActiveClass () { 20 | $(tocSelector + ' ' + activeCurrentSelector) 21 | .removeClass(activeCurrentSelector.substring(1)); 22 | } 23 | 24 | function processTOC () { 25 | getTOCMaxHeight(); 26 | toggleTOCOverflowIndicators(); 27 | } 28 | 29 | function getTOCMaxHeight () { 30 | var height = $('.sidebar').height() - 31 | $tocSelector.position().top - 32 | $('.post-toc-indicator-bottom').height(); 33 | 34 | $tocSelector.css('height', height); 35 | 36 | return height; 37 | } 38 | 39 | function toggleTOCOverflowIndicators () { 40 | tocOverflowIndicator( 41 | '.post-toc-indicator-top', 42 | $tocSelector.scrollTop() > 0 ? 'show' : 'hide' 43 | ); 44 | 45 | tocOverflowIndicator( 46 | '.post-toc-indicator-bottom', 47 | $tocSelector.scrollTop() >= $tocSelector.find('ol').height() - $tocSelector.height() ? 'hide' : 'show' 48 | ) 49 | } 50 | 51 | $(document).on('sidebar.motion.complete', function () { 52 | processTOC(); 53 | }); 54 | 55 | $('body').scrollspy({ target: tocSelector }); 56 | $(window).on('resize', function () { 57 | if ( $('.sidebar').hasClass('sidebar-active') ) { 58 | processTOC(); 59 | } 60 | }); 61 | 62 | onScroll($tocSelector); 63 | 64 | function onScroll (element) { 65 | element.on('mousewheel DOMMouseScroll', function (event) { 66 | var oe = event.originalEvent; 67 | var delta = oe.wheelDelta || -oe.detail; 68 | 69 | this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30; 70 | event.preventDefault(); 71 | 72 | toggleTOCOverflowIndicators(); 73 | }); 74 | } 75 | 76 | function tocOverflowIndicator (indicator, action) { 77 | var $indicator = $(indicator); 78 | var opacity = action === 'show' ? 1 : 0; 79 | $indicator.velocity ? 80 | $indicator.velocity('stop').velocity({ 81 | opacity: opacity 82 | }, { duration: 100 }) : 83 | $indicator.stop().animate({ 84 | opacity: opacity 85 | }, 100); 86 | } 87 | 88 | }); 89 | 90 | $(document).ready(function () { 91 | var html = $('html'); 92 | var TAB_ANIMATE_DURATION = 200; 93 | var hasVelocity = $.isFunction(html.velocity); 94 | 95 | $('.sidebar-nav li').on('click', function () { 96 | var item = $(this); 97 | var activeTabClassName = 'sidebar-nav-active'; 98 | var activePanelClassName = 'sidebar-panel-active'; 99 | if (item.hasClass(activeTabClassName)) { 100 | return; 101 | } 102 | 103 | var currentTarget = $('.' + activePanelClassName); 104 | var target = $('.' + item.data('target')); 105 | 106 | hasVelocity ? 107 | currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () { 108 | target 109 | .velocity('stop') 110 | .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION) 111 | .addClass(activePanelClassName); 112 | }) : 113 | currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () { 114 | currentTarget.hide(); 115 | target 116 | .stop() 117 | .css({'opacity': 0, 'display': 'block'}) 118 | .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () { 119 | currentTarget.removeClass(activePanelClassName); 120 | target.addClass(activePanelClassName); 121 | }); 122 | }); 123 | 124 | item.siblings().removeClass(activeTabClassName); 125 | item.addClass(activeTabClassName); 126 | }); 127 | 128 | $('.post-toc a').on('click', function (e) { 129 | e.preventDefault(); 130 | var targetSelector = escapeSelector(this.getAttribute('href')); 131 | var offset = $(targetSelector).offset().top; 132 | hasVelocity ? 133 | html.velocity('stop').velocity('scroll', { 134 | offset: offset + 'px', 135 | mobileHA: false 136 | }) : 137 | $('html, body').stop().animate({ 138 | scrollTop: offset 139 | }, 500); 140 | }); 141 | 142 | // Expand sidebar on post detail page by default, when post has a toc. 143 | motionMiddleWares.sidebar = function () { 144 | var $tocContent = $('.post-toc-content'); 145 | if (CONFIG.sidebar === 'post') { 146 | if ($tocContent.length > 0 && $tocContent.html().trim().length > 0) { 147 | displaySidebar(); 148 | } 149 | } 150 | }; 151 | }); 152 | 153 | menu={}; 154 | $('h2,h3').each(function(){ 155 | if ($(this).attr('id')){ 156 | return; 157 | } 158 | $(this).attr('id',$(this).text().replace(/ /g,'')); 159 | if ($(this).is('h2')){ 160 | if (menu[$(this).text()] ==undefined){ 161 | menu[$(this).text()]=[]; 162 | } 163 | menu.last=$(this).text(); 164 | } 165 | if ($(this).is('h3')){ 166 | menu[menu.last].push($(this).text()); 167 | } 168 | }); 169 | $('.sidebar-inner').prepend('

'); 170 | //组织目录 171 | if (menu.last){ 172 | var ii=0; 173 | h2List=$(''); 174 | for (i in menu){ 175 | h2=menu[i]; 176 | if (typeof(menu[i]) =='string'){ 177 | continue; 178 | } 179 | ii++; 180 | h2Node=$(''); 181 | if (h2.length){ 182 | jj=0; 183 | h3List=$(''); 184 | for (j in h2){ 185 | jj++; 186 | h3=h2[j]; 187 | h3Node=$('') 188 | h3List.append(h3Node); 189 | } 190 | if(h3List.text().length){ 191 | h2Node.append(h3List); 192 | } 193 | } 194 | h2List.append(h2Node); 195 | } 196 | if (h2List.text()){ 197 | $('.post-toc').html('
'+h2List[0].outerHTML+'
') 198 | }else { 199 | $('.post-toc').html(''); 200 | } 201 | } 202 | 203 | -------------------------------------------------------------------------------- /page-archive.php: -------------------------------------------------------------------------------- 1 | to($stat); 7 | $this->need('header.php');?> 8 |
9 |
10 |
11 |
12 | 13 | 14 | widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives); 15 | $year=0; $mon=0; $i=0; $j=0; 16 | $output = ' 17 | 好! 目前共计 '.$stat->publishedPostsNum.' 篇日志。 继续努力。 18 | 19 | '; 20 | while($archives->next()): 21 | $year_tmp = date('Y',$archives->created); 22 | $mon_tmp = date('m',$archives->created); 23 | $y=$year; $m=$mon; 24 | if ($year != $year_tmp) { 25 | $year = $year_tmp; 26 | //输出年份 27 | $output .= '
28 |

'.$year.'

29 |
30 | '; //输出年份 31 | } 32 | //输出文章日期和标题 33 | $output .=' 47 | '; 48 | endwhile; 49 | echo $output; 50 | ?> 51 |
52 |
53 |
54 | need('sidebar.php'); ?> 55 |
56 | need('footer.php'); ?> 57 | -------------------------------------------------------------------------------- /page-categories.php: -------------------------------------------------------------------------------- 1 | to($stat); 7 | $this->need('header.php');?> 8 |
9 |
10 |
11 |
12 |
13 |
14 | 目前共计 categoriesNum;?> 个分类 15 |
16 |
17 |
    18 | widget('Widget_Metas_Category_List') 19 | ->parse('
  • 20 | {name} 21 | {count} 22 |
  • '); ?> 23 |
24 |
25 |
26 |
27 |
28 |
29 | need('sidebar.php'); ?> 30 |
31 | need('footer.php'); ?> 32 | -------------------------------------------------------------------------------- /page-link.php: -------------------------------------------------------------------------------- 1 | 8 | need('header.php'); ?> 9 |
10 |
11 |
12 |
13 | content(); ?> 14 | 15 | 16 | 20 | 21 |
22 |
23 | need('comments.php'); ?> 24 |
25 | need('sidebar.php'); ?> 26 |
27 | 28 | need('footer.php'); ?> -------------------------------------------------------------------------------- /page-tags.php: -------------------------------------------------------------------------------- 1 | to($stat); 7 | $this->need('header.php'); ?> 8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 目前共计 个标签 16 |
17 | widget('Widget_Metas_Tag_Cloud', 'ignoreZeroCount=1&limit=50')->to($tags); ?> 18 | next()): ?> 19 | 22 | 23 |
24 |
25 |
26 |
27 |
28 |
29 | need('sidebar.php'); ?> 30 |
31 |
32 | need('footer.php'); ?> -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 2 | need('header.php'); ?> 3 |
4 |
5 |
6 |
7 | content(); ?> 8 |
9 |
10 | need('comments.php'); ?> 11 |
12 | need('sidebar.php'); ?> 13 |
14 | 15 | need('footer.php'); ?> -------------------------------------------------------------------------------- /post.php: -------------------------------------------------------------------------------- 1 | 2 | need('header.php'); ?> 3 |
4 |
5 |
6 |
7 |
8 |
9 | 10 |

11 | title() ?> 12 |

13 | 14 | 41 |
42 | 43 |
44 | 45 | 46 | 47 | content(); ?> 48 | 49 | 50 |
51 | 52 |
53 | 54 | 57 | 58 |
59 | 60 |
61 | thePrev('%s',''); ?> 62 |
63 |
64 | theNext('%s',''); ?> 65 |
66 | 67 |
68 | 69 | 70 |
71 |
72 | 73 |
74 |
75 | need('comments.php'); ?> 76 |
77 | need('sidebar.php'); ?> 78 |
79 | 80 | need('footer.php'); ?> 81 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/screenshot.png -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 |
6 |
7 |
8 |
9 | 10 | archiveTitle(array( 11 | 'category' => _t('分类 %s 下的文章'), 12 | 'search' => _t('包含关键字 %s 的文章'), 13 | 'tag' => _t('标签 %s 下的文章'), 14 | 'author' => _t('%s 发布的文章') 15 | ), '', ''); ?> 16 | 17 | next()): ?> 18 | 59 | 60 |
61 | pageNav('« ', ' »',5,'...',array('wrapTag' => 'nav','wrapClass' =>'pagination','itemTag'=>'','prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current')); ?> 62 |
63 |
64 | 65 | need('sidebar.php'); ?> 66 |
67 | 68 | need('footer.php'); ?> 69 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | to($stat); 3 | ?> 4 | 11 | 12 | 70 | 71 | -------------------------------------------------------------------------------- /vendors/fancybox/source/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/blank.gif -------------------------------------------------------------------------------- /vendors/fancybox/source/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/fancybox_loading.gif -------------------------------------------------------------------------------- /vendors/fancybox/source/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /vendors/fancybox/source/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/fancybox_overlay.png -------------------------------------------------------------------------------- /vendors/fancybox/source/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/fancybox_sprite.png -------------------------------------------------------------------------------- /vendors/fancybox/source/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /vendors/fancybox/source/helpers/fancybox_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/fancybox/source/helpers/fancybox_buttons.png -------------------------------------------------------------------------------- /vendors/fancybox/source/helpers/jquery.fancybox-buttons.css: -------------------------------------------------------------------------------- 1 | #fancybox-buttons { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | z-index: 8050; 6 | } 7 | 8 | #fancybox-buttons.top { 9 | top: 10px; 10 | } 11 | 12 | #fancybox-buttons.bottom { 13 | bottom: 10px; 14 | } 15 | 16 | #fancybox-buttons ul { 17 | display: block; 18 | width: 166px; 19 | height: 30px; 20 | margin: 0 auto; 21 | padding: 0; 22 | list-style: none; 23 | border: 1px solid #111; 24 | border-radius: 3px; 25 | -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 26 | -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 27 | box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 28 | background: rgb(50,50,50); 29 | background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); 30 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); 31 | background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 32 | background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 33 | background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 34 | background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 35 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); 36 | } 37 | 38 | #fancybox-buttons ul li { 39 | float: left; 40 | margin: 0; 41 | padding: 0; 42 | } 43 | 44 | #fancybox-buttons a { 45 | display: block; 46 | width: 30px; 47 | height: 30px; 48 | text-indent: -9999px; 49 | background-color: transparent; 50 | background-image: url('fancybox_buttons.png'); 51 | background-repeat: no-repeat; 52 | outline: none; 53 | opacity: 0.8; 54 | } 55 | 56 | #fancybox-buttons a:hover { 57 | opacity: 1; 58 | } 59 | 60 | #fancybox-buttons a.btnPrev { 61 | background-position: 5px 0; 62 | } 63 | 64 | #fancybox-buttons a.btnNext { 65 | background-position: -33px 0; 66 | border-right: 1px solid #3e3e3e; 67 | } 68 | 69 | #fancybox-buttons a.btnPlay { 70 | background-position: 0 -30px; 71 | } 72 | 73 | #fancybox-buttons a.btnPlayOn { 74 | background-position: -30px -30px; 75 | } 76 | 77 | #fancybox-buttons a.btnToggle { 78 | background-position: 3px -60px; 79 | border-left: 1px solid #111; 80 | border-right: 1px solid #3e3e3e; 81 | width: 35px 82 | } 83 | 84 | #fancybox-buttons a.btnToggleOn { 85 | background-position: -27px -60px; 86 | } 87 | 88 | #fancybox-buttons a.btnClose { 89 | border-left: 1px solid #111; 90 | width: 35px; 91 | background-position: -56px 0px; 92 | } 93 | 94 | #fancybox-buttons a.btnDisabled { 95 | opacity : 0.4; 96 | cursor: default; 97 | } -------------------------------------------------------------------------------- /vendors/fancybox/source/helpers/jquery.fancybox-buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Buttons helper for fancyBox 3 | * version: 1.0.5 (Mon, 15 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * buttons: { 10 | * position : 'top' 11 | * } 12 | * } 13 | * }); 14 | * 15 | */ 16 | (function ($) { 17 | //Shortcut for fancyBox object 18 | var F = $.fancybox; 19 | 20 | //Add helper object 21 | F.helpers.buttons = { 22 | defaults : { 23 | skipSingle : false, // disables if gallery contains single image 24 | position : 'top', // 'top' or 'bottom' 25 | tpl : '
' 26 | }, 27 | 28 | list : null, 29 | buttons: null, 30 | 31 | beforeLoad: function (opts, obj) { 32 | //Remove self if gallery do not have at least two items 33 | 34 | if (opts.skipSingle && obj.group.length < 2) { 35 | obj.helpers.buttons = false; 36 | obj.closeBtn = true; 37 | 38 | return; 39 | } 40 | 41 | //Increase top margin to give space for buttons 42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 43 | }, 44 | 45 | onPlayStart: function () { 46 | if (this.buttons) { 47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 48 | } 49 | }, 50 | 51 | onPlayEnd: function () { 52 | if (this.buttons) { 53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 54 | } 55 | }, 56 | 57 | afterShow: function (opts, obj) { 58 | var buttons = this.buttons; 59 | 60 | if (!buttons) { 61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 62 | 63 | buttons = { 64 | prev : this.list.find('.btnPrev').click( F.prev ), 65 | next : this.list.find('.btnNext').click( F.next ), 66 | play : this.list.find('.btnPlay').click( F.play ), 67 | toggle : this.list.find('.btnToggle').click( F.toggle ), 68 | close : this.list.find('.btnClose').click( F.close ) 69 | } 70 | } 71 | 72 | //Prev 73 | if (obj.index > 0 || obj.loop) { 74 | buttons.prev.removeClass('btnDisabled'); 75 | } else { 76 | buttons.prev.addClass('btnDisabled'); 77 | } 78 | 79 | //Next / Play 80 | if (obj.loop || obj.index < obj.group.length - 1) { 81 | buttons.next.removeClass('btnDisabled'); 82 | buttons.play.removeClass('btnDisabled'); 83 | 84 | } else { 85 | buttons.next.addClass('btnDisabled'); 86 | buttons.play.addClass('btnDisabled'); 87 | } 88 | 89 | this.buttons = buttons; 90 | 91 | this.onUpdate(opts, obj); 92 | }, 93 | 94 | onUpdate: function (opts, obj) { 95 | var toggle; 96 | 97 | if (!this.buttons) { 98 | return; 99 | } 100 | 101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 102 | 103 | //Size toggle button 104 | if (obj.canShrink) { 105 | toggle.addClass('btnToggleOn'); 106 | 107 | } else if (!obj.canExpand) { 108 | toggle.addClass('btnDisabled'); 109 | } 110 | }, 111 | 112 | beforeClose: function () { 113 | if (this.list) { 114 | this.list.remove(); 115 | } 116 | 117 | this.list = null; 118 | this.buttons = null; 119 | } 120 | }; 121 | 122 | }(jQuery)); 123 | -------------------------------------------------------------------------------- /vendors/fancybox/source/helpers/jquery.fancybox-media.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Media helper for fancyBox 3 | * version: 1.0.6 (Fri, 14 Jun 2013) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * media: true 10 | * } 11 | * }); 12 | * 13 | * Set custom URL parameters: 14 | * $(".fancybox").fancybox({ 15 | * helpers : { 16 | * media: { 17 | * youtube : { 18 | * params : { 19 | * autoplay : 0 20 | * } 21 | * } 22 | * } 23 | * } 24 | * }); 25 | * 26 | * Or: 27 | * $(".fancybox").fancybox({, 28 | * helpers : { 29 | * media: true 30 | * }, 31 | * youtube : { 32 | * autoplay: 0 33 | * } 34 | * }); 35 | * 36 | * Supports: 37 | * 38 | * Youtube 39 | * http://www.youtube.com/watch?v=opj24KnzrWo 40 | * http://www.youtube.com/embed/opj24KnzrWo 41 | * http://youtu.be/opj24KnzrWo 42 | * http://www.youtube-nocookie.com/embed/opj24KnzrWo 43 | * Vimeo 44 | * http://vimeo.com/40648169 45 | * http://vimeo.com/channels/staffpicks/38843628 46 | * http://vimeo.com/groups/surrealism/videos/36516384 47 | * http://player.vimeo.com/video/45074303 48 | * Metacafe 49 | * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 50 | * http://www.metacafe.com/watch/7635964/ 51 | * Dailymotion 52 | * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 53 | * Twitvid 54 | * http://twitvid.com/QY7MD 55 | * Twitpic 56 | * http://twitpic.com/7p93st 57 | * Instagram 58 | * http://instagr.am/p/IejkuUGxQn/ 59 | * http://instagram.com/p/IejkuUGxQn/ 60 | * Google maps 61 | * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 62 | * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 63 | * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 64 | */ 65 | (function ($) { 66 | "use strict"; 67 | 68 | //Shortcut for fancyBox object 69 | var F = $.fancybox, 70 | format = function( url, rez, params ) { 71 | params = params || ''; 72 | 73 | if ( $.type( params ) === "object" ) { 74 | params = $.param(params, true); 75 | } 76 | 77 | $.each(rez, function(key, value) { 78 | url = url.replace( '$' + key, value || '' ); 79 | }); 80 | 81 | if (params.length) { 82 | url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 83 | } 84 | 85 | return url; 86 | }; 87 | 88 | //Add helper object 89 | F.helpers.media = { 90 | defaults : { 91 | youtube : { 92 | matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 93 | params : { 94 | autoplay : 1, 95 | autohide : 1, 96 | fs : 1, 97 | rel : 0, 98 | hd : 1, 99 | wmode : 'opaque', 100 | enablejsapi : 1 101 | }, 102 | type : 'iframe', 103 | url : '//www.youtube.com/embed/$3' 104 | }, 105 | vimeo : { 106 | matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 107 | params : { 108 | autoplay : 1, 109 | hd : 1, 110 | show_title : 1, 111 | show_byline : 1, 112 | show_portrait : 0, 113 | fullscreen : 1 114 | }, 115 | type : 'iframe', 116 | url : '//player.vimeo.com/video/$1' 117 | }, 118 | metacafe : { 119 | matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 120 | params : { 121 | autoPlay : 'yes' 122 | }, 123 | type : 'swf', 124 | url : function( rez, params, obj ) { 125 | obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 126 | 127 | return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 128 | } 129 | }, 130 | dailymotion : { 131 | matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 132 | params : { 133 | additionalInfos : 0, 134 | autoStart : 1 135 | }, 136 | type : 'swf', 137 | url : '//www.dailymotion.com/swf/video/$1' 138 | }, 139 | twitvid : { 140 | matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 141 | params : { 142 | autoplay : 0 143 | }, 144 | type : 'iframe', 145 | url : '//www.twitvid.com/embed.php?guid=$1' 146 | }, 147 | twitpic : { 148 | matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 149 | type : 'image', 150 | url : '//twitpic.com/show/full/$1/' 151 | }, 152 | instagram : { 153 | matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 154 | type : 'image', 155 | url : '//$1/p/$2/media/?size=l' 156 | }, 157 | google_maps : { 158 | matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 159 | type : 'iframe', 160 | url : function( rez ) { 161 | return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 162 | } 163 | } 164 | }, 165 | 166 | beforeLoad : function(opts, obj) { 167 | var url = obj.href || '', 168 | type = false, 169 | what, 170 | item, 171 | rez, 172 | params; 173 | 174 | for (what in opts) { 175 | if (opts.hasOwnProperty(what)) { 176 | item = opts[ what ]; 177 | rez = url.match( item.matcher ); 178 | 179 | if (rez) { 180 | type = item.type; 181 | params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 182 | 183 | url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 184 | 185 | break; 186 | } 187 | } 188 | } 189 | 190 | if (type) { 191 | obj.href = url; 192 | obj.type = type; 193 | 194 | obj.autoHeight = false; 195 | } 196 | } 197 | }; 198 | 199 | }(jQuery)); -------------------------------------------------------------------------------- /vendors/fancybox/source/helpers/jquery.fancybox-thumbs.css: -------------------------------------------------------------------------------- 1 | #fancybox-thumbs { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | overflow: hidden; 6 | z-index: 8050; 7 | } 8 | 9 | #fancybox-thumbs.bottom { 10 | bottom: 2px; 11 | } 12 | 13 | #fancybox-thumbs.top { 14 | top: 2px; 15 | } 16 | 17 | #fancybox-thumbs ul { 18 | position: relative; 19 | list-style: none; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | #fancybox-thumbs ul li { 25 | float: left; 26 | padding: 1px; 27 | opacity: 0.5; 28 | } 29 | 30 | #fancybox-thumbs ul li.active { 31 | opacity: 0.75; 32 | padding: 0; 33 | border: 1px solid #fff; 34 | } 35 | 36 | #fancybox-thumbs ul li:hover { 37 | opacity: 1; 38 | } 39 | 40 | #fancybox-thumbs ul li a { 41 | display: block; 42 | position: relative; 43 | overflow: hidden; 44 | border: 1px solid #222; 45 | background: #111; 46 | outline: none; 47 | } 48 | 49 | #fancybox-thumbs ul li img { 50 | display: block; 51 | position: relative; 52 | border: 0; 53 | padding: 0; 54 | max-width: none; 55 | } -------------------------------------------------------------------------------- /vendors/fancybox/source/helpers/jquery.fancybox-thumbs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Thumbnail helper for fancyBox 3 | * version: 1.0.7 (Mon, 01 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * thumbs: { 10 | * width : 50, 11 | * height : 50 12 | * } 13 | * } 14 | * }); 15 | * 16 | */ 17 | (function ($) { 18 | //Shortcut for fancyBox object 19 | var F = $.fancybox; 20 | 21 | //Add helper object 22 | F.helpers.thumbs = { 23 | defaults : { 24 | width : 50, // thumbnail width 25 | height : 50, // thumbnail height 26 | position : 'bottom', // 'top' or 'bottom' 27 | source : function ( item ) { // function to obtain the URL of the thumbnail image 28 | var href; 29 | 30 | if (item.element) { 31 | href = $(item.element).find('img').attr('src'); 32 | } 33 | 34 | if (!href && item.type === 'image' && item.href) { 35 | href = item.href; 36 | } 37 | 38 | return href; 39 | } 40 | }, 41 | 42 | wrap : null, 43 | list : null, 44 | width : 0, 45 | 46 | init: function (opts, obj) { 47 | var that = this, 48 | list, 49 | thumbWidth = opts.width, 50 | thumbHeight = opts.height, 51 | thumbSource = opts.source; 52 | 53 | //Build list structure 54 | list = ''; 55 | 56 | for (var n = 0; n < obj.group.length; n++) { 57 | list += '
  • '; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var href = thumbSource( obj.group[ i ] ); 66 | 67 | if (!href) { 68 | return; 69 | } 70 | 71 | $("").load(function () { 72 | var width = this.width, 73 | height = this.height, 74 | widthRatio, heightRatio, parent; 75 | 76 | if (!that.list || !width || !height) { 77 | return; 78 | } 79 | 80 | //Calculate thumbnail width/height and center it 81 | widthRatio = width / thumbWidth; 82 | heightRatio = height / thumbHeight; 83 | 84 | parent = that.list.children().eq(i).find('a'); 85 | 86 | if (widthRatio >= 1 && heightRatio >= 1) { 87 | if (widthRatio > heightRatio) { 88 | width = Math.floor(width / heightRatio); 89 | height = thumbHeight; 90 | 91 | } else { 92 | width = thumbWidth; 93 | height = Math.floor(height / widthRatio); 94 | } 95 | } 96 | 97 | $(this).css({ 98 | width : width, 99 | height : height, 100 | top : Math.floor(thumbHeight / 2 - height / 2), 101 | left : Math.floor(thumbWidth / 2 - width / 2) 102 | }); 103 | 104 | parent.width(thumbWidth).height(thumbHeight); 105 | 106 | $(this).hide().appendTo(parent).fadeIn(300); 107 | 108 | }).attr('src', href); 109 | }); 110 | 111 | //Set initial width 112 | this.width = this.list.children().eq(0).outerWidth(true); 113 | 114 | this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 115 | }, 116 | 117 | beforeLoad: function (opts, obj) { 118 | //Remove self if gallery do not have at least two items 119 | if (obj.group.length < 2) { 120 | obj.helpers.thumbs = false; 121 | 122 | return; 123 | } 124 | 125 | //Increase bottom margin to give space for thumbs 126 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 127 | }, 128 | 129 | afterShow: function (opts, obj) { 130 | //Check if exists and create or update list 131 | if (this.list) { 132 | this.onUpdate(opts, obj); 133 | 134 | } else { 135 | this.init(opts, obj); 136 | } 137 | 138 | //Set active element 139 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 140 | }, 141 | 142 | //Center list 143 | onUpdate: function (opts, obj) { 144 | if (this.list) { 145 | this.list.stop(true).animate({ 146 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 147 | }, 150); 148 | } 149 | }, 150 | 151 | beforeClose: function () { 152 | if (this.wrap) { 153 | this.wrap.remove(); 154 | } 155 | 156 | this.wrap = null; 157 | this.list = null; 158 | this.width = 0; 159 | } 160 | } 161 | 162 | }(jQuery)); -------------------------------------------------------------------------------- /vendors/fancybox/source/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | .fancybox-wrap, 3 | .fancybox-skin, 4 | .fancybox-outer, 5 | .fancybox-inner, 6 | .fancybox-image, 7 | .fancybox-wrap iframe, 8 | .fancybox-wrap object, 9 | .fancybox-nav, 10 | .fancybox-nav span, 11 | .fancybox-tmp 12 | { 13 | padding: 0; 14 | margin: 0; 15 | border: 0; 16 | outline: none; 17 | vertical-align: top; 18 | } 19 | 20 | .fancybox-wrap { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | z-index: 8020; 25 | } 26 | 27 | .fancybox-skin { 28 | position: relative; 29 | background: #f9f9f9; 30 | color: #444; 31 | text-shadow: none; 32 | -webkit-border-radius: 4px; 33 | -moz-border-radius: 4px; 34 | border-radius: 4px; 35 | } 36 | 37 | .fancybox-opened { 38 | z-index: 8030; 39 | } 40 | 41 | .fancybox-opened .fancybox-skin { 42 | -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 43 | -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 44 | box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 45 | } 46 | 47 | .fancybox-outer, .fancybox-inner { 48 | position: relative; 49 | } 50 | 51 | .fancybox-inner { 52 | overflow: hidden; 53 | } 54 | 55 | .fancybox-type-iframe .fancybox-inner { 56 | -webkit-overflow-scrolling: touch; 57 | } 58 | 59 | .fancybox-error { 60 | color: #444; 61 | font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 62 | margin: 0; 63 | padding: 15px; 64 | white-space: nowrap; 65 | } 66 | 67 | .fancybox-image, .fancybox-iframe { 68 | display: block; 69 | width: 100%; 70 | height: 100%; 71 | } 72 | 73 | .fancybox-image { 74 | max-width: 100%; 75 | max-height: 100%; 76 | } 77 | 78 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 79 | background-image: url('fancybox_sprite.png'); 80 | } 81 | 82 | #fancybox-loading { 83 | position: fixed; 84 | top: 50%; 85 | left: 50%; 86 | margin-top: -22px; 87 | margin-left: -22px; 88 | background-position: 0 -108px; 89 | opacity: 0.8; 90 | cursor: pointer; 91 | z-index: 8060; 92 | } 93 | 94 | #fancybox-loading div { 95 | width: 44px; 96 | height: 44px; 97 | background: url('fancybox_loading.gif') center center no-repeat; 98 | } 99 | 100 | .fancybox-close { 101 | position: absolute; 102 | top: -18px; 103 | right: -18px; 104 | width: 36px; 105 | height: 36px; 106 | cursor: pointer; 107 | z-index: 8040; 108 | } 109 | 110 | .fancybox-nav { 111 | position: absolute; 112 | top: 0; 113 | width: 40%; 114 | height: 100%; 115 | cursor: pointer; 116 | text-decoration: none; 117 | background: transparent url('blank.gif'); /* helps IE */ 118 | -webkit-tap-highlight-color: rgba(0,0,0,0); 119 | z-index: 8040; 120 | } 121 | 122 | .fancybox-prev { 123 | left: 0; 124 | } 125 | 126 | .fancybox-next { 127 | right: 0; 128 | } 129 | 130 | .fancybox-nav span { 131 | position: absolute; 132 | top: 50%; 133 | width: 36px; 134 | height: 34px; 135 | margin-top: -18px; 136 | cursor: pointer; 137 | z-index: 8040; 138 | visibility: hidden; 139 | } 140 | 141 | .fancybox-prev span { 142 | left: 10px; 143 | background-position: 0 -36px; 144 | } 145 | 146 | .fancybox-next span { 147 | right: 10px; 148 | background-position: 0 -72px; 149 | } 150 | 151 | .fancybox-nav:hover span { 152 | visibility: visible; 153 | } 154 | 155 | .fancybox-tmp { 156 | position: absolute; 157 | top: -99999px; 158 | left: -99999px; 159 | visibility: hidden; 160 | max-width: 99999px; 161 | max-height: 99999px; 162 | overflow: visible !important; 163 | } 164 | 165 | /* Overlay helper */ 166 | 167 | .fancybox-lock { 168 | overflow: hidden !important; 169 | width: auto; 170 | } 171 | 172 | .fancybox-lock body { 173 | overflow: hidden !important; 174 | } 175 | 176 | .fancybox-lock-test { 177 | overflow-y: hidden !important; 178 | } 179 | 180 | .fancybox-overlay { 181 | position: absolute; 182 | top: 0; 183 | left: 0; 184 | overflow: hidden; 185 | display: none; 186 | z-index: 8010; 187 | background: url('fancybox_overlay.png'); 188 | } 189 | 190 | .fancybox-overlay-fixed { 191 | position: fixed; 192 | bottom: 0; 193 | right: 0; 194 | } 195 | 196 | .fancybox-lock .fancybox-overlay { 197 | overflow: auto; 198 | overflow-y: scroll; 199 | } 200 | 201 | /* Title helper */ 202 | 203 | .fancybox-title { 204 | visibility: hidden; 205 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 206 | position: relative; 207 | text-shadow: none; 208 | z-index: 8050; 209 | } 210 | 211 | .fancybox-opened .fancybox-title { 212 | visibility: visible; 213 | } 214 | 215 | .fancybox-title-float-wrap { 216 | position: absolute; 217 | bottom: 0; 218 | right: 50%; 219 | margin-bottom: -35px; 220 | z-index: 8050; 221 | text-align: center; 222 | } 223 | 224 | .fancybox-title-float-wrap .child { 225 | display: inline-block; 226 | margin-right: -100%; 227 | padding: 2px 20px; 228 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 229 | background: rgba(0, 0, 0, 0.8); 230 | -webkit-border-radius: 15px; 231 | -moz-border-radius: 15px; 232 | border-radius: 15px; 233 | text-shadow: 0 1px 2px #222; 234 | color: #FFF; 235 | font-weight: bold; 236 | line-height: 24px; 237 | white-space: nowrap; 238 | } 239 | 240 | .fancybox-title-outside-wrap { 241 | position: relative; 242 | margin-top: 10px; 243 | color: #fff; 244 | } 245 | 246 | .fancybox-title-inside-wrap { 247 | padding-top: 10px; 248 | } 249 | 250 | .fancybox-title-over-wrap { 251 | position: absolute; 252 | bottom: 0; 253 | left: 0; 254 | color: #fff; 255 | padding: 10px; 256 | background: #000; 257 | background: rgba(0, 0, 0, .8); 258 | } 259 | 260 | /*Retina graphics!*/ 261 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 262 | only screen and (min--moz-device-pixel-ratio: 1.5), 263 | only screen and (min-device-pixel-ratio: 1.5){ 264 | 265 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 266 | background-image: url('fancybox_sprite@2x.png'); 267 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 268 | } 269 | 270 | #fancybox-loading div { 271 | background-image: url('fancybox_loading@2x.gif'); 272 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 273 | } 274 | } -------------------------------------------------------------------------------- /vendors/fastclick/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 The Financial Times Ltd. 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendors/fastclick/README.html: -------------------------------------------------------------------------------- 1 |

    FastClick

    FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.

    2 |

    FastClick is developed by FT Labs, part of the Financial Times.

    3 |

    Explication en français.

    4 |

    日本語で説明

    5 |

    Why does the delay exist?

    According to Google:

    6 |
    7 |

    …mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

    8 |
    9 |

    Compatibility

    The library has been deployed as part of the FT Web App and is tried and tested on the following mobile browsers:

    10 | 18 |

    When it isn’t needed

    FastClick doesn’t attach any listeners on desktop browsers.

    19 |

    Chrome 32+ on Android with width=device-width in the viewport meta tag doesn’t have a 300ms delay, therefore listeners aren’t attached.

    20 |
    <meta name="viewport" content="width=device-width, initial-scale=1">
    21 | 
    22 |

    Same goes for Chrome on Android (all versions) with user-scalable=no in the viewport meta tag. But be aware that user-scalable=no also disables pinch zooming, which may be an accessibility concern.

    23 |

    For IE11+, you can use touch-action: manipulation; to disable double-tap-to-zoom on certain elements (like links and buttons). For IE10 use -ms-touch-action: manipulation.

    24 |

    Usage

    Include fastclick.js in your JavaScript bundle or add it to your HTML page like this:

    25 |
    <script type='application/javascript' src='/path/to/fastclick.js'></script>
    26 | 
    27 |

    The script must be loaded prior to instantiating FastClick on any element of the page.

    28 |

    To instantiate FastClick on the body, which is the recommended method of use:

    29 |
    if ('addEventListener' in document) {
    30 |     document.addEventListener('DOMContentLoaded', function() {
    31 |         FastClick.attach(document.body);
    32 |     }, false);
    33 | }
    34 | 
    35 |

    Or, if you’re using jQuery:

    36 |
    $(function() {
    37 |     FastClick.attach(document.body);
    38 | });
    39 | 
    40 |

    If you’re using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require('fastclick'). As a result, the easiest way to use FastClick with these loaders is as follows:

    41 |
    var attachFastClick = require('fastclick');
    42 | attachFastClick(document.body);
    43 | 
    44 |

    Minified

    Run make to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to build/fastclick.min.js or you can download a pre-minified version.

    45 |

    Note: the pre-minified version is built using our build service which exposes the FastClick object through Origami.fastclick and will have the Browserify/CommonJS API (see above).

    46 |
    var attachFastClick = Origami.fastclick;
    47 | attachFastClick(document.body);
    48 | 
    49 |

    AMD

    FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as RequireJS. Note that when using the AMD style require, the full FastClick object will be returned, not FastClick.attach

    50 |
    var FastClick = require('fastclick');
    51 | FastClick.attach(document.body, options);
    52 | 
    53 |

    Package managers

    You can install FastClick using Component, npm or Bower.

    54 |

    For Ruby, there’s a third-party gem called fastclick-rails. For .NET there’s a NuGet package.

    55 |

    Advanced

    Ignore certain elements with needsclick

    Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the needsclick class.

    56 |
    <a class="needsclick">Ignored by FastClick</a>
    57 | 
    58 |

    Use case 1: non-synthetic click required

    Internally, FastClick uses document.createEvent to fire a synthetic click event as soon as touchend is fired by the browser. It then suppresses the additional click event created by the browser after that. In some cases, the non-synthetic click event created by the browser is required, as described in the triggering focus example.

    59 |

    This is where the needsclick class comes in. Add the class to any element that requires a non-synthetic click.

    60 |

    Use case 2: Twitter Bootstrap 2.2.2 dropdowns

    Another example of when to use the needsclick class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own touchstart listener for dropdowns, so you want to tell FastClick to ignore those. If you don’t, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after.

    61 |
    <a class="dropdown-toggle needsclick" data-toggle="dropdown">Dropdown</a>
    62 | 
    63 |

    Examples

    FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this:

    64 | 69 |

    Tests

    There are no automated tests. The files in tests/ are manual reduced test cases. We’ve had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it’s not so trivial to test.

    70 |

    Credits and collaboration

    FastClick is maintained by Rowan Beentje, Matthew Caruana Galizia and Matthew Andrews at FT Labs. All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request.

    71 | -------------------------------------------------------------------------------- /vendors/fastclick/bower.json: -------------------------------------------------------------------------------- 1 | {"name":"fastclick","main":"lib/fastclick.js","ignore":["**/.*","component.json","package.json","Makefile","tests","examples"]} -------------------------------------------------------------------------------- /vendors/fastclick/lib/fastclick.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";function t(e,o){function i(t,e){return function(){return t.apply(e,arguments)}}var r;if(o=o||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=o.touchBoundary||10,this.layer=e,this.tapDelay=o.tapDelay||200,this.tapTimeout=o.tapTimeout||700,!t.notNeeded(e)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],c=this,s=0,u=a.length;u>s;s++)c[a[s]]=i(c[a[s]],c);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),r=o&&/OS [6-7]_\d/.test(navigator.userAgent),a=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,a,c,s,u,l=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,a=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,r&&(u=t.changedTouches[0],l=document.elementFromPoint(u.pageX-window.pageXOffset,u.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),c=l.tagName.toLowerCase(),"label"===c){if(e=this.findControl(l)){if(this.focus(l),n)return!1;l=e}}else if(this.needsFocus(l))return t.timeStamp-a>100||o&&window.top!==window&&"input"===c?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,t),o&&"select"===c||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(s=l.fastClickScrollParent,s&&s.fastClickLastScrollTop!==s.scrollTop)?!0:(this.needsClick(l)||(t.preventDefault(),this.sendClick(l,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,o,i,r;if("undefined"==typeof window.ontouchstart)return!0;if(o=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(o>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(a&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(); -------------------------------------------------------------------------------- /vendors/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fonticons (https://fonticons.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /vendors/font-awesome/bower.json: -------------------------------------------------------------------------------- 1 | {"name":"font-awesome","description":"Font Awesome","keywords":[],"homepage":"http://fontawesome.io","dependencies":{},"devDependencies":{},"license":["OFL-1.1","MIT","CC-BY-3.0"],"main":["less/font-awesome.less","scss/font-awesome.scss"],"ignore":["*/.*","*.json","src","*.yml","Gemfile","Gemfile.lock","*.md"]} -------------------------------------------------------------------------------- /vendors/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /vendors/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /vendors/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /vendors/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /vendors/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zgq354/typecho-theme-next/651c2a105be2e1e23b33335524f0e406970d2ce7/vendors/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /vendors/velocity/bower.json: -------------------------------------------------------------------------------- 1 | {"name":"velocity","version":"1.2.2","homepage":"http://velocityjs.org","authors":[{"name":"Julian Shapiro","homepage":"http://julian.com/"}],"description":"Accelerated JavaScript animation.","main":["./velocity.js","./velocity.ui.js"],"keywords":["animation","jquery","animate","lightweight","smooth","ui","velocity.js","velocityjs","javascript"],"license":"MIT","ignore":["*.json","!/bower.json","LICENSE","*.md"],"dependencies":{"jquery":"*"},"repository":{"type":"git","url":"http://github.com/julianshapiro/velocity.git"}} --------------------------------------------------------------------------------