├── LICENSE
├── README.md
├── functions.php
├── index.php
├── public
├── admin
│ ├── css
│ │ ├── echo.css
│ │ ├── grid.css
│ │ └── view.css
│ ├── img
│ │ ├── ajax-loader.gif
│ │ ├── editor.png
│ │ ├── editor@2x.png
│ │ ├── icons-2x-s481937020b.png
│ │ ├── icons-s0c4f1c5ae6.png
│ │ ├── mac.jpg
│ │ ├── noscreen.png
│ │ ├── pc.jpg
│ │ └── typecho-logo.svg
│ └── js
│ │ ├── echo.js
│ │ ├── vditor.js
│ │ └── vue.js
├── home
│ ├── css
│ │ ├── 404.css
│ │ ├── dark.css
│ │ ├── github-dark.min.css
│ │ ├── github.min.css
│ │ ├── jquery.fancybox.min.css
│ │ └── style.css
│ ├── img
│ │ ├── 00.png
│ │ ├── 404.png
│ │ ├── blog.jpg
│ │ ├── error-bg.png
│ │ └── favicon.png
│ └── js
│ │ ├── highlight.min.js
│ │ ├── jquery.fancybox.min.js
│ │ ├── jquery.min.js
│ │ └── main.js
└── lib
│ └── layui
│ ├── css
│ ├── layui.css
│ └── modules
│ │ ├── code.css
│ │ ├── laydate
│ │ └── default
│ │ │ └── laydate.css
│ │ └── layer
│ │ └── default
│ │ ├── icon-ext.png
│ │ ├── icon.png
│ │ ├── layer.css
│ │ ├── loading-0.gif
│ │ ├── loading-1.gif
│ │ └── loading-2.gif
│ ├── font
│ ├── iconfont.eot
│ ├── iconfont.svg
│ ├── iconfont.ttf
│ ├── iconfont.woff
│ └── iconfont.woff2
│ └── layui.js
├── screenshot.jpg
├── usr
├── panel
│ ├── config.php
│ └── setting.php
└── themes
│ ├── archive.php
│ ├── archives.php
│ ├── archives_new.php
│ ├── common
│ ├── comments.php
│ ├── footer.php
│ ├── header.php
│ ├── searchs.php
│ └── sidebar.php
│ ├── index.php
│ ├── mylife.php
│ ├── page.php
│ ├── post.php
│ └── router.php
└── var
├── Echo
├── Action.php
├── Edit.php
├── Hook.php
└── Themes.php
└── init.php
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Typecho 主题 Echo
2 |
3 | 
4 |
5 | 一套基于layui框架的Typecho主题Echo,主题名取自博客域名(www.echo.so)[注:目前已更换为 www.ncc.wang]
6 |
7 | 主题极简美观,并进行了响应式布局,使得博客在手机和平板电脑上也有更好的浏览阅读体验。
8 |
9 | 念念不忘 必有回响
10 |
11 | 每一处地方的精心打磨
12 |
13 | 都只为离完美更进一步
14 |
15 | V3.1版本正式发布,兼容typecho最新1.2版本。
16 |
17 |
18 | 
19 |
20 | 演示地址:https://www.ncc.wang/
21 |
22 | 主题详情:https://www.www.ncc.wang/life/119.html
23 |
24 | ### 常见问题:
25 |
26 | Q:博主动态和归档是如何设置的?
27 |
28 | A:
29 |
30 | 归档页面:后台创建独立页面,自定义模板选择[文章归档]。
31 |
32 | 博主动态:后台创建独立页面,自定义模板选择[说说动态]。成功创建后,前台访问该页面,可以进行发布动态。发布框只有博主登录的情况下才会显示。
33 |
34 | Q:博客网站怎么设置博客信息?
35 |
36 | A:在后台-控制台-外观,启用该主题后。然后到[侧边菜单栏-Echo-外观设置]栏,进行设置。
37 |
38 |
39 |
40 |
41 | ### 版本:3.1
42 |
43 | #### 更新记录:
44 |
45 | V3.1.3 - 2022-05-04:
46 |
47 | 1、文章图片弹层由layer更换为fancybox。
48 |
49 | 2、修复编辑器中数字列表和普通列表在预览的时候显示不正常。
50 |
51 | 3、修复网站标题带有'符号时,导致外观设置页面不正常。
52 |
53 | 4、修复说说动态页面评论列表翻页问题。
54 |
55 |
56 | V3.1.0 - 2022-04-07:
57 |
58 | 1、兼容typecho最新1.2版本。
59 |
60 | 2、对目录结构重构。
61 |
62 | 3、重置了官方自定义模板方法,方便后续页面自定义化模板。
63 |
64 |
65 | ### 版本:3.0
66 |
67 | #### 更新记录:
68 |
69 | V3.0.0 - 2021-11-28:
70 |
71 | 1、后台美化、可视化设置(本版最大亮点、无需另外安装插件)。
72 |
73 | 2、增加代码高亮、灰色、黑色两种Mac风格。
74 |
75 | 3、增加了暗黑模式。
76 |
77 | 4、后台可设置Gravatar头像源。
78 |
79 | 5、前台对评论头像做了兼容QQ头像。
80 |
81 | 6、更多功能等你发现。
82 |
83 |
84 | ### 版本:2.0
85 |
86 | #### 更新记录:
87 |
88 | V2.0.0 - 2020-6-09:
89 |
90 | 1、主题超高可定制化。
91 |
92 | 2、修复了文章归档12月份文章不显示问题。
93 |
94 | 3、增加了新文章归档页面,适合文章比较多时使用。
95 |
96 | 4、修改移动端文章搜索栏放置顶部。
97 |
98 | 5、修复查看原图 图片过长显示不全问题。
99 |
100 | 6、增加首页大小滚动横幅,后台可定制。
101 |
102 | 7、增加侧边栏广告位模块,后台可以设置广告内容。
103 |
104 | 8、侧边栏可定制,友情链接可后台修改。
105 |
106 | 9、文章密码保护样式优化。
107 |
108 | 10、文章缩略图展示方式、主题自定义配色等等,更多功能等你发现。
109 |
110 | V1.3.1 - 2019-8-21:
111 |
112 | 1、禁止了移动端点击图片查看原图。
113 |
114 | 2、增加了返回顶部功能。
115 |
116 | 3、文章行间距调整、并兼容了系统默认markdown排版样式。
117 |
118 | 4、修复移动端评论内容英文超出显示问题。
119 |
120 | V1.3.0 - 2019-8-15:
121 |
122 | 1、增加外观设置,可设置网站logo。
123 |
124 | 2、添加上搜索和标签页底部内容。
125 |
126 | 3、增加友情链接小tips功能。
127 |
128 | 4、导航栏菜单间距调整。
129 |
130 | 5、文章图片居中显示。
131 |
132 | 6、文章图片可以点击查看原图。
133 |
134 | V1.2.2 - 2019-8-03: 修复评论Undefined variable: group in报错问题。
135 |
136 | V1.2.1 - 2019-7-25: 修复侧边栏博主动态不显示动态列表问题。
137 |
138 | V1.2.0 - 2019-7-25: 添加说说动态页,侧边栏增加博主动态和友情链接块。
139 |
--------------------------------------------------------------------------------
/functions.php:
--------------------------------------------------------------------------------
1 | action==NULL){
11 | //配置处理
12 | $db = Typecho_Db::get();
13 | $options = Typecho_Widget::widget('Widget_Options');
14 | $echo = $options->__get('theme:echo');
15 | if (!$echo) {
16 | $data = array(
17 | 'nav'=>0,
18 | 'navFixed'=>'true',
19 | 'sidebar'=>'1,2,5',
20 | 'gravatar'=>'https://gravatar.echo.so/avatar/'
21 | );
22 | $db->query($db->insert('table.options')->rows(array(
23 | 'name' => 'theme:echo',
24 | 'value' => serialize($data),
25 | 'user' => 0
26 | )));
27 |
28 | }
29 | require_once 'var/Echo/Themes.php';
30 | Echo_Themes::start();
31 | }else{
32 | $Html = <<
34 | button.btn.primary {
35 | display: none
36 | }
37 |
38 |
39 |
40 |
41 | 宁采陈
42 | Typecho全新主题3.1
43 |
44 |
45 |
51 | HTML;
52 | $layout = new Typecho_Widget_Helper_Layout();
53 | $layout->html(_t($Html));
54 | $form->addItem($layout);
55 | }
56 | }
57 |
58 | // 统计阅读数
59 | function get_post_view($archive){
60 | $cid = $archive->cid;
61 | $db = Typecho_Db::get();
62 | $prefix = $db->getPrefix();
63 | if (!array_key_exists('views', $db->fetchRow($db->select()->from('table.contents')))) {
64 | $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `views` INT(10) DEFAULT 0;');
65 | echo 0;
66 | return;
67 | }
68 | $row = $db->fetchRow($db->select('views')->from('table.contents')->where('cid = ?', $cid));
69 | if ($archive->is('single')) {
70 | $views = Typecho_Cookie::get('extend_contents_views');
71 | if(empty($views)){
72 | $views = array();
73 | }else{
74 | $views = explode(',', $views);
75 | }
76 | if(!in_array($cid,$views)){
77 | $db->query($db->update('table.contents')->rows(array('views' => (int) $row['views'] + 1))->where('cid = ?', $cid));
78 | array_push($views, $cid);
79 | $views = implode(',', $views);
80 | Typecho_Cookie::set('extend_contents_views', $views); //记录查看cookie
81 | }
82 | }
83 | echo $row['views'];
84 | }
85 |
86 | // 获取附件首张图片
87 | function thumb1($obj) {
88 | $attach = $obj->attachments(1)->attachment;
89 | if(isset($attach->isImage) && $attach->isImage == 1){
90 | $thumb = $attach->url;
91 | }else{
92 | $thumb = '/usr/themes/echo/public/home/img/00.png';
93 | }
94 | return $thumb;
95 | }
96 |
97 | // 获取文章首张图片
98 | function thumb2($obj) {
99 | preg_match_all("/\]*>/i", $obj->content, $thumbUrl);
100 | $img_src = $thumbUrl[1][0];
101 | if($img_src){
102 | $thumb = $img_src;
103 | }else{
104 | $thumb = '/usr/themes/echo/public/home/img/00.png';
105 | }
106 | return $thumb;
107 | }
108 |
109 | // 获取自定义随机图片
110 | function thumb3($obj) {
111 | $options = Typecho_Widget::widget('Widget_Options');
112 | $thumbs = explode("|",$options->thumbs);
113 | if($options->thumbs && count($thumbs)>0){
114 | $thumb = $thumbs[rand(0,count($thumbs)-1)];
115 | }else{
116 | $thumb = '/usr/themes/echo/public/home/img/00.png';
117 | }
118 | return $thumb;
119 | }
120 |
121 | // 留言加@
122 | function getPermalinkFromCoid($coid) {
123 | $db = Typecho_Db::get();
124 | $row = $db->fetchRow($db->select('author')->from('table.comments')->where('coid = ? AND status = ?', $coid, 'approved'));
125 | if (empty($row)) return '';
126 | return '@'.$row['author'].' ';
127 | }
128 |
129 | // 解析头像
130 | function getAvatar($mail)
131 | {
132 | $gravatar = Typecho_Widget::widget('Widget_Options')->gravatar;
133 | $mail = strtolower(trim($mail));
134 | $qq = str_replace('@qq.com', '', $mail);
135 | if (strstr($mail, "qq.com") && is_numeric($qq) && strlen($qq) < 11 && strlen($qq) > 4) {
136 | $url = '//thirdqq.qlogo.cn/g?b=qq&nk=' . $qq . '&s=100';
137 | } else {
138 | $url = $gravatar . md5($mail) . '?s=40&r=G&d=';
139 | }
140 | return $url;
141 | }
142 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | need('usr/themes/router.php');
28 |
--------------------------------------------------------------------------------
/public/admin/css/grid.css:
--------------------------------------------------------------------------------
1 | .container,.row [class*="col-"] {
2 | -webkit-box-sizing: border-box;
3 | -moz-box-sizing: border-box;
4 | box-sizing: border-box;
5 | }
6 |
7 | .container {
8 | margin-left: auto;
9 | margin-right: auto;
10 | padding-left: 10px;
11 | padding-right: 10px;
12 | }
13 |
14 | .row {
15 | margin-right: -10px;
16 | margin-left: -10px;
17 | }
18 |
19 | .row [class*="col-"] {
20 | float: left;
21 | min-height: 1px;
22 | padding-right: 10px;
23 | padding-left: 10px;
24 | }
25 |
26 | .row [class*="-push-"],.row [class*="-pull-"] {
27 | position: relative;
28 | }
29 |
30 | .col-mb-1 {
31 | width: 8.33333%;
32 | }
33 |
34 | .col-mb-2 {
35 | width: 16.66667%;
36 | }
37 |
38 | .col-mb-3 {
39 | width: 25%;
40 | }
41 |
42 | .col-mb-4 {
43 | width: 33.33333%;
44 | }
45 |
46 | .col-mb-5 {
47 | width: 41.66667%;
48 | }
49 |
50 | .col-mb-6 {
51 | width: 50%;
52 | }
53 |
54 | .col-mb-7 {
55 | width: 58.33333%;
56 | }
57 |
58 | .col-mb-8 {
59 | width: 66.66667%;
60 | }
61 |
62 | .col-mb-9 {
63 | width: 75%;
64 | }
65 |
66 | .col-mb-10 {
67 | width: 83.33333%;
68 | }
69 |
70 | .col-mb-11 {
71 | width: 91.66667%;
72 | }
73 |
74 | .col-mb-12 {
75 | width: 100%;
76 | }
77 |
78 | @media(min-width:768px) {
79 | .container {
80 | /* max-width: 728px; */
81 | }
82 |
83 | .col-tb-1 {
84 | width: 8.33333%;
85 | }
86 |
87 | .col-tb-2 {
88 | width: 16.66667%;
89 | }
90 |
91 | .col-tb-3 {
92 | width: 25%;
93 | }
94 |
95 | .col-tb-4 {
96 | width: 33.33333%;
97 | }
98 |
99 | .col-tb-5 {
100 | width: 41.66667%;
101 | }
102 |
103 | .col-tb-6 {
104 | width: 50%;
105 | }
106 |
107 | .col-tb-7 {
108 | width: 58.33333%;
109 | }
110 |
111 | .col-tb-8 {
112 | width: 66.66667%;
113 | }
114 |
115 | .col-tb-9 {
116 | width: 75%;
117 | }
118 |
119 | .col-tb-10 {
120 | width: 83.33333%;
121 | }
122 |
123 | .col-tb-11 {
124 | width: 91.66667%;
125 | }
126 |
127 | .col-tb-12 {
128 | width: 100%;
129 | }
130 |
131 | .col-tb-offset-0 {
132 | margin-left: 0;
133 | }
134 |
135 | .col-tb-offset-1 {
136 | margin-left: 8.33333%;
137 | }
138 |
139 | .col-tb-offset-2 {
140 | margin-left: 16.66667%;
141 | }
142 |
143 | .col-tb-offset-3 {
144 | margin-left: 25%;
145 | }
146 |
147 | .col-tb-offset-4 {
148 | margin-left: 33.33333%;
149 | }
150 |
151 | .col-tb-offset-5 {
152 | margin-left: 41.66667%;
153 | }
154 |
155 | .col-tb-offset-6 {
156 | margin-left: 50%;
157 | }
158 |
159 | .col-tb-offset-7 {
160 | margin-left: 58.33333%;
161 | }
162 |
163 | .col-tb-offset-8 {
164 | margin-left: 66.66667%;
165 | }
166 |
167 | .col-tb-offset-9 {
168 | margin-left: 75%;
169 | }
170 |
171 | .col-tb-offset-10 {
172 | margin-left: 83.33333%;
173 | }
174 |
175 | .col-tb-offset-11 {
176 | margin-left: 91.66667%;
177 | }
178 |
179 | .col-tb-offset-12 {
180 | margin-left: 100%;
181 | }
182 |
183 | .col-tb-pull-0 {
184 | right: 0;
185 | }
186 |
187 | .col-tb-pull-1 {
188 | right: 8.33333%;
189 | }
190 |
191 | .col-tb-pull-2 {
192 | right: 16.66667%;
193 | }
194 |
195 | .col-tb-pull-3 {
196 | right: 25%;
197 | }
198 |
199 | .col-tb-pull-4 {
200 | right: 33.33333%;
201 | }
202 |
203 | .col-tb-pull-5 {
204 | right: 41.66667%;
205 | }
206 |
207 | .col-tb-pull-6 {
208 | right: 50%;
209 | }
210 |
211 | .col-tb-pull-7 {
212 | right: 58.33333%;
213 | }
214 |
215 | .col-tb-pull-8 {
216 | right: 66.66667%;
217 | }
218 |
219 | .col-tb-pull-9 {
220 | right: 75%;
221 | }
222 |
223 | .col-tb-pull-10 {
224 | right: 83.33333%;
225 | }
226 |
227 | .col-tb-pull-11 {
228 | right: 91.66667%;
229 | }
230 |
231 | .col-tb-pull-12 {
232 | right: 100%;
233 | }
234 |
235 | .col-tb-push-0 {
236 | left: 0;
237 | }
238 |
239 | .col-tb-push-1 {
240 | left: 8.33333%;
241 | }
242 |
243 | .col-tb-push-2 {
244 | left: 16.66667%;
245 | }
246 |
247 | .col-tb-push-3 {
248 | left: 25%;
249 | }
250 |
251 | .col-tb-push-4 {
252 | left: 33.33333%;
253 | }
254 |
255 | .col-tb-push-5 {
256 | left: 41.66667%;
257 | }
258 |
259 | .col-tb-push-6 {
260 | left: 50%;
261 | }
262 |
263 | .col-tb-push-7 {
264 | left: 58.33333%;
265 | }
266 |
267 | .col-tb-push-8 {
268 | left: 66.66667%;
269 | }
270 |
271 | .col-tb-push-9 {
272 | left: 75%;
273 | }
274 |
275 | .col-tb-push-10 {
276 | left: 83.33333%;
277 | }
278 |
279 | .col-tb-push-11 {
280 | left: 91.66667%;
281 | }
282 |
283 | .col-tb-push-12 {
284 | left: 100%;
285 | }
286 | }
287 |
288 | @media(min-width:992px) {
289 | .container {
290 | /* max-width: 952px; */
291 | }
292 |
293 | .col-1 {
294 | width: 8.33333%;
295 | }
296 |
297 | .col-2 {
298 | width: 16.66667%;
299 | }
300 |
301 | .col-3 {
302 | width: 25%;
303 | }
304 |
305 | .col-4 {
306 | width: 33.33333%;
307 | }
308 |
309 | .col-5 {
310 | width: 41.66667%;
311 | }
312 |
313 | .col-6 {
314 | width: 50%;
315 | }
316 |
317 | .col-7 {
318 | width: 58.33333%;
319 | }
320 |
321 | .col-8 {
322 | width: 66.66667%;
323 | }
324 |
325 | .col-9 {
326 | width: 75%;
327 | }
328 |
329 | .col-10 {
330 | width: 83.33333%;
331 | }
332 |
333 | .col-11 {
334 | width: 91.66667%;
335 | }
336 |
337 | .col-12 {
338 | width: 100%;
339 | }
340 |
341 | .col-offset-0 {
342 | margin-left: 0;
343 | }
344 |
345 | .col-offset-1 {
346 | margin-left: 8.33333%;
347 | }
348 |
349 | .col-offset-2 {
350 | margin-left: 16.66667%;
351 | }
352 |
353 | .col-offset-3 {
354 | margin-left: 25%;
355 | }
356 |
357 | .col-offset-4 {
358 | margin-left: 33.33333%;
359 | }
360 |
361 | .col-offset-5 {
362 | margin-left: 41.66667%;
363 | }
364 |
365 | .col-offset-6 {
366 | margin-left: 50%;
367 | }
368 |
369 | .col-offset-7 {
370 | margin-left: 58.33333%;
371 | }
372 |
373 | .col-offset-8 {
374 | margin-left: 66.66667%;
375 | }
376 |
377 | .col-offset-9 {
378 | margin-left: 75%;
379 | }
380 |
381 | .col-offset-10 {
382 | margin-left: 83.33333%;
383 | }
384 |
385 | .col-offset-11 {
386 | margin-left: 91.66667%;
387 | }
388 |
389 | .col-offset-12 {
390 | margin-left: 100%;
391 | }
392 |
393 | .col-pull-0 {
394 | right: 0;
395 | }
396 |
397 | .col-pull-1 {
398 | right: 8.33333%;
399 | }
400 |
401 | .col-pull-2 {
402 | right: 16.66667%;
403 | }
404 |
405 | .col-pull-3 {
406 | right: 25%;
407 | }
408 |
409 | .col-pull-4 {
410 | right: 33.33333%;
411 | }
412 |
413 | .col-pull-5 {
414 | right: 41.66667%;
415 | }
416 |
417 | .col-pull-6 {
418 | right: 50%;
419 | }
420 |
421 | .col-pull-7 {
422 | right: 58.33333%;
423 | }
424 |
425 | .col-pull-8 {
426 | right: 66.66667%;
427 | }
428 |
429 | .col-pull-9 {
430 | right: 75%;
431 | }
432 |
433 | .col-pull-10 {
434 | right: 83.33333%;
435 | }
436 |
437 | .col-pull-11 {
438 | right: 91.66667%;
439 | }
440 |
441 | .col-pull-12 {
442 | right: 100%;
443 | }
444 |
445 | .col-push-0 {
446 | left: 0;
447 | }
448 |
449 | .col-push-1 {
450 | left: 8.33333%;
451 | }
452 |
453 | .col-push-2 {
454 | left: 16.66667%;
455 | }
456 |
457 | .col-push-3 {
458 | left: 25%;
459 | }
460 |
461 | .col-push-4 {
462 | left: 33.33333%;
463 | }
464 |
465 | .col-push-5 {
466 | left: 41.66667%;
467 | }
468 |
469 | .col-push-6 {
470 | left: 50%;
471 | }
472 |
473 | .col-push-7 {
474 | left: 58.33333%;
475 | }
476 |
477 | .col-push-8 {
478 | left: 66.66667%;
479 | }
480 |
481 | .col-push-9 {
482 | left: 75%;
483 | }
484 |
485 | .col-push-10 {
486 | left: 83.33333%;
487 | }
488 |
489 | .col-push-11 {
490 | left: 91.66667%;
491 | }
492 |
493 | .col-push-12 {
494 | left: 100%;
495 | }
496 | }
497 |
498 | @media(min-width:1200px) {
499 | .container {
500 | /* max-width: 1160px; */
501 | }
502 |
503 | .col-wd-1 {
504 | width: 8.33333%;
505 | }
506 |
507 | .col-wd-2 {
508 | width: 16.66667%;
509 | }
510 |
511 | .col-wd-3 {
512 | width: 25%;
513 | }
514 |
515 | .col-wd-4 {
516 | width: 33.33333%;
517 | }
518 |
519 | .col-wd-5 {
520 | width: 41.66667%;
521 | }
522 |
523 | .col-wd-6 {
524 | width: 50%;
525 | }
526 |
527 | .col-wd-7 {
528 | width: 58.33333%;
529 | }
530 |
531 | .col-wd-8 {
532 | width: 66.66667%;
533 | }
534 |
535 | .col-wd-9 {
536 | width: 75%;
537 | }
538 |
539 | .col-wd-10 {
540 | width: 83.33333%;
541 | }
542 |
543 | .col-wd-11 {
544 | width: 91.66667%;
545 | }
546 |
547 | .col-wd-12 {
548 | width: 100%;
549 | }
550 |
551 | .col-wd-offset-0 {
552 | margin-left: 0;
553 | }
554 |
555 | .col-wd-offset-1 {
556 | margin-left: 8.33333%;
557 | }
558 |
559 | .col-wd-offset-2 {
560 | margin-left: 16.66667%;
561 | }
562 |
563 | .col-wd-offset-3 {
564 | margin-left: 25%;
565 | }
566 |
567 | .col-wd-offset-4 {
568 | margin-left: 33.33333%;
569 | }
570 |
571 | .col-wd-offset-5 {
572 | margin-left: 41.66667%;
573 | }
574 |
575 | .col-wd-offset-6 {
576 | margin-left: 50%;
577 | }
578 |
579 | .col-wd-offset-7 {
580 | margin-left: 58.33333%;
581 | }
582 |
583 | .col-wd-offset-8 {
584 | margin-left: 66.66667%;
585 | }
586 |
587 | .col-wd-offset-9 {
588 | margin-left: 75%;
589 | }
590 |
591 | .col-wd-offset-10 {
592 | margin-left: 83.33333%;
593 | }
594 |
595 | .col-wd-offset-11 {
596 | margin-left: 91.66667%;
597 | }
598 |
599 | .col-wd-offset-12 {
600 | margin-left: 100%;
601 | }
602 |
603 | .col-wd-pull-0 {
604 | right: 0;
605 | }
606 |
607 | .col-wd-pull-1 {
608 | right: 8.33333%;
609 | }
610 |
611 | .col-wd-pull-2 {
612 | right: 16.66667%;
613 | }
614 |
615 | .col-wd-pull-3 {
616 | right: 25%;
617 | }
618 |
619 | .col-wd-pull-4 {
620 | right: 33.33333%;
621 | }
622 |
623 | .col-wd-pull-5 {
624 | right: 41.66667%;
625 | }
626 |
627 | .col-wd-pull-6 {
628 | right: 50%;
629 | }
630 |
631 | .col-wd-pull-7 {
632 | right: 58.33333%;
633 | }
634 |
635 | .col-wd-pull-8 {
636 | right: 66.66667%;
637 | }
638 |
639 | .col-wd-pull-9 {
640 | right: 75%;
641 | }
642 |
643 | .col-wd-pull-10 {
644 | right: 83.33333%;
645 | }
646 |
647 | .col-wd-pull-11 {
648 | right: 91.66667%;
649 | }
650 |
651 | .col-wd-pull-12 {
652 | right: 100%;
653 | }
654 |
655 | .col-wd-push-0 {
656 | left: 0;
657 | }
658 |
659 | .col-wd-push-1 {
660 | left: 8.33333%;
661 | }
662 |
663 | .col-wd-push-2 {
664 | left: 16.66667%;
665 | }
666 |
667 | .col-wd-push-3 {
668 | left: 25%;
669 | }
670 |
671 | .col-wd-push-4 {
672 | left: 33.33333%;
673 | }
674 |
675 | .col-wd-push-5 {
676 | left: 41.66667%;
677 | }
678 |
679 | .col-wd-push-6 {
680 | left: 50%;
681 | }
682 |
683 | .col-wd-push-7 {
684 | left: 58.33333%;
685 | }
686 |
687 | .col-wd-push-8 {
688 | left: 66.66667%;
689 | }
690 |
691 | .col-wd-push-9 {
692 | left: 75%;
693 | }
694 |
695 | .col-wd-push-10 {
696 | left: 83.33333%;
697 | }
698 |
699 | .col-wd-push-11 {
700 | left: 91.66667%;
701 | }
702 |
703 | .col-wd-push-12 {
704 | left: 100%;
705 | }
706 | }
707 |
708 | @media(max-width:767px) {
709 | .kit-hidden-mb {
710 | display: none;
711 | }
712 | }
713 |
714 | @media(max-width:991px) {
715 | .kit-hidden-tb {
716 | display: none;
717 | }
718 | }
719 |
720 | @media(max-width:1199px) {
721 | .kit-hidden {
722 | display: none;
723 | }
724 | }
725 |
726 | .clearfix,.row {
727 | zoom: 1;
728 | }
729 |
730 | .clearfix:before,.row:before,.clearfix:after,.row:after {
731 | content: " ";
732 | display: table;
733 | }
734 |
735 | .clearfix:after,.row:after {
736 | clear: both;
737 | }
--------------------------------------------------------------------------------
/public/admin/css/view.css:
--------------------------------------------------------------------------------
1 | .set{
2 | height: 700px;
3 | overflow-y: auto;
4 | }
5 | .set .layui-form-label {
6 | width: 70px;
7 | }
8 | .layui-btn-save{
9 | float: right;
10 | margin: 5px auto;
11 | height: 30px;
12 | line-height: 30px;
13 | padding: 0 5px;
14 | background-color: #36b368;
15 | }
16 |
17 | .pc{
18 | height: 700px;
19 | margin: 5px;
20 | background: url(/usr/themes/echo/public/admin/img/pc.jpg) no-repeat center top;
21 | background-size: 100% 100%;
22 | padding: 19px 15px 0 13px;
23 | }
24 |
25 | .body{
26 | height: 585px;
27 | background-color: whitesmoke;
28 | font-family: "Consolas","Microsoft JhengHei","Apple LiGothic Medium,Microsoft YaHei","微软雅黑","Arial",sans-serif;
29 | overflow-y: auto;
30 | }
31 | .body a {
32 | color: #333;
33 | }
34 | .view{
35 | width: 80%;
36 | margin: 10px auto;
37 | }
38 |
39 | .view .left{
40 | width: 75%;
41 | float: left;
42 | position: relative;
43 | display: block;
44 | box-sizing: border-box;
45 | }
46 |
47 | .view .right{
48 | width: 25%;
49 | float: left;
50 | position: relative;
51 | display: block;
52 | box-sizing: border-box;
53 | }
54 |
55 | /* 头部 */
56 | .header{
57 | border-bottom: 1px solid #e8e9e7;
58 | background-color: rgba(255,255,255,1);
59 | }
60 | .header_fixed {
61 | position: sticky;
62 | left: 0;
63 | top: 0;
64 | z-index: 10000;
65 | }
66 | .logo{
67 | position: absolute;
68 | left: 10px;
69 | top: 16px;
70 | font-size: 1.4em;
71 | }
72 | .logo img{
73 | width: 82px;
74 | height: 31px;
75 | }
76 |
77 | .header .layui-nav{
78 | position: absolute;
79 | right: 0;top: 0;
80 | padding: 0;
81 | background: none;
82 | }
83 | .header .layui-nav .layui-nav-item:after,.header .layui-nav .layui-nav-bar{
84 | height: 1px;
85 | background-color: #6bc30d;
86 | }
87 | .header .layui-nav .layui-nav-item a{
88 | color: #212220;
89 | padding: 0 16px;
90 | }
91 | .header .layui-nav .layui-nav-item a:hover{
92 | color: #6bc30d;
93 | }
94 | .header .layui-nav .layui-nav-item[mobile]{
95 | display: none;
96 | }
97 |
98 | /* 底部 */
99 | .footer {
100 | background: #fff;
101 | margin-top: 15px;
102 | padding-top: 20px;
103 | padding-bottom: 30px
104 | }
105 |
106 | .footer span {
107 | color: #999
108 | }
109 |
110 | .footer .t-copy {
111 | text-align: center;
112 | }
--------------------------------------------------------------------------------
/public/admin/img/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/ajax-loader.gif
--------------------------------------------------------------------------------
/public/admin/img/editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/editor.png
--------------------------------------------------------------------------------
/public/admin/img/editor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/editor@2x.png
--------------------------------------------------------------------------------
/public/admin/img/icons-2x-s481937020b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/icons-2x-s481937020b.png
--------------------------------------------------------------------------------
/public/admin/img/icons-s0c4f1c5ae6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/icons-s0c4f1c5ae6.png
--------------------------------------------------------------------------------
/public/admin/img/mac.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/mac.jpg
--------------------------------------------------------------------------------
/public/admin/img/noscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/noscreen.png
--------------------------------------------------------------------------------
/public/admin/img/pc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/admin/img/pc.jpg
--------------------------------------------------------------------------------
/public/admin/img/typecho-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 | typecho-logo
4 | Created with Sketch (http://www.bohemiancoding.com/sketch)
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/public/admin/js/echo.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 | //添加结构
3 | $('#typecho-nav-list').prepend(
4 | ' Echo Theme
'
5 | );
6 | //添加图标
7 | $('#typecho-nav-list .root .parent').each(function(i){
8 | switch ($(this).text()) {
9 | case '控制台':
10 | $(this).html('控制台 ');
11 | break;
12 | case '撰写':
13 | $(this).html('撰写 ');
14 | break;
15 | case '管理':
16 | $(this).html('管理 ');
17 | break;
18 | case '设置':
19 | $(this).html('设置 ');
20 | break;
21 | case 'Echo':
22 | $(this).html('Echo ');
23 | break;
24 | default:
25 | $(this).html(''+$(this).text()+' ');
26 |
27 | }
28 | });
29 | //菜单折叠
30 | $('#typecho-nav-list .root .parent').click(function(){
31 | if($('body').hasClass('side-shrink')){
32 | events.flexible();
33 | }else{
34 | $(this).parent().toggleClass("focus");
35 | }
36 | })
37 |
38 |
39 | //添加结构
40 | $('.typecho-head-nav .operate').prepend(
41 | ''
52 | );
53 |
54 | //移动端自动收缩
55 | if($(window).width() < 992) events.flexible();
56 |
57 | //删除底部信息
58 | $('.typecho-foot').remove();
59 |
60 |
61 | });
62 |
63 | layui.use(['layer'], function(){
64 | var layer = layui.layer;
65 |
66 | //注册点击事件
67 | $('body').on('click', '*[echo-event]', function(){
68 | var othis = $(this)
69 | ,attrEvent = othis.attr('echo-event');
70 | events[attrEvent] && events[attrEvent].call(this, othis);
71 | });
72 |
73 | //tips
74 | $('body').on('mouseenter', '*[lay-tips]', function(){
75 | var othis = $(this);
76 |
77 | if(othis.parent().hasClass('parent') && !$('body').hasClass('side-shrink')) return;
78 |
79 | var tips = othis.attr('lay-tips');console.log($('body').hasClass('side-shrink'));
80 | index = layer.tips(tips, this, {tips: 2,time: -1});
81 | othis.data('index', index);
82 | }).on('mouseleave', '*[lay-tips]', function(){
83 | layer.close($(this).data('index'));
84 | });
85 |
86 | });
87 |
88 | //事件
89 | var events = {
90 | //伸缩
91 | flexible: function(othis){
92 |
93 | var app = $('body')
94 | ,iconElem = $('#app_flexible')
95 | ,isSpread = iconElem.hasClass('layui-icon-spread-left')
96 | ,width = $(window).width();
97 |
98 | //设置状态,PC:默认展开、移动:默认收缩
99 | if(isSpread){
100 | //切换到展开状态的 icon,箭头:←
101 | iconElem.removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right');
102 |
103 | //移动:从左到右位移;PC:清除多余选择器恢复默认
104 | if(width < 992){
105 | app.addClass('side-spread-sm');
106 | } else {
107 | app.removeClass('side-spread-sm');
108 | }
109 |
110 | app.removeClass('side-shrink')
111 | } else {
112 | //切换到收缩状态的 icon,箭头:→
113 | iconElem.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
114 |
115 | //移动:清除多余选择器恢复默认;PC:从右往左收缩
116 | if(width < 992){
117 | app.removeClass('side-shrink');
118 | } else {
119 | app.addClass('side-shrink');
120 | }
121 |
122 | app.removeClass('side-spread-sm')
123 | }
124 | },
125 |
126 | //全屏
127 | fullscreen: function(othis){
128 | var SCREEN_FULL = 'layui-icon-screen-full'
129 | ,SCREEN_REST = 'layui-icon-screen-restore'
130 | ,iconElem = othis.children("i");
131 |
132 | if(iconElem.hasClass(SCREEN_FULL)){
133 | var ele = document.documentElement
134 | ,reqFullScreen = ele.requestFullScreen || ele.webkitRequestFullScreen
135 | || ele.mozRequestFullScreen || ele.msRequestFullscreen;
136 | if(typeof reqFullScreen !== 'undefined' && reqFullScreen) {
137 | reqFullScreen.call(ele);
138 | };
139 | iconElem.addClass(SCREEN_REST).removeClass(SCREEN_FULL);
140 | } else {
141 | var ele = document.documentElement
142 | if (document.exitFullscreen) {
143 | document.exitFullscreen();
144 | } else if (document.mozCancelFullScreen) {
145 | document.mozCancelFullScreen();
146 | } else if (document.webkitCancelFullScreen) {
147 | document.webkitCancelFullScreen();
148 | } else if (document.msExitFullscreen) {
149 | document.msExitFullscreen();
150 | }
151 | iconElem.addClass(SCREEN_FULL).removeClass(SCREEN_REST);
152 | }
153 | },
154 | }
155 |
--------------------------------------------------------------------------------
/public/admin/js/vditor.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | $('#text').before('
');
3 | $('#text').hide();
4 | $('.typecho-post-area .resize').hide();
5 | $('#btn-cancel-preview').remove();
6 | $('#btn-preview').remove();
7 | var vditor = new Vditor("vditor", {
8 | height: document.documentElement.clientHeight * 0.6,
9 | typewriterMode: true,
10 | cache: {
11 | enable: false,
12 | cid: $('input[name="cid"]').val()
13 | },
14 | value: $('#text').text(),
15 | mode: 'sv',
16 | preview: {
17 | mode: "both",
18 | actions: [],
19 | theme: {
20 | current: "light",
21 | }
22 | },
23 | counter: {
24 | enable: true
25 | },
26 | toolbarConfig: {
27 | pin: true
28 | },
29 | resize: {
30 | enable: true,
31 | position: "bottom"
32 | }
33 | });
34 | // 保存前保存数据到 #text
35 | $('#text').parents().find('form').on('submit', function () {
36 | $('#text').val(vditor.getValue());
37 | return true;
38 | });
39 | });
40 |
--------------------------------------------------------------------------------
/public/home/css/404.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Helvetica Neue", "Microsoft Yahei", Helvetica, Arial, sans-serif;
3 | font-size: 14px;
4 | line-height: 1.42857143;
5 | color: #333333;
6 | background-color: #F7F7F7;
7 |
8 | }
9 | #page-wrapper {
10 | padding-left: 0 !important;
11 | }
12 | #page-wrapper {
13 | position: relative;
14 |
15 | width: 100%;
16 | height: 100%;
17 | }
18 | * {
19 | -webkit-box-sizing: border-box;
20 | -moz-box-sizing: border-box;
21 | box-sizing: border-box;
22 | }
23 | .page-blank-wrap {
24 | overflow: hidden;
25 | width: 800px;
26 | margin: 25px auto 0;
27 | padding: 0 20px;
28 | }
29 | .page-blank-wrap .site-error {
30 | margin-bottom: 30px;
31 | text-align: center;
32 | }
33 | h1 {
34 | font-size: 2em;
35 | margin: 0.67em 0;
36 | }
37 | h1, .h1 {
38 | font-size: 36px;
39 | }
40 | h1, .h1, h2, .h2, h3, .h3 {
41 | margin-top: 20px;
42 | margin-bottom: 10px;
43 | }
44 | h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
45 | font-family: inherit;
46 | font-weight: 500;
47 | line-height: 1.1;
48 | color: inherit;
49 | }
50 | img {
51 | vertical-align: middle;
52 | }
53 | img {
54 | border: 0;
55 | }
56 | .page-blank-wrap .site-error {
57 | margin-bottom: 30px;
58 | text-align: center;
59 | }
60 | h4, .h4 {
61 | font-size: 18px;
62 | }
63 | h4, .h4, h5, .h5, h6, .h6 {
64 | margin-top: 10px;
65 | margin-bottom: 10px;
66 | }
67 | h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
68 | font-family: inherit;
69 | font-weight: 500;
70 | line-height: 1.1;
71 | color: inherit;
72 | }
73 | a {
74 | color: #4a90e6;
75 | text-decoration: none;
76 | }
--------------------------------------------------------------------------------
/public/home/css/dark.css:
--------------------------------------------------------------------------------
1 | .dark {
2 | background: #121212;
3 | color: #999;
4 | }
5 | .dark a {
6 | color: #999;
7 | }
8 | .dark .header{
9 | background: #232323;
10 | border-bottom: 1px solid #414243;
11 | }
12 | .dark .header .layui-nav .layui-nav-item a {
13 | color: #999;
14 | }
15 | .dark .header .layui-nav .layui-nav-item .layui-nav-child {
16 | border: 1px solid #414243;
17 | background-color: #232323;
18 | }
19 | .dark .header .layui-nav .layui-nav-item .layui-nav-child a:hover {
20 | background-color: #303030;
21 | }
22 | .dark .title-article,.dark .text,.dark .tags-text,.dark .copy-text,.dark .page-text,.dark .comment-text,.dark .post,.dark .archives {
23 | background: #232323;
24 | }
25 | .dark .copy-text div {
26 | background: #303030;
27 | }
28 | .dark .copy-text div p {
29 | color: #777;
30 | }
31 | .dark .component,.dark .column,.dark .ads,.dark .dynamic,.dark .tags,.dark .link,.dark .timeline-menu {
32 | background: #232323;
33 | }
34 | .dark .title-sidebar {
35 | border-bottom: 1px solid #414243;
36 | color: #999;
37 | }
38 | .dark input, .dark textarea {
39 | border: 1px solid #414243;
40 | background: #414243;
41 | }
42 | .dark .layui-btn-primary, .dark .layui-btn-primary:hover {
43 | border-color: #515253;
44 | color: #999;
45 | }
46 | .dark .layui-bg-gray {
47 | background-color: #515253!important;
48 | color: #999!important;
49 | }
50 | .dark .layui-timeline-axis {
51 | background-color: #232323;
52 | }
53 | .dark .layui-timeline-item:before {
54 | background-color: #414243;
55 | }
56 | .dark .timeline-wrap {
57 | border-color: #414243;
58 | }
59 | .dark .timeline-wrap:before {
60 | box-shadow: 0 0 0 4px #414243;
61 | }
62 | .dark .dynamic ul li {
63 | border-left: 2px solid #414243;
64 | }
65 | .dark .dynamic ul li span {
66 | border: 5px solid #232323;
67 | }
68 | .dark .dynamic ul li p {
69 | color: #999;
70 | border-bottom: 1px solid #414243;
71 | }
72 | .dark .link div a {
73 | border-bottom: 1px solid #414243;
74 | background-color: #232323;
75 | color: #999;
76 | }
77 | .dark .title-life {
78 | background: #232323;
79 | border-bottom: 1px #414243 solid;
80 | }
81 | .dark .about-life,.dark .mylife {
82 | background: #232323;
83 | }
84 | .dark .about-life .t-w {
85 | background: #303030;
86 | }
87 | .dark .mylife .t-r {
88 | border-bottom: 1px #414243 solid;
89 | color: #999;
90 | }
91 | .dark .page-navigator a {
92 | background-color: #303030;
93 | color: #aaa;
94 | }
95 | .dark .page-navigator .current {
96 | background: #232323;
97 | color: #fff;
98 | }
99 | .dark .layui-laypage a,.dark .layui-laypage button,.dark .layui-laypage input,.dark .layui-laypage select,.dark .layui-laypage span {
100 | border: 1px solid #414243;
101 | }
102 |
103 | .dark pre {
104 | background: #000;
105 | }
106 |
107 | .dark pre code[class*='language-'] {
108 | background: #121212;
109 | }
110 | .dark .hljs {
111 | color: #c9d1d9;
112 | background: #0d1117;
113 | }
114 |
115 | .dark .hljs-doctag,.dark .hljs-keyword,.dark .hljs-meta .hljs-keyword,.dark .hljs-template-tag,.dark .hljs-template-variable,.dark .hljs-type,.dark .hljs-variable.language_ {
116 | color: #ff7b72
117 | }
118 |
119 | .dark .hljs-title,.dark .hljs-title.class_,.dark .hljs-title.class_.inherited__,.dark .hljs-title.function_ {
120 | color: #d2a8ff
121 | }
122 |
123 | .dark .hljs-attr,.dark .hljs-attribute,.dark .hljs-literal,.dark .hljs-meta,.dark .hljs-number,.dark .hljs-operator,.dark .hljs-selector-attr,.dark .hljs-selector-class,.dark .hljs-selector-id,.dark .hljs-variable {
124 | color: #79c0ff
125 | }
126 |
127 | .dark .hljs-meta .hljs-string,.dark .hljs-regexp,.dark .hljs-string {
128 | color: #a5d6ff
129 | }
130 |
131 | .dark .hljs-built_in,.dark .hljs-symbol {
132 | color: #ffa657
133 | }
134 |
135 | .dark .hljs-code,.dark .hljs-comment,.dark .hljs-formula {
136 | color: #8b949e
137 | }
138 |
139 | .dark .hljs-name,.dark .hljs-quote,.dark .hljs-selector-pseudo,.dark .hljs-selector-tag {
140 | color: #7ee787
141 | }
142 |
143 | .dark .hljs-subst {
144 | color: #c9d1d9
145 | }
146 |
147 | .dark .hljs-section {
148 | color: #1f6feb;
149 | font-weight: 700
150 | }
151 |
152 | .dark .hljs-bullet {
153 | color: #f2cc60
154 | }
155 |
156 | .dark .hljs-emphasis {
157 | color: #c9d1d9;
158 | font-style: italic
159 | }
160 |
161 | .dark .hljs-strong {
162 | color: #c9d1d9;
163 | font-weight: 700
164 | }
165 |
166 | .dark .hljs-addition {
167 | color: #aff5b4;
168 | background-color: #033a16
169 | }
170 |
171 | .dark .hljs-deletion {
172 | color: #ffdcd7;
173 | background-color: #67060c
174 | }
175 |
176 | .dark .footer {
177 | background: #121212;
178 | border-top: 1px solid #454545;
179 | color: #999;
180 | }
181 | .dark .layui-fixbar li {
182 | background: #303030;
183 | }
184 |
--------------------------------------------------------------------------------
/public/home/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}
--------------------------------------------------------------------------------
/public/home/css/github.min.css:
--------------------------------------------------------------------------------
1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
2 | Theme: GitHub
3 | Description: Light 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-light
9 | Current colors taken from GitHub's CSS
10 | */.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
--------------------------------------------------------------------------------
/public/home/css/jquery.fancybox.min.css:
--------------------------------------------------------------------------------
1 | body.compensate-for-scrollbar{overflow:hidden}.fancybox-active{height:auto}.fancybox-is-hidden{left:-9999px;margin:0;position:absolute!important;top:-9999px;visibility:hidden}.fancybox-container{-webkit-backface-visibility:hidden;height:100%;left:0;outline:none;position:fixed;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:manipulation;touch-action:manipulation;transform:translateZ(0);width:100%;z-index:99992}.fancybox-container *{box-sizing:border-box}.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-stage{bottom:0;left:0;position:absolute;right:0;top:0}.fancybox-outer{-webkit-overflow-scrolling:touch;overflow-y:auto}.fancybox-bg{background:#1e1e1e;opacity:0;transition-duration:inherit;transition-property:opacity;transition-timing-function:cubic-bezier(.47,0,.74,.71)}.fancybox-is-open .fancybox-bg{opacity:.9;transition-timing-function:cubic-bezier(.22,.61,.36,1)}.fancybox-caption,.fancybox-infobar,.fancybox-navigation .fancybox-button,.fancybox-toolbar{direction:ltr;opacity:0;position:absolute;transition:opacity .25s ease,visibility 0s ease .25s;visibility:hidden;z-index:99997}.fancybox-show-caption .fancybox-caption,.fancybox-show-infobar .fancybox-infobar,.fancybox-show-nav .fancybox-navigation .fancybox-button,.fancybox-show-toolbar .fancybox-toolbar{opacity:1;transition:opacity .25s ease 0s,visibility 0s ease 0s;visibility:visible}.fancybox-infobar{color:#ccc;font-size:13px;-webkit-font-smoothing:subpixel-antialiased;height:44px;left:0;line-height:44px;min-width:44px;mix-blend-mode:difference;padding:0 10px;pointer-events:none;top:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fancybox-toolbar{right:0;top:0}.fancybox-stage{direction:ltr;overflow:visible;transform:translateZ(0);z-index:99994}.fancybox-is-open .fancybox-stage{overflow:hidden}.fancybox-slide{-webkit-backface-visibility:hidden;display:none;height:100%;left:0;outline:none;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:absolute;text-align:center;top:0;transition-property:transform,opacity;white-space:normal;width:100%;z-index:99994}.fancybox-slide:before{content:"";display:inline-block;font-size:0;height:100%;vertical-align:middle;width:0}.fancybox-is-sliding .fancybox-slide,.fancybox-slide--current,.fancybox-slide--next,.fancybox-slide--previous{display:block}.fancybox-slide--image{overflow:hidden;padding:44px 0}.fancybox-slide--image:before{display:none}.fancybox-slide--html{padding:6px}.fancybox-content{background:#fff;display:inline-block;margin:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:relative;text-align:left;vertical-align:middle}.fancybox-slide--image .fancybox-content{animation-timing-function:cubic-bezier(.5,0,.14,1);-webkit-backface-visibility:hidden;background:transparent;background-repeat:no-repeat;background-size:100% 100%;left:0;max-width:none;overflow:visible;padding:0;position:absolute;top:0;transform-origin:top left;transition-property:transform,opacity;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:99995}.fancybox-can-zoomOut .fancybox-content{cursor:zoom-out}.fancybox-can-zoomIn .fancybox-content{cursor:zoom-in}.fancybox-can-pan .fancybox-content,.fancybox-can-swipe .fancybox-content{cursor:grab}.fancybox-is-grabbing .fancybox-content{cursor:grabbing}.fancybox-container [data-selectable=true]{cursor:text}.fancybox-image,.fancybox-spaceball{background:transparent;border:0;height:100%;left:0;margin:0;max-height:none;max-width:none;padding:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.fancybox-spaceball{z-index:1}.fancybox-slide--iframe .fancybox-content,.fancybox-slide--map .fancybox-content,.fancybox-slide--pdf .fancybox-content,.fancybox-slide--video .fancybox-content{height:100%;overflow:visible;padding:0;width:100%}.fancybox-slide--video .fancybox-content{background:#000}.fancybox-slide--map .fancybox-content{background:#e5e3df}.fancybox-slide--iframe .fancybox-content{background:#fff}.fancybox-iframe,.fancybox-video{background:transparent;border:0;display:block;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.fancybox-iframe{left:0;position:absolute;top:0}.fancybox-error{background:#fff;cursor:default;max-width:400px;padding:40px;width:100%}.fancybox-error p{color:#444;font-size:16px;line-height:20px;margin:0;padding:0}.fancybox-button{background:rgba(30,30,30,.6);border:0;border-radius:0;box-shadow:none;cursor:pointer;display:inline-block;height:44px;margin:0;padding:10px;position:relative;transition:color .2s;vertical-align:top;visibility:inherit;width:44px}.fancybox-button,.fancybox-button:link,.fancybox-button:visited{color:#ccc}.fancybox-button:hover{color:#fff}.fancybox-button:focus{outline:none}.fancybox-button.fancybox-focus{outline:1px dotted}.fancybox-button[disabled],.fancybox-button[disabled]:hover{color:#888;cursor:default;outline:none}.fancybox-button div{height:100%}.fancybox-button svg{display:block;height:100%;overflow:visible;position:relative;width:100%}.fancybox-button svg path{fill:currentColor;stroke-width:0}.fancybox-button--fsenter svg:nth-child(2),.fancybox-button--fsexit svg:first-child,.fancybox-button--pause svg:first-child,.fancybox-button--play svg:nth-child(2){display:none}.fancybox-progress{background:#ff5268;height:2px;left:0;position:absolute;right:0;top:0;transform:scaleX(0);transform-origin:0;transition-property:transform;transition-timing-function:linear;z-index:99998}.fancybox-close-small{background:transparent;border:0;border-radius:0;color:#ccc;cursor:pointer;opacity:.8;padding:8px;position:absolute;right:-12px;top:-44px;z-index:401}.fancybox-close-small:hover{color:#fff;opacity:1}.fancybox-slide--html .fancybox-close-small{color:currentColor;padding:10px;right:0;top:0}.fancybox-slide--image.fancybox-is-scaling .fancybox-content{overflow:hidden}.fancybox-is-scaling .fancybox-close-small,.fancybox-is-zoomable.fancybox-can-pan .fancybox-close-small{display:none}.fancybox-navigation .fancybox-button{background-clip:content-box;height:100px;opacity:0;position:absolute;top:calc(50% - 50px);width:70px}.fancybox-navigation .fancybox-button div{padding:7px}.fancybox-navigation .fancybox-button--arrow_left{left:0;left:env(safe-area-inset-left);padding:31px 26px 31px 6px}.fancybox-navigation .fancybox-button--arrow_right{padding:31px 6px 31px 26px;right:0;right:env(safe-area-inset-right)}.fancybox-caption{background:linear-gradient(0deg,rgba(0,0,0,.85) 0,rgba(0,0,0,.3) 50%,rgba(0,0,0,.15) 65%,rgba(0,0,0,.075) 75.5%,rgba(0,0,0,.037) 82.85%,rgba(0,0,0,.019) 88%,transparent);bottom:0;color:#eee;font-size:14px;font-weight:400;left:0;line-height:1.5;padding:75px 44px 25px;pointer-events:none;right:0;text-align:center;z-index:99996}@supports (padding:max(0px)){.fancybox-caption{padding:75px max(44px,env(safe-area-inset-right)) max(25px,env(safe-area-inset-bottom)) max(44px,env(safe-area-inset-left))}}.fancybox-caption--separate{margin-top:-50px}.fancybox-caption__body{max-height:50vh;overflow:auto;pointer-events:all}.fancybox-caption a,.fancybox-caption a:link,.fancybox-caption a:visited{color:#ccc;text-decoration:none}.fancybox-caption a:hover{color:#fff;text-decoration:underline}.fancybox-loading{animation:a 1s linear infinite;background:transparent;border:4px solid #888;border-bottom-color:#fff;border-radius:50%;height:50px;left:50%;margin:-25px 0 0 -25px;opacity:.7;padding:0;position:absolute;top:50%;width:50px;z-index:99999}@keyframes a{to{transform:rotate(1turn)}}.fancybox-animated{transition-timing-function:cubic-bezier(0,0,.25,1)}.fancybox-fx-slide.fancybox-slide--previous{opacity:0;transform:translate3d(-100%,0,0)}.fancybox-fx-slide.fancybox-slide--next{opacity:0;transform:translate3d(100%,0,0)}.fancybox-fx-slide.fancybox-slide--current{opacity:1;transform:translateZ(0)}.fancybox-fx-fade.fancybox-slide--next,.fancybox-fx-fade.fancybox-slide--previous{opacity:0;transition-timing-function:cubic-bezier(.19,1,.22,1)}.fancybox-fx-fade.fancybox-slide--current{opacity:1}.fancybox-fx-zoom-in-out.fancybox-slide--previous{opacity:0;transform:scale3d(1.5,1.5,1.5)}.fancybox-fx-zoom-in-out.fancybox-slide--next{opacity:0;transform:scale3d(.5,.5,.5)}.fancybox-fx-zoom-in-out.fancybox-slide--current{opacity:1;transform:scaleX(1)}.fancybox-fx-rotate.fancybox-slide--previous{opacity:0;transform:rotate(-1turn)}.fancybox-fx-rotate.fancybox-slide--next{opacity:0;transform:rotate(1turn)}.fancybox-fx-rotate.fancybox-slide--current{opacity:1;transform:rotate(0deg)}.fancybox-fx-circular.fancybox-slide--previous{opacity:0;transform:scale3d(0,0,0) translate3d(-100%,0,0)}.fancybox-fx-circular.fancybox-slide--next{opacity:0;transform:scale3d(0,0,0) translate3d(100%,0,0)}.fancybox-fx-circular.fancybox-slide--current{opacity:1;transform:scaleX(1) translateZ(0)}.fancybox-fx-tube.fancybox-slide--previous{transform:translate3d(-100%,0,0) scale(.1) skew(-10deg)}.fancybox-fx-tube.fancybox-slide--next{transform:translate3d(100%,0,0) scale(.1) skew(10deg)}.fancybox-fx-tube.fancybox-slide--current{transform:translateZ(0) scale(1)}@media (max-height:576px){.fancybox-slide{padding-left:6px;padding-right:6px}.fancybox-slide--image{padding:6px 0}.fancybox-close-small{right:-6px}.fancybox-slide--image .fancybox-close-small{background:#4e4e4e;color:#f2f4f6;height:36px;opacity:1;padding:6px;right:0;top:0;width:36px}.fancybox-caption{padding-left:12px;padding-right:12px}@supports (padding:max(0px)){.fancybox-caption{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}}}.fancybox-share{background:#f4f4f4;border-radius:3px;max-width:90%;padding:30px;text-align:center}.fancybox-share h1{color:#222;font-size:35px;font-weight:700;margin:0 0 20px}.fancybox-share p{margin:0;padding:0}.fancybox-share__button{border:0;border-radius:3px;display:inline-block;font-size:14px;font-weight:700;line-height:40px;margin:0 5px 10px;min-width:130px;padding:0 15px;text-decoration:none;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.fancybox-share__button:link,.fancybox-share__button:visited{color:#fff}.fancybox-share__button:hover{text-decoration:none}.fancybox-share__button--fb{background:#3b5998}.fancybox-share__button--fb:hover{background:#344e86}.fancybox-share__button--pt{background:#bd081d}.fancybox-share__button--pt:hover{background:#aa0719}.fancybox-share__button--tw{background:#1da1f2}.fancybox-share__button--tw:hover{background:#0d95e8}.fancybox-share__button svg{height:25px;margin-right:7px;position:relative;top:-1px;vertical-align:middle;width:25px}.fancybox-share__button svg path{fill:#fff}.fancybox-share__input{background:transparent;border:0;border-bottom:1px solid #d7d7d7;border-radius:0;color:#5d5b5b;font-size:14px;margin:10px 0 0;outline:none;padding:10px 15px;width:100%}.fancybox-thumbs{background:#ddd;bottom:0;display:none;margin:0;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;padding:2px 2px 4px;position:absolute;right:0;-webkit-tap-highlight-color:rgba(0,0,0,0);top:0;width:212px;z-index:99995}.fancybox-thumbs-x{overflow-x:auto;overflow-y:hidden}.fancybox-show-thumbs .fancybox-thumbs{display:block}.fancybox-show-thumbs .fancybox-inner{right:212px}.fancybox-thumbs__list{font-size:0;height:100%;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;position:relative;white-space:nowrap;width:100%}.fancybox-thumbs-x .fancybox-thumbs__list{overflow:hidden}.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar{width:7px}.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-track{background:#fff;border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:10px}.fancybox-thumbs__list a{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:rgba(0,0,0,.1);background-position:50%;background-repeat:no-repeat;background-size:cover;cursor:pointer;float:left;height:75px;margin:2px;max-height:calc(100% - 8px);max-width:calc(50% - 4px);outline:none;overflow:hidden;padding:0;position:relative;-webkit-tap-highlight-color:transparent;width:100px}.fancybox-thumbs__list a:before{border:6px solid #ff5268;bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:all .2s cubic-bezier(.25,.46,.45,.94);z-index:99991}.fancybox-thumbs__list a:focus:before{opacity:.5}.fancybox-thumbs__list a.fancybox-thumbs-active:before{opacity:1}@media (max-width:576px){.fancybox-thumbs{width:110px}.fancybox-show-thumbs .fancybox-inner{right:110px}.fancybox-thumbs__list a{max-width:calc(100% - 10px)}}
--------------------------------------------------------------------------------
/public/home/css/style.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";html {
2 | -moz-osx-font-smoothing: grayscale;
3 | -webkit-font-smoothing: antialiased
4 | }
5 |
6 | html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu {
7 | box-sizing: border-box;
8 | -moz-box-sizing: border-box;
9 | -webkit-box-sizing: border-box
10 | }
11 |
12 | * {
13 | margin: 0;
14 | padding: 0;
15 | list-style: none
16 | }
17 |
18 | h1,h2 {
19 | font-size: 18px;
20 | font-weight: 700;
21 | margin-top: 10px;
22 | margin-bottom: 10px
23 | }
24 |
25 | img {
26 | max-width: 100%;
27 | height: auto;
28 | vertical-align: middle;
29 | border-style: none;
30 | }
31 |
32 | body {
33 | background: #f8f8f8;
34 | font-family: "Consolas","Microsoft JhengHei","Apple LiGothic Medium,Microsoft YaHei","微软雅黑","Arial",sans-serif;
35 | font-size: 14px;
36 | -webkit-font-smoothing: antialiased;
37 | -webkit-overflow-scrolling: touch;
38 | line-height: 1.5
39 | }
40 |
41 | h1, h2, h3, h4, h5, h6 {
42 | font-weight: 500;
43 | }
44 |
45 | .md_content li {
46 | list-style: disc;
47 | }
48 | .md_content ol, .md_content ul {
49 | padding-left: 2em;
50 | }
51 |
52 | .text-center {
53 | text-align:center;
54 | }
55 |
56 | code {
57 | background: #F3F3F3;
58 | font-family: Menlo,Monaco,Consolas,"Lucida Console","Courier New",monospace;
59 | font-size: .92857em;
60 | }
61 |
62 | code {
63 | padding: 2px 4px;
64 | color: #B94A48;
65 | }
66 |
67 | pre {
68 | position: relative;
69 | margin: 0 0 18px;
70 | padding: 30px 0 0;
71 | font-size: 14px;
72 | border-radius: 4px;
73 | overflow: hidden;
74 | background: #eee;
75 | border: 1px solid rgba(0,0,0,0);
76 | }
77 |
78 | pre code[class*='language-'] {
79 | display: block;
80 | overflow: auto;
81 | padding: 0 15px 12px;
82 | white-space: pre;
83 | line-height: 1.5;
84 | background: #f3f3f3;
85 | }
86 |
87 | pre::before {
88 | content: '';
89 | position: absolute;
90 | top: 9px;
91 | left: 15px;
92 | width: 12px;
93 | height: 12px;
94 | border-radius: 50%;
95 | background: #fc625d;
96 | box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
97 | z-index: 1;
98 | }
99 |
100 | blockquote {
101 | margin: 1em 0;
102 | padding-left: 1.5em;
103 | border-left: 4px solid #eee;
104 | color: #666;
105 | }
106 |
107 | table {
108 | border: 1px solid #ddd;
109 | width: 100%;
110 | }
111 |
112 | table th,table td {
113 | padding: 5px 10px;
114 | border: 1px solid #eee;
115 | }
116 |
117 | table th {
118 | background: #f3f3f3;
119 | }
120 |
121 | h1,h2,h3,h4,h5,h6 {
122 | font-family: "Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB","WenQuanYi Micro Hei","Microsoft Yahei",sans-serif;
123 | }
124 |
125 | input[type="text"],input[type="email"],input[type="url"],input[type="password"],textarea {
126 | padding: 5px;
127 | border: 1px solid #E9E9E9;
128 | width: 100%;
129 | border-radius: 2px;
130 | -webkit-box-sizing: border-box;
131 | -moz-box-sizing: border-box;
132 | box-sizing: border-box;
133 | }
134 |
135 | textarea {
136 | resize: vertical;
137 | }
138 |
139 | /* 头部 */
140 | .header{
141 | border-bottom: 1px solid #e8e9e7;
142 | background-color: rgba(255,255,255,1);
143 | }
144 | .logo{
145 | position: absolute;
146 | left: 10px;
147 | top: 16px;
148 | font-size: 1.4em;
149 | }
150 | .logo img{
151 | width: 82px;
152 | height: 31px;
153 | }
154 |
155 | .header .layui-nav{
156 | position: absolute;
157 | right: 0;top: 0;
158 | padding: 0;
159 | background: none;
160 | }
161 | .header .layui-nav .layui-nav-item{
162 | margin: 0 10px;
163 | }
164 | .header .layui-nav .layui-nav-item:after,.header .layui-nav .layui-nav-bar{
165 | height: 1px;
166 | background-color: #6bc30d;
167 | }
168 | .header .layui-nav .layui-nav-item a{
169 | color: #212220;
170 | padding: 0 16px;
171 | }
172 | .header .layui-nav .layui-nav-item a:hover{
173 | color: #6bc30d;
174 | }
175 | .header .layui-nav .layui-nav-item[mobile]{
176 | display: none;
177 | }
178 |
179 | .header .layui-nav .layui-nav-more {
180 | /*margin-top: -4px;*/
181 | /*border-color: #212220 transparent transparent;*/
182 | }
183 | .header .layui-nav .layui-nav-mored {
184 | margin-top: -2px;
185 | /*border-style: dashed dashed solid;*/
186 | /*border-color: transparent transparent #212220;*/
187 | }
188 |
189 | .layui-container {
190 | min-height: calc(100vh - 135px);
191 | }
192 |
193 | .layui-container .main{
194 | margin: 10px auto;
195 | }
196 |
197 | .layui-bg-gray {
198 | background-color: #eee!important;
199 | color: #666!important
200 | }
201 |
202 | .layui-badge:empty {
203 | display: none;
204 | }
205 |
206 | .map {
207 | margin-bottom: 10px;
208 | }
209 |
210 | /* 面板 */
211 | .list-card {
212 | border-radius: 6px;
213 | margin-bottom: 10px;
214 | }
215 |
216 | .list-card .list-pic {
217 | width: 150px;
218 | height: 150px;
219 | line-height: 150px;
220 | float: left;
221 | text-align: center;
222 | overflow: hidden;
223 | margin-right: 25px
224 | }
225 |
226 | .list-card .list-pic img {
227 | max-width: 100%
228 | }
229 |
230 | .list-card p {
231 | display: -webkit-box;
232 | -webkit-line-clamp: 3;
233 | -webkit-box-orient: vertical;
234 | overflow: hidden
235 | }
236 |
237 | .title-article {
238 | background: #fff;
239 | overflow: hidden;
240 | padding: 20px 20px 10px 20px;
241 | position: relative
242 | }
243 |
244 | .title-article h1 {
245 | padding-bottom: 10px
246 | }
247 |
248 | .title-article p {
249 | margin-bottom: 10px;
250 | color: #666
251 | }
252 |
253 | .title-article p span {
254 | margin-right: 10px
255 | }
256 |
257 | .title-article .titlepic {
258 | background: #fff;
259 | width: 150px;
260 | height: 150px;
261 | line-height: 150px;
262 | float: left;
263 | text-align: center
264 | }
265 |
266 | .title-article .titlepic img {
267 | max-width: 110px;
268 | max-height: 110px
269 | }
270 |
271 | .title-article .title-msg {
272 | margin-bottom: 10px
273 | }
274 |
275 | .title-article .title-msg span {
276 | color: #999;
277 | margin-right: 10px
278 | }
279 |
280 | .title-article .title-msg span a {
281 | color: inherit
282 | }
283 |
284 | .title-article .title-msg span a:hover {
285 | color: #1e9fff
286 | }
287 |
288 | .title-article .title-right {
289 | position: absolute;
290 | top: 20px;
291 | right: 15px;
292 | background: #f5f5f5;
293 | padding: 10px;
294 | overflow: hidden
295 | }
296 |
297 | .title-article .title-right img {
298 | max-width: 120px !important;
299 | max-height: 120px !important
300 | }
301 |
302 | .title-sidebar {
303 | border-bottom: 1px solid #eee;
304 | width: 100%;
305 | color: #666;
306 | font-weight: 600;
307 | padding-bottom: 10px;
308 | margin-bottom: 10px;
309 | overflow: hidden;
310 | }
311 |
312 | .title-sidebar i {
313 | color: #666;
314 | margin: 5px
315 | }
316 |
317 | .title-sidebar h3 {
318 | font-weight: 600
319 | }
320 |
321 | .text,.reward,.copy-text,.page-text,.relates,.user-text,.comment-text,.tags-text {
322 | background: #fff;
323 | padding: 20px;
324 | }
325 |
326 | .text {
327 | padding-top: 0;
328 | padding-bottom: 0;
329 | line-height: 2;
330 | overflow: hidden
331 | }
332 |
333 | .text .tab-content {
334 | padding-top: 15px;
335 | padding-bottom: 15px;
336 | margin-bottom: 10px;
337 | height: 500px;
338 | overflow-y: scroll
339 | }
340 |
341 | .text img:not([class]) {
342 | max-width: 80% !important;
343 | height: auto !important;
344 | margin: 20px auto;
345 | display: block;
346 | }
347 |
348 | .copy-text {
349 | color: #666;
350 | }
351 |
352 | .copy-text div {
353 | font-size: 12px;
354 | background: #f5f5f5;
355 | padding: 10px;
356 | border-radius: 4px;
357 | overflow: hidden;
358 | line-height: 2
359 | }
360 |
361 | .page-text {
362 | margin-bottom: 10px;
363 | font-size: 14px;
364 | overflow: hidden
365 | }
366 |
367 | .page-text div:first-child {
368 | margin-bottom: 10px
369 | }
370 |
371 | .page-text a {
372 | width: 90%;
373 | display: inline-block
374 | }
375 |
376 | .page-text span {
377 | margin-right: 10px
378 | }
379 |
380 |
381 | /* 搜索框 */
382 | .component {
383 | background: #fff;
384 | padding: 15px;
385 | margin-bottom: 15px;
386 | border-radius: 6px;
387 | overflow: hidden
388 | }
389 | .component .layui-input {
390 | width: 190px;
391 | height: 30px;
392 | padding-left: 12px;
393 | font-size: 12px;
394 | }
395 |
396 | /* 搜索不到内容 */
397 | .post {
398 | background: #fff;
399 | padding: 15px;
400 | margin-bottom: 15px;
401 | border-radius: 6px;
402 | overflow: hidden
403 | }
404 | .post .post-title {
405 | text-align:center;
406 | }
407 |
408 | /* 分类 */
409 | .column {
410 | background: #fff;
411 | padding: 15px;
412 | margin-bottom: 15px;
413 | border-radius: 6px;
414 | overflow: hidden
415 | }
416 |
417 | .column ul {
418 | overflow: hidden
419 | }
420 |
421 | .column ul li {
422 | padding: 5px 10px
423 | }
424 |
425 | .column ul span {
426 | float: right;
427 | color: #999
428 | }
429 |
430 | .column ul i {
431 | color: #666
432 | }
433 |
434 | /* 博主动态 */
435 | .dynamic {
436 | background: #fff;
437 | padding: 15px;
438 | margin-bottom: 15px;
439 | border-radius: 6px;
440 | overflow: hidden
441 | }
442 |
443 | .dynamic ul {
444 | padding-left: 10px;
445 | padding-right: 10px;
446 | height: 350px;
447 | overflow: scroll;
448 | overflow-x: hidden
449 | }
450 |
451 | .dynamic ul li {
452 | position: relative;
453 | padding: 10px 10px 0 20px;
454 | border-left: 2px solid #c0c0c0
455 | }
456 |
457 | .dynamic ul li span {
458 | position: absolute;
459 | left: -12px;
460 | top: 10px;
461 | padding: 2px;
462 | border: 5px solid #fff
463 | }
464 |
465 | .dynamic ul li a {
466 | color: #3f3f3f
467 | }
468 |
469 | .dynamic ul li p {
470 | margin-top: 5px;
471 | padding-bottom: 14px;
472 | color: #666;
473 | border-bottom: 1px solid #f1f1f1
474 | }
475 |
476 | .dynamic ul li small {
477 | display: inherit;
478 | color: #999;
479 | margin-top: 10px
480 | }
481 |
482 | .dynamic ul li img {
483 | width: 50%
484 | }
485 |
486 | .dynamic ul li:hover span {
487 | background: #888 !important
488 | }
489 |
490 | .dynamic ul li:hover a {
491 | color: #3280fc
492 | }
493 |
494 | .dynamic ul li:hover p {
495 | color: #303030
496 | }
497 |
498 | /* 标签云 */
499 | .tags {
500 | background: #fff;
501 | padding: 15px;
502 | margin-bottom: 15px;
503 | border-radius: 6px;
504 | overflow: hidden
505 | }
506 |
507 | .tags div a {
508 | margin: 0 6px 5px 0 !important;
509 | white-space: nowrap;
510 | text-overflow: ellipsis;
511 | overflow: hidden
512 | }
513 |
514 | .tags-text i {
515 | color: #666
516 | }
517 |
518 | /* 广告 */
519 | .ads {
520 | background: #fff;
521 | padding: 15px;
522 | margin-bottom: 15px;
523 | border-radius: 6px;
524 | overflow: hidden
525 | }
526 |
527 | /* 友情链接 */
528 | .link {
529 | background: #fff;
530 | padding: 15px;
531 | margin-bottom: 15px;
532 | border-radius: 6px;
533 | overflow: hidden
534 | }
535 |
536 | .link div a {
537 | display: inline-block;
538 | text-align: center;
539 | width: 45%;
540 | margin: 0 6px 5px 0 !important;
541 | white-space: nowrap;
542 | text-overflow: ellipsis;
543 | overflow: hidden;
544 | border: none;
545 | border-bottom: 1px solid #f0f0f0;
546 | height: 22px;
547 | line-height: 22px;
548 | font-size: 12px;
549 | background-color: #fff;
550 | color: #555;
551 | }
552 |
553 | .link i {
554 | color: #666
555 | }
556 |
557 | /* 页码 */
558 | .page-navigator {
559 | padding: 15px;
560 | margin-left: auto;
561 | margin-right: auto;
562 | text-align: center;
563 | display: inherit
564 | }
565 |
566 | .page-navigator a:hover {
567 | background: #393d49;
568 | color: #fff
569 | }
570 |
571 | .page-navigator .current {
572 | background: #333742;
573 | color: #fff
574 | }
575 |
576 | /* 底部 */
577 | .footer {
578 | background: #fff;
579 | margin-top: 15px;
580 | padding-top: 20px;
581 | padding-bottom: 30px
582 | }
583 |
584 | .footer span {
585 | color: #999
586 | }
587 |
588 | .footer .t-copy {
589 | text-align: center;
590 | }
591 |
592 | /* 评论 */
593 | .pinglun {
594 | margin-bottom: 10px
595 | }
596 |
597 | .pinglun li {
598 | margin-bottom: 10px
599 | }
600 |
601 | .pinglun .pl-dan {
602 | border-radius: 4px
603 | }
604 |
605 | .pinglun .t-p {
606 | float: left
607 | }
608 |
609 | .pinglun .t-p img {
610 | width: 50px;
611 | height: 50px;
612 | border: 4px solid rgba(210,210,210,0.2);
613 | border-radius: 200px
614 | }
615 |
616 | .pinglun .t-u {
617 | margin-left: 70px;
618 | line-height: 22px;
619 | padding-bottom: 10px;
620 | margin-bottom: 10px
621 | }
622 |
623 | .pinglun .t-u .t-g {
624 | color: #999;
625 | font-size: 12px
626 | }
627 |
628 | .pinglun .t-u .t-btn a {
629 | font-size: 12px;
630 | padding: 2px 5px;
631 | border-radius: 4px;
632 | margin-right: 10px;
633 | border: #e2e2e2 1px solid;
634 | color: #909090
635 | }
636 |
637 | .pinglun .t-u .t-btn a:hover {
638 | background: #1ab667;
639 | color: #fff;
640 | border: #1ab667 1px solid
641 | }
642 |
643 | .pinglun .t-s {
644 | margin-top: 10px;
645 | margin-bottom: 10px;
646 | color: #888
647 | }
648 |
649 | .pinglun .t-s a {
650 | float: left;
651 | margin-right: 10px;
652 | color: #888
653 | }
654 |
655 | .pinglun .t-s p {
656 | word-break: break-all;
657 | }
658 |
659 | .pinglun .cancel-comment-reply {
660 | background: #f05050;
661 | padding: 2px 5px;
662 | border-radius: 4px;
663 | display: inline-block;
664 | margin-bottom: 10px
665 | }
666 |
667 | .pinglun .cancel-comment-reply a {
668 | color: #fff
669 | }
670 |
671 | .comment-children .pl-dan {
672 | padding-left: 65px;
673 | }
674 |
675 | .comment-children .t-u {
676 | margin-left: 30px;
677 | padding-left: 38px;
678 | border-left: 1px solid #eee;
679 | }
680 |
681 | /* 头条新闻 */
682 | .detail {
683 | background: #fff;
684 | padding: 20px;
685 | margin-bottom: 10px;
686 | overflow: hidden;
687 | clear: both
688 | }
689 |
690 | .detail h3 {
691 | display: block;
692 | margin-top: 28px;
693 | margin-bottom: 14px;
694 | padding-left: 15px;
695 | border-left: 5px solid #ffc81f;
696 | background-color: transparent;
697 | color: #363636;
698 | text-align: left;
699 | font-weight: 700;
700 | font-size: 24px;
701 | font-family: Tahoma,Arial,Hiragino Sans GB,冬é’黑,Microsoft YaHei,微软雅黑,SimSun,宋体,Heiti,黑体,sans-serif;
702 | line-height: 32px
703 | }
704 |
705 | .detail a {
706 | border-bottom: 1px solid #ffc81f;
707 | text-decoration: none;
708 | }
709 |
710 | .detail>* {
711 | margin-bottom: 24px;
712 | }
713 |
714 | .detail img {
715 | display: block;
716 | margin: 0 auto 8px;
717 | max-width: 100%;
718 | width: 100%;
719 | height: auto;
720 | }
721 |
722 | /* 动态页 */
723 | .mylife {
724 | background: #fff;
725 | padding: 20px;
726 | margin-bottom: 10px;
727 | overflow: hidden;
728 | clear: both
729 | }
730 |
731 | .mylife .t-p {
732 | float: left;
733 | height: auto
734 | }
735 |
736 | .mylife .t-p img {
737 | width: 42px;
738 | height: 42px;
739 | border-radius: 200px;
740 | /*box-shadow: 2px 5px 25px #efefef*/
741 | }
742 |
743 | .mylife .t-r {
744 | margin-left: 50px;
745 | padding-bottom: 15px;
746 | margin-bottom: 15px;
747 | border-bottom: 1px #eee solid;
748 | color: #555
749 | }
750 |
751 | .mylife .t-r strong {
752 | font-size: 16px
753 | }
754 |
755 | .mylife .t-r p {
756 | margin-top: 5px;
757 | margin-bottom: 5px
758 | }
759 |
760 | .mylife .t-r p img {
761 | max-width: 200px;
762 | margin-top: 10px;
763 | display: inherit
764 | }
765 |
766 | .mylife .t-r p video {
767 | background: #222
768 | }
769 |
770 | .mylife .t-r span {
771 | font-size: 12px
772 | }
773 |
774 | .about-life {
775 | height: 180px;
776 | background: #fff;
777 | overflow: hidden
778 | }
779 |
780 | .about-life .t-w {
781 | background: #eee;
782 | padding-left: 15px;
783 | padding-right: 15px;
784 | height: 65%
785 | }
786 |
787 | .about-life .t-u {
788 | float: left;
789 | margin-top: 30px
790 | }
791 |
792 | .about-life .t-u img {
793 | border-radius: 200px
794 | }
795 |
796 | .about-life .t-t {
797 | margin-left: 150px;
798 | padding-top: 20px
799 | }
800 |
801 | .about-life .t-t h1 span {
802 | font-size: 12px;
803 | color: #666
804 | }
805 |
806 | .about-life .t-t h1 span i {
807 | margin-right: 6px;
808 | margin-left: 8px
809 | }
810 |
811 | .about-life .t-d {
812 | color: #666
813 | }
814 |
815 | /* .about-life .t-i {
816 | margin-top: 15px;
817 | padding-top: 10px
818 | } */
819 |
820 | .about-life .t-i i {
821 | font-size: 12px !important
822 | }
823 |
824 | .about-life .t-i a {
825 | background: #aaa;
826 | margin: 0;
827 | display: inline-block;
828 | color: #fff;
829 | white-space: nowrap;
830 | text-align: center;
831 | height: 30px;
832 | line-height: 30px;
833 | padding: 0 10px;
834 | font-size: 12px;
835 | border-radius: 100px;
836 | }
837 |
838 | .title-life {
839 | clear: both;
840 | background: #fff;
841 | width: 100%;
842 | float: left;
843 | padding-left: 20px;
844 | padding-right: 20px;
845 | margin-top: 10px;
846 | border-bottom: 1px #eee solid;
847 | line-height: 48px;
848 | box-sizing:border-box;
849 | }
850 |
851 | .title-life h3 {
852 | float: left;
853 | font-weight: 600
854 | }
855 |
856 | .title-life span {
857 | float: right;
858 | font-size: 12px;
859 | color: #666
860 | }
861 |
862 | /* 归档 */
863 | .archives {
864 | padding: 15px;
865 | background: #fff;
866 | color: #666
867 | }
868 |
869 | .archives legend {
870 | font-size: 16px
871 | }
872 |
873 | .archives a {
874 | color: #555 !important;
875 | line-height: 2
876 | }
877 |
878 | .archives h3 a {
879 | line-height: 0
880 | }
881 |
882 | .archives small {
883 | display: block;
884 | margin-bottom: 20px;
885 | color: #999
886 | }
887 |
888 | .title-page {
889 | margin-bottom: 15px;
890 | color: #666;
891 | line-height: 2.4
892 | }
893 |
894 | .title-page h3 {
895 | color: #555
896 | }
897 |
898 | /* 新归档 */
899 | .timeline-header {
900 | display: block;
901 | width: 12em;
902 | margin-right: 2px;
903 | margin-left: 2px;
904 | text-align: center
905 | }
906 |
907 | .timeline-header .layui-btn {
908 | height: 30px;
909 | line-height: 30px;
910 | }
911 |
912 | .timeline-header h2 {
913 | padding: 0px;
914 | margin: 0px;
915 | font-size: 14px;
916 | font-weight: normal;
917 | line-height: 30px;
918 | }
919 |
920 | .timeline-item {
921 | display: block
922 | }
923 |
924 | .timeline-item:after, .timeline-item:before {
925 | box-sizing: border-box;
926 | display: table;
927 | content: " "
928 | }
929 |
930 | .timeline-wrap {
931 | border-color: #bfbfbf;
932 | display: block;
933 | padding: 10px 0 5px 20px;
934 | margin-left: 6em;
935 | border-style: solid;
936 | border-width: 0 0 0 1px;
937 | margin-bottom: 0px !important;
938 | }
939 |
940 | .timeline-wrap:after, .timeline-wrap:before {
941 | box-sizing: border-box;
942 | display: table;
943 | content: " "
944 | }
945 |
946 | .timeline-wrap:before {
947 | top: 4px;
948 | float: left;
949 | width: 10px;
950 | height: 10px;
951 | margin-left: -26px;
952 | background: #edf1f2;
953 | border-color: inherit;
954 | border-style: solid;
955 | border-width: 3px;
956 | border-radius: 50%;
957 | content: "";
958 | box-shadow: 0 0 0 4px #f0f3f4;
959 | transition: all .3s ease;
960 | }
961 |
962 | .timeline-wrap:hover:before {
963 | border-color: #1e87f0;
964 | }
965 |
966 | .timeline-date {
967 | display: block;
968 | float: left;
969 | width: 4.5em;
970 | margin-left: -7.5em;
971 | text-align: right
972 | }
973 |
974 | .timeline-content {
975 | display: inline-block;
976 | border-radius: 2px;
977 | }
978 |
979 | .timeline-content, .timeline-date, .timeline-wrap:before {
980 | position: relative;
981 | }
982 |
983 | .timeline-content a {
984 | line-height: 0
985 | }
986 |
987 | .timeline-content a:hover {
988 | text-decoration: none;
989 | color: #1e87f0 !important;
990 | }
991 |
992 | .timeline-text {
993 | padding: 5px;
994 | border-bottom: 0px !important;
995 | }
996 |
997 | .timeline-text a:before, .timeline-content a:before {
998 | content: "";
999 | padding: 0px;
1000 | box-sizing: border-box;
1001 | }
1002 |
1003 | .timeline-menu {
1004 | background: #fff;
1005 | padding: 15px;
1006 | margin-bottom: 15px;
1007 | border-radius: 6px;
1008 | overflow: hidden;
1009 | }
1010 |
1011 | .timeline-menu ul {
1012 | padding-left: 10px;
1013 | padding-right: 10px;
1014 | max-height: 500px;
1015 | overflow: scroll;
1016 | overflow-x: hidden
1017 | }
1018 |
1019 | .timeline-menu-fixed {
1020 | position: fixed;
1021 | top: 10px;
1022 | }
1023 |
1024 | .timeline-menu .active {
1025 | background: rgba(175, 167, 167, 0.1);
1026 | }
1027 |
1028 | /* 首页轮播图 */
1029 | .layui-carousel img{
1030 | width: 100%;
1031 | height: 180px;
1032 | }
1033 |
1034 | /* 密码保护美化 */
1035 | .protected p {
1036 | text-align:center;
1037 | }
1038 | .protected input[type="password"] {
1039 | width: 50%;
1040 | }
1041 | .protected .submit {
1042 | display: inline-block;
1043 | height: 38px;
1044 | line-height: 38px;
1045 | padding: 0 18px;
1046 | background-color: #1E9FFF;
1047 | color: #fff;
1048 | white-space: nowrap;
1049 | text-align: center;
1050 | font-size: 14px;
1051 | border: none;
1052 | border-radius: 2px;
1053 | cursor: pointer;
1054 | }
1055 |
1056 | /* 自适应布局 */
1057 | @media (min-width: 1200px) {
1058 |
1059 | }
1060 |
1061 | @media (max-width: 1200px) {
1062 | .layui-main {
1063 | width: 100%;
1064 | }
1065 | .component .layui-input {
1066 | width: 140px;
1067 | }
1068 | }
1069 |
1070 | @media (max-width: 992px) {
1071 | .layui-main {
1072 | width: 100%;
1073 | }
1074 | .component .input {
1075 | width: 82%;
1076 | }
1077 | .component .layui-input {
1078 | width: 100%;
1079 | }
1080 | }
1081 |
1082 | @media (min-width: 768px) {
1083 |
1084 | }
1085 |
1086 | @media (max-width: 768px) {
1087 | .header .layui-nav .layui-nav-more {
1088 | display: none!important;
1089 | }
1090 | .header .layui-nav .layui-nav-mored {
1091 | display: none!important;
1092 | }
1093 |
1094 | .layui-header .layui-nav-item a {
1095 | padding-left: 10px;
1096 | padding-right: 10px
1097 | }
1098 | .nav-btn .layui-nav-child {
1099 | left: auto;
1100 | right: 0;
1101 | }
1102 | .list-card .list-pic {
1103 | width: 100%;
1104 | /* height: 100%; */
1105 | line-height: 200px;
1106 | margin-bottom: 10px
1107 | }
1108 |
1109 | .tags-text {
1110 | font-size: 12px
1111 | }
1112 |
1113 | .page-text a {
1114 | margin-top: 10px
1115 | }
1116 | .title-article {
1117 | padding: 15px
1118 | }
1119 |
1120 | .title-article .title-right {
1121 | position: initial;
1122 | height: 100% !important;
1123 | text-align: center;
1124 | margin-top: 10px;
1125 | margin-bottom: 10px;
1126 | background: none
1127 | }
1128 |
1129 | .title-article .title-msg span {
1130 | font-size: 12px
1131 | }
1132 |
1133 | .relates ul li {
1134 | width: 100%
1135 | }
1136 | .about-life .t-u {
1137 | margin-top: 50px
1138 | }
1139 |
1140 | .about-life .t-u img {
1141 | height: 100px
1142 | }
1143 |
1144 | .about-life .t-t {
1145 | margin-left: 116px
1146 | }
1147 |
1148 | .about-life .t-t h1 {
1149 | margin: 0
1150 | }
1151 |
1152 | .about-life .t-d {
1153 | display: -webkit-box;
1154 | -webkit-line-clamp: 3;
1155 | -webkit-box-orient: vertical;
1156 | overflow: hidden;
1157 | max-height: 60px
1158 | }
1159 |
1160 | .about-life .t-i {
1161 | margin: 0
1162 | }
1163 | }
1164 |
1165 |
1166 | /* 兼容系统默认markdown排版样式 */
1167 | .text p {
1168 | margin: 14px 0px;
1169 | }
1170 |
1171 | .text ol, .text ul {
1172 | margin: 14px 0px;
1173 | padding-left: 40px;
1174 | }
1175 |
1176 | .text ol li {
1177 | list-style: decimal;
1178 | }
1179 |
1180 | .text ul li {
1181 | list-style: disc;
1182 | }
1183 |
--------------------------------------------------------------------------------
/public/home/img/00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/home/img/00.png
--------------------------------------------------------------------------------
/public/home/img/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/home/img/404.png
--------------------------------------------------------------------------------
/public/home/img/blog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/home/img/blog.jpg
--------------------------------------------------------------------------------
/public/home/img/error-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/home/img/error-bg.png
--------------------------------------------------------------------------------
/public/home/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/home/img/favicon.png
--------------------------------------------------------------------------------
/public/home/js/main.js:
--------------------------------------------------------------------------------
1 | layui.use(['layer', 'element', 'util'], function(){
2 | var $ = layui.$,
3 | layer = layui.layer,
4 | element = layui.element,
5 | util = layui.util;
6 |
7 | $(".nav-btn").on('click', function(){
8 | $('.nav-btn dl').toggleClass('layui-show');
9 | });
10 |
11 | //友情链接tips
12 | $(".link div a").mouseover(function(e) {
13 | if ($.trim(this.title) != '') {
14 | this.Title = this.title;
15 | this.title = "";
16 | layer.tips(this.Title, this, {tips: 3});
17 | }
18 | }).mouseout(function() {
19 | if (this.Title != null) {
20 | this.title = this.Title;
21 | }
22 | })
23 |
24 | //文章图片点击事件(如果为pc端才生效)
25 | // var device = layui.device();
26 | // if(!(device.weixin || device.android || device.ios)){
27 | // $(".text img").click(function() {
28 | // $.previewImage(this.src);
29 | // });
30 | // $.previewImage = function (src) {
31 | // var img = new Image(), index = layer.load(2, {time: 0, scrollbar: false, shade: [0.02, '#000']});
32 | // img.style.background = '#fff', img.style.display = 'none';
33 | // img.src = src;
34 | // document.body.appendChild(img), img.onerror = function () {
35 | // layer.close(index);
36 | // }, img.onload = function () {
37 | // layer.open({
38 | // type: 1, shadeClose: true, success: img.onerror, content: $(img), title: false,
39 | // area: [img.width > 1140 ? '1140px' : img.width, img.height > 800 ? '800px' : img.height], closeBtn: 1, skin: 'layui-layer-nobg', end: function () {
40 | // document.body.removeChild(img);
41 | // }
42 | // });
43 | // };
44 | // };
45 | // }
46 |
47 | //更换为fancybox 2022-05-04
48 | $('#preview img').each(function () {
49 | $(this).wrap($(` `));
50 | });
51 |
52 | //右下角工具箱(返回顶部)
53 | var dark = localStorage.getItem("dark");
54 | if(dark==1){
55 | $("body").addClass("dark");
56 | }
57 | util.fixbar({
58 | bar1: ''
59 | ,click: function(type){
60 | if(type === 'bar1'){
61 | var dark = localStorage.getItem("dark");
62 | console.log(dark);
63 | if(dark==1){
64 | localStorage.removeItem("dark");
65 | $("body").removeClass("dark");
66 | }else{
67 | localStorage.setItem("dark", "1");
68 | $("body").addClass("dark");
69 | }
70 | }
71 | }
72 | });
73 |
74 | });
75 |
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/code.css:
--------------------------------------------------------------------------------
1 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#FAFAFA;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none}
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/laydate/default/laydate.css:
--------------------------------------------------------------------------------
1 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;animation-name:laydate-downbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@keyframes laydate-downbit{0%{opacity:.3;transform:translate3d(0,-5px,0)}100%{opacity:1;transform:translate3d(0,0,0)}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;padding:0 5px;color:#999;font-size:18px;cursor:pointer}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-set-ym span{padding:0 10px;cursor:pointer}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px}.layui-laydate-footer span{display:inline-block;vertical-align:top;height:26px;line-height:24px;padding:0 10px;border:1px solid #C9C9C9;border-radius:2px;background-color:#fff;font-size:12px;cursor:pointer;white-space:nowrap;transition:all .3s}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-footer span:hover{color:#5FB878}.layui-laydate-footer span.layui-laydate-preview{cursor:default;border-color:transparent!important}.layui-laydate-footer span.layui-laydate-preview:hover{color:#666}.layui-laydate-footer span:first-child.layui-laydate-preview{padding-left:0}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{margin:0 0 0 -1px}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;height:30px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content,.layui-laydate-range .laydate-main-list-1 .layui-laydate-header{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#B5FFF8}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eee;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/layer/default/icon-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/css/modules/layer/default/icon-ext.png
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/layer/default/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/css/modules/layer/default/icon.png
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/layer/default/layer.css:
--------------------------------------------------------------------------------
1 | .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:50px;line-height:50px;border-bottom:1px solid #F0F0F0;font-size:14px;color:#333;overflow:hidden;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:17px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:300px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:260px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:300px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:51px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{background:0 0;box-shadow:none}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgnext,.layui-layer-imgprev{position:fixed;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:30px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:30px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:fixed;left:0;right:0;bottom:0;width:100%;height:40px;line-height:40px;background-color:#000\9;filter:Alpha(opacity=60);background-color:rgba(2,0,0,.35);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}}
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/layer/default/loading-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/css/modules/layer/default/loading-0.gif
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/layer/default/loading-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/css/modules/layer/default/loading-1.gif
--------------------------------------------------------------------------------
/public/lib/layui/css/modules/layer/default/loading-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/css/modules/layer/default/loading-2.gif
--------------------------------------------------------------------------------
/public/lib/layui/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/font/iconfont.eot
--------------------------------------------------------------------------------
/public/lib/layui/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/font/iconfont.ttf
--------------------------------------------------------------------------------
/public/lib/layui/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/font/iconfont.woff
--------------------------------------------------------------------------------
/public/lib/layui/font/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/public/lib/layui/font/iconfont.woff2
--------------------------------------------------------------------------------
/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncccode/echo/f8387fdb57f6a7e057d92ebaa7834d71bdf18f0e/screenshot.jpg
--------------------------------------------------------------------------------
/usr/panel/config.php:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
27 |
34 |
35 |
36 |
49 |
50 |
大横幅内容
51 |
52 |
53 |
54 |
55 |
56 |
69 |
70 |
小横幅内容
71 |
72 |
73 |
74 |
75 |
76 |
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 |
137 |
143 |
149 |
155 |
156 |
157 |
脚本代码
158 |
159 |
160 |
161 |
162 |
保存设置
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
175 |
176 |
201 |
202 |
--------------------------------------------------------------------------------
/usr/panel/setting.php:
--------------------------------------------------------------------------------
1 |
2 | to($categories);
9 |
10 | ?>
11 |
12 | themeUrl('public/admin/css/view.css','echo').'">'; ?>
13 | themeUrl('public/admin/js/vue.js','echo').'">'; ?>
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
33 |
40 |
41 |
50 |
51 |
57 |
71 |
85 |
99 |
100 | 侧边栏
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
168 |
169 |
170 |
175 |
176 |
179 |
182 |
185 |
188 |
191 |
194 |
195 |
196 |
197 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
220 |
335 |
336 |
--------------------------------------------------------------------------------
/usr/themes/archive.php:
--------------------------------------------------------------------------------
1 |
2 | need('common/header.php'); ?>
3 |
4 |
5 | need('common/searchs.php'); ?>
6 |
7 |
8 |
21 |
22 | have()): ?>
23 | next()): ?>
24 |
25 | options->thumbType)): ?>
26 |
31 |
32 |
33 | title() ?>
34 | excerpt(200, '...'); ?>
35 |
36 |
37 | category(','); ?>
38 | date('Y-m-d A'); ?>
39 | 次
40 | commentsNum('%d'); ?>条
41 |
42 |
43 |
44 |
45 | pageNav('«', '»', 1, '...', array('wrapTag' => 'div', 'wrapClass' => 'layui-laypage layui-laypage-molv', 'itemTag' => '', 'currentClass' => 'current', )); ?>
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | need('common/sidebar.php'); ?>
55 |
56 |
57 |
58 |
59 | need('common/footer.php'); ?>
60 |
--------------------------------------------------------------------------------
/usr/themes/archives.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 | need('common/header.php'); ?>
11 |
12 |
13 |
14 | need('common/searchs.php'); ?>
15 |
16 |
17 |
18 |
19 |
20 | category(','); ?>
21 | title() ?>
22 |
23 |
24 |
25 |
26 |
27 |
文章归档
28 |
%s 篇日志,共 %s 条评论,加油啊~',$stat->PublishedPostsNum, $stat->PublishedCommentsNum); ?>
29 |
30 |
31 | widget('Widget_Contents_Post_Date', 'type=month&format=Y 年 m 月')->to($archives); ?>
32 | next()): ?>
33 |
34 |
35 |
36 |
37 | year;
39 | $month = $archives->month;
40 | $nextYear = $month == 12 ? $year+ 1 : $year;
41 | $nextMonth = $month == 12 ? 1 : $month+1;
42 | $contents = $this->db->fetchAll($this->select()
43 | ->where('table.contents.status = ?', 'publish')
44 | ->where('table.contents.created >= ?', strtotime("$year-$month"))
45 | ->where('table.contents.created < ?', strtotime("$nextYear-$nextMonth"))
46 | ->where('table.contents.type = ?', 'post')
47 | ->order('table.contents.created', Typecho_Db::SORT_DESC), array($this, 'push'));
48 | //var_dump($contents);
49 | foreach ($contents as $content) {
50 | echo "
$content[title] $content[day]日发布,共$content[commentsNum]条评论
";
51 | }
52 | ?>
53 |
54 |
55 |
56 |
57 |
58 |
59 |
62 |
63 |
64 |
65 |
66 |
67 | need('common/sidebar.php'); ?>
68 |
69 |
70 |
71 |
72 | need('common/footer.php'); ?>
73 |
--------------------------------------------------------------------------------
/usr/themes/archives_new.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 | need('common/header.php'); ?>
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | category(','); ?>
19 | title() ?>
20 |
21 |
22 |
23 |
24 |
25 |
文章归档
26 |
%s 篇日志,共 %s 条评论,加油啊~',$stat->PublishedPostsNum, $stat->PublishedCommentsNum); ?>
27 |
28 |
29 | widget('Widget_Contents_Post_Date', 'type=month&format=Y 年 m 月')->to($archives); ?>
30 | next()): ?>
31 |
36 |
37 | year;
39 | $month = $archives->month;
40 | $nextYear = $month == 12 ? $year+ 1 : $year;
41 | $nextMonth = $month == 12 ? 1 : $month+1;
42 | $contents = $this->db->fetchAll($this->select()
43 | ->where('table.contents.status = ?', 'publish')
44 | ->where('table.contents.created >= ?', strtotime("$year-$month"))
45 | ->where('table.contents.created < ?', strtotime("$nextYear-$nextMonth"))
46 | ->where('table.contents.type = ?', 'post')
47 | ->order('table.contents.created', Typecho_Db::SORT_DESC), array($this, 'push'));
48 | //var_dump($contents);
49 | foreach ($contents as $content) {
50 | $html = <<
52 |
58 |
59 | HTML;
60 |
61 | echo $html;
62 | }
63 | ?>
64 |
65 |
68 |
69 |
70 |
71 |
72 |
84 |
85 |
86 |
87 |
88 |
116 |
117 | need('common/footer.php'); ?>
118 |
--------------------------------------------------------------------------------
/usr/themes/common/comments.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | authorId) {
6 | if ($comments->authorId == $comments->ownerId) {
7 | $group = '博主';
8 | $commentClass .= ' comment-by-author'; //如果是文章作者的评论添加 .comment-by-author 样式
9 | } else {
10 | $group = '';
11 | $commentClass .= ' comment-by-user'; //如果是评论作者的添加 .comment-by-user 样式
12 | }
13 | }
14 | $commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级
15 | ?>
16 |
17 |
27 |
42 | children) { ?>
43 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
112 |
--------------------------------------------------------------------------------
/usr/themes/common/footer.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 | footer(); ?>
15 | options->script(); ?>
16 |
17 |
18 |
--------------------------------------------------------------------------------
/usr/themes/common/header.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | archiveTitle(array(
10 | 'category' => _t('分类 %s 下的文章'),
11 | 'search' => _t('包含关键字 %s 的文章'),
12 | 'tag' => _t('标签 %s 下的文章'),
13 | 'author' => _t('%s 发布的文章')
14 | ), '', ' - '); ?>options->title(); ?> ~ 个人博客
15 |
16 |
17 | header(); ?>
18 |
19 |
20 |
21 |
22 |
23 |
24 | options->codeStyle == '1'): ?>
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
117 |
118 |
119 |
120 |
123 |
124 |
200 |
--------------------------------------------------------------------------------
/usr/themes/common/searchs.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | options->sidebar)): ?>
4 | options->sidebar);?>
5 |
6 |
16 |
17 |
--------------------------------------------------------------------------------
/usr/themes/common/sidebar.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | widget('Widget_Metas_Category_List');
7 | if($Category_List->have()){
8 | while($Category_List->next()){
9 | $column_text .= ' '.$Category_List->name.''.$Category_List->count.' ';
10 | }
11 | }
12 | ?>
13 |
14 | fetchRow($db->select('cid')->from('table.contents')->where('template = ? AND status = ?', 'mylife.php', 'publish'))['cid'];
19 | $comments = $db->fetchAll($db->select()->from('table.comments')->where('cid = ? AND status = ?', $cid, 'approved')->order('created', Typecho_Db::SORT_DESC));
20 |
21 | foreach($comments as $comment) {
22 | $dynamic_text .= ''.$comment['text'].''.date("Y年m月d日 H:i:s",$comment['created']).'
';
23 | }
24 | ?>
25 |
26 | widget('Widget_Metas_Tag_Cloud', 'sort=rand()&ignoreZeroCount=1&limit=30');
30 | if($Tag_Cloud->have()){
31 | while($Tag_Cloud->next()){
32 | $tags_text .= ''.$Tag_Cloud->name.' ';
33 | }
34 | }
35 | ?>
36 |
37 | options->adsText?$this->options->adsText:'广而告之'; ?>
38 |
39 |
42 |
50 |
51 | HTML;
52 |
53 | $column =<<
55 |
56 |
59 |
60 | HTML;
61 |
62 | $ads =<<
64 |
65 |
66 | {$this->options->ads}
67 |
68 |
69 | HTML;
70 |
71 | $dynamic =<<
73 |
74 |
75 | {$dynamic_text}
76 |
77 |
78 | HTML;
79 |
80 | $tags =<<
82 |
83 |
84 | {$tags_text}
85 |
86 |
87 | HTML;
88 |
89 | $link =<<
91 |
92 |
93 | {$this->options->links}
94 |
95 |
96 | HTML;
97 | ?>
98 |
129 |
--------------------------------------------------------------------------------
/usr/themes/index.php:
--------------------------------------------------------------------------------
1 | need('common/header.php');
5 | ?>
6 |
7 |
8 | need('common/searchs.php'); ?>
9 |
10 | options->bigCarouselSwitch) && $this->options->bigCarouselSwitch == 'true'): ?>
11 |
12 |
13 | options->bigCarouselText() ?>
14 |
15 |
16 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | options->smallCarouselSwitch) && $this->options->smallCarouselSwitch == 'true'): ?>
35 |
36 |
37 | options->smallCarouselText() ?>
38 |
39 |
40 |
52 |
53 |
54 | next()): ?>
55 |
56 | options->thumbType)): ?>
57 |
62 |
63 |
64 | title() ?>
65 |
66 | excerpt(300, '...'); ?>
67 |
68 |
69 |
70 | category(','); ?>
71 | date('Y-m-d A'); ?>
72 | ℃
73 | commentsNum('%d'); ?>条
74 |
75 |
76 |
77 |
78 | pageNav('«', '»', 1, '...', array('wrapTag' => 'div', 'wrapClass' => 'layui-laypage layui-laypage-molv', 'itemTag' => '', 'currentClass' => 'current', )); ?>
79 |
80 |
81 |
82 | need('common/sidebar.php'); ?>
83 |
84 |
85 |
86 |
87 | need('common/footer.php'); ?>
88 |
--------------------------------------------------------------------------------
/usr/themes/mylife.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | authorId) {
12 | if ($comments->authorId == $comments->ownerId) {
13 | $commentClass .= ' comment-by-author'; //如果是文章作者的评论添加 .comment-by-author 样式
14 | } else {
15 | $commentClass .= ' comment-by-user'; //如果是评论作者的添加 .comment-by-user 样式
16 | }
17 | }
18 | $commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级
19 | ?>
20 |
21 |
41 |
42 |
43 |
44 |
45 | need('common/header.php'); ?>
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | category(','); ?>
54 | title() ?>
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
options->mylifeName(); ?> options->mylifeJob(); ?>
63 |
64 |
65 |
66 |
67 | options->mylifeBtn(); ?>
68 |
69 |
70 |
71 |
72 |
73 |
我的动态
74 | commentsNum('%d'); ?> 条动态,次观望
75 |
76 |
77 | comments()->to($comments); ?>
78 | user->hasLogin()): ?>
79 |
80 |
88 |
89 |
90 |
91 |
94 |
95 | pageNav('«', '»', 1, '...', array('wrapTag' => 'div', 'wrapClass' => 'layui-laypage layui-laypage-molv', 'itemTag' => '', 'currentClass' => 'current', )); ?>
96 |
97 |
98 |
99 |
100 | need('common/sidebar.php'); ?>
101 |
102 |
103 |
104 |
105 |
111 |
138 | need('common/footer.php'); ?>
139 |
--------------------------------------------------------------------------------
/usr/themes/page.php:
--------------------------------------------------------------------------------
1 |
2 | need('common/header.php'); ?>
3 |
4 |
5 |
6 |
7 |
8 |
9 | category(','); ?>
10 | title() ?>
11 |
12 |
13 |
14 |
15 |
title() ?>
16 |
17 |
18 | content(); ?>
19 |
20 |
23 |
24 |
25 | need('common/sidebar.php'); ?>
26 |
27 |
28 |
29 |
30 | need('common/footer.php'); ?>
31 |
--------------------------------------------------------------------------------
/usr/themes/post.php:
--------------------------------------------------------------------------------
1 |
2 | need('common/header.php'); ?>
3 |
4 |
5 |
6 |
7 |
8 |
9 | category(','); ?>
10 | 正文
11 |
12 |
13 |
14 |
15 |
title() ?>
16 |
17 | author(); ?>
18 | date('Y-m-d A'); ?>
19 | ℃
20 | commentsNum('%d'); ?>条
21 |
22 |
23 |
24 | content(); ?>
25 |
26 |
27 | tags(', ', true, 'none'); ?>
28 |
29 |
35 |
36 |
37 | 上一篇
38 | thePrev('%s','没有了'); ?>
39 |
40 |
41 | 下一篇
42 | theNext('%s','没有了'); ?>
43 |
44 |
45 |
48 |
49 |
50 | need('common/sidebar.php'); ?>
51 |
52 |
53 |
54 |
55 | need('common/footer.php'); ?>
56 |
--------------------------------------------------------------------------------
/usr/themes/router.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | version, '1.2.0', '<')){
7 | $this->themeDir = $this->_themeDir;
8 | $this->themeFile = $this->_themeFile;
9 | $this->archiveType = $this->_archiveType;
10 | $this->archiveSlug = $this->_archiveSlug;
11 | $this->archiveSingle = $this->_archiveSingle;
12 | }
13 |
14 | $this->themeDir .= 'usr/themes/';
15 | $this->_themeDir .= 'usr/themes/';
16 |
17 | $validated = false;
18 |
19 | //~ 自定义模板
20 | if (!empty($this->themeFile) && 'index.php' != $this->themeFile) {
21 | if (file_exists($this->themeDir . $this->themeFile)) {
22 | $validated = true;
23 | }
24 | }
25 |
26 |
27 | if (!$validated && !empty($this->archiveType)) {
28 |
29 | // 自定义模板
30 | if ('page' == $this->archiveType && $this->template) {
31 | /** 应用自定义模板 */
32 | if (file_exists($this->themeDir . $this->template)) {
33 | $validated = true;
34 | $this->themeFile = $this->template;
35 | }
36 | }
37 |
38 | //~ 首先找具体路径, 比如 category/default.php
39 | if (!$validated && !empty($this->archiveSlug)) {
40 | $themeFile = $this->archiveType . '/' . $this->archiveSlug . '.php';
41 | if (file_exists($this->themeDir . $themeFile)) {
42 | $this->themeFile = $themeFile;
43 | $validated = true;
44 | }
45 | }
46 |
47 | //~ 然后找归档类型路径, 比如 category.php
48 | if (!$validated) {
49 | $themeFile = $this->archiveType . '.php';
50 | if (file_exists($this->themeDir . $themeFile)) {
51 | $this->themeFile = $themeFile;
52 | $validated = true;
53 | }
54 | }
55 |
56 |
57 |
58 | //针对attachment的hook
59 | if (!$validated && 'attachment' == $this->archiveType) {
60 | if (file_exists($this->themeDir . 'page.php')) {
61 | $this->themeFile = 'page.php';
62 | $validated = true;
63 | } elseif (file_exists($this->themeDir . 'post.php')) {
64 | $this->themeFile = 'post.php';
65 | $validated = true;
66 | }
67 | }
68 |
69 | //~ 最后找归档路径, 比如 archive.php 或者 single.php
70 | if (!$validated && 'index' != $this->archiveType && 'front' != $this->archiveType) {
71 | $themeFile = $this->archiveSingle ? 'single.php' : 'archive.php';
72 | if (file_exists($this->themeDir . $themeFile)) {
73 | $this->themeFile = $themeFile;
74 | $validated = true;
75 | }
76 | }
77 |
78 | if (!$validated) {
79 | $themeFile = 'index.php';
80 | if (file_exists($this->themeDir . $themeFile)) {
81 | $this->themeFile = $themeFile;
82 | $validated = true;
83 | }
84 | }
85 | }
86 |
87 | /** 文件不存在 */
88 | if (!$validated) {
89 | throw new Typecho_Plugin_Exception(_t('文件不存在'), 500);
90 | }
91 |
92 | /** 输出模板 */
93 | require_once $this->themeDir . $this->themeFile;
94 |
--------------------------------------------------------------------------------
/var/Echo/Action.php:
--------------------------------------------------------------------------------
1 | widget('Widget_User')->pass('administrator');
15 | $this->db = Typecho_Db::get();
16 | $this->prefix = $this->db->getPrefix();
17 | $this->options = Typecho_Widget::widget('Widget_Options');
18 | }
19 |
20 | public function setting()
21 | {
22 | $data = $this->request->from(
23 | 'logoUrl',
24 | 'title',
25 | 'nav',
26 | 'navFixed',
27 | 'headerColor',
28 | 'headerTextColor',
29 | 'footerColor',
30 | 'footerTextColor',
31 | 'backgroundColor',
32 | 'backgroundImg',
33 | 'sidebar'
34 | );
35 | $this->options($data);
36 | }
37 |
38 | public function config()
39 | {
40 | $data = $this->request->from(
41 | 'codeStyle',
42 | 'gravatar',
43 | 'bigCarouselSwitch',
44 | 'bigCarouselHeight',
45 | 'bigCarouselText',
46 | 'smallCarouselSwitch',
47 | 'smallCarouselHeight',
48 | 'smallCarouselText',
49 | 'thumbType',
50 | 'thumbs',
51 | 'adsText',
52 | 'ads',
53 | 'linksText',
54 | 'linksUrl',
55 | 'links',
56 | 'mylifeName',
57 | 'mylifeJob',
58 | 'mylifeAvatar',
59 | 'mylifeDesc',
60 | 'mylifeBtn',
61 | 'script'
62 | );
63 | $this->options($data);
64 | }
65 |
66 |
67 | public function options($data)
68 | {
69 | $settings = $this->options->__get('theme:echo');
70 | if ($settings) {
71 | $settings = unserialize($settings);
72 | foreach ($settings as $key => $value) {
73 | if(!in_array($key,array_keys($data))){
74 | $data[$key] = $value;
75 | }
76 | }
77 | $res = $this->db->query($this->db->update('table.options')->rows(array('value' => serialize($data)))->where('name = ?', 'theme:echo'));
78 | } else {
79 | $res = $this->db->query($this->db->insert('table.options')->rows(array(
80 | 'name' => 'theme:echo',
81 | 'value' => serialize($data),
82 | 'user' => 0
83 | )));
84 | }
85 | if ($res || $res===0) {
86 | $result = array('status' => 1, 'msg' => _t('设置成功'));
87 | } else {
88 | $result = array('status' => 0, 'msg' => _t('设置失败'));
89 | }
90 |
91 | $this->response->throwJson($result);
92 | }
93 |
94 | public function action()
95 | {
96 | $this->on($this->request->is('do=setting'))->setting();
97 | $this->on($this->request->is('do=config'))->config();
98 | $this->response->redirect($this->options->adminUrl);
99 | }
100 | }
101 | ?>
102 |
--------------------------------------------------------------------------------
/var/Echo/Edit.php:
--------------------------------------------------------------------------------
1 | request->change;
17 | $theme = trim($theme, './');
18 | if (is_dir($this->widget('Widget_Options')->themeFile($theme))) {
19 |
20 | $this->db->query($this->db->update('table.options')->rows(array('value' => $theme))->where('name = ?', 'theme'));
21 |
22 | /** 删除Echo主题相关钩子菜单动作 */
23 | Echo_Themes::stop();
24 |
25 | /** 解除首页关联 */
26 | if (0 === strpos($this->widget('Widget_Options')->frontPage, 'file:')) {
27 | $this->update(array('value' => 'recent'), $this->db->sql()->where('name = ?', 'frontPage'));
28 | }
29 |
30 | $configFile = $this->widget('Widget_Options')->themeFile($theme, 'functions.php');
31 |
32 | if (file_exists($configFile)) {
33 | require_once $configFile;
34 |
35 | if (function_exists('themeConfig')) {
36 | $form = new Typecho_Widget_Helper_Form();
37 | themeConfig($form);
38 | $options = $form->getValues();
39 |
40 | if ($options && !$this->configHandle($options, true)) {
41 | $this->db->query($this->db->insert('table.options')->rows(array(
42 | 'name' => 'theme:' . $theme,
43 | 'value' => serialize($options),
44 | 'user' => 0
45 | )));
46 | }
47 | }
48 | }
49 |
50 | $this->widget('Widget_Notice')->highlight('theme-' . $theme);
51 | $this->widget('Widget_Notice')->set(_t("心好疼,你切换到其他主题了!"), 'success');
52 | $this->response->goBack();
53 | } else {
54 | throw new Typecho_Widget_Exception(_t('您选择的风格不存在'));
55 | }
56 | }
57 |
58 | /**
59 | * 编辑外观文件
60 | *
61 | * @access public
62 | * @param string $theme 外观名称
63 | * @param string $file 文件名
64 | * @return void
65 | * @throws Typecho_Widget_Exception
66 | */
67 | public function editThemeFile($theme, $file)
68 | {
69 | $path = $this->options->themeFile($theme, $file);
70 |
71 | if (file_exists($path) && is_writeable($path) && !Typecho_Common::isAppEngine()
72 | && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__)) {
73 | $handle = fopen($path, 'wb');
74 | if ($handle && fwrite($handle, $this->request->content)) {
75 | fclose($handle);
76 | $this->widget('Widget_Notice')->set(_t("文件 %s 的更改已经保存", $file), 'success');
77 | } else {
78 | $this->widget('Widget_Notice')->set(_t("文件 %s 无法被写入", $file), 'error');
79 | }
80 | $this->response->goBack();
81 | } else {
82 | throw new Typecho_Widget_Exception(_t('您编辑的文件不存在'));
83 | }
84 | }
85 |
86 | /**
87 | * 配置外观
88 | *
89 | * @access public
90 | * @param string $theme 外观名
91 | * @return void
92 | */
93 | public function config($theme)
94 | {
95 | // 已经载入了外观函数
96 | $form = $this->widget('Widget_Themes_Config')->config();
97 |
98 | /** 验证表单 */
99 | if ($form->validate()) {
100 | $this->response->goBack();
101 | }
102 |
103 | $settings = $form->getAllRequest();
104 |
105 | if (!$this->configHandle($settings, false)) {
106 | if ($this->options->__get('theme:' . $theme)) {
107 | $this->update(array('value' => serialize($settings)),
108 | $this->db->sql()->where('name = ?', 'theme:' . $theme));
109 | } else {
110 | $this->insert(array(
111 | 'name' => 'theme:' . $theme,
112 | 'value' => serialize($settings),
113 | 'user' => 0
114 | ));
115 | }
116 | }
117 |
118 | /** 设置高亮 */
119 | $this->widget('Widget_Notice')->highlight('theme-' . $theme);
120 |
121 | /** 提示信息 */
122 | $this->widget('Widget_Notice')->set(_t("外观设置已经保存"), 'success');
123 |
124 | /** 转向原页 */
125 | $this->response->redirect(Typecho_Common::url('options-theme.php', $this->options->adminUrl));
126 | }
127 |
128 | /**
129 | * 用自有函数处理配置信息
130 | *
131 | * @access public
132 | * @param array $settings 配置值
133 | * @param boolean $isInit 是否为初始化
134 | * @return boolean
135 | */
136 | public function configHandle(array $settings, $isInit)
137 | {
138 | if (function_exists('themeConfigHandle')) {
139 | themeConfigHandle($settings, $isInit);
140 | return true;
141 | }
142 |
143 | return false;
144 | }
145 |
146 | /**
147 | * 绑定动作
148 | *
149 | * @access public
150 | * @return void
151 | */
152 | public function action()
153 | {
154 | /** 需要管理员权限 */
155 | $this->user->pass('administrator');
156 | $this->security->protect();
157 | $this->on($this->request->is('change'))->changeTheme($this->request->filter('slug')->change);
158 | $this->on($this->request->is('edit&theme'))
159 | ->editThemeFile($this->request->filter('slug')->theme, $this->request->edit);
160 | $this->on($this->request->is('config'))->config($this->options->theme);
161 | $this->response->redirect($this->options->adminUrl);
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/var/Echo/Hook.php:
--------------------------------------------------------------------------------
1 | version);
9 | $themeFile = $options->themeUrl('public',__TYPECHO_DIR_NAME__);
10 | $header = PHP_EOL.
11 | ' '.PHP_EOL.
12 | ' '.PHP_EOL.
13 | ' '.PHP_EOL.
14 | ''.PHP_EOL;
15 | return $header;
16 | }
17 |
18 | public static function footer() {
19 | $themeFile = Helper::options()->themeUrl('public',__TYPECHO_DIR_NAME__);
20 | echo PHP_EOL.'';
21 | }
22 |
23 | public static function common() {
24 | $options = Helper::options();
25 | if($options->gravatar){
26 | define('__TYPECHO_GRAVATAR_PREFIX__',$options->gravatar);
27 | }
28 |
29 | if($_SERVER['PHP_SELF'] == '/admin/extending.php'){
30 | $panel = $options->request->get('panel');
31 | $panelTable = unserialize($options->panelTable);
32 | if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) {
33 | throw new Typecho_Plugin_Exception(_t('页面不存在'));
34 | }
35 |
36 | $panelFile = $options->themeFile('echo','usr/panel') . '/' . $panel;
37 | if (file_exists($panelFile)) {
38 | require_once $panelFile;
39 | error_reporting(0);
40 | }
41 | }
42 |
43 | }
44 |
45 | // 获取当前所有自定义模板
46 | public static function getTemplates()
47 | {
48 | $options = Helper::options();
49 | $files = glob($options->themeFile($options->theme, 'usr/themes/*.php'));
50 | $result = [];
51 |
52 | foreach ($files as $file) {
53 | $info = Typecho_Plugin::parseInfo($file);
54 | $file = basename($file);
55 |
56 | if ('index.php' != $file && 'custom' == $info['title']) {
57 | $result[$file] = $info['description'];
58 | }
59 | }
60 |
61 | return $result;
62 | }
63 |
64 | // 自定义模板
65 | public static function write_page_option($page)
66 | {
67 | $option = '不选择 ';
68 | $templates = self::getTemplates();
69 | foreach ($templates as $template => $name) {
70 | $option .= 'template == $template ? 'selected' : '') . '>' . $name . ' ';
71 | }
72 |
73 | echo '';
76 | }
77 |
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/var/Echo/Themes.php:
--------------------------------------------------------------------------------
1 | __get('plugins');
13 | $plugins['activated'] = array_key_exists('activated', $plugins) ? $plugins['activated'] : array();
14 | $plugins['handles'] = array_key_exists('handles', $plugins) ? $plugins['handles'] : array();
15 | self::$_plugins = $plugins;
16 | }
17 |
18 | //启用主题
19 | public static function start() {
20 | //钩子
21 | self::factory('admin/header.php:header','Echo_Hook','header');
22 | self::factory('admin/footer.php:end','Echo_Hook','footer');
23 | self::factory('admin/common.php:begin','Echo_Hook', 'common');
24 | self::factory('admin/write-page.php:option','Echo_Hook','write_page_option');
25 | //添加扩展类
26 | Helper::addAction('echo', 'Echo_Action');
27 | //接管主题启用路由
28 | Helper::addRoute('echo_themes_action', '/action/themes-edit', 'Echo_Edit', 'action', 'index');
29 | //创建菜单
30 | $MenuIndex = Helper::addMenu('Echo');
31 | Helper::addPanel($MenuIndex, 'setting.php', '外观设置', '外观设置', 'administrator');
32 | Helper::addPanel($MenuIndex, 'config.php', '其他配置', '其他配置', 'administrator');
33 | }
34 |
35 | //关闭主题
36 | public static function stop() {
37 | //移除钩子
38 | self::del_factory('admin/header.php:header','Echo_Hook','header');
39 | self::del_factory('admin/footer.php:end','Echo_Hook','footer');
40 | self::del_factory('admin/common.php:begin','Echo_Hook', 'common');
41 | self::del_factory('admin/write-page.php:option','Echo_Hook','write_page_option');
42 | //移除扩展类
43 | Helper::removeAction('echo');
44 | //移除主题启用路由
45 | Helper::removeRoute('echo_themes_action');
46 | //移除菜单
47 | $MenuIndex = Helper::removeMenu('Echo');
48 | Helper::removePanel($MenuIndex, 'setting.php');
49 | Helper::removePanel($MenuIndex, 'config.php');
50 | }
51 |
52 | //创建钩子
53 | private static function factory($handle,$class,$func){
54 | self::$_plugins || new self();
55 | $weight = 0;
56 | $db = Typecho_Db::get();
57 | $plugins = self::$_plugins;
58 | if (!isset($plugins['handles'][$handle])) {
59 | $plugins['handles'][$handle] = array();
60 | }
61 | foreach ($plugins['handles'][$handle] as $key => $val) {
62 | $key = floatval($key);
63 |
64 | if ($weight > $key) {
65 | break;
66 | } else if ($weight == $key) {
67 | $weight += 0.001;
68 | }
69 | }
70 | $plugins['handles'][$handle][strval($weight)] = array($class, $func);
71 | ksort($plugins['handles'][$handle], SORT_NUMERIC);
72 | $db->query($db->update('table.options')->rows(array('value' => serialize($plugins)))->where('name = ?', 'plugins'));
73 | self::$_plugins = $plugins;
74 | }
75 |
76 | //删除钩子
77 | private static function del_factory($handle,$class,$func){
78 | self::$_plugins || new self();
79 | $db = Typecho_Db::get();
80 | $plugins = self::$_plugins;
81 | foreach ($plugins['handles'] as $k => &$v) {
82 |
83 | if ($handle==$k) {
84 | foreach ($v as $index => $handles) {
85 | if($handles == array($class, $func)){
86 | unset($plugins['handles'][$k][$index]);
87 | }
88 | }
89 |
90 | if (empty($plugins['handles'][$handle])) {
91 | unset($plugins['handles'][$handle]);
92 | }
93 | }
94 | }
95 | $db->query($db->update('table.options')->rows(array('value' => serialize($plugins)))->where('name = ?', 'plugins'));
96 | self::$_plugins = $plugins;
97 | }
98 |
99 | //添加面板
100 | private static function addPanel($index, $fileName, $title, $subTitle, $level, $hidden = false, $addLink = '')
101 | {
102 | $options = Helper::options();
103 | $panelTable = unserialize($options->panelTable);
104 | $panelTable['child'] = empty($panelTable['child']) ? array() : $panelTable['child'];
105 | $panelTable['child'][$index] = empty($panelTable['child'][$index]) ? array() : $panelTable['child'][$index];
106 | $fileName = urlencode(trim($fileName, '/'));
107 | $panelTable['child'][$index][] = array($title, $subTitle, 'echo.php?panel=' . $fileName, $level, $hidden, $addLink);
108 |
109 | $panelTable['file'] = empty($panelTable['file']) ? array() : $panelTable['file'];
110 | $panelTable['file'][] = $fileName;
111 | $panelTable['file'] = array_unique($panelTable['file']);
112 |
113 | $db = Typecho_Db::get();
114 | Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => ($options->panelTable = serialize($panelTable)))
115 | , $db->sql()->where('name = ?', 'panelTable'));
116 |
117 | end($panelTable['child'][$index]);
118 | return key($panelTable['child'][$index]);
119 | }
120 |
121 | //移除面板
122 | public static function removePanel($index, $fileName)
123 | {
124 | $options = Helper::options();
125 | $panelTable = unserialize($options->panelTable);
126 | $panelTable['child'] = empty($panelTable['child']) ? array() : $panelTable['child'];
127 | $panelTable['child'][$index] = empty($panelTable['child'][$index]) ? array() : $panelTable['child'][$index];
128 | $panelTable['file'] = empty($panelTable['file']) ? array() : $panelTable['file'];
129 | $fileName = urlencode(trim($fileName, '/'));
130 |
131 | if (false !== ($key = array_search($fileName, $panelTable['file']))) {
132 | unset($panelTable['file'][$key]);
133 | }
134 |
135 | $return = 0;
136 | foreach ($panelTable['child'][$index] as $key => $val) {
137 | if ($val[2] == 'echo.php?panel=' . $fileName) {
138 | unset($panelTable['child'][$index][$key]);
139 | $return = $key;
140 | }
141 | }
142 |
143 | $db = Typecho_Db::get();
144 | Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => ($options->panelTable = serialize($panelTable)))
145 | , $db->sql()->where('name = ?', 'panelTable'));
146 | return $return;
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/var/init.php:
--------------------------------------------------------------------------------
1 |
63 |64 | 96 |
99 |
commentsNum(_t('暂无评论'), _t('唉呀 ~ 仅有一条评论'), _t('已有 %d 条评论')); ?>
100 |101 |