├── .github └── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── config.yml ├── 404.php ├── LICENSE ├── OwO.json ├── README.md ├── api └── api.php ├── archive.php ├── archive_header.php ├── articles.php ├── category-list.php ├── comments.php ├── config └── custom_config.php ├── css ├── GrayMac.css ├── JetBrainsMono-Medium.woff2 ├── custom.css ├── snackbar.min.css ├── style.css └── themedash.css ├── edit ├── edit.css └── extend.js ├── footer.php ├── functions.php ├── header.php ├── header_com.php ├── img ├── 1d.png ├── 404.jpg ├── 404.png ├── DefualtThumbnail.jpg ├── comment.png ├── default.cur ├── friend_404.gif ├── icon-search.png ├── icon-search@2x.png ├── pointer.cur ├── qq.png └── snow.gif ├── index.css ├── index.php ├── js ├── clipboard.min.js ├── comjs.js ├── custom.js ├── custom.main.js ├── letterAvatar.js ├── local-search.js ├── main.js ├── prism.js ├── smooth.min.js ├── snackbar.min.js ├── themecustom.js ├── tw_cn.js ├── typed.min.js ├── utils.js └── wehao.js ├── link.php ├── online.dat ├── page.php ├── page_header.php ├── post.php ├── post_header.php ├── post_sidebar.php ├── public ├── defend.php ├── live2d.php ├── nav.php ├── noqq.php └── rightside.php ├── screenshot.png ├── sidebar.php └── tags.php /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug 反馈 2 | description: 反馈bug以改善主题(如果你的主题不是从release页下载的,请前往release下载后,测试是否存在同样bug再反馈) 3 | title: '[Bug]: ' 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | 重要:請按照模板提交 10 | Please follow the template to create a new issue 11 | 12 | - type: dropdown 13 | id: downlad 14 | attributes: 15 | label: 是否从release页下的主题? | Is the theme download from Release Page? 16 | options: 17 | - 是 (Yes) 18 | - 不是 (No) 19 | validations: 20 | required: true 21 | 22 | - type: input 23 | id: butterfly-ver 24 | attributes: 25 | label: 使用的 Butterfly 版本? | What version of Butterfly are you use? 26 | description: 在后台控制台外观中查看当前版本 27 | validations: 28 | required: true 29 | 30 | - type: dropdown 31 | id: modify 32 | attributes: 33 | label: 是否修改过主题文件? | Has the theme files been modified? 34 | options: 35 | - 不是 (No) 36 | - 是 (Yes) 37 | validations: 38 | required: true 39 | 40 | - type: dropdown 41 | id: browser 42 | attributes: 43 | label: 使用的浏览器? | What browse are you using? 44 | options: 45 | - Chrome 46 | - Edge 47 | - Safari 48 | - firefox 49 | - Other 50 | validations: 51 | required: true 52 | 53 | - type: dropdown 54 | id: environment 55 | attributes: 56 | label: 博客的运行环境? | What the running environment of the blog? 57 | options: 58 | - linux|php7.2+|typecho1.2|mysql5.6+|nginx 59 | - linux|php8.0+|typecho1.2|mysql5.6+|nginx 60 | - linux|php7.2+|typecho1.2|sqlite|nginx 61 | - linux|php8.0+|typecho1.2|sqlite|nginx 62 | - Other 63 | validations: 64 | required: true 65 | 66 | - type: textarea 67 | id: description 68 | attributes: 69 | label: 问题描述 | Describe the bug 70 | description: 请描述你的问题 | A clear and concise description of what the bug is. 71 | placeholder: 如果以上某些选项没有对应的值,请提供相应信息。这里你可以详细说明你的问题,请尽量提供截图 72 | value: 73 | validations: 74 | required: true 75 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: 主题文档 4 | url: https://blog.haoi.net/archives/typecho-butterfly.html 5 | about: 主题文档 6 | 7 | - name: 主题下载 8 | url: https://github.com/wehaox/Typecho-Butterfly/releases 9 | about: 主题下载 10 | 11 | - name: 静态文件 12 | url: https://github.com/wehaox/Typecho-Butterfly/releases/download/1.7.7/static-23.11.zip 13 | about: 最新的本地静态文件下载 14 | 15 | - name: 提交普通问题 16 | url: https://github.com/wehaox/Typecho-Butterfly/issues/new 17 | about: 非bug问题可以在这里提交 18 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 2 | page404(); ?> 3 | need('header_com.php'); ?> 4 |
5 |
6 | 9 |
Page not found

