├── .gitignore ├── 404.php ├── LICENSE ├── README.md ├── archive.php ├── assets ├── css │ ├── bootstrap.css │ ├── dark-color.scss │ ├── github-dark.min.css │ ├── icon.css │ ├── info-color.scss │ ├── light-color.scss │ ├── options-panel.css │ ├── primary-color.scss │ ├── stackoverflow-light.min.css │ ├── style.css │ ├── style.scss │ ├── success-color.scss │ ├── sunburst.min.css │ └── universal.scss ├── fonts │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ └── icomoon.woff └── js │ ├── app.js │ ├── bootstrap.bundle.min.js │ ├── chart.js │ ├── clipboard.min.js │ ├── highlight.pack.js │ ├── jquery-3.4.1.min.js │ ├── jquery.pjax.js │ ├── jquery.qrcode.min.js │ └── options-panel.js ├── components ├── comment-input.php ├── comments.php ├── footer.php ├── header.php ├── link-editor.php ├── post-list.php └── sidebar.php ├── emoji.php ├── functions.php ├── inc ├── helpers.php ├── theme-config.php └── theme-fields.php ├── index.php ├── languages ├── en.php └── zh.php ├── page-archive.php ├── page-category.php ├── page-data.php ├── page-links.php ├── page-tag.php ├── page.php ├── post.php ├── screenshot.jpg └── screenshot ├── 16043686924621.jpg ├── JetBrains-logo.png ├── all-color.png ├── category-statistics.jpeg ├── comment-calendar.jpeg ├── comment-statistics.jpeg ├── dark-color.png ├── emoji.jpeg ├── home-page.jpeg ├── home.png ├── mini-header-image.png ├── mini-header-image2.png ├── qr-code.jpeg └── statistics.jpeg /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .idea/ 3 | .vscode/ 4 | assets/css/style.css.map 5 | assets/css/style.css.map 6 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | options->language); 6 | $this->need('components/header.php'); 7 | ?> 8 | 9 |
10 |
11 |

404

12 | 13 | 27 |
28 | 29 |
30 |
31 |
32 | need('components/footer.php'); ?> -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 changbin1997 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![MWordStar主题在各种设备的截图](screenshot/home-page.jpeg) 2 | 3 | 这是一套简洁的 [Typecho](https://typecho.org/) 双栏博客主题,也是 [我的博客](https://www.misterma.com/) 之前使用的主题。 4 | 5 | 我现在使用的主题是 [Facile](https://github.com/changbin1997/Facile) ,有兴趣的话也可以访问 [我的博客](https://www.misterma.com/) 或 [Github](https://github.com/changbin1997/Facile) 查看。 6 | 7 | 主题在线演示地址:[https://changbin1997.github.io/MWordStar/web/](https://changbin1997.github.io/MWordStar/web/) 8 | 9 | 主题演示站的页面都是静态页面,不能发评论和点赞。因为演示站不会随着主题一起更新,所以你在演示站看到的效果可能和最新版本的主题也会有些不一样。 10 | 11 | 主题下载地址:[https://github.com/changbin1997/MWordStar/releases](https://github.com/changbin1997/MWordStar/releases) 12 | 13 | 主题使用说明:[https://mwordstar.misterma.com/](https://mwordstar.misterma.com/) 14 | 15 | 目前主题没有相关的交流群,在使用过程中遇到问题可以直接到 [我的博客](https://www.misterma.com/archives/812/) 留言,也可以到主题 Github 的 [issues](https://github.com/changbin1997/MWordStar/issues) 反馈,我的博客和 Github issues 都有回复邮件通知。 16 | 17 | 下面是主题首页截图: 18 | 19 | ![MWordStar主题首页截图1](screenshot/home.png) 20 | 21 | 主题元素包含圆角和直角两种风格,您可以根据喜好在主题外观设置中切换,下面是直角风格的首页截图: 22 | 23 | ![MWordStar直角风格首页截图](screenshot/16043686924621.jpg) 24 | 25 | 小头图模式: 26 | 27 | ![MWordStar小头图模式截图](screenshot/mini-header-image.png) 28 | 29 | 也可以给文章设置单独的头图样式: 30 | 31 | ![MWordStar大头图和小头图搭配使用的截图](screenshot/mini-header-image2.png) 32 | 33 | 深色模式: 34 | 35 | ![MWordStar深色模式截图](screenshot/dark-color.png) 36 | 37 | 主题目前包含 6 种配色: 38 | 39 | ![MWordStar 6种不同配色的截图](screenshot/all-color.png) 40 | 41 | ## 特点和功能 42 | 43 | * 响应式设计 44 | * 无障碍适配(Accessibility) 45 | * 6 种不同风格的配色 46 | * 两种不同风格的元素 47 | * 多套自定义页面模板 48 | * 代码高亮 49 | * 丰富的设置选项 50 | * 良好的 SEO 优化 51 | * 详细的图表统计 52 | * 自带文章浏览量统计和点赞功能 53 | * 丰富的侧边栏组件 54 | * 评论区自带 Emoji 表情面板 55 | * 支持自动根据文章中的标题生成章节目录 56 | * 支持图片懒加载 57 | * 文章支持分页显示 58 | * 文章列表支持多种排版组合 59 | * 支持 PJAX 无刷新跳转 60 | * 支持多语言 61 | * 长期维护 62 | * 详细的 [使用说明](https://mwordstar.misterma.com/)(必看) 63 | 64 | ## 主题介绍 65 | 66 | ### 外观设计 67 | 68 | 因为我个人比较喜欢两栏布局,所以这个主题也使用了两栏布局的设计。 69 | 70 | ### 主题依赖 71 | 72 | 主题主要用到了一下几个库和框架: 73 | 74 | * [Bootstrap](https://getbootstrap.com/) 外观和布局 75 | * [jQuery](https://jquery.com/) Bootstrap 依赖 76 | * [jquery-qrcode](https://github.com/jeromeetienne/jquery-qrcode) 一个生成二维码的 jQuery 插件 77 | * [highlight.js](https://highlightjs.org/) 代码高亮 78 | * [IcoMoon](https://icomoon.io/) 字体图标 79 | * [ECharts](https://github.com/apache/echarts) 生成和展示统计图表 80 | * [jquery-pjax](https://github.com/defunkt/jquery-pjax) 用于页面无刷新跳转 81 | 82 | 其中 IcoMoon 的字体图标是可定制的,所以只包含了主题中出现的图标,字体图标的文件体积也很小。ECharts 也只包含饼图和日历图,而且只会在统计页面加载。 83 | 84 | 主题的静态文件没有使用任何 CDN 地址,所有文件都放在主题的 `assets` 目录中。主题的生成目录、点赞、快速分享 之类的功能都是自己手动编写的,所以用到的 JS 库也比较少。 85 | 86 | 使用 Webpack 打包的版本前台只需要加载一个 CSS 和 一个 JS 文件,所有 JS 库都打包到了 JS 中,所有 CSS 和字体图标都打包到了 CSS 中。因为用到的库比较少,而且字体图标和部分组件都是按需引入的,所以打包后的 CSS 和 JS 也比较小。 87 | 88 | 如果您没有二次开发需求的话,建议下载 Webpack 打包的版本,也就是后缀包含 `bundle` 的 zip 文件。前台的 JavaScript 使用了 ES6 语法,IE 系列浏览器和一些较老的浏览器可能无法正常运行,Webpack 打包的版本使用 Babel 转换过代码,可以在 IE 和较老的浏览器上运行。 89 | 90 | ### 主题安装 91 | 92 | 把主题上传到 Typecho 的 `usr/themes/` 目录,然后解压,您也可以先解压在上传。 93 | 94 | 解压后需要保证 `themes` 目录下 有一个 `MWordStar` 目录。 95 | 96 | 登录 Typecho 的后台管理,进入 `控制台` -> `外观`,如果看到 **MWordStar** 就点击 `启用`。 97 | 98 | ### 代码高亮 99 | 100 | 代码高亮目前包含三套主题配色,分别是 Stack Overflow(浅色)、Github(深色)、Sunburst(高对比度)。主题支持 30 多种语言的代码高亮,详细的语言支持列表和说明可以查看 [使用说明](https://mwordstar.misterma.com/docs/doc13) 。 101 | 102 | ### 友情链接 103 | 104 | 友情链接分为 `全站友情链接`、`首页友情链接`、`内页友情链接`。`全站友情链接` 会在每个页面的侧边栏显示,`首页友情链接` 会在首页的侧边栏显示,`内页友情链接` 只会在 友情链接 的页面显示。 105 | 106 | 如需查看友情链接的设置说明可以访问:[使用说明](https://www.misterma.com/archives/819/) 。 107 | 108 | ### 文章头图 109 | 110 | 文章头图可以在 首页、文章页、侧边栏 显示,您可以根据需求在主题外观设置中设置。文章头图来源支持自动获取文章的第一张图片和手动输入图片 URL。 111 | 112 | ### 侧边栏 113 | 114 | 下面是目前可以显示在侧边栏的组件: 115 | 116 | * 博客信息 117 | * 搜索 118 | * 最新文章 119 | * 最新评论 120 | * 文章分类 121 | * 标签云 122 | * 日历归档 123 | * 按月份的文章归档 124 | * 登录入口和 RSS 125 | * 友情链接 126 | * 文章章节目录 127 | * 自定义HTML 128 | * 语言选择 129 | 130 | 侧边栏的每个组件您都可以选择开启或关闭,您还可以自定义侧边栏的组件排序顺序。 131 | 132 | ### 无障碍(Accessibility) 133 | 134 | 上网对于大多数人来说是一件再简单不过的事,但是对于一些身体有缺陷的残障人士来说却是一件非常困难的事。 135 | 136 | 目前国内的很多网站都只注重外观,忽略了残障人士的可访问性。但是想要做好网站的用户体验,[无障碍](https://www.misterma.com/archives/264/) 适配肯定是少不了的。 137 | 138 | 主题针对屏幕阅读器做了大量优化,并 在 [NVDA](http://www.nvda-project.org/) 和 [VoiceOver](https://www.apple.com/cn/accessibility/iphone/vision/) 这两款屏幕阅读器上做过测试,无论是 PC 还是移动设备都能完美朗读。主题能准确传达需要朗读的内容和信息,对于视障人群来说,使用标准的屏幕阅读器基本可以无障碍操作。 139 | 140 | 主题可完美支持键盘访问,颜色对比度也符合标准。 141 | 142 | 小提示:如果您是屏幕阅读器用户,为了您的浏览体验,不建议使用 IE 浏览器。 143 | 144 | ### Emoji 表情 145 | 146 | 主题评论区包含一个 Emoji 表情面板,您可以在后台启用或禁用。Emoji 表情面板包含 1466 个表情,这些表情都是按照分类动态加载的,您不用担心性能问题。 147 | 148 | Emoji 表情面板也进行了无障碍适配,可支持键盘访问和屏幕阅读器朗读。 149 | 150 | 下面是 Emoji 表情面板的截图: 151 | 152 | ![emoji面板截图](screenshot/emoji.jpeg) 153 | 154 | ### 统计页 155 | 156 | 主题包含一个统计页模板,您可以在后台创建页面,页面的自定义模板选择 `网站数据`,标题可以随便写,创建完成后就可以在顶部导航栏访问了。 157 | 158 | 统计页包含基本的数据统计、分类文章占比图、文章更新日历图、评论动态日历图、阅读量排名前 5 的文章、评论量排名前 5 的文章。 159 | 160 | 基本数据统计如下: 161 | 162 | ![MWordStar 基本统计截图](screenshot/statistics.jpeg) 163 | 164 | 分类占比统计图如下: 165 | 166 | ![MWordStar 分类统计图](screenshot/category-statistics.jpeg) 167 | 168 | 下面是评论动态日历图: 169 | 170 | ![MWordStar 评论动态日历图](screenshot/comment-calendar.jpeg) 171 | 172 | 文章动态日历图和评论动态的日历图是差不多的,屏幕尺寸不同显示的月份数量也不同。 173 | 174 | 下面是文章评论排名表格: 175 | 176 | ![MWordStar 文章评论排名表格](screenshot/comment-statistics.jpeg) 177 | 178 | 文章阅读量排名表格和评论量排名的表格也是差不多的。 179 | 180 | 统计页面效果可以参考 [https://www.misterma.com/data.html](https://www.misterma.com/data.html) ,也可以直接访问 MWordStar 的静态演示站。 181 | 182 | ### 兼容性 183 | 184 | 主题使用了少量的 CSS3,浏览器需要达到 IE10 才能完美兼容,IE8 和 9 也能使用,但是有些页面的显示 例如代码高亮和时间线显示可能会出现稍微偏移的情况。 185 | 186 | ### 插件适配 187 | 188 | 因为本人很少使用插件,所以目前适配的插件比较少。 189 | 190 | 下面是已适配的插件: 191 | 192 | * [Sticky](https://plugins.typecho.me/plugins/sticky.html) 文章置顶插件 193 | 194 | 已适配的插件不需要到 PHP 文件中添加插件代码,没有适配的插件可能需要按照插件说明到 PHP 文件中添加相应的插件代码。 195 | 196 | ## 其它 197 | 198 | 主题 Github:[https://github.com/changbin1997/MWordStar](https://github.com/changbin1997/MWordStar) 199 | 200 | 主题使用 [MIT License](https://github.com/changbin1997/MWordStar/blob/master/LICENSE) 开源。 201 | 202 | ## 打赏支持 203 | 204 | 如果感觉主题用着还可以的话,也可以扫描下方的二维码打赏,金额随意: 205 | 206 | ![支付宝和微信的收款码](screenshot/qr-code.jpeg) 207 | 208 | 非常感谢 ❤️ 209 | 210 | 下面是 [MWordStar](https://github.com/changbin1997/MWordStar) 和 [Facile](https://github.com/changbin1997/Facile) 两个主题的打赏记录: 211 | 212 | | 打赏者 | 金额(人民币) | 时间 | 213 | | ------ | -------------- | ------------------- | 214 | | *伟 | 1.00 | 2022 年 8 月 12 日 | 215 | | S*r | 1.00 | 2022 年 11 月 17 日 | 216 | | *玥 | 10.00 | 2022 年 11 月 27 日 | 217 | | 0*7 | 1.00 | 2022 年 12 月 17 日 | 218 | | *U | 20.00 | 2023 年 1 月 18 日 | 219 | | *义 | 16.80 | 2023 年 3 月 29 日 | 220 | | Y*a | 10.00 | 2023 年 4 月 4 日 | 221 | | *行 | 8.88 | 2023 年 5 月 8 日 | 222 | | *华 | 8.88 | 2024 年 10 月 11 日 | 223 | | *王 | 6.66 | 2024 年 12 月 26 日 | 224 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | options->language); 6 | $this->need('components/header.php'); 7 | ?> 8 | 9 |
10 |
11 | options->breadcrumb == 'on'): ?> 12 | 20 | 21 |
22 |
23 |
24 | 35 | have()): ?> 36 | need('components/post-list.php'); ?> 37 | 38 |
39 | 40 |

41 |
    42 |
  1. 43 |
  2. 44 |
  3. 45 |
