From b23dcc24d78e6e5b62136fa1ab9a09e8c1f99992 Mon Sep 17 00:00:00 2001 From: Mashiro Date: Fri, 25 Jan 2019 11:27:53 +0800 Subject: [PATCH] Add entry content theme --- README.md | 6 +- cdn/theme/github.css | 916 +++++++++++++++++++++++++++++++++++++++++++ cdn/theme/sakura.css | 124 ++++++ inc/decorate.php | 4 +- inc/swicher.php | 6 + js/sakura-app.js | 5 + options.php | 10 + style.css | 125 +----- 8 files changed, 1071 insertions(+), 125 deletions(-) create mode 100644 cdn/theme/github.css create mode 100644 cdn/theme/sakura.css diff --git a/README.md b/README.md index b7d1980..f2b550c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Sakura🌸: A Wonderful WordPress Theme +Sakura🌸: A Wonderful WordPress Theme === ![Sakura](https://view.moezx.cc/images/2018/05/26/sakura.png) @@ -12,10 +12,12 @@ Sakura🌸: A Wonderful WordPress Theme 两位前辈做得已经很棒了,或许我所做的只是把他们的代码弄得凌乱不堪吧 :) -注意:建议 `git clone` 下载;如果选择下载压缩包,解压后记得把文件夹名改回 `Sakura`,也即保证主题路径为 `/wp-content/themes/Sakura/`;请留意主题说明里的其他注意事项。 +注意:建议 `git clone` 下载;如果选择下载压缩包,解压后记得把文件夹名改回 `Sakura`,也即保证主题路径为 `/wp-content/themes/Sakura/`;请安装必装插件 [WP Statistics](https://wordpress.org/plugins/wp-statistics/);请留意主题说明里的其他注意事项。 主题使用说明见: +本仓库国内镜像: + 希望你喜欢! ### 打赏支持~ diff --git a/cdn/theme/github.css b/cdn/theme/github.css new file mode 100644 index 0000000..f49a0d5 --- /dev/null +++ b/cdn/theme/github.css @@ -0,0 +1,916 @@ +.entry-content blockquote:before,.entry-content blockquote:after { + display: none +} + +.entry-content { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + line-height: 1.5; + color: #24292e; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; +} + +.entry-content .pl-c { + color: #6a737d; +} + +.entry-content .pl-c1, +.entry-content .pl-s .pl-v { + color: #005cc5; +} + +.entry-content .pl-e, +.entry-content .pl-en { + color: #6f42c1; +} + +.entry-content .pl-smi, +.entry-content .pl-s .pl-s1 { + color: #24292e; +} + +.entry-content .pl-ent { + color: #22863a; +} + +.entry-content .pl-k { + color: #d73a49; +} + +.entry-content .pl-s, +.entry-content .pl-pds, +.entry-content .pl-s .pl-pse .pl-s1, +.entry-content .pl-sr, +.entry-content .pl-sr .pl-cce, +.entry-content .pl-sr .pl-sre, +.entry-content .pl-sr .pl-sra { + color: #032f62; +} + +.entry-content .pl-v, +.entry-content .pl-smw { + color: #e36209; +} + +.entry-content .pl-bu { + color: #b31d28; +} + +.entry-content .pl-ii { + color: #fafbfc; + background-color: #b31d28; +} + +.entry-content .pl-c2 { + color: #fafbfc; + background-color: #d73a49; +} + +.entry-content .pl-c2::before { + content: "^M"; +} + +.entry-content .pl-sr .pl-cce { + font-weight: bold; + color: #22863a; +} + +.entry-content .pl-ml { + color: #735c0f; +} + +.entry-content .pl-mh, +.entry-content .pl-mh .pl-en, +.entry-content .pl-ms { + font-weight: bold; + color: #005cc5; +} + +.entry-content .pl-mi { + font-style: italic; + color: #24292e; +} + +.entry-content .pl-mb { + font-weight: bold; + color: #24292e; +} + +.entry-content .pl-md { + color: #b31d28; + background-color: #ffeef0; +} + +.entry-content .pl-mi1 { + color: #22863a; + background-color: #f0fff4; +} + +.entry-content .pl-mc { + color: #e36209; + background-color: #ffebda; +} + +.entry-content .pl-mi2 { + color: #f6f8fa; + background-color: #005cc5; +} + +.entry-content .pl-mdr { + font-weight: bold; + color: #6f42c1; +} + +.entry-content .pl-ba { + color: #586069; +} + +.entry-content .pl-sg { + color: #959da5; +} + +.entry-content .pl-corl { + text-decoration: underline; + color: #032f62; +} + +.entry-content .octicon { + display: inline-block; + vertical-align: text-top; + fill: currentColor; +} + +.entry-content a { + background-color: transparent; +} + +.entry-content a:active, +.entry-content a:hover { + outline-width: 0; +} + +.entry-content strong { + font-weight: inherit; +} + +.entry-content strong { + font-weight: bolder; +} + +.entry-content h1 { + font-size: 2em; + margin: 0.67em 0; +} + +.entry-content img { + border-style: none; +} + +.entry-content code, +.entry-content kbd { + font-family: monospace, monospace; + font-size: 1em; +} + +.entry-content hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} + +.entry-content input { + font: inherit; + margin: 0; +} + +.entry-content input { + overflow: visible; +} + +.entry-content [type="checkbox"] { + box-sizing: border-box; + padding: 0; +} + +.entry-content * { + box-sizing: border-box; +} + +.entry-content input { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.entry-content a { + color: #0366d6; + text-decoration: none; +} + +.entry-content a:hover { + text-decoration: underline; +} + +.entry-content strong { + font-weight: 600; +} + +.entry-content hr { + height: 0; + margin: 15px 0; + overflow: hidden; + background: transparent; + border: 0; + border-bottom: 1px solid #dfe2e5; +} + +.entry-content hr::before { + display: table; + content: ""; +} + +.entry-content hr::after { + display: table; + clear: both; + content: ""; +} + +.entry-content table { + border-spacing: 0; + border-collapse: collapse; +} + +.entry-content td, +.entry-content th { + padding: 0; +} + +.entry-content h1, +.entry-content h2, +.entry-content h3, +.entry-content h4, +.entry-content h5, +.entry-content h6 { + margin-top: 0; + margin-bottom: 0; +} + +.entry-content h1 { + font-size: 32px; + font-weight: 600; +} + +.entry-content h2 { + font-size: 24px; + font-weight: 600; +} + +.entry-content h3 { + font-size: 20px; + font-weight: 600; +} + +.entry-content h4 { + font-size: 16px; + font-weight: 600; +} + +.entry-content h5 { + font-size: 14px; + font-weight: 600; +} + +.entry-content h6 { + font-size: 12px; + font-weight: 600; +} + +.entry-content p { + margin-top: 0; + margin-bottom: 10px; +} + +.entry-content blockquote { + margin: 0; +} + +.entry-content ul, +.entry-content ol { + padding-left: 0; + margin-top: 0; + margin-bottom: 0; +} + +.entry-content ol ol, +.entry-content ul ol { + list-style-type: lower-roman; +} + +.entry-content ul ul ol, +.entry-content ul ol ol, +.entry-content ol ul ol, +.entry-content ol ol ol { + list-style-type: lower-alpha; +} + +.entry-content dd { + margin-left: 0; +} + +.entry-content code { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; +} + +.entry-content .octicon { + vertical-align: text-bottom; +} + +.entry-content .pl-0 { + padding-left: 0 !important; +} + +.entry-content .pl-1 { + padding-left: 4px !important; +} + +.entry-content .pl-2 { + padding-left: 8px !important; +} + +.entry-content .pl-3 { + padding-left: 16px !important; +} + +.entry-content .pl-4 { + padding-left: 24px !important; +} + +.entry-content .pl-5 { + padding-left: 32px !important; +} + +.entry-content .pl-6 { + padding-left: 40px !important; +} + +.entry-content::before { + display: table; + content: ""; +} + +.entry-content::after { + display: table; + clear: both; + content: ""; +} + +.entry-content>*:first-child { + margin-top: 0 !important; +} + +.entry-content>*:last-child { + margin-bottom: 0 !important; +} + +.entry-content a:not([href]) { + color: inherit; + text-decoration: none; +} + +.entry-content .anchor { + float: left; + padding-right: 4px; + margin-left: -20px; + line-height: 1; +} + +.entry-content .anchor:focus { + outline: none; +} + +.entry-content p, +.entry-content blockquote, +.entry-content ul, +.entry-content ol, +.entry-content dl, +.entry-content table { + margin-top: 0; + margin-bottom: 16px; +} + +.entry-content hr { + height: 0.25em; + padding: 0; + margin: 24px 0; + background-color: #e1e4e8; + border: 0; +} + +.entry-content blockquote { + padding: 0 1em; + color: #6a737d; + border-left: 0.25em solid #dfe2e5; +} + +.entry-content blockquote>:first-child { + margin-top: 0; +} + +.entry-content blockquote>:last-child { + margin-bottom: 0; +} + +.entry-content kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #444d56; + vertical-align: middle; + background-color: #fafbfc; + border: solid 1px #c6cbd1; + border-bottom-color: #959da5; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #959da5; +} + +.entry-content h1, +.entry-content h2, +.entry-content h3, +.entry-content h4, +.entry-content h5, +.entry-content h6 { + margin-top: 24px; + margin-bottom: 16px; + font-weight: 600; + line-height: 1.25; +} + +.entry-content h1 .octicon-link, +.entry-content h2 .octicon-link, +.entry-content h3 .octicon-link, +.entry-content h4 .octicon-link, +.entry-content h5 .octicon-link, +.entry-content h6 .octicon-link { + color: #1b1f23; + vertical-align: middle; + visibility: hidden; +} + +.entry-content h1:hover .anchor, +.entry-content h2:hover .anchor, +.entry-content h3:hover .anchor, +.entry-content h4:hover .anchor, +.entry-content h5:hover .anchor, +.entry-content h6:hover .anchor { + text-decoration: none; +} + +.entry-content h1:hover .anchor .octicon-link, +.entry-content h2:hover .anchor .octicon-link, +.entry-content h3:hover .anchor .octicon-link, +.entry-content h4:hover .anchor .octicon-link, +.entry-content h5:hover .anchor .octicon-link, +.entry-content h6:hover .anchor .octicon-link { + visibility: visible; +} + +.entry-content h1 { + padding-bottom: 0.3em; + font-size: 2em; + border-bottom: 1px solid #eaecef; +} + +.entry-content h2 { + padding-bottom: 0.3em; + font-size: 1.5em; + border-bottom: 1px solid #eaecef; +} + +.entry-content h3 { + font-size: 1.25em; +} + +.entry-content h4 { + font-size: 1em; +} + +.entry-content h5 { + font-size: 0.875em; +} + +.entry-content h6 { + font-size: 0.85em; + color: #6a737d; +} + +.entry-content ul, +.entry-content ol { + padding-left: 2em; +} + +.entry-content ul ul, +.entry-content ul ol, +.entry-content ol ol, +.entry-content ol ul { + margin-top: 0; + margin-bottom: 0; +} + +.entry-content li { + word-wrap: break-all; +} + +.entry-content li>p { + margin-top: 16px; +} + +.entry-content li+li { + margin-top: 0.25em; +} + +.entry-content dl { + padding: 0; +} + +.entry-content dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: 600; +} + +.entry-content dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +.entry-content table { + display: block; + width: 100%; + overflow: auto; +} + +.entry-content table th { + font-weight: 600; +} + +.entry-content table th, +.entry-content table td { + padding: 6px 13px; + border: 1px solid #dfe2e5; +} + +.entry-content table tr { + background-color: #fff; + border-top: 1px solid #c6cbd1; +} + +.entry-content table tr:nth-child(2n) { + background-color: #f6f8fa; +} + +.entry-content img { + max-width: 100%; + box-sizing: content-box; + background-color: #fff; +} + +.entry-content img[align=right] { + padding-left: 20px; +} + +.entry-content img[align=left] { + padding-right: 20px; +} + +.entry-content code { + padding: 0.2em 0.4em; + margin: 0; + font-size: 85%; + background-color: rgba(27,31,35,0.05); + border-radius: 3px; +} + +.entry-content .full-commit .btn-outline:not(:disabled):hover { + color: #005cc5; + border-color: #005cc5; +} + +.entry-content kbd { + display: inline-block; + padding: 3px 5px; + font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #444d56; + vertical-align: middle; + background-color: #fafbfc; + border: solid 1px #d1d5da; + border-bottom-color: #c6cbd1; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #c6cbd1; +} + +.entry-content :checked+.radio-label { + position: relative; + z-index: 1; + border-color: #0366d6; +} + +.entry-content .task-list-item { + list-style-type: none; +} + +.entry-content .task-list-item+.task-list-item { + margin-top: 3px; +} + +.entry-content .task-list-item input { + margin: 0 0.2em 0.25em -1.6em; + vertical-align: middle; +} + +.entry-content hr { + border-bottom-color: #eee; +} + +/*fix mac code*/ +.entry-content pre.highlight-wrap { + position: relative; + background: #21252b; + border-radius: 5px; + font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif; + line-height: 1.6; + margin-bottom: 1.6em; + max-width: 100%; + overflow: auto; + text-shadow: none; + color: #000; + padding-top: 30px; + box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4) +} + +.entry-content pre.highlight-wrap:before { + content: " "; + position: absolute; + -webkit-border-radius: 50%; + border-radius: 50%; + background: #fc625d; + width: 12px; + height: 12px; + left: 12px; + margin-top: -18px; + -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; + box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; + z-index: 2 +} + +.entry-content pre.highlight-wrap .copy-code { + color: #fff; + position: absolute; + float: right; + right: 10px; + top: 0; + padding-top: 4px; + padding-right: 2px; + z-index: 2; + font-size: 16px; +} + +.entry-content pre.highlight-wrap .copy-code:hover { + color: rgba(255,255,255,.5); +} + +.entry-content pre .hljs-ln-line span::-moz-selection, +.entry-content pre .hljs-ln-line::-moz-selection { + background: #fff; + color: #21252b +} + +.entry-content pre .hljs-ln-line span::selection, +.entry-content pre .hljs-ln-line::selection { + background: #fff; + color: #21252b +} + +.entry-content pre.highlight-wrap code::-webkit-scrollbar { + height: 10x !important; + width: 10x !important; + background-color: #1d1f21 !important +} + +.entry-content pre.highlight-wrap code::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3) !important; + border-radius: 10px !important; + background-color: #21252b !important +} + +.entry-content pre.highlight-wrap code::-webkit-scrollbar-thumb { + border-radius: 10px !important; + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important; + background-color: #21252b !important +} + +.entry-content pre.highlight-wrap code { + background: #1d1f21; + color: #fff; + word-break: break-word; + font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif; + padding: 2px; + text-shadow: none; + border-radius: 0 0 5px 5px; + cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/texto.cur), auto +} + +.entry-content pre.highlight-wrap code[data-rel]:before { + color: #fff; + content: attr(data-rel); + height: 30px; + line-height: 30px; + background: #21252b; + font-size: 16px; + position: absolute; + margin-top: -30px; + left: 0; + width: 100%; + font-family: Ubuntu, sans-serif; + font-weight: 700; + padding: 0 80px; + text-indent: 15px; + text-align: center; + float: left; + z-index: 1; + border-radius: 5px 5px 0 0; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + pointer-events: none +} + +.entry-content pre .hljs { + display: block; + overflow-x: auto; + padding: .5em; + color: #abb2bf; + background: rgba(254, 250, 199, .5); + border-radius: 10px +} + +.entry-content pre .hljs-comment, +.entry-content pre .hljs-quote { + color: #888f96; + font-style: italic +} + +.entry-content pre .hljs-doctag, +.entry-content pre .hljs-formula, +.entry-content pre .hljs-keyword { + color: #c678dd +} + +.entry-content pre .hljs-deletion, +.entry-content pre .hljs-name, +.entry-content pre .hljs-section, +.entry-content pre .hljs-selector-tag, +.entry-content pre .hljs-subst { + color: #e06c75 +} + +.entry-content pre .hljs-literal { + color: #56b6c2 +} + +.entry-content pre .hljs-addition, +.entry-content pre .hljs-attribute, +.entry-content pre .hljs-meta-string, +.entry-content pre .hljs-regexp, +.entry-content pre .hljs-string { + color: #98c379 +} + +.entry-content pre .hljs-built_in, +.entry-content pre .hljs-class .hljs-title { + color: #e6c07b +} + +.entry-content pre .hljs-attr, +.entry-content pre .hljs-number, +.entry-content pre .hljs-selector-attr, +.entry-content pre .hljs-selector-class, +.entry-content pre .hljs-selector-pseudo, +.entry-content pre .hljs-template-variable, +.entry-content pre .hljs-type, +.entry-content pre .hljs-variable { + color: #d19a66 +} + +.entry-content pre .hljs-bullet, +.entry-content pre .hljs-link, +.entry-content pre .hljs-meta, +.entry-content pre .hljs-selector-id, +.entry-content pre .hljs-symbol, +.entry-content pre .hljs-title { + color: #61aeee +} + +.entry-content pre .hljs-emphasis { + font-style: italic +} + +.entry-content pre .hljs-strong { + font-weight: 700 +} + +.entry-content pre .hljs-link { + text-decoration: underline +} + +.entry-content pre .hljs-ln { + margin: 6px 0 0 6px !important +} + +.entry-content pre td .hljs-ln-numbers { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + text-align: center; + color: #888f96; + background: #1d1f21; + font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif; + vertical-align: top; + position: absolute; + left: 0; + width: 30px +} + +.entry-content pre .hljs-ln-code .hljs-ln-line { + margin-left: 6px; + padding-left: 16px +} + +.entry-content pre .hljs-ln-code .hljs-ln-line:hover { + background-color: rgba(255, 255, 255, .1) +} + +.entry-content pre .hljs-ln{border-collapse:collapse} +.entry-content pre .hljs-ln td{padding:0} +.entry-content pre .hljs-ln-n:before{content:attr(data-line-number)} + +/*fix*/ +.entry-content pre table tr { + background-color: transparent; + border-top: none; +} + +.entry-content pre table th, .entry-content pre table td { + border: none; +} + +.entry-content pre table tr { + background-color: transparent; + border-top: 0; +} + +.entry-content pre table tr:nth-child(2n) { + background-color: transparent; +} + +.code-block-fullscreen { + position: fixed !important; + top: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; + min-width: 100% !important; + z-index: 9999999 !important; + margin: 0 !important; + animation: elastic 1s !important +} + +.code-block-fullscreen code { + --widthA: 100%; + --widthB: calc(var(--widthA) - 30px); + height: var(--widthB) !important; + min-height: 99% !important; + overflow-y: hidden !important; + overflow-x: auto !important; + height: auto !important +} + +.code-block-fullscreen-html-scroll { + overflow: hidden !important +} + +/*other fix*/ +.entry-content ol, ul { + margin: auto !important; +} \ No newline at end of file diff --git a/cdn/theme/sakura.css b/cdn/theme/sakura.css new file mode 100644 index 0000000..e0abea1 --- /dev/null +++ b/cdn/theme/sakura.css @@ -0,0 +1,124 @@ +.entry-content blockquote:before,.entry-content blockquote:after { + display: block +} + +.entry-content .begin, +.single-begin { + float: left; + font-size: 3.6em; + line-height: 1em; + margin-right: 3px; + margin-top: 2px; + font-weight: 700 +} + +@media screen and (max-width:860px) { + .entry-content .begin, + .single-begin { + margin-top: 6px + } +} + +.entry-content ul { + list-style: disc; + border: 1px dashed #E4E4E4; + padding: 15px 10px 15px 50px; + color: #616161; + margin-left: 0; + border-radius: 10px +} + +.entry-content ol { + list-style: decimal; + border: 1px dashed #E4E4E4; + padding: 15px 10px 15px 50px; + color: #616161; + margin-left: 0; + border-radius: 10px +} + +.entry-content ol li, +.entry-content ul li { + padding: 8px 0 +} + +.entry-content { + position: relative +} + +.entry-content h3 { + padding-bottom: 8px; + border-bottom: 1px dashed #ddd; + color: #737373 +} + +.entry-content h3:before { + content: "#"; + margin-right: 5px; + color: #FF6D6D +} + +.entry-content h4:before { + content: ">"; + margin-right: 5px; + color: #FF6D6D +} + +.entry-content h5:before { + content: "?"; + margin-right: 5px; + color: #FF6D6D +} + +.entry-content code { + background: rgba(254, 250, 199, 1); + color: #E67474; + word-break: break-word; + font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif; + padding: 2px; + text-shadow: none; + border-radius: 5px +} + +.entry-content a { + color: #e67474; + text-decoration: underline dotted rgba(0, 0, 0, .1) +} + +.entry-content a:hover { + color: orange; + text-decoration: underline orange +} + +h1.entry-title { + font-size: 24px; + font-weight: 300 +} + +.entry-content p { + color: #797979 +} + +.entry-content p { + line-height: 30px +} + +.entry-content hr { + margin-top: 40px; + margin-bottom: 40px; + display: block; + border: 0; + text-align: center; + background: 0 0 +} + +.entry-content hr:before { + content: '...'; + display: inline-block; + margin-left: .6em; + color: rgba(0, 0, 0, .8); + position: relative; + top: -30px; + font-size: 28px; + letter-spacing: .6em +} \ No newline at end of file diff --git a/inc/decorate.php b/inc/decorate.php index 5d9c4c9..bdd1cb9 100644 --- a/inc/decorate.php +++ b/inc/decorate.php @@ -11,7 +11,9 @@ if ( akina_option('theme_skin') ) { ?> .feature i , /*.feature-title span ,*/ .download , .navigator i:hover , .links ul li:before , .ar-time i , span.ar-circle , .object , .comment .comment-reply-link , .siren-checkbox-radio:checked + .siren-checkbox-radioInput:after { background: } ::-webkit-scrollbar-thumb { background: } .download , .navigator i:hover , .link-title , .links ul li:hover , #pagination a:hover , .comment-respond input[type='submit']:hover { border-color: } -.entry-content a:hover , .site-info a:hover , .comment h4 a , #comments-navi a.prev , #comments-navi a.next , .comment h4 a:hover , .site-top ul li a:hover , .entry-title a:hover , #archives-temp h3 , span.page-numbers.current , .sorry li a:hover , .site-title a:hover , i.iconfont.js-toggle-search.iconsearch:hover , .comment-respond input[type='submit']:hover, blockquote:before, blockquote:after,#aplayer-float .aplayer-lrc-current { color: } +.entry-content a:hover , .site-info a:hover , .comment h4 a , #comments-navi a.prev , #comments-navi a.next , .comment h4 a:hover , .site-top ul li a:hover , .entry-title a:hover , #archives-temp h3 , span.page-numbers.current , .sorry li a:hover , .site-title a:hover , i.iconfont.js-toggle-search.iconsearch:hover , .comment-respond input[type='submit']:hover, blockquote:before, blockquote:after { color: } + +#aplayer-float .aplayer-lrc-current { color: !important} .is-active-link::before { background-color: !important diff --git a/inc/swicher.php b/inc/swicher.php index fb280ae..eb1ce29 100644 --- a/inc/swicher.php +++ b/inc/swicher.php @@ -34,6 +34,12 @@ mashiro_option.clipboardCopyright = false; mashiro_option.clipboardCopyright = true; + +mashiro_option.entry_content_theme_src = "/cdn/theme/sakura.css?"; + +mashiro_option.entry_content_theme_src = "/cdn/theme/github.css?"; + + mashiro_option.jsdelivr_css_src = "/cdn/css/lib.css?"; diff --git a/js/sakura-app.js b/js/sakura-app.js index 69926a2..74a1b57 100644 --- a/js/sakura-app.js +++ b/js/sakura-app.js @@ -1032,6 +1032,8 @@ function mail_me() { var mail = "mailto:" + mashiro_option.email_name + "@" + mashiro_option.email_domain; window.open(mail); } + +/* var currentFontIsUbuntu = true; function changeFont() { @@ -1056,8 +1058,11 @@ function convertChinese(zh) { loadCSS("https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.8/css/cn.css"); } } +*/ + mashiro_global.ini.normalize(); loadCSS(mashiro_option.jsdelivr_css_src); +loadCSS(mashiro_option.entry_content_theme_src); loadCSS("https://at.alicdn.com/t/font_679578_qyt5qzzavdo39pb9.css"); loadCSS("https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css"); loadCSS("https://fonts.googleapis.com/css?family=Noto+SerifMerriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700|Noto+Serif+SC"); diff --git a/options.php b/options.php index d73b0eb..e8ee5e5 100644 --- a/options.php +++ b/options.php @@ -486,6 +486,16 @@ function optionsframework_options() { $options[] = array( 'name' => __('文章页', 'options_framework_theme'), 'type' => 'heading'); + + $options[] = array( + 'name' => __('文章样式', 'akina'), + 'id' => 'entry_content_theme', + 'std' => "sakura", + 'type' => "radio", + 'options' => array( + 'sakura' => __('默认样式', ''), + 'github' => __('GitHub 样式', ''), + )); $options[] = array( 'name' => __('文章点赞', 'akina'), diff --git a/style.css b/style.css index 94a6e62..f23e347 100644 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Theme URI: https://2heng.xin/theme-sakura/ Author: Mashiro, Louie, Fuzzz Author URI: http://2heng.xin Description: Akina主题分支(原版地址 http://www.akina.pw/themeakina) -Version: 3.1.1 +Version: 3.1.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: akina @@ -501,7 +501,7 @@ input[type=submit] { border-color: #ccc #ccc #bbb; border-radius: 3px; background: #e6e6e6; - box-shadow: none; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 15px 17px rgba(255, 255, 255, .5), inset 0 -5px 12px rgba(0, 0, 0, .05); color: rgba(0, 0, 0, .8); font-size: 12px; font-size: .75rem; @@ -526,7 +526,7 @@ input[type=reset]:focus, input[type=submit]:active, input[type=submit]:focus { border-color: #aaa #bbb #bbb; - box-shadow: none + box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .5), inset 0 2px 5px rgba(0, 0, 0, .15) } input[type=color], @@ -1771,126 +1771,7 @@ i.iconfont.hotpost { display: none } -.entry-content .begin, -.single-begin { - float: left; - font-size: 3.6em; - line-height: 1em; - margin-right: 3px; - margin-top: 2px; - font-weight: 700 -} -@media screen and (max-width:860px) { - .entry-content .begin, - .single-begin { - margin-top: 6px - } -} - -.entry-content ul { - list-style: disc; - border: 1px dashed #E4E4E4; - padding: 15px 10px 15px 50px; - color: #616161; - margin-left: 0; - border-radius: 10px -} - -.entry-content ol { - list-style: decimal; - border: 1px dashed #E4E4E4; - padding: 15px 10px 15px 50px; - color: #616161; - margin-left: 0; - border-radius: 10px -} - -.entry-content ol li, -.entry-content ul li { - padding: 8px 0 -} - -.entry-content { - position: relative -} - -.entry-content h3 { - padding-bottom: 8px; - border-bottom: 1px dashed #ddd; - color: #737373 -} - -.entry-content h3:before { - content: "#"; - margin-right: 5px; - color: #FF6D6D -} - -.entry-content h4:before { - content: ">"; - margin-right: 5px; - color: #FF6D6D -} - -.entry-content h5:before { - content: "•"; - margin-right: 5px; - color: #FF6D6D -} - -.entry-content code { - background: rgba(254, 250, 199, 1); - color: #E67474; - word-break: break-word; - font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif; - padding: 2px; - text-shadow: none; - border-radius: 5px -} - -.entry-content a { - color: #e67474; - text-decoration: underline dotted rgba(0, 0, 0, .1) -} - -.entry-content a:hover { - color: orange; - text-decoration: underline orange -} - -h1.entry-title { - font-size: 24px; - font-weight: 300 -} - -.entry-content p { - color: #797979 -} - -.entry-content p { - line-height: 30px -} - -.entry-content hr { - margin-top: 40px; - margin-bottom: 40px; - display: block; - border: 0; - text-align: center; - background: 0 0 -} - -.entry-content hr:before { - content: '...'; - display: inline-block; - margin-left: .6em; - color: rgba(0, 0, 0, .8); - position: relative; - top: -30px; - font-size: 28px; - letter-spacing: .6em -} .entry-content .post-password-form { text-align: center