i know it is a lot
This commit is contained in:
parent
59ee3f114a
commit
f1b32bd47e
29 changed files with 415 additions and 570 deletions
84
assets/css/atom.scss
Normal file
84
assets/css/atom.scss
Normal file
|
@ -0,0 +1,84 @@
|
|||
/* layout */
|
||||
.container {
|
||||
max-width: var(--max-w);
|
||||
}
|
||||
|
||||
.overflow-x-auto {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.overflow-y-hidden {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
/* flex & grid */
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.flex-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.items-start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.items-baseline {
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
/* spacing */
|
||||
$u: 0.25;
|
||||
@each $i, $class in (p, padding), (m, margin) {
|
||||
@each $j, $size in (t, top), (r, right), (b, bottom), (l, left) {
|
||||
@each $k in 0,1,2,3,4,5,6,7,8 {
|
||||
.#{$i}#{$j}-#{$k} {
|
||||
#{$class}-#{$size}: #{$u * $k}rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
/* typography */
|
||||
$weights: (thin, 100), (extralight, 200), (light, 300), (normal, 400),
|
||||
(medium, 500), (semibold, 600), (bold, 700), (extrabold, 800);
|
||||
@each $k, $v in $weights {
|
||||
.font-#{$k} {
|
||||
font-weight: #{$v};
|
||||
}
|
||||
}
|
||||
|
||||
$texts: (xs, 0.75), (sm, 0.875), (base, 1), (lg, 1.125), (xl, 1.25),
|
||||
(2xl, 1.5), (3xl, 1.875), (4xl, 2.25), (5xl, 3), (6xl, 3.75);
|
||||
@each $k, $s in $texts {
|
||||
.text-#{$k} {
|
||||
font-size: #{$s}rem;
|
||||
}
|
||||
}
|
||||
|
||||
.whitespace-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* interactivity */
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
58
assets/css/main.scss
Normal file
58
assets/css/main.scss
Normal file
|
@ -0,0 +1,58 @@
|
|||
@import "./pre.scss";
|
||||
@import "./theme.scss";
|
||||
@import "./atom.scss";
|
||||
@import "./md.scss";
|
||||
@import "./syntax.scss";
|
||||
|
||||
:root {
|
||||
--max-w: 640px;
|
||||
--nav-s: 1.5rem;
|
||||
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
|
||||
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 480px) {
|
||||
:root {
|
||||
--nav-s: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar;
|
||||
box-sizing: border-box;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0 16px;
|
||||
font-family: var(--font);
|
||||
font-weight: 400;
|
||||
background-color: var(--back);
|
||||
color: var(--text);
|
||||
transition-property: background-color, border-color, color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
|
||||
main {
|
||||
animation: showup 0.7s;
|
||||
}
|
||||
|
||||
main p a {
|
||||
color: var(--prime);
|
||||
}
|
||||
|
||||
@keyframes showup {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
}
|
101
assets/css/md.scss
Normal file
101
assets/css/md.scss
Normal file
|
@ -0,0 +1,101 @@
|
|||
$heading: (h1, 2.25, 800), (h2, 2, 700), (h3, 1.75, 600), (h4, 1.5, 600),
|
||||
(h5, 1.25, 500), (h6, 1, 400);
|
||||
@each $tag, $size, $weight in $heading {
|
||||
.md #{$tag} {
|
||||
font-size: #{$size}rem;
|
||||
font-weight: $weight;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: .75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.md pre {
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.md blockquote {
|
||||
background-color: #94949514;
|
||||
padding: 1px .85em;
|
||||
border-left: 4px solid var(--prime);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.md table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
margin: 1em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.md table thead {
|
||||
border-top: 2px solid var(--text);
|
||||
border-bottom: 1px solid var(--text);
|
||||
}
|
||||
|
||||
.md table tbody {
|
||||
border-bottom: 2px solid var(--text);
|
||||
}
|
||||
|
||||
.md table th,
|
||||
.md table td {
|
||||
padding: .25rem 1rem;
|
||||
}
|
||||
|
||||
.md img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.md .katex {
|
||||
overflow: auto hidden;
|
||||
}
|
||||
|
||||
.md ul {
|
||||
list-style: disc;
|
||||
padding-inline-start: 22px;
|
||||
}
|
||||
|
||||
.md ul input[type="checkbox"] {
|
||||
margin: 0;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.md .ul-checkbox {
|
||||
list-style: none;
|
||||
padding-inline-start: 2px;
|
||||
}
|
||||
|
||||
.md li {
|
||||
margin-bottom: .5rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.md ol,
|
||||
.md ul,
|
||||
.md img,
|
||||
.md blockquote,
|
||||
.md .highlight {
|
||||
margin: .75rem 0;
|
||||
}
|
||||
|
||||
.md blockquote p {
|
||||
margin: .45rem 0;
|
||||
line-height: 1.5;
|
||||
font-size: .95rem;
|
||||
}
|
||||
|
||||
.md hr {
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.md .footnotes {
|
||||
word-break: break-all;
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
.md p sup {
|
||||
margin-left: 4px;
|
||||
}
|
134
assets/css/pre.scss
Normal file
134
assets/css/pre.scss
Normal file
|
@ -0,0 +1,134 @@
|
|||
/* This file is taken from https://github.com/tailwindlabs/tailwindcss/blob/master/src/css/preflight.css */
|
||||
|
||||
/*
|
||||
1. Use a consistent sensible line-height in all browsers.
|
||||
2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
3. Use a more readable tab size.
|
||||
4. Use the user's configured `sans` font-family by default.
|
||||
5. Use the user's configured `sans` font-feature-settings by default.
|
||||
*/
|
||||
html {
|
||||
--default-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
|
||||
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
line-height: 1.5;
|
||||
font-family: var(--font, --default-font);
|
||||
font-feature-settings: normal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
1. Remove the margin in all browsers.
|
||||
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Add the correct height in Firefox.
|
||||
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
||||
3. Ensure horizontal rules are visible by default.
|
||||
*/
|
||||
hr {
|
||||
height: 0; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
border-top-width: 1px; /* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the default font size and weight for headings.
|
||||
*/
|
||||
p,
|
||||
pre,
|
||||
figure,
|
||||
dl,
|
||||
dd,
|
||||
blockquote,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 0;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.tag,
|
||||
p code {
|
||||
font-size: .8em;
|
||||
padding: 0.1em 0.3em;
|
||||
border-radius: 1px;
|
||||
background-color: #9999993b;
|
||||
}
|
||||
|
||||
|
||||
ol,
|
||||
ul,
|
||||
menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Reset links to optimize for opt-in styling instead of opt-out.
|
||||
*/
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--prime, inherit);
|
||||
}
|
||||
|
||||
/*
|
||||
1. Use the user's configured `mono` font family by default.
|
||||
2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp,
|
||||
pre {
|
||||
--default-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-family: var(--font-mono, --default-font-mono);
|
||||
}
|
||||
|
||||
/*
|
||||
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
||||
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
||||
3. Remove gaps between table borders by default.
|
||||
*/
|
||||
table {
|
||||
text-indent: 0; /* 1 */
|
||||
border-color: inherit; /* 2 */
|
||||
border-collapse: collapse; /* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the inheritance of text transform in Edge and Firefox.
|
||||
*/
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(128, 128, 128, 0.7);
|
||||
}
|
||||
::-webkit-scrollbar-thumb:window-inactive {
|
||||
background: rgba(128, 128, 128, 0.2);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:active {
|
||||
background-color: rgb(128, 128, 128);
|
||||
}
|
142
assets/css/syntax.scss
Normal file
142
assets/css/syntax.scss
Normal file
|
@ -0,0 +1,142 @@
|
|||
.chroma code {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.chroma {
|
||||
background-color: #292929;
|
||||
margin: .5em 0;
|
||||
}
|
||||
|
||||
/* LineTableTD */
|
||||
.chroma .lntd {
|
||||
vertical-align: top;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.chroma .lntable tbody {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.chroma .lntable td:nth-child(2) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chroma .lnt,
|
||||
.chroma .line {
|
||||
display: block;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* LineNumbersTable */
|
||||
.chroma .lnt {
|
||||
color: #999;
|
||||
padding-left: .9em;
|
||||
padding-right: 1em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.chroma .hl .lnt {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Keyword */
|
||||
.chroma .kc,
|
||||
.chroma .kd,
|
||||
.chroma .kn,
|
||||
.chroma .kp,
|
||||
.chroma .kr,
|
||||
// .chroma .kt,
|
||||
.chroma .k,
|
||||
.chroma .si {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.chroma .na {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
// .chroma .n,
|
||||
.chroma .nb,
|
||||
.chroma .bp,
|
||||
// .chroma .nc,
|
||||
.chroma .no,
|
||||
.chroma .nd,
|
||||
.chroma .ni,
|
||||
.chroma .ne,
|
||||
// .chroma .nf,
|
||||
.chroma .fm,
|
||||
.chroma .nl,
|
||||
.chroma .nn {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
/* NameProperty */
|
||||
.chroma .py,
|
||||
.chroma .nt,
|
||||
.chroma .nv,
|
||||
.chroma .vc,
|
||||
.chroma .vg,
|
||||
.chroma .vi,
|
||||
.chroma .vm {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
/* LiteralString */
|
||||
.chroma .s,
|
||||
.chroma .sa,
|
||||
.chroma .sb,
|
||||
.chroma .sc,
|
||||
.chroma .dl,
|
||||
.chroma .sd,
|
||||
.chroma .s2,
|
||||
.chroma .se,
|
||||
.chroma .sh,
|
||||
.chroma .sx,
|
||||
.chroma .sr,
|
||||
.chroma .s1,
|
||||
.chroma .ss,
|
||||
.chroma .cpf {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
/* LiteralNumber */
|
||||
.chroma .m,
|
||||
.chroma .mb,
|
||||
.chroma .mf,
|
||||
.chroma .mh,
|
||||
.chroma .mi,
|
||||
.chroma .il,
|
||||
.chroma .mo {
|
||||
color: #b5cea8;
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
.chroma .c,
|
||||
.chroma .ch,
|
||||
.chroma .cm,
|
||||
.chroma .c1,
|
||||
.chroma .cs {
|
||||
color: #517043;
|
||||
}
|
||||
|
||||
.chroma .nb,
|
||||
.chroma .kt {
|
||||
color: #4ec9b0;
|
||||
}
|
||||
|
||||
.chroma .fm,
|
||||
.chroma .nf {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
|
||||
.chroma .cp {
|
||||
color: #c586c0;
|
||||
}
|
||||
|
||||
.chroma .hl {
|
||||
display: block;
|
||||
background-color: #585858;
|
||||
}
|
13
assets/css/theme.scss
Normal file
13
assets/css/theme.scss
Normal file
|
@ -0,0 +1,13 @@
|
|||
.light {
|
||||
--prime: #1691b6;
|
||||
--grid: #e1e1e1;
|
||||
--back: #fff;
|
||||
--text: #222;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--prime: #1691b6;
|
||||
--back: #181818;
|
||||
--text: silver;
|
||||
--grid: #555;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue