ezal-theme-example 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/assets/scripts/404.ts +353 -0
- package/assets/scripts/_article.ts +290 -0
- package/assets/scripts/_base.ts +65 -0
- package/assets/scripts/_pagefind.d.ts +424 -0
- package/assets/scripts/_search.ts +88 -0
- package/assets/scripts/_utils.ts +74 -0
- package/assets/scripts/archive.ts +143 -0
- package/assets/scripts/article.ts +18 -0
- package/assets/scripts/category.ts +4 -0
- package/assets/scripts/home.ts +73 -0
- package/assets/scripts/links.ts +14 -0
- package/assets/scripts/main.ts +11 -0
- package/assets/scripts/page.ts +11 -0
- package/assets/scripts/tag.ts +4 -0
- package/assets/scripts/tsconfig.json +10 -0
- package/assets/styles/404.styl +31 -0
- package/assets/styles/_article/fold.styl +15 -0
- package/assets/styles/_article/footnote.styl +12 -0
- package/assets/styles/_article/heading.styl +29 -0
- package/assets/styles/_article/image.styl +30 -0
- package/assets/styles/_article/kbd.styl +10 -0
- package/assets/styles/_article/links.styl +31 -0
- package/assets/styles/_article/list.styl +19 -0
- package/assets/styles/_article/note.styl +18 -0
- package/assets/styles/_article/other.styl +44 -0
- package/assets/styles/_article/table.styl +29 -0
- package/assets/styles/_article/tabs.styl +25 -0
- package/assets/styles/_code.styl +83 -0
- package/assets/styles/_index/contact.styl +20 -0
- package/assets/styles/_index/footer.styl +5 -0
- package/assets/styles/_index/header.styl +40 -0
- package/assets/styles/_index/nav.styl +59 -0
- package/assets/styles/_index/search.styl +64 -0
- package/assets/styles/_index.styl +91 -0
- package/assets/styles/_var.styl +96 -0
- package/assets/styles/archive.styl +35 -0
- package/assets/styles/article.styl +138 -0
- package/assets/styles/category.styl +4 -0
- package/assets/styles/home.styl +124 -0
- package/assets/styles/links.styl +121 -0
- package/assets/styles/page.styl +12 -0
- package/assets/styles/tag.styl +4 -0
- package/dist/config.d.ts +128 -0
- package/dist/feed.d.ts +4 -0
- package/dist/image/asset.d.ts +22 -0
- package/dist/image/db.d.ts +18 -0
- package/dist/image/index.d.ts +10 -0
- package/dist/image/metadata.d.ts +2 -0
- package/dist/image/utils.d.ts +1 -0
- package/dist/index-now.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2066 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +2 -0
- package/dist/markdown/codeblock/data.d.ts +1 -0
- package/dist/markdown/codeblock/index.d.ts +6 -0
- package/dist/markdown/codeblock/style.d.ts +2 -0
- package/dist/markdown/fold.d.ts +6 -0
- package/dist/markdown/footnote.d.ts +15 -0
- package/dist/markdown/image.d.ts +12 -0
- package/dist/markdown/index.d.ts +2 -0
- package/dist/markdown/kbd.d.ts +6 -0
- package/dist/markdown/link.d.ts +2 -0
- package/dist/markdown/links.d.ts +12 -0
- package/dist/markdown/note.d.ts +8 -0
- package/dist/markdown/table.d.ts +3 -0
- package/dist/markdown/tabs.d.ts +7 -0
- package/dist/markdown/tex.d.ts +9 -0
- package/dist/page/404.d.ts +1 -0
- package/dist/page/archive.d.ts +1 -0
- package/dist/page/category.d.ts +1 -0
- package/dist/page/home.d.ts +2 -0
- package/dist/page/tag.d.ts +1 -0
- package/dist/pagefind.d.ts +20 -0
- package/dist/sitemap.d.ts +2 -0
- package/dist/transform/script.d.ts +2 -0
- package/dist/transform/stylus.d.ts +2 -0
- package/dist/utils.d.ts +2 -0
- package/layouts/404.tsx +8 -0
- package/layouts/archive.tsx +81 -0
- package/layouts/article.tsx +145 -0
- package/layouts/base.tsx +20 -0
- package/layouts/category.tsx +18 -0
- package/layouts/components/ArchiveArticleList.tsx +14 -0
- package/layouts/components/Article.tsx +46 -0
- package/layouts/components/Contact.tsx +14 -0
- package/layouts/components/Footer.tsx +44 -0
- package/layouts/components/Head.tsx +119 -0
- package/layouts/components/Image.tsx +42 -0
- package/layouts/components/Nav.tsx +33 -0
- package/layouts/components/Search.tsx +20 -0
- package/layouts/components/Waline.tsx +22 -0
- package/layouts/context.d.ts +54 -0
- package/layouts/home.tsx +74 -0
- package/layouts/links.tsx +53 -0
- package/layouts/page.tsx +19 -0
- package/layouts/tag.tsx +18 -0
- package/layouts/tsconfig.json +11 -0
- package/package.json +47 -0
- package/readme.md +17 -0
- package/readme_zh.md +17 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import cloud from 'd3-cloud';
|
|
2
|
+
import {
|
|
3
|
+
type HierarchyNode,
|
|
4
|
+
hierarchy,
|
|
5
|
+
treemap,
|
|
6
|
+
treemapSquarify,
|
|
7
|
+
} from 'd3-hierarchy';
|
|
8
|
+
import { initBase } from './_base';
|
|
9
|
+
import { $, $$, debounce, doc, handle, shuffle } from './_utils';
|
|
10
|
+
|
|
11
|
+
interface Tag extends cloud.Word {
|
|
12
|
+
size: number;
|
|
13
|
+
text: string;
|
|
14
|
+
node: HTMLElement;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function initTags() {
|
|
18
|
+
const container = $<HTMLElement>('.tags')!;
|
|
19
|
+
const tags = [...$$<HTMLAnchorElement>('.tags a')];
|
|
20
|
+
let prevWidth = container.clientWidth;
|
|
21
|
+
let layout: ReturnType<typeof cloud<Tag>> | null = null;
|
|
22
|
+
|
|
23
|
+
const doLayout = () => {
|
|
24
|
+
if (layout) layout.stop();
|
|
25
|
+
const words = tags.map<Tag>((a) => ({
|
|
26
|
+
text: a.textContent,
|
|
27
|
+
size: Number(a.dataset.size),
|
|
28
|
+
node: a,
|
|
29
|
+
}));
|
|
30
|
+
const totalWeight =
|
|
31
|
+
words.reduce((prev, { size }) => prev + 1 + size * 0.1, 0) * 7000;
|
|
32
|
+
const width = container.clientWidth;
|
|
33
|
+
const height = Math.max(100, totalWeight / width);
|
|
34
|
+
const cx = width / 2;
|
|
35
|
+
const cy = height / 2;
|
|
36
|
+
layout = cloud<Tag>()
|
|
37
|
+
.size([width, height])
|
|
38
|
+
.words(words)
|
|
39
|
+
.padding(4)
|
|
40
|
+
.rotate(0)
|
|
41
|
+
.fontSize((d) => d.size ** 2 + 16)
|
|
42
|
+
.on('end', (words) => {
|
|
43
|
+
layout = null;
|
|
44
|
+
for (const { node, size, x, y } of words) {
|
|
45
|
+
node.style.left = `${x! + cx}px`;
|
|
46
|
+
node.style.top = `${y! + cy}px`;
|
|
47
|
+
node.style.fontSize = `${size}px`;
|
|
48
|
+
}
|
|
49
|
+
container.style.height = `${height}px`;
|
|
50
|
+
container.classList.add('ready');
|
|
51
|
+
});
|
|
52
|
+
layout.start();
|
|
53
|
+
};
|
|
54
|
+
doLayout();
|
|
55
|
+
const handleResize = debounce(doLayout, 50);
|
|
56
|
+
handle(window, 'resize', () => {
|
|
57
|
+
const width = container.clientWidth;
|
|
58
|
+
if (prevWidth === width) return;
|
|
59
|
+
prevWidth = width;
|
|
60
|
+
handleResize();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface CategoryNode {
|
|
65
|
+
size: number;
|
|
66
|
+
node?: HTMLElement;
|
|
67
|
+
children?: CategoryNode[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type CategoryResult = (HierarchyNode<CategoryNode> & {
|
|
71
|
+
x0: number;
|
|
72
|
+
y0: number;
|
|
73
|
+
x1: number;
|
|
74
|
+
y1: number;
|
|
75
|
+
})[];
|
|
76
|
+
|
|
77
|
+
function initCategories() {
|
|
78
|
+
const container = $<HTMLElement>('.categories')!;
|
|
79
|
+
let prevWidth = container.clientWidth;
|
|
80
|
+
const totalSize = $$('a', container).length;
|
|
81
|
+
|
|
82
|
+
const collect = (root: HTMLElement): CategoryNode[] =>
|
|
83
|
+
shuffle([...$$<HTMLElement>(':scope>li>a', root)].map(toData));
|
|
84
|
+
const toData = (node: HTMLElement): CategoryNode => {
|
|
85
|
+
let children: CategoryNode[] | undefined;
|
|
86
|
+
if (node.nextSibling) {
|
|
87
|
+
children = collect(node.nextSibling as HTMLElement);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
size: Number(node.dataset.size),
|
|
91
|
+
node,
|
|
92
|
+
children,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
const root = hierarchy<CategoryNode>({
|
|
96
|
+
children: collect(container),
|
|
97
|
+
size: 0,
|
|
98
|
+
}).sum((d) => d.size);
|
|
99
|
+
|
|
100
|
+
const doLayout = () => {
|
|
101
|
+
const width = container.clientWidth;
|
|
102
|
+
const height = Math.max(100, (totalSize * 30000) / (width / 2 + 400)) + 32;
|
|
103
|
+
const layout = treemap<CategoryNode>()
|
|
104
|
+
.tile(treemapSquarify)
|
|
105
|
+
.size([width, height])
|
|
106
|
+
.paddingInner(8)
|
|
107
|
+
.paddingOuter(8)
|
|
108
|
+
.paddingTop(32)
|
|
109
|
+
.round(true);
|
|
110
|
+
layout(root);
|
|
111
|
+
for (const {
|
|
112
|
+
data: { node },
|
|
113
|
+
x0,
|
|
114
|
+
x1,
|
|
115
|
+
y0,
|
|
116
|
+
y1,
|
|
117
|
+
} of root.descendants() as CategoryResult) {
|
|
118
|
+
if (!node) continue;
|
|
119
|
+
node.classList.add('link');
|
|
120
|
+
node.style.left = `${x0}px`;
|
|
121
|
+
node.style.top = `${y0 - 32}px`;
|
|
122
|
+
node.style.width = `${x1 - x0}px`;
|
|
123
|
+
node.style.height = `${y1 - y0}px`;
|
|
124
|
+
}
|
|
125
|
+
container.style.height = `${height - 32}px`;
|
|
126
|
+
container.classList.add('ready');
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
doLayout();
|
|
130
|
+
const handleResize = debounce(doLayout, 50);
|
|
131
|
+
handle(window, 'resize', () => {
|
|
132
|
+
const width = container.clientWidth;
|
|
133
|
+
if (prevWidth === width) return;
|
|
134
|
+
prevWidth = width;
|
|
135
|
+
handleResize();
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
handle(doc, 'DOMContentLoaded', () => {
|
|
140
|
+
initBase();
|
|
141
|
+
initTags();
|
|
142
|
+
initCategories();
|
|
143
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
initCodeblock,
|
|
3
|
+
initFootnote,
|
|
4
|
+
initImage,
|
|
5
|
+
initTabs,
|
|
6
|
+
initToc,
|
|
7
|
+
} from './_article';
|
|
8
|
+
import { initBase } from './_base';
|
|
9
|
+
import { doc, handle } from './_utils';
|
|
10
|
+
|
|
11
|
+
handle(doc, 'DOMContentLoaded', () => {
|
|
12
|
+
initBase();
|
|
13
|
+
initTabs();
|
|
14
|
+
initToc();
|
|
15
|
+
initCodeblock();
|
|
16
|
+
initFootnote();
|
|
17
|
+
initImage();
|
|
18
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { initBase } from './_base';
|
|
2
|
+
import { $, $$, doc, handle } from './_utils';
|
|
3
|
+
|
|
4
|
+
let dx = 0;
|
|
5
|
+
let dy = 0;
|
|
6
|
+
let tx = 0;
|
|
7
|
+
let ty = 0;
|
|
8
|
+
let logo: HTMLElement;
|
|
9
|
+
let prev = 0;
|
|
10
|
+
let tick = 0;
|
|
11
|
+
|
|
12
|
+
const nodes = () => $$('use', logo.parentNode!);
|
|
13
|
+
|
|
14
|
+
const USE = () => {
|
|
15
|
+
const node = doc.createElementNS('http://www.w3.org/2000/svg', 'use');
|
|
16
|
+
node.setAttribute('href', '#logo');
|
|
17
|
+
(node as any).c = tick;
|
|
18
|
+
return node;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function next() {
|
|
22
|
+
const node = USE();
|
|
23
|
+
logo.after(node);
|
|
24
|
+
const animation = node.animate(
|
|
25
|
+
[{}, { translate: '128px 128px', opacity: '0' }],
|
|
26
|
+
{ duration: 5000 },
|
|
27
|
+
);
|
|
28
|
+
(node as any).a = animation;
|
|
29
|
+
animation.play();
|
|
30
|
+
animation.onfinish = () => node.remove();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function animate() {
|
|
34
|
+
if (dx < tx) dx = Math.min(dx + 0.1, tx);
|
|
35
|
+
else if (dx > tx) dx = Math.max(dx - 0.1, tx);
|
|
36
|
+
if (dy < ty) dy = Math.min(dy + 0.1, ty);
|
|
37
|
+
else if (dy > ty) dy = Math.max(dy - 0.1, ty);
|
|
38
|
+
if (tick - prev > 100) {
|
|
39
|
+
next();
|
|
40
|
+
prev = tick;
|
|
41
|
+
}
|
|
42
|
+
for (const node of nodes()) {
|
|
43
|
+
const diff = tick - (node as any).c;
|
|
44
|
+
node.setAttribute('x', String((dx * diff) / 20));
|
|
45
|
+
node.setAttribute('y', String((dy * diff) / 20));
|
|
46
|
+
}
|
|
47
|
+
tick++;
|
|
48
|
+
requestAnimationFrame(animate);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
handle(doc, 'DOMContentLoaded', () => {
|
|
52
|
+
initBase();
|
|
53
|
+
|
|
54
|
+
logo = $('#logo')!;
|
|
55
|
+
if (!logo) return;
|
|
56
|
+
handle(window, 'blur', () => {
|
|
57
|
+
for (const node of nodes()) {
|
|
58
|
+
(node as any).a.pause();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
handle(window, 'focus', () => {
|
|
62
|
+
for (const node of nodes()) {
|
|
63
|
+
(node as any).a.play();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
handle(doc, 'mousemove', ({ x, y }: MouseEvent) => {
|
|
67
|
+
const rw = innerWidth / 2;
|
|
68
|
+
const rh = innerHeight / 2;
|
|
69
|
+
tx = (rw - x) / rw;
|
|
70
|
+
ty = (rh - y) / rh;
|
|
71
|
+
});
|
|
72
|
+
requestAnimationFrame(animate);
|
|
73
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { initCodeblock, initFootnote, initImage, initTabs } from './_article';
|
|
2
|
+
import { initBase } from './_base';
|
|
3
|
+
import { $$, doc, handle, shuffle } from './_utils';
|
|
4
|
+
|
|
5
|
+
handle(doc, 'DOMContentLoaded', () => {
|
|
6
|
+
initBase();
|
|
7
|
+
initTabs();
|
|
8
|
+
initCodeblock();
|
|
9
|
+
initFootnote();
|
|
10
|
+
initImage();
|
|
11
|
+
for (const element of $$<HTMLElement>('article .links')) {
|
|
12
|
+
element.replaceChildren(...shuffle([...element.children]));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { initCodeblock, initFootnote, initImage, initTabs } from './_article';
|
|
2
|
+
import { initBase } from './_base';
|
|
3
|
+
import { doc, handle } from './_utils';
|
|
4
|
+
|
|
5
|
+
handle(doc, 'DOMContentLoaded', () => {
|
|
6
|
+
initBase();
|
|
7
|
+
initTabs();
|
|
8
|
+
initCodeblock();
|
|
9
|
+
initFootnote();
|
|
10
|
+
initImage();
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { initCodeblock, initFootnote, initImage, initTabs } from './_article';
|
|
2
|
+
import { initBase } from './_base';
|
|
3
|
+
import { doc, handle } from './_utils';
|
|
4
|
+
|
|
5
|
+
handle(doc, 'DOMContentLoaded', () => {
|
|
6
|
+
initBase();
|
|
7
|
+
initTabs();
|
|
8
|
+
initCodeblock();
|
|
9
|
+
initFootnote();
|
|
10
|
+
initImage();
|
|
11
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import '_index'
|
|
2
|
+
|
|
3
|
+
body
|
|
4
|
+
display flex
|
|
5
|
+
flex-direction column
|
|
6
|
+
min-height 100vh
|
|
7
|
+
min-height 100svh
|
|
8
|
+
background:
|
|
9
|
+
linear-gradient(var(--color) 2%, #0000 0%) 0 16px / 1px 32px,
|
|
10
|
+
linear-gradient(to right, var(--color) 2%, #0000 0%) 16px / 32px,
|
|
11
|
+
var(--bg)
|
|
12
|
+
animation grid 10s infinite linear
|
|
13
|
+
--color s('color-mix(in srgb, var(--text), var(--bg) 90%)')
|
|
14
|
+
|
|
15
|
+
main
|
|
16
|
+
display flex
|
|
17
|
+
flex 1
|
|
18
|
+
flex-direction column
|
|
19
|
+
justify-content center
|
|
20
|
+
align-items center
|
|
21
|
+
text-align center
|
|
22
|
+
text-wrap balance
|
|
23
|
+
|
|
24
|
+
canvas
|
|
25
|
+
max-width 100%
|
|
26
|
+
width 400px
|
|
27
|
+
filter invert(1)
|
|
28
|
+
|
|
29
|
+
@media (prefers-color-scheme dark)
|
|
30
|
+
canvas
|
|
31
|
+
filter invert(0)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
details
|
|
2
|
+
margin 16px 0
|
|
3
|
+
border 1px solid var(--border)
|
|
4
|
+
background var(--panel)
|
|
5
|
+
&>*
|
|
6
|
+
padding 1px 16px
|
|
7
|
+
|
|
8
|
+
summary
|
|
9
|
+
padding 8px
|
|
10
|
+
padding-left 12px
|
|
11
|
+
transition .1s
|
|
12
|
+
&:hover
|
|
13
|
+
background var(--text-a2)
|
|
14
|
+
&:active
|
|
15
|
+
background var(--text-a1)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
h2
|
|
2
|
+
h3
|
|
3
|
+
h4
|
|
4
|
+
h5
|
|
5
|
+
h6
|
|
6
|
+
margin 16px 0
|
|
7
|
+
--h '# '
|
|
8
|
+
&:before
|
|
9
|
+
content var(--h)
|
|
10
|
+
opacity .3
|
|
11
|
+
|
|
12
|
+
h2
|
|
13
|
+
font-size 38px
|
|
14
|
+
|
|
15
|
+
h3
|
|
16
|
+
font-size 32px
|
|
17
|
+
--h '#² '
|
|
18
|
+
|
|
19
|
+
h4
|
|
20
|
+
font-size 28px
|
|
21
|
+
--h '#³ '
|
|
22
|
+
|
|
23
|
+
h5
|
|
24
|
+
font-size 24px
|
|
25
|
+
--h '#⁴ '
|
|
26
|
+
|
|
27
|
+
h6
|
|
28
|
+
font-size 20px
|
|
29
|
+
--h '#⁵ '
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
p img
|
|
2
|
+
max-width 100%
|
|
3
|
+
max-height 80vh
|
|
4
|
+
width auto
|
|
5
|
+
height auto
|
|
6
|
+
vertical-align middle
|
|
7
|
+
transition .1s background
|
|
8
|
+
object-fit contain
|
|
9
|
+
&:not(.loaded)
|
|
10
|
+
background var(--img-color)
|
|
11
|
+
|
|
12
|
+
.image
|
|
13
|
+
text-align center
|
|
14
|
+
figcaption
|
|
15
|
+
opacity .8
|
|
16
|
+
img
|
|
17
|
+
@extend p img
|
|
18
|
+
|
|
19
|
+
html:has(.img-scale)
|
|
20
|
+
overflow hidden
|
|
21
|
+
|
|
22
|
+
.img-scale
|
|
23
|
+
position fixed
|
|
24
|
+
z-index 200
|
|
25
|
+
margin auto
|
|
26
|
+
background #0008
|
|
27
|
+
inset 0
|
|
28
|
+
img
|
|
29
|
+
position absolute
|
|
30
|
+
height auto
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.links
|
|
2
|
+
display flex
|
|
3
|
+
flex-wrap wrap
|
|
4
|
+
justify-content center
|
|
5
|
+
margin 16px 0
|
|
6
|
+
gap 8px
|
|
7
|
+
a
|
|
8
|
+
position relative
|
|
9
|
+
flex 1 1 auto
|
|
10
|
+
padding 16px
|
|
11
|
+
max-width 340px
|
|
12
|
+
width 100%
|
|
13
|
+
border 1px solid var(--border)
|
|
14
|
+
background var(--panel)
|
|
15
|
+
color var(--text)
|
|
16
|
+
text-decoration none
|
|
17
|
+
transition .1s
|
|
18
|
+
&:hover
|
|
19
|
+
border-color var(--theme)
|
|
20
|
+
i
|
|
21
|
+
position absolute
|
|
22
|
+
top 16px
|
|
23
|
+
right 16px
|
|
24
|
+
img
|
|
25
|
+
margin-bottom 16px
|
|
26
|
+
width 48px
|
|
27
|
+
height 48px
|
|
28
|
+
object-fit cover
|
|
29
|
+
|
|
30
|
+
.link-title
|
|
31
|
+
font-weight bold
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
ol
|
|
2
|
+
ul
|
|
3
|
+
padding-left 24px
|
|
4
|
+
|
|
5
|
+
li:has(>input[type='checkbox'])
|
|
6
|
+
list-style none
|
|
7
|
+
|
|
8
|
+
li>input[type='checkbox']
|
|
9
|
+
margin 0 4px -2px -22px
|
|
10
|
+
appearance none
|
|
11
|
+
&:before
|
|
12
|
+
display block
|
|
13
|
+
width 16px
|
|
14
|
+
height 16px
|
|
15
|
+
border 1px solid
|
|
16
|
+
border-radius 4px
|
|
17
|
+
content ''
|
|
18
|
+
&:checked:before
|
|
19
|
+
background var(--theme)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.note
|
|
2
|
+
@extend blockquote
|
|
3
|
+
border-color var(--note)
|
|
4
|
+
&>:first-child
|
|
5
|
+
color var(--note)
|
|
6
|
+
font-weight bold
|
|
7
|
+
i
|
|
8
|
+
margin-right 4px
|
|
9
|
+
font-weight normal
|
|
10
|
+
|
|
11
|
+
.note-tip
|
|
12
|
+
--note var(--note-tip)
|
|
13
|
+
|
|
14
|
+
.note-warn
|
|
15
|
+
--note var(--note-warn)
|
|
16
|
+
|
|
17
|
+
.note-danger
|
|
18
|
+
--note var(--note-danger)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.sticky
|
|
2
|
+
position sticky
|
|
3
|
+
top var(--sticky)
|
|
4
|
+
z-index 4
|
|
5
|
+
background var(--panel)
|
|
6
|
+
backdrop-filter blur(4px)
|
|
7
|
+
--sticky 0px
|
|
8
|
+
|
|
9
|
+
.sticky-content
|
|
10
|
+
.sticky
|
|
11
|
+
z-index 3
|
|
12
|
+
--sticky 40px
|
|
13
|
+
.sticky-content
|
|
14
|
+
.sticky
|
|
15
|
+
z-index 2
|
|
16
|
+
--sticky 80px
|
|
17
|
+
.sticky-content
|
|
18
|
+
.sticky
|
|
19
|
+
z-index 1
|
|
20
|
+
--sticky 80px
|
|
21
|
+
.sticky-content
|
|
22
|
+
.sticky
|
|
23
|
+
z-index 0
|
|
24
|
+
--sticky 80px
|
|
25
|
+
|
|
26
|
+
hr
|
|
27
|
+
opacity .3
|
|
28
|
+
|
|
29
|
+
blockquote
|
|
30
|
+
margin 16px 0
|
|
31
|
+
padding 1px 16px
|
|
32
|
+
border-left 4px solid var(--text)
|
|
33
|
+
border-radius 8px
|
|
34
|
+
background var(--panel)
|
|
35
|
+
|
|
36
|
+
:not(pre):not(figcaption)>code
|
|
37
|
+
padding 0 .5ex
|
|
38
|
+
border-radius 8px
|
|
39
|
+
background var(--code-bg)
|
|
40
|
+
color var(--code)
|
|
41
|
+
word-break break-word
|
|
42
|
+
|
|
43
|
+
figure
|
|
44
|
+
margin 16px 0
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.table
|
|
2
|
+
overflow auto
|
|
3
|
+
margin 16px 0
|
|
4
|
+
max-width 100%
|
|
5
|
+
max-height 80vh
|
|
6
|
+
width max-content
|
|
7
|
+
border 1px solid var(--border)
|
|
8
|
+
|
|
9
|
+
table
|
|
10
|
+
border-collapse collapse
|
|
11
|
+
table-layout fixed
|
|
12
|
+
|
|
13
|
+
thead
|
|
14
|
+
position sticky
|
|
15
|
+
top 0
|
|
16
|
+
background var(--text-a2)
|
|
17
|
+
backdrop-filter blur(8px)
|
|
18
|
+
|
|
19
|
+
tr:nth-child(even)
|
|
20
|
+
background var(--text-a1)
|
|
21
|
+
|
|
22
|
+
th
|
|
23
|
+
td
|
|
24
|
+
padding 4px 8px
|
|
25
|
+
border 1px solid var(--border)
|
|
26
|
+
word-break break-word
|
|
27
|
+
|
|
28
|
+
th
|
|
29
|
+
white-space nowrap
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.tabs
|
|
2
|
+
margin 16px 0
|
|
3
|
+
border 1px solid var(--border)
|
|
4
|
+
background var(--panel)
|
|
5
|
+
|
|
6
|
+
.tab-nav
|
|
7
|
+
label
|
|
8
|
+
position relative
|
|
9
|
+
display inline-block
|
|
10
|
+
padding 8px 16px
|
|
11
|
+
transition .1s opacity, .1s background
|
|
12
|
+
&:not(:hover):not(:has(:checked))
|
|
13
|
+
opacity .7
|
|
14
|
+
&:has(:focus-visible)
|
|
15
|
+
outline 2px solid
|
|
16
|
+
&:has(:checked)
|
|
17
|
+
background var(--theme-a4)
|
|
18
|
+
input
|
|
19
|
+
position absolute
|
|
20
|
+
opacity 0
|
|
21
|
+
|
|
22
|
+
.tab-content
|
|
23
|
+
padding 0 16px
|
|
24
|
+
&>:not(.active)
|
|
25
|
+
display none
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.code
|
|
2
|
+
border 1px solid var(--text-a2)
|
|
3
|
+
color var(--text)
|
|
4
|
+
figcaption
|
|
5
|
+
overflow hidden
|
|
6
|
+
padding 8px
|
|
7
|
+
code
|
|
8
|
+
padding 0 8px
|
|
9
|
+
opacity .8
|
|
10
|
+
button
|
|
11
|
+
display block
|
|
12
|
+
float right
|
|
13
|
+
padding 0
|
|
14
|
+
width 24px
|
|
15
|
+
height 24px
|
|
16
|
+
border 0
|
|
17
|
+
background #0000
|
|
18
|
+
font-size 16px
|
|
19
|
+
pre
|
|
20
|
+
overflow auto
|
|
21
|
+
margin 0
|
|
22
|
+
padding 16px 0
|
|
23
|
+
tab-size 2
|
|
24
|
+
hyphens none
|
|
25
|
+
|
|
26
|
+
.line
|
|
27
|
+
display inline-block
|
|
28
|
+
padding 0 16px
|
|
29
|
+
width 100%
|
|
30
|
+
|
|
31
|
+
.diff
|
|
32
|
+
position relative
|
|
33
|
+
padding-left 0
|
|
34
|
+
&:before
|
|
35
|
+
padding 0 3px
|
|
36
|
+
color var(--diff)
|
|
37
|
+
&:after
|
|
38
|
+
position absolute
|
|
39
|
+
z-index -1
|
|
40
|
+
display block
|
|
41
|
+
width s('min(100%, 512px)')
|
|
42
|
+
height 100%
|
|
43
|
+
background linear-gradient(90deg, var(--diff), #0000)
|
|
44
|
+
content ''
|
|
45
|
+
opacity .2
|
|
46
|
+
inset 0
|
|
47
|
+
|
|
48
|
+
.diff.remove
|
|
49
|
+
--diff var(--note-danger)
|
|
50
|
+
&:before
|
|
51
|
+
content '-'
|
|
52
|
+
|
|
53
|
+
.diff.add
|
|
54
|
+
--diff var(--note-tip)
|
|
55
|
+
&:before
|
|
56
|
+
content '+'
|
|
57
|
+
|
|
58
|
+
.highlighted
|
|
59
|
+
background var(--text-a2)
|
|
60
|
+
|
|
61
|
+
.has-focused
|
|
62
|
+
.line:not(.focused)
|
|
63
|
+
filter blur(4px)
|
|
64
|
+
transition .1s filter
|
|
65
|
+
&:hover
|
|
66
|
+
&:focus-visible
|
|
67
|
+
.line
|
|
68
|
+
filter blur(0px)
|
|
69
|
+
|
|
70
|
+
.line.warning
|
|
71
|
+
background #ff02
|
|
72
|
+
|
|
73
|
+
.line.error
|
|
74
|
+
background #f002
|
|
75
|
+
|
|
76
|
+
@media (prefers-color-scheme dark)
|
|
77
|
+
.code span
|
|
78
|
+
color var(--shiki-dark)
|
|
79
|
+
text-decoration var(--shiki-dark-text-decoration)
|
|
80
|
+
font-weight var(--shiki-dark-font-weight)
|
|
81
|
+
font-style var(--shiki-dark-font-style)
|
|
82
|
+
.code
|
|
83
|
+
background var(--shiki-dark-bg)
|