├── LICENSE ├── README.md ├── apip-func.php ├── apip-local-debug.php ├── apip-options.php ├── apip-widgets.php ├── apip.php ├── ash.php ├── class ├── apip-image.php └── apip-query.php ├── css ├── apip-admin.css ├── apip-all.css ├── apip-option.css ├── font-awesome.css ├── font-awesome.min.css ├── weather-icons-wind.min.css └── weather-icons.min.css ├── ext └── wp-go-die.php ├── fonts ├── FontAwesome.otf ├── apip-icon-font.eot ├── apip-icon-font.otf ├── apip-icon-font.svg ├── apip-icon-font.ttf ├── apip-icon-font.woff ├── apip-icon-font.woff2 ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff ├── fontawesome-webfont.woff2 ├── weathericons-regular-webfont.eot ├── weathericons-regular-webfont.svg ├── weathericons-regular-webfont.ttf ├── weathericons-regular-webfont.woff └── weathericons-regular-webfont.woff2 ├── img ├── apip-ico.png ├── blank.gif ├── bottle.png ├── default.png └── nocover.jpg └── js ├── apip-achp.js ├── apip-admin.js ├── apip-commentquiz.js ├── apip-option.js ├── apip-prettify.js ├── apip-quicktags.js ├── apip-singular.js ├── apip-social.js ├── color-thief.js └── unveil-ui.min.js /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 | {description} 294 | Copyright (C) {year} {fullname} 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 | {signature of Ty Coon}, 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. 340 | 341 | ------------ 342 | Copyright (c) 343 | 344 | Anti 996 License Version 1.0 (Draft) 345 | 346 | Permission is hereby granted to any individual or legal entity 347 | obtaining a copy of this licensed work (including the source code, 348 | documentation and/or related items, hereinafter collectively referred 349 | to as the "licensed work"), free of charge, to deal with the licensed 350 | work for any purpose, including without limitation, the rights to use, 351 | reproduce, modify, prepare derivative works of, distribute, publish 352 | and sublicense the licensed work, subject to the following conditions: 353 | 354 | 1. The individual or the legal entity must conspicuously display, 355 | without modification, this License and the notice on each redistributed 356 | or derivative copy of the Licensed Work. 357 | 358 | 2. The individual or the legal entity must strictly comply with all 359 | applicable laws, regulations, rules and standards of the jurisdiction 360 | relating to labor and employment where the individual is physically 361 | located or where the individual was born or naturalized; or where the 362 | legal entity is registered or is operating (whichever is stricter). In 363 | case that the jurisdiction has no such laws, regulations, rules and 364 | standards or its laws, regulations, rules and standards are 365 | unenforceable, the individual or the legal entity are required to 366 | comply with Core International Labor Standards. 367 | 368 | 3. The individual or the legal entity shall not induce or force its 369 | employee(s), whether full-time or part-time, or its independent 370 | contractor(s), in any methods, to agree in oral or written form, to 371 | directly or indirectly restrict, weaken or relinquish his or her 372 | rights or remedies under such laws, regulations, rules and standards 373 | relating to labor and employment as mentioned above, no matter whether 374 | such written or oral agreement are enforceable under the laws of the 375 | said jurisdiction, nor shall such individual or the legal entity 376 | limit, in any methods, the rights of its employee(s) or independent 377 | contractor(s) from reporting or complaining to the copyright holder or 378 | relevant authorities monitoring the compliance of the license about 379 | its violation(s) of the said license. 380 | 381 | THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 382 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 383 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 384 | IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, 385 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 386 | OTHERWISE, ARISING FROM, OUT OF OR IN ANY WAY CONNECTION WITH THE 387 | LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE LICENSED WORK. 388 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # apip # 2 | 把力所能修改的wordpress插件合并到同一个插件里,减少重复引用,摒弃无用功能。大部分参考的源码都是开源协议,所以我也应该开源。反正我开了,至于你能不能找到这里,是你的事。 3 | 4 | # 功能 # 5 | 6 | ## 没有配置项的功能 ## 7 | 8 | - Ctrl+Enter提交 9 | - 屏蔽不必要的js 10 | - 屏蔽不必要的css 11 | - feed结尾追加版权页等 12 | - 追加的后台编辑快捷按钮 13 | - 调整默认的标签云数量和随机函数 14 | - 移除后台编辑页面上的作者列 15 | - 升级后覆盖高危文件 16 | - 屏蔽wp_embedd功能 17 | - 修改ngg-gallery,删除没用的功能,简化图片->post的格式。 18 | - author页跳转到404。 19 | - 删除留言模板中暴露的用户名 20 | - ngg插入图片时适应https 21 | - 文章和tag、cat标题自动转成utf-8编码值 22 | - 注释功能 23 | 24 | ## 有配置项的功能 ## 25 | 26 | - 更好的中文摘要 27 | - 阻止自动版本 28 | - 阻止自动保存 29 | - 显示登录用户的adminbar 30 | - 后台英文前台中文 31 | - 屏蔽主题里的OpenSans 32 | - 默认留言小工具里不显示作者留言 33 | - 搜索结果只有一条时跳转到内容 34 | - 禁止直接访问wp_comments.php 35 | - 描述信息优化 36 | - 回复邮件提示 37 | - 头像使用本地缓存 38 | - 禁用wordpress的emoji图片转换 39 | - 替换广告留言用户名和网址 40 | - 社会化分享函数 41 | - 好看的标签云 42 | - 回复最多字数的网友作为友情链接 43 | - 代码高亮 44 | - 图片延时加载 45 | - 改变"上一篇""下一篇"的取值来源 46 | - 自定义小工具 47 | - 搜索结果中不显示page内容 48 | - 自定义的按照时间和类别的archive页 49 | - 可以对留言的无聊指数评分 50 | - 友情链接、邮件回复的颜色可以在后台定义 51 | - 利用heweather提供的API,保存文章发布时天气,并提供调用函数(需要主题配合) 52 | - 留言前先回答博文相关的问题(需要主题配合) 53 | - 利用yandex translate的API,手动翻译标题到英文 54 | - 手动输入图片信息,以类似豆瓣的效果显示 55 | - 特色图取主颜色功能 56 | - 外链转内链 57 | - 屏蔽后台Update提示 58 | 59 | ## 后台管理功能 ## 60 | - taglist中增加private和draft的计数列 61 | 62 | [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu) 63 | [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) 64 | [![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE) 65 | -------------------------------------------------------------------------------- /apip-widgets.php: -------------------------------------------------------------------------------- 1 | 'APIP_Widget_Related', 8 | 'description' => '在单独post页面显示相关文章' 9 | ); 10 | parent::__construct( 'APIP_Widget_Related', 'APIP相关文章', $widget_ops ); 11 | } 12 | 13 | public function form( $instance ) { 14 | 15 | $instance = wp_parse_args( (array) $instance, array( 'title' => 'APIP相关文章', 'exclude' => '', 'taxonomy' => 'post_tag', 'post_type' => 'post', 'related_count' => '5' ) ); 16 | $title = $instance['title']; 17 | $post_type = $instance['post_type']; 18 | $taxonomy = $instance['taxonomy']; 19 | $exclude = $instance['exclude']; 20 | $related_count = $instance['related_count']; ?> 21 |

22 | 25 |

26 |

27 | 35 |

36 |

37 | 45 |

46 |

47 | 50 |

51 |

52 | 55 |

'ids' )); 84 | 85 | $exclude = ( empty( $instance['exclude'] ) ) ? array() : explode( ',', $instance['exclude'] ); 86 | if ( count( ( $terms = array_diff( $terms, $exclude ) ) ) == 0 ) 87 | return; 88 | 89 | $related_posts = get_posts( array( 90 | 'tax_query' => array( 91 | array( 92 | 'taxonomy' => $taxonomy, 93 | 'field' => 'id', 94 | 'terms' => $terms, 95 | 'operator' => 'IN' 96 | ) 97 | ), 98 | 'post_type' => $post_type, 99 | 'posts_per_page' => $instance['related_count'], 100 | 'exclude' => get_the_ID() 101 | ) ); 102 | 103 | if ( count( $related_posts ) == 0 ) 104 | return; 105 | 106 | echo $before_widget; 107 | 108 | $title = empty( $instance['title'] ) ? ' ' : apply_filters( 'widget_title', $instance['title'] ); 109 | if ( !empty( $title ) ) 110 | echo $before_title . $title . $after_title; ?> 111 | 'APIP_Widget_Sameday_Post', 136 | 'description' =>'显示历史同日文章' 137 | ); 138 | parent::__construct( 'APIP_Widget_Sameday_Post', 'APIP历史文章', $widget_ops ); 139 | } 140 | 141 | public function form( $instance ) { 142 | 143 | $instance = wp_parse_args( (array) $instance, array( 'title' => 'APIP历史文章', 'numbers' => '5', 'padtonum' => 'false' ) ); 144 | $title = $instance['title']; 145 | $numbers = $instance['numbers']; 146 | $padtonum = $instance['padtonum']; 147 | ?> 148 |

149 | 152 |

153 |

154 | 157 |

posts WHERE post_password = '' AND post_type = 'post' AND post_status = 'publish' 188 | AND month(post_date)='$month' AND day(post_date)='$day' AND ID != '$id' 189 | order by post_date LIMIT ". $number; 190 | $history_post = $wpdb->get_results($sql); 191 | 192 | if ( count( $history_post ) == 0 ) 193 | return; 194 | 195 | echo $before_widget; 196 | 197 | $title = empty( $instance['title'] ) ? ' ' : apply_filters( 'widget_title', $instance['title'] ); 198 | if ( !empty( $title ) ) 199 | echo $before_title . $title . $after_title; ?> 200 | 'APIP_Widget_Recent', 225 | 'description' => '显示最近更新的文章' 226 | ); 227 | parent::__construct( 'APIP_Widget_Recent', '最近更新', $widget_ops ); 228 | } 229 | 230 | public function form( $instance ) { 231 | 232 | $instance = wp_parse_args( (array) $instance, array( 'title' => 'Recent Modify', 'numbers' => '5' ) ); 233 | $title = $instance['title']; 234 | $numbers = $instance['numbers']; 235 | ?> 236 |

237 | 240 |

241 |

242 | 245 |

'post', 263 | 'post_status' => 'publish', 264 | 'orderby' => 'modified', 265 | 'order' => 'DESC', 266 | 'numberposts' => $number 267 | ) ); 268 | 269 | if ( count( $related_posts ) == 0 ) 270 | return; 271 | 272 | echo $before_widget; 273 | 274 | $title = empty( $instance['title'] ) ? ' ' : apply_filters( 'widget_title', $instance['title'] ); 275 | if ( !empty( $title ) ) 276 | echo $before_title . $title . $after_title; ?> 277 | 'APIP_Widget_Meta', 'description' => __( "Some basic info.") ); 306 | parent::__construct('APIP_Widget_Meta', __('BasicInfo'), $widget_ops); 307 | } 308 | 309 | public function widget( $args, $instance ) { 310 | 311 | /** This filter is documented in wp-includes/default-widgets.php */ 312 | $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'BasicInfo' ) : $instance['title'], $instance, $this->id_base ); 313 | 314 | echo $args['before_widget']; 315 | if ( $title ) { 316 | echo $args['before_title'] . $title . $args['after_title']; 317 | } 318 | ?> 319 |
    320 | 'post', 322 | 'post_status' => 'publish', 323 | 'order' => 'ASC', 324 | 'numberposts' => 5 325 | ) ); 326 | $spam_count = get_option( 'akismet_spam_count' ); 327 | $spam_count += 9334 ; 328 | $comments_count = wp_count_comments(); 329 | if ( $all_posts ) 330 | $firstpost = $all_posts[0]; 331 | if ( $firstpost ) { 332 | $days_ago = round( ( date('U') - get_the_time('U', $firstpost->ID) ) / ( 60*60*24 ) ); 333 | } ?> 334 |
  • publish; echo number_format_i18n($published_posts); ?> Posts
  • 335 | 336 | 337 | 338 |
  • Survived for days
  • 339 | 340 |
341 | '' ) ); 354 | $title = strip_tags($instance['title']); 355 | ?> 356 |

