├── .gitattributes ├── 404.php ├── LICENSE ├── README.md ├── archive.php ├── comments.php ├── css └── main.css ├── footer.php ├── functions.php ├── header.php ├── img ├── 404.png ├── avatar-default.png ├── banner.png ├── bg.png ├── favicon.ico ├── loading.gif ├── logo.png ├── thumb │ ├── 1.jpg │ ├── 10.jpg │ ├── 11.jpg │ ├── 12.jpg │ ├── 13.jpg │ ├── 14.jpg │ ├── 15.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ └── 9.jpg └── thumbnail.png ├── index.php ├── js ├── comment.js ├── dux_ads.js ├── libs │ ├── hammer.min.js │ ├── ias.min.js │ ├── jquery.cookie.min.js │ ├── jsrender.min.js │ ├── lazyload.min.js │ ├── prettyprint.js │ └── router.min.js ├── loader.js ├── main.js └── user.js ├── page.php ├── page_archives.php ├── page_category.php ├── page_links.php ├── page_tags.php ├── post.php ├── screenshot.png └── sidebar.php /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 2 | need('header.php'); ?> 3 |
4 |
5 | 6 |

404 Page Not Found

7 |

沒有找到你要的内容!

8 |

9 | 返回首页 10 |

11 |
12 |
13 | need('footer.php'); ?> -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Typecho-theme-DUX 2 | 3 | >Forked from https://coding.net/u/Arco-X/p/DUX-for-Typecho/git 4 | 5 | 一款基于大前端DUX for Wordpress主题修改而来的主题。 6 | 7 | # 特性 8 | 9 | - 修复了原版不能正常评论的问题 10 | - 美化了样式,修改细节 11 | - 增加了一些小功能 12 | 13 | # 预览 14 | 15 | ![Typecho-theme-DUX.png](https://i.loli.net/2020/06/12/UXLK3a8SuVcxi2W.png) 16 | 17 | >本主题仅基于爱好修改,使用时请尊重原作者大前端版权。 18 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 2 | need('header.php'); ?> 3 |
4 |
5 |
6 |
7 |

archiveTitle(array( 8 | 'category' => _t('%s'), 9 | 'search' => _t('搜索 %s'), 10 | 'tag' => _t('标签 %s'), 11 | 'author' => _t('作者 %s') 12 | ), '', ''); ?>

