├── screenshot.png
├── assets
├── img
│ ├── head.jpg
│ ├── favicon.png
│ ├── avatar
│ │ ├── 0.png
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ ├── 4.png
│ │ ├── 5.png
│ │ ├── 6.png
│ │ ├── 7.png
│ │ ├── 8.png
│ │ └── 9.png
│ ├── praise
│ │ ├── radio_normal.jpg
│ │ ├── radio_select.jpg
│ │ ├── wechat_pay.svg
│ │ └── ali_pay.svg
│ └── 404.svg
├── fonts
│ ├── sapphire-fonts.eot
│ ├── sapphire-fonts.ttf
│ └── sapphire-fonts.woff
├── css
│ ├── theme.css
│ ├── tag.css
│ ├── pace-minimal.css
│ ├── aside.css
│ ├── footer.css
│ ├── category.css
│ ├── 404.css
│ ├── article-nav.css
│ ├── automenu.css
│ ├── article-main.css
│ ├── prettify.css
│ ├── archive.css
│ ├── tag-item.css
│ ├── grid.css
│ ├── article-praise.css
│ ├── fonts.css
│ ├── sidebar.css
│ ├── social.css
│ ├── comments.css
│ ├── article-inner.css
│ ├── header.css
│ └── normalize.css
└── js
│ ├── clicklove.js
│ ├── theme.js
│ ├── automenu.js
│ ├── pace.min.js
│ └── prettify.js
├── .gitignore
├── style.css
├── inc
├── custom-configs
│ ├── theme-colorcloud.php
│ ├── theme-findpage.php
│ ├── theme-headmenu.php
│ ├── theme-comment.php
│ ├── theme-functions.php
│ ├── theme-post.php
│ ├── wp-optimize.php
│ ├── theme-setup.php
│ ├── theme-options.php
│ └── theme-about.php
└── custom-pages
│ ├── tag.php
│ ├── category.php
│ └── archive.php
├── functions.php
├── LICENSE
├── footer.php
├── 404.php
├── README.md
├── comments.php
├── index.php
├── header.php
├── sidebar.php
└── single.php
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/screenshot.png
--------------------------------------------------------------------------------
/assets/img/head.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/head.jpg
--------------------------------------------------------------------------------
/assets/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/favicon.png
--------------------------------------------------------------------------------
/assets/img/avatar/0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/0.png
--------------------------------------------------------------------------------
/assets/img/avatar/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/1.png
--------------------------------------------------------------------------------
/assets/img/avatar/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/2.png
--------------------------------------------------------------------------------
/assets/img/avatar/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/3.png
--------------------------------------------------------------------------------
/assets/img/avatar/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/4.png
--------------------------------------------------------------------------------
/assets/img/avatar/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/5.png
--------------------------------------------------------------------------------
/assets/img/avatar/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/6.png
--------------------------------------------------------------------------------
/assets/img/avatar/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/7.png
--------------------------------------------------------------------------------
/assets/img/avatar/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/8.png
--------------------------------------------------------------------------------
/assets/img/avatar/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/avatar/9.png
--------------------------------------------------------------------------------
/assets/fonts/sapphire-fonts.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/fonts/sapphire-fonts.eot
--------------------------------------------------------------------------------
/assets/fonts/sapphire-fonts.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/fonts/sapphire-fonts.ttf
--------------------------------------------------------------------------------
/assets/fonts/sapphire-fonts.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/fonts/sapphire-fonts.woff
--------------------------------------------------------------------------------
/assets/img/praise/radio_normal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/praise/radio_normal.jpg
--------------------------------------------------------------------------------
/assets/img/praise/radio_select.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itcharge/WordPress-Theme-Sapphire/HEAD/assets/img/praise/radio_select.jpg
--------------------------------------------------------------------------------
/assets/css/theme.css:
--------------------------------------------------------------------------------
1 | @import 'normalize.css';
2 | @import 'grid.css';
3 | @import 'header.css';
4 | @import 'footer.css';
5 | @import 'comments.css';
6 | @import 'sidebar.css';
7 | @import 'article-inner.css';
8 | @import 'article-main.css';
9 | @import 'article-nav.css';
10 | @import 'article-praise.css';
11 | @import 'tag-item.css';
12 | @import 'aside.css';
13 | @import 'archive.css';
14 | @import 'category.css';
15 | @import 'tag.css';
16 | @import 'social.css';
17 | @import '404.css';
--------------------------------------------------------------------------------
/assets/css/tag.css:
--------------------------------------------------------------------------------
1 | .tag-wrap {
2 | margin: 0px;
3 | padding: 0px;
4 | margin-bottom: 20px;
5 | position: relative;
6 | background: #fff;
7 | border: 1px solid #CFCFCF;
8 | box-shadow: 0 0 5px #C6C6C6;
9 | }
10 |
11 | .tag-wrap .tag-entry {
12 | margin: 20px 30px;
13 | padding: 0px;
14 | line-height: 2;
15 | }
16 |
17 | .tag-wrap .tag-entry a {
18 | margin: 20px 4px;
19 | text-decoration: none;
20 | }
21 |
22 | .tag-wrap .tag-entry a:hover {
23 | color: #ff7242!important;
24 | text-decoration: underline;
25 | }
--------------------------------------------------------------------------------
/assets/css/pace-minimal.css:
--------------------------------------------------------------------------------
1 | /* This is a compiled file, you should be editing the file in the templates directory */
2 | .pace {
3 | -webkit-pointer-events: none;
4 | pointer-events: none;
5 |
6 | -webkit-user-select: none;
7 | -moz-user-select: none;
8 | user-select: none;
9 | }
10 |
11 | .pace-inactive {
12 | display: none;
13 | }
14 |
15 | .pace .pace-progress {
16 | background: #2299dd;
17 | position: fixed;
18 | z-index: 2000;
19 | top: 0;
20 | right: 100%;
21 | width: 100%;
22 | height: 2px;
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore everything in the root except the "wp-content" directory.
2 | !wp-content/
3 |
4 | # ignore everything in the "wp-content" directory, except:
5 | # "mu-plugins", "plugins", "themes" directory
6 | wp-content/*
7 | !wp-content/mu-plugins/
8 | !wp-content/plugins/
9 | !wp-content/themes/
10 |
11 | # ignore these plugins
12 | wp-content/plugins/hello.php
13 |
14 | # ignore specific themes
15 | wp-content/themes/twenty*/
16 |
17 | # ignore node dependency directories
18 | node_modules/
19 |
20 | # ignore log files and databases
21 | *.log
22 | *.sql
23 | *.sqlite
24 |
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | Theme Name: Sapphire
3 | Theme URI: https://itcharge.cn/WordPress-Sapphire.html
4 | Description: 程序员充电站
5 | Tags: blog, two-column, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-patterns, block-styles, wide-blocks, accessibility-ready
6 | Author: ITCharge
7 | Author URI: https://itcharge.cn/
8 | License: GNU General Public License version 3.0
9 | License URI: http://www.gnu.org/licenses/gpl-3.0.html
10 | Text Domain: Sapphire
11 | */
12 |
--------------------------------------------------------------------------------
/assets/css/aside.css:
--------------------------------------------------------------------------------
1 | .wrap-side-operation {
2 | position: absolute;
3 | width: 60px;
4 | height: 60px;
5 | right: 30px;
6 | bottom: 100px;
7 | }
8 |
9 | #back-top {
10 | position: fixed;
11 | width: 45px;
12 | height: 45px;
13 | bottom: 100px;
14 | right: 30px;
15 | background: #fff;
16 | text-align: center;
17 | border-radius: 100%;
18 | border: .06em solid #e6ebf5;
19 | line-height: 45px;
20 | text-decoration: none;
21 | box-shadow: 0 0 1.5em 0 rgb(0 0 0 / 12%);
22 | }
23 |
24 | #back-top .icon-plane {
25 | color: #9c9c9c;
26 | font-size: 20px;
27 | margin: 12.5px;
28 | text-align: center;
29 | display: block;
30 | }
--------------------------------------------------------------------------------
/assets/css/footer.css:
--------------------------------------------------------------------------------
1 | .site-footer .footer-info {
2 | font-size: 12px;
3 | font-family: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace;
4 | max-width: 960px;
5 | position: relative;
6 | text-align: center;
7 | margin-left: auto;
8 | margin-right: auto;
9 | color: #A1A1A1;
10 | line-height: 24px;
11 | padding-top: 16px;
12 | padding-bottom: 14px;
13 | }
14 |
15 | .site-footer .footer-info a {
16 | color: #A1A1A1;
17 | }
18 | .site-footer .outer {
19 | padding: 0 30px;
20 | }
21 |
22 | .site-footer .footer-site-uv-pv {
23 | margin: 0px;
24 | }
25 |
26 | .site-footer .footer-copyright {
27 | margin: 0px;
28 | }
--------------------------------------------------------------------------------
/inc/custom-configs/theme-colorcloud.php:
--------------------------------------------------------------------------------
1 | |i', 'colorCloudCallback', $text);
4 | return $text;
5 | }
6 | function rand_color() {
7 | $red = sprintf('%02X', mt_rand(0x2E, 0x34));
8 | $green = sprintf('%02X', mt_rand(0x30, 0x49));
9 | $blue = sprintf('%02X', mt_rand(0x32, 0x5e));
10 |
11 | return '#'.$red.$green.$blue;
12 | }
13 | function colorCloudCallback($matches) {
14 | $text = $matches[1];
15 | $color = rand_color();
16 | $pattern = '/style=(\'|\")(.*)(\'|\")/i';
17 | $text = preg_replace($pattern, "style=\"color:$color; $2;\"", $text);
18 | return "";
19 | }
20 | add_filter('wp_tag_cloud', 'colorCloud', 1);
21 | ?>
--------------------------------------------------------------------------------
/inc/custom-pages/tag.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
30 |
31 |
--------------------------------------------------------------------------------
/functions.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/inc/custom-configs/theme-findpage.php:
--------------------------------------------------------------------------------
1 |
9 | is_page = true;
16 | $wp_query->is_single = false;
17 | $wp_query->is_home = false;
18 | $wp_query->comments = false;
19 | // if we have a 404 status
20 | if ($wp_query->is_404) {
21 | // set status of 404 to false
22 | unset($wp_query->query["error"]);
23 | $wp_query->query_vars["error"] = "";
24 | $wp_query->is_404 = false;
25 | }
26 | // change the header to 200 OK
27 | header("HTTP/1.1 200 OK");
28 | //load our template
29 | include($template);
30 | exit;
31 | }
32 | /**
33 | * 自定义查找链接
34 | */
35 | function template_redirect() {
36 | $basename = basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);
37 | load_custom_template(TEMPLATEPATH.'/inc/custom-pages/'."/$basename.php");
38 | }
39 | add_action('template_redirect', 'template_redirect');
40 | ?>
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 ITCharge
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/inc/custom-pages/category.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
23 | 'count',
26 | 'order' => 'DESC',
27 | 'style' => 'list',
28 | 'title_li' => '',
29 | 'depth' => 2,
30 | 'show_count'=> 1,
31 | 'hide_empty'=> 1
32 | );
33 | wp_list_categories($args);
34 | ?>
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/assets/css/category.css:
--------------------------------------------------------------------------------
1 | .category-wrap {
2 | margin: 0px;
3 | padding: 0px;
4 | margin-bottom: 20px;
5 | position: relative;
6 | background: #fff;
7 | border: 1px solid #CFCFCF;
8 | box-shadow: 0 0 5px #C6C6C6;
9 | }
10 |
11 | .category-wrap .category-list {
12 | margin-top: 20px;
13 | margin-bottom: 20px;
14 | padding: 0px;
15 | }
16 |
17 | .category-wrap .category-list li {
18 | margin-left: 30px;
19 | margin-right: 30px;
20 | padding: 15px 0px 5px 0px;
21 | }
22 |
23 | .category-wrap .category-list li a {
24 | color: #333;
25 | text-decoration: none;
26 | }
27 |
28 | .category-wrap .category-list li a:before {
29 | content: "";
30 | width: 7px;
31 | height: 7px;
32 | background-color: #333;
33 | border-radius: 50%;
34 | display: inline-block;
35 | margin: 10px 10px 0px 1px;
36 | float: left;
37 | }
38 |
39 | .category-wrap .category-list li:hover {
40 | background-color: #ebedef;
41 | color: #ff7242;
42 | }
43 |
44 | .category-wrap .category-list li:hover a {
45 | color: #ff7242;
46 | text-decoration: underline;
47 | }
48 |
49 | .category-wrap .category-list li:hover a:before {
50 | background-color: #ff7242;
51 | }
52 |
53 |
54 |
--------------------------------------------------------------------------------
/assets/css/404.css:
--------------------------------------------------------------------------------
1 | .site-404-box {
2 | display: flex;
3 | justify-content: center;
4 | margin-top: 180px;
5 | text-align: center;
6 | }
7 |
8 | .site-404-text {
9 | align-items: flex-start;
10 | display: flex;
11 | flex-direction: column;
12 | justify-content: center;
13 | min-width: 384px;
14 | }
15 |
16 | .site-404-title {
17 | font-size: 40px;
18 | font-weight: 600;
19 | color: #666666;
20 | line-height: 1.4;
21 | margin: 0;
22 | }
23 |
24 | .site-404-subtitle {
25 | font-size: 18px;
26 | color: #666666;
27 | line-height: 1.4;
28 | margin: 10px 0 0;
29 | }
30 |
31 | .site-404-gohome {
32 | margin-top: 20px;
33 | display: inline-block;
34 | text-align: center;
35 | color: #fff;
36 | font-size: 14px;
37 | line-height: 32px;
38 |
39 | text-decoration: none;
40 | background: none;
41 | background-color: #4D4D4D;
42 | border-radius: 3px;
43 | border-color: #4D4D4D;
44 | padding: 0 16px;
45 | }
46 |
47 | .site-404-goup {
48 | margin-top: 20px;
49 | display: flex;
50 | background: none;
51 | align-items: center;
52 | color: #0084ff;
53 | font-size: 14px;
54 | font-weight: 600;
55 | text-decoration: none;
56 | }
57 |
58 | .site-404-image-container {
59 | align-items: center;
60 | display: flex;
61 | height: 300px;
62 | width: 300px;
63 | justify-content: center;
64 | margin-top: 20px;
65 | margin-left: 20px;
66 | }
67 |
68 | .site-404-image {
69 | width: 250px;
70 | height: 250px;
71 | }
--------------------------------------------------------------------------------
/assets/js/clicklove.js:
--------------------------------------------------------------------------------
1 | !function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e
15 |
16 |
48 |