404

頁面沒有找到
10 | 11 | options->showFramework == 'off'): ?> 12 | 13 | 14 | options->CursorEffects !== 'off' &&$this->options->CursorEffects == 'heart') : ?> 15 | 16 | options->CursorEffects !== 'off' &&$this->options->CursorEffects == 'fireworks') : ?> 17 | 18 | 19 | 20 | options->ShowLive2D !== 'off' && !isMobile()) : ?> 21 | 22 | 23 | 24 | options->CustomBodyEnd() ?> 25 | 26 | 47 | 48 | 49 |
50 | options->NewTabLink == 'on'): ?> 51 | 64 | 65 | is('index')): ?> 66 | 67 | options->beautifyBlock) && in_array('ShowTopimg',$this->options->beautifyBlock)): ?> 68 | options->CustomSubtitle)): ?> 69 | 84 | 85 | 102 | 103 | 104 | 105 | 106 | 107 |
108 | 109 | options->EnablePjax === 'on') : ?> 110 | options->StaticFile == 'CDN' && $this->options->CDNURL == ''): ?> 111 | 112 | 113 | 114 | options->StaticFile == 'CDN' && $this->options->CDNURL !== ''): ?> 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /OwO.json: -------------------------------------------------------------------------------- 1 | { 2 | "颜文字": { 3 | "type": "emoticon", 4 | "container": [ 5 | { 6 | "icon": "OωO", 7 | "text": "Author: DIYgod" 8 | }, 9 | { 10 | "icon": "|´・ω・)ノ", 11 | "text": "Hi" 12 | }, 13 | { 14 | "icon": "ヾ(≧∇≦*)ゝ", 15 | "text": "开心" 16 | }, 17 | { 18 | "icon": "(☆ω☆)", 19 | "text": "星星眼" 20 | }, 21 | { 22 | "icon": "(╯‵□′)╯︵┴─┴", 23 | "text": "掀桌" 24 | }, 25 | { 26 | "icon": " ̄﹃ ̄", 27 | "text": "流口水" 28 | }, 29 | { 30 | "icon": "(/ω\)", 31 | "text": "捂脸" 32 | }, 33 | { 34 | "icon": "∠( ᐛ 」∠)_", 35 | "text": "给跪" 36 | }, 37 | { 38 | "icon": "(๑•̀ㅁ•́ฅ)", 39 | "text": "Hi" 40 | }, 41 | { 42 | "icon": "→_→", 43 | "text": "斜眼" 44 | }, 45 | { 46 | "icon": "୧(๑•̀⌄•́๑)૭", 47 | "text": "加油" 48 | }, 49 | { 50 | "icon": "٩(ˊᗜˋ*)و", 51 | "text": "有木有WiFi" 52 | }, 53 | { 54 | "icon": "(ノ°ο°)ノ", 55 | "text": "前方高能预警" 56 | }, 57 | { 58 | "icon": "(´இ皿இ`)", 59 | "text": "我从未见过如此厚颜无耻之人" 60 | }, 61 | { 62 | "icon": "⌇●﹏●⌇", 63 | "text": "吓死宝宝惹" 64 | }, 65 | { 66 | "icon": "(ฅ´ω`ฅ)", 67 | "text": "已阅留爪" 68 | }, 69 | { 70 | "icon": "(╯°A°)╯︵○○○", 71 | "text": "去吧大师球" 72 | }, 73 | { 74 | "icon": "φ( ̄∇ ̄o)", 75 | "text": "太萌惹" 76 | }, 77 | { 78 | "icon": "ヾ(´・ ・`。)ノ\"", 79 | "text": "咦咦咦" 80 | }, 81 | { 82 | "icon": "( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃", 83 | "text": "气呼呼" 84 | }, 85 | { 86 | "icon": "(ó﹏ò。)", 87 | "text": "我受到了惊吓" 88 | }, 89 | { 90 | "icon": "Σ(っ °Д °;)っ", 91 | "text": "什么鬼" 92 | }, 93 | { 94 | "icon": "( ,,´・ω・)ノ\"(´っω・`。)", 95 | "text": "摸摸头" 96 | }, 97 | { 98 | "icon": "╮(╯▽╰)╭ ", 99 | "text": "无奈" 100 | }, 101 | { 102 | "icon": "o(*////▽////*)q ", 103 | "text": "脸红" 104 | }, 105 | { 106 | "icon": ">﹏<", 107 | "text": "" 108 | }, 109 | { 110 | "icon": "( ๑´•ω•) \"(ㆆᴗㆆ)", 111 | "text": "" 112 | }, 113 | { 114 | "icon": "(。•ˇ‸ˇ•。)", 115 | "text": "" 116 | } 117 | ] 118 | }, 119 | "Emoji": { 120 | "type": "emoji", 121 | "container": [ 122 | { 123 | "icon": "😂", 124 | "text": "" 125 | }, 126 | { 127 | "icon": "😀", 128 | "text": "" 129 | }, 130 | { 131 | "icon": "😅", 132 | "text": "" 133 | }, 134 | { 135 | "icon": "😊", 136 | "text": "" 137 | }, 138 | { 139 | "icon": "🙂", 140 | "text": "" 141 | }, 142 | { 143 | "icon": "🙃", 144 | "text": "" 145 | }, 146 | { 147 | "icon": "😌", 148 | "text": "" 149 | }, 150 | { 151 | "icon": "😍", 152 | "text": "" 153 | }, 154 | { 155 | "icon": "😘 ", 156 | "text": "" 157 | }, 158 | { 159 | "icon": "😜", 160 | "text": "" 161 | }, 162 | { 163 | "icon": "😝", 164 | "text": "" 165 | }, 166 | { 167 | "icon": "😏", 168 | "text": "" 169 | }, 170 | { 171 | "icon": "😒", 172 | "text": "" 173 | }, 174 | { 175 | "icon": "🙄", 176 | "text": "" 177 | }, 178 | { 179 | "icon": "😳 ", 180 | "text": "" 181 | }, 182 | { 183 | "icon": "😡", 184 | "text": "" 185 | }, 186 | { 187 | "icon": "😔", 188 | "text": "" 189 | }, 190 | { 191 | "icon": "😫", 192 | "text": "" 193 | }, 194 | { 195 | "icon": "😱", 196 | "text": "" 197 | }, 198 | { 199 | "icon": "😭", 200 | "text": "" 201 | }, 202 | { 203 | "icon": "💩", 204 | "text": "" 205 | }, 206 | { 207 | "icon": "👻", 208 | "text": "" 209 | }, 210 | { 211 | "icon": "🙌", 212 | "text": "" 213 | }, 214 | { 215 | "icon": "🖕", 216 | "text": "" 217 | }, 218 | { 219 | "icon": "👍", 220 | "text": "" 221 | }, 222 | { 223 | "icon": "👫", 224 | "text": "" 225 | }, 226 | { 227 | "icon": "👬", 228 | "text": "" 229 | }, 230 | { 231 | "icon": "👭", 232 | "text": "" 233 | }, 234 | { 235 | "icon": "🌚", 236 | "text": "" 237 | }, 238 | { 239 | "icon": "🌝", 240 | "text": "" 241 | }, 242 | { 243 | "icon": "🙈", 244 | "text": "" 245 | }, 246 | { 247 | "icon": "💊", 248 | "text": "" 249 | }, 250 | { 251 | "icon": "😶", 252 | "text": "" 253 | }, 254 | { 255 | "icon": "🙏", 256 | "text": "" 257 | }, 258 | { 259 | "icon": "🍦", 260 | "text": "" 261 | }, 262 | { 263 | "icon": "🍉", 264 | "text": "" 265 | }, 266 | { 267 | "icon": "😣", 268 | "text": "" 269 | } 270 | ] 271 | } 272 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Typecho-Butterfly 2 | ![master version](https://img.shields.io/github/v/release/wehaox/Typecho-Butterfly?sort=semver) 3 | ![typecho version](https://img.shields.io/badge/Tyepcho-1.2.0-green) 4 | ![php version](https://img.shields.io/badge/PHP-7.4+-9cf) 5 | ![license](https://img.shields.io/github/license/wehaox/Typecho-Butterfly?color=FF5531) 6 | 7 | 这是 Typecho 版本的 butterfly 主题 8 | 主题好看,但是由于经常换设备并且hexo操作还是不方便,某些功能受限于第三方 9 | 所以就移植了 10 | 11 | 原主题:[hexo-butterfly](https://github.com/jerryc127/hexo-theme-butterfly) 12 | 13 | Demo:[WeHao‘s Blog](https://blog.haoi.net/) 14 | 15 | 使用文档:[使用文档](https://blog.haoi.net/archives/typecho-butterfly.html) 16 | 17 | ## 💻安装 18 | 你最好从[Release](https://github.com/wehaox/Typecho-Butterfly/releases) 页面下载,code页下载代码可能更新遗漏或者更新提前导致页面出错 19 | 下载好后放进博客usr/theme内解压即可 20 | 21 | ## ⭐帮助主题发展(加快更新) 22 | - 如果你发现主题bug或者建议可以去[issues](https://github.com/wehaox/Typecho-Butterfly/issues)提交反馈 23 | - 如果你一定能力可以向主题提交[PR](https://github.com/wehaox/Typecho-Butterfly/pulls)来丰富主题 24 | - 如果你只是一个普通是使用者,你可以在右上角给主题点一个[star](https://github.com/wehaox/Typecho-Butterfly/stargazers)来鼓励作者来加快更新 25 | 26 | ## ✌️移植特色 27 | 1. 方便原hexo的博文转移,因为都是md文档 28 | 2. 原butterfly的用户可以直接使用原版butterfly主题的css文件,拥有原先同样的效果 29 | 3. 注意:移植并非为最新版butterfly,你的index.css可能会在本主题出现bug 30 | 4. 由于使用动态博客,大部分功能可以让程序去实现,不用借助第三方api(可在主题外观设置中自定义) 31 | 5. 在线编辑文档 32 | 6. 搜索、加密和置顶文章可以直接使用(相比hexo无需太多额外配置) 33 | 7. 相比hexo,程序安装更加方便,使用更加高效 34 | 8. 网站咨询显示同时在线人数(某些虚拟主机似乎无法使用) 35 | 9. 可在后台设置侧边栏信息以及侧边栏的隐藏和显示 36 | 10. 后续将开发更多功能 37 | 38 | ## 🎉已实现的功能 39 | 40 | - [x] 支持评论区谷歌人机验证、hcaptcha人机验证 41 | - [x] 全站加密或禁止访问 42 | - [x] 一键开启魔改主题 43 | - [x] 单独设置文章过期提醒 44 | - [x] 文章加密(博客程序自带) 45 | - [x] 后台设置需要置顶文章 46 | - [x] 后台设置友链并可以使html自定义友链 47 | - [x] 文章内可设置回复可见 48 | - [x] 卡片化设计 49 | - [X] 支持二级目录 50 | - [x] 双栏设计 51 | - [x] 响应式主题 52 | - [x] 夜间模式 53 | - [x] Pjax 54 | - [x] 文章阅读模式 55 | - [x] 简体和繁体转换 56 | - [X] 电脑和手机都可查看TOC目录 57 | - [ ] 内置多种代码配色(darker/pale night/light/ocean/mac/mac light),可自定义代码配色 58 | - [X] 代码块显示代码语言/关闭或展开代码块/代码复制/代码自动换行 59 | - [ ] 可关闭文字复制/可开启内容复制增加版权信息) 60 | - [X] 本地搜索 61 | - [ ] Mathjax 和 Katex 62 | - [x] 内置404页面 63 | - [x] 显示字数统计 64 | - [x] 显示相关文章 65 | - [x] 过期文章提醒 66 | - [ ] 多种在线聊天(Chatra/Tidio/Daovoice/Gitter/Crisp) 67 | - [x] 谷歌广告/手动广告位置 68 | - [x] 修改网站配色 69 | - [ ] 打字特效 activate_power_mode 70 | - [ ] 多种背景特效(静止彩带/动态彩带/Canvas Nest) 71 | - [x] 多种鼠标点击特效(烟花/爱心) 72 | - [ ] 内置一种 Preloader 加载动画 73 | - [x] Fancybox大图模式 74 | - [ ] 照片墙 75 | - [x] 图片懒加载 76 | - [x] Snackbar弹窗 77 | - [ ] PWA 78 | 79 | 详情看: 80 | 81 | [博客说明](https://blog.haoi.net/archives/blogtheme.html) 82 | 83 | 84 | ## 请作者喝瓶快乐水 85 | 86 | 微信支付宝 87 | -------------------------------------------------------------------------------- /api/api.php: -------------------------------------------------------------------------------- 1 | 'getPosts', 8 | 'getPost' => 'getPost' 9 | ]; 10 | 11 | // 提取路径中的第一个部分作为 action 12 | $parts = explode('/', $apiPath); 13 | $action = isset($parts[0]) ? filter_var($parts[0], FILTER_SANITIZE_SPECIAL_CHARS) : ''; 14 | 15 | // 查找对应的处理函数 16 | if (isset($routes[$action])) { 17 | $handler = $routes[$action]; 18 | 19 | // 如果是 getPost 路由,处理参数 20 | if ($action === 'getPost') { 21 | $cid = isset($parts[1]) ? filter_var($parts[1], FILTER_SANITIZE_NUMBER_INT) : null; 22 | call_user_func($handler, $cid); 23 | } else { 24 | call_user_func($handler); 25 | } 26 | } else { 27 | responseJson(['status' => 'error', 'message' => 'Unknown action']); 28 | } 29 | } 30 | 31 | function getPosts() 32 | { 33 | $db = Typecho_Db::get(); 34 | $posts = $db->fetchAll($db->select()->from('table.contents') 35 | ->where('type = ?', 'post') 36 | ->order('created', Typecho_Db::SORT_DESC)); 37 | 38 | responseJson(['status' => 'success', 'data' => $posts]); 39 | } 40 | 41 | function getPost($cid) 42 | { 43 | if ($cid) { 44 | $db = Typecho_Db::get(); 45 | $post = $db->fetchRow($db->select()->from('table.contents') 46 | ->where('cid = ?', $cid)); 47 | 48 | if ($post) { 49 | responseJson(['status' => 'success', 'data' => $post]); 50 | } else { 51 | responseJson(['status' => 'error', 'message' => 'Post not found']); 52 | } 53 | } else { 54 | responseJson(['status' => 'error', 'message' => 'Invalid post ID']); 55 | } 56 | } 57 | 58 | function responseJson($data) 59 | { 60 | header('Content-Type: application/json'); 61 | echo json_encode($data); 62 | exit; 63 | } 64 | 65 | ?> -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 4 | need('page_header.php'); ?> 5 |
6 |
7 | have()) : ?> 8 | next()) : 11 | if($this->options->coverPosition === 'cross'){ 12 | $sideClass = ($coverIndex % 2 == 0) ? 'right' : 'left'; 13 | }else{ 14 | $sideClass = $this->options->coverPosition; 15 | } 16 | ?> 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 68 |
69 | 75 | 76 |
77 |

