diff options
| author | muqiuhan <[email protected]> | 2023-02-24 14:22:33 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2023-02-24 14:22:33 +0000 |
| commit | d7ba01c52c02470fbcea6bdc43e58ac0d28084de (patch) | |
| tree | b0d617bc0b8cc515725410a38227f537ab587312 /css | |
| download | blog-d7ba01c52c02470fbcea6bdc43e58ac0d28084de.tar.gz | |
deploy: c7baa4dd029ccb68a9b82cabb1282e6dd291dba1
Diffstat (limited to 'css')
| -rw-r--r-- | css/a11y-dark.min.css | 7 | ||||
| -rw-r--r-- | css/fonts.css | 47 | ||||
| -rw-r--r-- | css/markdown.css | 170 | ||||
| -rw-r--r-- | css/reset.css | 70 | ||||
| -rw-r--r-- | css/style.css | 348 |
5 files changed, 642 insertions, 0 deletions
diff --git a/css/a11y-dark.min.css b/css/a11y-dark.min.css new file mode 100644 index 00000000..7820d7db --- /dev/null +++ b/css/a11y-dark.min.css @@ -0,0 +1,7 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: a11y-dark + Author: @ericwbailey + Maintainer: @ericwbailey + + Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css +*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}
\ No newline at end of file diff --git a/css/fonts.css b/css/fonts.css new file mode 100644 index 00000000..a3fe3512 --- /dev/null +++ b/css/fonts.css @@ -0,0 +1,47 @@ +/* montserrat-regular - latin */ + +@font-face +{ + font-family: "Montserrat"; + font-style: normal; + font-weight: 400; + src: local(""), + url("../fonts/montserrat-v23-latin-regular.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url("../fonts/montserrat-v23-latin-regular.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* montserrat-600 - latin */ + +@font-face +{ + font-family: "Montserrat"; + font-style: normal; + font-weight: 600; + src: local(""), + url("../fonts/montserrat-v23-latin-600.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url("../fonts/montserrat-v23-latin-600.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* montserrat-italic - latin */ + +@font-face +{ + font-family: "Montserrat"; + font-style: italic; + font-weight: 400; + src: local(""), + url("../fonts/montserrat-v23-latin-italic.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url("../fonts/montserrat-v23-latin-italic.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* montserrat-600italic - latin */ + +@font-face +{ + font-family: "Montserrat"; + font-style: italic; + font-weight: 600; + src: local(""), + url("../fonts/montserrat-v23-latin-600italic.woff2") format("woff2"), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url("../fonts/montserrat-v23-latin-600italic.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +}
\ No newline at end of file diff --git a/css/markdown.css b/css/markdown.css new file mode 100644 index 00000000..30ba21e1 --- /dev/null +++ b/css/markdown.css @@ -0,0 +1,170 @@ +@charset "utf-8"; + +.post-md +{ + width: 100%; + font-size: 16px; + letter-spacing: 0; +} + +.post-md h1, +.post-md h2, +.post-md h3, +.post-md h4, +.post-md h5, +.post-md h6 +{ + color: var(--font-color-1); + margin: 12px 0; +} +.post-md h1 +{ + font-size: 2.5rem; + line-height: 1.2; + padding: 24px 0; +} +.post-md h2 +{ + font-size: 2rem; + line-height: 1.2; + padding: 20px 0; +} +.post-md h3 +{ + font-size: 1.75rem; + line-height: 1.2; + padding: 18px 0; +} +.post-md h4 +{ + font-size: 1.5rem; + line-height: 1.2; + padding: 16px 0; +} +.post-md h5 +{ + font-size: 1.25rem; + line-height: 1.2; + padding: 14px 0; +} +.post-md h6 +{ + font-size: 1.125rem; + line-height: 1.2; + padding: 12px 0; +} +.post-md a +{ + color: var(--font-color-2); + box-shadow: 0 2px 0 var(--line-1); + transition: color ease-in-out .65s, box-shadow ease-in-out .65s; +} +.post-md a:hover +{ + color: var(--font-color-0); + box-shadow: 0 2px 0 var(--font-color-0); + transition: color ease-in-out .65s, box-shadow ease-in-out .65s; +} +.post-md strong +{ + font-weight: 700; +} +.post-md em +{ + font-style: italic; +} +.post-md kbd +{ + padding: 2px 4px; + border-radius: 2px; + background: #eee; + border: 1px solid #ddd; +} +.post-md ol +{ + list-style: decimal; + padding-left: 24px; +} +.post-md ul +{ + list-style: disc; + padding-left: 24px; +} +.post-md img +{ + border-radius: 4px; +} +.post-md hr +{ + border: none; + height: 1px; + background: var(--line-1); + margin: 24px 0; +} + +.post-md p, +.post-md blockquote +{ + width: 100%; + margin: 12px 0; +} +.post-md blockquote +{ + border-left: 2px solid var(--line-2); + padding-left: 12px; + word-wrap: break-word; +} + +.post-md .video-container +{ + background: #000; + border-radius: 4px; + overflow: hidden; +} +.post-md iframe, +.post-md .video-container iframe +{ + width: 100%; + height: 100vh; + max-height: 360px; + margin: 12px 0; +} + +.post-md>table +{ + width: 100%; + text-align: left; + border-spacing: 0; +} +.post-md>table th +{ + padding: 12px 0; + border-bottom: 2px solid var(--line-1); +} +.post-md>table tr:nth-child(odd) td +{ + padding: 12px 0; + border-bottom: 1px solid var(--line-1); + background: #fafafa; +} +.post-md>table tr:nth-child(even) td +{ + padding: 12px 0; + border-bottom: 1px solid var(--line-1); + background: #fff; +} + +.post-md code +{ + border-radius: 4px; + background: #2b2b2b; + padding: 2px 4px; + color: #f8f8f2; + font-size: 1rem; +} + +.post-md .hljs-ln-numbers +{ + opacity: .5; + padding-right: 12px; +} diff --git a/css/reset.css b/css/reset.css new file mode 100644 index 00000000..1d63f714 --- /dev/null +++ b/css/reset.css @@ -0,0 +1,70 @@ +@charset "utf-8"; + +*, +*::before, +*::after +{ + box-sizing: border-box; +} + +body, +h1, +h2, +h3, +h4, +h5, +h6, +p, +figure, +blockquote, +dl, +dd +{ + margin: 0; +} + +ul, +ol +{ + list-style: none; +} + +ul +{ + padding-inline-start: 0; +} + +html, +body +{ + scroll-behavior: smooth; +} + +a:not([class]) +{ + text-decoration-skip-ink: auto; +} + +img, +picture +{ + width: auto; + max-width: 100%; + display: block; +} + +input, +button, +textarea, +select +{ + font: inherit; +} + +@media (prefers-reduced-motion: reduce) +{ + html:focus-within + { + scroll-behavior: auto; + } +}
\ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 00000000..81235acc --- /dev/null +++ b/css/style.css @@ -0,0 +1,348 @@ +@charset "utf-8"; + +:root +{ + --font-color-0: #04077e; + --font-color-1: #000; + --font-color-2: #666; + --font-color-3: #aaa; + --bg-color-1: #eee; + --line-1: #ccc; + --line-2: #ddd; +} +p +{ + word-wrap: break-word; + white-space: pre-wrap; +} + +body +{ + font-family: "Montserrat", "SF UI Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; + font-size: 16px; + line-height: 1.75; + letter-spacing: 0.6px; + color: var(--font-color-2); + background: #111; +} +a +{ + text-decoration: none; + color: var(--font-color-1); +} + +.paper +{ + padding: 4vw; +} +.paper-main +{ + width: 100%; + max-width: 880px; + margin: 0 auto; + padding: 72px 8vw 24px; + background: #fff; + border-radius: 24px; + background: #fff; +} + +.header +{ + padding-bottom: 48px; + margin-bottom: 48px; + border-bottom: 1px solid var(--line-1); + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-content: center; +} +.logo +{ + font-size: 2rem; + font-weight: 600; + color: var(--font-color-1); + margin-bottom: 16px; + flex: 0 0 100%; +} +.nav +{ + margin: 0 0 4px; + flex: 0 0 100%; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-content: center; +} +.nav li +{ + padding: 2px 0; + margin-right: 24px; +} +.nav li:last-of-type +{ + margin-right: 0; +} +.nav li a +{ + color: var(--font-color-1); + opacity: .6; + transition: opacity ease-in-out .5s; +} +.nav li a:hover +{ + opacity: 1; + transition: opacity ease-in-out .5s; +} + +.post-header +{ + margin-bottom: 48px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-content: center; +} +.post-header .logo +{ + font-size: 1rem; +} +.post-header .go-home +{ + display: block; + padding: 10px 20px 8px; + border-radius: 18px; + background: #fff; + border: 1px solid #eee; + margin: 8px 0; + transition: background ease-in-out .5s; +} +.post-header .go-home:hover +{ + background: var(--bg-color-1); + transition: background ease-in-out .5s; +} +.post-header .go-home svg +{ + transform: translateX(0); + transition: transform ease-in-out .5s; +} +.post-header .go-home:hover svg +{ + transform: translateX(-4px); + transition: transform ease-in-out .5s; +} + +.post-list +{ + display: flex; + flex-direction: column; + flex-wrap: wrap; + justify-content: flex-start; + align-items: stretch; +} +.post +{ + width: 100%; + padding-bottom: 48px; + margin-bottom: 48px; + border-bottom: 1px dashed var(--line-2); +} +.post-title +{ + display: inline-block; + font-size: 1.6rem; + font-weight: 600; + line-height: 1.5; + margin-bottom: 12px; + color: var(--font-color-1); + /*transition: color ease-in-out .5s;*/ +} +.post-title:hover +{ + color: var(--font-color-0); + transition: color ease-in-out .5s; +} +.post-except +{ + word-break: break-all; + margin-bottom: 12px; +} +.read-more +{ + padding: 0 4px; + color: var(--font-color-0); +} +.read-more:before, +.read-more:after +{ + display: inline-block; + transition: transform ease-in-out .5s; +} +.read-more:before +{ + content: "{ "; +} +.read-more:after +{ + content: " }"; +} +.read-more:hover:before +{ + transform: translateX(-4px); + transition: transform ease-in-out .25s; +} +.read-more:hover:after +{ + transform: translateX(4px); + transition: transform ease-in-out .25s; +} +.post-date +{ + font-size: 0.875rem; + color: var(--font-color-3); +} + +.paginator +{ + font-size: 0.875rem; + width: 100%; + margin: 0 auto 24px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: center; +} +.paginator * +{ + display: block; + padding: 8px 16px; + border-radius: 18px; + background: #fff; + border: 1px solid #eee; +} +.paginator .space +{ + display: block; + padding: 8px 16px; + border-radius: 18px; + background: #fff; + border: none; +} +.paginator a +{ + margin: 4px; + color: var(--font-color-2); + transition: color ease-in-out .5s; +} +.paginator a:hover +{ + color: var(--font-color-0); + transition: color ease-in-out .5s; +} +.paginator .current +{ + color: var(--font-color-0); + border: 1px solid var(--font-color-0); +} + +.footer +{ + padding: 24px 0; + font-size: 0.875rem; + color: var(--font-color-3); + display: flex; + flex-direction: column; + flex-wrap: nowrap; + justify-content: flex-start; + align-content: center; +} +.footer span +{ + text-align: center; + margin-bottom: 8px; +} +.footer a +{ + color: var(--font-color-3); + transition: color ease-in-out .5s; +} +.footer a:hover +{ + color: var(--font-color-0); + transition: color ease-in-out .5s; +} + +.post-main +{ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-items: center; + margin-bottom: 24px; +} +.post-main-title +{ + flex: 0 0 100%; + margin-bottom: 12px; + font-size: 1.6rem; + font-weight: 600; + line-height: 1.5; + color: var(--font-color-1); +} +.post-meta +{ + font-size: 0.875rem; + color: var(--font-color-3); + flex: 0 0 100%; + margin-bottom: 32px; +} + +.archive +{ + display: flex; + flex-direction: column; + flex-wrap: wrap; + justify-content: space-between; + align-content: normal; +} +.archive li +{ + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: flex-start; + align-content: center; + padding: 12px 0; +} +.archive li:nth-child(odd) +{ + background: #fafafa; +} +.archive li:nth-child(even) +{ + background: #fff; +} +.archive li span +{ + width: 108px; + color: var(--font-color-2); +} +.archive-main +{ + flex: 0 1 calc( 100% - 108px ); +} +.archive-title +{ + color: var(--font-color-1); + /*transition: color ease-in-out .5s;*/ +} +.archive-title:hover +{ + color: var(--font-color-0); + transition: color ease-in-out .5s; +} |
