保存进度!

This commit is contained in:
Kane Wang 2022-11-23 11:37:57 +08:00
parent 1cb7e8315e
commit ecfed64196
6 changed files with 110 additions and 139 deletions

View File

@ -1,12 +1,13 @@
/* 如有不懂,参看 https://theme.typora.io/doc/zh/Write-Custom-Theme/ */ /* 如有不懂,参看 https://theme.typora.io/doc/zh/Write-Custom-Theme/ */
@import 'zj/fonts.css'; @import "zj/fonts.css";
:root { :root {
--side-bar-bg-color: #fff; --side-bar-bg-color: #fff;
--control-text-color: #777; --control-text-color: #777;
/* --font-sans-serif: 'PingFangSC-Regular', 'Microsoft YaHei', , 'Source Sans Pro', sans-serif !important; */ /* --font-sans-serif: 'PingFangSC-Regular', 'Microsoft YaHei', , 'Source Sans Pro', sans-serif !important; */
--font-sans-serif: 'Source Han SerifCN', 'Microsoft YaHei', sans-serif !important; --font-sans-serif: "Source Han SerifCN", "Microsoft YaHei", sans-serif !important;
--font-monospace: 'Source Code Pro Medium',Courier, monospace, 'Courier New', 'Roboto Mono', 'Source Sans Pro', 'Microsoft YaHei' !important; --font-monospace: "Source Code Pro Medium", Courier, monospace,
"Courier New", "Roboto Mono", "Source Sans Pro", "Microsoft YaHei" !important;
/* 主题色 */ /* 主题色 */
--main-1: #fff3f0; --main-1: #fff3f0;
--main-2: #ffd4cc; --main-2: #ffd4cc;
@ -39,19 +40,16 @@ body {
margin: 0; margin: 0;
} }
/* #write 为写入区域 */ /* #write 为写入区域 */
#write { #write {
max-width: 860px; max-width: 1280px;
padding: 20px 30px 160px; padding: 20px 30px 160px;
margin: 0 auto; margin: 0 auto;
} }
/* 根据窗口的大小调整写作区域 */ /* 根据窗口的大小调整写作区域 */
/* @media only screen and (min-width: 1400px) { /* @media only screen and (min-width: 1400px) {
#write { #write {
max-width: 1024px; max-width: 1024px;
@ -64,21 +62,19 @@ body {
} }
} */ } */
/* 正常文字 */ /* 正常文字 */
#write p { #write p {
line-height: 1.6rem; line-height: 1.6rem;
word-spacing: .05rem; word-spacing: 0.05rem;
color: black; color: black;
} }
#write>ul:first-child, #write > ul:first-child,
#write>ol:first-child { #write > ol:first-child {
margin-top: 30px; margin-top: 30px;
} }
/* 链接 */ /* 链接 */
a { a {
@ -91,31 +87,28 @@ a {
/* text-decoration-color: #0366d6; */ /* text-decoration-color: #0366d6; */
} }
/* 加粗 */ /* 加粗 */
strong { strong {
padding: 0.1em; padding: 0.1em;
/* color: #dc3545; */ /* color: #dc3545; */
color: #E91E63; color: #e91e63;
font-weight: 600; font-weight: 600;
/* font-family: 'Microsoft YaHei'; */ /* font-family: 'Microsoft YaHei'; */
/* font-size: 90%; */ /* font-size: 90%; */
} }
/* 斜体强调 */ /* 斜体强调 */
em { em {
font-style: normal; font-style: normal;
background-color: #EBFFEB; background-color: #ebffeb;
border-radius: 2px; border-radius: 2px;
padding: 2px 4px; padding: 2px 4px;
margin: 0 2px; margin: 0 2px;
color: black; color: black;
} }
/* 行内数学公式变蓝 */ /* 行内数学公式变蓝 */
.md-inline-math { .md-inline-math {
@ -123,7 +116,6 @@ em {
font-size: 100%; font-size: 100%;
} }
/* 行间数学公式 */ /* 行间数学公式 */
[mdtype="math_block"] { [mdtype="math_block"] {
@ -132,49 +124,44 @@ em {
/* color: blue; */ /* color: blue; */
} }
/* .MathJax_SVG svg { /* .MathJax_SVG svg {
font-size: 110%; font-size: 110%;
color: blue; color: blue;
zoom: 1 zoom: 1
} */ } */
/* 标题编号初始化 */ /* 标题编号初始化 */
/* 首先全局进行一次reset这样即使不添加h1标题也可以使用较低级别的标题 */ /* 首先全局进行一次reset这样即使不添加h1标题也可以使用较低级别的标题 */
#write { #write {
counter-reset: h2 0 h3 0 h4 0 h5 0 h6 0 counter-reset: h2 0 h3 0 h4 0 h5 0 h6 0;
} }
/* #write { /* #write {
counter-reset: h1 counter-reset: h1
} */ } */
h1 { h1 {
counter-reset: h2 counter-reset: h2;
} }
h2 { h2 {
counter-reset: h3 counter-reset: h3;
} }
h3 { h3 {
counter-reset: h4 counter-reset: h4;
} }
h4 { h4 {
counter-reset: h5 counter-reset: h5;
} }
h5 { h5 {
counter-reset: h6 counter-reset: h6;
} }
/** put counter result into headings */ /** put counter result into headings */
#write h1:before { #write h1:before {
@ -184,40 +171,40 @@ h5 {
#write h2:before { #write h2:before {
counter-increment: h2; counter-increment: h2;
content: counter(h2) ". " content: counter(h2) ". ";
} }
#write h3:before, #write h3:before,
h3.md-focus.md-heading:before { h3.md-focus.md-heading:before {
counter-increment: h3; counter-increment: h3;
content: counter(h2) "." counter(h3) " " content: counter(h2) "." counter(h3) " ";
} }
#write h4:before, #write h4:before,
h4.md-focus.md-heading:before { h4.md-focus.md-heading:before {
counter-increment: h4; counter-increment: h4;
content: counter(h2) "." counter(h3) "." counter(h4) " " content: counter(h2) "." counter(h3) "." counter(h4) " ";
} }
#write h5:before, #write h5:before,
h5.md-focus.md-heading:before { h5.md-focus.md-heading:before {
counter-increment: h5; counter-increment: h5;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " " content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " ";
} }
#write h6:before, #write h6:before,
h6.md-focus.md-heading:before { h6.md-focus.md-heading:before {
counter-increment: h6; counter-increment: h6;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " " content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "."
counter(h6) " ";
} }
/** override the default style for focused headings */ /** override the default style for focused headings */
#write>h3.md-focus:before, #write > h3.md-focus:before,
#write>h4.md-focus:before, #write > h4.md-focus:before,
#write>h5.md-focus:before, #write > h5.md-focus:before,
#write>h6.md-focus:before, #write > h6.md-focus:before,
h3.md-focus:before, h3.md-focus:before,
h4.md-focus:before, h4.md-focus:before,
h5.md-focus:before, h5.md-focus:before,
@ -291,10 +278,9 @@ h6 code {
font-size: inherit; font-size: inherit;
} }
/* h1标题样式 */ /* h1标题样式 */
h1[title] { h1[title] {
color:rgba(0, 92, 197, 0.8); color: rgba(0, 92, 197, 0.8);
padding: 0em 0 0.5em 0; padding: 0em 0 0.5em 0;
color: #334257; color: #334257;
} }
@ -302,13 +288,11 @@ h1[title] {
h1:not([title]) { h1:not([title]) {
margin-top: 2.2rem; margin-top: 2.2rem;
text-align: left; text-align: left;
padding-bottom: .2em; padding-bottom: 0.2em;
font-size: 2.25em; font-size: 2.25em;
line-height: 1.2; line-height: 1.2;
border-bottom: 2px solid var(--main-6); border-bottom: 2px solid var(--main-6);
display: inline-block; display: inline-block;
} }
/* h1:after { /* h1:after {
@ -327,13 +311,11 @@ h1:not([title]) {
width: 4em; width: 4em;
height: 2px; height: 2px;
/* border-bottom: 2px solid var(--main-6); */ /* border-bottom: 2px solid var(--main-6); */
} */
/* h2标题样式 */ /* h2标题样式 */
h2 { h2 {
padding-bottom: .2em; padding-bottom: 0.2em;
font-size: 1.75em; font-size: 1.75em;
line-height: 1.225; line-height: 1.225;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
@ -366,8 +348,8 @@ table {
margin: 0.8em 0; margin: 0.8em 0;
} }
li>ol, li > ol,
li>ul { li > ul {
margin: 0 0; margin: 0 0;
} }
@ -381,25 +363,24 @@ hr {
box-sizing: content-box; box-sizing: content-box;
} }
/* 列表环境 */ /* 列表环境 */
#write ol>li, #write ol > li,
#write ul>li { #write ul > li {
/* color: #db4d52; */ /* color: #db4d52; */
color: #f50057; color: #f50057;
font-weight: bold; font-weight: bold;
} }
#write ol>li>*, #write ol > li > *,
#write ul>li>* { #write ul > li > * {
color: #333; color: #333;
font-weight: normal; font-weight: normal;
} }
#write ol>li>*:not(ol):not(ul), #write ol > li > *:not(ol):not(ul),
#write ul>li>*:not(ol):not(ul) { #write ul > li > *:not(ol):not(ul) {
padding-left: .25rem; padding-left: 0.25rem;
} }
#write ul { #write ul {
@ -418,7 +399,6 @@ table {
word-break: initial; word-break: initial;
} }
/* tr元素定义表格行 */ /* tr元素定义表格行 */
table tr { table tr {
@ -429,10 +409,9 @@ table tr {
table tr:nth-child(2n), table tr:nth-child(2n),
thead { thead {
background-color: #F6F8FA; background-color: #f6f8fa;
} }
/* th元素定义表头 */ /* th元素定义表头 */
table tr th { table tr th {
@ -444,7 +423,6 @@ table tr th {
padding: 6px 13px; padding: 6px 13px;
} }
/* td元素定义表格单元格 */ /* td元素定义表格单元格 */
table tr td { table tr td {
@ -464,15 +442,12 @@ table tr td:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
/* 行号与代码之间的框线 */ /* 行号与代码之间的框线 */
/* #write .CodeMirror-gutters { /* #write .CodeMirror-gutters {
border-right: none; border-right: none;
} */ } */
/* 行号 */ /* 行号 */
.cm-s-inner .CodeMirror-linenumber { .cm-s-inner .CodeMirror-linenumber {
@ -482,17 +457,15 @@ border-right: none;
color: rgba(0, 92, 197, 0.8); color: rgba(0, 92, 197, 0.8);
} }
/* .CodeMirror-lines { /* .CodeMirror-lines {
padding-left: 4px; padding-left: 4px;
} */ } */
.code-tooltip { .code-tooltip {
box-shadow: 0 1px 1px 0 rgba(0, 28, 36, .3); box-shadow: 0 1px 1px 0 rgba(0, 28, 36, 0.3);
border-top: 1px solid #eef2f2; border-top: 1px solid #eef2f2;
} }
/* 代码框 */ /* 代码框 */
#write .md-fences { #write .md-fences {
@ -516,14 +489,12 @@ padding-left: 4px;
padding-left: 12px; padding-left: 12px;
} }
/* 代码框中光标颜色 */ /* 代码框中光标颜色 */
#write .CodeMirror-cursors .CodeMirror-cursor { #write .CodeMirror-cursors .CodeMirror-cursor {
border-left: 2px solid var(--main-4); border-left: 2px solid var(--main-4);
} }
/* 行内代码 */ /* 行内代码 */
#write code, #write code,
@ -535,8 +506,8 @@ tt {
font-family: var(--font-monospace); font-family: var(--font-monospace);
/* font-family: 'Source Code Pro', 'Microsoft YaHei'!important; */ /* font-family: 'Source Code Pro', 'Microsoft YaHei'!important; */
font-size: 0.9rem; font-size: 0.9rem;
color: #FF0000; color: #ff0000;
background-color: #FAEAEB; background-color: #faeaeb;
} }
tt { tt {
@ -548,10 +519,9 @@ tt {
color: #e96900; color: #e96900;
} }
/* 任务列表小方框 */ /* 任务列表小方框 */
.md-task-list-item>input { .md-task-list-item > input {
margin-left: -1.3em; margin-left: -1.3em;
} }
@ -570,35 +540,35 @@ tt {
margin-top: 0 !important; margin-top: 0 !important;
} }
.mathjax-block>.code-tooltip { .mathjax-block > .code-tooltip {
bottom: .375rem; bottom: 0.375rem;
} }
.md-mathjax-midline { .md-mathjax-midline {
background: #fafafa; background: #fafafa;
} }
#write>h3.md-focus:before { #write > h3.md-focus:before {
left: -1.5625rem; left: -1.5625rem;
top: .375rem; top: 0.375rem;
} }
#write>h4.md-focus:before { #write > h4.md-focus:before {
left: -1.5625rem; left: -1.5625rem;
top: .285714286rem; top: 0.285714286rem;
} }
#write>h5.md-focus:before { #write > h5.md-focus:before {
left: -1.5625rem; left: -1.5625rem;
top: .285714286rem; top: 0.285714286rem;
} }
#write>h6.md-focus:before { #write > h6.md-focus:before {
left: -1.5625rem; left: -1.5625rem;
top: .285714286rem; top: 0.285714286rem;
} }
.md-image>.md-meta { .md-image > .md-meta {
/*border: 1px solid #ddd;*/ /*border: 1px solid #ddd;*/
border-radius: 3px; border-radius: 3px;
padding: 2px 0px 0px 4px; padding: 2px 0px 0px 4px;
@ -616,12 +586,10 @@ tt {
padding-bottom: 20px; padding-bottom: 20px;
} }
/************************************** /**************************************
* Header Counters in TOC * Header Counters in TOC
**************************************/ **************************************/
/* No link underlines in TOC */ /* No link underlines in TOC */
.md-toc-inner { .md-toc-inner {
@ -638,36 +606,36 @@ tt {
margin-left: 0; margin-left: 0;
font-size: 1.5rem; font-size: 1.5rem;
display: none; display: none;
counter-reset: h2toc counter-reset: h2toc;
} }
.md-toc-h2 { .md-toc-h2 {
font-size: 1.1rem; font-size: 1.1rem;
margin-left: 2rem; margin-left: 2rem;
counter-reset: h3toc counter-reset: h3toc;
} }
.md-toc-h3 { .md-toc-h3 {
margin-left: 3rem; margin-left: 3rem;
font-size: .9rem; font-size: 0.9rem;
counter-reset: h4toc counter-reset: h4toc;
} }
.md-toc-h4 { .md-toc-h4 {
margin-left: 4rem; margin-left: 4rem;
font-size: .85rem; font-size: 0.85rem;
counter-reset: h5toc counter-reset: h5toc;
} }
.md-toc-h5 { .md-toc-h5 {
margin-left: 5rem; margin-left: 5rem;
font-size: .8rem; font-size: 0.8rem;
counter-reset: h6toc counter-reset: h6toc;
} }
.md-toc-h6 { .md-toc-h6 {
margin-left: 6rem; margin-left: 6rem;
font-size: .75rem; font-size: 0.75rem;
} }
.md-toc-h1:before { .md-toc-h1:before {
@ -682,7 +650,7 @@ tt {
.md-toc-h2:before { .md-toc-h2:before {
color: black; color: black;
counter-increment: h2toc; counter-increment: h2toc;
content: counter(h2toc) ". " content: counter(h2toc) ". ";
} }
.md-toc-h2 .md-toc-inner { .md-toc-h2 .md-toc-inner {
@ -692,7 +660,7 @@ tt {
.md-toc-h3:before { .md-toc-h3:before {
color: black; color: black;
counter-increment: h3toc; counter-increment: h3toc;
content: counter(h2toc) ". " counter(h3toc) " " content: counter(h2toc) ". " counter(h3toc) " ";
} }
.md-toc-h3 .md-toc-inner { .md-toc-h3 .md-toc-inner {
@ -702,7 +670,7 @@ tt {
.md-toc-h4:before { .md-toc-h4:before {
color: black; color: black;
counter-increment: h4toc; counter-increment: h4toc;
content: counter(h2toc) ". " counter(h3toc) ". " counter(h4toc) " " content: counter(h2toc) ". " counter(h3toc) ". " counter(h4toc) " ";
} }
.md-toc-h4 .md-toc-inner { .md-toc-h4 .md-toc-inner {
@ -712,7 +680,8 @@ tt {
.md-toc-h5:before { .md-toc-h5:before {
color: black; color: black;
counter-increment: h5toc; counter-increment: h5toc;
content: counter(h2toc) ". " counter(h3toc) ". " counter(h4toc) ". " counter(h5toc) " " content: counter(h2toc) ". " counter(h3toc) ". " counter(h4toc) ". "
counter(h5toc) " ";
} }
.md-toc-h5 .md-toc-inner { .md-toc-h5 .md-toc-inner {
@ -722,73 +691,73 @@ tt {
.md-toc-h6:before { .md-toc-h6:before {
color: black; color: black;
counter-increment: h6toc; counter-increment: h6toc;
content: counter(h2toc) ". " counter(h3toc) ". " counter(h4toc) ". " counter(h5toc) ". " counter(h6toc) " " content: counter(h2toc) ". " counter(h3toc) ". " counter(h4toc) ". "
counter(h5toc) ". " counter(h6toc) " ";
} }
.md-toc-h6 .md-toc-inner { .md-toc-h6 .md-toc-inner {
margin-left: 0; margin-left: 0;
} }
/* 侧栏自动编号 */ /* 侧栏自动编号 */
.sidebar-content { .sidebar-content {
counter-reset: h2 0 h3 0 h4 0 h5 0 h6 0 counter-reset: h2 0 h3 0 h4 0 h5 0 h6 0;
} }
/* .sidebar-content { /* .sidebar-content {
counter-reset: h1 counter-reset: h1
} */ } */
.outline-h1 { .outline-h1 {
counter-reset: h2 counter-reset: h2;
} }
.outline-h2 { .outline-h2 {
counter-reset: h3 counter-reset: h3;
} }
.outline-h3 { .outline-h3 {
counter-reset: h4 counter-reset: h4;
} }
.outline-h4 { .outline-h4 {
counter-reset: h5 counter-reset: h5;
} }
.outline-h5 { .outline-h5 {
counter-reset: h6 counter-reset: h6;
} }
.outline-h1>.outline-item>.outline-label:before { .outline-h1 > .outline-item > .outline-label:before {
counter-increment: h1; counter-increment: h1;
/* content: counter(h1) ". " */ /* content: counter(h1) ". " */
} }
.outline-h2>.outline-item>.outline-label:before { .outline-h2 > .outline-item > .outline-label:before {
counter-increment: h2; counter-increment: h2;
content: counter(h2) ". " content: counter(h2) ". ";
} }
.outline-h3>.outline-item>.outline-label:before { .outline-h3 > .outline-item > .outline-label:before {
counter-increment: h3; counter-increment: h3;
content: counter(h2) "." counter(h3) " " content: counter(h2) "." counter(h3) " ";
} }
.outline-h4>.outline-item>.outline-label:before { .outline-h4 > .outline-item > .outline-label:before {
counter-increment: h4; counter-increment: h4;
content: counter(h2) "." counter(h3) "." counter(h4) " " content: counter(h2) "." counter(h3) "." counter(h4) " ";
} }
.outline-h5>.outline-item>.outline-label:before { .outline-h5 > .outline-item > .outline-label:before {
counter-increment: h5; counter-increment: h5;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " " content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " ";
} }
.outline-h6>.outline-item>.outline-label:before { .outline-h6 > .outline-item > .outline-label:before {
counter-increment: h6; counter-increment: h6;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " " content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "."
counter(h6) " ";
} }
.sidebar-tabs { .sidebar-tabs {
@ -801,13 +770,12 @@ tt {
} }
#typora-quick-open-item { #typora-quick-open-item {
background-color: #FAFAFA; background-color: #fafafa;
border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee; border-color: #fefefe #e5e5e5 #e5e5e5 #eee;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
} }
/** focus mode */ /** focus mode */
.on-focus-mode blockquote { .on-focus-mode blockquote {
@ -836,7 +804,7 @@ footer {
} }
.html-for-mac .context-menu { .html-for-mac .context-menu {
--item-hover-bg-color: #E6F0FE; --item-hover-bg-color: #e6f0fe;
} }
#md-notification .btn { #md-notification .btn {
@ -856,7 +824,6 @@ footer {
background: #999; background: #999;
} }
/* 打印成PDF */ /* 打印成PDF */
@media print { @media print {
@ -864,19 +831,19 @@ footer {
-webkit-print-color-adjust: exact; -webkit-print-color-adjust: exact;
} }
html { html {
font-size: 15px!important; font-size: 15px !important;
} }
body { body {
/* font-size: 16px!important; */ /* font-size: 16px!important; */
/* font-family: 'Source Han SerifCN', "Times New Roman", Times, 'SimSun', serif!important; */ /* font-family: 'Source Han SerifCN', "Times New Roman", Times, 'SimSun', serif!important; */
font-family: "Times New Roman", Times, 'SimSun', serif!important; font-family: "Times New Roman", Times, "SimSun", serif !important;
color: #000000!important; color: #000000 !important;
} }
p { p {
color: #000000!important; color: #000000 !important;
} }
a { a {
color: blue!important; color: blue !important;
} }
table, table,
pre { pre {
@ -885,4 +852,4 @@ footer {
pre { pre {
word-wrap: break-word; word-wrap: break-word;
} }
} }

View File

@ -283,11 +283,8 @@ code {
html { html {
font-size: 13px; font-size: 13px;
} }
table,
pre { pre {
page-break-inside: avoid; page-break-inside: avoid;
}
pre {
word-wrap: break-word; word-wrap: break-word;
} }
} }

View File

@ -1014,4 +1014,9 @@ footer.ty-footer {
.clear-btn-icon { .clear-btn-icon {
top: 8px; top: 8px;
} }
/* try fix https://github.com/typora/typora-issues/issues/5253 */
.file-node-expanded>.file-node-children {
display: grid;
}

View File

@ -283,11 +283,8 @@ code {
html { html {
font-size: 13px; font-size: 13px;
} }
table,
pre { pre {
page-break-inside: avoid; page-break-inside: avoid;
}
pre {
word-wrap: break-word; word-wrap: break-word;
} }
} }

View File

@ -1014,4 +1014,9 @@ footer.ty-footer {
.clear-btn-icon { .clear-btn-icon {
top: 8px; top: 8px;
} }
/* try fix https://github.com/typora/typora-issues/issues/5253 */
.file-node-expanded>.file-node-children {
display: grid;
}

BIN
themes.rar Normal file

Binary file not shown.