78 |
79 | 80 | 83 |
84 | need('sidebar.php'); ?> 85 |
86 | need('footer.php'); ?> -------------------------------------------------------------------------------- /archive_header.php: -------------------------------------------------------------------------------- 1 | 2 | need('header_com.php'); ?> 3 | 4 |
5 | 6 |
7 |
71 | 72 | -------------------------------------------------------------------------------- /articles.php: -------------------------------------------------------------------------------- 1 | 2 | need('page_header.php'); 9 | ?> 10 |
11 |
12 |
13 | authorId == $this -> user -> uid): ?> 14 | 15 |
16 | widget('Widget_Contents_Post_Recent', 'pageSize=1000')->to($archives); Typecho_Widget::widget('Widget_Stat')->to($stat); 17 | $year=0; $mon=0; $i=0; $j=0; 18 | $output = '
文章总览 - '.$stat->publishedPostsNum.'
'; 19 | while($archives->next()): 20 | $year_tmp = date('Y',$archives->created); 21 | $mon_tmp = date('m',$archives->created); 22 | $y=$year; $m=$mon; 23 | $erro = "'https://tva1.sinaimg.cn/large/007X0Rdyly1gpaaf55n1rj30ic09u0sw.jpg'"; 24 | if ($mon != $mon_tmp && $mon > 0) $output .= ''; 25 | if ($year != $year_tmp && $year > 0) $output .= ''; 26 | if ($year != $year_tmp) { 27 | $year = $year_tmp; 28 | $output .= '
'. $year .' 年
'; //输出年份 29 | } 30 | $output .= '
'; 31 | if(noCover($archives)){ 32 | $output .= ' 33 | '. $archives->title .' 34 | '; 35 | } 36 | $output .= ' 37 |
38 |
39 | 40 | 43 |
44 | 45 | '. $archives->title .' 46 | 47 |
48 |
'; //输出文章日期和标题 49 | endwhile; 50 | echo $output; 51 | ?> 52 |
53 |
54 | need('sidebar.php'); ?> 55 | 56 |
57 | need('footer.php'); ?> -------------------------------------------------------------------------------- /category-list.php: -------------------------------------------------------------------------------- 1 | 2 | need('page_header.php'); 9 | ?> 10 |
11 |
12 |
13 |
分类 - 14 | to($stat); ?>categoriesNum() ?> 15 |
16 |
    17 | widget('Widget_Metas_Category_List')->to($categorys); ?> 18 | next()): ?> 19 | levels === 0): ?> 20 | getAllChildren($categorys->mid); ?> 21 | 22 |
  • 23 | name(); ?> 24 | 25 | count(); ?> 26 |
  • 27 | 28 |
  • 29 | name(); ?> 30 | count(); ?> 31 |
      32 | 34 | getCategory($mid); echo($this->is('category', $mid));?> 36 |
    • 37 | 38 | 39 |
    • 40 | 42 |
    43 |
  • 44 | 45 | 46 | 47 |