13 |
14 | have()):?> 15 | next()): ?> 16 | 32 | 33 | 34 | 37 |
38 |
39 | need('sidebar.php'); ?> 40 |
41 | 42 | need('footer.php'); ?> -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 2 | authorId) { 6 | if ($comments->authorId == $comments->ownerId) { 7 | $commentClass .= ' comment-by-author'; 8 | } else { 9 | $commentClass .= ' comment-by-user'; 10 | } 11 | } 12 | 13 | $commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent'; 14 | 15 | if ($comments->url) { 16 | $author = '' . $comments->author . ''; 17 | } else { 18 | $author = $comments->author; 19 | } 20 | ?> 21 | 22 |
  • 31 | commentsAvatarRating; 36 | $hash = md5(strtolower($comments->mail)); 37 | $avatar = $host . $url . $hash . '?s=' . $size . '&r=' . $rating . '&d=mm'; 38 | ?> 39 |
    ">
    40 |
    41 | content(); ?> 42 |
    43 | date('Y-m-d'); ?>    reply('回复'); ?> 44 |
    45 |
    46 | children) { ?>
      threadedComments($options); ?>
    47 |
  • 48 | comments()->to($comments); ?> 49 |
    50 |

    评论 commentsNum('', '1', '%d'); ?>

    51 |
    52 |
    53 | allow('comment')){ ?> 54 |

    55 | 文章评论已关闭! 56 |

    57 | 58 |
    59 |
    60 |
    61 | user->hasLogin()): ?> 62 | "> 63 | 64 | remember('author',true) != "" && $this->remember('mail',true) != ""): ?> 65 | "> 66 | 67 | " srcset="themeUrl("img/avatar-default.png"); ?> 2x" class="avatar photo" height="50" width="50" src="themeUrl("img/avatar-default.png"); ?>"> 68 | 69 | 70 |

    cancelReply('
    取消
    '); ?>

    71 |
    72 |
    73 | user->hasLogin()): ?>user->screenName(); ?>remember('author',true) != "" && $this->remember('mail',true) != ""): ?>remember('author'); ?> 74 | 75 |
    76 |
    77 | 78 | widget('Widget_Security'); ?> 79 | 80 |
    81 | 82 |
    83 | user->hasLogin()): ?> 84 |
    remember('author',true) != "" && $this->remember('mail',true) != ""): ?>style="display:none;" > 85 |
      86 |
    • 87 |
    • options->commentsRequireMail): ?> required>
    • 88 |
    • 89 |
    90 |
    91 | 92 |
    93 |
    94 | 95 |
    96 | have()) : ?> 97 |
    98 |
      listComments(array('before' => '','after' => '')); ?>
    99 | 102 |
    103 | 104 | 105 | 174 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | options->footad && !empty($this->options->footad) ): ?> 7 |
    8 |
    9 | options->footad(); ?> 10 |
    11 |
    12 | 13 |
    14 |
    15 | options->flinks && !empty($this->options->flinks) ): ?> 16 | 22 | 23 | options->fcode && !empty($this->options->fcode) ): ?> 24 |
    options->fcode(); ?>
    25 | 26 | 35 |
    36 |
    37 |
    38 | options->useHighline == 'able'): ?> 39 | 40 | 41 | 50 | 51 | 52 | 53 | options->GoogleAnalytics): ?> 54 | options->GoogleAnalytics(); ?> 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | addInput($logoUrl->addRule('xssCheck', _t('请不要在图片链接中使用特殊字符'))); 9 | 10 | $icoUrl = new Typecho_Widget_Helper_Form_Element_Text('icoUrl', NULL, NULL, _t('站点favicon地址'), _t('在这里填入favicon.ico的地址,留空为默认')); 11 | $form->addInput($icoUrl->addRule('xssCheck', _t('请不要在图片链接中使用特殊字符'))); 12 | 13 | $logotext = new Typecho_Widget_Helper_Form_Element_Text('logotext', null, NULL, _t('站点说明'), _t('logo 旁边的两行说明 以<br>换行')); 14 | $form->addInput($logotext); 15 | 16 | $customcss = new Typecho_Widget_Helper_Form_Element_Textarea('customcss', null, NULL, _t('自定义样式'), _t('已经包含style标签')); 17 | $form->addInput($customcss); 18 | 19 | $DnsPrefetch = new Typecho_Widget_Helper_Form_Element_Radio('DnsPrefetch', 20 | array('able' => _t('启用'), 21 | 'disable' => _t('禁止'), 22 | ), 23 | 'disable', _t('DNS预解析加速'), _t('默认禁止,启用则会对CDN资源和Gravatar进行加速')); 24 | $form->addInput($DnsPrefetch); 25 | 26 | $categorymenu = new Typecho_Widget_Helper_Form_Element_Radio('categorymenu', 27 | array('able' => _t('折叠'), 28 | 'disable' => _t('展开'), 29 | ), 30 | 'able', _t('折叠首页文章分类菜单 (若需要子分类菜单则选择展开)'), _t('')); 31 | $form->addInput($categorymenu); 32 | 33 | 34 | $fatext = new Typecho_Widget_Helper_Form_Element_Textarea('fatext', NULL, NULL, _t('顶部导航栏分类fa图标'), _t('顶部导航栏分类fa图标,<i class="fa fa-plug"></i> 格式一行一个
    和导航条分类菜单项按顺序匹配,用法参见FA图标CSS分类参考')); 35 | $form->addInput($fatext); 36 | 37 | 38 | $pagemenu = new Typecho_Widget_Helper_Form_Element_Radio('pagemenu', 39 | array('able' => _t('折叠'), 40 | 'disable' => _t('展开'), 41 | ), 42 | 'able', _t('折叠首页独立页面菜单'), _t('')); 43 | $form->addInput($pagemenu); 44 | 45 | $pagefatext = new Typecho_Widget_Helper_Form_Element_Textarea('pagefatext', NULL, NULL, _t('顶部导航栏独立页面fa图标'), _t('顶部导航栏独立页面fa图标,<i class="fa fa-plug"></i> 格式一行一个
    和导航条独立页面项按顺序匹配,用法参见FA图标CSS分类参考')); 46 | $form->addInput($pagefatext); 47 | 48 | $tuijian = new Typecho_Widget_Helper_Form_Element_Text('tj_cid', NULL, NULL, _t('置顶展示'), _t('请输入要置顶展示文章的cid')); 49 | $form->addInput($tuijian); 50 | 51 | //首页文章列表上的导航代码 52 | $smallbanner = new Typecho_Widget_Helper_Form_Element_Textarea('smallbanner', NULL, NULL, _t('首页中部小菜单'), _t('填写导航条代码 A链接格式即可')); 53 | $form->addInput($smallbanner); 54 | 55 | $indexpic = new Typecho_Widget_Helper_Form_Element_Radio('indexpic', 56 | array('able' => _t('启用'), 57 | 'disable' => _t('禁止'), 58 | ), 59 | 'able', _t('首页文章显示缩略图'), _t('')); 60 | $form->addInput($indexpic); 61 | 62 | //幻灯片 63 | $Slider = new Typecho_Widget_Helper_Form_Element_Radio('Slider', 64 | array('SliderTrue'=>_t('开启'),'SliderFalse'=>_t('关闭')), 65 | 'SliderTrue', 66 | _t("幻灯片开关"), 67 | _t("开启后请在下方填写来幻灯片代码发布幻灯片") 68 | ); 69 | $form->addInput($Slider); 70 | 71 | $slidercode = new Typecho_Widget_Helper_Form_Element_Textarea('slidercode', NULL, NULL, _t('幻灯片代码'), _t('请按以下格式填写,展示几个就填几行
    <a href="你的链接"> <img src="图片链接" width="100%" /></a>')); 72 | $form->addInput($slidercode); 73 | 74 | $infpage = new Typecho_Widget_Helper_Form_Element_Radio('infpage', 75 | array('able' => _t('启用'), 76 | 'disable' => _t('禁止'), 77 | ), 78 | 'disable', _t('首页文章无限加载'), _t('')); 79 | $form->addInput($infpage); 80 | 81 | //侧边栏 82 | $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', 83 | array('ShowRecentPosts' => _t('最新文章'), 84 | 'ShowCategory' => _t('推荐链接,广告位'), 85 | 'ShowRecentComments' => _t('最新评论'), 86 | 'ShowTags' => _t('标签云')), 87 | array('ShowRecentPosts', 'ShowCategory', 'ShowRecentComments', 'ShowTags'), _t('侧边栏显示') 88 | ); 89 | $form->addInput($sidebarBlock->multiMode()); 90 | 91 | $sidebarAD = new Typecho_Widget_Helper_Form_Element_Textarea('sidebarAD', NULL, NULL, _t('侧边栏推荐位红色'), _t('请按固定格式填写,否则会造成错乱,可添加多个,第一行是广告的链接地址,第二行是广告标题,第三行是广告内容
    例如:
    http://themebetter.com/theme/dux
    DUX主题 新一代主题
    DUX Wordpress主题是大前端当前使用主题,是大前端积累多年Wordpress主题经验设计而成;更加扁平的风格和干净白色的架构会让网站显得内涵而出色...')); 92 | $form->addInput($sidebarAD); 93 | 94 | 95 | $sitebar_fu = new Typecho_Widget_Helper_Form_Element_Text('sitebar_fu', NULL, NULL, _t('侧边栏浮动'), _t('请输入要浮动的侧边栏模块序号并使用英文逗号分隔,例如1,3 代表第1和第3块侧边栏会浮动')); 96 | $form->addInput($sitebar_fu); 97 | 98 | $pagesidebar = new Typecho_Widget_Helper_Form_Element_Radio('pagesidebar', 99 | array('able' => _t('启用'), 100 | 'disable' => _t('禁止'), 101 | ), 102 | 'able', _t('独立页面左边导航栏'), _t('在独立页面左边显示导航栏')); 103 | $form->addInput($pagesidebar); 104 | 105 | //社交 106 | 107 | //图片 108 | $srcAddress = new Typecho_Widget_Helper_Form_Element_Text('src_add', NULL, NULL, _t('图片CDN替换前地址'), _t('即你的附件存放链接,一般为http://www.yourblog.com/usr/uploads/')); 109 | $form->addInput($srcAddress->addRule('xssCheck', _t('请不要在链接中使用特殊字符'))); 110 | $cdnAddress = new Typecho_Widget_Helper_Form_Element_Text('cdn_add', NULL, NULL, _t('图片CDN替换后地址'), _t('即你的七牛云存储域名,一般为http://yourblog.qiniudn.com/,可能也支持其他有镜像功能的CDN服务')); 111 | $form->addInput($cdnAddress->addRule('xssCheck', _t('请不要在链接中使用特殊字符'))); 112 | $default_thumb = new Typecho_Widget_Helper_Form_Element_Text('default_thumb', NULL, '', _t('默认缩略图'),_t('文章没有图片时的默认缩略图,留空则无,一般为http://www.yourblog.com/image.png')); 113 | $form->addInput($default_thumb->addRule('xssCheck', _t('请不要在链接中使用特殊字符'))); 114 | 115 | //作者简介 116 | $authordesc = new Typecho_Widget_Helper_Form_Element_Text('authordesc', null, NULL, _t('作者简介'), _t('文章页的作者说明')); 117 | $form->addInput($authordesc); 118 | 119 | //代码高亮设置 120 | $useHighline = new Typecho_Widget_Helper_Form_Element_Radio('useHighline', 121 | array('able' => _t('启用'), 122 | 'disable' => _t('禁止'), 123 | ), 124 | 'disable', _t('代码高亮设置'), _t('默认禁止,启用则会对 ``` 进行代码高亮,支持20种编程语言的高亮')); 125 | $form->addInput($useHighline); 126 | 127 | //footer部分 128 | $footad = new Typecho_Widget_Helper_Form_Element_Textarea('footad', NULL, NULL, _t('底部广告栏'), _t('页底广告位,可以放置广告,bootstrap样式')); 129 | $form->addInput($footad); 130 | $flinks = new Typecho_Widget_Helper_Form_Element_Textarea('flinks', NULL, NULL, _t('底部友情链接'), _t('底部导航条 一般li格式 友情链接使用')); 131 | $form->addInput($flinks); 132 | $fcode = new Typecho_Widget_Helper_Form_Element_Textarea('fcode', NULL, NULL, _t('底部小广告'), _t('该块显示在网站底部版权上方,可已定义放一些链接或者图片之类的内容。')); 133 | $form->addInput($fcode); 134 | $miitbeian = new Typecho_Widget_Helper_Form_Element_Text('miitbeian', NULL, NULL, _t('备案号'), _t('填写你的备案号,留空则不显示')); 135 | $form->addInput($miitbeian); 136 | $GoogleAnalytics = new Typecho_Widget_Helper_Form_Element_Textarea('GoogleAnalytics', NULL, NULL, _t('统计代码'), _t('填写你的各种跟踪统计代码,相当于页尾代码')); 137 | $form->addInput($GoogleAnalytics); 138 | 139 | } 140 | 141 | 142 | 143 | /** 144 | * 解析内容以实现附件加速 145 | * @access public 146 | * @param string $content 文章正文 147 | * @param Widget_Abstract_Contents $obj 148 | */ 149 | function parseContent($obj) { 150 | $options = Typecho_Widget::widget('Widget_Options'); 151 | if (!empty($options->src_add) && !empty($options->cdn_add)) { 152 | $obj->content = str_ireplace($options->src_add, $options->cdn_add, $obj->content); 153 | } 154 | echo trim($obj->content); 155 | } 156 | 157 | 158 | /*文章阅读次数统计*/ 159 | function get_post_view($archive) { 160 | $cid = $archive->cid; 161 | $db = Typecho_Db::get(); 162 | $prefix = $db->getPrefix(); 163 | if (!array_key_exists('views', $db->fetchRow($db->select()->from('table.contents')))) { 164 | $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `views` INT(10) DEFAULT 0;'); 165 | echo 0; 166 | return; 167 | } 168 | $row = $db->fetchRow($db->select('views')->from('table.contents')->where('cid = ?', $cid)); 169 | if ($archive->is('single')) { 170 | $views = Typecho_Cookie::get('extend_contents_views'); 171 | if (empty($views)) { 172 | $views = array(); 173 | } else { 174 | $views = explode(',', $views); 175 | } 176 | if (!in_array($cid, $views)) { 177 | $db->query($db->update('table.contents')->rows(array('views' => (int)$row['views'] + 1))->where('cid = ?', $cid)); 178 | array_push($views, $cid); 179 | $views = implode(',', $views); 180 | Typecho_Cookie::set('extend_contents_views', $views); //记录查看cookie 181 | 182 | } 183 | } 184 | echo $row['views']; 185 | } 186 | 187 | 188 | /*Typecho 24小时发布文章数量*/ 189 | function get_recent_posts_number($days = 1,$display = true){ 190 | $db = Typecho_Db::get(); 191 | $today = time() + 3600 * 8; 192 | $daysago = $today - ($days * 24 * 60 * 60); 193 | $total_posts = $db->fetchObject($db->select(array('COUNT(cid)' => 'num')) 194 | ->from('table.contents') 195 | ->orWhere('created < ? AND created > ?', $today,$daysago) 196 | ->where('type = ? AND status = ? AND password IS NULL', 'post', 'publish'))->num; 197 | if($display) { 198 | echo $total_posts; 199 | } else { 200 | return $total_posts; 201 | } 202 | } 203 | 204 | //缩略图调用 205 | function showThumb($obj,$size=null,$link=false){ 206 | preg_match_all( "/<[img|IMG].*?src=[\'|\"](.*?)[\'|\"].*?[\/]?>/", $obj->content, $matches ); 207 | $thumb = ''; 208 | $options = Typecho_Widget::widget('Widget_Options'); 209 | $attach = $obj->attachments(1)->attachment; 210 | if (isset($attach->isImage) && $attach->isImage == 1){ 211 | $thumb = $attach->url; 212 | if(!empty($options->src_add) && !empty($options->cdn_add)){ 213 | $thumb = str_ireplace($options->src_add,$options->cdn_add,$thumb); 214 | } 215 | }elseif(isset($matches[1][0])){ 216 | $thumb = $matches[1][0]; 217 | if(!empty($options->src_add) && !empty($options->cdn_add)){ 218 | $thumb = str_ireplace($options->src_add,$options->cdn_add,$thumb); 219 | } 220 | } 221 | if(empty($thumb) && empty($options->default_thumb)){ 222 | $thumb= $options->themeUrl .'/img/thumb/' . rand(1, 15) . '.jpg'; 223 | //去掉下面4行双斜杠 启用BING美图随机缩略图 224 | //$str = file_get_contents('http://cn.bing.com/HPImageArchive.aspx?format=js&idx='.rand(1, 30).'&n=1'); 225 | //$array = json_decode($str); 226 | //$imgurl = $array->{"images"}[0]->{"urlbase"}; 227 | //$thumb = '//i'.rand(0, 2).'.wp.com/cn.bing.com'.$imgurl.'_1920x1080.jpg?resize=220,150'; 228 | 229 | return $thumb; 230 | }else{ 231 | $thumb = empty($thumb) ? $options->default_thumb : $thumb; 232 | } 233 | if($link){ 234 | return $thumb; 235 | } 236 | } 237 | 238 | //编辑推荐 239 | function hotpost() { 240 | $options = Typecho_Widget::widget('Widget_Options'); 241 | if ((!empty($options->tj_cid)) && floor($options->tj_cid)==$options->tj_cid) { 242 | $tjids = $options->tj_cid; 243 | }else{ 244 | $tjids = 0; 245 | } 246 | //return $tjids; 247 | $defaults = array( 248 | 'cid' => $tjids, 249 | 'before' => '', 250 | 'after' => '', 251 | 'xformat' => '' 252 | ); 253 | $db = Typecho_Db::get(); 254 | 255 | $sql = $db->select()->from('table.contents') 256 | ->where('status = ?','publish') 257 | ->where('type = ?', 'post') 258 | ->where('cid = ?', $defaults['cid']); 259 | 260 | $result = $db->fetchAll($sql); 261 | echo $defaults['before']; 262 | foreach($result as $val){ 263 | $val = Typecho_Widget::widget('Widget_Abstract_Contents')->filter($val); 264 | echo str_replace(array('{permalink}', '{title}','{content}'),array($val['permalink'], $val['title'],substr($val['text'],0,250)), $defaults['xformat']); 265 | } 266 | echo $defaults['after']; 267 | } 268 | 269 | //幻灯片输出 270 | function slout() { 271 | $options = Typecho_Widget::widget('Widget_Options'); 272 | if (!empty($options->slidercode)) { 273 | $text = $options->slidercode; 274 | }else{ 275 | $text=' 276 | '; 277 | } 278 | $t_arr = explode(' 279 | ', $text); 280 | $sss = ''; 287 | 288 | echo $sss; 289 | } 290 | 291 | //导航fa图标 292 | function fa_ico($type, $num) { 293 | $options = Typecho_Widget::widget('Widget_Options'); 294 | if ($type == 1) { 295 | if (!empty($options->fatext)) { 296 | $text = $options->fatext; 297 | $fa_arr = explode("\n", $text); 298 | return $fa_arr[$num]; 299 | } 300 | else { 301 | $text=''; 302 | return $text; 303 | } 304 | } 305 | else { 306 | if (!empty($options->pagefatext)) { 307 | $text = $options->pagefatext; 308 | $fa_arr = explode("\n", $text); 309 | return $fa_arr[$num]; 310 | } 311 | else { 312 | $text=''; 313 | return $text; 314 | } 315 | } 316 | } 317 | 318 | //侧边栏推荐位 319 | function sitebar_ad($obj) { 320 | $options = $obj; 321 | if (!empty($options)) { 322 | $text = $options; 323 | }else{ 324 | $text="https://github.com/hiCasper/Typecho-theme-DUX\nDUX主题 新一代主题\nDUX for Typecho"; 325 | } 326 | $b_arr = explode("\n", $text); 327 | return $b_arr; 328 | } 329 | 330 | ?> 331 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | options->DnsPrefetch == "able"): ?> 7 | 8 | options->cdn_add): ?> 9 | 10 | 11 | 12 | 13 | 14 | <?php $this->archiveTitle(array('category'=>_t(' %s '),'search'=>_t(' %s '),'tag'=>_t(' %s '),'author'=>_t(' %s ')),'',' - ');?> <?php $this->options->title();?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | header('generator=&template=&pingback=&xmlrpc=&wlw=&commentReply=&rss1=&rss2=&atom='); ?> 43 | 44 | 45 | 46 |
    47 |
    48 |

    49 | options->logoUrl)): ?> 50 | <?php $this->options->title();?> 51 | 52 | <?php $this->options->title();?>options->title();?> 53 | 54 |

    55 |
    options->logotext && !empty($this->options->logotext) ): ?>options->logotext(); ?>
    56 | 110 | 111 |
    112 |
    113 | 121 | 122 | -------------------------------------------------------------------------------- /img/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/404.png -------------------------------------------------------------------------------- /img/avatar-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/avatar-default.png -------------------------------------------------------------------------------- /img/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/banner.png -------------------------------------------------------------------------------- /img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/bg.png -------------------------------------------------------------------------------- /img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/favicon.ico -------------------------------------------------------------------------------- /img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/loading.gif -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/logo.png -------------------------------------------------------------------------------- /img/thumb/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/1.jpg -------------------------------------------------------------------------------- /img/thumb/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/10.jpg -------------------------------------------------------------------------------- /img/thumb/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/11.jpg -------------------------------------------------------------------------------- /img/thumb/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/12.jpg -------------------------------------------------------------------------------- /img/thumb/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/13.jpg -------------------------------------------------------------------------------- /img/thumb/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/14.jpg -------------------------------------------------------------------------------- /img/thumb/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/15.jpg -------------------------------------------------------------------------------- /img/thumb/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/2.jpg -------------------------------------------------------------------------------- /img/thumb/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/3.jpg -------------------------------------------------------------------------------- /img/thumb/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/4.jpg -------------------------------------------------------------------------------- /img/thumb/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/5.jpg -------------------------------------------------------------------------------- /img/thumb/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/6.jpg -------------------------------------------------------------------------------- /img/thumb/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/7.jpg -------------------------------------------------------------------------------- /img/thumb/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/8.jpg -------------------------------------------------------------------------------- /img/thumb/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumb/9.jpg -------------------------------------------------------------------------------- /img/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hicasper/Typecho-theme-DUX/e328ec007bc02cc0e9f94f3cea32de1ebe95ae12/img/thumbnail.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | need('header.php');?> 12 | 13 |
    14 |
    15 |
    16 | _currentPage==1): ?> 17 | 18 | options->Slider == 'SliderTrue'): ?> 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
    27 |

    最新发布

    28 | options->smallbanner && !empty($this->options->smallbanner) ): ?> 29 |
    options->smallbanner(); ?>
    30 |
    31 | have()):?> 32 | next()): ?> 33 | 49 | 50 | 51 | 54 |
    55 |
    56 | need('sidebar.php'); ?> 57 |
    58 | 59 | need('footer.php'); ?> -------------------------------------------------------------------------------- /js/comment.js: -------------------------------------------------------------------------------- 1 | tbfine(function (){ 2 | 3 | return { 4 | init: function (){ 5 |   $('.commentlist .url').attr('target','_blank') 6 | 7 | $('.commnet-user-change').on('click', function(){ 8 | $('#comment-author-info').slideDown(300) 9 | $('#comment-author-info input:first').focus() 10 | }) 11 | 12 | /* 13 | * comment 14 | * ==================================================== 15 | */ 16 | var edit_mode = '0', 17 | txt1 = '
    评论提交中...
    ', 18 | txt2 = '
    #
    ', 19 | txt3 = '">', 20 | cancel_edit = '取消编辑', 21 | edit, 22 | num = 1, 23 | comm_array = []; 24 | comm_array.push(''); 25 | 26 | $comments = $('#comments-title'); 27 | $cancel = $('#cancel-comment-reply-link'); 28 | cancel_text = $cancel.text(); 29 | $submit = $('#commentform #submit'); 30 | $submit.attr('disabled', false); 31 | $('.comt-tips').append(txt1 + txt2); 32 | $('.comt-loading').hide(); 33 | $('.comt-error').hide(); 34 | $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body'); 35 | $('#commentform').submit(function() { 36 | $('.comt-loading').slideDown(300); 37 | $submit.attr('disabled', true).fadeTo('slow', 0.5); 38 | if (edit) $('#comment').after(''); 39 | $.ajax({ 40 | url: jsui.uri + '/action/comment.php', 41 | data: $(this).serialize(), 42 | type: $(this).attr('method'), 43 | error: function(request) { 44 | $('.comt-loading').slideUp(300); 45 | $('.comt-error').slideDown(300).html(request.responseText); 46 | setTimeout(function() { 47 | $submit.attr('disabled', false).fadeTo('slow', 1); 48 | $('.comt-error').slideUp(300) 49 | }, 50 | 3000) 51 | }, 52 | success: function(data) { 53 | $('.comt-loading').slideUp(300); 54 | comm_array.push($('#comment').val()); 55 | $('textarea').each(function() { 56 | this.value = '' 57 | }); 58 | var t = addComment, 59 | cancel = t.I('cancel-comment-reply-link'), 60 | temp = t.I('wp-temp-form-div'), 61 | respond = t.I(t.respondId), 62 | post = t.I('comment_post_ID').value, 63 | parent = t.I('comment_parent').value; 64 | if (!edit && $comments.length) { 65 | n = parseInt($comments.text().match(/\d+/)); 66 | $comments.text($comments.text().replace(n, n + 1)) 67 | } 68 | new_htm = '" id="new_comm_' + num + '">') : ('\n
      0) { 172 | $submit.val(wait); 173 | wait--; 174 | setTimeout(countdown, 1000) 175 | } else { 176 | $submit.val(submit_val).attr('disabled', false).fadeTo('slow', 1); 177 | wait = 15 178 | } 179 | } 180 | } 181 | } 182 | 183 | }) -------------------------------------------------------------------------------- /js/dux_ads.js: -------------------------------------------------------------------------------- 1 | $.getScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',function(){ 2 | if ($(window).width() > 250){ 3 | $('.excerpt:first').before('
      '); 4 | } 5 | if ($(window).width() > 640){ 6 | $('.article-header').append(''); 7 | } 8 | $('.article-nav').after(''); 9 | if ($(window).width() > 1024){ 10 | $('.widget:last').after('
      '); 11 | } 12 | $('.copyright').before('
      '); 13 | [].forEach.call(document.querySelectorAll('.adsbygoogle'), function(){ 14 | (adsbygoogle = window.adsbygoogle || []).push({}); 15 | }); 16 | }); -------------------------------------------------------------------------------- /js/libs/hammer.min.js: -------------------------------------------------------------------------------- 1 | /*! Hammer.JS - v2.0.4 - 2014-09-28 2 | * http://hammerjs.github.io/ 3 | * 4 | * Copyright (c) 2014 Jorik Tangelder; 5 | * Licensed under the MIT license */ 6 | !function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(k(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e-1}function r(a){return a.trim().split(/\s+/g)}function s(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function v(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);var j=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}function C(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function D(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){var j=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function E(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function G(a,b,c){return{x:b/a||0,y:c/a||0}}function H(a,b){return a===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}function I(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function J(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function K(a,b){return J(b[1],b[0],Lb)-J(a[1],a[0],Lb)}function L(a,b){return I(b[0],b[1],Lb)/I(a[0],a[1],Lb)}function M(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}function N(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}function P(a,b){var c=t(a.touches),d=t(a.changedTouches);return b&(Ab|Bb)&&(c=u(c.concat(d),"identifier",!0)),[c,d]}function Q(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}function R(a,b){var c=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return p(a.target,i)}),b===yb)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Tb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub="touchstart",Vb="touchstart touchmove touchend touchcancel";j(O,y,{handler:function(a){var b=Tb[a.type];if(b===yb&&(this.started=!0),this.started){var c=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});var Wb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb="touchstart touchmove touchend touchcancel";j(Q,y,{handler:function(a){var b=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){var d=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yb=v(jb.style,"touchAction"),Zb=Yb!==d,$b="compute",_b="auto",ac="manipulation",bc="none",cc="pan-x",dc="pan-y";T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(" "))},preventDefaults:function(a){if(!Zb){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);return e||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var ec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){return h(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=Y(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=Y(a,this);var b=s(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?W(d):""),a)}var c=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(var a=0;af?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Z.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();else if(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);else if(a.eventType&Ab)return ic;return kc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance0)a();else if(e(n.next).attr("href")){var u=r.getCurrentScrollOffset(n.scrollContainer);E(function(){p(u)})}return s&&s.havePage()&&(l(),t=s.getPage(),r.forceScrollTop(function(){var n;t>1?(v(t),n=h(!0),e("html, body").scrollTop(n)):a()})),o}function a(){c(),n.scrollContainer.scroll(f)}function f(){var e,t;e=r.getCurrentScrollOffset(n.scrollContainer),t=h(),e>=t&&(m()>=n.triggerPageThreshold?(l(),E(function(){p(e)})):p(e))}function l(){n.scrollContainer.unbind("scroll",f)}function c(){e(n.pagination).hide()}function h(t){var r,i;return r=e(n.container).find(n.item).last(),r.size()===0?0:(i=r.offset().top+r.height(),t||(i+=n.thresholdMargin),i)}function p(t,r){var s;s=e(n.next).attr("href");if(!s)return n.noneleft&&e(n.container).find(n.item).last().after(n.noneleft),l();if(n.beforePageChange&&e.isFunction(n.beforePageChange)&&n.beforePageChange(t,s)===!1)return;i.pushPages(t,s),l(),y(),d(s,function(t,i){var o=n.onLoadItems.call(this,i),u;o!==!1&&(e(i).hide(),u=e(n.container).find(n.item).last(),u.after(i),e(i).fadeIn()),s=e(n.next,t).attr("href"),e(n.pagination).replaceWith(e(n.pagination,t)),b(),c(),s?a():l(),n.onRenderComplete.call(this,i),r&&r.call(this)})}function d(t,r,i){var s=[],o,u=Date.now(),a,f;i=i||n.loaderDelay,e.get(t,null,function(t){o=e(n.container,t).eq(0),0===o.length&&(o=e(t).filter(n.container).eq(0)),o&&o.find(n.item).each(function(){s.push(this)}),r&&(f=this,a=Date.now()-u,a0&&p(n,function(){l(),i.getCurPageNum(n)+1'+n.loader+""),t.hide()),t}function y(){var t=g(),r;n.customLoaderProc!==!1?n.customLoaderProc(t):(r=e(n.container).find(n.item).last(),r.after(t),t.fadeIn())}function b(){var e=g();e.remove()}function w(t){var r=e(".ias_trigger");return r.size()===0&&(r=e('"),r.hide()),e("a",r).unbind("click").bind("click",function(){return S(),t.call(),!1}),r}function E(t){var r=w(t),i;n.customTriggerProc!==!1?n.customTriggerProc(r):(i=e(n.container).find(n.item).last(),i.after(r),r.fadeIn())}function S(){var e=w();e.remove()}var n=e.extend({},e.ias.defaults,t),r=new e.ias.util,i=new e.ias.paging(n.scrollContainer),s=n.history?new e.ias.history:!1,o=this;u()},e.ias.defaults={container:"#container",scrollContainer:e(window),item:".item",pagination:"#pagination",next:".next",noneleft:!1,loader:'',loaderDelay:600,triggerPageThreshold:3,trigger:"Load more items",thresholdMargin:0,history:!0,onPageChange:function(){},beforePageChange:function(){},onLoadItems:function(){},onRenderComplete:function(){},customLoaderProc:!1,customTriggerProc:!1},e.ias.util=function(){function i(){e(window).load(function(){t=!0})}var t=!1,n=!1,r=this;i(),this.forceScrollTop=function(i){e("html,body").scrollTop(0),n||(t?(i.call(),n=!0):setTimeout(function(){r.forceScrollTop(i)},1))},this.getCurrentScrollOffset=function(e){var t,n;return e.get(0)===window?t=e.scrollTop():t=e.offset().top,n=e.height(),t+n}},e.ias.paging=function(){function s(){e(window).scroll(o)}function o(){var t,s,o,f,l;t=i.getCurrentScrollOffset(e(window)),s=u(t),o=a(t),r!==s&&(f=o[0],l=o[1],n.call({},s,f,l)),r=s}function u(e){for(var n=t.length-1;n>0;n--)if(e>t[n][0])return n+1;return 1}function a(e){for(var n=t.length-1;n>=0;n--)if(e>t[n][0])return t[n];return null}var t=[[0,document.location.toString()]],n=function(){},r=1,i=new e.ias.util;s(),this.getCurPageNum=function(t){return t=t||i.getCurrentScrollOffset(e(window)),u(t)},this.onChangePage=function(e){n=e},this.pushPages=function(e,n){t.push([e,n])}},e.ias.history=function(){function n(){t=!!(window.history&&history.pushState&&history.replaceState),t=!1}var e=!1,t=!1;n(),this.setPage=function(e,t){this.updateState({page:e},"",t)},this.havePage=function(){return this.getState()!==!1},this.getPage=function(){var e;return this.havePage()?(e=this.getState(),e.page):1},this.getState=function(){var e,n,r;if(t){n=history.state;if(n&&n.ias)return n.ias}else{e=window.location.hash.substring(0,7)==="#/page/";if(e)return r=parseInt(window.location.hash.replace("#/page/",""),10),{page:r}}return!1},this.updateState=function(t,n,r){e?this.replaceState(t,n,r):this.pushState(t,n,r)},this.pushState=function(n,r,i){var s;t?history.pushState({ias:n},r,i):(s=n.page>0?"#/page/"+n.page:"",window.location.hash=s),e=!0},this.replaceState=function(e,n,r){t?history.replaceState({ias:e},n,r):this.pushState(e,n,r)}}})(jQuery); -------------------------------------------------------------------------------- /js/libs/jquery.cookie.min.js: -------------------------------------------------------------------------------- 1 | jQuery.cookie = function(name, value, options) { 2 | if (typeof value != 'undefined') { // name and value given, set cookie 3 | options = options || {}; 4 | if (value === null) { 5 | value = ''; 6 | options.expires = -1; 7 | } 8 | var expires = ''; 9 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 10 | var date; 11 | if (typeof options.expires == 'number') { 12 | date = new Date(); 13 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 14 | } else { 15 | date = options.expires; 16 | } 17 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 18 | } 19 | var path = options.path ? '; path=' + options.path : ''; 20 | var domain = options.domain ? '; domain=' + options.domain : ''; 21 | var secure = options.secure ? '; secure' : ''; 22 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 23 | } else { // only name given, get cookie 24 | var cookieValue = null; 25 | if (document.cookie && document.cookie != '') { 26 | var cookies = document.cookie.split(';'); 27 | for (var i = 0; i < cookies.length; i++) { 28 | var cookie = jQuery.trim(cookies[i]); 29 | // Does this cookie string begin with the name we want? 30 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 31 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 32 | break; 33 | } 34 | } 35 | } 36 | return cookieValue; 37 | } 38 | }; 39 | 40 | var lcs={ 41 | get:function(dataKey){ 42 | if(window.localStorage){ 43 | return localStorage.getItem(dataKey); 44 | }else{ 45 | return $.cookie(dataKey); 46 | } 47 | }, 48 | set:function(key,value){ 49 | if(window.localStorage){ 50 | localStorage[key]=value; 51 | }else{ 52 | $.cookie(key,value); 53 | } 54 | }, 55 | remove:function(key){ 56 | if(window.localStorage){ 57 | localStorage.removeItem(key); 58 | }else{ 59 | $.cookie(key,undefined); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /js/libs/jsrender.min.js: -------------------------------------------------------------------------------- 1 | /*! JsRender v1.0.0-beta: http://github.com/BorisMoore/jsrender and http://jsviews.com/jsviews 2 | informal pre V1.0 commit counter: 54 */ 3 | (function(n,t,i){"use strict";function bt(n){return n}function tr(n){return n}function kt(n){o._dbgMode=n;yt=n?"Unavailable (nested view): use #getIndex()":"";g("dbg",hi.dbg=it.dbg=n?tr:bt)}function dt(n){return{getTgt:n,map:function(t){var r,i=this;i.src!==t&&(i.src&&i.unmap(),typeof t=="object"&&(r=n.apply(i,arguments),i.src=t,i.tgt=r))}}}function ot(n){this.name=(u.link?"JsViews":"JsRender")+" Error";this.message=n||this.name}function f(n,t){var i;n=n||{};for(i in t)n[i]=t[i];return n}function tt(n){return typeof n=="function"}function gt(n,t,i){return(!a.rTag||n)&&(p=n?n.charAt(0):p,w=n?n.charAt(1):w,s=t?t.charAt(0):s,v=t?t.charAt(1):v,nt=i||nt,n="\\"+p+"(\\"+nt+")?\\"+w,t="\\"+s+"\\"+v,y="(?:(?:(\\w+(?=[\\/\\s\\"+s+"]))|(?:(\\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\\*)))\\s*((?:[^\\"+s+"]|\\"+s+"(?!\\"+v+"))*?)",a.rTag=y+")",y=new RegExp(n+y+"(\\/)?|(?:\\/(\\w+)))"+t,"g"),vt=new RegExp("<.*>|([^\\\\]|^)[{}]|"+n+".*"+t)),[p,w,s,v,nt]}function ir(n,t){t||(t=n,n=i);var e,f,o,u,r=this,s=!t||t==="root";if(n){if(u=r.type===t?r:i,!u)if(e=r.views,r._.useKey){for(f in e)if(u=e[f].get(n,t))break}else for(f=0,o=e.length;!u&&f0){try{a=u.nodeType>0?u:!vt.test(u)&&t&&t(n.document).find(u)[0]}catch(c){}return a&&(u=e[r=r||a.getAttribute(et)],u||(r=r||"_"+gi++,a.setAttribute(et,r),u=e[r]=ii(r,a.innerHTML,f,o,s,h)),a=i),u}}var c,a;return u=u||"",c=v(u),h=h||(u.markup?u:{}),h.tmplName=r,f&&(h._parentTmpl=f),!c&&u.markup&&(c=v(u.markup))&&c.fn&&(c.debug!==u.debug||c.allowCode!==u.allowCode)&&(c=c.markup),c!==i?(r&&!f&&(wt[r]=function(){return u.render.apply(u,arguments)}),c.fn||u.fn?c.fn&&(u=r&&r!==c.tmplName?l(h,c):c):(u=ri(c,h),ct(c.replace(yi,"\\$&"),u)),or(h),u):void 0}function ri(n,t){var i,e=o.wrapMap||{},r=f({markup:n,tmpls:[],links:{},tags:{},bnds:[],_is:"template",render:ui},t);return t.htmlTag||(i=bi.exec(n),r.htmlTag=i?i[1].toLowerCase():""),i=e[r.htmlTag],i&&i!==e.div&&(r.markup=u.trim(r.markup)),r}function hr(n,t){function u(e,o,s){var l,h,v,c;if(e&&""+e!==e&&!e.nodeType&&!e.markup){for(v in e)u(v,e[v],o);return r}return o===i&&(o=e,e=i),e&&""+e!==e&&(s=o,o=e,e=i),c=s?s[f]=s[f]||{}:u,h=t.compile,(l=a.onBeforeStoreItem)&&(h=l(c,e,o,h)||h),e?o===null?delete c[e]:c[e]=h?o=h(e,o,s,n,t):o:o=h(i,o),h&&o&&(o._is=n),(l=a.onStoreItem)&&l(c,e,o,h),o}var f=n+"s";r[f]=u;k[n]=t}function cr(n,t){var i=this.jquery&&(this[0]||h('Unknown template: "'+self.selector+'"')),r=i.getAttribute(et);return ui.call(r?e[r]:e(i),n,t)}function ht(n,t,i){if(o._dbgMode)try{return n.fn(t,i,r)}catch(u){return h(u,i)}return n.fn(t,i,r)}function ui(n,t,i,r,f,e){var o=this;return!r&&o.fn._nvw&&!u.isArray(n)?ht(o,n,{tmpl:o}):fi.call(o,n,t,i,r,f,e)}function fi(n,t,r,f,o,s){var y,ut,g,a,nt,tt,it,p,v,rt,w,ft,h,et,c=this,k="";if(!!t===t&&(r=t,t=i),o===!0&&(it=!0,o=0),c.tag?(p=c,c=c.tag,rt=c._,ft=c.tagName,h=rt.tmpl||p.tmpl,et=c.attr&&c.attr!==b,t=l(t,c.ctx),v=p.content,p.props.link===!1&&(t=t||{},t.link=!1),f=f||p.view,n=arguments.length?n:f):h=c,h&&(!f&&n&&n._is==="view"&&(f=n),f&&(v=v||f.content,s=s||f._.onRender,n===f&&(n=f.data),t=l(t,f.ctx)),f&&f.data!==i||((t=t||{}).root=n),h.fn||(h=e[h]||e(h)),h)){if(s=(t&&t.link)!==!1&&!et&&s,w=s,s===!0&&(w=i,s=f._.onRender),t=h.helpers?l(h.helpers,t):t,u.isArray(n)&&!r)for(a=it?f:o!==i&&f||new d(t,"array",f,n,h,o,v,s),y=0,ut=n.length;yyt-bt&&(bt=pt.slice(bt,yt+1),lt=w+":"+bt+s,wt=v[lt],wt||(v[lt]=1,v[lt]=wt=ct(lt,i||t,!0),wt.paths.push({_jsvOb:wt})),wt!==1&&(o||t).push({_jsvOb:wt}))),e?(e=!ot,e?p:'"'):f?(f=!st,f?p:'"'):(k?(r++,y[r]=yt++,k):"")+(vt?r?"":(h=pt.slice(h,yt),u?(u=l=o=!1,"\b"):"\b,")+h+(h=yt+p.length,"\b"):it?(r&&c(n),u=g,l=d,h=yt+p.length,g+":"):g?g.split("^").join(".").replace(li,dt)+(ut?(a[++r]=!0,g.charAt(0)!=="."&&(y[r]=yt),kt?"":ut):nt):nt?nt:ht?(a[r--]=!1,ht)+(ut?(a[++r]=!0,ut):""):ft?(a[r]||c(n),","):b?"":(e=ot,f=st,'"'));c(n)}var u,o,l,f,e,h=0,v=i?i.links:t&&(t.links=t.links||{}),a={},y={0:-1},r=0;return(n+(i?" ":"")).replace(/\)\^/g,").").replace(ai,p)}function lt(n,i,r){var y,f,e,l,d,ht,ct,wt,at,g,rt,p,o,ft,et,v,nt,w,tt,vt,k,yt,pt,ot,s,a,st,h=0,u="",it={},bt=n.length;for(""+i===i?(v=r?'data-link="'+i.replace(ut," ").slice(1,-1)+'"':i,i=0):(v=i.tmplName||"unnamed",i.allowCode&&(it.allowCode=!0),i.debug&&(it.debug=!0),p=i.bnds,et=i.tmpls),y=0;y":l+e):(tt&&(nt=ri(vt,it),nt.tmplName=v+"/"+e,lt(tt,nt),et.push(nt)),pt||(w=e,yt=u,u=""),k=n[y+1],k=k&&k[0]==="else"),st=a?";\ntry{\nret+=":"\n+",ot&&(o||l&&l!==b)){if(s="return {"+d+"};",a&&(s="try {\n"+s+"\n}catch(e){return {error: j._err(e,view,"+a+")}}\n"),s=new Function("data,view,j,u"," // "+v+" "+h+" "+e+"\n"+s),s.paths=o,s._tag=e,r)return s;rt=1}if(u+=ot?(r?(a?"\ntry{\n":"")+"return ":st)+(rt?(rt=0,g=at=!0,'c("'+l+'",view,'+(o?(p[h-1]=s,h):"{"+d+"}")+")"):e===">"?(ct=!0,"h("+ft[0]+")"):(wt=!0,"((v="+ft[0]+')!=null?v:"")')):(g=ht=!0,"\n{view:view,tmpl:"+(tt?et.length:"0")+","+d+"},"),w&&!k){if(u="["+u.slice(0,-1)+"]",(r||o)&&(u=new Function("data,view,j,u"," // "+v+" "+h+" "+w+"\nreturn "+u+";"),o&&((p[h-1]=u).paths=o),u._tag=e,r))return u;u=yt+st+'t("'+w+'",view,this,'+(h||u)+")";o=0;w=0}a&&(g=!0,u+=";\n}catch(e){ret"+(r?"urn ":"+=")+"j._err(e,view,"+a+");}\n"+(r?"":"ret=ret"))}u="// "+v+"\nj=j||"+(t?"jQuery.":"jsviews.")+"views;var v"+(ht?",t=j._tag":"")+(at?",c=j._cnvt":"")+(ct?",h=j.converters.html":"")+(r?";\n":',ret=""\n')+(it.debug?"debugger;":"")+u+(r?"\n":";\nreturn ret;");try{u=new Function("data,view,j,u",u)}catch(kt){c("Compiled template code:\n\n"+u+'\n: "'+kt.message+'"')}return i&&(i.fn=u),g||(u._nvw=!0),u}function l(n,t){return n&&n!==t?t?f(f({},t),n):n:t&&f({},t)}function lr(n){return pt[n]||(pt[n]="&#"+n.charCodeAt(0)+";")}function ar(n){var i,t,r=[];if(typeof n=="object")for(i in n)t=n[i],t&&t.toJSON&&!t.toJSON()||tt(t)||r.push({key:i,prop:n[i]});return r}function ci(n){return n!=null?ki.test(n)&&(""+n).replace(di,lr)||n:""}if((!t||!t.views)&&!n.jsviews){var u,rt,y,vt,yt,p="{",w="{",s="}",v="}",nt="^",li=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,ai=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*\.|\s*\^|\s*$)|[)\]])([([]?))|(\s+)/g,ut=/[ \t]*(\r\n|\n|\r)/g,vi=/\\(['"])/g,yi=/['"\\]/g,pi=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,wi=/^if\s/,bi=/<(\w+)[>\s]/,ki=/[\x00`><\"'&]/,ft=/^on[A-Z]|^convert(Back)?$/,di=/[\x00`><"'&]/g,gi=0,nr=0,pt={"&":"&","<":"<",">":">","\x00":"�","'":"'",'"':""","`":"`"},b="html",et="data-jsv-tmpl",wt={},k={template:{compile:ii},tag:{compile:sr},helper:{},converter:{}},r={jsviews:"v1.0.0-beta",settings:function(n){f(o,n);kt(o._dbgMode);o.jsv&&o.jsv()},sub:{View:d,Err:ot,tmplFn:ct,cvt:st,parse:si,extend:f,syntaxErr:c,DataMap:dt},_cnvt:ur,_tag:er,_err:h};(ot.prototype=new Error).constructor=ot;ni.depends=function(){return[this.get("item"),"index"]};ti.depends=function(){return["index"]};d.prototype={get:ir,getIndex:ti,getRsc:fr,hlp:rr,_is:"view"};for(rt in k)hr(rt,k[rt]);var at,e=r.templates,it=r.converters,hi=r.helpers,g=r.tags,a=r.sub,o=r.settings;t?(u=t,u.fn.render=cr,(at=u.observable)&&(f(a,at.sub),delete at.sub)):(u=n.jsviews={},u.isArray=Array&&Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"});u.render=wt;u.views=r;u.templates=e=r.templates;o({debugMode:kt,delimiters:gt,onError:function(n,t,r){return t&&(n=r===i?"{Error: "+n+"}":tt(r)?r(n,t):r),n},_dbgMode:!0});g({"else":function(){},"if":{render:function(n){var t=this;return t.rendering.done||!n&&(arguments.length||!t.tagCtx.index)?"":(t.rendering.done=!0,t.selected=t.tagCtx.index,t.tagCtx.render(t.tagCtx.view,!0))},onUpdate:function(n,t,i){for(var r,f,u=0;(r=this.tagCtxs[u])&&r.args.length;u++)if(r=r.args[0],f=!r!=!i[u].args[0],!this.convert&&!!r||f)return f;return!1},flow:!0},"for":{render:function(n){var f,t=this,r=t.tagCtx,e="",o=0;return t.rendering.done||((f=!arguments.length)&&(n=r.view.data),n!==i&&(e+=r.render(n,f),o+=u.isArray(n)?n.length:1),(t.rendering.done=o)&&(t.selected=r.index)),e},flow:!0,autoBind:!0},include:{flow:!0,autoBind:!0},"*":{render:bt,flow:!0}});g({props:f(f({},g["for"]),dt(ar))});g.props.autoBind=!0;it({html:ci,attr:ci,url:function(n){return n!=i?encodeURI(""+n):n===null?n:""}});gt()}})(this,this.jQuery); -------------------------------------------------------------------------------- /js/libs/lazyload.min.js: -------------------------------------------------------------------------------- 1 | // Lazy Load - jQuery plugin for lazy loading images Version: 1.9.0 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:!0,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.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.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.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 | 4 | !function(){var a=jQuery.event.special,b="D"+ +new Date,c="D"+(+new Date+1);a.scrollstart={setup:function(){var c,d=function(b){var d=this,e=arguments;c?clearTimeout(c):(b.type="scrollstart",jQuery.event.dispatch.apply(d,e)),c=setTimeout(function(){c=null},a.scrollstop.latency)};jQuery(this).bind("scroll",d).data(b,d)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(b))}},a.scrollstop={latency:300,setup:function(){var b,d=function(c){var d=this,e=arguments;b&&clearTimeout(b),b=setTimeout(function(){b=null,c.type="scrollstop",jQuery.event.dispatch.apply(d,e)},a.scrollstop.latency)};jQuery(this).bind("scroll",d).data(c,d)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(c))}}}(); -------------------------------------------------------------------------------- /js/libs/prettyprint.js: -------------------------------------------------------------------------------- 1 | // prettyprint 2 | eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([6P-RT-Y]|[1-3]\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 q=1s;19.2I=!0;(U(){U L(a){U m(a){6 f=a.24(0);T(f!==92)V f;6 b=a.1n(1);V(f=r[b])?f:"0"<=b&&b<="7"?2J(a.W(1),8):b==="u"||b==="x"?2J(a.W(2),16):a.24(1)}U e(a){T(a<32)V(a<16?"\\\\x0":"\\\\x")+a.toString(16);a=2K.2L(a);T(a==="\\\\"||a==="-"||a==="["||a==="]")a="\\\\"+a;V a}U h(a){P(6 f=a.W(1,a.Q-1).1a(/\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\S\\s]|[^\\\\]/g),a=[],b=[],o=f[0]==="^",c=o?1:0,i=f.Q;c25||(d<65||j>90||b.R([1j.1F(65,j)|32,1j.26(d,90)|32]),d<97||j>25||b.R([1j.1F(97,j)&-33,1j.26(d,25)&-33]))}}b.sort(U(a,f){V a[0]-f[0]||f[1]-a[1]});f=[];j=[27,27];P(c=0;ci[0]&&(i[1]+1>i[0]&&b.R("-"),b.R(e(i[1])));b.R("]");V b.1G("")}U y(a){P(6 f=a.2P.1a(/\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*]|\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\\\d+|\\\\[^\\dux]|\\(\\?[!:=]|[()^]|[^()[\\\\^]+/g),b=f.Q,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\\\"&&(f[c]=j.1e(/[A-Za-z]/g,U(a){a=a.24(0);V"["+2K.2L(a&-33,a|32)+"]"}));V f.1G("")}P(6 t=0,s=!1,l=!1,p=0,d=a.Q;p=5&&"X-"===b.W(0,5))&&!(o&&1K o[1]==="2c"))c=!1,b="34";c||(r[f]=b)}i=d;d+=f.Q;T(c){c=o[1];6 j=f.2d(c),k=j+c.Q;o[2]&&(k=f.Q-o[2].Q,j=k-c.Q);b=b.W(5);B(l+i,f.W(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.W(k),e,p)}14 p.R(l+i,b)}a.e=p}6 h={},y;(U(){P(6 e=a.concat(m),l=[],p={},d=0,g=e.Q;d=0;)h[n.1n(k)]=r;r=r[1];n=""+r;p.2e(n)||(l.R(r),p[n]=q)}l.R(/[\\S\\s]/);y=L(l)})();6 t=m.Q;V e}U u(a){6 m=[],e=[];a.2f?m.R(["1k",/^(?:\'\'\'(?:[^\'\\\\]|\\\\[\\S\\s]|\'\'?(?=[^\']))*(?:\'\'\'|$)|"""(?:[^"\\\\]|\\\\[\\S\\s]|""?(?=[^"]))*(?:"""|$)|\'(?:[^\'\\\\]|\\\\[\\S\\s])*(?:\'|$)|"(?:[^"\\\\]|\\\\[\\S\\s])*(?:"|$))/,q,"\'\\""]):a.1p?m.R(["1k",/^(?:\'(?:[^\'\\\\]|\\\\[\\S\\s])*(?:\'|$)|"(?:[^"\\\\]|\\\\[\\S\\s])*(?:"|$)|`(?:[^\\\\`]|\\\\[\\S\\s])*(?:`|$))/,q,"\'\\"`"]):m.R(["1k",/^(?:\'(?:[^\\n\\r\'\\\\]|\\\\.)*(?:\'|$)|"(?:[^\\n\\r"\\\\]|\\\\.)*(?:"|$))/,q,"\\"\'"]);a.35&&e.R(["1k",/^@"(?:[^"]|"")*(?:"|$)/,q]);6 h=a.1d;h&&(a.1g?(h>1?m.R(["1l",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.R(["1l",/^#(?:(?:define|2g|14|endif|error|ifdef|include|ifndef|line|pragma|1L|warning)\\b|[^\\n\\r]*)/,q,"#"]),e.R(["1k",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h|[a-z]\\w*)>/,q])):m.R(["1l",/^#[^\\n\\r]*/,q,"#"]));a.1g&&(e.R(["1l",/^\\/\\/[^\\n\\r]*/,q]),e.R(["1l",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,q]));a.1q&&e.R(["X-36",/^(?:^^\\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|,|-=|->|\\/|\\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\\^=|\\^\\^|\\^\\^=|{|\\||\\|=|\\|\\||\\|\\|=|~|1b|15|37|1M|do|14|1O|38|V|29|1x|1K)\\s*(\\/(?=[^*/])(?:[^/[\\\\]|\\\\[\\S\\s]|\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*(?:]|$))+\\/)/]);(h=a.2h)&&e.R(["2i",h]);a=(""+a.Y).1e(/^ | $/g,"");a.Q&&e.R(["39",2T("^(?:"+a.1e(/[\\s,]+/g,"|")+")\\\\b"),q]);m.R(["1f",/^\\s+/,q," \\r\\n\\t\\3a"]);e.R(["2j",/^@[$_a-z][\\w$@]*/i,q],["2i",/^(?:[@_]?[A-Z]+[a-z][\\w$@]*|\\w+_t\\b)/,q],["1f",/^[$_a-z][\\w$@]*/i,q],["2j",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,q,"0123456789"],["1f",/^\\\\[\\S\\s]?/,q],["1P",/^.[^\\s\\w"-$\'./@\\\\`]*/,q]);V x(m,e)}U D(a,m){U e(a){2a(a.1u){15 1:T(k.1i(a.17))1b;T("BR"===a.2U)h(a),a.18&&a.18.3c(a);14 P(a=a.1o;a;a=a.1c)e(a);1b;15 3:15 4:T(p){6 b=a.1v,d=b.1a(t);T(d){6 c=b.W(0,d.3d);a.1v=c;(b=b.W(d.3d+d[0].Q))&&a.18.3e(s.2k(b),a.1c);h(a);c||a.18.3c(a)}}}}U h(a){U b(a,d){6 e=d?a.cloneNode(!1):a,f=a.18;T(f){6 f=b(f,1),g=a.1c;f.1m(e);P(6 h=g;h;h=g)g=h.1c,f.1m(h)}V e}P(;!a.1c;)T(a=a.18,!a)V;P(6 a=b(a.1c,0),e;(e=a.18)&&e.1u===1;)a=e;d.R(a)}6 k=/(?:^|\\s)2b(?:\\s|$)/,t=/\\r\\n?|\\n/,s=a.3f,l;a.1H?l=a.1H.2X:19.1I&&(l=s.2Y.1I(a,q).2Z("30-31"));6 p=l&&"1J"===l.W(0,3);P(l=s.1Q("LI");a.1o;)l.1m(a.1o);P(6 d=[l],g=0;g=0;){6 h=m[e];A.2e(h)?19.1R&&1R.warn("cannot 3g language handler %s",h):A[h]=a}}U C(a,m){T(!a||!A.2e(a))a=/^\\s*=o&&(h+=2);e>=c&&(a+=2)}}2l(w){"1R"in 19&&1R.log(w&&w.2m?w.2m:w)}}6 v=["1b,37,do,14,P,T,V,1T"],w=[[v,"auto,15,char,const,1y,double,enum,extern,3i,2n,3j,long,register,short,signed,sizeof,static,struct,2a,typedef,union,unsigned,1t,volatile"],"2l,1U,1M,1V,1z,2o,operator,private,protected,public,this,29,1W,1x,1K"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,3k,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,3l,final,1O,implements,1z,38,1s,native,2p,strictfp,2q,synchronized,throws,transient"],H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,2r,3o,group,implicit,in,interface,internal,into,is,lock,object,out,3g,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,2c,select,uint,ulong,unchecked,unsafe,ushort,6"],w=[w,"debugger,1X,3k,U,get,1s,2t,undefined,6,3p,3q,27"],I=[v,"2u,as,assert,1U,3r,del,2g,except,exec,1O,3o,2S,1z,in,is,lambda,nonlocal,2v,or,pass,2x,raise,1x,3p,3s,False,True,None"],J=[v,"alias,2u,begin,15,1U,3r,defined,2y,end,ensure,1V,in,module,2z,nil,2v,or,2A,rescue,retry,self,2q,2B,1W,1L,1Y,1A,3t,3s,2C,2D"],v=[v,"15,done,2g,esac,1X,fi,U,in,2E,2t,2B,1A"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|2m|(const_)?iterator|(multi)?(2t|map)|bitset|u?(3j|3i)\\d*)/,N=/\\S/,O=u({Y:[F,H,w,"3u,1M,3v,do,3w,2y,1X,3x,2r,P,2n,T,1z,3y,2E,my,2z,no,3A,2x,2p,2A,3B,3C,1L,1Y,1A,3D,3E,1T,2C,2D"+I,J,v],1d:!0,1g:!0,1p:!0,1q:!0}),A={};k(O,["1y-1S"]);k(x([],[["1f",/^[^]*(?:>|$)/],["1l",/^<\\!--[\\S\\s]*?(?:--\\>|$)/],["X-",/^<\\?([\\S\\s]+?)(?:\\?>|$)/],["X-",/^<%([\\S\\s]+?)(?:%>|$)/],["1P",/^(?:<[%?]|[%?]>)/],["X-",/^<1Z\\b[^>]*>([\\S\\s]+?)<\\/1Z\\b[^>]*>/i],["X-js",/^<3G\\b[^>]*>([\\S\\s]*?)(<\\/3G\\b[^>]*>)/i],["X-20",/^<1r\\b[^>]*>([\\S\\s]*?)(<\\/1r\\b[^>]*>)/i],["X-in.21",/^(<\\/?[a-z][^<>]*>)/i]]),["1y-3h","htm","html","mxml","xhtml","xml","xsl"]);k(x([["1f",/^\\s+/,q," \\t\\r\\n"],["2G",/^(?:"[^"]*"?|\'[^\']*\'?)/,q,"\\"\'"]],[["21",/^^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],["3H",/^(?!1r[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],["X-uq.3J",/^=\\s*([^\\s"\'>]*(?:[^\\s"\'/>]|\\/(?=\\s)))/],["1P",/^[/<->]+/],["X-js",/^on\\w+\\s*=\\s*"([^"]+)"/i],["X-js",/^on\\w+\\s*=\\s*\'([^\']+)\'/i],["X-js",/^on\\w+\\s*=\\s*([^\\s"\'>]+)/i],["X-20",/^1r\\s*=\\s*"([^"]+)"/i],["X-20",/^1r\\s*=\\s*\'([^\']+)\'/i],["X-20",/^1r\\s*=\\s*([^\\s"\'>]+)/i]]),["in.21"]);k(x([],[["2G",/^[\\S\\s]+/]]),["uq.3J"]);k(u({Y:F,1d:!0,1g:!0,2h:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({Y:"1s,1W,1V"}),["json"]);k(u({Y:H,1d:!0,1g:!0,35:!0,2h:K}),["cs"]);k(u({Y:G,1g:!0}),["java"]);k(u({Y:v,1d:!0,1p:!0}),["bsh","csh","sh"]);k(u({Y:I,1d:!0,1p:!0,2f:!0}),["cv","py"]);k(u({Y:"3u,1M,3v,do,3w,2y,1X,3x,2r,P,2n,T,1z,3y,2E,my,2z,no,3A,2x,2p,2A,3B,3C,1L,1Y,1A,3D,3E,1T,2C,2D",1d:!0,1p:!0,1q:!0}),["perl","pl","pm"]);k(u({Y:J,1d:!0,1p:!0,1q:!0}),["rb"]);k(u({Y:w,1g:!0,1q:!0}),["js"]);k(u({Y:"all,2u,by,2l,1U,14,3l,1V,1O,P,T,in,is,isnt,loop,2o,no,2v,1s,of,off,on,or,V,2q,2B,1W,1x,1Y,1A,3t,1T,yes",1d:3,1g:!0,multilineStrings:!0,2f:!0,1q:!0}),["coffee"]);k(x([],[["1k",/^[\\S\\s]+/]]),["36"]);19.prettyPrintOne=U(a,m,e){6 h=1w.1Q("PRE");h.3K=a;e&&D(h,e);E({g:m,i:e,h:h});V h.3K};19.prettyPrint=U(a){U m(){P(6 e=19.2I?l.22()+3L:3q;p=0){6 k=k.1a(g),f,b;T(b=!k){b=n;P(6 o=1t 0,c=b.1o;c;c=c.1c)6 i=c.1u,o=i===1?o?b:c:i===3?N.1i(c.1v)?b:o:o;b=(f=o===b?1t 0:o)&&"CODE"===f.23}b&&(k=f.17.1a(g));k&&(k=k[1]);b=!1;P(o=n.18;o;o=o.18)T((o.23==="1J"||o.23==="1S"||o.23==="1Z")&&o.17&&o.17.2d("3M")>=0){b=!0;1b}b||((b=(b=n.17.1a(/\\blinenums\\b(?::(\\d+))?/))?b[1]&&b[1].Q?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}pi.indexOf(d,e)||~i.indexOf(c,e)&&!~i.indexOf(d,e)||!~i.indexOf(c,e)&&~i.indexOf(d,e)){f=i.indexOf(c,e),g=i.indexOf(d,e);if(~f&&!~g||!~f&&~g){var j=a.slice(0,(h||1)+1).join(b);a=[j].concat(a.slice((h||1)+1))}e=(g>f?g:f)+1,h=0}else e=0}return a}function j(a,b){var c,d=0,e="";while(c=a.substr(d).match(/[^\w\d\- %@&]*\*[^\w\d\- %@&]*/))d=c.index+c[0].length,c[0]=c[0].replace(/^\*/,"([_.()!\\ %@&a-zA-Z0-9-]+)"),e+=a.substr(0,c.index)+c[0];a=e+=a.substr(d);var f=a.match(/:([^\/]+)/ig),g,h;if(f){h=f.length;for(var j=0;j7))this.history===!0?setTimeout(function(){window.onpopstate=d},500):window.onhashchange=d,this.mode="modern";else{var f=document.createElement("iframe");f.id="state-frame",f.style.display="none",document.body.appendChild(f),this.writeFrame(""),"onpropertychange"in document&&"attachEvent"in document&&document.attachEvent("onpropertychange",function(){event.propertyName==="location"&&c.check()}),window.setInterval(function(){c.check()},50),this.onHashChanged=d,this.mode="legacy"}e.listeners.push(a);return this.mode},destroy:function(a){if(!!e&&!!e.listeners){var b=e.listeners;for(var c=b.length-1;c>=0;c--)b[c]===a&&b.splice(c,1)}},setHash:function(a){this.mode==="legacy"&&this.writeFrame(a),this.history===!0?(window.history.pushState({},document.title,a),this.fire()):b.hash=a[0]==="/"?a:"/"+a;return this},writeFrame:function(a){var b=document.getElementById("state-frame"),c=b.contentDocument||b.contentWindow.document;c.open(),c.write("