46 |
47 | 48 |
49 | 52 |
53 | need('components/sidebar.php'); ?> 54 |
55 |
56 |
57 | need('components/footer.php'); ?> -------------------------------------------------------------------------------- /assets/css/dark-color.scss: -------------------------------------------------------------------------------- 1 | $body-bg-color: #121212; 2 | $dark-bg-color: #1E1E1E; 3 | $dark-bg-color2: #2D2D2D; 4 | $dark-text-color: rgba(255, 255, 255, 0.87); 5 | $dark-text-color2: rgba(255, 255, 255, 0.6); 6 | $dark-text-color3: rgba(255, 255, 255, 0.38); 7 | $dark-border-color: rgba(255, 255, 255, 0.2); 8 | $dark-border-color2: rgba(255, 255, 255, 0.1); 9 | 10 | // 普通按钮配色 11 | @mixin btn-primary { 12 | color: #fff; 13 | background-color: #007bff; 14 | border-color: #007bff; 15 | &:hover { 16 | color: #fff; 17 | background-color: #0069d9; 18 | border-color: #0062cc; 19 | } 20 | &:focus { 21 | color: #fff; 22 | background-color: #0069d9; 23 | border-color: #0062cc; 24 | box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); 25 | } 26 | &:disabled { 27 | color: #fff; 28 | background-color: #007bff; 29 | border-color: #007bff; 30 | } 31 | } 32 | 33 | // 透明按钮配色 34 | @mixin btn-outline-light { 35 | color: #f8f9fa; 36 | border-color: #f8f9fa; 37 | &:hover { 38 | color: #212529; 39 | background-color: #f8f9fa; 40 | border-color: #f8f9fa; 41 | } 42 | &:focus { 43 | box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); 44 | } 45 | &:disabled { 46 | color: #f8f9fa; 47 | background-color: transparent; 48 | } 49 | } 50 | 51 | $text-primary: #007bff; 52 | 53 | // 链接配色 54 | @mixin dark-link { 55 | color: $dark-text-color !important; 56 | &:hover { 57 | color: $dark-text-color2 !important; 58 | } 59 | } 60 | 61 | // 文章内容配色 62 | @mixin post-content { 63 | // 文章内容 64 | p { 65 | color: $dark-text-color !important; 66 | } 67 | h1,h2,h3,h4,h5,h6 { 68 | color: $dark-text-color; 69 | } 70 | li { 71 | color: $dark-text-color; 72 | } 73 | p > code,td code,li code,h1 code,h2 code,h3 code,h4 code,th code { 74 | background-color: #000000 !important; 75 | color: $dark-text-color !important; 76 | } 77 | blockquote { 78 | border-color: $dark-text-color2; 79 | color: $dark-text-color2; 80 | } 81 | table { 82 | border-color: #495057; 83 | td,th { 84 | color: $dark-text-color; 85 | border-color: #495057; 86 | } 87 | tbody tr:nth-child(odd) { 88 | background-color: $dark-bg-color2; 89 | } 90 | tbody tr:hover { 91 | background-color: $dark-bg-color2; 92 | } 93 | } 94 | hr { 95 | background-color: $dark-text-color2; 96 | color: $dark-text-color2; 97 | } 98 | pre { 99 | code { 100 | &::-webkit-scrollbar { 101 | background: $dark-bg-color2; 102 | } 103 | 104 | &::-webkit-scrollbar-thumb { 105 | background: $dark-text-color3; 106 | } 107 | } 108 | } 109 | } 110 | 111 | @mixin dark-color { 112 | background-color: $body-bg-color; 113 | 114 | // 默认边框颜色 115 | .border,.border-top,.border-bottom,.border-left,.border-right { 116 | border-color: $dark-border-color !important; 117 | } 118 | 119 | // 区块默认配色 120 | .mwordstar-block { 121 | border-color: $dark-border-color2 !important; 122 | background-color: $dark-bg-color; 123 | } 124 | 125 | // 顶部导航区 126 | header .navbar { 127 | background-color: #1F1F1F; 128 | border-bottom: 0.5px solid $dark-border-color2; 129 | .navbar-brand { 130 | color: #fff; 131 | } 132 | .navbar-brand:hover,.navbar-brand:focus { 133 | color: #fff; 134 | } 135 | .navbar-nav .nav-link { 136 | color: rgba(255, 255, 255, 0.5); 137 | } 138 | .navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus { 139 | color: rgba(255, 255, 255, 0.75); 140 | } 141 | .navbar-nav .nav-link.disabled { 142 | color: rgba(255, 255, 255, 0.25); 143 | } 144 | .navbar-nav .show > .nav-link, 145 | .navbar-nav .active > .nav-link, 146 | .navbar-nav .nav-link.show, 147 | .navbar-nav .nav-link.active { 148 | color: #fff; 149 | } 150 | .navbar-toggler { 151 | color: rgba(255, 255, 255, 0.5); 152 | border-color: rgba(255, 255, 255, 0.1); 153 | } 154 | .navbar-toggler-icon { 155 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 156 | } 157 | .navbar-text { 158 | color: rgba(255, 255, 255, 0.5); 159 | } 160 | .navbar-text a { 161 | color: #fff; 162 | } 163 | .navbar-text a:hover,.navbar-text a:focus { 164 | color: #fff; 165 | } 166 | 167 | // 搜索区域 168 | .search-form { 169 | input { 170 | background-color: $body-bg-color; 171 | border: none; 172 | color: $dark-text-color; 173 | } 174 | button { 175 | background-color: rgba(255, 255, 255, 0.08); 176 | color: $dark-text-color; 177 | border: none; 178 | } 179 | } 180 | 181 | .dropdown-menu { 182 | background: $dark-bg-color2; 183 | a { 184 | color: $dark-text-color; 185 | } 186 | } 187 | } 188 | 189 | // 首页没有文章时的提示信息配色 190 | .home .no-post-message { 191 | .post-title { 192 | color: $dark-text-color; 193 | } 194 | } 195 | 196 | // 文章列表配色 197 | .article-list .post,.archives-list .archives .post { 198 | background-color: $dark-bg-color; 199 | border-color: $dark-border-color2; 200 | // 标题 201 | .entry-title a { 202 | color: $dark-text-color !important; 203 | } 204 | // 摘要内容 205 | .entry-summary p { 206 | color: $dark-text-color; 207 | } 208 | // 全文显示的内容 209 | .post-content { 210 | @include post-content; 211 | } 212 | // 文章信息 213 | .article-info { 214 | i,span { 215 | color: $dark-text-color2; 216 | } 217 | a { 218 | @include dark-link; 219 | } 220 | } 221 | } 222 | 223 | // 分页导航区配色 224 | .pagination-nav ul,.post-pagination ol { 225 | li a { 226 | color: $dark-text-color; 227 | background-color: $dark-bg-color; 228 | border: none; 229 | } 230 | li:not(.active) a:hover { 231 | background-color: $dark-bg-color2; 232 | } 233 | } 234 | 235 | // 侧边栏配色 236 | .sidebar { 237 | // 通用列表链接、最新评论链接、博客信息区域链接、日历链接配色 238 | section ul > li > a,.latest-comment a,.user-name,.calendar a { 239 | @include dark-link; 240 | } 241 | // 基本配色 242 | section { 243 | h4 { 244 | color: $dark-text-color; 245 | border-color: $dark-text-color2; 246 | } 247 | .message { 248 | color: $dark-text-color; 249 | } 250 | } 251 | // 博客信息 252 | .personal-information { 253 | .introduction { 254 | color: $dark-text-color; 255 | } 256 | .info { 257 | color: $dark-text-color; 258 | } 259 | } 260 | // 日历配色 261 | .calendar table { 262 | border-color: #495057; 263 | th,td { 264 | color: $dark-text-color; 265 | border-color: #495057; 266 | } 267 | .active { 268 | background-color: #353535; 269 | } 270 | } 271 | // 评论配色 272 | .latest-comment { 273 | .comment-content { 274 | color: $dark-text-color; 275 | } 276 | } 277 | // 标签云配色 278 | .tag-cloud a { 279 | border: 1px solid $dark-text-color; 280 | color: $dark-text-color; 281 | &:hover { 282 | background-color: $dark-text-color; 283 | color: $dark-bg-color; 284 | } 285 | &:focus { 286 | background-color: $dark-text-color; 287 | color: $dark-bg-color; 288 | } 289 | } 290 | // 列表徽章配色 291 | li .badge { 292 | background-color: $dark-text-color2; 293 | } 294 | // 搜索配色 295 | .search { 296 | input { 297 | background-color: $body-bg-color; 298 | color: $dark-text-color; 299 | border-color: $text-primary; 300 | } 301 | button { 302 | @include btn-primary; 303 | } 304 | } 305 | // 自定义HTML的默认文字配色 306 | .customize-html { 307 | color: $dark-text-color; 308 | } 309 | // 语言切换组件的文字配色 310 | .language-select { 311 | label { 312 | color: $dark-text-color; 313 | } 314 | } 315 | } 316 | 317 | // 面包屑导航配色 318 | .breadcrumb-nav { 319 | .breadcrumb-item { 320 | color: $dark-text-color; 321 | } 322 | } 323 | 324 | // 文章页配色 325 | .content-area { 326 | // 标题 327 | .entry-title a { 328 | color: $dark-text-color !important; 329 | } 330 | // 文章信息区域 331 | .article-info .info { 332 | span,i { 333 | color: $dark-text-color; 334 | } 335 | a { 336 | @include dark-link; 337 | } 338 | } 339 | // 文章失效警示信息 340 | .warning-info { 341 | background-color: $dark-bg-color2; 342 | color: $dark-text-color; 343 | } 344 | // 文章内容区域 345 | .post-content { 346 | @include post-content; 347 | .load-img { 348 | background-color: #373737; 349 | } 350 | } 351 | // 修改时间和版权信息 352 | #copyright-info span { 353 | color: $dark-text-color2; 354 | } 355 | // 分享和点赞区域 356 | .agree-and-share { 357 | button { 358 | @include btn-outline-light; 359 | } 360 | } 361 | // 上一篇文章和下一篇文章的导航区域 362 | .post-navigation { 363 | div { 364 | color: $dark-text-color; 365 | } 366 | } 367 | // 文章二维码区域 368 | #qr-link p { 369 | color: $dark-text-color; 370 | } 371 | } 372 | 373 | // 评论区配色 374 | #comments { 375 | h2 { 376 | color: $dark-text-color; 377 | } 378 | // 发表评论区 379 | #comment-form { 380 | label { 381 | color: $dark-text-color; 382 | } 383 | input,textarea { 384 | background-color: $body-bg-color; 385 | color: $dark-text-color; 386 | } 387 | // 打开表情面板按钮 388 | #show-emoji-btn { 389 | @include btn-outline-light; 390 | } 391 | // 表情面板 392 | #emoji-panel { 393 | background-color: $dark-bg-color2; 394 | // 表情选择区域 395 | #emoji-classification { 396 | button[aria-checked="true"] { 397 | background-color: $text-primary; 398 | } 399 | } 400 | #emoji-title { 401 | color: $dark-text-color; 402 | } 403 | } 404 | // 提交评论按钮 405 | .submit { 406 | @include btn-primary; 407 | } 408 | // 已登录的评论者信息 409 | .comment-user { 410 | color: $dark-text-color; 411 | } 412 | } 413 | // 评论列表区 414 | ol .comment-body { 415 | border-color: $dark-border-color !important; 416 | } 417 | .comment-box { 418 | // 评论者昵称 419 | .comment-info { 420 | .author { 421 | color: $dark-text-color; 422 | } 423 | .comment-time { 424 | color: $dark-text-color2 !important; 425 | } 426 | } 427 | // 回复链接 428 | .comment-reply a { 429 | border: 1px solid $dark-text-color; 430 | color: $dark-text-color; 431 | background: none !important; 432 | &:hover { 433 | background-color: $dark-text-color !important; 434 | color: $dark-bg-color; 435 | } 436 | } 437 | // 评论内容区的配色 438 | .comment-content { 439 | @include post-content; 440 | } 441 | // 回复表单配色 442 | .respond { 443 | background-color: $dark-bg-color2 !important; 444 | } 445 | } 446 | // 评论分页导航区 447 | .pagination-nav .pagination a { 448 | border: 1px solid $dark-border-color; 449 | } 450 | } 451 | 452 | // 页脚的功能按钮配色 453 | #footer-btn-box button { 454 | @include btn-primary; 455 | } 456 | 457 | // 移动设备专用目录 458 | #directory-mobile { 459 | background: $dark-bg-color2; 460 | .title-bar { 461 | h5,button { 462 | color: $dark-text-color; 463 | } 464 | } 465 | .directory-list a { 466 | @include dark-link; 467 | } 468 | } 469 | 470 | // 底部信息 471 | footer .container { 472 | span { 473 | color: $dark-text-color2; 474 | } 475 | a { 476 | color: $text-primary; 477 | } 478 | } 479 | 480 | // 分类、标签、搜索、归档页的配色 481 | .archives-list { 482 | .page-header { 483 | h1,span { 484 | color: $dark-text-color; 485 | } 486 | } 487 | .no-post { 488 | h4,li,p { 489 | color: $dark-text-color; 490 | } 491 | } 492 | } 493 | 494 | // 友情链接页面配色 495 | .link-page .link-box { 496 | background-color: #121212; 497 | .link { 498 | background-color: $dark-bg-color; 499 | } 500 | } 501 | 502 | // 独立归档页配色 503 | .archives .archives-item h2 { 504 | background-color: $dark-bg-color; 505 | } 506 | 507 | // 数据统计页配色 508 | .data-page { 509 | .statistics-card { 510 | background-color: $dark-bg-color2; 511 | } 512 | } 513 | 514 | // 404页 515 | .container-404 { 516 | h1, h2, h5 { 517 | color: $dark-text-color; 518 | } 519 | .search-btn, .to-home-link { 520 | @include btn-primary; 521 | } 522 | } 523 | } 524 | 525 | .dark-color { 526 | @include dark-color; 527 | } -------------------------------------------------------------------------------- /assets/css/github-dark.min.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! 2 | Theme: GitHub Dark 3 | Description: Dark theme as seen on github.com 4 | Author: github.com 5 | Maintainer: @Hirse 6 | Updated: 2021-05-15 7 | 8 | Outdated base version: https://github.com/primer/github-syntax-dark 9 | Current colors taken from GitHub's CSS 10 | */.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c} -------------------------------------------------------------------------------- /assets/css/icon.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src: url('../fonts/icomoon.eot?gkm6ku'); 4 | src: url('../fonts/icomoon.eot?gkm6ku#iefix') format('embedded-opentype'), 5 | url('../fonts/icomoon.ttf?gkm6ku') format('truetype'), 6 | url('../fonts/icomoon.woff?gkm6ku') format('woff'), 7 | url('../fonts/icomoon.svg?gkm6ku#icomoon') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | font-display: block; 11 | } 12 | 13 | [class^="icon-"], [class*=" icon-"] { 14 | /* use !important to prevent issues with browser extensions that change fonts */ 15 | font-family: 'icomoon' !important; 16 | speak: never; 17 | font-style: normal; 18 | font-weight: normal; 19 | font-variant: normal; 20 | text-transform: none; 21 | line-height: 1; 22 | 23 | /* Better Font Rendering =========== */ 24 | -webkit-font-smoothing: antialiased; 25 | -moz-osx-font-smoothing: grayscale; 26 | } 27 | 28 | .icon-qzone-logo:before { 29 | content: "\e900"; 30 | } 31 | .icon-languages:before { 32 | content: "\e901"; 33 | } 34 | .icon-list-ol:before { 35 | content: "\e902"; 36 | } 37 | .icon-thumbs-up:before { 38 | content: "\e903"; 39 | } 40 | .icon-sun:before { 41 | content: "\e904"; 42 | } 43 | .icon-moon:before { 44 | content: "\e905"; 45 | } 46 | .icon-coffee:before { 47 | content: "\e906"; 48 | } 49 | .icon-chevron-left:before { 50 | content: "\e907"; 51 | } 52 | .icon-chevron-right:before { 53 | content: "\e908"; 54 | } 55 | .icon-pencil:before { 56 | content: "\e909"; 57 | } 58 | .icon-copy:before { 59 | content: "\e92c"; 60 | } 61 | .icon-folder-open:before { 62 | content: "\e930"; 63 | } 64 | .icon-price-tags:before { 65 | content: "\e936"; 66 | } 67 | .icon-calendar:before { 68 | content: "\e953"; 69 | } 70 | .icon-undo:before { 71 | content: "\e965"; 72 | } 73 | .icon-redo:before { 74 | content: "\e966"; 75 | } 76 | .icon-bubbles2:before { 77 | content: "\e96d"; 78 | } 79 | .icon-user:before { 80 | content: "\e971"; 81 | } 82 | .icon-search:before { 83 | content: "\e986"; 84 | } 85 | .icon-zoom-in:before { 86 | content: "\e987"; 87 | } 88 | .icon-zoom-out:before { 89 | content: "\e988"; 90 | } 91 | .icon-sphere:before { 92 | content: "\e9c9"; 93 | } 94 | .icon-link:before { 95 | content: "\e9cb"; 96 | } 97 | .icon-eye:before { 98 | content: "\e9ce"; 99 | } 100 | .icon-cancel-circle:before { 101 | content: "\ea0d"; 102 | } 103 | .icon-arrow-up:before { 104 | content: "\ea32"; 105 | } 106 | .icon-share2:before { 107 | content: "\ea82"; 108 | } 109 | .icon-twitter:before { 110 | content: "\ea96"; 111 | } 112 | .icon-sina-weibo:before { 113 | content: "\ea9a"; 114 | } 115 | -------------------------------------------------------------------------------- /assets/css/info-color.scss: -------------------------------------------------------------------------------- 1 | // 常用按钮配色 2 | @mixin btn-info { 3 | color: #fff; 4 | background-color: #17a2b8; 5 | border-color: #17a2b8; 6 | &:hover { 7 | color: #fff; 8 | background-color: #138496; 9 | border-color: #117a8b; 10 | } 11 | &:focus { 12 | color: #fff; 13 | background-color: #138496; 14 | border-color: #117a8b; 15 | box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5); 16 | } 17 | &:disabled { 18 | color: #fff; 19 | background-color: #17a2b8; 20 | border-color: #17a2b8; 21 | } 22 | } 23 | // 常用按钮透明版 24 | @mixin btn-outline-info { 25 | color: #17a2b8; 26 | border-color: #17a2b8; 27 | &:hover { 28 | color: #fff; 29 | background-color: #17a2b8; 30 | border-color: #17a2b8; 31 | } 32 | &:focus { 33 | box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); 34 | } 35 | &:disabled { 36 | color: #17a2b8; 37 | background-color: transparent; 38 | } 39 | } 40 | // 链接配色 41 | @mixin link-info { 42 | color: #17a2b8 !important; 43 | &:hover { 44 | color: #0f6674 !important; 45 | } 46 | } 47 | // 文字配色 48 | $text-info: #17a2b8; 49 | 50 | .info-color { 51 | // 顶部导航栏配色 52 | header .navbar { 53 | background-color: $text-info !important; 54 | .navbar-brand { 55 | color: #fff; 56 | } 57 | .navbar-brand:hover,.navbar-brand:focus { 58 | color: #fff; 59 | } 60 | .navbar-nav .nav-link { 61 | color: rgba(255, 255, 255, 0.5); 62 | } 63 | .navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus { 64 | color: rgba(255, 255, 255, 0.75); 65 | } 66 | .navbar-nav .nav-link.disabled { 67 | color: rgba(255, 255, 255, 0.25); 68 | } 69 | .navbar-nav .show > .nav-link, 70 | .navbar-nav .active > .nav-link, 71 | .navbar-nav .nav-link.show, 72 | .navbar-nav .nav-link.active { 73 | color: #fff; 74 | } 75 | .navbar-toggler { 76 | color: rgba(255, 255, 255, 0.5); 77 | border-color: rgba(255, 255, 255, 0.1); 78 | } 79 | .navbar-toggler-icon { 80 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 81 | } 82 | .navbar-text { 83 | color: rgba(255, 255, 255, 0.5); 84 | } 85 | .navbar-text a { 86 | color: #fff; 87 | } 88 | .navbar-text a:hover,.navbar-text a:focus { 89 | color: #fff; 90 | } 91 | } 92 | 93 | // 文章列表配色 94 | .article-list .post, .archives-list .post { 95 | .article-info { 96 | i,span { 97 | color: $text-info; 98 | } 99 | a { 100 | @include link-info; 101 | } 102 | } 103 | } 104 | 105 | // 分页导航区配色 106 | .pagination-nav ul,.post-pagination ol { 107 | li a { 108 | color: $text-info; 109 | } 110 | .active a { 111 | color: #ffffff; 112 | background-color: $text-info; 113 | border: none; 114 | } 115 | } 116 | 117 | // 侧边栏配色 118 | .sidebar { 119 | // 通用列表链接、最新评论链接、博客信息区域链接、日历链接配色 120 | section ul > li > a,.latest-comment a,.user-name,.calendar a { 121 | @include link-info; 122 | } 123 | // 列表的徽章配色 124 | section ul li .badge { 125 | background-color: $text-info; 126 | color: #ffffff; 127 | } 128 | // 标签云配色 129 | .tag-cloud a { 130 | border: 1px solid $text-info; 131 | color: $text-info; 132 | &:hover { 133 | background-color: $text-info; 134 | color: #ffffff; 135 | } 136 | &:focus { 137 | background-color: $text-info; 138 | color: #ffffff; 139 | } 140 | } 141 | // 搜索组件配色 142 | .search { 143 | button { 144 | @include btn-info; 145 | } 146 | } 147 | } 148 | 149 | // 面包屑导航配色 150 | .breadcrumb-nav a { 151 | @include link-info; 152 | } 153 | 154 | // 文章页配色 155 | .content-area { 156 | // 文章信息区域 157 | .article-info .info { 158 | span,i { 159 | color: $text-info; 160 | } 161 | a { 162 | @include link-info; 163 | } 164 | } 165 | // 文章内容区域 166 | .post-content { 167 | // 链接 168 | a { 169 | @include link-info; 170 | } 171 | } 172 | // 分享和点赞区域 173 | .agree-and-share { 174 | button { 175 | @include btn-outline-info; 176 | } 177 | } 178 | // 上一篇文章和下一篇文章的导航区域 179 | .post-navigation a { 180 | @include link-info; 181 | } 182 | } 183 | 184 | // 评论区配色 185 | #comments { 186 | // 发表评论区 187 | #comment-form { 188 | // 打开表情面板按钮 189 | #show-emoji-btn { 190 | @include btn-outline-info; 191 | } 192 | // 表情面板 193 | #emoji-classification { 194 | button[aria-checked="true"] { 195 | background-color: $text-info; 196 | } 197 | } 198 | // 当前登录用户链接 199 | .comment-user a { 200 | @include link-info; 201 | } 202 | // 提交评论按钮 203 | .submit { 204 | @include btn-info; 205 | } 206 | } 207 | // 评论列表区 208 | .comment-box { 209 | // 评论者昵称 210 | .comment-info { 211 | .author a { 212 | @include link-info; 213 | } 214 | } 215 | // 回复链接 216 | .comment-reply a { 217 | border: 1px solid $text-info; 218 | color: $text-info; 219 | &:hover { 220 | background-color: $text-info; 221 | color: #ffffff; 222 | } 223 | } 224 | // 评论内容区的链接 225 | .comment-content a { 226 | @include link-info; 227 | } 228 | } 229 | } 230 | 231 | // 页脚的功能按钮 232 | #footer-btn-box button { 233 | color: $text-info; 234 | } 235 | 236 | // 独立页面 - 分类目录 237 | .category-page .category-list { 238 | .icon { 239 | color: $text-info; 240 | } 241 | } 242 | 243 | // 移动设备专用目录 244 | #directory-mobile .directory-list a { 245 | @include link-info; 246 | } 247 | 248 | // 数据统计页配色 249 | .data-page { 250 | .statistics-card { 251 | background-color: #B3D8FF; 252 | } 253 | } 254 | 255 | // 404页面配色 256 | .container-404 { 257 | .to-home-link, .search-btn { 258 | @include btn-info; 259 | } 260 | } 261 | } -------------------------------------------------------------------------------- /assets/css/light-color.scss: -------------------------------------------------------------------------------- 1 | // 常用按钮配色 2 | @mixin btn-secondary { 3 | color: #fff; 4 | background-color: #6c757d; 5 | border-color: #6c757d; 6 | &:hover { 7 | color: #fff; 8 | background-color: #5a6268; 9 | border-color: #545b62; 10 | } 11 | &:focus { 12 | color: #fff; 13 | background-color: #5a6268; 14 | border-color: #545b62; 15 | box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5); 16 | } 17 | &:disabled { 18 | color: #fff; 19 | background-color: #6c757d; 20 | border-color: #6c757d; 21 | } 22 | } 23 | // 常用按钮透明版 24 | @mixin btn-outline-secondary { 25 | color: #6c757d; 26 | border-color: #6c757d; 27 | &:hover { 28 | color: #fff; 29 | background-color: #6c757d; 30 | border-color: #6c757d; 31 | } 32 | &:focus { 33 | box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); 34 | } 35 | &:disabled { 36 | color: #6c757d; 37 | background-color: transparent; 38 | } 39 | } 40 | // 链接配色 41 | @mixin link-secondary { 42 | color: #6c757d !important; 43 | &:hover { 44 | color: #494f54 !important; 45 | } 46 | } 47 | // 文字配色 48 | $text-secondary: #6c757d; 49 | 50 | .light-color1 { 51 | // 顶部导航栏配色 52 | header .navbar { 53 | background-color: #343a40; 54 | .navbar-brand { 55 | color: #fff; 56 | } 57 | .navbar-brand:hover,.navbar-brand:focus { 58 | color: #fff; 59 | } 60 | .navbar-nav .nav-link { 61 | color: rgba(255, 255, 255, 0.5); 62 | } 63 | .navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus { 64 | color: rgba(255, 255, 255, 0.75); 65 | } 66 | .navbar-nav .nav-link.disabled { 67 | color: rgba(255, 255, 255, 0.25); 68 | } 69 | .navbar-nav .show > .nav-link, 70 | .navbar-nav .active > .nav-link, 71 | .navbar-nav .nav-link.show, 72 | .navbar-nav .nav-link.active { 73 | color: #fff; 74 | } 75 | .navbar-toggler { 76 | color: rgba(255, 255, 255, 0.5); 77 | border-color: rgba(255, 255, 255, 0.1); 78 | } 79 | .navbar-toggler-icon { 80 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 81 | } 82 | .navbar-text { 83 | color: rgba(255, 255, 255, 0.5); 84 | } 85 | .navbar-text a { 86 | color: #fff; 87 | } 88 | .navbar-text a:hover,.navbar-text a:focus { 89 | color: #fff; 90 | } 91 | } 92 | } 93 | 94 | .light-color2 { 95 | // 顶部导航栏配色 96 | header .navbar { 97 | background-color: #fff !important; 98 | .navbar-brand { 99 | color: rgba(0, 0, 0, 0.9); 100 | } 101 | .navbar-brand:hover,.navbar-brand:focus { 102 | color: rgba(0, 0, 0, 0.9); 103 | } 104 | .navbar-nav .nav-link { 105 | color: rgba(0, 0, 0, 0.5); 106 | } 107 | .navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus { 108 | color: rgba(0, 0, 0, 0.7); 109 | } 110 | .navbar-nav .nav-link.disabled { 111 | color: rgba(0, 0, 0, 0.3); 112 | } 113 | .navbar-nav .show > .nav-link, 114 | .navbar-nav .active > .nav-link, 115 | .navbar-nav .nav-link.show, 116 | .navbar-nav .nav-link.active { 117 | color: rgba(0, 0, 0, 0.9); 118 | } 119 | .navbar-toggler { 120 | color: rgba(0, 0, 0, 0.5); 121 | border-color: rgba(0, 0, 0, 0.1); 122 | } 123 | .navbar-toggler-icon { 124 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 125 | } 126 | .navbar-text { 127 | color: rgba(0, 0, 0, 0.5); 128 | } 129 | .navbar-text a { 130 | color: rgba(0, 0, 0, 0.9); 131 | } 132 | .navbar-text a:hover, .navbar-light .navbar-text a:focus { 133 | color: rgba(0, 0, 0, 0.9); 134 | } 135 | // 切换配色的按钮 136 | #change-color-btn { 137 | background-color: #E5E6EB; 138 | color: rgba(0, 0, 0, 0.5); 139 | } 140 | // 切换配色的提示配色 141 | #change-color-text { 142 | color: #212529; 143 | } 144 | } 145 | } 146 | 147 | .light-color1,.light-color2 { 148 | // 文章列表配色 149 | .article-list .post, .archives-list .post { 150 | .article-info { 151 | i,span { 152 | color: $text-secondary; 153 | } 154 | a { 155 | @include link-secondary; 156 | } 157 | } 158 | } 159 | 160 | // 分页导航区配色 161 | .pagination-nav ul,.post-pagination ol { 162 | li a { 163 | color: $text-secondary; 164 | } 165 | .active a { 166 | color: #ffffff; 167 | background-color: $text-secondary; 168 | border: none; 169 | } 170 | } 171 | 172 | // 侧边栏配色 173 | .sidebar { 174 | // 通用列表链接、最新评论链接、博客信息区域链接、日历链接配色 175 | section ul > li > a,.latest-comment a,.user-name,.calendar a { 176 | @include link-secondary; 177 | } 178 | // 列表的徽章配色 179 | section ul li .badge { 180 | background-color: $text-secondary; 181 | color: #ffffff; 182 | } 183 | // 标签云配色 184 | .tag-cloud a { 185 | border: 1px solid $text-secondary; 186 | color: $text-secondary; 187 | &:hover { 188 | background-color: $text-secondary; 189 | color: #ffffff; 190 | } 191 | &:focus { 192 | background-color: $text-secondary; 193 | color: #ffffff; 194 | } 195 | } 196 | // 搜索组件配色 197 | .search { 198 | button { 199 | @include btn-secondary; 200 | } 201 | } 202 | } 203 | 204 | // 面包屑导航配色 205 | .breadcrumb-nav a { 206 | @include link-secondary; 207 | } 208 | 209 | // 文章页配色 210 | .content-area { 211 | // 文章信息区域 212 | .article-info .info { 213 | span,i { 214 | color: $text-secondary; 215 | } 216 | a { 217 | @include link-secondary; 218 | } 219 | } 220 | // 文章内容区域 221 | .post-content { 222 | // 链接 223 | a { 224 | @include link-secondary; 225 | } 226 | } 227 | // 分享和点赞区域 228 | .agree-and-share { 229 | button { 230 | @include btn-outline-secondary; 231 | } 232 | } 233 | // 上一篇文章和下一篇文章的导航区域 234 | .post-navigation a { 235 | @include link-secondary; 236 | } 237 | } 238 | 239 | // 评论区配色 240 | #comments { 241 | // 发表评论区 242 | #comment-form { 243 | // 打开表情面板按钮 244 | #show-emoji-btn { 245 | @include btn-outline-secondary; 246 | } 247 | // 表情面板 248 | #emoji-classification { 249 | button[aria-checked="true"] { 250 | background-color: $text-secondary; 251 | } 252 | } 253 | // 当前登录用户链接 254 | .comment-user a { 255 | @include link-secondary; 256 | } 257 | // 提交评论按钮 258 | .submit { 259 | @include btn-secondary; 260 | } 261 | } 262 | // 评论列表区 263 | .comment-box { 264 | // 评论者昵称 265 | .comment-info { 266 | .author a { 267 | @include link-secondary; 268 | } 269 | } 270 | // 回复链接 271 | .comment-reply a { 272 | border: 1px solid $text-secondary; 273 | color: $text-secondary; 274 | &:hover { 275 | background-color: $text-secondary; 276 | color: #ffffff; 277 | } 278 | } 279 | // 评论内容区的链接 280 | .comment-content a { 281 | @include link-secondary; 282 | } 283 | } 284 | } 285 | 286 | // 页脚的功能按钮 287 | #footer-btn-box button { 288 | color: $text-secondary; 289 | } 290 | 291 | // 独立页面 - 分类目录 292 | .category-page .category-list { 293 | .icon { 294 | color: #6C757D; 295 | } 296 | } 297 | 298 | // 移动设备专用目录 299 | #directory-mobile .directory-list a { 300 | @include link-secondary; 301 | } 302 | 303 | // 数据统计页配色 304 | .data-page { 305 | .statistics-card { 306 | background-color: #B3D8FF; 307 | } 308 | } 309 | 310 | // 404页面配色 311 | .container-404 { 312 | .to-home-link, .search-btn { 313 | @include btn-secondary; 314 | } 315 | } 316 | } -------------------------------------------------------------------------------- /assets/css/primary-color.scss: -------------------------------------------------------------------------------- 1 | // 常用按钮配色 2 | @mixin btn-primary { 3 | color: #fff; 4 | background-color: #007bff; 5 | border-color: #007bff; 6 | &:hover { 7 | color: #fff; 8 | background-color: #0069d9; 9 | border-color: #0062cc; 10 | } 11 | &:focus { 12 | color: #fff; 13 | background-color: #0069d9; 14 | border-color: #0062cc; 15 | box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); 16 | } 17 | &:disabled { 18 | color: #fff; 19 | background-color: #007bff; 20 | border-color: #007bff; 21 | } 22 | } 23 | // 常用按钮透明版 24 | @mixin btn-outline-primary { 25 | color: #007bff; 26 | border-color: #007bff; 27 | &:hover { 28 | color: #fff; 29 | background-color: #007bff; 30 | border-color: #007bff; 31 | } 32 | &:focus { 33 | box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); 34 | } 35 | &:disabled { 36 | color: #007bff; 37 | background-color: transparent; 38 | } 39 | } 40 | // 链接配色 41 | @mixin link-primary { 42 | color: #007bff !important; 43 | &:hover { 44 | color: #0056b3 !important; 45 | } 46 | } 47 | // 文字配色 48 | $text-primary: #007bff; 49 | 50 | .primary-color { 51 | // 顶部导航栏配色 52 | header .navbar { 53 | background-color: $text-primary !important; 54 | .navbar-brand { 55 | color: #fff; 56 | } 57 | .navbar-brand:hover,.navbar-brand:focus { 58 | color: #fff; 59 | } 60 | .navbar-nav .nav-link { 61 | color: rgba(255, 255, 255, 0.5); 62 | } 63 | .navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus { 64 | color: rgba(255, 255, 255, 0.75); 65 | } 66 | .navbar-nav .nav-link.disabled { 67 | color: rgba(255, 255, 255, 0.25); 68 | } 69 | .navbar-nav .show > .nav-link, 70 | .navbar-nav .active > .nav-link, 71 | .navbar-nav .nav-link.show, 72 | .navbar-nav .nav-link.active { 73 | color: #fff; 74 | } 75 | .navbar-toggler { 76 | color: rgba(255, 255, 255, 0.5); 77 | border-color: rgba(255, 255, 255, 0.1); 78 | } 79 | .navbar-toggler-icon { 80 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 81 | } 82 | .navbar-text { 83 | color: rgba(255, 255, 255, 0.5); 84 | } 85 | .navbar-text a { 86 | color: #fff; 87 | } 88 | .navbar-text a:hover,.navbar-text a:focus { 89 | color: #fff; 90 | } 91 | } 92 | 93 | // 文章列表配色 94 | .article-list .post, .archives-list .post { 95 | .article-info { 96 | i,span { 97 | color: $text-primary; 98 | } 99 | a { 100 | @include link-primary; 101 | } 102 | } 103 | } 104 | 105 | // 分页导航区配色 106 | .pagination-nav ul,.post-pagination ol { 107 | li a { 108 | color: $text-primary; 109 | } 110 | .active a { 111 | color: #ffffff; 112 | background-color: $text-primary; 113 | border: none; 114 | } 115 | } 116 | 117 | // 侧边栏配色 118 | .sidebar { 119 | // 通用列表链接、最新评论链接、博客信息区域链接、日历链接配色 120 | section ul > li > a,.latest-comment a,.user-name,.calendar a { 121 | @include link-primary; 122 | } 123 | // 列表的徽章配色 124 | section ul li .badge { 125 | background-color: $text-primary; 126 | color: #ffffff; 127 | } 128 | // 标签云配色 129 | .tag-cloud a { 130 | border: 1px solid $text-primary; 131 | color: $text-primary; 132 | &:hover { 133 | background-color: $text-primary; 134 | color: #ffffff; 135 | } 136 | &:focus { 137 | background-color: $text-primary; 138 | color: #ffffff; 139 | } 140 | } 141 | // 搜索组件配色 142 | .search { 143 | button { 144 | @include btn-primary; 145 | } 146 | } 147 | } 148 | 149 | // 面包屑导航配色 150 | .breadcrumb-nav a { 151 | @include link-primary; 152 | } 153 | 154 | // 文章页配色 155 | .content-area { 156 | // 文章信息区域 157 | .article-info .info { 158 | span,i { 159 | color: $text-primary; 160 | } 161 | a { 162 | @include link-primary; 163 | } 164 | } 165 | // 文章内容区域 166 | .post-content { 167 | // 链接 168 | a { 169 | @include link-primary; 170 | } 171 | } 172 | // 分享和点赞区域 173 | .agree-and-share { 174 | button { 175 | @include btn-outline-primary; 176 | } 177 | } 178 | // 上一篇文章和下一篇文章的导航区域 179 | .post-navigation a { 180 | @include link-primary; 181 | } 182 | } 183 | 184 | // 评论区配色 185 | #comments { 186 | // 发表评论区 187 | #comment-form { 188 | // 打开表情面板按钮 189 | #show-emoji-btn { 190 | @include btn-outline-primary; 191 | } 192 | // 表情面板 193 | #emoji-classification { 194 | button[aria-checked="true"] { 195 | background-color: $text-primary; 196 | } 197 | } 198 | // 当前登录用户链接 199 | .comment-user a { 200 | @include link-primary; 201 | } 202 | // 提交评论按钮 203 | .submit { 204 | @include btn-primary; 205 | } 206 | } 207 | // 评论列表区 208 | .comment-box { 209 | // 评论者昵称 210 | .comment-info { 211 | .author a { 212 | @include link-primary; 213 | } 214 | } 215 | // 回复链接 216 | .comment-reply a { 217 | border: 1px solid $text-primary; 218 | color: $text-primary; 219 | &:hover { 220 | background-color: $text-primary; 221 | color: #ffffff; 222 | } 223 | } 224 | // 评论内容区的链接 225 | .comment-content a { 226 | @include link-primary; 227 | } 228 | } 229 | } 230 | 231 | // 页脚的功能按钮 232 | #footer-btn-box button { 233 | color: $text-primary; 234 | } 235 | 236 | // 独立页面 - 分类目录 237 | .category-page .category-list { 238 | .icon { 239 | color: $text-primary; 240 | } 241 | } 242 | 243 | // 移动设备专用目录 244 | #directory-mobile .directory-list a { 245 | @include link-primary; 246 | } 247 | 248 | // 数据统计页配色 249 | .data-page { 250 | .statistics-card { 251 | background-color: #B3D8FF; 252 | } 253 | } 254 | 255 | // 404页面配色 256 | .container-404 { 257 | .to-home-link, .search-btn { 258 | @include btn-primary; 259 | } 260 | } 261 | } -------------------------------------------------------------------------------- /assets/css/stackoverflow-light.min.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! 2 | Theme: StackOverflow Light 3 | Description: Light theme as used on stackoverflow.com 4 | Author: stackoverflow.com 5 | Maintainer: @Hirse 6 | Website: https://github.com/StackExchange/Stacks 7 | License: MIT 8 | Updated: 2021-05-15 9 | 10 | Updated for @stackoverflow/stacks v0.64.0 11 | Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less 12 | Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less 13 | */.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /assets/css/success-color.scss: -------------------------------------------------------------------------------- 1 | // 常用按钮配色 2 | @mixin btn-success { 3 | color: #fff; 4 | background-color: #28a745; 5 | border-color: #28a745; 6 | &:hover { 7 | color: #fff; 8 | background-color: #218838; 9 | border-color: #1e7e34; 10 | } 11 | &:focus { 12 | color: #fff; 13 | background-color: #218838; 14 | border-color: #1e7e34; 15 | box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5); 16 | } 17 | &:disabled { 18 | color: #fff; 19 | background-color: #28a745; 20 | border-color: #28a745; 21 | } 22 | } 23 | // 常用按钮透明版 24 | @mixin btn-outline-success { 25 | color: #28a745; 26 | border-color: #28a745; 27 | &:hover { 28 | color: #fff; 29 | background-color: #28a745; 30 | border-color: #28a745; 31 | } 32 | &:focus { 33 | box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); 34 | } 35 | &:disabled { 36 | color: #28a745; 37 | background-color: transparent; 38 | } 39 | } 40 | // 链接配色 41 | @mixin link-success { 42 | color: #28a745 !important; 43 | &:hover { 44 | color: #19692c !important; 45 | } 46 | } 47 | // 文字配色 48 | $text-success: #28a745; 49 | 50 | .success-color { 51 | // 顶部导航栏配色 52 | header .navbar { 53 | background-color: $text-success !important; 54 | .navbar-brand { 55 | color: #fff; 56 | } 57 | .navbar-brand:hover,.navbar-brand:focus { 58 | color: #fff; 59 | } 60 | .navbar-nav .nav-link { 61 | color: rgba(255, 255, 255, 0.5); 62 | } 63 | .navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus { 64 | color: rgba(255, 255, 255, 0.75); 65 | } 66 | .navbar-nav .nav-link.disabled { 67 | color: rgba(255, 255, 255, 0.25); 68 | } 69 | .navbar-nav .show > .nav-link, 70 | .navbar-nav .active > .nav-link, 71 | .navbar-nav .nav-link.show, 72 | .navbar-nav .nav-link.active { 73 | color: #fff; 74 | } 75 | .navbar-toggler { 76 | color: rgba(255, 255, 255, 0.5); 77 | border-color: rgba(255, 255, 255, 0.1); 78 | } 79 | .navbar-toggler-icon { 80 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 81 | } 82 | .navbar-text { 83 | color: rgba(255, 255, 255, 0.5); 84 | } 85 | .navbar-text a { 86 | color: #fff; 87 | } 88 | .navbar-text a:hover,.navbar-text a:focus { 89 | color: #fff; 90 | } 91 | } 92 | 93 | // 文章列表配色 94 | .article-list .post, .archives-list .post { 95 | .article-info { 96 | i,span { 97 | color: $text-success; 98 | } 99 | a { 100 | @include link-success; 101 | } 102 | } 103 | } 104 | 105 | // 分页导航区配色 106 | .pagination-nav ul,.post-pagination ol { 107 | li a { 108 | color: $text-success; 109 | } 110 | .active a { 111 | color: #ffffff; 112 | background-color: $text-success; 113 | border: none; 114 | } 115 | } 116 | 117 | // 侧边栏配色 118 | .sidebar { 119 | // 通用列表链接、最新评论链接、博客信息区域链接、日历链接配色 120 | section ul > li > a,.latest-comment a,.user-name,.calendar a { 121 | @include link-success; 122 | } 123 | // 列表的徽章配色 124 | section ul li .badge { 125 | background-color: $text-success; 126 | color: #ffffff; 127 | } 128 | // 标签云配色 129 | .tag-cloud a { 130 | border: 1px solid $text-success; 131 | color: $text-success; 132 | &:hover { 133 | background-color: $text-success; 134 | color: #ffffff; 135 | } 136 | &:focus { 137 | background-color: $text-success; 138 | color: #ffffff; 139 | } 140 | } 141 | // 搜索组件配色 142 | .search { 143 | button { 144 | @include btn-success; 145 | } 146 | } 147 | } 148 | 149 | // 面包屑导航配色 150 | .breadcrumb-nav a { 151 | @include link-success; 152 | } 153 | 154 | // 文章页配色 155 | .content-area { 156 | // 文章信息区域 157 | .article-info .info { 158 | span,i { 159 | color: $text-success; 160 | } 161 | a { 162 | @include link-success; 163 | } 164 | } 165 | // 文章内容区域 166 | .post-content { 167 | // 链接 168 | a { 169 | @include link-success; 170 | } 171 | } 172 | // 分享和点赞区域 173 | .agree-and-share { 174 | button { 175 | @include btn-outline-success; 176 | } 177 | } 178 | // 上一篇文章和下一篇文章的导航区域 179 | .post-navigation a { 180 | @include link-success; 181 | } 182 | } 183 | 184 | // 评论区配色 185 | #comments { 186 | // 发表评论区 187 | #comment-form { 188 | // 打开表情面板按钮 189 | #show-emoji-btn { 190 | @include btn-outline-success; 191 | } 192 | // 表情面板 193 | #emoji-classification { 194 | button[aria-checked="true"] { 195 | background-color: $text-success; 196 | } 197 | } 198 | // 当前登录用户链接 199 | .comment-user a { 200 | @include link-success; 201 | } 202 | // 提交评论按钮 203 | .submit { 204 | @include btn-success; 205 | } 206 | } 207 | // 评论列表区 208 | .comment-box { 209 | // 评论者昵称 210 | .comment-info { 211 | .author a { 212 | @include link-success; 213 | } 214 | } 215 | // 回复链接 216 | .comment-reply a { 217 | border: 1px solid $text-success; 218 | color: $text-success; 219 | &:hover { 220 | background-color: $text-success; 221 | color: #ffffff; 222 | } 223 | } 224 | // 评论内容区的链接 225 | .comment-content a { 226 | @include link-success; 227 | } 228 | } 229 | } 230 | 231 | // 页脚的功能按钮 232 | #footer-btn-box button { 233 | color: $text-success; 234 | } 235 | 236 | // 独立页面 - 分类目录 237 | .category-page .category-list { 238 | .icon { 239 | color: $text-success; 240 | } 241 | } 242 | 243 | // 移动设备专用目录 244 | #directory-mobile .directory-list a { 245 | @include link-success; 246 | } 247 | 248 | // 数据统计页配色 249 | .data-page { 250 | .statistics-card { 251 | background-color: #B3D8FF; 252 | } 253 | } 254 | 255 | // 404页面配色 256 | .container-404 { 257 | .to-home-link, .search-btn { 258 | @include btn-success; 259 | } 260 | } 261 | } -------------------------------------------------------------------------------- /assets/css/sunburst.min.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#000;color:#f8f8f8}.hljs-comment,.hljs-quote{color:#aeaeae;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#e28964}.hljs-string{color:#65b042}.hljs-subst{color:#daefa3}.hljs-link,.hljs-regexp{color:#e9c062}.hljs-name,.hljs-section,.hljs-tag,.hljs-title{color:#89bdff}.hljs-class .hljs-title,.hljs-doctag,.hljs-title.class_{text-decoration:underline}.hljs-bullet,.hljs-number,.hljs-symbol{color:#3387cc}.hljs-params,.hljs-template-variable,.hljs-variable{color:#3e87e3}.hljs-attribute{color:#cda869}.hljs-meta{color:#8996a8}.hljs-formula{background-color:#0e2231;color:#f8f8f8;font-style:italic}.hljs-addition{background-color:#253b22;color:#f8f8f8}.hljs-deletion{background-color:#420e09;color:#f8f8f8}.hljs-selector-class{color:#9b703f}.hljs-selector-id{color:#8b98ab}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /assets/css/universal.scss: -------------------------------------------------------------------------------- 1 | $shadow: 0 1px 3px rgba(26, 26, 26, 0.1); // 区块阴影 2 | // 区块通用样式 3 | .mwordstar-block { 4 | box-shadow: $shadow; 5 | border-radius: 4px; 6 | border: 1px solid #dedede !important; 7 | background-color: #FFFFFF; 8 | } 9 | 10 | // 主题直角风格 11 | body[data-rounded="rightAngle"] { 12 | // 区块 13 | .mwordstar-block { 14 | border-radius: 0; 15 | } 16 | // 顶部导航区的搜索框和按钮 17 | header .navbar .search-form { 18 | input,button { 19 | border-radius: 0; 20 | } 21 | } 22 | // 翻页导航区 23 | .pagination-nav li > a { 24 | border-radius: 0 !important; 25 | } 26 | // 侧边栏标签云 27 | .tag-cloud .tag-link { 28 | border-radius: 0; 29 | } 30 | // 侧边栏的搜索组件 31 | .sidebar .search { 32 | input, button { 33 | border-radius: 0; 34 | } 35 | } 36 | // 文章页的分享和点赞按钮 37 | .post-page .agree-and-share button { 38 | border-radius: 0; 39 | } 40 | // 评论区 41 | #comments { 42 | // 评论表单 43 | #comment-form { 44 | input, textarea, button { 45 | border-radius: 0; 46 | } 47 | } 48 | // 表情面板 49 | #emoji-panel { 50 | border-radius: 0 !important; 51 | } 52 | // 评论列表的回复链接 53 | .comment-reply a { 54 | border-radius: 0 !important; 55 | } 56 | } 57 | // 404页 58 | .container-404 { 59 | .search-box { 60 | input, button { 61 | border-radius: 0; 62 | } 63 | } 64 | .to-home-link { 65 | border-radius: 0; 66 | } 67 | } 68 | } 69 | 70 | // 禁止滚动 71 | .stop-scrolling { 72 | height: 100%; 73 | overflow: hidden; 74 | } 75 | 76 | // 通用的头像样式 77 | .avatar { 78 | background: #E0E0E0; 79 | } 80 | 81 | // 代码拷贝按钮 82 | .copy-code-btn { 83 | position: absolute; 84 | top: 8px; 85 | right: 8px; 86 | display: none; 87 | } 88 | 89 | // 面包屑导航 90 | .breadcrumb { 91 | background: none; 92 | } 93 | 94 | // 文章目录 95 | #directory-box { 96 | background: #F8F9FA; 97 | display: inline-block; 98 | ul { 99 | list-style: none; 100 | .directory-num { 101 | color: #444444; 102 | } 103 | } 104 | > ul { 105 | padding-left: 0; 106 | ul { 107 | padding-left: 32px; 108 | } 109 | } 110 | } 111 | 112 | // 图片灯箱 113 | #max-img { 114 | .mask-layer { 115 | width: 100%; 116 | height: 100%; 117 | position: fixed; 118 | top: 0; 119 | left: 0; 120 | background: rgba(0, 0, 0, 0.8); 121 | z-index: 1030; 122 | display: none; 123 | } 124 | img { 125 | position: absolute; 126 | cursor: move; 127 | display: none; 128 | z-index: 1031; 129 | } 130 | #img-control { 131 | position: fixed; 132 | top: 10px; 133 | right: 10px; 134 | opacity: 0.8; 135 | z-index: 1033; 136 | display: none; 137 | button { 138 | background-color: #212529; 139 | color: rgba(255, 255, 255, 0.87); 140 | } 141 | } 142 | // 图片描述 143 | #img-info { 144 | position: fixed; 145 | bottom: 30px; 146 | left: 50%; 147 | transform: translate(-50%, 0); 148 | font-size: 16px; 149 | text-shadow: 0 1px #333333, 1px 0 #333333, -1px 0 #333333, 0 -1px #333333; 150 | z-index: 1203; 151 | display: none; 152 | } 153 | } 154 | 155 | // 评论区引用头像 156 | .pingback { 157 | background: #488CB8; 158 | text-align: center; 159 | font-size: 14px; 160 | color: #ffffff; 161 | font-weight: 700; 162 | -moz-user-select: none; 163 | -webkit-user-select: none; 164 | -ms-user-select: none; 165 | user-select: none; 166 | } 167 | 168 | // 页脚的功能按钮区域 169 | #footer-btn-box { 170 | width: 40px; 171 | position: fixed; 172 | right: 20px; 173 | bottom: 20px; 174 | button { 175 | width: 40px; 176 | height: 40px; 177 | background: #ffffff; 178 | border: 1px solid #d3d3d3; 179 | opacity: 0.7; 180 | margin-top: 20px; 181 | } 182 | } 183 | 184 | // 移动设备专用章节目录 185 | #directory-mobile {; 186 | position: fixed; 187 | right: 60px; 188 | bottom: 80px; 189 | flex-direction: column; 190 | display: flex; 191 | max-height: 70%; 192 | width: 300px; 193 | background: #FFFFFF; 194 | box-shadow: $shadow; 195 | opacity: 0; 196 | // 目录列表区域 197 | .directory-list { 198 | height: 100%; 199 | overflow-y: auto; 200 | ul { 201 | list-style: none; 202 | padding-left: 0; 203 | ul { 204 | padding-left: 15px; 205 | } 206 | } 207 | a { 208 | font-size: 14px; 209 | } 210 | } 211 | // 目录的标题栏区域 212 | .title-bar { 213 | height: 40px; 214 | display: flex; 215 | align-items: center; 216 | justify-content: space-between; 217 | padding: 0 10px; 218 | i { 219 | font-size: 15px; 220 | } 221 | } 222 | } 223 | @media screen and (max-height: 450px) { 224 | #directory-mobile { 225 | max-height: 60%; 226 | } 227 | } -------------------------------------------------------------------------------- /assets/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/assets/fonts/icomoon.eot -------------------------------------------------------------------------------- /assets/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/assets/fonts/icomoon.ttf -------------------------------------------------------------------------------- /assets/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/assets/fonts/icomoon.woff -------------------------------------------------------------------------------- /assets/js/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.10 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]= 5 | 0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c= 7 | j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount- 8 | b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0g;g++)if(null==this.modules[b][i-g]){var n=!1;f>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a, 9 | c),b=new t,e=0;e8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d= 10 | 0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+ 14 | a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;dc)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+ 15 | a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256), 17 | LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d 18 | this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b>>7-a%8&1)},put:function(a,c){for(var d=0;d>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1, 26 | correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e").css("height",b+"px").appendTo(c);for(i=0;i").css("width", 28 | d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery); 29 | -------------------------------------------------------------------------------- /assets/js/options-panel.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', () => { 2 | const title = [ 3 | '语言', '外观', '站点信息', '辅助功能', '链接调转', 4 | '侧边栏', '文章列表', '文章头图', '文章内容区域', 5 | '评论区', '导航', '友情链接', 'PJAX', '开发者' 6 | ]; 7 | const optionUl = document.querySelectorAll('form .typecho-option'); // 列表 8 | const optionForm = document.querySelector('.typecho-page-main form'); // 选项表单 9 | const titleEl = []; 10 | 11 | // 生成分组标题 12 | title.forEach(val => { 13 | const h2El = document.createElement('h2'); 14 | h2El.innerHTML = val; 15 | h2El.classList.add('option-title'); 16 | titleEl.push(h2El); 17 | }); 18 | 19 | // 针对屏幕阅读器的优化 20 | optionUl.forEach(el => { 21 | // 给选项分组列表加入屏幕阅读器专用的标签 22 | if (el.querySelector('label') !== null) { 23 | el.setAttribute('aria-label', el.querySelector('label').innerText); 24 | } 25 | // 给选项表单关联选项描述 26 | if (el.querySelector('.description') !== null) { 27 | const descriptionId = `description-${el.getAttribute('id')}`; 28 | el.querySelector('.description').setAttribute('id', descriptionId); 29 | el.setAttribute('aria-describedby', descriptionId); 30 | } 31 | }); 32 | 33 | // 插入分组标题 34 | optionForm.insertBefore(titleEl[0], optionUl[0]); // 语言 35 | optionForm.insertBefore(titleEl[1], optionUl[2]); // 外观 36 | optionForm.insertBefore(titleEl[2], optionUl[6]); // 站点信息 37 | optionForm.insertBefore(titleEl[3], optionUl[9]); // 辅助功能 38 | optionForm.insertBefore(titleEl[4], optionUl[10]); // 链接跳转 39 | optionForm.insertBefore(titleEl[5], optionUl[13]); // 侧边栏 40 | optionForm.insertBefore(titleEl[6], optionUl[27]); // 文章列表 41 | optionForm.insertBefore(titleEl[7], optionUl[29]); // 文章头图 42 | optionForm.insertBefore(titleEl[8], optionUl[33]); // 文章内容相关 43 | optionForm.insertBefore(titleEl[9], optionUl[41]); // 评论区 44 | optionForm.insertBefore(titleEl[10], optionUl[46]); // 导航栏 45 | optionForm.insertBefore(titleEl[11], optionUl[51]); // 友情链接 46 | optionForm.insertBefore(titleEl[12], optionUl[54]); // PJAX 47 | optionForm.insertBefore(titleEl[13], optionUl[58]); // 开发者 48 | 49 | // 插入分隔线 50 | titleEl.forEach(el => { 51 | optionForm.insertBefore(document.createElement('hr'), el); 52 | }); 53 | 54 | // 导出按钮点击 55 | document.querySelector('#export-btn').onclick = () => { 56 | const input = optionForm.querySelectorAll('input'); // 获取所有 input 57 | const textarea = optionForm.querySelectorAll('textarea'); // 获取所有 textarea 58 | let backup = []; // 主题配置内容 59 | 60 | // 获取 input 的内容 61 | input.forEach(el => { 62 | // 导出 type 为 text 的 input 63 | if (el.getAttribute('type') === 'text') { 64 | backup.push({ 65 | name: el.getAttribute('name'), 66 | value: encodeURIComponent(el.value), 67 | type: el.getAttribute('type') 68 | }); 69 | } 70 | // 导出 radio 的 input 71 | if (el.getAttribute('type') === 'radio') { 72 | backup.push({ 73 | name: el.getAttribute('name'), 74 | value: el.value, 75 | type: el.getAttribute('type'), 76 | checked: el.checked 77 | }); 78 | } 79 | // 导出 checkbox 的 input 80 | if (el.getAttribute('type') === 'checkbox') { 81 | backup.push({ 82 | name: el.getAttribute('name'), 83 | value: el.value, 84 | type: el.getAttribute('type'), 85 | checked: el.checked 86 | }); 87 | } 88 | }); 89 | 90 | // 获取 textarea 的内容 91 | textarea.forEach(el => { 92 | backup.push({ 93 | name: el.getAttribute('name'), 94 | value: encodeURIComponent(el.value), 95 | type: el.tagName 96 | }); 97 | }); 98 | 99 | backup = JSON.stringify(backup, null, 2); 100 | const blob = new Blob([backup]); 101 | document.querySelector('#download-file').href = URL.createObjectURL(blob); 102 | document.querySelector('#download-file').download = 'mwordstar-config.json'; 103 | document.querySelector('#download-file').click(); 104 | }; 105 | 106 | // 导入按钮点击 107 | document.querySelector('#import-btn').addEventListener('click', () => { 108 | document.querySelector('#file-select').click(); 109 | }); 110 | 111 | // 文件选择完成 112 | document.querySelector('#file-select').addEventListener('change', ev => { 113 | if (ev.target.value === '') { 114 | return false; 115 | } 116 | 117 | const reader = new FileReader(); 118 | reader.readAsText(ev.target.files[0]); 119 | 120 | reader.addEventListener('load', readerEv => { 121 | try { 122 | const config = JSON.parse(readerEv.target.result); 123 | const input = optionForm.querySelectorAll('input'); // 获取所有 input 124 | const textarea = optionForm.querySelectorAll('textarea'); // 获取所有 textarea 125 | 126 | config.forEach(function(val) { 127 | // 设置 input 128 | input.forEach(el => { 129 | // text input 130 | if (el.getAttribute('type') === 'text' && el.getAttribute('name') === val.name) { 131 | el.value = decodeURIComponent(val.value); 132 | } 133 | // radio input 134 | if (el.getAttribute('type') === 'radio') { 135 | if (el.getAttribute('name') === val.name && el.value === val.value) { 136 | el.checked = val.checked; 137 | } 138 | } 139 | // checkbox input 140 | if (el.getAttribute('type') === 'checkbox') { 141 | if (el.getAttribute('name') === val.name && el.value === val.value) { 142 | el.checked = val.checked; 143 | } 144 | } 145 | }); 146 | 147 | // 设置 textarea 148 | textarea.forEach(el => { 149 | if (el.getAttribute('name') === val.name && el.tagName === val.type) { 150 | el.value = decodeURIComponent(val.value); 151 | } 152 | }); 153 | }); 154 | 155 | if (confirm('主题配置信息已成功导入,您确定要保存设置吗?')) { 156 | document.querySelector('.typecho-page-main form').submit(); 157 | } 158 | }catch (error) { 159 | alert(error.message); 160 | } 161 | }); 162 | 163 | reader.addEventListener('error', () => { 164 | alert('读取文件时发生错误!'); 165 | }); 166 | }); 167 | 168 | // 插入主题配色图片 169 | const imgBox = document.createElement('div'); 170 | imgBox.innerHTML = ` 171 |