48 |
49 | need('comments.php'); ?> 50 |
51 | need('sidebar.php'); ?> 52 |
53 | need('footer.php'); ?> -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | comments()->to($comments); ?> 4 | allow('comment') && $this->options->CloseComments == 'off') : ?> 5 |
6 | 7 |

8 |
9 |
评论
10 |
11 |

12 |
13 |
14 | cancelReply(""); ?> 15 |
16 |
17 |
18 |
19 |
20 |
21 | user->hasLogin()) : ?> 22 | 27 | 28 | 29 | 30 | 31 | 32 | options->commentsRequireMail) : ?> required /> 33 | 34 | 35 | options->commentsRequireURL) : ?> required /> 36 | 37 |
38 | 39 | 40 |
41 |
42 | user->hasLogin() && $this->options->EnableCommentsLogin === 'on') : ?> 43 |
44 | 45 |
46 | 47 |
48 | 49 |
50 | user->hasLogin()) ?> 51 | options->siteKey) && !empty($this->options->siteKey)){?> 52 | 64 | 65 | options->hcaptchaSecretKey) && !empty($this->options->hcaptchaAPIKey)) {?> 66 | 78 | 79 |
80 | user->hasLogin() && $this->options->EnableCommentsLogin === 'on') : ?> 81 |
82 |
83 | 84 | 85 | 86 |
87 | 126 |
127 | 128 |
129 | 140 | allow('comment') && $this->is('post')) : ?> 141 |
142 | 143 |