357 | 'APIP_Widget_Hook_List', 375 | 'description' => '显示当前页面的钩子列表', 376 | 'customize_selective_refresh' => true, 377 | ); 378 | parent::__construct( 'APIP_Widget_Hook_List', '钩子列表', $widget_ops ); 379 | } 380 | 381 | public function widget( $args, $instance ) { 382 | $title = empty($instance['title']) ? '钩子列表' : $instance['title']; 383 | $filters = explode(',',$instance['hooks']); 384 | if ( !is_super_admin() ) 385 | return; 386 | if ( empty( $filters ) ) 387 | return; 388 | echo $args['before_widget']; 389 | if ( $title ) { 390 | echo $args['before_title'] . $title . $args['after_title']; 391 | } 392 | $content = '
    '; 393 | $session = ''; 394 | $line = ''; 395 | foreach ($filters as $filter){ 396 | $tags = $GLOBALS['wp_filter'][ $filter ]; 397 | if (empty($tags)) 398 | continue; 399 | $session = sprintf('
  • %s
  • ', $filter ); 400 | foreach ( $tags as $priority => $tag ) 401 | { 402 | foreach ( $tag as $identifier => $function ) 403 | { 404 | if ( is_string( $function['function'] ) ) 405 | { 406 | $line = sprintf('
  •   %1$s
  • ', $function['function'] ); 407 | } 408 | else 409 | { 410 | $cname = is_string($function['function'][0]) ? $function['function'][0] : get_class($function['function'][0]); 411 | $line = sprintf('
  •   %1$s::%2$s
  • ', $cname, $function['function'][1]); 412 | } 413 | $session .= $line; 414 | } 415 | } 416 | $content .= $session; 417 | }; 418 | $content .= '
'; 419 | echo $content; 420 | 421 | echo $args['after_widget']; 422 | } 423 | 424 | public function update( $new_instance, $old_instance ) { 425 | $instance = $old_instance; 426 | $instance['title'] = sanitize_text_field( $new_instance['title'] ); 427 | $instance['hooks'] = sanitize_text_field( $new_instance['hooks'] ); 428 | 429 | return $instance; 430 | } 431 | 432 | 433 | public function form( $instance ) { 434 | $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'hooks' => 'the_content,wp_enqueue_scripts,wp_head,wp_footer' ) ); 435 | $title = sanitize_text_field( $instance['title'] ); 436 | $hooks = sanitize_text_field( $instance['hooks'] ); 437 | ?> 438 |

439 |

440 | is_enabled()) { 19 | $proxy_str = $proxy->host().":".$proxy->port(); 20 | $stream_default_opts = array( 21 | 'http'=>array( 22 | 'proxy'=>$proxy_str, 23 | 'request_fulluri' => true, 24 | ), 25 | 'ssl' => array( 26 | 'verify_peer' => false, 27 | 'verify_peer_name' => false, 28 | 'allow_self_signed' => true 29 | ), 30 | ); 31 | $cxContext = stream_context_create($stream_default_opts); 32 | } 33 | file_put_contents("./temp", file_get_contents($filename,false, $cxContext)); 34 | $filename = "./temp"; 35 | } 36 | $image_info = getimagesize($filename); 37 | 38 | $this->image_type = $image_info[2]; 39 | if( $this->image_type == IMAGETYPE_JPEG ) { 40 | 41 | $this->image = imagecreatefromjpeg($filename); 42 | } elseif( $this->image_type == IMAGETYPE_GIF ) { 43 | 44 | $this->image = imagecreatefromgif($filename); 45 | } elseif( $this->image_type == IMAGETYPE_PNG ) { 46 | 47 | $this->image = imagecreatefrompng($filename); 48 | } elseif( $this->image_type == IMAGETYPE_WEBP ) { 49 | 50 | $this->image = imagecreatefromwebp($filename); 51 | } 52 | if ($filename==="./temp") { 53 | unlink("./temp"); 54 | } 55 | } 56 | function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) { 57 | 58 | if( $image_type == IMAGETYPE_JPEG ) { 59 | imagejpeg($this->image,$filename,$compression); 60 | } elseif( $image_type == IMAGETYPE_GIF ) { 61 | 62 | imagegif($this->image,$filename); 63 | } elseif( $image_type == IMAGETYPE_PNG ) { 64 | 65 | imagepng($this->image,$filename); 66 | } 67 | if( $permissions != null) { 68 | 69 | chmod($filename,$permissions); 70 | } 71 | } 72 | function output($image_type=IMAGETYPE_JPEG) { 73 | 74 | if( $image_type == IMAGETYPE_JPEG ) { 75 | imagejpeg($this->image); 76 | } elseif( $image_type == IMAGETYPE_GIF ) { 77 | 78 | imagegif($this->image); 79 | } elseif( $image_type == IMAGETYPE_PNG ) { 80 | 81 | imagepng($this->image); 82 | } 83 | } 84 | function getWidth() { 85 | 86 | return imagesx($this->image); 87 | } 88 | function getHeight() { 89 | 90 | return imagesy($this->image); 91 | } 92 | function resizeToHeight($height) { 93 | 94 | $ratio = $height / $this->getHeight(); 95 | $width = $this->getWidth() * $ratio; 96 | $this->resize($width,$height); 97 | } 98 | 99 | function resizeToWidth($width) { 100 | $ratio = $width / $this->getWidth(); 101 | $height = $this->getheight() * $ratio; 102 | $this->resize($width,$height); 103 | } 104 | 105 | function scale($scale) { 106 | $width = $this->getWidth() * $scale/100; 107 | $height = $this->getheight() * $scale/100; 108 | $this->resize($width,$height); 109 | } 110 | 111 | function resize($width,$height) { 112 | $new_image = imagecreatetruecolor($width, $height); 113 | imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); 114 | $this->image = $new_image; 115 | } 116 | 117 | function rotate($degrees) { 118 | $this->image = @imagerotate($this->image, $degrees, 0); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /class/apip-query.php: -------------------------------------------------------------------------------- 1 | initiated; 15 | } 16 | //初始化 17 | public function init() { 18 | if ( !$this->initiated ){ 19 | $this->reset(); 20 | $this->initiated = true; 21 | } 22 | } 23 | //重置 24 | public function reset() { 25 | $this->post_ids=array(); 26 | $this->desc = ""; 27 | } 28 | public function get_title() { 29 | return $this->desc; 30 | } 31 | //保存查询结果 32 | public function keep_query() { 33 | if (is_search()||is_archive()) { 34 | global $wp_query; 35 | //if ($wp_query->post_count == 1 && $wp_query->max_num_pages == 1) 36 | // return; 37 | $desc = ""; 38 | //$this->post_ids = wp_list_pluck( $wp_query->posts, 'ID' ); 39 | if ( is_search() ){ 40 | $desc = "搜索结果:" . get_search_query( false ) ; 41 | } 42 | else if ( is_category() ){ 43 | $desc = "分类:" . single_cat_title( '', false ); 44 | } 45 | else if ( is_tag() ){ 46 | $desc = "标签:" . single_tag_title( '', false ); 47 | } 48 | else if ( is_year() ) { 49 | $desc = "年:" . get_the_date('Y') ; 50 | } 51 | else if ( is_month() ) { 52 | $desc = "月:" . get_the_date('F Y'); 53 | } 54 | else if ( is_day() ) { 55 | $desc = "日:" . get_the_date(get_option('date_format')); 56 | } 57 | else{ 58 | $desc = ""; 59 | } 60 | if ( "" === $desc ){ 61 | $this->reset(); 62 | } 63 | if ( $desc != $this->desc ){ 64 | $this->desc = $desc; 65 | $vars = $wp_query->query_vars; 66 | $vars['posts_per_page'] = -1; 67 | $myquery = new WP_Query( $vars ); 68 | if ($myquery->post_count == 1 && $myquery->max_num_pages == 1) 69 | return; 70 | $this->post_ids = wp_list_pluck( $myquery->posts, 'ID' ); 71 | } 72 | } 73 | //非查询页面时重置 74 | else if (is_404()||is_home()||is_front_page()) { 75 | $this->reset(); 76 | } 77 | //is_singular时不保存也不重置 78 | } 79 | //取得上一条和下一条 80 | public function get_neighbor( $ID ){ 81 | $ret = array(); 82 | $ret['got'] = FALSE; 83 | $ret['prev'] = -1; 84 | $ret['next'] = -1; 85 | $count = count($this->post_ids); 86 | if ( 0 == $count ){ 87 | $this->reset(); 88 | return $ret ; 89 | } 90 | $current_pos = array_search($ID, $this->post_ids) ; 91 | if ( FALSE === $current_pos ){ 92 | $this->reset(); 93 | return $ret ; 94 | } 95 | $ret['got'] = TRUE; 96 | if ( $current_pos != 0 ) { 97 | $ret['prev'] = $this->post_ids[$current_pos - 1]; 98 | } 99 | if ( $current_pos < $count - 1 ){ 100 | $ret['next'] = $this->post_ids[$current_pos + 1]; 101 | } 102 | return $ret; 103 | } 104 | public function get_prev( $ID ) { 105 | $count = count($this->post_ids); 106 | if ( 0 == $count ) { 107 | $this->reset(); 108 | return NULL; 109 | } 110 | $current_pos = array_search($ID, $this->post_ids) ; 111 | if ( FALSE === $current_pos ){ 112 | $this->reset(); 113 | return NULL; 114 | } 115 | if ( $current_pos != 0 ) { 116 | return $this->post_ids[$current_pos - 1]; 117 | } 118 | else { 119 | return NULL; 120 | } 121 | } 122 | public function get_next( $ID ) { 123 | $count = count($this->post_ids); 124 | if ( 0 == $count ) { 125 | $this->reset(); 126 | return NULL; 127 | } 128 | $current_pos = array_search($ID, $this->post_ids) ; 129 | if ( FALSE === $current_pos ){ 130 | $this->reset(); 131 | return NULL; 132 | } 133 | if ( $current_pos < $count - 1 ) { 134 | return $this->post_ids[$current_pos + 1]; 135 | } 136 | else { 137 | return NULL; 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /css/apip-admin.css: -------------------------------------------------------------------------------- 1 | span .original_key { 2 | color:#C07040; 3 | } 4 | -------------------------------------------------------------------------------- /css/apip-all.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'FontAwesome'; 3 | src: url('../fonts/fontawesome-webfont.eot?v=4.3.0'); 4 | src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg'); 5 | font-weight: normal; 6 | font-style: normal; 7 | font-display: swap; 8 | } 9 | 10 | @font-face{ 11 | font-family:'apipicon'; /*自定义字体名字*/ 12 | src: url('../fonts/apip-icon-font.eot'); /*IE9.0+*/ 13 | src: url('../fonts/apip-icon-font?#iefix') format('embedded-opentype'),/*IE6-8*/ 14 | url('../fonts/apip-icon-font.woff2') format('woff2'),/*???*/ 15 | url('../fonts/apip-icon-font.woff?') format('woff'),/*大多数*/ 16 | url('../fonts/apip-icon-font.ttf') format('truetype'), /*Safari, Android, iOS*/ 17 | url('../fonts/apip-icon-font.svg') format('svg'); /*少数浏览器*/ 18 | font-weight: normal; 19 | font-style: normal; 20 | font-display: swap; 21 | } 22 | 23 | /*lazyload*/ 24 | img[data-unveil="true"] { 25 | opacity: 0; 26 | -webkit-transition: opacity .3s ease-in; 27 | -moz-transition: opacity .3s ease-in; 28 | -o-transition: opacity .3s ease-in; 29 | transition: opacity .3s ease-in; 30 | } 31 | 32 | span.func-after, 33 | span.func-before { 34 | font-family: monospace, monospace; 35 | line-height: inherit; 36 | } 37 | span.func-before { 38 | margin: 0 10px 0 0; 39 | } 40 | span.func-after { 41 | margin: 0 0 0 10px; 42 | } 43 | span.suffix { 44 | text-align: center; 45 | font-size: 10px; 46 | } 47 | 48 | .album-photo img:last-child { 49 | margin-right:0; 50 | } 51 | 52 | /*tagcloud page*/ 53 | ul.tagcloud { 54 | display: table; 55 | } 56 | 57 | ul.tagcloud li { 58 | margin: 3px; 59 | background-color: #e7e7e7e7; 60 | height: 4.48em; 61 | list-style-type: none; 62 | display: grid; 63 | white-space: nowrap; 64 | float: left; 65 | line-height: 4.4em; 66 | } 67 | 68 | ul.tagcloud a { 69 | text-decoration: none; 70 | -webkit-box-shadow: none; 71 | box-shadow: none; 72 | margin:auto; 73 | } 74 | 75 | ul.tagcloud a:hover, 76 | ul.tagcloud a:focus, 77 | ul.tagcloud a:active{ 78 | box-shadow:none; 79 | } 80 | 81 | a.tagged1 { 82 | font-size: 1.00em; 83 | font-weight: 300; 84 | padding-left: 0.5em; 85 | padding-right: 0.5em; 86 | } 87 | 88 | a.tagged2 { 89 | font-size: 1.20em; 90 | font-weight: 400; 91 | padding-left: 0.7em; 92 | padding-right: 0.7em; 93 | } 94 | 95 | a.tagged3 { 96 | font-size: 1.50em; 97 | font-weight: 400; 98 | padding-left: 0.85em; 99 | padding-right: 0.85em; 100 | } 101 | 102 | a.tagged4 { 103 | font-size: 1.80em; 104 | font-weight: 500; 105 | padding-left: 1.0em; 106 | padding-right: 1.0em; 107 | } 108 | 109 | a.tagged5 { 110 | font-size: 2.50em; 111 | font-weight: 700; 112 | padding-left: 1.35em; 113 | padding-right: 1.35em; 114 | } 115 | 116 | a.tagged6 { 117 | font-size: 3.10em; 118 | font-weight: 900; 119 | padding-left: 1.65em; 120 | padding-right: 1.65em; 121 | } 122 | 123 | /* link page */ 124 | .apip-links { 125 | display:inline-block; 126 | } 127 | 128 | .apip-links > li { 129 | display: inline; 130 | float: left; 131 | margin-bottom: 1em; 132 | text-align: center; 133 | width: 128px; 134 | } 135 | 136 | .commenter-link.vcard { 137 | padding: 5px 5px 0; 138 | } 139 | 140 | .commenter-link img { 141 | border-radius: 100%; 142 | } 143 | 144 | /*share bar*/ 145 | #sharebar{ 146 | clear:both; 147 | background: none repeat scroll 0 0 #EEFAF6; 148 | line-height: 2em ; 149 | } 150 | 151 | #sharebar span{ 152 | padding: 0 15px; 153 | margin:4px 0 ; 154 | color: #5a5a5a; 155 | } 156 | 157 | #sharebar a { 158 | background: none repeat scroll 0 0 rgba(0, 0, 0, 0); 159 | display: inline; 160 | font-size: 1.3em; 161 | line-height: inherit; 162 | margin: 0; 163 | opacity: 0.8; 164 | padding-right: 13px; 165 | position: relative; 166 | text-decoration: none; 167 | top: 2px; 168 | vertical-align: inherit; 169 | cursor:pointer; 170 | } 171 | 172 | #sharebar a:before { 173 | font-family: 'FontAwesome' ; 174 | font-variant: normal; 175 | font-weight: 400; 176 | line-height: 1; 177 | text-transform: none; 178 | } 179 | 180 | .sharebar-twitter:before{ 181 | content: "\f099" ; 182 | } 183 | .sharebar-weibo:before { 184 | content: "\f18a"; 185 | } 186 | .sharebar-facebook:before { 187 | content: "\f230"; 188 | } 189 | 190 | /*pretty print*/ 191 | pre .str { color: #fec243; } /* string - eggyolk gold */ 192 | pre .kwd { color: #8470FF; } /* keyword - light slate blue */ 193 | pre .com { color: #32cd32; font-style: italic; } /* comment - green */ 194 | pre .typ { color: #6ecbcc; } /* type - turq green */ 195 | pre .lit { color: #d06; } /* literal - cherry red */ 196 | pre .pun { color: #8B8970; } /* punctuation - lemon chiffon4 */ 197 | pre .pln { color: #f0f0f0; } /* plaintext - white */ 198 | pre .tag { color: #9c9cff; } /* html/xml tag (bluey) */ 199 | pre .htm { color: #dda0dd; } /* html tag light purply*/ 200 | pre .xsl { color: #d0a0d0; } /* xslt tag light purply*/ 201 | pre .atn { color: #46eeee; font-weight: normal;} /* html/xml attribute name - lt turquoise */ 202 | pre .atv { color: #EEB4B4; } /* html/xml attribute value - rosy brown2 */ 203 | pre .dec { color: #3387CC; } /* decimal - blue */ 204 | 205 | pre.prettyprint { 206 | font-family: Consolas, Arial, monospace, "Courier New"; 207 | font-size: 0.9375rem; 208 | color:#E0E0E0; 209 | background-color: #0f0f0f; 210 | border-radius: 8px; 211 | border: 1px solid #888; 212 | text-shadow: none; 213 | width: 95%; 214 | margin: 1em auto; 215 | padding: 1em; 216 | white-space: pre-wrap; 217 | } 218 | 219 | pre.prettyprint a { 220 | text-decoration:none; 221 | } 222 | 223 | code.prettyprint { 224 | font-family: Consolas, Arial, monospace, "Courier New"; 225 | padding: 0.5em 1em; 226 | border: 1px solid #888; 227 | text-shadow: none; 228 | border-radius: 8px; 229 | width: 95%; 230 | margin: 1em auto; 231 | } 232 | code .str { color: #639B5C } /* string content */ 233 | code .lit { color: #639B5C } /* a literal value */ 234 | code .kwd { color: #D06353 } /* a keyword */ 235 | code .com { color: #9D9EA3 } /* a comment */ 236 | code .typ { color: #B6852E } /* a type name */ 237 | code .pun { color: #487CE0 } 238 | code .opn { color: #487CE0 } 239 | code .clo { color: #487CE0 } 240 | code .tag { color: #000 } /* a markup tag name */ 241 | code .atn { color: #000 } /* a markup attribute name */ 242 | code .atv { color: #487CE0 } /* a markup attribute value */ 243 | code .dec { color: #B6852E } /* a declaration; a variable name */ 244 | code .var { color: #B6852E } /* a declaration; a variable name */ 245 | code .fun { color: #D06353 } /* a function name */ 246 | 247 | /*quiz*/ 248 | .apipcommentquiz, 249 | .apipcommentquiz + * { 250 | overflow: hidden; 251 | transition: .5s; 252 | height: 0; 253 | } 254 | .apipcommentquiz { height: auto } 255 | .apipcommentquiz p{ 256 | font-size:12px; 257 | font-style: italic; 258 | } 259 | .apipcommentquiz label { 260 | cursor: pointer; 261 | display: inline-block; 262 | margin: 0 7px 6px 0; 263 | border-radius: 5px; 264 | padding: 10px 15px; 265 | transition: .2s; 266 | } 267 | .apipcommentquiz label:hover { 268 | background: #ccc; 269 | } 270 | .apipcommentquiz h2 { 271 | color:#999; 272 | } 273 | .apipcommentquiz h3 { 274 | color: red; 275 | font: inherit; 276 | animation: apipcommentquiz forward; 277 | } 278 | @keyframes apipcommentquiz{ 279 | from{transform:scale(0)} 280 | } 281 | 282 | /*archive page*/ 283 | .apip-no-disp { 284 | display: none !important; 285 | 286 | } 287 | .achp-expanded { 288 | font-weight:800; 289 | } 290 | li.achp-child { 291 | position: relative; 292 | text-overflow: ellipsis; 293 | max-width: 100%; 294 | overflow: hidden; 295 | max-height: 1.25em; 296 | } 297 | a.achp-sig { 298 | box-shadow: none !important; 299 | } 300 | span.achp-symbol { 301 | font-family: monospace, monospace; 302 | font-weight: 800; 303 | line-height: inherit; 304 | margin: 0 10px 0; 305 | } 306 | 307 | .content-sup{ 308 | padding-right: 0.25em; 309 | transition: all 1.5s; 310 | } 311 | 312 | .ref-visited{ 313 | color:#b2b7b3; 314 | transition: all 1.5s; 315 | } -------------------------------------------------------------------------------- /css/apip-option.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: STHeitiTC-Light,"PingFang TC", "Helvetica Neue", 'Microsoft YaHei', 'Hiragino Sans GB','Microsoft JhengHei'; 3 | } 4 | 5 | textarea{ 6 | margin: auto; 7 | width: 100%; 8 | } 9 | .apip-option { 10 | width: 75%; 11 | } 12 | .apip-option h1 { 13 | font-family: "Lucida Grande", Helvetica, Arial,Verdana, sans-serif; 14 | /*text-transform: uppercase;*/ 15 | border-bottom: 2px double #CCC; 16 | color:#F9F9F9; 17 | text-shadow: 1px -1px 2px #7c7b7a; 18 | } 19 | 20 | .apip-option h1 span{ 21 | color:#444; 22 | font-size:28px; 23 | /*text-shadow: */ 24 | } 25 | 26 | .form-table { 27 | border: 1px solid #E6E8EA; 28 | } 29 | 30 | .form-table tr { 31 | /*border-bottom: 1px solid #E6E8EA;*/ 32 | margin-bottom: 2px; 33 | box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset; 34 | } 35 | 36 | .form-table tr:nth-child(odd) { 37 | background-color: #F9F9F9; 38 | } 39 | 40 | .form-table th { 41 | padding:15px 10px; 42 | text-align: right; 43 | /*border-bottom: 1px solid #444;*/ 44 | } 45 | 46 | .form-table td { 47 | line-height: 2; 48 | padding:5px 10px; 49 | /*border-left: 1px solid #E6E8EA;*/ 50 | } 51 | 52 | select.apip-selector { 53 | line-height: 28px; 54 | height: 74px; 55 | } -------------------------------------------------------------------------------- /css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.3.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"} -------------------------------------------------------------------------------- /css/weather-icons.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Weather Icons 2.0 3 | * Updated August 1, 2015 4 | * Weather themed icons for Bootstrap 5 | * Author - Erik Flowers - erik@helloerik.com 6 | * Email: erik@helloerik.com 7 | * Twitter: http://twitter.com/Erik_UX 8 | * ------------------------------------------------------------------------------ 9 | * Maintained at http://erikflowers.github.io/weather-icons 10 | * 11 | * License 12 | * ------------------------------------------------------------------------------ 13 | * - Font licensed under SIL OFL 1.1 - 14 | * http://scripts.sil.org/OFL 15 | * - CSS, SCSS and LESS are licensed under MIT License - 16 | * http://opensource.org/licenses/mit-license.html 17 | * - Documentation licensed under CC BY 3.0 - 18 | * http://creativecommons.org/licenses/by/3.0/ 19 | * - Inspired by and works great as a companion with Font Awesome 20 | * "Font Awesome by Dave Gandy - http://fontawesome.io" 21 | *//*! 22 | * Weather Icons 2.0 23 | * Updated August 1, 2015 24 | * Weather themed icons for Bootstrap 25 | * Author - Erik Flowers - erik@helloerik.com 26 | * Email: erik@helloerik.com 27 | * Twitter: http://twitter.com/Erik_UX 28 | * ------------------------------------------------------------------------------ 29 | * Maintained at http://erikflowers.github.io/weather-icons 30 | * 31 | * License 32 | * ------------------------------------------------------------------------------ 33 | * - Font licensed under SIL OFL 1.1 - 34 | * http://scripts.sil.org/OFL 35 | * - CSS, SCSS and LESS are licensed under MIT License - 36 | * http://opensource.org/licenses/mit-license.html 37 | * - Documentation licensed under CC BY 3.0 - 38 | * http://creativecommons.org/licenses/by/3.0/ 39 | * - Inspired by and works great as a companion with Font Awesome 40 | * "Font Awesome by Dave Gandy - http://fontawesome.io" 41 | */@font-face{font-family:weathericons;src:url(../fonts/weathericons-regular-webfont.eot);src:url(../fonts/weathericons-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/weathericons-regular-webfont.woff2) format('woff2'),url(../fonts/weathericons-regular-webfont.woff) format('woff'),url(../fonts/weathericons-regular-webfont.ttf) format('truetype'),url(../fonts/weathericons-regular-webfont.svg#weather_iconsregular) format('svg');font-weight:400;font-style:normal}.wi{display:inline-block;font-family:weathericons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wi-fw{text-align:center;width:1.4em}.wi-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.wi-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wi-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.wi-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.wi-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}.wi-day-sunny:before{content:"\f00d"}.wi-day-cloudy:before{content:"\f002"}.wi-day-cloudy-gusts:before{content:"\f000"}.wi-day-cloudy-windy:before{content:"\f001"}.wi-day-fog:before{content:"\f003"}.wi-day-hail:before{content:"\f004"}.wi-day-haze:before{content:"\f0b6"}.wi-day-lightning:before{content:"\f005"}.wi-day-rain:before{content:"\f008"}.wi-day-rain-mix:before{content:"\f006"}.wi-day-rain-wind:before{content:"\f007"}.wi-day-showers:before{content:"\f009"}.wi-day-sleet:before{content:"\f0b2"}.wi-day-sleet-storm:before{content:"\f068"}.wi-day-snow:before{content:"\f00a"}.wi-day-snow-thunderstorm:before{content:"\f06b"}.wi-day-snow-wind:before{content:"\f065"}.wi-day-sprinkle:before{content:"\f00b"}.wi-day-storm-showers:before{content:"\f00e"}.wi-day-sunny-overcast:before{content:"\f00c"}.wi-day-thunderstorm:before{content:"\f010"}.wi-day-windy:before{content:"\f085"}.wi-solar-eclipse:before{content:"\f06e"}.wi-hot:before{content:"\f072"}.wi-day-cloudy-high:before{content:"\f07d"}.wi-day-light-wind:before{content:"\f0c4"}.wi-night-clear:before{content:"\f02e"}.wi-night-alt-cloudy:before{content:"\f086"}.wi-night-alt-cloudy-gusts:before{content:"\f022"}.wi-night-alt-cloudy-windy:before{content:"\f023"}.wi-night-alt-hail:before{content:"\f024"}.wi-night-alt-lightning:before{content:"\f025"}.wi-night-alt-rain:before{content:"\f028"}.wi-night-alt-rain-mix:before{content:"\f026"}.wi-night-alt-rain-wind:before{content:"\f027"}.wi-night-alt-showers:before{content:"\f029"}.wi-night-alt-sleet:before{content:"\f0b4"}.wi-night-alt-sleet-storm:before{content:"\f06a"}.wi-night-alt-snow:before{content:"\f02a"}.wi-night-alt-snow-thunderstorm:before{content:"\f06d"}.wi-night-alt-snow-wind:before{content:"\f067"}.wi-night-alt-sprinkle:before{content:"\f02b"}.wi-night-alt-storm-showers:before{content:"\f02c"}.wi-night-alt-thunderstorm:before{content:"\f02d"}.wi-night-cloudy:before{content:"\f031"}.wi-night-cloudy-gusts:before{content:"\f02f"}.wi-night-cloudy-windy:before{content:"\f030"}.wi-night-fog:before{content:"\f04a"}.wi-night-hail:before{content:"\f032"}.wi-night-lightning:before{content:"\f033"}.wi-night-partly-cloudy:before{content:"\f083"}.wi-night-rain:before{content:"\f036"}.wi-night-rain-mix:before{content:"\f034"}.wi-night-rain-wind:before{content:"\f035"}.wi-night-showers:before{content:"\f037"}.wi-night-sleet:before{content:"\f0b3"}.wi-night-sleet-storm:before{content:"\f069"}.wi-night-snow:before{content:"\f038"}.wi-night-snow-thunderstorm:before{content:"\f06c"}.wi-night-snow-wind:before{content:"\f066"}.wi-night-sprinkle:before{content:"\f039"}.wi-night-storm-showers:before{content:"\f03a"}.wi-night-thunderstorm:before{content:"\f03b"}.wi-lunar-eclipse:before{content:"\f070"}.wi-stars:before{content:"\f077"}.wi-storm-showers:before{content:"\f01d"}.wi-thunderstorm:before{content:"\f01e"}.wi-night-alt-cloudy-high:before{content:"\f07e"}.wi-night-cloudy-high:before{content:"\f080"}.wi-night-alt-partly-cloudy:before{content:"\f081"}.wi-cloud:before{content:"\f041"}.wi-cloudy:before{content:"\f013"}.wi-cloudy-gusts:before{content:"\f011"}.wi-cloudy-windy:before{content:"\f012"}.wi-fog:before{content:"\f014"}.wi-hail:before{content:"\f015"}.wi-rain:before{content:"\f019"}.wi-rain-mix:before{content:"\f017"}.wi-rain-wind:before{content:"\f018"}.wi-showers:before{content:"\f01a"}.wi-sleet:before{content:"\f0b5"}.wi-snow:before{content:"\f01b"}.wi-sprinkle:before{content:"\f01c"}.wi-storm-showers:before{content:"\f01d"}.wi-thunderstorm:before{content:"\f01e"}.wi-snow-wind:before{content:"\f064"}.wi-snow:before{content:"\f01b"}.wi-smog:before{content:"\f074"}.wi-smoke:before{content:"\f062"}.wi-lightning:before{content:"\f016"}.wi-raindrops:before{content:"\f04e"}.wi-raindrop:before{content:"\f078"}.wi-dust:before{content:"\f063"}.wi-snowflake-cold:before{content:"\f076"}.wi-windy:before{content:"\f021"}.wi-strong-wind:before{content:"\f050"}.wi-sandstorm:before{content:"\f082"}.wi-earthquake:before{content:"\f0c6"}.wi-fire:before{content:"\f0c7"}.wi-flood:before{content:"\f07c"}.wi-meteor:before{content:"\f071"}.wi-tsunami:before{content:"\f0c5"}.wi-volcano:before{content:"\f0c8"}.wi-hurricane:before{content:"\f073"}.wi-tornado:before{content:"\f056"}.wi-small-craft-advisory:before{content:"\f0cc"}.wi-gale-warning:before{content:"\f0cd"}.wi-storm-warning:before{content:"\f0ce"}.wi-hurricane-warning:before{content:"\f0cf"}.wi-wind-direction:before{content:"\f0b1"}.wi-alien:before{content:"\f075"}.wi-celsius:before{content:"\f03c"}.wi-fahrenheit:before{content:"\f045"}.wi-degrees:before{content:"\f042"}.wi-thermometer:before{content:"\f055"}.wi-thermometer-exterior:before{content:"\f053"}.wi-thermometer-internal:before{content:"\f054"}.wi-cloud-down:before{content:"\f03d"}.wi-cloud-up:before{content:"\f040"}.wi-cloud-refresh:before{content:"\f03e"}.wi-horizon:before{content:"\f047"}.wi-horizon-alt:before{content:"\f046"}.wi-sunrise:before{content:"\f051"}.wi-sunset:before{content:"\f052"}.wi-moonrise:before{content:"\f0c9"}.wi-moonset:before{content:"\f0ca"}.wi-refresh:before{content:"\f04c"}.wi-refresh-alt:before{content:"\f04b"}.wi-umbrella:before{content:"\f084"}.wi-barometer:before{content:"\f079"}.wi-humidity:before{content:"\f07a"}.wi-na:before{content:"\f07b"}.wi-train:before{content:"\f0cb"}.wi-moon-new:before{content:"\f095"}.wi-moon-waxing-crescent-1:before{content:"\f096"}.wi-moon-waxing-crescent-2:before{content:"\f097"}.wi-moon-waxing-crescent-3:before{content:"\f098"}.wi-moon-waxing-crescent-4:before{content:"\f099"}.wi-moon-waxing-crescent-5:before{content:"\f09a"}.wi-moon-waxing-crescent-6:before{content:"\f09b"}.wi-moon-first-quarter:before{content:"\f09c"}.wi-moon-waxing-gibbous-1:before{content:"\f09d"}.wi-moon-waxing-gibbous-2:before{content:"\f09e"}.wi-moon-waxing-gibbous-3:before{content:"\f09f"}.wi-moon-waxing-gibbous-4:before{content:"\f0a0"}.wi-moon-waxing-gibbous-5:before{content:"\f0a1"}.wi-moon-waxing-gibbous-6:before{content:"\f0a2"}.wi-moon-full:before{content:"\f0a3"}.wi-moon-waning-gibbous-1:before{content:"\f0a4"}.wi-moon-waning-gibbous-2:before{content:"\f0a5"}.wi-moon-waning-gibbous-3:before{content:"\f0a6"}.wi-moon-waning-gibbous-4:before{content:"\f0a7"}.wi-moon-waning-gibbous-5:before{content:"\f0a8"}.wi-moon-waning-gibbous-6:before{content:"\f0a9"}.wi-moon-third-quarter:before{content:"\f0aa"}.wi-moon-waning-crescent-1:before{content:"\f0ab"}.wi-moon-waning-crescent-2:before{content:"\f0ac"}.wi-moon-waning-crescent-3:before{content:"\f0ad"}.wi-moon-waning-crescent-4:before{content:"\f0ae"}.wi-moon-waning-crescent-5:before{content:"\f0af"}.wi-moon-waning-crescent-6:before{content:"\f0b0"}.wi-moon-alt-new:before{content:"\f0eb"}.wi-moon-alt-waxing-crescent-1:before{content:"\f0d0"}.wi-moon-alt-waxing-crescent-2:before{content:"\f0d1"}.wi-moon-alt-waxing-crescent-3:before{content:"\f0d2"}.wi-moon-alt-waxing-crescent-4:before{content:"\f0d3"}.wi-moon-alt-waxing-crescent-5:before{content:"\f0d4"}.wi-moon-alt-waxing-crescent-6:before{content:"\f0d5"}.wi-moon-alt-first-quarter:before{content:"\f0d6"}.wi-moon-alt-waxing-gibbous-1:before{content:"\f0d7"}.wi-moon-alt-waxing-gibbous-2:before{content:"\f0d8"}.wi-moon-alt-waxing-gibbous-3:before{content:"\f0d9"}.wi-moon-alt-waxing-gibbous-4:before{content:"\f0da"}.wi-moon-alt-waxing-gibbous-5:before{content:"\f0db"}.wi-moon-alt-waxing-gibbous-6:before{content:"\f0dc"}.wi-moon-alt-full:before{content:"\f0dd"}.wi-moon-alt-waning-gibbous-1:before{content:"\f0de"}.wi-moon-alt-waning-gibbous-2:before{content:"\f0df"}.wi-moon-alt-waning-gibbous-3:before{content:"\f0e0"}.wi-moon-alt-waning-gibbous-4:before{content:"\f0e1"}.wi-moon-alt-waning-gibbous-5:before{content:"\f0e2"}.wi-moon-alt-waning-gibbous-6:before{content:"\f0e3"}.wi-moon-alt-third-quarter:before{content:"\f0e4"}.wi-moon-alt-waning-crescent-1:before{content:"\f0e5"}.wi-moon-alt-waning-crescent-2:before{content:"\f0e6"}.wi-moon-alt-waning-crescent-3:before{content:"\f0e7"}.wi-moon-alt-waning-crescent-4:before{content:"\f0e8"}.wi-moon-alt-waning-crescent-5:before{content:"\f0e9"}.wi-moon-alt-waning-crescent-6:before{content:"\f0ea"}.wi-moon-0:before{content:"\f095"}.wi-moon-1:before{content:"\f096"}.wi-moon-2:before{content:"\f097"}.wi-moon-3:before{content:"\f098"}.wi-moon-4:before{content:"\f099"}.wi-moon-5:before{content:"\f09a"}.wi-moon-6:before{content:"\f09b"}.wi-moon-7:before{content:"\f09c"}.wi-moon-8:before{content:"\f09d"}.wi-moon-9:before{content:"\f09e"}.wi-moon-10:before{content:"\f09f"}.wi-moon-11:before{content:"\f0a0"}.wi-moon-12:before{content:"\f0a1"}.wi-moon-13:before{content:"\f0a2"}.wi-moon-14:before{content:"\f0a3"}.wi-moon-15:before{content:"\f0a4"}.wi-moon-16:before{content:"\f0a5"}.wi-moon-17:before{content:"\f0a6"}.wi-moon-18:before{content:"\f0a7"}.wi-moon-19:before{content:"\f0a8"}.wi-moon-20:before{content:"\f0a9"}.wi-moon-21:before{content:"\f0aa"}.wi-moon-22:before{content:"\f0ab"}.wi-moon-23:before{content:"\f0ac"}.wi-moon-24:before{content:"\f0ad"}.wi-moon-25:before{content:"\f0ae"}.wi-moon-26:before{content:"\f0af"}.wi-moon-27:before{content:"\f0b0"}.wi-time-1:before{content:"\f08a"}.wi-time-2:before{content:"\f08b"}.wi-time-3:before{content:"\f08c"}.wi-time-4:before{content:"\f08d"}.wi-time-5:before{content:"\f08e"}.wi-time-6:before{content:"\f08f"}.wi-time-7:before{content:"\f090"}.wi-time-8:before{content:"\f091"}.wi-time-9:before{content:"\f092"}.wi-time-10:before{content:"\f093"}.wi-time-11:before{content:"\f094"}.wi-time-12:before{content:"\f089"}.wi-direction-up:before{content:"\f058"}.wi-direction-up-right:before{content:"\f057"}.wi-direction-right:before{content:"\f04d"}.wi-direction-down-right:before{content:"\f088"}.wi-direction-down:before{content:"\f044"}.wi-direction-down-left:before{content:"\f043"}.wi-direction-left:before{content:"\f048"}.wi-direction-up-left:before{content:"\f087"}.wi-wind-beaufort-0:before{content:"\f0b7"}.wi-wind-beaufort-1:before{content:"\f0b8"}.wi-wind-beaufort-2:before{content:"\f0b9"}.wi-wind-beaufort-3:before{content:"\f0ba"}.wi-wind-beaufort-4:before{content:"\f0bb"}.wi-wind-beaufort-5:before{content:"\f0bc"}.wi-wind-beaufort-6:before{content:"\f0bd"}.wi-wind-beaufort-7:before{content:"\f0be"}.wi-wind-beaufort-8:before{content:"\f0bf"}.wi-wind-beaufort-9:before{content:"\f0c0"}.wi-wind-beaufort-10:before{content:"\f0c1"}.wi-wind-beaufort-11:before{content:"\f0c2"}.wi-wind-beaufort-12:before{content:"\f0c3"}.wi-yahoo-0:before{content:"\f056"}.wi-yahoo-1:before{content:"\f00e"}.wi-yahoo-2:before{content:"\f073"}.wi-yahoo-3:before{content:"\f01e"}.wi-yahoo-4:before{content:"\f01e"}.wi-yahoo-5:before{content:"\f017"}.wi-yahoo-6:before{content:"\f017"}.wi-yahoo-7:before{content:"\f017"}.wi-yahoo-8:before{content:"\f015"}.wi-yahoo-9:before{content:"\f01a"}.wi-yahoo-10:before{content:"\f015"}.wi-yahoo-11:before{content:"\f01a"}.wi-yahoo-12:before{content:"\f01a"}.wi-yahoo-13:before{content:"\f01b"}.wi-yahoo-14:before{content:"\f00a"}.wi-yahoo-15:before{content:"\f064"}.wi-yahoo-16:before{content:"\f01b"}.wi-yahoo-17:before{content:"\f015"}.wi-yahoo-18:before{content:"\f017"}.wi-yahoo-19:before{content:"\f063"}.wi-yahoo-20:before{content:"\f014"}.wi-yahoo-21:before{content:"\f021"}.wi-yahoo-22:before{content:"\f062"}.wi-yahoo-23:before{content:"\f050"}.wi-yahoo-24:before{content:"\f050"}.wi-yahoo-25:before{content:"\f076"}.wi-yahoo-26:before{content:"\f013"}.wi-yahoo-27:before{content:"\f031"}.wi-yahoo-28:before{content:"\f002"}.wi-yahoo-29:before{content:"\f031"}.wi-yahoo-30:before{content:"\f002"}.wi-yahoo-31:before{content:"\f02e"}.wi-yahoo-32:before{content:"\f00d"}.wi-yahoo-33:before{content:"\f083"}.wi-yahoo-34:before{content:"\f00c"}.wi-yahoo-35:before{content:"\f017"}.wi-yahoo-36:before{content:"\f072"}.wi-yahoo-37:before{content:"\f00e"}.wi-yahoo-38:before{content:"\f00e"}.wi-yahoo-39:before{content:"\f00e"}.wi-yahoo-40:before{content:"\f01a"}.wi-yahoo-41:before{content:"\f064"}.wi-yahoo-42:before{content:"\f01b"}.wi-yahoo-43:before{content:"\f064"}.wi-yahoo-44:before{content:"\f00c"}.wi-yahoo-45:before{content:"\f00e"}.wi-yahoo-46:before{content:"\f01b"}.wi-yahoo-47:before{content:"\f00e"}.wi-yahoo-3200:before{content:"\f077"}.wi-forecast-io-clear-day:before{content:"\f00d"}.wi-forecast-io-clear-night:before{content:"\f02e"}.wi-forecast-io-rain:before{content:"\f019"}.wi-forecast-io-snow:before{content:"\f01b"}.wi-forecast-io-sleet:before{content:"\f0b5"}.wi-forecast-io-wind:before{content:"\f050"}.wi-forecast-io-fog:before{content:"\f014"}.wi-forecast-io-cloudy:before{content:"\f013"}.wi-forecast-io-partly-cloudy-day:before{content:"\f002"}.wi-forecast-io-partly-cloudy-night:before{content:"\f031"}.wi-forecast-io-hail:before{content:"\f015"}.wi-forecast-io-thunderstorm:before{content:"\f01e"}.wi-forecast-io-tornado:before{content:"\f056"}.wi-wmo4680-00:before,.wi-wmo4680-0:before{content:"\f055"}.wi-wmo4680-01:before,.wi-wmo4680-1:before{content:"\f013"}.wi-wmo4680-02:before,.wi-wmo4680-2:before{content:"\f055"}.wi-wmo4680-03:before,.wi-wmo4680-3:before{content:"\f013"}.wi-wmo4680-04:before,.wi-wmo4680-4:before{content:"\f014"}.wi-wmo4680-05:before,.wi-wmo4680-5:before{content:"\f014"}.wi-wmo4680-10:before{content:"\f014"}.wi-wmo4680-11:before{content:"\f014"}.wi-wmo4680-12:before{content:"\f016"}.wi-wmo4680-18:before{content:"\f050"}.wi-wmo4680-20:before{content:"\f014"}.wi-wmo4680-21:before{content:"\f017"}.wi-wmo4680-22:before{content:"\f017"}.wi-wmo4680-23:before{content:"\f019"}.wi-wmo4680-24:before{content:"\f01b"}.wi-wmo4680-25:before{content:"\f015"}.wi-wmo4680-26:before{content:"\f01e"}.wi-wmo4680-27:before{content:"\f063"}.wi-wmo4680-28:before{content:"\f063"}.wi-wmo4680-29:before{content:"\f063"}.wi-wmo4680-30:before{content:"\f014"}.wi-wmo4680-31:before{content:"\f014"}.wi-wmo4680-32:before{content:"\f014"}.wi-wmo4680-33:before{content:"\f014"}.wi-wmo4680-34:before{content:"\f014"}.wi-wmo4680-35:before{content:"\f014"}.wi-wmo4680-40:before{content:"\f017"}.wi-wmo4680-41:before{content:"\f01c"}.wi-wmo4680-42:before{content:"\f019"}.wi-wmo4680-43:before{content:"\f01c"}.wi-wmo4680-44:before{content:"\f019"}.wi-wmo4680-45:before{content:"\f015"}.wi-wmo4680-46:before{content:"\f015"}.wi-wmo4680-47:before{content:"\f01b"}.wi-wmo4680-48:before{content:"\f01b"}.wi-wmo4680-50:before{content:"\f01c"}.wi-wmo4680-51:before{content:"\f01c"}.wi-wmo4680-52:before{content:"\f019"}.wi-wmo4680-53:before{content:"\f019"}.wi-wmo4680-54:before{content:"\f076"}.wi-wmo4680-55:before{content:"\f076"}.wi-wmo4680-56:before{content:"\f076"}.wi-wmo4680-57:before{content:"\f01c"}.wi-wmo4680-58:before{content:"\f019"}.wi-wmo4680-60:before{content:"\f01c"}.wi-wmo4680-61:before{content:"\f01c"}.wi-wmo4680-62:before{content:"\f019"}.wi-wmo4680-63:before{content:"\f019"}.wi-wmo4680-64:before{content:"\f015"}.wi-wmo4680-65:before{content:"\f015"}.wi-wmo4680-66:before{content:"\f015"}.wi-wmo4680-67:before{content:"\f017"}.wi-wmo4680-68:before{content:"\f017"}.wi-wmo4680-70:before{content:"\f01b"}.wi-wmo4680-71:before{content:"\f01b"}.wi-wmo4680-72:before{content:"\f01b"}.wi-wmo4680-73:before{content:"\f01b"}.wi-wmo4680-74:before{content:"\f076"}.wi-wmo4680-75:before{content:"\f076"}.wi-wmo4680-76:before{content:"\f076"}.wi-wmo4680-77:before{content:"\f01b"}.wi-wmo4680-78:before{content:"\f076"}.wi-wmo4680-80:before{content:"\f019"}.wi-wmo4680-81:before{content:"\f01c"}.wi-wmo4680-82:before{content:"\f019"}.wi-wmo4680-83:before{content:"\f019"}.wi-wmo4680-84:before{content:"\f01d"}.wi-wmo4680-85:before{content:"\f017"}.wi-wmo4680-86:before{content:"\f017"}.wi-wmo4680-87:before{content:"\f017"}.wi-wmo4680-89:before{content:"\f015"}.wi-wmo4680-90:before{content:"\f016"}.wi-wmo4680-91:before{content:"\f01d"}.wi-wmo4680-92:before{content:"\f01e"}.wi-wmo4680-93:before{content:"\f01e"}.wi-wmo4680-94:before{content:"\f016"}.wi-wmo4680-95:before{content:"\f01e"}.wi-wmo4680-96:before{content:"\f01e"}.wi-wmo4680-99:before{content:"\f056"}.wi-owm-200:before{content:"\f01e"}.wi-owm-201:before{content:"\f01e"}.wi-owm-202:before{content:"\f01e"}.wi-owm-210:before{content:"\f016"}.wi-owm-211:before{content:"\f016"}.wi-owm-212:before{content:"\f016"}.wi-owm-221:before{content:"\f016"}.wi-owm-230:before{content:"\f01e"}.wi-owm-231:before{content:"\f01e"}.wi-owm-232:before{content:"\f01e"}.wi-owm-300:before{content:"\f01c"}.wi-owm-301:before{content:"\f01c"}.wi-owm-302:before{content:"\f019"}.wi-owm-310:before{content:"\f017"}.wi-owm-311:before{content:"\f019"}.wi-owm-312:before{content:"\f019"}.wi-owm-313:before{content:"\f01a"}.wi-owm-314:before{content:"\f019"}.wi-owm-321:before{content:"\f01c"}.wi-owm-500:before{content:"\f01c"}.wi-owm-501:before{content:"\f019"}.wi-owm-502:before{content:"\f019"}.wi-owm-503:before{content:"\f019"}.wi-owm-504:before{content:"\f019"}.wi-owm-511:before{content:"\f017"}.wi-owm-520:before{content:"\f01a"}.wi-owm-521:before{content:"\f01a"}.wi-owm-522:before{content:"\f01a"}.wi-owm-531:before{content:"\f01d"}.wi-owm-600:before{content:"\f01b"}.wi-owm-601:before{content:"\f01b"}.wi-owm-602:before{content:"\f0b5"}.wi-owm-611:before{content:"\f017"}.wi-owm-612:before{content:"\f017"}.wi-owm-615:before{content:"\f017"}.wi-owm-616:before{content:"\f017"}.wi-owm-620:before{content:"\f017"}.wi-owm-621:before{content:"\f01b"}.wi-owm-622:before{content:"\f01b"}.wi-owm-701:before{content:"\f01a"}.wi-owm-711:before{content:"\f062"}.wi-owm-721:before{content:"\f0b6"}.wi-owm-731:before{content:"\f063"}.wi-owm-741:before{content:"\f014"}.wi-owm-761:before{content:"\f063"}.wi-owm-762:before{content:"\f063"}.wi-owm-771:before{content:"\f011"}.wi-owm-781:before{content:"\f056"}.wi-owm-800:before{content:"\f00d"}.wi-owm-801:before{content:"\f011"}.wi-owm-802:before{content:"\f011"}.wi-owm-803:before{content:"\f012"}.wi-owm-804:before{content:"\f013"}.wi-owm-900:before{content:"\f056"}.wi-owm-901:before{content:"\f01d"}.wi-owm-902:before{content:"\f073"}.wi-owm-903:before{content:"\f076"}.wi-owm-904:before{content:"\f072"}.wi-owm-905:before{content:"\f021"}.wi-owm-906:before{content:"\f015"}.wi-owm-957:before{content:"\f050"}.wi-owm-day-200:before{content:"\f010"}.wi-owm-day-201:before{content:"\f010"}.wi-owm-day-202:before{content:"\f010"}.wi-owm-day-210:before{content:"\f005"}.wi-owm-day-211:before{content:"\f005"}.wi-owm-day-212:before{content:"\f005"}.wi-owm-day-221:before{content:"\f005"}.wi-owm-day-230:before{content:"\f010"}.wi-owm-day-231:before{content:"\f010"}.wi-owm-day-232:before{content:"\f010"}.wi-owm-day-300:before{content:"\f00b"}.wi-owm-day-301:before{content:"\f00b"}.wi-owm-day-302:before{content:"\f008"}.wi-owm-day-310:before{content:"\f008"}.wi-owm-day-311:before{content:"\f008"}.wi-owm-day-312:before{content:"\f008"}.wi-owm-day-313:before{content:"\f008"}.wi-owm-day-314:before{content:"\f008"}.wi-owm-day-321:before{content:"\f00b"}.wi-owm-day-500:before{content:"\f00b"}.wi-owm-day-501:before{content:"\f008"}.wi-owm-day-502:before{content:"\f008"}.wi-owm-day-503:before{content:"\f008"}.wi-owm-day-504:before{content:"\f008"}.wi-owm-day-511:before{content:"\f006"}.wi-owm-day-520:before{content:"\f009"}.wi-owm-day-521:before{content:"\f009"}.wi-owm-day-522:before{content:"\f009"}.wi-owm-day-531:before{content:"\f00e"}.wi-owm-day-600:before{content:"\f00a"}.wi-owm-day-601:before{content:"\f0b2"}.wi-owm-day-602:before{content:"\f00a"}.wi-owm-day-611:before{content:"\f006"}.wi-owm-day-612:before{content:"\f006"}.wi-owm-day-615:before{content:"\f006"}.wi-owm-day-616:before{content:"\f006"}.wi-owm-day-620:before{content:"\f006"}.wi-owm-day-621:before{content:"\f00a"}.wi-owm-day-622:before{content:"\f00a"}.wi-owm-day-701:before{content:"\f009"}.wi-owm-day-711:before{content:"\f062"}.wi-owm-day-721:before{content:"\f0b6"}.wi-owm-day-731:before{content:"\f063"}.wi-owm-day-741:before{content:"\f003"}.wi-owm-day-761:before{content:"\f063"}.wi-owm-day-762:before{content:"\f063"}.wi-owm-day-781:before{content:"\f056"}.wi-owm-day-800:before{content:"\f00d"}.wi-owm-day-801:before{content:"\f000"}.wi-owm-day-802:before{content:"\f000"}.wi-owm-day-803:before{content:"\f000"}.wi-owm-day-804:before{content:"\f00c"}.wi-owm-day-900:before{content:"\f056"}.wi-owm-day-902:before{content:"\f073"}.wi-owm-day-903:before{content:"\f076"}.wi-owm-day-904:before{content:"\f072"}.wi-owm-day-906:before{content:"\f004"}.wi-owm-day-957:before{content:"\f050"}.wi-owm-night-200:before{content:"\f02d"}.wi-owm-night-201:before{content:"\f02d"}.wi-owm-night-202:before{content:"\f02d"}.wi-owm-night-210:before{content:"\f025"}.wi-owm-night-211:before{content:"\f025"}.wi-owm-night-212:before{content:"\f025"}.wi-owm-night-221:before{content:"\f025"}.wi-owm-night-230:before{content:"\f02d"}.wi-owm-night-231:before{content:"\f02d"}.wi-owm-night-232:before{content:"\f02d"}.wi-owm-night-300:before{content:"\f02b"}.wi-owm-night-301:before{content:"\f02b"}.wi-owm-night-302:before{content:"\f028"}.wi-owm-night-310:before{content:"\f028"}.wi-owm-night-311:before{content:"\f028"}.wi-owm-night-312:before{content:"\f028"}.wi-owm-night-313:before{content:"\f028"}.wi-owm-night-314:before{content:"\f028"}.wi-owm-night-321:before{content:"\f02b"}.wi-owm-night-500:before{content:"\f02b"}.wi-owm-night-501:before{content:"\f028"}.wi-owm-night-502:before{content:"\f028"}.wi-owm-night-503:before{content:"\f028"}.wi-owm-night-504:before{content:"\f028"}.wi-owm-night-511:before{content:"\f026"}.wi-owm-night-520:before{content:"\f029"}.wi-owm-night-521:before{content:"\f029"}.wi-owm-night-522:before{content:"\f029"}.wi-owm-night-531:before{content:"\f02c"}.wi-owm-night-600:before{content:"\f02a"}.wi-owm-night-601:before{content:"\f0b4"}.wi-owm-night-602:before{content:"\f02a"}.wi-owm-night-611:before{content:"\f026"}.wi-owm-night-612:before{content:"\f026"}.wi-owm-night-615:before{content:"\f026"}.wi-owm-night-616:before{content:"\f026"}.wi-owm-night-620:before{content:"\f026"}.wi-owm-night-621:before{content:"\f02a"}.wi-owm-night-622:before{content:"\f02a"}.wi-owm-night-701:before{content:"\f029"}.wi-owm-night-711:before{content:"\f062"}.wi-owm-night-721:before{content:"\f0b6"}.wi-owm-night-731:before{content:"\f063"}.wi-owm-night-741:before{content:"\f04a"}.wi-owm-night-761:before{content:"\f063"}.wi-owm-night-762:before{content:"\f063"}.wi-owm-night-781:before{content:"\f056"}.wi-owm-night-800:before{content:"\f02e"}.wi-owm-night-801:before{content:"\f022"}.wi-owm-night-802:before{content:"\f022"}.wi-owm-night-803:before{content:"\f022"}.wi-owm-night-804:before{content:"\f086"}.wi-owm-night-900:before{content:"\f056"}.wi-owm-night-902:before{content:"\f073"}.wi-owm-night-903:before{content:"\f076"}.wi-owm-night-904:before{content:"\f072"}.wi-owm-night-906:before{content:"\f024"}.wi-owm-night-957:before{content:"\f050"}.wi-wu-chanceflurries:before{content:"\f064"}.wi-wu-chancerain:before{content:"\f019"}.wi-wu-chancesleat:before{content:"\f0b5"}.wi-wu-chancesnow:before{content:"\f01b"}.wi-wu-chancetstorms:before{content:"\f01e"}.wi-wu-clear:before{content:"\f00d"}.wi-wu-cloudy:before{content:"\f002"}.wi-wu-flurries:before{content:"\f064"}.wi-wu-hazy:before{content:"\f0b6"}.wi-wu-mostlycloudy:before{content:"\f002"}.wi-wu-mostlysunny:before{content:"\f00d"}.wi-wu-partlycloudy:before{content:"\f002"}.wi-wu-partlysunny:before{content:"\f00d"}.wi-wu-rain:before{content:"\f01a"}.wi-wu-sleat:before{content:"\f0b5"}.wi-wu-snow:before{content:"\f01b"}.wi-wu-sunny:before{content:"\f00d"}.wi-wu-tstorms:before{content:"\f01e"}.wi-wu-unknown:before{content:"\f00d"} -------------------------------------------------------------------------------- /ext/wp-go-die.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20170924 at Thu Apr 30 04:50:18 2020 6 | By www-data 7 | 8 | 9 | 10 | 23 | 25 | 27 | 62 | 71 | 135 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /fonts/apip-icon-font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/apip-icon-font.ttf -------------------------------------------------------------------------------- /fonts/apip-icon-font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/apip-icon-font.woff -------------------------------------------------------------------------------- /fonts/apip-icon-font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/apip-icon-font.woff2 -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /fonts/weathericons-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/weathericons-regular-webfont.eot -------------------------------------------------------------------------------- /fonts/weathericons-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/weathericons-regular-webfont.ttf -------------------------------------------------------------------------------- /fonts/weathericons-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/weathericons-regular-webfont.woff -------------------------------------------------------------------------------- /fonts/weathericons-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/fonts/weathericons-regular-webfont.woff2 -------------------------------------------------------------------------------- /img/apip-ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/img/apip-ico.png -------------------------------------------------------------------------------- /img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/img/blank.gif -------------------------------------------------------------------------------- /img/bottle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/img/bottle.png -------------------------------------------------------------------------------- /img/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/img/default.png -------------------------------------------------------------------------------- /img/nocover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifishake/apip/08a8a66b870396ec64c2527084d4a6fb1db69289/img/nocover.jpg -------------------------------------------------------------------------------- /js/apip-achp.js: -------------------------------------------------------------------------------- 1 | /*global jQuery:false */ 2 | "use strict"; 3 | 4 | function jqueryArchiveListAnimate(clickedObj, listElements) 5 | { 6 | var symbol = ''; 7 | if ( listElements.hasClass("apip-no-disp") ) { 8 | symbol = '[-]'; 9 | listElements.fadeToggle(500); 10 | } 11 | else { 12 | symbol = '[+]'; 13 | listElements.fadeToggle(500); 14 | } 15 | listElements.toggleClass("apip-no-disp"); 16 | jQuery(clickedObj).children(".achp-symbol").html(symbol); 17 | jQuery(clickedObj).parent().toggleClass("achp-expanded"); 18 | } 19 | 20 | jQuery(function() 21 | { 22 | jQuery(".achp-widget").each(function(){ 23 | 24 | jQuery(this).on("click", "li.achp-parent a.achp-sig", function(e) 25 | { 26 | var elements = jQuery(this).siblings("ul").children("li"); 27 | if (elements.length) 28 | { 29 | e.preventDefault(); 30 | jqueryArchiveListAnimate(this, elements); 31 | } 32 | /*调整已经为空的ul行高*/ 33 | jQuery(this).parent().children("ul.achp-child").toggleClass("apip-no-disp"); 34 | }); 35 | }); 36 | }); -------------------------------------------------------------------------------- /js/apip-admin.js: -------------------------------------------------------------------------------- 1 | function dec_to_hex_string(dec, length) { 2 | var hex = dec.toString(16).toUpperCase(); 3 | if (hex.length < length) { 4 | hex = new Array( length - hex.length + 1 ).join( '0' ) + hex; 5 | } 6 | return hex; 7 | } 8 | 9 | String.prototype.hexEncode = function(){ 10 | var hex, i, ud, slash; 11 | var s = unescape(encodeURIComponent(this)) 12 | var result = ""; 13 | var chineseStart = 0; 14 | for (i=0; i=224 && ud<=239) 17 | { 18 | chineseStart++; 19 | hex = ud.toString(16); 20 | }else if (1==chineseStart){ 21 | chineseStart++; 22 | hex = ud.toString(16); 23 | }else if (2==chineseStart){ 24 | hex = ud.toString(16); 25 | chineseStart = 0; 26 | if (i!=s.length-1) { 27 | slash = 1; 28 | } 29 | }else { 30 | hex = ud; 31 | } 32 | result += hex; 33 | if (slash) { 34 | result += '-'; 35 | slash = 0; 36 | } 37 | } 38 | 39 | return result; 40 | } 41 | 42 | function any_callback(element, canvas, ed){ 43 | var t = this, startPos, endPos, cursorPos, scrollTop, v = canvas.value, l, r, i, sel, endTag = v ? t.tagEnd : ''; 44 | var my_stuff = prompt( 'Enter Title Tag:', '' ); 45 | if ( canvas.selectionStart || canvas.selectionStart === 0 ) { // FF, WebKit, Opera 46 | startPos = canvas.selectionStart; 47 | endPos = canvas.selectionEnd; 48 | 49 | cursorPos = endPos; 50 | scrollTop = canvas.scrollTop; 51 | l = v.substring(0, startPos); // left of the selection 52 | r = v.substring(endPos, v.length); // right of the selection 53 | i = v.substring(startPos, endPos); // inside the selection 54 | if ( startPos !== endPos ) { 55 | canvas.value = l + '<'+my_stuff+'>' + i + '' + r; 56 | cursorPos += my_stuff.length + my_stuff.length + 5; 57 | } 58 | } 59 | canvas.selectionStart = cursorPos; 60 | canvas.selectionEnd = cursorPos; 61 | canvas.scrollTop = scrollTop; 62 | canvas.focus(); 63 | } 64 | 65 | function rgb_to_hex_string(rgb_array) { 66 | var hex_string = ''; 67 | for( var i = 0; i < rgb_array.length; i++) { 68 | hex_string += dec_to_hex_string(rgb_array[i], 2); 69 | } 70 | return '#' + hex_string; 71 | } 72 | 73 | function rgb_to_rgb_string(rgb_array) { 74 | var rgb_string = 'RGB('; 75 | for( var i = 0; i < rgb_array.length; i++) { 76 | rgb_string += rgb_array[i]; 77 | if ( i< 2) { 78 | rgb_string += ','; 79 | } 80 | } 81 | return rgb_string + ')'; 82 | } 83 | 84 | jQuery(document).ready(function($) { 85 | $('#link-color').wpColorPicker(); 86 | $('#border-color').wpColorPicker(); 87 | $('#font-color').wpColorPicker(); 88 | $('#bg-color').wpColorPicker(); 89 | $('#thief-color-picker').wpColorPicker(); 90 | $('button[name="apiphexbtn"]').click(function(){ 91 | var parent = $(this).parent(); 92 | var chinese_title = document.getElementById("title").value; 93 | var converted = chinese_title.hexEncode(); 94 | document.getElementById("post_name").value=converted; 95 | }) 96 | $('button[name="apipweatherbtn"]').click(function(){ 97 | var parent = $(this).parent(); 98 | var mybar = parent[0].childNodes[1].childNodes[1]; 99 | var heweatherresult; 100 | var data = { 101 | action: 'apip_weather_manual_update', 102 | nonce: this.getAttribute('wpnonce'), 103 | id:this.getAttribute('id'), 104 | }; 105 | $.ajax({ 106 | url: ajaxurl, 107 | type: 'GET', 108 | data: data, 109 | cache: false, 110 | timeout: 30000, 111 | beforeSend: function () { 112 | mybar.value="获取中..."; 113 | }, 114 | success:function(response){ 115 | mybar.value=response.content; 116 | }, 117 | error: function() { 118 | mybar.value="异常"; 119 | }, 120 | }); 121 | }) 122 | $('button[name="apipcolorthirfbtn"]').click(function(){ 123 | var parent = $(this).parent(); 124 | var thisLabel = parent.find('.thumbnail-main-color-label'); 125 | var img=jQuery('#set-post-thumbnail')[0].childNodes[0]; 126 | var colorThief = new ColorThief(); 127 | var picmaincolor=colorThief.getColor(img); 128 | var colorhex=rgb_to_hex_string(picmaincolor); 129 | var colorrgb=rgb_to_rgb_string(picmaincolor); 130 | var picker = parent.find('.wp-picker-container').find('.wp-color-result'); 131 | var data = { 132 | action: 'apip_accept_color', 133 | maincolor: colorhex, 134 | nonce: this.getAttribute('wpnonce'), 135 | picid: this.getAttribute('picid'), 136 | }; 137 | $.ajax({ 138 | url: ajaxurl, 139 | type: 'POST', 140 | data: data, 141 | success: function (response) { 142 | if (response) { 143 | //成功后更新colorpicker的颜色 144 | picker[0].setAttribute("style","background-color:"+colorrgb); 145 | } 146 | } 147 | }); 148 | }) 149 | $('button[name="apip_maintain_do"]').click(function(){ 150 | var parent = $(this).parent(); 151 | var mybar = parent.prev(); 152 | var data = { 153 | action: 'apip_db_maintain', 154 | nonce: this.getAttribute('wpnonce'), 155 | id:this.getAttribute('id'), 156 | }; 157 | $.ajax({ 158 | url: ajaxurl, 159 | type: 'POST', 160 | data: data, 161 | beforeSend: function () { 162 | mybar[0].textContent="删除中..."; 163 | }, 164 | success: function (response) { 165 | mybar[0].textContent="已删除"; 166 | }, 167 | error: function() { 168 | mybar[0].textContent="异常"; 169 | }, 170 | }); 171 | }) 172 | $("#image_upload_btn").click(function(){ 173 | var files = $("#upload_files")[0].files; 174 | var wpnonce = this.getAttribute('wpnonce'); 175 | var i, str_disp=""; 176 | var fd = new FormData(); 177 | var dest_path = $('#apip_upload_destination_paths').find(":selected").val(); 178 | fd.append('action', 'apip_upload_image'); 179 | 180 | for(i=0; i< files.length; ++i) { 181 | if (i > 0) { 182 | str_disp += " , "; 183 | } 184 | fd.append('file_'+i, files[i]); 185 | str_disp += files[i].name; 186 | } 187 | fd.append('file_count',i); 188 | fd.append('nonce', wpnonce); 189 | fd.append('dest_path', dest_path); 190 | 191 | $.ajax({ 192 | url: ajaxurl, 193 | type: 'POST', 194 | data: fd, 195 | contentType: false, 196 | processData: false, 197 | beforeSend: function () { 198 | $("#image_upload_status").text("..."); 199 | }, 200 | success: function (response) { 201 | if (response.success) { 202 | $("#image_upload_status").text(str_disp); 203 | } else { 204 | $("#image_upload_status").text(response.data); 205 | } 206 | }, 207 | error: function() { 208 | /* 209 | var id = '#image_upload_status'; 210 | jQuery(id).html(''); 211 | jQuery(id).append(fd); 212 | resetvalues(); 213 | */ 214 | }, 215 | }); 216 | }) 217 | }) 218 | 219 | jQuery(function ($) { 220 | $(document).ajaxComplete(function (event, xhr, settings) { 221 | if (typeof settings.data==='string' && /action=get-post-thumbnail-html/.test(settings.data) && xhr.responseJSON && typeof xhr.responseJSON.data==='string') { 222 | if ( /thumbnail_id=-1/.test(settings.data) ) { 223 | return; 224 | } 225 | var pos = settings.data.toLowerCase().indexOf("thumbnail_id"); 226 | if (pos <= 0) { 227 | return; 228 | } 229 | var res = settings.data.split("&"); 230 | var pic_id = res[1].substr(res[1].indexOf("=")+1); 231 | if (!pic_id) { 232 | return; 233 | } 234 | var img=jQuery('#set-post-thumbnail')[0].childNodes[0]; 235 | var colorThief = new ColorThief(); 236 | var picmaincolor=colorThief.getColor(img); 237 | var colorhex=rgb_to_hex_string(picmaincolor); 238 | var colorrgb=rgb_to_rgb_string(picmaincolor); 239 | var data = { 240 | action: 'apip_new_thumbnail_color', 241 | picid: pic_id, 242 | maincolor: colorhex, 243 | }; 244 | jQuery.ajax({ 245 | url: ajaxurl, 246 | type: 'POST', 247 | data: data, 248 | success: function (response) { 249 | if (response) { 250 | //成功后更新colorpicker的颜色 251 | var picker = jQuery('#apipcolorthiefdiv').find('.wp-picker-container').find('.wp-color-result'); 252 | picker[0].setAttribute("style","background-color:"+colorrgb); 253 | } 254 | } 255 | }); 256 | } 257 | }); 258 | }); -------------------------------------------------------------------------------- /js/apip-commentquiz.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function(){ 2 | 3 | var parseQuiz = function(str){ 4 | try{return JSON.parse(decodeURIComponent(str || ''))} 5 | catch(err){return []} 6 | }; 7 | 8 | var removeQuiz = function(quizNode, formNode){ 9 | quizNode.style.height = quizNode.offsetHeight + 'px'; 10 | formNode.style.height = formNode.scrollHeight + 'px'; 11 | quizNode.style.height = '0px'; 12 | setTimeout(function(){ 13 | quizNode.style.display = 'none'; 14 | formNode.style.height = 'auto'; 15 | }, 500); 16 | }; 17 | 18 | var buildAnswer = function(text, name, value){ 19 | var label = document.createElement('label'); 20 | var input = label.appendChild(document.createElement('input')); 21 | var title = label.appendChild(document.createTextNode(text)); 22 | 23 | input.type = 'radio'; 24 | input.name = name; 25 | input.value = value; 26 | return label; 27 | }; 28 | 29 | var buildQuiz = function(quizNode){ 30 | var formNode = quizNode.nextElementSibling; 31 | var errorText = quizNode.getAttribute('data-apipcommentquiz-error'); 32 | var questions = parseQuiz(quizNode.getAttribute('data-apipcommentquiz')); 33 | var correctId = 'apipcommentquiz' + location.pathname + questions.map(function(q){return q.correct}).join(''); 34 | var errorNode = document.createElement('h3').appendChild(document.createTextNode(errorText)).parentNode; 35 | var container = document.createElement('div'); 36 | 37 | if(localStorage.getItem(correctId) === correctId){ //Skip quiz if already solved 38 | return quizNode.parentNode.removeChild(quizNode); 39 | } 40 | 41 | questions.forEach(function(question, index){ 42 | container.appendChild(document.createElement('h2')).textContent = question.text; //Render title 43 | question.answer 44 | .map(function(key, val){return key && buildAnswer(key, 'apipcommentquiz' + index, val)}) 45 | .sort(function(){return 0.5 - Math.random()}) 46 | .forEach(function(node){node && container.appendChild(node)}); 47 | }); 48 | 49 | quizNode.appendChild(container); 50 | quizNode.addEventListener('change', function(){ 51 | var checked = questions.map(function(q,i){return container.querySelector('input[name="' + 'apipcommentquiz' + i + '"]:checked')}); 52 | var correct = questions.every(function(q,i){return checked[i] && Number(checked[i].value) === Number(q.correct)}); 53 | var failure = !correct && checked.filter(Boolean).length === questions.length; 54 | 55 | if(correct){ 56 | localStorage.setItem(correctId, correctId); 57 | removeQuiz(quizNode, formNode); 58 | }else if(failure){ 59 | container.appendChild(errorNode); 60 | } 61 | }); 62 | }; 63 | 64 | [].forEach.call(document.querySelectorAll('.' + 'apipcommentquiz'), buildQuiz); 65 | }); -------------------------------------------------------------------------------- /js/apip-option.js: -------------------------------------------------------------------------------- 1 | //var lazyload = []; 2 | 3 | jQuery( document ).ready( function( $ ) { 4 | if ('undefined'!==lazyload && lazyload.length > 0 && lazyload[0]) { 5 | $( 'img[data-unveil="true"]' ).unveil( 200 ); 6 | } 7 | }); 8 | 9 | var HoldLog = console.log; 10 | console.log = function() {} ; 11 | let now1 = new Date(); 12 | queueMicrotask( () => { 13 | const Log = function() { 14 | HoldLog.apply(console, arguments); 15 | }; 16 | //在恢复前输出日志 17 | const grt = new Date("11/26/2005 10:00:00"); 18 | //此处修改你的建站时间或者网站上线时间 19 | now1.setTime(now1.getTime() + 250); 20 | const days = (now1 - grt) / 1000 / 60 / 60 / 24; 21 | const dnum = Math.floor(days); 22 | const ascll = ` 23 | ╔═╗╔═╗╦ ╦╔═╗╔═╗ ╔╦╗╦╔═╗╔═╗ 24 | ╠═╝║╣ ║║║╠═╣║╣ ║ ║╠═╝╚═╗ 25 | ╩ ╚═╝╚╩╝╩ ╩╚═╝ ╩ ╩╩ ╚═╝`; 26 | 27 | setTimeout(Log.bind(console, `\n%c${ascll}%c \n`, "color:#ff4f87;font-family:consolas, menlo, mono;", "")); 28 | 29 | setTimeout(Log.bind(console, "%c※%c 主题代码: %chttps://github.com/lifishake/sketchy%c ", "color:#f0ad4e", "","color:4f90d9; background-color:#ffdad8", "")); 30 | setTimeout(Log.bind(console, "%c※%c 插件代码: %chttps://github.com/lifishake/apip%c ", "color:#f0ad4e", "","color:4f90d9; background-color:#ffdad8", "")); 31 | setTimeout(Log.bind(console, "%c※%c 自取%c勿问%c。", "color:#f0ad4e", "","color:#ff4f87; font-weight:700;", "")); 32 | } 33 | ); -------------------------------------------------------------------------------- /js/apip-prettify.js: -------------------------------------------------------------------------------- 1 | !function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a= 3 | b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com", 11 | /^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ 12 | s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/, 13 | q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d= 14 | c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, 21 | V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", 22 | /^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], 23 | ["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}), 24 | ["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q, 25 | hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); 26 | p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="
"+a+"
";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1}); 27 | return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i', ''); 2 | QTags.addButton( 'eg_mysup', '引文', '[mysup sup_content=\"', '\" /]', 'p' ); 3 | QTags.addButton( 'eg_any', 'any', any_callback ); 4 | 5 | function any_callback(element, canvas, ed){ 6 | var t = this, startPos, endPos, cursorPos, scrollTop, v = canvas.value, l, r, i, sel, endTag = v ? t.tagEnd : ''; 7 | var my_stuff = prompt( 'Enter Title Tag:', '' ); 8 | if ( canvas.selectionStart || canvas.selectionStart === 0 ) { // FF, WebKit, Opera 9 | startPos = canvas.selectionStart; 10 | endPos = canvas.selectionEnd; 11 | 12 | cursorPos = endPos; 13 | scrollTop = canvas.scrollTop; 14 | l = v.substring(0, startPos); // left of the selection 15 | r = v.substring(endPos, v.length); // right of the selection 16 | i = v.substring(startPos, endPos); // inside the selection 17 | if ( startPos !== endPos ) { 18 | canvas.value = l + '<'+my_stuff+'>' + i + '' + r; 19 | cursorPos += my_stuff.length + my_stuff.length + 5; 20 | } 21 | } 22 | canvas.selectionStart = cursorPos; 23 | canvas.selectionEnd = cursorPos; 24 | canvas.scrollTop = scrollTop; 25 | canvas.focus(); 26 | } -------------------------------------------------------------------------------- /js/apip-singular.js: -------------------------------------------------------------------------------- 1 | //empty 2 | ( 3 | function( $ ) { 4 | $( document ).ready( function() { 5 | $('a[href^="#"]').on('click', function(e) { 6 | e.preventDefault(); 7 | var target = this.hash; 8 | $jmp = document.getElementsByName(target.substring(1))[0]; 9 | var theTop = $jmp.offsetTop ? $jmp.offsetTop : $jmp.offsetParent.offsetTop; 10 | $('html,body').animate({scrollTop: theTop - 10},1000); 11 | }); 12 | }); 13 | }) 14 | ( jQuery ); -------------------------------------------------------------------------------- /js/apip-social.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | function getParamsOfShareWindow(width,height){ 3 | return['toolbar=0,status=0,resizable=1,width='+width+',height='+height+',left=',(screen.width-width)/2,',top=',(screen.height-height)/2].join(''); 4 | } 5 | function bindShareList(){ 6 | var link=encodeURIComponent(document.location); 7 | var title=encodeURIComponent(document.title.substring(0,76)); 8 | var source=encodeURIComponent('网站名称'); 9 | var windowName='share'; 10 | var site='http://www.example.com/'; 11 | jQuery('#twitter-share').click(function(){ 12 | var url='http://twitter.com/share?url='+link+'&text='+title; 13 | var params=getParamsOfShareWindow(500,375); 14 | window.open(url,windowName,params); 15 | }); 16 | jQuery('#kaixin001-share').click(function(){ 17 | var url='http://www.kaixin001.com/repaste/share.php?rurl='+link+'&rcontent='+link+'&rtitle='+title; 18 | var params=getParamsOfShareWindow(540,342); 19 | window.open(url,windowName,params); 20 | }); 21 | jQuery('#renren-share').click(function(){ 22 | var url='http://share.renren.com/share/buttonshare?link='+link+'&title='+title; 23 | var params=getParamsOfShareWindow(626,436); 24 | window.open(url,windowName,params); 25 | }); 26 | jQuery('#douban-share').click(function(){ 27 | var url='http://www.douban.com/recommend/?url='+link+'&title='+title; 28 | var params=getParamsOfShareWindow(450,350); 29 | window.open(url,windowName,params); 30 | }); 31 | jQuery('#fanfou-share').click(function(){ 32 | var url='http://fanfou.com/sharer?u='+link+'?t='+title; 33 | var params=getParamsOfShareWindow(600,400); 34 | window.open(url,windowName,params); 35 | }); 36 | jQuery('#sina-share').click(function(){ 37 | var url='http://v.t.sina.com.cn/share/share.php?url='+link+'&title='+title; 38 | var params=getParamsOfShareWindow(607,523); 39 | window.open(url,windowName,params); 40 | }); 41 | jQuery('#tencent-share').click(function(){ 42 | var url='http://v.t.qq.com/share/share.php?title='+title+'&url='+link+'&site='+site; 43 | var params=getParamsOfShareWindow(640,480); 44 | window.open(url,windowName,params); 45 | }); 46 | jQuery('#googleplus-share').click(function(){ 47 | var url='https://plus.google.com/share?url='+link; 48 | var params=getParamsOfShareWindow(640,480); 49 | window.open(url,windowName,params); 50 | }); 51 | jQuery('#facebook-share').click(function(){ 52 | var url='http://www.facebook.com/sharer.php?u='+link+'&t='+title; 53 | var params=getParamsOfShareWindow(640,480); 54 | window.open(url,windowName,params); 55 | }); 56 | } 57 | bindShareList(); 58 | }); 59 | -------------------------------------------------------------------------------- /js/color-thief.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Color Thief v2.0 3 | * by Lokesh Dhakar - http://www.lokeshdhakar.com 4 | * 5 | * Thanks 6 | * ------ 7 | * Nick Rabinowitz - For creating quantize.js. 8 | * John Schulz - For clean up and optimization. @JFSIII 9 | * Nathan Spady - For adding drag and drop support to the demo page. 10 | * 11 | * License 12 | * ------- 13 | * Copyright 2011, 2015 Lokesh Dhakar 14 | * Released under the MIT license 15 | * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE 16 | * 17 | * @license 18 | */ 19 | 20 | 21 | /* 22 | CanvasImage Class 23 | Class that wraps the html image element and canvas. 24 | It also simplifies some of the canvas context manipulation 25 | with a set of helper functions. 26 | */ 27 | var CanvasImage = function (image) { 28 | this.canvas = document.createElement('canvas'); 29 | this.context = this.canvas.getContext('2d'); 30 | 31 | document.body.appendChild(this.canvas); 32 | 33 | this.width = this.canvas.width = image.width; 34 | this.height = this.canvas.height = image.height; 35 | 36 | this.context.drawImage(image, 0, 0, this.width, this.height); 37 | }; 38 | 39 | CanvasImage.prototype.clear = function () { 40 | this.context.clearRect(0, 0, this.width, this.height); 41 | }; 42 | 43 | CanvasImage.prototype.update = function (imageData) { 44 | this.context.putImageData(imageData, 0, 0); 45 | }; 46 | 47 | CanvasImage.prototype.getPixelCount = function () { 48 | return this.width * this.height; 49 | }; 50 | 51 | CanvasImage.prototype.getImageData = function () { 52 | return this.context.getImageData(0, 0, this.width, this.height); 53 | }; 54 | 55 | CanvasImage.prototype.removeCanvas = function () { 56 | this.canvas.parentNode.removeChild(this.canvas); 57 | }; 58 | 59 | 60 | var ColorThief = function () {}; 61 | 62 | /* 63 | * getColor(sourceImage[, quality]) 64 | * returns {r: num, g: num, b: num} 65 | * 66 | * Use the median cut algorithm provided by quantize.js to cluster similar 67 | * colors and return the base color from the largest cluster. 68 | * 69 | * Quality is an optional argument. It needs to be an integer. 1 is the highest quality settings. 70 | * 10 is the default. There is a trade-off between quality and speed. The bigger the number, the 71 | * faster a color will be returned but the greater the likelihood that it will not be the visually 72 | * most dominant color. 73 | * 74 | * */ 75 | ColorThief.prototype.getColor = function(sourceImage, quality) { 76 | var palette = this.getPalette(sourceImage, 5, quality); 77 | var dominantColor = palette[0]; 78 | return dominantColor; 79 | }; 80 | 81 | 82 | /* 83 | * getPalette(sourceImage[, colorCount, quality]) 84 | * returns array[ {r: num, g: num, b: num}, {r: num, g: num, b: num}, ...] 85 | * 86 | * Use the median cut algorithm provided by quantize.js to cluster similar colors. 87 | * 88 | * colorCount determines the size of the palette; the number of colors returned. If not set, it 89 | * defaults to 10. 90 | * 91 | * BUGGY: Function does not always return the requested amount of colors. It can be +/- 2. 92 | * 93 | * quality is an optional argument. It needs to be an integer. 1 is the highest quality settings. 94 | * 10 is the default. There is a trade-off between quality and speed. The bigger the number, the 95 | * faster the palette generation but the greater the likelihood that colors will be missed. 96 | * 97 | * 98 | */ 99 | ColorThief.prototype.getPalette = function(sourceImage, colorCount, quality) { 100 | 101 | if (typeof colorCount === 'undefined' || colorCount < 2 || colorCount > 256) { 102 | colorCount = 10; 103 | } 104 | if (typeof quality === 'undefined' || quality < 1) { 105 | quality = 10; 106 | } 107 | 108 | // Create custom CanvasImage object 109 | var image = new CanvasImage(sourceImage); 110 | var imageData = image.getImageData(); 111 | var pixels = imageData.data; 112 | var pixelCount = image.getPixelCount(); 113 | 114 | // Store the RGB values in an array format suitable for quantize function 115 | var pixelArray = []; 116 | for (var i = 0, offset, r, g, b, a; i < pixelCount; i = i + quality) { 117 | offset = i * 4; 118 | r = pixels[offset + 0]; 119 | g = pixels[offset + 1]; 120 | b = pixels[offset + 2]; 121 | a = pixels[offset + 3]; 122 | // If pixel is mostly opaque and not white 123 | if (a >= 125) { 124 | if (!(r > 250 && g > 250 && b > 250)) { 125 | pixelArray.push([r, g, b]); 126 | } 127 | } 128 | } 129 | 130 | // Send array to quantize function which clusters values 131 | // using median cut algorithm 132 | var cmap = MMCQ.quantize(pixelArray, colorCount); 133 | var palette = cmap? cmap.palette() : null; 134 | 135 | // Clean up 136 | image.removeCanvas(); 137 | 138 | return palette; 139 | }; 140 | 141 | ColorThief.prototype.getColorFromUrl = function(imageUrl, callback, quality) { 142 | sourceImage = document.createElement("img"); 143 | var thief = this; 144 | sourceImage.addEventListener('load' , function(){ 145 | var palette = thief.getPalette(sourceImage, 5, quality); 146 | var dominantColor = palette[0]; 147 | callback(dominantColor, imageUrl); 148 | }); 149 | sourceImage.src = imageUrl 150 | }; 151 | 152 | 153 | ColorThief.prototype.getImageData = function(imageUrl, callback) { 154 | xhr = new XMLHttpRequest(); 155 | xhr.open('GET', imageUrl, true); 156 | xhr.responseType = 'arraybuffer' 157 | xhr.onload = function(e) { 158 | if (this.status == 200) { 159 | uInt8Array = new Uint8Array(this.response) 160 | i = uInt8Array.length 161 | binaryString = new Array(i); 162 | for (var i = 0; i < uInt8Array.length; i++){ 163 | binaryString[i] = String.fromCharCode(uInt8Array[i]) 164 | } 165 | data = binaryString.join('') 166 | base64 = window.btoa(data) 167 | callback ("data:image/png;base64,"+base64) 168 | } 169 | } 170 | xhr.send(); 171 | }; 172 | 173 | ColorThief.prototype.getColorAsync = function(imageUrl, callback, quality) { 174 | var thief = this; 175 | this.getImageData(imageUrl, function(imageData){ 176 | sourceImage = document.createElement("img"); 177 | sourceImage.addEventListener('load' , function(){ 178 | var palette = thief.getPalette(sourceImage, 5, quality); 179 | var dominantColor = palette[0]; 180 | callback(dominantColor, this); 181 | }); 182 | sourceImage.src = imageData; 183 | }); 184 | }; 185 | 186 | 187 | 188 | /*! 189 | * quantize.js Copyright 2008 Nick Rabinowitz. 190 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 191 | * @license 192 | */ 193 | 194 | // fill out a couple protovis dependencies 195 | /*! 196 | * Block below copied from Protovis: http://mbostock.github.com/protovis/ 197 | * Copyright 2010 Stanford Visualization Group 198 | * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php 199 | * @license 200 | */ 201 | if (!pv) { 202 | var pv = { 203 | map: function(array, f) { 204 | var o = {}; 205 | return f ? array.map(function(d, i) { o.index = i; return f.call(o, d); }) : array.slice(); 206 | }, 207 | naturalOrder: function(a, b) { 208 | return (a < b) ? -1 : ((a > b) ? 1 : 0); 209 | }, 210 | sum: function(array, f) { 211 | var o = {}; 212 | return array.reduce(f ? function(p, d, i) { o.index = i; return p + f.call(o, d); } : function(p, d) { return p + d; }, 0); 213 | }, 214 | max: function(array, f) { 215 | return Math.max.apply(null, f ? pv.map(array, f) : array); 216 | } 217 | }; 218 | } 219 | 220 | 221 | 222 | /** 223 | * Basic Javascript port of the MMCQ (modified median cut quantization) 224 | * algorithm from the Leptonica library (http://www.leptonica.com/). 225 | * Returns a color map you can use to map original pixels to the reduced 226 | * palette. Still a work in progress. 227 | * 228 | * @author Nick Rabinowitz 229 | * @example 230 | 231 | // array of pixels as [R,G,B] arrays 232 | var myPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207] 233 | // etc 234 | ]; 235 | var maxColors = 4; 236 | 237 | var cmap = MMCQ.quantize(myPixels, maxColors); 238 | var newPalette = cmap.palette(); 239 | var newPixels = myPixels.map(function(p) { 240 | return cmap.map(p); 241 | }); 242 | 243 | */ 244 | var MMCQ = (function() { 245 | // private constants 246 | var sigbits = 5, 247 | rshift = 8 - sigbits, 248 | maxIterations = 1000, 249 | fractByPopulations = 0.75; 250 | 251 | // get reduced-space color index for a pixel 252 | function getColorIndex(r, g, b) { 253 | return (r << (2 * sigbits)) + (g << sigbits) + b; 254 | } 255 | 256 | // Simple priority queue 257 | function PQueue(comparator) { 258 | var contents = [], 259 | sorted = false; 260 | 261 | function sort() { 262 | contents.sort(comparator); 263 | sorted = true; 264 | } 265 | 266 | return { 267 | push: function(o) { 268 | contents.push(o); 269 | sorted = false; 270 | }, 271 | peek: function(index) { 272 | if (!sorted) sort(); 273 | if (index===undefined) index = contents.length - 1; 274 | return contents[index]; 275 | }, 276 | pop: function() { 277 | if (!sorted) sort(); 278 | return contents.pop(); 279 | }, 280 | size: function() { 281 | return contents.length; 282 | }, 283 | map: function(f) { 284 | return contents.map(f); 285 | }, 286 | debug: function() { 287 | if (!sorted) sort(); 288 | return contents; 289 | } 290 | }; 291 | } 292 | 293 | // 3d color space box 294 | function VBox(r1, r2, g1, g2, b1, b2, histo) { 295 | var vbox = this; 296 | vbox.r1 = r1; 297 | vbox.r2 = r2; 298 | vbox.g1 = g1; 299 | vbox.g2 = g2; 300 | vbox.b1 = b1; 301 | vbox.b2 = b2; 302 | vbox.histo = histo; 303 | } 304 | VBox.prototype = { 305 | volume: function(force) { 306 | var vbox = this; 307 | if (!vbox._volume || force) { 308 | vbox._volume = ((vbox.r2 - vbox.r1 + 1) * (vbox.g2 - vbox.g1 + 1) * (vbox.b2 - vbox.b1 + 1)); 309 | } 310 | return vbox._volume; 311 | }, 312 | count: function(force) { 313 | var vbox = this, 314 | histo = vbox.histo; 315 | if (!vbox._count_set || force) { 316 | var npix = 0, 317 | index, i, j, k; 318 | for (i = vbox.r1; i <= vbox.r2; i++) { 319 | for (j = vbox.g1; j <= vbox.g2; j++) { 320 | for (k = vbox.b1; k <= vbox.b2; k++) { 321 | index = getColorIndex(i,j,k); 322 | npix += (histo[index] || 0); 323 | } 324 | } 325 | } 326 | vbox._count = npix; 327 | vbox._count_set = true; 328 | } 329 | return vbox._count; 330 | }, 331 | copy: function() { 332 | var vbox = this; 333 | return new VBox(vbox.r1, vbox.r2, vbox.g1, vbox.g2, vbox.b1, vbox.b2, vbox.histo); 334 | }, 335 | avg: function(force) { 336 | var vbox = this, 337 | histo = vbox.histo; 338 | if (!vbox._avg || force) { 339 | var ntot = 0, 340 | mult = 1 << (8 - sigbits), 341 | rsum = 0, 342 | gsum = 0, 343 | bsum = 0, 344 | hval, 345 | i, j, k, histoindex; 346 | for (i = vbox.r1; i <= vbox.r2; i++) { 347 | for (j = vbox.g1; j <= vbox.g2; j++) { 348 | for (k = vbox.b1; k <= vbox.b2; k++) { 349 | histoindex = getColorIndex(i,j,k); 350 | hval = histo[histoindex] || 0; 351 | ntot += hval; 352 | rsum += (hval * (i + 0.5) * mult); 353 | gsum += (hval * (j + 0.5) * mult); 354 | bsum += (hval * (k + 0.5) * mult); 355 | } 356 | } 357 | } 358 | if (ntot) { 359 | vbox._avg = [~~(rsum/ntot), ~~(gsum/ntot), ~~(bsum/ntot)]; 360 | } else { 361 | // console.log('empty box'); 362 | vbox._avg = [ 363 | ~~(mult * (vbox.r1 + vbox.r2 + 1) / 2), 364 | ~~(mult * (vbox.g1 + vbox.g2 + 1) / 2), 365 | ~~(mult * (vbox.b1 + vbox.b2 + 1) / 2) 366 | ]; 367 | } 368 | } 369 | return vbox._avg; 370 | }, 371 | contains: function(pixel) { 372 | var vbox = this, 373 | rval = pixel[0] >> rshift; 374 | gval = pixel[1] >> rshift; 375 | bval = pixel[2] >> rshift; 376 | return (rval >= vbox.r1 && rval <= vbox.r2 && 377 | gval >= vbox.g1 && gval <= vbox.g2 && 378 | bval >= vbox.b1 && bval <= vbox.b2); 379 | } 380 | }; 381 | 382 | // Color map 383 | function CMap() { 384 | this.vboxes = new PQueue(function(a,b) { 385 | return pv.naturalOrder( 386 | a.vbox.count()*a.vbox.volume(), 387 | b.vbox.count()*b.vbox.volume() 388 | ); 389 | }); 390 | } 391 | CMap.prototype = { 392 | push: function(vbox) { 393 | this.vboxes.push({ 394 | vbox: vbox, 395 | color: vbox.avg() 396 | }); 397 | }, 398 | palette: function() { 399 | return this.vboxes.map(function(vb) { return vb.color; }); 400 | }, 401 | size: function() { 402 | return this.vboxes.size(); 403 | }, 404 | map: function(color) { 405 | var vboxes = this.vboxes; 406 | for (var i=0; i 251 440 | var idx = vboxes.length-1, 441 | highest = vboxes[idx].color; 442 | if (highest[0] > 251 && highest[1] > 251 && highest[2] > 251) 443 | vboxes[idx].color = [255,255,255]; 444 | } 445 | }; 446 | 447 | // histo (1-d array, giving the number of pixels in 448 | // each quantized region of color space), or null on error 449 | function getHisto(pixels) { 450 | var histosize = 1 << (3 * sigbits), 451 | histo = new Array(histosize), 452 | index, rval, gval, bval; 453 | pixels.forEach(function(pixel) { 454 | rval = pixel[0] >> rshift; 455 | gval = pixel[1] >> rshift; 456 | bval = pixel[2] >> rshift; 457 | index = getColorIndex(rval, gval, bval); 458 | histo[index] = (histo[index] || 0) + 1; 459 | }); 460 | return histo; 461 | } 462 | 463 | function vboxFromPixels(pixels, histo) { 464 | var rmin=1000000, rmax=0, 465 | gmin=1000000, gmax=0, 466 | bmin=1000000, bmax=0, 467 | rval, gval, bval; 468 | // find min/max 469 | pixels.forEach(function(pixel) { 470 | rval = pixel[0] >> rshift; 471 | gval = pixel[1] >> rshift; 472 | bval = pixel[2] >> rshift; 473 | if (rval < rmin) rmin = rval; 474 | else if (rval > rmax) rmax = rval; 475 | if (gval < gmin) gmin = gval; 476 | else if (gval > gmax) gmax = gval; 477 | if (bval < bmin) bmin = bval; 478 | else if (bval > bmax) bmax = bval; 479 | }); 480 | return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, histo); 481 | } 482 | 483 | function medianCutApply(histo, vbox) { 484 | if (!vbox.count()) return; 485 | 486 | var rw = vbox.r2 - vbox.r1 + 1, 487 | gw = vbox.g2 - vbox.g1 + 1, 488 | bw = vbox.b2 - vbox.b1 + 1, 489 | maxw = pv.max([rw, gw, bw]); 490 | // only one pixel, no split 491 | if (vbox.count() == 1) { 492 | return [vbox.copy()]; 493 | } 494 | /* Find the partial sum arrays along the selected axis. */ 495 | var total = 0, 496 | partialsum = [], 497 | lookaheadsum = [], 498 | i, j, k, sum, index; 499 | if (maxw == rw) { 500 | for (i = vbox.r1; i <= vbox.r2; i++) { 501 | sum = 0; 502 | for (j = vbox.g1; j <= vbox.g2; j++) { 503 | for (k = vbox.b1; k <= vbox.b2; k++) { 504 | index = getColorIndex(i,j,k); 505 | sum += (histo[index] || 0); 506 | } 507 | } 508 | total += sum; 509 | partialsum[i] = total; 510 | } 511 | } 512 | else if (maxw == gw) { 513 | for (i = vbox.g1; i <= vbox.g2; i++) { 514 | sum = 0; 515 | for (j = vbox.r1; j <= vbox.r2; j++) { 516 | for (k = vbox.b1; k <= vbox.b2; k++) { 517 | index = getColorIndex(j,i,k); 518 | sum += (histo[index] || 0); 519 | } 520 | } 521 | total += sum; 522 | partialsum[i] = total; 523 | } 524 | } 525 | else { /* maxw == bw */ 526 | for (i = vbox.b1; i <= vbox.b2; i++) { 527 | sum = 0; 528 | for (j = vbox.r1; j <= vbox.r2; j++) { 529 | for (k = vbox.g1; k <= vbox.g2; k++) { 530 | index = getColorIndex(j,k,i); 531 | sum += (histo[index] || 0); 532 | } 533 | } 534 | total += sum; 535 | partialsum[i] = total; 536 | } 537 | } 538 | partialsum.forEach(function(d,i) { 539 | lookaheadsum[i] = total-d; 540 | }); 541 | function doCut(color) { 542 | var dim1 = color + '1', 543 | dim2 = color + '2', 544 | left, right, vbox1, vbox2, d2, count2=0; 545 | for (i = vbox[dim1]; i <= vbox[dim2]; i++) { 546 | if (partialsum[i] > total / 2) { 547 | vbox1 = vbox.copy(); 548 | vbox2 = vbox.copy(); 549 | left = i - vbox[dim1]; 550 | right = vbox[dim2] - i; 551 | if (left <= right) 552 | d2 = Math.min(vbox[dim2] - 1, ~~(i + right / 2)); 553 | else d2 = Math.max(vbox[dim1], ~~(i - 1 - left / 2)); 554 | // avoid 0-count boxes 555 | while (!partialsum[d2]) d2++; 556 | count2 = lookaheadsum[d2]; 557 | while (!count2 && partialsum[d2-1]) count2 = lookaheadsum[--d2]; 558 | // set dimensions 559 | vbox1[dim2] = d2; 560 | vbox2[dim1] = vbox1[dim2] + 1; 561 | // console.log('vbox counts:', vbox.count(), vbox1.count(), vbox2.count()); 562 | return [vbox1, vbox2]; 563 | } 564 | } 565 | 566 | } 567 | // determine the cut planes 568 | return maxw == rw ? doCut('r') : 569 | maxw == gw ? doCut('g') : 570 | doCut('b'); 571 | } 572 | 573 | function quantize(pixels, maxcolors) { 574 | // short-circuit 575 | if (!pixels.length || maxcolors < 2 || maxcolors > 256) { 576 | // console.log('wrong number of maxcolors'); 577 | return false; 578 | } 579 | 580 | // XXX: check color content and convert to grayscale if insufficient 581 | 582 | var histo = getHisto(pixels), 583 | histosize = 1 << (3 * sigbits); 584 | 585 | // check that we aren't below maxcolors already 586 | var nColors = 0; 587 | histo.forEach(function() { nColors++; }); 588 | if (nColors <= maxcolors) { 589 | // XXX: generate the new colors from the histo and return 590 | } 591 | 592 | // get the beginning vbox from the colors 593 | var vbox = vboxFromPixels(pixels, histo), 594 | pq = new PQueue(function(a,b) { return pv.naturalOrder(a.count(), b.count()); }); 595 | pq.push(vbox); 596 | 597 | // inner function to do the iteration 598 | function iter(lh, target) { 599 | var ncolors = 1, 600 | niters = 0, 601 | vbox; 602 | while (niters < maxIterations) { 603 | vbox = lh.pop(); 604 | if (!vbox.count()) { /* just put it back */ 605 | lh.push(vbox); 606 | niters++; 607 | continue; 608 | } 609 | // do the cut 610 | var vboxes = medianCutApply(histo, vbox), 611 | vbox1 = vboxes[0], 612 | vbox2 = vboxes[1]; 613 | 614 | if (!vbox1) { 615 | // console.log("vbox1 not defined; shouldn't happen!"); 616 | return; 617 | } 618 | lh.push(vbox1); 619 | if (vbox2) { /* vbox2 can be null */ 620 | lh.push(vbox2); 621 | ncolors++; 622 | } 623 | if (ncolors >= target) return; 624 | if (niters++ > maxIterations) { 625 | // console.log("infinite loop; perhaps too few pixels!"); 626 | return; 627 | } 628 | } 629 | } 630 | 631 | // first set of colors, sorted by population 632 | iter(pq, fractByPopulations * maxcolors); 633 | 634 | // Re-sort by the product of pixel occupancy times the size in color space. 635 | var pq2 = new PQueue(function(a,b) { 636 | return pv.naturalOrder(a.count()*a.volume(), b.count()*b.volume()); 637 | }); 638 | while (pq.size()) { 639 | pq2.push(pq.pop()); 640 | } 641 | 642 | // next set - generate the median cuts using the (npix * vol) sorting. 643 | iter(pq2, maxcolors - pq2.size()); 644 | 645 | // calculate the actual colors 646 | var cmap = new CMap(); 647 | while (pq2.size()) { 648 | cmap.push(pq2.pop()); 649 | } 650 | 651 | return cmap; 652 | } 653 | 654 | return { 655 | quantize: quantize 656 | }; 657 | })(); 658 | -------------------------------------------------------------------------------- /js/unveil-ui.min.js: -------------------------------------------------------------------------------- 1 | (function(e){e.fn.unveil=function(t,n){function f(){var t=u.filter(function(){var t=e(this),n=r.scrollTop(),s=n+r.height(),o=t.offset().top,u=o+t.height();return u>=n-i&&o<=s+i});a=t.trigger("unveil");u=u.not(a)}var r=e(window),i=t||0,s=window.devicePixelRatio>1,o=s?"data-src-retina":"data-src",u=this,a;this.one("unveil",function(){var e=this.getAttribute(o);e=e||this.getAttribute("data-src");if(e){this.setAttribute("src",e);if(typeof n==="function")n.call(this)}});r.scroll(f);r.resize(f);f();return this}})(window.jQuery||window.Zepto);jQuery(document).ready(function(e){if(typeof t==="undefined"){var t=0}e('img[data-unveil="true"]').unveil(t,function(){e(this).load(function(){this.style.opacity=1})})}) 2 | --------------------------------------------------------------------------------