配色预览:

172 | 173 | `; 174 | optionUl[1].parentNode.insertBefore(imgBox, optionUl[3]); 175 | 176 | // 获取配色单选框 177 | const colorRadio = document.getElementsByName('color'); 178 | // 获取预览图 179 | const img = document.querySelector('#preview-img'); 180 | for (let i = 0; i < colorRadio.length; i++) { 181 | // 给配色单选框添加一个索引 182 | colorRadio[i].index = i; 183 | // 根据选中的单选框设置图片 184 | if (colorRadio[i].checked) { 185 | img.style.backgroundPositionY = `-${colorRadio[i].index * 313}px`; 186 | } 187 | // 配色单选框改变 188 | colorRadio[i].addEventListener('change', ev => { 189 | img.style.backgroundPositionY = `-${ev.target.index * 313}px`; 190 | }); 191 | } 192 | 193 | // 创建选项列表 194 | const optionsList = document.querySelector('#options-list'); 195 | // 创建选项列表项 196 | for (let i = 0;i < title.length;i ++) { 197 | const itemLi = document.createElement('li'); 198 | const itemLink = document.createElement('a'); 199 | itemLink.innerHTML = title[i]; 200 | itemLink.href = 'javascript:;'; 201 | itemLink.index = i; 202 | // 给目录链接添加跳转事件 203 | itemLink.addEventListener('click', ev => { 204 | titleEl[ev.target.index].scrollIntoView({behavior: 'smooth'}); 205 | }); 206 | 207 | itemLi.appendChild(itemLink); 208 | optionsList.querySelector('ul').appendChild(itemLi); 209 | } 210 | 211 | // 设置选项列表目录的位置 212 | const left = document.querySelector('.col-tb-offset-2').offsetLeft; 213 | optionsList.style.left = left - optionsList.offsetWidth + 'px'; 214 | 215 | // 窗口大小改变时调整选项目录的位置 216 | window.addEventListener('resize', () => { 217 | if (window.innerWidth < 768) return false; 218 | const left = document.querySelector('.col-tb-offset-2').offsetLeft; 219 | optionsList.style.left = left - optionsList.offsetWidth + 'px'; 220 | }); 221 | 222 | // 目录下方的保存选项按钮提交保存 223 | document.querySelector('.submit-options').addEventListener('click', () => { 224 | document.querySelector('.typecho-page-main form').submit(); 225 | }); 226 | 227 | 228 | // 获取友情链接表格 229 | const linkList = document.querySelector('#link-list table tbody'); 230 | let linkInputName = null; // 存储友链表单的名称 231 | 232 | // 打开链接编辑器 233 | document.querySelectorAll('.show-link-editor').forEach(el => { 234 | el.setAttribute('title', `${el.getAttribute('data-title')}编辑`); 235 | 236 | el.addEventListener('click', ev => { 237 | // 设置链接编辑器标题 238 | document.querySelector('#link-editor-title').innerHTML = `${ev.target.getAttribute('data-title')}编辑`; 239 | // 从链接表单获取 JSON 240 | linkInputName = ev.target.getAttribute('data-name'); 241 | let linkJson = document.querySelector(`textarea[name="${linkInputName}"]`).value; 242 | 243 | // 显示链接编辑器 244 | document.querySelector('#link-editor-box').style.display = 'block'; 245 | // 如果屏幕尺寸较小就调节编辑器尺寸 246 | if (window.innerWidth < 900 || window.innerHeight < 500) { 247 | const linkListHeight = window.innerHeight - document.querySelector('#link-editor-title').offsetHeight - document.querySelector('#link-editor .dialog-actions').offsetHeight; 248 | document.querySelector('#link-list').style.height = linkListHeight + 'px'; 249 | } 250 | // 禁止页面滚动 251 | document.body.classList.add('no-scroll'); 252 | // 清空链接表格 253 | linkList.innerHTML = ''; 254 | // 读取链接 255 | if (linkJson !== '') { 256 | try { 257 | linkJson = JSON.parse(linkJson); 258 | }catch (error) { 259 | alert(`无法解析链接 JSON ${error.message}`); 260 | return false; 261 | } 262 | 263 | // 生成链接表格 264 | linkJson.forEach(link => { 265 | if (link.url === undefined) link.url = ''; 266 | if (link.name === undefined) link.name = ''; 267 | if (link.title === undefined) link.title = ''; 268 | if (link.logoUrl === undefined) link.logoUrl = ''; 269 | 270 | const trEl = document.createElement('tr'); 271 | trEl.innerHTML = ` 272 | ${link.url} 273 | ${link.name} 274 | ${link.logoUrl} 275 | ${link.title} 276 | 277 | 编辑 278 | 删除 279 | 280 | `; 281 | linkList.appendChild(trEl); 282 | }); 283 | } 284 | 285 | // 让第一个可聚焦的元素获取焦点 286 | const dialog = document.querySelector('#link-editor'); 287 | const focusableElements = dialog.querySelectorAll('a, button, input'); 288 | focusableElements[0].focus(); 289 | }); 290 | }); 291 | 292 | //使用事件委托的方式给友链表格内的按钮添加事件 293 | linkList.addEventListener('click', ev => { 294 | // 删除链接点击 295 | if (ev.target && ev.target.classList.contains('remove-item')) { 296 | ev.target.closest('tr').remove(); 297 | } 298 | 299 | // 保存编辑链接点击 300 | if (ev.target && ev.target.classList.contains('save-item')) { 301 | // 获取编辑的链接 302 | const link = { 303 | url: linkList.querySelector('.editing .url-td input').value, 304 | name: linkList.querySelector('.editing .name-td input').value, 305 | title: linkList.querySelector('.editing .title-td input').value, 306 | logoUrl: linkList.querySelector('.editing .logo-url-td input').value 307 | }; 308 | // 检查必填项是否为空 309 | if (link.url === '' || link.name === '') { 310 | alert('链接 URL 或名称不能为空!'); 311 | return false; 312 | } 313 | // 生成表格 314 | const trEl = document.createElement('tr'); 315 | trEl.innerHTML = ` 316 | ${link.url} 317 | ${link.name} 318 | ${link.logoUrl} 319 | ${link.title} 320 | 321 | 编辑 322 | 删除 323 | 324 | `; 325 | // 把表格插入到编辑项后面 326 | linkList.querySelector('.editing').insertAdjacentElement('afterend', trEl); 327 | // 删除编辑项 328 | linkList.querySelector('.editing').remove(); 329 | } 330 | 331 | // 编辑链接点击 332 | if (ev.target && ev.target.classList.contains('edit-item')) { 333 | // 获取编辑内容 334 | const link = { 335 | url: ev.target.closest('tr').querySelector('.url-td').innerHTML, 336 | name: ev.target.closest('tr').querySelector('.name-td').innerHTML, 337 | logoUrl: ev.target.closest('tr').querySelector('.logo-url-td').innerHTML, 338 | title: ev.target.closest('tr').querySelector('.title-td').innerHTML 339 | }; 340 | // 生成编辑表格 341 | const trEl = document.createElement('tr'); 342 | trEl.classList.add('editing'); 343 | trEl.innerHTML = ` 344 | 345 | 346 | 347 | 348 | 349 | 保存 350 | 取消 351 | 352 | `; 353 | // 插入编辑表格 354 | ev.target.closest('tr').insertAdjacentElement('afterend', trEl); 355 | // 删除之前的链接表格 356 | ev.target.closest('tr').remove(); 357 | // 聚焦到第一个编辑表单 358 | linkList.querySelector('.editing input').focus(); 359 | } 360 | }); 361 | 362 | // 添加链接按钮点击 363 | document.querySelector('.add-link').addEventListener('click', () => { 364 | // 是否有正在编辑的行 365 | if (linkList.querySelectorAll('.editing').length) { 366 | alert('当前表格中有未完成的编辑!'); 367 | return false; 368 | } 369 | 370 | // 生成编辑表格 371 | const trEl = document.createElement('tr'); 372 | trEl.classList.add('editing'); 373 | trEl.innerHTML = ` 374 | 375 | 376 | 377 | 378 | 379 | 保存 380 | 取消 381 | 382 | `; 383 | // 插入到表格 384 | linkList.appendChild(trEl); 385 | // 聚焦到第一个编辑表单 386 | linkList.querySelector('.editing input').focus(); 387 | }); 388 | 389 | // 关闭链接编辑器 390 | document.querySelector('#link-editor-box .close-btn').addEventListener('click', () => { 391 | document.querySelector('#link-editor-box').style.display = 'none'; 392 | // 恢复页面滚动 393 | document.body.classList.remove('no-scroll'); 394 | // 聚焦到打开对话框的按钮 395 | document.querySelector(`button[data-name="${linkInputName}"]`).focus(); 396 | }); 397 | 398 | // 链接编辑器的确定按钮点击 399 | document.querySelector('#link-editor-box .save-btn').addEventListener('click', () => { 400 | // 是否有未完成的编辑 401 | if (linkList.querySelectorAll('.editing').length) { 402 | alert('发现了未完成的编辑,您需要先删除或保存未完成的编辑!'); 403 | return false; 404 | } 405 | // 获取链接表单 406 | const linkInput = document.querySelector(`textarea[name="${linkInputName}"]`); 407 | // 关闭链接编辑器 408 | document.querySelector('#link-editor-box .close-btn').click(); 409 | // 如果链接全部删除 410 | if (linkList.querySelectorAll('tr').length < 1) { 411 | linkInput.value = ''; 412 | return true; 413 | } 414 | 415 | const links = []; // 存储链接 416 | // 从链接表格获取链接 417 | linkList.querySelectorAll('tr').forEach(el => { 418 | const linkItem = { 419 | url: el.querySelector('.url-td').innerHTML, 420 | name: el.querySelector('.name-td').innerHTML 421 | }; 422 | if (el.querySelector('.logo-url-td').innerHTML !== '') { 423 | linkItem.logoUrl = el.querySelector('.logo-url-td').innerHTML; 424 | } 425 | if (el.querySelector('.title-td').innerHTML !== '') { 426 | linkItem.title = el.querySelector('.title-td').innerHTML; 427 | } 428 | links.push(linkItem); 429 | }); 430 | // 把链接 JSON 填写到对应的友链表单 431 | linkInput.value = JSON.stringify(links, null, 2); 432 | // 对话框提示 433 | const linkType = document.querySelector(`button[data-name="${linkInputName}"]`).getAttribute('data-title'); 434 | if (confirm(`您编辑的链接已添加到 ${linkType},您要保存设置吗?`)) { 435 | document.querySelector('.typecho-page-main form').submit(); 436 | } 437 | }); 438 | 439 | // 链接编辑器的确定按钮按下TAB 440 | document.querySelector('#link-editor-box .save-btn').addEventListener('keydown', ev => { 441 | if (ev.key === 'Tab') { 442 | ev.preventDefault(); 443 | // 获取对话框内可聚焦的元素 444 | const dialog = document.querySelector('#link-editor'); 445 | const focusableElements = dialog.querySelectorAll('a, button, input'); 446 | // 让第一个可聚焦的元素获取焦点 447 | focusableElements[0].focus(); 448 | } 449 | }); 450 | }); -------------------------------------------------------------------------------- /components/comment-input.php: -------------------------------------------------------------------------------- 1 | allow('comment')): ?> 2 |
3 |
4 | cancelReply(); ?> 5 |
6 | 7 |

8 |
9 |
10 | 11 |
12 | 16 | 17 |
18 | 19 | options->emojiPanel == 'on'): ?> 20 |
21 | 22 | 39 |
40 | 41 | user->hasLogin()): ?> 42 |
43 | 44 | user->screenName(); ?>. 45 | » 46 |
47 | 48 | 49 |
50 | 54 | 55 |
56 | 57 |
58 | 64 | options->commentsRequireMail) echo 'required'; ?> placeholder="" maxlength="64"> 65 |
66 | 67 |
68 | 74 | options->commentsRequireURL) echo 'required'; ?>> 75 |
76 | 77 | 78 |
79 | 80 |
81 |
82 |
83 |
84 | 85 |

86 | -------------------------------------------------------------------------------- /components/comments.php: -------------------------------------------------------------------------------- 1 | options->commentDateFormat; 3 | $GLOBALS['QQAvatar'] = $this->options->QQAvatar; 4 | $GLOBALS['gravatarUrl'] = $this->options->gravatarUrl; // 获取自定义 gravatar 5 | ?> 6 | authorId) { 10 | if ($comments->authorId == $comments->ownerId) { 11 | $commentClass .= ' comment-by-author'; 12 | } else { 13 | $commentClass .= ' comment-by-user'; 14 | } 15 | } 16 | 17 | $commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent'; 18 | ?> 19 | 20 |
  • 30 |
    31 |
    32 | type == 'comment') { 34 | if ($GLOBALS['QQAvatar'] == 'on' && isQQEmail($comments->mail)) { 35 | QQAvatar($comments->mail, $comments->author, 40); 36 | }else { 37 | gravatar($comments->mail, 50, $GLOBALS['gravatarUrl'], $comments->author); 38 | } 39 | } 40 | if ($comments->type == 'pingback') { 41 | echo ''; 42 | } 43 | ?> 44 |
    45 | author(); ?> 46 | authorId == $comments->ownerId): ?> 47 | 48 | 49 | status != 'approved'): ?> 50 | 51 | 52 | 55 |
    56 | 57 | 58 | reply($GLOBALS['t']['comment']['reply']); ?> 59 | 60 | 61 |
    62 |
    63 | parent); ?> 64 | content(); ?> 65 |
    66 |
    67 | children) { ?> 68 |
    69 | threadedComments($options); ?> 70 |
    71 | 72 |
  • 73 | 74 | 75 |
    76 | comments()->to($comments); ?> 77 | options->commentInput == 'top') require_once 'comment-input.php'; ?> 78 | have()): ?> 79 |
    80 |

    commentsNum(_t('暂无评论'), $GLOBALS['t']['comment']['1Comment'], $GLOBALS['t']['comment']['thereAreNumComments']); ?>

    81 | 82 | listComments(); ?> 83 | 84 | 87 |
    88 | 89 | options->commentInput == 'bottom' or $this->options->commentInput == null) require_once 'comment-input.php'; ?> 90 |
    91 | 92 | options->pjax == 'on'): ?> 93 | 152 | -------------------------------------------------------------------------------- /components/footer.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | options->icp): ?> 4 |
    5 | options->icp(); ?> 6 |
    7 | 8 | Powered by Typecho Theme by MWordStar 9 |
    10 |
    11 | 12 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | options->pjax === 'on' && $this->options->pjaxEnd): ?> 42 | 47 | 48 | 49 | options->bodyHTML): ?> 50 | options->bodyHTML(); ?> 51 | 52 | footer(); ?> 53 | 54 | 55 | -------------------------------------------------------------------------------- /components/header.php: -------------------------------------------------------------------------------- 1 | options->defaultLightColor) { 8 | // 重新设置 cookie 9 | setcookie('themeColor', $this->options->defaultLightColor, time() + 15552000, '/'); 10 | } 11 | // 根据主题配色 cookie 设置配色 12 | $themeColor = $_COOKIE['themeColor']; 13 | }else { 14 | // 如果不包含主题配色 cookie 就使用后台设置的默认配色 15 | $themeColor = $this->options->color; 16 | } 17 | 18 | // 获取代码高亮主题 19 | $codeThemeColorSelected = $this->options->codeThemeColor; 20 | $codeThemeColor = $codeThemeColorSelected; 21 | // 根据主题配色模式来设置代码高亮主题 22 | if ($codeThemeColor == 'auto') { 23 | $codeThemeColor = $themeColor == 'dark-color'?'github-dark':'stackoverflow-light'; 24 | } 25 | // 如果代码高亮被禁用就不输出代码高亮主题设置 26 | if ($this->options->codeHighlight != 'enable-highlight') { 27 | $codeThemeColor = 'code-theme-none'; 28 | } 29 | 30 | // 导航栏自定义链接 31 | $navLinks = null; 32 | if ($this->options->navLinks) $navLinks = json_decode($this->options->navLinks); 33 | 34 | // body class 35 | $bodyClass = array( 36 | // 代码高亮主题 37 | $codeThemeColor, 38 | // 是否开启代码高亮 39 | $this->options->codeHighlight, 40 | // 主题配色模式 41 | $themeColor 42 | ); 43 | // 如果开启了代码块高亮就把代码块行号设置添加到 body class 44 | if ($this->options->codeHighlight == 'enable-highlight') { 45 | $bodyClass[] = 'line-num-' . $this->options->codeLineNum; 46 | } 47 | // 把 body class 数组转为字符串,方便直接输出 48 | $bodyClass = implode(' ', $bodyClass); 49 | ?> 50 | 51 | 52 | 53 | 54 | 56 | 57 | 58 | <?php 59 | $this->archiveTitle(array( 60 | 'category' => $GLOBALS['t']['archive']['postsUnderTheCategory'], 61 | 'search' => $GLOBALS['t']['archive']['postsContainingTheKeyword'], 62 | 'tag' => $GLOBALS['t']['archive']['postsTagged'], 63 | 'author' => $GLOBALS['t']['archive']['postsByAuthor'] 64 | ), '', ' - '); 65 | ?> 66 | <?php $this->options->title(); ?> 67 | <?php echo $this->is('index')?'- ' . $this->options->tagline:''; ?> 68 | 69 | 70 | 71 | 72 | 73 | 74 | is('post') && $this->fields->keywords or $this->fields->summaryContent): ?> 75 | fields->keywords) $metaContent['keywords'] = $this->fields->keywords; 79 | // 如果设置了自定义摘要内容就显示自定义摘要 80 | if ($this->fields->summaryContent) $metaContent['description'] = $this->fields->summaryContent; 81 | // 把包含自定义关键词和摘要的数组转为 URL 查询格式 82 | $metaContent = urldecode(http_build_query($metaContent)); 83 | $this->header($metaContent); 84 | ?> 85 | 86 | header(); ?> 87 | 88 | options->cssCode): ?> 89 | 92 | 93 | options->headHTML): ?> 94 | options->headHTML(); ?> 95 | 96 | 97 | 98 | options->pjax == 'on' && $this->options->pjaxProgressBar == 'on'): ?> 99 | 102 | 103 |
    104 | 177 |
    -------------------------------------------------------------------------------- /components/link-editor.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/post-list.php: -------------------------------------------------------------------------------- 1 | next()): ?> 2 |
    3 | options->postListStyle, $this->fields->postListStyle); ?> 4 | options->headerImage, $this->options->headerImageUrl); ?> 5 | fields->postListHeaderImageStyle, $this->options->postListHeaderImageStyle) == 'max' && $headerImg && $postListStyle == 'summary'): ?> 6 |
    7 | 8 |
    9 | 10 |
    11 |

    12 | sticky) $this->sticky(); ?> 13 | 14 | hidden) { 16 | echo $GLOBALS['t']['post']['thisPostIsPasswordProtected']; 17 | }else { 18 | $this->title(); 19 | } 20 | ?> 21 | 22 |

    23 |
    24 | 25 |
    26 | fields->postListHeaderImageStyle, $this->options->postListHeaderImageStyle) == 'mini' && $headerImg): ?> 27 |
    28 |
    29 | 30 |
    31 |
    32 |

    33 | hidden) { 35 | echo $GLOBALS['t']['post']['enterThePasswordToViewIt']; 36 | }else { 37 | $this->fields->summaryContent?$this->fields->summaryContent():$this->excerpt($this->options->summary, '...'); 38 | } 39 | ?> 40 |

    41 |
    42 |
    43 | 44 |

    45 | hidden) { 47 | echo $GLOBALS['t']['post']['enterThePasswordToViewIt']; 48 | }else { 49 | $this->fields->summaryContent?$this->fields->summaryContent():$this->excerpt($this->options->summary, '...'); 50 | } 51 | ?> 52 |

    53 | 54 |
    55 | 56 |
    content(); ?>
    57 | 58 | 92 |
    93 | 94 | -------------------------------------------------------------------------------- /emoji.php: -------------------------------------------------------------------------------- 1 | array('😀', '😁', '😂', '🤣', '😃', '😄', '😅', '😆', '😉', '😊', '😋', '😎', '😍', '😘', '🥰', '😗', '😙', '😚', '☺️', '🙂', '🤗', '🤩', '🤔', '🤨', '😐', '😑', '😶', '🙄', '😏', '😣', '😥', '😮', '🤐', '😯', '😪', '😫', '😴', '😌', '😛', '😜', '😝', '🤤', '😒', '😓', '😔', '😕', '🙃', '🤑', '😲', '☹️', '🙁', '😖', '😞', '😟', '😤', '😢', '😭', '😦', '😧', '😨', '😩', '🤯', '😬', '😰', '😱', '🥵', '🥶', '😳', '🤪', '😵', '😡', '😠', '🤬', '😷', '🤒', '🤕', '🤢', '🤮', '🤧', '😇', '🤠', '🤡', '🥳', '🥴', '🥺', '🤥', '🤫', '🤭', '🧐', '🤓', '😈', '👿', '👹', '👺', '💀', '👻', '👽', '🤖', '💩', '😺', '😸', '😹', '😻', '😼', '😽', '🙀', '😿', '😾'), 5 | 'character' => array('👶', '👧', '🧒', '👦', '👩', '🧑', '👨', '👵', '🧓', '👴', '👲', '👳‍♀️', '👳‍♂️', '🧕', '🧔', '👱‍♂️', '👱‍♀️', '👨‍🦰', '👩‍🦰', '👨‍🦱', '👩‍🦱', '👨‍🦲', '👩‍🦲', '👨‍🦳', '👩‍🦳', '🦸‍♀️', '🦸‍♂️', '🦹‍♀️', '🦹‍♂️', '👮‍♀️', '👮‍♂️', '👷‍♀️', '👷‍♂️', '💂‍♀️', '💂‍♂️', '🕵️‍♀️', '🕵️‍♂️', '👩‍⚕️', '👨‍⚕️', '👩‍🌾', '👨‍🌾', '👩‍🍳', '👨‍🍳', '👩‍🎓', '👨‍🎓', '👩‍🎤', '👨‍🎤', '👩‍🏫', '👨‍🏫', '👩‍🏭', '👨‍🏭', '👩‍💻', '👨‍💻', '👩‍💼', '👨‍💼', '👩‍🔧', '👨‍🔧', '👩‍🔬', '👨‍🔬', '👩‍🎨', '👨‍🎨', '👩‍🚒', '👨‍🚒', '👩‍✈️', '👨‍✈️', '👩‍🚀', '👨‍🚀', '👩‍⚖️', '👨‍⚖️', '👰', '🤵', '👸', '🤴', '🤶', '🎅', '🧙‍♀️', '🧙‍♂️', '🧝‍♀️', '🧝‍♂️', '🧛‍♀️', '🧛‍♂️', '🧟‍♀️', '🧟‍♂️', '🧞‍♀️', '🧞‍♂️', '🧜‍♀️', '🧜‍♂️', '🧚‍♀️', '🧚‍♂️', '👼', '🤰', '🤱', '🙇‍♀️', '🙇‍♂️', '💁‍♀️', '💁‍♂️', '🙅‍♀️', '🙅‍♂️', '🙆‍♀️', '🙆‍♂️', '🙋‍♀️', '🙋‍♂️', '🤦‍♀️', '🤦‍♂️', '🤷‍♀️', '🤷‍♂️', '🙎‍♀️', '🙎‍♂️', '🙍‍♀️', '🙍‍♂️', '💇‍♀️', '💇‍♂️', '💆‍♀️', '💆‍♂️', '🧖‍♀️', '🧖‍♂️', '💅', '🤳', '💃', '🕺', '👯‍♀️', '👯‍♂️', '🕴', '🚶‍♀️', '🚶‍♂️', '🏃‍♀️', '🏃‍♂️', '👫', '👭', '👬', '💑', '👩‍❤️‍👩', '👨‍❤️‍👨', '💏', '👩‍❤️‍💋‍👩', '👨‍❤️‍💋‍👨', '👪', '👨‍👩‍👧', '👨‍👩‍👧‍👦', '👨‍👩‍👦‍👦', '👨‍👩‍👧‍👧', '👩‍👩‍👦', '👩‍👩‍👧', '👩‍👩‍👧‍👦', '👩‍👩‍👦‍👦', '👩‍👩‍👧‍👧', '👨‍👨‍👦', '👨‍👨‍👧', '👨‍👨‍👧‍👦', '👨‍👨‍👦‍👦', '👨‍👨‍👧‍👧', '👩‍👦', '👩‍👧', '👩‍👧‍👦', '👩‍👦‍👦', '👩‍👧‍👧', '👨‍👦', '👨‍👧', '👨‍👧‍👦', '👨‍👦‍👦', '👨‍👧‍👧', '🤲', '👐', '🙌', '👏', '🤝', '👍', '👎', '👊', '✊', '🤛', '🤜', '🤞', '✌️', '🤟', '🤘', '👌', '👈', '👉', '👆', '👇', '☝️', '✋', '🤚', '🖐', '🖖', '👋', '🤙', '💪', '🦵', '🦶', '🖕', '✍️', '🙏', '💍', '💄', '💋', '👄', '👅', '👂', '👃', '👣', '👁', '👀', '🧠', '🦴', '🦷', '🗣', '👤', '👥'), 6 | 'clothing' => array('🧥', '👚', '👕', '👖', '👔', '👗', '👙', '👘', '👠', '👡', '👢', '👞', '👟', '🥾', '🥿', '🧦', '🧤', '🧣', '🎩', '🧢', '👒', '🎓', '⛑', '👑', '👝', '👛', '👜', '💼', '🎒', '👓', '🕶', '🥽', '🥼', '🌂', '🧵', '🧶'), 7 | 'animal' => array('🐶', '🐱', '🐭', '🐹', '🐰', '🦊', '🦝', '🐻', '🐼', '🦘', '🦡', '🐨', '🐯', '🦁', '🐮', '🐷', '🐽', '🐸', '🐵', '🙈', '🙉', '🙊', '🐒', '🐔', '🐧', '🐦', '🐤', '🐣', '🐥', '🦆', '🦢', '🦅', '🦉', '🦚', '🦜', '🦇', '🐺', '🐗', '🐴', '🦄', '🐝', '🐛', '🦋', '🐌', '🐚', '🐞', '🐜', '🦗', '🕷', '🕸', '🦂', '🦟', '🦠', '🐢', '🐍', '🦎', '🦖', '🦕', '🐙', '🦑', '🦐', '🦀', '🐡', '🐠', '🐟', '🐬', '🐳', '🐋', '🦈', '🐊', '🐅', '🐆', '🦓', '🦍', '🐘', '🦏', '🦛', '🐪', '🐫', '🦙', '🦒', '🐃', '🐂', '🐄', '🐎', '🐖', '🐏', '🐑', '🐐', '🦌', '🐕', '🐩', '🐈', '🐓', '🦃', '🕊', '🐇', '🐁', '🐀', '🐿', '🦔', '🐾', '🐉', '🐲', '🌵', '🎄', '🌲', '🌳', '🌴', '🌱', '🌿', '☘️', '🍀', '🎍', '🎋', '🍃', '🍂', '🍁', '🍄', '🌾', '💐', '🌷', '🌹', '🥀', '🌺', '🌸', '🌼', '🌻', '🌞', '🌝', '🌛', '🌜', '🌚', '🌕', '🌖', '🌗', '🌘', '🌑', '🌒', '🌓', '🌔', '🌙', '🌎', '🌍', '🌏', '💫', '⭐️', '🌟', '✨', '⚡️', '☄️', '💥', '🔥', '🌪', '🌈', '☀️', '🌤', '⛅️', '🌥', '☁️', '🌦', '🌧', '⛈', '🌩', '🌨', '❄️', '☃️', '⛄️', '🌬', '💨', '💧', '💦', '☔️', '☂️', '🌊', '🌫'), 8 | 'food' => array('🍏', '🍎', '🍐', '🍊', '🍋', '🍌', '🍉', '🍇', '🍓', '🍈', '🍒', '🍑', '🍍', '🥭', '🥥', '🥝', '🍅', '🍆', '🥑', '🥦', '🥒', '🥬', '🌶', '🌽', '🥕', '🥔', '🍠', '🥐', '🍞', '🥖', '🥨', '🥯', '🧀', '🥚', '🍳', '🥞', '🥓', '🥩', '🍗', '🍖', '🌭', '🍔', '🍟', '🍕', '🥪', '🥙', '🌮', '🌯', '🥗', '🥘', '🥫', '🍝', '🍜', '🍲', '🍛', '🍣', '🍱', '🥟', '🍤', '🍙', '🍚', '🍘', '🍥', '🥮', '🥠', '🍢', '🍡', '🍧', '🍨', '🍦', '🥧', '🍰', '🎂', '🍮', '🍭', '🍬', '🍫', '🍿', '🧂', '🍩', '🍪', '🌰', '🥜', '🍯', '🥛', '🍼', '☕️', '🍵', '🥤', '🍶', '🍺', '🍻', '🥂', '🍷', '🥃', '🍸', '🍹', '🍾', '🥄', '🍴', '🍽', '🥣', '🥡', '🥢'), 9 | 'motion' => array('⚽️', '🏀', '🏈', '⚾️', '🥎', '🏐', '🏉', '🎾', '🥏', '🎱', '🏓', '🏸', '🥅', '🏒', '🏑', '🥍', '🏏', '⛳️', '🏹', '🎣', '🥊', '🥋', '🎽', '⛸', '🥌', '🛷', '🛹', '🎿', '⛷', '🏂', '🏋️‍♀️', '🏋🏻‍♀️', '🏋🏼‍♀️', '🏋🏽‍♀️', '🏋🏾‍♀️', '🏋🏿‍♀️', '🏋️‍♂️', '🏋🏻‍♂️', '🏋🏼‍♂️', '🏋🏽‍♂️', '🏋🏾‍♂️', '🏋🏿‍♂️', '🤼‍♀️', '🤼‍♂️', '🤸‍♀️', '🤸🏻‍♀️', '🤸🏼‍♀️', '🤸🏽‍♀️', '🤸🏾‍♀️', '🤸🏿‍♀️', '🤸‍♂️', '🤸🏻‍♂️', '🤸🏼‍♂️', '🤸🏽‍♂️', '🤸🏾‍♂️', '🤸🏿‍♂️', '⛹️‍♀️', '⛹🏻‍♀️', '⛹🏼‍♀️', '⛹🏽‍♀️', '⛹🏾‍♀️', '⛹🏿‍♀️', '⛹️‍♂️', '⛹🏻‍♂️', '⛹🏼‍♂️', '⛹🏽‍♂️', '⛹🏾‍♂️', '⛹🏿‍♂️', '🤺', '🤾‍♀️', '🤾🏻‍♀️', '🤾🏼‍♀️', '🤾🏾‍♀️', '🤾🏾‍♀️', '🤾🏿‍♀️', '🤾‍♂️', '🤾🏻‍♂️', '🤾🏼‍♂️', '🤾🏽‍♂️', '🤾🏾‍♂️', '🤾🏿‍♂️', '🏌️‍♀️', '🏌🏻‍♀️', '🏌🏼‍♀️', '🏌🏽‍♀️', '🏌🏾‍♀️', '🏌🏿‍♀️', '🏌️‍♂️', '🏌🏻‍♂️', '🏌🏼‍♂️', '🏌🏽‍♂️', '🏌🏾‍♂️', '🏌🏿‍♂️', '🏇', '🏇🏻', '🏇🏼', '🏇🏽', '🏇🏾', '🏇🏿', '🧘‍♀️', '🧘🏻‍♀️', '🧘🏼‍♀️', '🧘🏽‍♀️', '🧘🏾‍♀️', '🧘🏿‍♀️', '🧘‍♂️', '🧘🏻‍♂️', '🧘🏼‍♂️', '🧘🏽‍♂️', '🧘🏾‍♂️', '🧘🏿‍♂️', '🏄‍♀️', '🏄🏻‍♀️', '🏄🏼‍♀️', '🏄🏽‍♀️', '🏄🏾‍♀️', '🏄🏿‍♀️', '🏄‍♂️', '🏄🏻‍♂️', '🏄🏼‍♂️', '🏄🏽‍♂️', '🏄🏾‍♂️', '🏄🏿‍♂️', '🏊‍♀️', '🏊🏻‍♀️', '🏊🏼‍♀️', '🏊🏽‍♀️', '🏊🏾‍♀️', '🏊🏿‍♀️', '🏊‍♂️', '🏊🏻‍♂️', '🏊🏼‍♂️', '🏊🏽‍♂️', '🏊🏾‍♂️', '🏊🏿‍♂️', '🤽‍♀️', '🤽🏻‍♀️', '🤽🏼‍♀️', '🤽🏽‍♀️', '🤽🏾‍♀️', '🤽🏿‍♀️', '🤽‍♂️', '🤽🏻‍♂️', '🤽🏼‍♂️', '🤽🏽‍♂️', '🤽🏾‍♂️', '🤽🏿‍♂️', '🚣‍♀️', '🚣🏻‍♀️', '🚣🏼‍♀️', '🚣🏽‍♀️', '🚣🏾‍♀️', '🚣🏿‍♀️', '🚣‍♂️', '🚣🏻‍♂️', '🚣🏼‍♂️', '🚣🏽‍♂️', '🚣🏾‍♂️', '🚣🏿‍♂️', '🧗‍♀️', '🧗🏻‍♀️', '🧗🏼‍♀️', '🧗🏽‍♀️', '🧗🏾‍♀️', '🧗🏿‍♀️', '🧗‍♂️', '🧗🏻‍♂️', '🧗🏼‍♂️', '🧗🏽‍♂️', '🧗🏾‍♂️', '🧗🏿‍♂️', '🚵‍♀️', '🚵🏻‍♀️', '🚵🏼‍♀️', '🚵🏽‍♀️', '🚵🏾‍♀️', '🚵🏿‍♀️', '🚵‍♂️', '🚵🏻‍♂️', '🚵🏼‍♂️', '🚵🏽‍♂️', '🚵🏾‍♂️', '🚵🏿‍♂️', '🚴‍♀️', '🚴🏻‍♀️', '🚴🏼‍♀️', '🚴🏽‍♀️', '🚴🏾‍♀️', '🚴🏿‍♀️', '🚴‍♂️', '🚴🏻‍♂️', '🚴🏼‍♂️', '🚴🏽‍♂️', '🚴🏾‍♂️', '🚴🏿‍♂️', '🏆', '🥇', '🥈', '🥉', '🏅', '🎖', '🏵', '🎗', '🎫', '🎟', '🎪', '🤹‍♀️', '🤹🏻‍♀️', '🤹🏼‍♀️', '🤹🏽‍♀️', '🤹🏾‍♀️', '🤹🏿‍♀️', '🤹‍♂️', '🤹🏻‍♂️', '🤹🏼‍♂️', '🤹🏽‍♂️', '🤹🏾‍♂️', '🤹🏿‍♂️', '🎭', '🎨', '🎬', '🎤', '🎧', '🎼', '🎹', '🥁', '🎷', '🎺', '🎸', '🎻', '🎲', '🧩', '♟', '🎯', '🎳', '🎮', '🎰'), 10 | 'tourism' => array('🚗', '🚕', '🚙', '🚌', '🚎', '🏎', '🚓', '🚑', '🚒', '🚐', '🚚', '🚛', '🚜', '🛴', '🚲', '🛵', '🏍', '🚨', '🚔', '🚍', '🚘', '🚖', '🚡', '🚠', '🚟', '🚃', '🚋', '🚞', '🚝', '🚄', '🚅', '🚈', '🚂', '🚆', '🚇', '🚊', '🚉', '✈️', '🛫', '🛬', '🛩', '💺', '🛰', '🚀', '🛸', '🚁', '🛶', '⛵️', '🚤', '🛥', '🛳', '⛴', '🚢', '⚓️', '⛽️', '🚧', '🚦', '🚥', '🚏', '🗺', '🗿', '🗽', '🗼', '🏰', '🏯', '🏟', '🎡', '🎢', '🎠', '⛲️', '⛱', '🏖', '🏝', '🏜', '🌋', '⛰', '🏔', '🗻', '🏕', '⛺️', '🏠', '🏡', '🏘', '🏚', '🏗', '🏭', '🏢', '🏬', '🏣', '🏤', '🏥', '🏦', '🏨', '🏪', '🏫', '🏩', '💒', '🏛', '⛪️', '🕌', '🕍', '🕋', '⛩', '🛤', '🛣', '🗾', '🎑', '🏞', '🌅', '🌄', '🌠', '🎇', '🎆', '🌇', '🌆', '🏙', '🌃', '🌌', '🌉', '🌁'), 11 | 'objects' => array('⌚️', '📱', '📲', '💻', '⌨️', '🖥', '🖨', '🖱', '🖲', '🕹', '🗜', '💽', '💾', '💿', '📀', '📼', '📷', '📸', '📹', '🎥', '📽', '🎞', '📞', '☎️', '📟', '📠', '📺', '📻', '🎙', '🎚', '🎛', '⏱', '⏲', '⏰', '🕰', '⌛️', '⏳', '📡', '🔋', '🔌', '💡', '🔦', '🕯', '🗑', '🛢', '💸', '💵', '💴', '💶', '💷', '💰', '💳', '🧾', '💎', '⚖️', '🔧', '🔨', '⚒', '🛠', '⛏', '🔩', '⚙️', '⛓', '🔫', '💣', '🔪', '🗡', '⚔️', '🛡', '🚬', '⚰️', '⚱️', '🏺', '🧭', '🧱', '🔮', '🧿', '🧸', '📿', '💈', '⚗️', '🔭', '🧰', '🧲', '🧪', '🧫', '🧬', '🧯', '🔬', '🕳', '💊', '💉', '🌡', '🚽', '🚰', '🚿', '🛁', '🛀', '🛀🏻', '🛀🏼', '🛀🏽', '🛀🏾', '🛀🏿', '🧴', '🧵', '🧶', '🧷', '🧹', '🧺', '🧻', '🧼', '🧽', '🛎', '🔑', '🗝', '🚪', '🛋', '🛏', '🛌', '🖼', '🛍', '🧳', '🛒', '🎁', '🎈', '🎏', '🎀', '🎊', '🎉', '🧨', '🎎', '🏮', '🎐', '🧧', '✉️', '📩', '📨', '📧', '💌', '📥', '📤', '📦', '🏷', '📪', '📫', '📬', '📭', '📮', '📯', '📜', '📃', '📄', '📑', '📊', '📈', '📉', '🗒', '🗓', '📆', '📅', '📇', '🗃', '🗳', '🗄', '📋', '📁', '📂', '🗂', '🗞', '📰', '📓', '📔', '📒', '📕', '📗', '📘', '📙', '📚', '📖', '🔖', '🔗', '📎', '🖇', '📐', '📏', '📌', '📍', '✂️', '🖊', '🖋', '✒️', '🖌', '🖍', '📝', '✏️', '🔍', '🔎', '🔏', '🔐', '🔒', '🔓'), 12 | 'symbols' => array('❤️', '🧡', '💛', '💚', '💙', '💜', '🖤', '💔', '❣️', '💕', '💞', '💓', '💗', '💖', '💘', '💝', '💟', '☮️', '✝️', '☪️', '🕉', '☸️', '✡️', '🔯', '🕎', '☯️', '☦️', '🛐', '⛎', '♈️', '♉️', '♊️', '♋️', '♌️', '♍️', '♎️', '♏️', '♐️', '♑️', '♒️', '♓️', '🆔', '⚛️', '🉑', '☢️', '☣️', '📴', '📳', '🈶', '🈚️', '🈸', '🈺', '🈷️', '✴️', '🆚', '💮', '🉐', '㊙️', '㊗️', '🈴', '🈵', '🈹', '🈲', '🅰️', '🅱️', '🆎', '🆑', '🅾️', '🆘', '❌', '⭕️', '🛑', '⛔️', '📛', '🚫', '💯', '💢', '♨️', '🚷', '🚯', '🚳', '🚱', '🔞', '📵', '🚭', '❗️', '❕', '❓', '❔', '‼️', '⁉️', '🔅', '🔆', '〽️', '⚠️', '🚸', '🔱', '⚜️', '🔰', '♻️', '✅', '🈯️', '💹', '❇️', '✳️', '❎', '🌐', '💠', 'Ⓜ️', '🌀', '💤', '🏧', '🚾', '♿️', '🅿️', '🈳', '🈂️', '🛂', '🛃', '🛄', '🛅', '🚹', '🚺', '🚼', '🚻', '🚮', '🎦', '📶', '🈁', '🔣', 'ℹ️', '🔤', '🔡', '🔠', '🆖', '🆗', '🆙', '🆒', '🆕', '🆓', '0️⃣', '1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣', '🔟', '🔢', '#️⃣', '*️⃣', '⏏️', '▶️', '⏸', '⏯', '⏹', '⏺', '⏭', '⏮', '⏩', '⏪', '⏫', '⏬', '◀️', '🔼', '🔽', '➡️', '⬅️', '⬆️', '⬇️', '↗️', '↘️', '↙️', '↖️', '↕️', '↔️', '↪️', '↩️', '⤴️', '⤵️', '🔀', '🔁', '🔂', '🔄', '🔃', '🎵', '🎶', '➕', '➖', '➗', '✖️', '♾', '💲', '💱', '™️', '©️', '®️', '〰️', '➰', '➿', '🔚', '🔙', '🔛', '🔝', '🔜', '✔️', '☑️', '🔘', '⚪️', '⚫️', '🔴', '🔵', '🔺', '🔻', '🔸', '🔹', '🔶', '🔷', '🔳', '🔲', '▪️', '▫️', '◾️', '◽️', '◼️', '◻️', '⬛️', '⬜️', '🔈', '🔇', '🔉', '🔊', '🔔', '🔕', '📣', '📢', '👁‍🗨', '💬', '💭', '🗯', '♠️', '♣️', '♥️', '♦️', '🃏', '🎴', '🀄️', '🕐', '🕑', '🕒', '🕓', '🕔', '🕕', '🕖', '🕗', '🕘', '🕙', '🕚', '🕛', '🕜', '🕝', '🕞', '🕟', '🕠', '🕡', '🕢', '🕣', '🕤', '🕥', '🕦', '🕧') 13 | ); 14 | 15 | if (isset($_POST['emoji'])) { 16 | echo json_encode($emoji); 17 | } -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | 您现在使用的是 MWordStar 的开发版,开发板暂无版本号。点击查看发行版

    7 |

    主题使用帮助 点击查看帮助文档 ,在使用过程中有什么问题或疑问都可以到 留言板主题介绍页 留言,因为我有两个主题,为了更高效的解决问题,建议到 主题介绍页 留言,

    8 | 9 | 10 | 11 | 12 |
    13 |

    导出主题配置文件 可以把主题外观设置导出为 JSON 文件,主要用来备份主题设置,导入主题配置文件 可以导入 MWordStar 主题的 JSON 配置文件。Typecho 切换主题的时候会清空主题设置,为了避免重复设置,在切换主题之前可以先导出主题设置配置。

    14 |
    15 |

    选项目录

    16 |
      17 | 18 |
      19 | EOT; 20 | echo ''; 23 | 24 | echo ''; 27 | require_once __DIR__ . '/../components/link-editor.php'; 28 | 29 | // 语言 30 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('language', array( 31 | 'zh-CN' => '简体中文', 32 | 'en' => 'English', 33 | 'auto' => '自动选择语言' 34 | ), 'zh-CN', _t('默认显示的语言'), _t('自动选择语言会根据 HTTP 发送的语言偏好来选择语言,如果用户的语言偏好不是主题支持的语言,或者 HTTP 请求不包含语言偏好,默认选择英文。你还可以开启顶部导航栏的语言切换按钮或侧边栏添加一个语言选择组件来让用户手动更改语言,用户选择的语言会通过 Cookie 保存到用户的浏览器,下次访问时就会使用用户设置的语言。'))); 35 | 36 | // 语言切换按钮 37 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('changeLanguageBtn', array( 38 | 'show' => '启用', 39 | 'hide' => '禁用', 40 | ), 'show', _t('语言切换按钮'), _t('语言切换按钮会显示在顶部导航栏的搜索区域左侧,用户可以手动更改语言。'))); 41 | 42 | // 主题配色 43 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('color', array( 44 | 'light-color1' => '配色1', 45 | 'light-color2' => '配色2', 46 | 'primary-color' => '配色3', 47 | 'info-color' => '配色4', 48 | 'success-color' => '配色5', 49 | 'dark-color' => '配色6(深色模式)' 50 | ), 'light-color2', _t('默认主题配色'), _t('访问者没有手动更改过配色的情况下默认使用的配色'))); 51 | 52 | // 主题配色切换按钮 53 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('colorChangeBtn', array( 54 | 'show' => '显示', 55 | 'hide' => '不显示' 56 | ), 'show', _t('在网站右下方显示主题配色切换按钮'), _t('主题配色切换按钮可以让访问者手动切换深色模式和浅色模式'))); 57 | 58 | // 默认浅色 59 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('defaultLightColor', array( 60 | 'light-color1' => '配色1', 61 | 'light-color2' => '配色2', 62 | 'primary-color' => '配色3', 63 | 'info-color' => '配色4', 64 | 'success-color' => '配色5' 65 | ), 'light-color2', _t('默认浅色'), _t('主题配色切换按钮可以在深色和浅色之间切换,主题有多个浅色配色,您需要设置一个浅色作为浅色模式的默认配色。'))); 66 | 67 | // 主题元素风格设置 68 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('rounded', array( 69 | 'fillet' => '圆角', 70 | 'rightAngle' => '直角' 71 | ), 'fillet', _t('主题元素风格'), _t('这里的元素风格包括了 区块、按钮、输入表单、标签'))); 72 | 73 | // 站点Logo 74 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('logoUrl', null, null, _t('站点 Logo icon 地址'), _t('Logo 是一个 ico 格式的 icon 图标,会显示在标签页的标题前面。'))); 75 | 76 | // 站点副标题 77 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('tagline', null, '生命不息,折腾不止', _t('站点副标题'), _t('站点副标题会显示在标签页标题的后面。'))); 78 | 79 | // ICP信息 80 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('icp', null, null, _t('ICP 备案号'), _t('ICP 备案号会显示在网站的底部,可支持链接。'))); 81 | 82 | // 返回顶部按钮 83 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('toTop', array( 84 | 'show' => '显示', 85 | 'hide' => '不显示' 86 | ), 'show', _t('在右下方显示返回顶部按钮'))); 87 | 88 | // 文章列表链接跳转 89 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('listLinkOpen', array( 90 | '_self' => '直接从当前标签页跳转', 91 | '_blank' => '在新标签页中打开' 92 | ), '_self', _t('文章列表的文章链接跳转方式'), _t('这里的文章列表包括 首页、分类页、标签页、搜索页 左侧的文章链接。'))); 93 | 94 | // 侧边栏链接跳转 95 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('sidebarLinkOpen', array( 96 | '_self' => '直接从当前标签页跳转', 97 | '_blank' => '在新标签页中打开' 98 | ), '_self', _t('侧边栏链接跳转方式'), _t('侧边栏链接包括了 最新文章区域、最新评论区域、文章分类区域、标签云区域、文章归档区域。'))); 99 | 100 | // 文章内容链接 101 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('postLinkOpen', array( 102 | '_self' => '直接从当前标签页跳转', 103 | '_blank' => '在新标签页中打开' 104 | ), '_blank', _t('文章内的链接跳转方式'), _t('文章内的链接包括了普通文章中插入的链接和独立页面中插入的链接。'))); 105 | 106 | // 侧边栏组件顺序 107 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('sidebarComponent', null, '博客信息,日历,搜索,最新文章,最新回复,文章分类,标签云,文章归档,其它功能,友情链接', _t('侧边栏组件'), _t('您可以设置需要显示在侧边栏的组件,组件会根据这里的组件名称排序。组件名称之间用英文逗号分隔,逗号和名称之间不需要空格,结尾不需要逗号。例如 博客信息,自定义,日历,搜索,最新文章,最新回复,文章分类,标签云,文章归档,其它功能,友情链接 。自定义组件主要用于显示自定义 HTML,开启后需要在下方的 侧边栏自定义 HTML 内容 表单填写内容后才会显示。'))); 108 | 109 | // 文章页的侧边栏组件顺序 110 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('postPageSidebarComponent', null, '博客信息,最新文章,目录', _t('文章页的侧边栏组件'), _t('这里可以单独设置文章页的侧边栏组件,组件会根据这里的组件名称排序。组件名称之间用英文逗号分隔,逗号和名称之间不需要空格,结尾不需要逗号。例如 博客信息,最新文章,目录 。其中目录组件只能在文章页显示,目录列表项会根据文章内插入的标题生成,如果文章内没有插入标题就不会显示目录,目录组件滚动到页面上方时位置会被固定,建议把目录放到最后。'))); 111 | 112 | // 隐藏登录入口 113 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('loginLink', array( 114 | 'show' => '显示', 115 | 'hide' => '隐藏' 116 | ), 'show', _t('登录入口'), _t('隐藏登录入口后在前台就不会显示登录入口,只能通过 域名/admin/login.php 进入登录页面'))); 117 | 118 | // 侧边栏博客信息博主头像地址 119 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('avatarUrl', null, null, _t('博主头像地址'), _t('博主头像会显示在侧边栏的博客信息区域,如果省略会使用管理员的 Gravatar 头像。'))); 120 | 121 | // 侧边栏博客信息区域博主昵称 122 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('nickname', null, null, _t('博主昵称'), _t('博主昵称会显示在侧边栏博客信息区域,如果省略会显示管理员昵称。'))); 123 | 124 | // 侧边栏博客信息博主昵称链接 125 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('nicknameUrl', null, null, _t('博主昵称链接调转地址'), _t('在侧边栏的博客信息区域会显示一个包含博主昵称的链接,在这里可以填写链接的跳转地址,如果省略会使用博客首页地址。'))); 126 | 127 | // 侧边栏博客信息博主简介 128 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('Introduction', null, null, _t('博主简介'), _t('博主简介会显示在侧边栏博客信息区域的博主昵称下方,如果省略会使用设置中的站点描述信息。'))); 129 | 130 | // 侧边栏博客信息的运行天数 131 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('birthday', null, null, _t('站点创建时间'), _t('在这里填写站点创建时间后,在侧边栏的博客信息区域就会显示网站运行天数。如果省略 网站运行天数会从管理员账号创建的时间开始计算天数。站点创建时间的格式为:yyyy-mm-dd,例如:2019-11-11。'))); 132 | 133 | // 侧边栏文章归档月份数量 134 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('postArchiveCount', null, '0', _t('侧边栏文章归档月份数量'), _t('您可以设置侧边栏文章归档要显示的月份数量,对于归档月份较多的博客来说,限制显示的月份数量可以避免侧边栏的文章归档过长。0 为不限制。'))); 135 | 136 | // 文章归档页面地址 137 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('archivePageUrl', null, null, _t('文章归档页面地址'), _t('如果您启用了独立页文章归档并且限制了侧边栏的文章归档数量的话,可以在这里输入独立页文章归档的地址。填写独立页文章归档地址后在侧边栏的文章归档会显示 查看更多 的链接,点击就可以跳转到文章归档页。如果为空将不会显示 查看更多 链接。'))); 138 | 139 | // 侧边栏标签数量 140 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('tagCount', null, '0', _t('侧边栏标签云标签数量'), _t('对于标签较多的博客,可以设置侧边栏显示的标签数量,0 为不限制。'))); 141 | 142 | // 标签云页面地址 143 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('tagPage', null, null, _t('标签云页面地址'), _t('如果您启用了独立的标签云页面并且限制了侧边栏的标签数量的话,可以在这里输入标签云页面的地址。填写后在侧边栏的标签云区域会显示查看更多的链接,点击就可以跳转到独立的标签云页面。如果为空将不会显示 查看更多 的链接。'))); 144 | 145 | // 侧边栏自定义HTML标题 146 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('customizeTitle', null, '公告', _t('侧边栏自定义 HTML 组件标题'), _t('如果您启用了侧边栏的自定义 HTML 组件,可以在这里给组件设置一个标题,这个标题会显示在组件上方。'))); 147 | 148 | // 侧边栏自定义HTML 149 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('customizeHTML', null, null, _t('侧边栏自定义 HTML 内容'), _t('如果您启用了侧边栏的自定义 HTML 组件,可以在这里输入 HTML,支持纯文本和 HTML,包括 img、audio、video、canvas。您可以用来设置网站公告内容或广告。'))); 150 | 151 | // 文章列表显示设置 152 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('postListStyle', array( 153 | 'fullText' => '文章列表直接显示全文', 154 | 'summary' => '文章列表显示摘要和文章头图' 155 | ), 'summary', _t('文章列表显示'), _t('文章列表包括首页、搜索页、归档 左侧的文章列表。在显示全文的情况下,文章列表不会显示文章头图,显示全文也支持使用 <!--more--> 来手动分隔摘要。如果你想自定义单篇文章的列表显示,你也可以在文章编辑页单独设置列表显示。'))); 156 | 157 | // 文章摘要字数 158 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('summary', null, '150', _t('文章摘要字数'), _t('首页、分类页、标签页、搜索页 的文章摘要字数,默认为:150个字。'))); 159 | 160 | // 文章头图设置 161 | $headerImage = new Typecho_Widget_Helper_Form_Element_Checkbox('headerImage', array( 162 | 'home' => _t('在文章列表显示文章头图'), 163 | 'sidebarBlock' => _t('在侧边栏的最新文章区域显示文章头图'), 164 | 'post' => _t('在文章页显示文章头图') 165 | ), array('home', 'post'), _t('文章头图设置')); 166 | $form->addInput($headerImage->multiMode()); 167 | 168 | // 文章列表的文章头图样式 169 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('postListHeaderImageStyle', array( 170 | 'max' => '大图(文章头图在上方,文章标题和摘要在下方)', 171 | 'mini' => '小图(图片在左侧,文章摘要在右侧)' 172 | ), 'max', _t('文章列表的文章头图样式'), _t('这里可以统一设置文章头图的样式,您也可以在文章编辑页给文章单独设置头图样式。大图的图片长宽比为 8 比 3,小图的长宽比为 6 比 4,如果图片长宽比不符合要求,主题会自动裁剪图片来适配长宽比。'))); 173 | 174 | // 文章头图背景颜色 175 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('headerImageBg', array( 176 | 'random' => '随机颜色', 177 | 'gray' => '灰色', 178 | 'white' => '白色' 179 | ), 'gray', _t('文章头图背景颜色'), _t('文章头图背景颜色是在图片加载完成之前或图片无法加载时显示的颜色,如果图片使用了透明背景是可以看到背景颜色的。'))); 180 | 181 | // 默认文章头图 182 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('headerImageUrl', null, null, _t('默认文章头图'), _t('这里可以填写默认的文章头图 URL,一行一个,系统会在默认文章头图地址中随机选择一个来加载文章头图。要使用默认文章头图,文章编辑页的文章头图来源需要设置为 使用系统设置。'))); 183 | 184 | // 显示最后编辑时间 185 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('modified', array( 186 | 'show' => '显示', 187 | 'hide' => '不显示' 188 | ), 'show', _t('在文章下方显示最后修改时间'))); 189 | 190 | // 移动设备章节目录 191 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('directoryMobile', array( 192 | 'enable' => '启用', 193 | 'disabled' => '禁用' 194 | ), 'enable', _t('移动设备章节目录'), _t('开启后在没有侧边栏的小屏移动设备右下方会显示一个目录按钮,点击可以打开章节目录列表。'))); 195 | 196 | // 启用代码高亮功能 197 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('codeHighlight', array( 198 | 'enable-highlight' => '启用', 199 | 'disabled-highlight' => '禁用' 200 | ), 'enable-highlight', _t('代码高亮'), _t('您可以设置是否启用文章内的代码块高亮,如果您需要使用其他代码高亮插件的话,可以禁用主题自带的代码高亮功能。'))); 201 | 202 | // 显示代码行号 203 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('codeLineNum', array( 204 | 'show' => '显示', 205 | 'hide' => '不显示' 206 | ), 'hide', _t('代码块显示行号'), _t('开启后文章的代码块会显示行号'))); 207 | 208 | // 代码块配色 209 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('codeThemeColor', array( 210 | 'stackoverflow-light' => 'Stack Overflow(浅色)', 211 | 'github-dark' => 'Github(深色)', 212 | 'sunburst' => 'Sunburst(高对比度)', 213 | 'auto' => '跟随主题配色模式' 214 | ), 'github-dark', _t('代码块颜色主题'), _t('跟随主题配色模式会根据主题的配色来选择代码块主题,浅色模式会使用 Stack Overflow(浅色),深色模式会使用 Github(深色)。'))); 215 | 216 | // 图片懒加载 217 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('imagelazyloading', array( 218 | 'on' => '启用', 219 | 'off' => '禁用' 220 | ), 'off', _t('图片懒加载'), _t('开启后文章内的图片不会自动加载,只有图片进入页面可视区才会加载'))); 221 | 222 | // 文章底部的交互功能配置 223 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('engagementSection', null, '点赞,分享', _t('文章底部的交互功能'), _t('文章底部要使用的交互功能,支持 点赞,打赏,分享,功能名称之间用英文逗号分隔,逗号之间不需要空格,结尾不需要逗号,功能按钮的顺序会根据这里设置的名称顺序排序。'))); 224 | 225 | // 打赏二维码地址 226 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('rewardQr', null, '', _t('打赏二维码图片地址'), _t('文章下方的打赏按钮点击后可以显示一个二维码图片,你可以在这里设置图片地址,图片的最大宽度就是文章区域的宽度,高度不限制,图片会居中显示。'))); 227 | 228 | // 评论框位置 229 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('commentInput', array( 230 | 'top' => '评论框在评论列表上方', 231 | 'bottom' => '评论框在评论列表下方' 232 | ), 'bottom', _t('评论框位置'), _t('评论框就是发表评论的区域,评论列表就是已发表的评论区域'))); 233 | 234 | // 评论日期时间格式 235 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('commentDateFormat', array( 236 | 'format1' => '2020年04月23日 13:09', 237 | 'format2' => '2020-04-23 13:09', 238 | 'format3' => 'April 23rd, 2020 at 01:09 pm', 239 | 'format4' => '时间间隔(3天前)' 240 | ), 'format1', _t('评论日期时间格式'), _t('时间间隔的单位会根据间隔长短变化,不到一分钟的单位为 秒,一分钟以上、一小时以下的单位为 分钟,一小时以上、一天以下的单位为 小时,一天以上的单位为 天,'))); 241 | 242 | // QQ头像 243 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('QQAvatar', array( 244 | 'on' => '开启', 245 | 'off' => '关闭' 246 | ), 'off', _t('使用QQ头像'), _t('开启后如果检测到评论者的邮箱为QQ邮箱就会显示对应的QQ头像,即便QQ邮箱注册了Gravatar也会显示QQ头像,QQ邮箱以外的邮箱会显示Gravatar头像。'))); 247 | 248 | // 自定义 Gravatar 地址 249 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('gravatarUrl', null, '', _t('自定义 Gravatar 源'), _t('Gravatar 头像服务在有些地区可能无法正常使用,如果你需要更换 Gravatar 源的话,可以在这里输入 URL,留空会使用官方源。'))); 250 | 251 | // Emoji面板 252 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('emojiPanel', array( 253 | 'on' => '开启', 254 | 'off' => '关闭' 255 | ), 'off', _t('评论区Emoji表情选择面板'), _t('开启后会在评论区的评论内容输入框下方显示一个 Emoji表情按钮,点击后会显示一个 Emoji表情面板。'))); 256 | 257 | // 导航栏 258 | $navBar = new Typecho_Widget_Helper_Form_Element_Checkbox('navbar', array( 259 | 'showClassification' => _t('显示文章分类'), 260 | 'showSearch' => _t('显示搜索'), 261 | ), array('showSearch'), _t('导航栏')); 262 | $form->addInput($navBar->multiMode()); 263 | 264 | // 自定义导航栏链接 265 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('navLinks', null, null, _t('自定义导航栏链接'), _t('您可以在导航栏添加自定义链接,链接的名称和 URL 都可以自定义,导航栏链接需要使用 JSON 配置 点击查看配置说明。'))); 266 | 267 | // 导航栏图片 logo 268 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('navLogoUrl', null, null, _t('站点 Logo 图片地址'), _t('站点 Logo 图片会显示在顶部导航栏的左侧,支持常见的图片格式,包括 SVG,只要能在 img 标签显示的图片都可以,留空会使用站点名称作为 Logo。'))); 269 | 270 | // 站点 logo 图片高度限制 271 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('navLogoHeight', null, '30', _t('站点 Logo 图片高度限制'), _t('如果您发现导航栏 Logo 图片尺寸较小或过大的话,可以调整 Logo 图片的高度,可以直接填入数字,不需要加 px。'))); 272 | 273 | // 面包屑导航 274 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('breadcrumb', array( 275 | 'on' => '开启', 276 | 'off' => '关闭' 277 | ), 'off', _t('面包屑导航'), _t('开启后会在导航栏下方显示路劲导航。'))); 278 | 279 | // 首页友链 280 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('homeLinks', null, null, _t('首页友情链接'), _t('首页友情链接只会显示在首页的侧边栏,需要 JSON 格式数据 点击查看友情链接格式说明,你也可以使用链接编辑器编辑,无需手动输入 JSON。。 '))); 281 | 282 | // 全站友链 283 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('links', null, null, _t('全站友情链接'), _t('全站友情链接会在每个页面的侧边栏显示,需要 JSON 格式数据 点击查看友情链接格式说明,你也可以使用链接编辑器编辑,无需手动输入 JSON。 '))); 284 | 285 | // 独立页友链 286 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('pageLinks', null, null, _t('独立页友情链接'), _t('独立页友情链接只会在友情链接的页面显示,需要 JSON 格式数据 点击查看友情链接页面创建和格式说明,你也可以使用链接编辑器编辑,无需手动输入 JSON。 '))); 287 | 288 | // PJAX 289 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('pjax', array( 290 | 'on' => '启用', 291 | 'off' => '禁用' 292 | ), 'off', _t('启用PJAX'), _t('PJAX 在页面跳转时只会更新内容部分,不会刷新整个页面,可以实现类似于单页应用的使用体验。注意,目前 Typecho 主题的 PJAX 还无法做到和 Typecho 程序完美兼容,如果要启用 PJAX,需要在 Typecho 评论设置中关闭 开启反垃圾保护检查评论来源页 URL 是否与文章链接一致,否则评论可能无法成功发送!'))); 293 | 294 | // PJAX进度条 295 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Radio('pjaxProgressBar', array( 296 | 'on' => '启用', 297 | 'off' => '禁用' 298 | ), 'on', _t('PJAX进度条'), _t('PJAX 进度条会显示在页面顶部,在 PJAX 页面内容更新时,进度条会显示更新进度,更新完成后进度条会隐藏。禁用 PJAX 进度条不会影响 PJAX 功能。'))); 299 | 300 | // PJAX进度条颜色 301 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Text('pjaxProgressBarColor', null, '#3F85ED', _t('PJAX进度条颜色'), _t('支持 CSS 的颜色值,例如 #FF0000redrgb(255, 0, 0)。'))); 302 | 303 | // PJAX更新完成后执行的代码 304 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('pjaxEnd', null, null, _t('PJAX 更新完成后要执行的 JS 代码'), _t('这里的 JS 代码会在页面内容更新完成后执行,你可以直接填写 JS 代码,不需要加 script 标签。注意,使用 Webpack 打包的带 bundle 后缀的发行版不支持这个选项,只有 clone 项目和 Source code 支持!'))); 305 | 306 | // 自定义CSS 307 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('cssCode', null, null, _t('自定义 CSS'), _t('通过自定义 CSS 您可以很方便的设置页面样式,自定义 CSS 不会影响网站源代码。'))); 308 | 309 | // 自定义 head 输出的 HTML 310 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('headHTML', null, null, _t('自定义 head 区域输出的 HTML'), _t('head 区域的 HTML 会在 head 内输出,可以用来定义一些网站统计的 JS 之类的。'))); 311 | 312 | // 自定义 body 底部的 HTML 313 | $form->addInput(new Typecho_Widget_Helper_Form_Element_Textarea('bodyHTML', null, null, _t('自定义 body 底部输出的 HTML'), _t('body 底部的 HTML 会在 footer 之后 body 尾部之前输出。'))); 314 | } -------------------------------------------------------------------------------- /inc/theme-fields.php: -------------------------------------------------------------------------------- 1 | addItem(new Typecho_Widget_Helper_Form_Element_Select('postListStyle', array( 7 | 'default' => '使用系统设置', 8 | 'fullText' => '文章列表直接显示全文', 9 | 'summary' => '文章列表显示摘要和文章头图' 10 | ), 'default', _t('文章列表显示'), _t('文章列表包括首页、搜索页、归档 左侧的文章列表。在显示全文的情况下,文章列表不会显示文章头图,显示全文也支持使用 <!--more--> 来手动分隔摘要。'))); 11 | 12 | // 文章头图显示设置 13 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Select('headerImgDisplay', array( 14 | 'default' => '使用系统设置', 15 | 'post-page-list' => '在文章列表和文章页显示文章头图', 16 | 'post-list' => '只在文章列表显示文章头图', 17 | 'post-page' => '只在文章页显示文章头图', 18 | 'hide' => '不显示文章头图' 19 | ), 'default', _t('文章头图显示设置'), _t('您可以单独给文章设置文章头图显示。'))); 20 | 21 | // 文章头图样式 22 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Select('postListHeaderImageStyle', array( 23 | 'default' => '使用系统设置', 24 | 'max' => '大图(文章头图在上方,标题和摘要在下方)', 25 | 'mini' => '小图(图片在左侧,文章摘要在右侧)' 26 | ), 'default', _t('文章列表的头图样式'), _t('您可以给文章设置单独的文章头图样式。大图的图片长宽比为 8 比 3,小图的长宽比为 6 比 4,如果图片长宽比不符合要求,主题会自动裁剪图片来适配长宽比。'))); 27 | 28 | // 文章头图来源 29 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Select('imageSource', array( 30 | 'article' => '使用文章中的第一张图片作为文章头图', 31 | 'url' => '在文章头图输入框手动输入图片URL', 32 | 'default' => '使用系统设置' 33 | ), 'article', _t('文章头图来源'), _t('如果选择了使用文章中的第一张图片作为文章头图,在文章不包含图片的情况下将不会显示文章头图。如果选择了使用系统设置,需要在主题设置的默认文章头图输入框填写图片 URL,系统会在默认文章头图中随机选择一个 URL 加载。'))); 34 | 35 | // 文章头图 36 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Text('thumb', null, null, _t('文章头图'), _t('如果您在文章头图来源中设置了手动输入图片 URL 的话,请在这里输入图片 URL。'))); 37 | 38 | // 自定义文章摘要内容 39 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Textarea('summaryContent', null, null, _t('自定义摘要内容'), _t('您可以在此处为文章定义摘要内容,此处定义的摘要内容不受字数限制。'))); 40 | 41 | // 显示版权声明 42 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Select('articleCopyright', array( 43 | 'show' => '显示', 44 | 'hide' => '不显示' 45 | ), 'show', _t('显示原创声明'), _t('开启后会在本篇文章底部显示版权声明。'))); 46 | 47 | // 自定义关键词 48 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Text('keywords', null, null, _t('自定义关键词'), _t('您可以输入这篇文章的关键词,多个关键词之间用英文逗号分隔,如果为空 会使用这篇文章的标签作为关键词。'))); 49 | 50 | // 文章有效期 51 | $layout->addItem(new Typecho_Widget_Helper_Form_Element_Text('expired', null, '0', _t('文章有效期'), _t('有的文章可能只是在某个时间段内有用,发布后如果长时间不更新的话,可能会给读者带去错误的信息。文章有效期可以设置一个天数,过了指定天数后,在文章开头会显示一条警示信息。0 或留空不显示。'))); 52 | } -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 点击查看使用说明 4 | * 5 | * @package MWordStar 6 | * @author Mr. Ma 7 | * @version 开发板(暂无版本号) 8 | * @link https://www.misterma.com 9 | */ 10 | if (!defined('__TYPECHO_ROOT_DIR__')) exit; 11 | // 获取元素风格设置 12 | $rounded = $this->options->rounded == 'rightAngle'?'rounded-0':''; 13 | 14 | $GLOBALS['page'] = 'index'; 15 | 16 | // 语言初始化 17 | languageInit($this->options->language); 18 | // 检查数据库字段 19 | checkField(); 20 | // 头文件 21 | $this->need('components/header.php'); 22 | ?> 23 |
      24 |
      25 |
      26 |
      27 | have()): ?> 28 | need('components/post-list.php'); ?> 29 | 32 | 33 |
      34 | 35 |
      36 | 37 |
      38 | need('components/sidebar.php'); ?> 39 |
      40 |
      41 |
      42 | need('components/footer.php'); ?> 43 | -------------------------------------------------------------------------------- /languages/en.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'home' => 'Home', 6 | 'search' => 'Search', 7 | 'navigationMenu' => 'Navigation menu' 8 | ), 9 | 'post' => array( 10 | 'publicationDate' => 'Publication date', 11 | 'author' => 'Author', 12 | 'views' => 'Views', 13 | 'readMore' => 'Read More', 14 | 'comments' => 'Comments', 15 | 'edit' => 'Edit', 16 | 'category' => 'Category', 17 | 'tag' => 'Tag', 18 | 'previousPost' => 'Previous Post', 19 | 'nextPost' => 'Next Post', 20 | 'none' => 'None', 21 | 'warningMessage' => 'This article was published %d days ago. The information may no longer be current or could have changed since then.', 22 | 'enterThePasswordToViewIt' => 'Enter the password to view it', 23 | 'enterYourPassword' => 'Enter your password', 24 | 'thisPostIsPasswordProtected' => 'This post is password protected', 25 | 'submit' => 'Submit', 26 | 'like' => 'Like', 27 | 'share' => 'Share', 28 | 'shareOnWeibo' => 'Share on Weibo', 29 | 'shareOnQzone' => 'Share on Qzone', 30 | 'shareOnTwitter' => 'Share on Twitter', 31 | 'scanTheQRCodeBelowToViewAndShareThisPageOnYourPhone' => 'Scan the QR code below to view and share this page on your phone.', 32 | 'QRCode' => 'QR Code', 33 | 'donate' => 'Donate', 34 | 'copyrightNotice' => array( 35 | '© All rights reserved', 36 | 'This article is an original work. Copyright belongs to %s. Please contact the author for permission before reprinting.' 37 | ), 38 | 'postInfo' => 'Post Info', 39 | 'updated' => 'Updated: %s', 40 | 'featuredImage' => 'Featured Image' 41 | ), 42 | 'comment' => array( 43 | 'leaveAComment' => 'Leave a Comment', 44 | 'commentContent' => 'Comment Content', 45 | 'enterYourCommentHere' => 'Enter your comment here', 46 | 'name' => 'Name', 47 | 'enterYourNameOrNickname' => 'Enter your name or nickname', 48 | 'emailAddress' => 'Email Address', 49 | 'enterYourEmailAddress' => 'Enter your email address (will not be published)', 50 | 'website' => 'Website', 51 | 'enterYourWebsiteOrBlogURL' => 'Enter your website or blog URL', 52 | 'submitComment' => 'Submit Comment', 53 | 'reply' => 'Reply', 54 | 'replyTo' => 'Reply to', 55 | 'thereAreNumComments' => 'There are %d comments', 56 | '1Comment' => '1 Comment', 57 | 'cancelReply' => 'Cancel reply', 58 | 'pendingReview' => 'Pending Review', 59 | 'pendingReviewDescription' => 'Only you can see this comment. It will be visible to others once approved.', 60 | 'loggedInAs' => 'Logged in as: ' 61 | ), 62 | 'emoji' => array( 63 | 'emoji' => 'Emoji', 64 | 'smileys' => 'Smileys', 65 | 'peopleAndGestures' => 'People & Gestures', 66 | 'clothingAndAccessories' => 'Clothing & Accessories', 67 | 'animalsAndNature' => 'Animals & Nature', 68 | 'food' => 'Food', 69 | 'activity' => 'Activity', 70 | 'travelAndPlaces' => 'Travel & Places', 71 | 'objects' => 'Objects', 72 | 'symbols' => 'Symbols', 73 | 'pressEnterToAddTheEmojiToTheCommentInputField' => '(Press Enter to add the emoji to the comment input field)', 74 | 'emojiList' => 'Emoji list', 75 | 'emojiPanel' => 'Emoji panel (Press ESC to close and focus on the comment input field.)', 76 | 'emojiCategories' => 'Emoji Categories' 77 | ), 78 | 'sidebar' => array( 79 | 'blogInfo' => 'Blog Info', 80 | 'totalPosts' => 'Total Posts %d', 81 | 'totalComments' => 'Comments', 82 | 'totalViews' => 'Total Views %d', 83 | 'runningSince' => array('Running Since', '%d days'), 84 | 'latestPosts' => 'Latest Posts', 85 | 'recentComments' => 'Recent Comments', 86 | 'categories' => 'Categories', 87 | 'tags' => 'Tags', 88 | 'tagPostCount' => '%d posts', 89 | 'archives' => 'Archives', 90 | 'usefulLinks' => 'Useful Links', 91 | 'other' => 'Other', 92 | 'login' => 'Log in', 93 | 'logout' => 'Log Out', 94 | 'RSSforPosts' => 'RSS for Posts', 95 | 'RSSforComments' => 'RSS for Comments', 96 | 'dashboard' => 'Dashboard (%s)', 97 | 'commentOn' => 'Comment on %s', 98 | 'tableOfContents' => 'Table of Contents', 99 | 'closeTableOfContents' => 'Close Table of Contents', 100 | 'noPostsAvailableToDisplay' => 'No posts available to display.', 101 | 'noCommentsOrRepliesAvailableToDisplay' => 'No comments or replies available to display.', 102 | 'noCategoriesAvailableToDisplay' => 'No categories available to display.', 103 | 'noTagsAvailableToDisplay' => 'No tags available to display.', 104 | 'coPostsAvailableToGenerateAnArchive' => 'No posts available to generate an archive.', 105 | 'previousAndNextMonths' => 'Previous and next months', 106 | 'calendar' => '%s calendar', 107 | 'viewMore' => 'View More', 108 | 'viewMoreTags' => 'View More Tags' 109 | ), 110 | 'archive' => array( 111 | 'postsUnderTheCategory' => 'Posts under the category %s', 112 | 'postsTagged' => 'Posts tagged %s', 113 | 'postsByAuthor' => 'Posts by author %s', 114 | 'postsContainingTheKeyword' => 'Posts containing the keyword %s', 115 | 'noPostsFoundContaining' => 'No posts found containing %s!', 116 | 'youCanTryTheFollowing' => 'You can try the following:', 117 | 'trySearchingWithDifferentKeywords' => 'Try searching with different keywords', 118 | 'browsePostsByCategoryInTheSectionToTheRightOrBelow' => 'Browse posts by category in the section to the right or below', 119 | 'browsePostsByTagsInTheTagCloudSectionToTheRightOrBelow' => 'Browse posts by tags in the tag cloud section to the right or below' 120 | ), 121 | 'pagination' => array( 122 | 'pagination' => 'Pagination', 123 | 'nextPage' => 'Next Page (Right Arrow Key)', 124 | 'previousPage' => 'Previous Page (Left Arrow Key)', 125 | 'postContentPagination' => 'Post Content Pagination', 126 | 'commentPagination' => 'Comment Pagination' 127 | ), 128 | 'archivePage' => array( 129 | 'totalPosts' => 'Total of %d Posts' 130 | ), 131 | 'linkPage' => array( 132 | 'linksOnDedicatedPageOnly' => 'Links on Dedicated Page Only', 133 | 'linksOnHomepage' => 'Links on Homepage', 134 | 'linksOnAllPages' => 'Links on All Pages' 135 | ), 136 | 'dataPage' => array( 137 | 'basicStatistics' => 'Basic Statistics', 138 | 'basicStatisticsDescription' => 'Here are the basic statistics of the website:', 139 | 'totalPosts' => 'Total Posts', 140 | 'totalComments' => 'Total Comments', 141 | 'categories' => 'Categories', 142 | 'tags' => 'Tags', 143 | 'totalViews' => 'Total Views', 144 | 'totalLikes' => 'Total Likes', 145 | 'categoryDistribution' => 'Category Distribution', 146 | 'categoryDistributionDescription' => 'The chart below shows the distribution of posts across categories:', 147 | 'postUpdates' => 'Post Updates', 148 | 'postUpdateDescription' => 'The chart below illustrates post updates between %s, and %s:', 149 | 'commentActivity' => 'Comment Activity', 150 | 'commentActivityDescription' => 'The chart below shows comment activity between %s, and %s:', 151 | 'mostViewedPosts' => 'Most Viewed Posts', 152 | 'mostViewedPostDescription' => 'Below are the top %d most-viewed posts:', 153 | 'rank' => 'Rank', 154 | 'title' => 'Title', 155 | 'mostCommentedPosts' => 'Most Commented Posts', 156 | 'mostCommentedPostDescription' => 'Below are the top %d most-commented posts:', 157 | 'comments' => 'Comments', 158 | 'views' => 'Views', 159 | 'NoCategoryDataAvailableAtTheMoment' => 'No category data available at the moment!', 160 | 'NoPostsAvailableAtTheMoment' => 'No posts available at the moment!', 161 | 'loadingChart' => 'Loading chart...' 162 | ), 163 | 'scrollToTop' => 'Scroll to Top', 164 | 'imageLightbox' => array( 165 | 'zoomIn' => 'Zoom In', 166 | 'zoomOut' => 'Zoom Out', 167 | 'rotateLeft' => 'Rotate Left 90 Degrees', 168 | 'rotateRight' => 'Rotate Right 90 Degrees', 169 | 'closeImage' => 'Close Image' 170 | ), 171 | 'code' => array( 172 | 'copyCode' => 'Copy Code', 173 | 'copySuccess' => 'Copy Success', 174 | 'copyError' => 'Copy Error' 175 | ), 176 | 'page404' => array( 177 | 'thePageYouAreLookingForDoesNotExist' => 'The page you are looking for does not exist!', 178 | 'goBackToHomepage' => 'Go back to homepage' 179 | ), 180 | 'breadcrumb' => 'Breadcrumb', 181 | 'themeColor' => array( 182 | 'themeColor' => 'Theme Color', 183 | 'switchToDarkMode' => 'Light Mode: Switch to Dark Mode', 184 | 'switchToLightMode' => 'Dark Mode: Switch to Light Mode' 185 | ) 186 | ); -------------------------------------------------------------------------------- /languages/zh.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'home' => '首页', 6 | 'search' => '搜索', 7 | 'navigationMenu' => '导航菜单' 8 | ), 9 | 'post' => [ 10 | 'publicationDate' => '发布日期', 11 | 'author' => '作者', 12 | 'views' => '阅读量', 13 | 'readMore' => '阅读全文', 14 | 'comments' => '评论', 15 | 'edit' => '编辑', 16 | 'category' => '文章分类', 17 | 'tag' => '标签', 18 | 'previousPost' => '上一篇', 19 | 'nextPost' => '下一篇', 20 | 'none' => '没有了', 21 | 'warningMessage' => '这篇文章发布于 %d 天前,其中的信息可能已经有所发展或是发生改变!', 22 | 'enterThePasswordToViewIt' => '请输入密码访问', 23 | 'enterYourPassword' => '请在此处输入密码', 24 | 'thisPostIsPasswordProtected' => '此内容被密码保护', 25 | 'submit' => '提交', 26 | 'like' => '赞', 27 | 'share' => '分享', 28 | 'shareOnWeibo' => '分享到微博', 29 | 'shareOnQzone' => '分享到QQ空间', 30 | 'shareOnTwitter' => '分享到Twitter', 31 | 'scanTheQRCodeBelowToViewAndShareThisPageOnYourPhone' => '用手机扫描下方二维码可在手机上浏览和分享。', 32 | 'QRCode' => '二维码', 33 | 'donate' => '打赏', 34 | 'copyrightNotice' => array( 35 | '©著作权归作者所有', 36 | '本文为原创文章,版权归 %s 所有,转载请联系博主获得授权。' 37 | ), 38 | 'postInfo' => '文章信息', 39 | 'updated' => '最后编辑:%s', 40 | 'featuredImage' => '文章头图' 41 | ], 42 | 'comment' => array( 43 | 'leaveAComment' => '发表评论', 44 | 'commentContent' => '评论内容', 45 | 'enterYourCommentHere' => '请在此处输入评论内容', 46 | 'name' => '称呼', 47 | 'enterYourNameOrNickname' => '请输入您的姓名或昵称', 48 | 'emailAddress' => '电子邮件地址', 49 | 'enterYourEmailAddress' => '请输入您的电子邮件地址(不会公开)', 50 | 'website' => '网站', 51 | 'enterYourWebsiteOrBlogURL' => '请输入您的网站或博客地址', 52 | 'submitComment' => '提交评论', 53 | 'reply' => '回复', 54 | 'replyTo' => '回复', 55 | 'thereAreNumComments' => '已有 %d 条评论', 56 | '1Comment' => '仅有一条评论', 57 | 'cancelReply' => '取消回复', 58 | 'pendingReview' => '评论审核中', 59 | 'pendingReviewDescription' => '您的评论目前只有您自己能看到,审核通过后才会公开显示。', 60 | 'loggedInAs' => '登录身份: ' 61 | ), 62 | 'emoji' => array( 63 | 'emoji' => 'Emoji表情', 64 | 'smileys' => '面部表情', 65 | 'peopleAndGestures' => '人物/手势', 66 | 'clothingAndAccessories' => '服装/配饰', 67 | 'animalsAndNature' => '动物/自然', 68 | 'food' => '食物', 69 | 'activity' => '运动', 70 | 'travelAndPlaces' => '旅行/地点', 71 | 'objects' => '物体', 72 | 'symbols' => '符号', 73 | 'pressEnterToAddTheEmojiToTheCommentInputField' => '(按回车可以把表情添加到评论内容输入框)', 74 | 'emojiList' => '表情列表', 75 | 'emojiPanel' => 'Emoji表情面板(按 ESC 可关闭表情面板并转到评论内容输入框。)', 76 | 'emojiCategories' => '表情类型' 77 | ), 78 | 'sidebar' => array( 79 | 'blogInfo' => '博客信息', 80 | 'totalPosts' => '文章数 %d', 81 | 'totalComments' => '评论数 %d', 82 | 'totalViews' => '文章阅读量 %d', 83 | 'runningSince' => array('运行天数', '%d天'), 84 | 'latestPosts' => '最新文章', 85 | 'recentComments' => '最新回复', 86 | 'categories' => '文章分类', 87 | 'tags' => '标签云', 88 | 'tagPostCount' => '%d 篇文章', 89 | 'archives' => '文章归档', 90 | 'usefulLinks' => '友情链接', 91 | 'other' => '其它功能', 92 | 'login' => '登录', 93 | 'logout' => '退出登录', 94 | 'RSSforPosts' => '文章 RSS', 95 | 'RSSforComments' => '评论 RSS', 96 | 'dashboard' => '进入后台 (%s)', 97 | 'commentOn' => '发表在 $s 的评论', 98 | 'tableOfContents' => '目录', 99 | 'closeTableOfContents' => '关闭目录', 100 | 'noPostsAvailableToDisplay' => '没有可以显示的文章。', 101 | 'noCommentsOrRepliesAvailableToDisplay' => '没有可以显示的评论和回复。', 102 | 'noCategoriesAvailableToDisplay' => '没有可以显示的分类。', 103 | 'noTagsAvailableToDisplay' => '没有可以显示的标签。', 104 | 'coPostsAvailableToGenerateAnArchive' => '没有文章,无法生成文章归档。', 105 | 'previousAndNextMonths' => '上个月及下个月', 106 | 'calendar' => '%s 的日历', 107 | 'viewMore' => '查看更多', 108 | 'viewMoreTags' => '查看更多标签' 109 | ), 110 | 'archive' => array( 111 | 'postsUnderTheCategory' => '分类 %s 下的文章', 112 | 'postsTagged' => '包含 %s 标签的文章', 113 | 'postsByAuthor' => '%s 发布的文章', 114 | 'postsContainingTheKeyword' => '包含关键字 %s 的文章', 115 | 'noPostsFoundContaining' => '无法查找到包含 %s 的文章!', 116 | 'youCanTryTheFollowing' => '您可以尝试:', 117 | 'trySearchingWithDifferentKeywords' => '更换关键字重新搜索', 118 | 'browsePostsByCategoryInTheSectionToTheRightOrBelow' => '在右侧或下方的文章分类区域选择分类查找', 119 | 'browsePostsByTagsInTheTagCloudSectionToTheRightOrBelow' => '在右侧或下方的标签云区域选择标签查找' 120 | ), 121 | 'pagination' => array( 122 | 'pagination' => '分页导航', 123 | 'nextPage' => '下一页(右光标键)', 124 | 'previousPage' => '上一页(左光标键)', 125 | 'postContentPagination' => '文章内容分页', 126 | 'commentPagination' => '评论分页' 127 | ), 128 | 'archivePage' => array( 129 | 'totalPosts' => '共包含 %d 篇文章' 130 | ), 131 | 'linkPage' => array( 132 | 'linksOnDedicatedPageOnly' => '内页链接', 133 | 'linksOnHomepage' => '首页链接', 134 | 'linksOnAllPages' => '全站链接' 135 | ), 136 | 'dataPage' => array( 137 | 'basicStatistics' => '基本统计', 138 | 'basicStatisticsDescription' => '下面是网站的基本数据统计:', 139 | 'totalPosts' => '文章数', 140 | 'totalComments' => '评论数', 141 | 'categories' => '分类数', 142 | 'tags' => '标签数', 143 | 'totalViews' => '文章阅读量', 144 | 'totalLikes' => '获赞数', 145 | 'categoryDistribution' => '分类占比', 146 | 'categoryDistributionDescription' => '下面是个分类的文章占比:', 147 | 'postUpdates' => '文章更新', 148 | 'postUpdateDescription' => '下面是 %s 到 %s 的文章更新情况', 149 | 'commentActivity' => '评论动态', 150 | 'commentActivityDescription' => '下面是 %s 到 %s 的评论动态', 151 | 'mostViewedPosts' => '最多阅读的文章', 152 | 'mostViewedPostDescription' => '下面是最多阅读的 %d 篇文章:', 153 | 'rank' => '排名', 154 | 'title' => '标题', 155 | 'mostCommentedPosts' => '最多评论的文章', 156 | 'mostCommentedPostDescription' => '下面是评论数最多的 %d 篇文章:', 157 | 'comments' => '评论数', 158 | 'views' => '阅读量', 159 | 'NoCategoryDataAvailableAtTheMoment' => '目前暂无分类数据!', 160 | 'NoPostsAvailableAtTheMoment' => '目前没有任何文章!', 161 | 'loadingChart' => '正在加载图表...' 162 | ), 163 | 'scrollToTop' => '返回顶部', 164 | 'imageLightbox' => array( 165 | 'zoomIn' => '放大', 166 | 'zoomOut' => '缩小', 167 | 'rotateLeft' => '左旋转90度', 168 | 'rotateRight' => '右旋转90度', 169 | 'closeImage' => '关闭大图' 170 | ), 171 | 'code' => array( 172 | 'copyCode' => '拷贝代码', 173 | 'copySuccess' => '拷贝成功', 174 | 'copyError' => '拷贝出错' 175 | ), 176 | 'page404' => array( 177 | 'thePageYouAreLookingForDoesNotExist' => '您访问的页面不存在!', 178 | 'goBackToHomepage' => '返回首页' 179 | ), 180 | 'breadcrumb' => '页面路径', 181 | 'themeColor' => array( 182 | 'themeColor' => '主题配色', 183 | 'switchToDarkMode' => '当前为浅色模式,点击可切换为深色模式', 184 | 'switchToLightMode' => '当前为深色模式,点击可切换为浅色模式' 185 | ) 186 | ); -------------------------------------------------------------------------------- /page-archive.php: -------------------------------------------------------------------------------- 1 | options->language); 12 | $this->need('components/header.php'); 13 | ?> 14 | 15 |
      16 |
      17 | options->breadcrumb == 'on'): ?> 18 | 26 | 27 |
      28 |
      29 |
      30 |
      31 |

      32 | title() ?> 33 |

      34 |
      35 |
      36 |
      37 | to($quantity); ?> 38 |

      publishedPostsNum); ?>

      39 | publishedPostsNum)->to($archives); 42 | if ($archives->have()) { 43 | $year = 0; 44 | $mon = 0; 45 | $i = 0; 46 | $j = 0; 47 | $output = '
      '; 48 | while ($archives->next()) { 49 | $year_tmp = date('Y', $archives->created); 50 | $mon_tmp = date('m', $archives->created); 51 | $y = $year; 52 | $m = $mon; 53 | if ($year > $year_tmp || $mon > $mon_tmp) { 54 | $output .= '
      '; 55 | } 56 | if ($year != $year_tmp || $mon != $mon_tmp) { 57 | $year = $year_tmp; 58 | $mon = $mon_tmp; 59 | // 根据语言格式化年月 60 | $format = $GLOBALS['language'] == 'en' ? 'M Y' : 'Y年m月'; 61 | // 输出年和月 62 | $output .= '

      ' . date($format, $archives->created) . '

        '; //输出年份 63 | } 64 | // 根据语言使用不同的日期后缀 65 | $dayFormat = $GLOBALS['language'] == 'en' ? getDayWithSuffix($archives->created) : date('d日', $archives->created); 66 | $output .= '
      • ' . '' . $dayFormat . '
      • '; //输出文章 67 | } 68 | $output .= '
      '; 69 | echo $output; 70 | } 71 | ?> 72 |
      73 | 74 | 75 |
      76 | need('components/sidebar.php'); ?> 77 |
      78 |
      79 | 80 | need('components/footer.php'); ?> -------------------------------------------------------------------------------- /page-category.php: -------------------------------------------------------------------------------- 1 | options->language); 12 | $this->need('components/header.php'); 13 | ?> 14 | 15 |
      16 |
      17 | options->breadcrumb == 'on'): ?> 18 | 29 | 30 |
      31 |
      32 |
      33 |
      34 |

      35 | title() ?> 36 |

      37 |
      38 |
      39 |
      40 |

      共包含 个分类

      41 | widget('Widget_Metas_Category_List')->to($category); ?> 42 | 52 |
      53 |
      54 |
      55 |
      56 | need('components/sidebar.php'); ?> 57 |
      58 |
      59 |
      60 | need('components/footer.php'); ?> 61 | -------------------------------------------------------------------------------- /page-data.php: -------------------------------------------------------------------------------- 1 | options->language); 20 | $this->need('components/header.php'); 21 | ?> 22 | 23 |
      24 |
      25 | options->breadcrumb == 'on'): ?> 26 | 27 | 38 | 39 |
      40 |
      41 |
      42 |
      43 |

      44 | title() ?> 45 |

      46 |
      47 | 67 |
      68 |
      69 |

      70 |

      71 | to($quantity); ?> 72 |
      73 |
      74 |
      75 |

      publishedPostsNum(); ?>

      76 |

      77 |
      78 |
      79 |
      80 |
      81 |

      publishedCommentsNum(); ?>

      82 |

      83 |
      84 |
      85 |
      86 |
      87 |

      88 |

      89 |
      90 |
      91 |
      92 |
      93 |

      94 |

      95 |
      96 |
      97 |
      98 |
      99 |

      100 |

      101 |
      102 |
      103 |
      104 |
      105 |

      106 |

      107 |
      108 |
      109 |
      110 |
      111 |

      112 | 113 |

      114 | 115 |

      116 |
      117 | 118 |
      119 |

      120 |

      121 |
      122 |
      123 |

      124 |

      125 |
      126 |
      127 |

      128 | 129 | 130 |

      131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 |
      151 | 152 |

      153 | 154 |
      155 |

      156 | 157 | 158 |

      159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 |
      179 | 180 |

      181 | 182 |
      183 |
      184 | need('components/comments.php'); ?> 185 |
      186 |
      187 | need('components/sidebar.php'); ?> 188 |
      189 | 197 | options->pjax == 'on' ? '?id=' . mt_rand(1, 99999) : ''; ?> 198 | 199 |
      200 |
      201 | need('components/footer.php'); ?> -------------------------------------------------------------------------------- /page-links.php: -------------------------------------------------------------------------------- 1 | options->language); 12 | 13 | $linkArr = array(); 14 | // 是否包含内页链接 15 | if ($this->options->pageLinks) { 16 | array_push($linkArr, array( 17 | 'title' => $GLOBALS['t']['linkPage']['linksOnDedicatedPageOnly'], 18 | 'links' => json_decode($this->options->pageLinks) 19 | )); 20 | } 21 | // 是否包含首页链接 22 | if ($this->options->homeLinks) { 23 | array_push($linkArr, array( 24 | 'title' => $GLOBALS['t']['linkPage']['linksOnHomepage'], 25 | 'links' => json_decode($this->options->homeLinks) 26 | )); 27 | } 28 | // 是否包含全站链接 29 | if ($this->options->links) { 30 | array_push($linkArr, array( 31 | 'title' => $GLOBALS['t']['linkPage']['linksOnAllPages'], 32 | 'links' => json_decode($this->options->links) 33 | )); 34 | } 35 | $this->need('components/header.php'); // 头文件 36 | ?> 37 | 38 |
      39 |
      40 | options->breadcrumb == 'on'): ?> 41 | 49 | 50 |
      51 |
      52 |
      53 |
      54 |

      55 | title() ?> 56 |

      57 |
      58 | 89 | need('components/comments.php'); ?> 90 |
      91 |
      92 | need('components/sidebar.php'); ?> 93 |
      94 |
      95 |
      96 | need('components/footer.php'); ?> -------------------------------------------------------------------------------- /page-tag.php: -------------------------------------------------------------------------------- 1 | options->language); 12 | $this->need('components/header.php'); 13 | ?> 14 | 15 |
      16 |
      17 | options->breadcrumb == 'on'): ?> 18 | 29 | 30 |
      31 |
      32 |
      33 |
      34 |

      35 | title() ?> 36 |

      37 |
      38 |
      39 |
      40 | widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0')->to($tags); ?> 41 | have()): ?> 42 |
      43 | next()): ?> 44 | 47 | 48 |
      49 | 50 |

      51 | 52 |
      53 |
      54 |
      55 |
      56 | need('components/sidebar.php'); ?> 57 |
      58 |
      59 |
      60 | need('components/footer.php'); ?> -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | options->language); 7 | $this->need('components/header.php'); 8 | ?> 9 | 10 |
      11 |
      12 | options->breadcrumb == 'on'): ?> 13 | 21 | 22 |
      23 |
      24 |
      25 |
      26 |

      27 | 28 |

      29 |
      30 | options->headerImage, $this->options->headerImageUrl); ?> 31 | 32 |
      33 | 34 |
      35 | 36 | 62 |
      63 |
      64 | options->imagelazyloading == 'on'?replaceImgSrc($this->content):$this->content; ?> 65 |
      66 |
      67 | need('components/comments.php'); ?> 68 |
      69 |
      70 | need('components/sidebar.php'); ?> 71 |
      72 |
      73 |
      74 | need('components/footer.php'); ?> 75 | -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot.jpg -------------------------------------------------------------------------------- /screenshot/16043686924621.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/16043686924621.jpg -------------------------------------------------------------------------------- /screenshot/JetBrains-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/JetBrains-logo.png -------------------------------------------------------------------------------- /screenshot/all-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/all-color.png -------------------------------------------------------------------------------- /screenshot/category-statistics.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/category-statistics.jpeg -------------------------------------------------------------------------------- /screenshot/comment-calendar.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/comment-calendar.jpeg -------------------------------------------------------------------------------- /screenshot/comment-statistics.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/comment-statistics.jpeg -------------------------------------------------------------------------------- /screenshot/dark-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/dark-color.png -------------------------------------------------------------------------------- /screenshot/emoji.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/emoji.jpeg -------------------------------------------------------------------------------- /screenshot/home-page.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/home-page.jpeg -------------------------------------------------------------------------------- /screenshot/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/home.png -------------------------------------------------------------------------------- /screenshot/mini-header-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/mini-header-image.png -------------------------------------------------------------------------------- /screenshot/mini-header-image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/mini-header-image2.png -------------------------------------------------------------------------------- /screenshot/qr-code.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/qr-code.jpeg -------------------------------------------------------------------------------- /screenshot/statistics.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/changbin1997/MWordStar/8bc4394657df5c645665c6d612ec2beb7039432e/screenshot/statistics.jpeg --------------------------------------------------------------------------------