144 | 145 | 146 | have()) : ?> 147 |

commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?>

148 | listComments(); ?> 149 | pageNav('', '', 1, '...', array('wrapTag' => 'ol', 'wrapClass' => 'page-navigator', 'itemTag' => '', 'prevClass' => 'prev', 'nextClass' => 'next', 'currentClass' => 'current')); ?> 150 | 151 |
-------------------------------------------------------------------------------- /css/GrayMac.css: -------------------------------------------------------------------------------- 1 | code[class*="language-"],pre[class*="language-"]{color:#f8f8f2;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:2;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;font-size:13px}pre[class*="language-"]{overflow:auto;}:not(pre)>code[class*="language-"],pre[class*="language-"]{background:#696969}:not(pre)>code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999;}.token.punctuation{color:#ccc;}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#e2777a;}.token.function-name{color:#6196cc;}.token.boolean,.token.number,.token.function{color:#f08d49;}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555;}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd;}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699;}.token.operator,.token.entity,.token.url{color:#67cdcc;}.token.important,.token.bold{font-weight:bold;}.token.italic{font-style:italic;}.token.entity{cursor:help;}.token.inserted{color:green;}pre.line-numbers{counter-reset:linenumber}pre.line-numbers>code{white-space:inherit font-size:15px}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0px;font-size:100%;left:0em;width:3em;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#D3D3D3;display:block;padding-right:.9em;text-align:right;background:#808080}div.code-toolbar{font-size:100%;border-radius:4px;position:relative;box-shadow:0 0 20px 5px rgba(0,0,0,.4);padding-top:30px;background-color:#3f3f3f;margin:20px 0 20px 0;}.code-toolbar:before{content:" ";position:absolute;-webkit-border-radius:50%;border-radius:50%;background:#fc625d;width:11px;height:11px;left:10px;top:10px;-webkit-box-shadow:20px 0 #fdbc40,40px 0 #35cd4b;box-shadow:20px 0 #fdbc40,40px 0 #35cd4b;z-index:2}div.code-toolbar>.toolbar{padding-right:.4em;position:absolute;top:.09em;right:.2em;width:100%;text-align:center;}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar>.toolbar .toolbar-item{padding:0 1px 1px 3px;display:inline-block}div.code-toolbar>.toolbar button{cursor:pointer;transition:all .3s;position:absolute;background-color:transparent;right:6px;top:4px;font-size:12px;line-height:12px;padding:3px 5px;border:1px solid;border-radius:6px;opacity:0;color:#FFF;}div.code-toolbar:hover button{opacity:1;}div.code-toolbar>.toolbar:hover{text-decoration:none!important}div.code-toolbar>.div.code-toolbar>.toolbar button,div.code-toolbar>.toolbar span{font-family:'Ubuntu',sans-serif;font-weight:bold;font-size:.9em;opacity:0;color:#FFF;}div.code-toolbar:hover .toolbar span{opacity:1;}#post-content .code-block-fullscreen{padding-top:32px;position:fixed;width:80vw;height:80vh;min-height:80vh;top:0;left:0;right:0;bottom:0;margin:auto;z-index:9999999;box-shadow:0 0 20px 0 rgba(255,255,255,.4);animation:elastic 1s;overflow:hidden;background:#21252a;}.code-block-fullscreen code{--widthA:100%;--widthB:calc(var(--widthA) - 30px);height:var(--widthB);min-height:99%;overflow-y:scroll;height:100%;}.code-block-fullscreen-html-scroll{overflow:hidden;}.shelter{width:6.5px;height:6.5px;z-index:100;background:#696969;position:absolute;bottom:0;right:0;}.max-img::-webkit-scrollbar-track-piece{background:#eee}.max-img::-webkit-scrollbar{width:8px;height:6px}.max-img::-webkit-scrollbar-thumb{border-radius:6px;background-color:#777}.max-img::-webkit-scrollbar-thumb:hover{background-color:#bbb}pre::-webkit-scrollbar-track-piece{}pre::-webkit-scrollbar{width:8px;height:6px}pre::-webkit-scrollbar-thumb{border-radius:4px;background-color:#cbcbcb}pre::-webkit-scrollbar-thumb:hover{background-color:#bbb}code::-webkit-scrollbar-track-piece{}code::-webkit-scrollbar{width:6px;height:6px}code::-webkit-scrollbar-thumb{border-radius:6px;background-color:#777}code::-webkit-scrollbar-thumb:hover{background-color:#bbb}html::-webkit-scrollbar-track-piece{background:#eee}html::-webkit-scrollbar{width:8px;height:6px}html::-webkit-scrollbar-thumb{border-radius:4px;background-color:#cbcbcb}html::-webkit-scrollbar-thumb:hover{background-color:#bbb} 2 | -------------------------------------------------------------------------------- /css/JetBrainsMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wehaox/Typecho-Butterfly/428737cd73774b69a52a0014d1bed210155ce3e0/css/JetBrainsMono-Medium.woff2 -------------------------------------------------------------------------------- /css/snackbar.min.css: -------------------------------------------------------------------------------- 1 | .snackbar-container{transition:all .5s ease;transition-property:top,right,bottom,left,opacity;font-family:Roboto,sans-serif;font-size:14px;min-height:14px;background-color:#070b0e;position:fixed;display:flex;justify-content:space-between;align-items:center;color:#fff;line-height:22px;padding:18px 24px;bottom:-100px;top:-100px;opacity:0;z-index:9999}.snackbar-container .action{background:inherit;display:inline-block;border:none;font-size:inherit;text-transform:uppercase;color:#4caf50;margin:0 0 0 24px;padding:0;min-width:min-content;cursor:pointer}@media (min-width:640px){.snackbar-container{min-width:288px;max-width:568px;display:inline-flex;border-radius:2px;margin:24px}}@media (max-width:640px){.snackbar-container{left:0;right:0;width:100%}}.snackbar-pos.bottom-center{top:auto!important;bottom:0;left:50%;transform:translate(-50%,0)}.snackbar-pos.bottom-left{top:auto!important;bottom:0;left:0}.snackbar-pos.bottom-right{top:auto!important;bottom:0;right:0}.snackbar-pos.top-left{bottom:auto!important;top:0;left:0}.snackbar-pos.top-center{bottom:auto!important;top:0;left:50%;transform:translate(-50%,0)}.snackbar-pos.top-right{bottom:auto!important;top:0;right:0}@media (max-width:640px){.snackbar-pos.bottom-center,.snackbar-pos.top-center{left:0;transform:none}} -------------------------------------------------------------------------------- /css/themedash.css: -------------------------------------------------------------------------------- 1 | .typecho-option-submit { 2 | position: fixed; 3 | left: 0px; 4 | bottom: 0px; 5 | background-color: rgba(255, 255, 255, .5); 6 | backdrop-filter: blur(8px); 7 | height: 80px; 8 | width: 100%; 9 | box-shadow: 0px -6px 11px -10px rgb(133 133 133 / 60%); 10 | z-index: 9; 11 | transition-duration: .5s; 12 | margin: 0; 13 | } 14 | .typecho-option-submit:hover{ 15 | backdrop-filter: blur(.3px); 16 | } 17 | .typecho-option-submit li { 18 | display: flex; 19 | justify-content: center; 20 | align-items: center; 21 | margin: 15px; 22 | } 23 | 24 | .typecho-option-submit li button { 25 | border-radius: 18px; 26 | width: 94px; 27 | height: 45px; 28 | } 29 | 30 | .mtoc a { 31 | display: block; 32 | float: left; 33 | padding: 10px; 34 | } 35 | 36 | .set_toc { 37 | position: sticky; 38 | top: 3px; 39 | border: 1px solid powderblue; 40 | padding: 8px 0; 41 | overflow: auto; 42 | background-color: rgba(255, 255, 255, .5); 43 | backdrop-filter: blur(8px); 44 | box-shadow: 3px 7px 11px -10px rgb(133 133 133 / 60%); 45 | border-radius: 4px; 46 | } 47 | .protected { 48 | margin-top: 10px; 49 | } 50 | 51 | @media screen and (max-width: 575px){ 52 | .typecho-option-submit { 53 | bottom: 36px; 54 | } 55 | } 56 | .SideClock li{ 57 | list-style: none; 58 | } 59 | .SideClock{ 60 | padding-left: 0px; 61 | } 62 | .SideClock p{ 63 | margin: 0.5em 0 0; 64 | color: #999; 65 | font-size: .92857em; 66 | } -------------------------------------------------------------------------------- /edit/edit.css: -------------------------------------------------------------------------------- 1 | .wmd-button.custom { 2 | width:20px; 3 | height:20px; 4 | line-height:20px; 5 | text-align:center; 6 | } 7 | .wmd-button.custom svg { 8 | width:15px; 9 | height:15px; 10 | vertical-align:middle; 11 | } 12 | body.fullscreen { 13 | overflow-x:hidden; 14 | } 15 | .wmd-button-row { 16 | height:auto; 17 | } 18 | #custom-field .typecho-list-table tbody textarea { 19 | width:100%; 20 | height:100px; 21 | } 22 | #custom-field .typecho-list-table tbody input[type="text"] { 23 | width:100%; 24 | } 25 | select { 26 | margin-bottom: 5px; 27 | width: 145px; 28 | } 29 | textarea { 30 | margin-bottom: 10px; 31 | width: 25.7em; 32 | } 33 | .wmd-prompt-dialog{ 34 | top: 36%; 35 | } 36 | .artplayer-dialog { 37 | top: 26%; 38 | } -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | need('header_com.php'); ?> 3 | 15 | 16 |
17 |
18 | options->beautifyBlock) && in_array('ShowTopimg',$this->options->beautifyBlock)): ?> 19 |