slidev-theme-practicum 0.1.0
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/README.md +270 -0
- package/components/DebugGrid.vue +50 -0
- package/components/DecorLibrary.vue +1117 -0
- package/components/Header.vue +124 -0
- package/components/Image.vue +82 -0
- package/components/ImageRenderer.vue +126 -0
- package/components/Logo.vue +142 -0
- package/components/Person.vue +89 -0
- package/components/Slide.vue +324 -0
- package/components/Slot.vue +419 -0
- package/components/Text.vue +216 -0
- package/components/Timeline.vue +202 -0
- package/composables/decor-catalog.mjs +339 -0
- package/composables/decor-config.mjs +488 -0
- package/composables/decor-file-store.ts +192 -0
- package/composables/decor-http-store.ts +25 -0
- package/composables/decor-store.ts +39 -0
- package/composables/decor-tuning-overrides.mjs +2 -0
- package/composables/decor-workbench.ts +799 -0
- package/composables/grid-placement.ts +396 -0
- package/composables/image-config.mjs +484 -0
- package/composables/layout-authoring.ts +372 -0
- package/composables/layout-markdown.mjs +56 -0
- package/composables/layout-recipes.ts +347 -0
- package/composables/layout-registry.ts +47 -0
- package/composables/layout-shorthands.ts +891 -0
- package/composables/layout-vnode.ts +43 -0
- package/composables/logo-mark.mjs +5 -0
- package/composables/slide-layout.ts +43 -0
- package/composables/slot-placement.ts +195 -0
- package/composables/slot-rules.ts +147 -0
- package/composables/text-fit-runtime.ts +577 -0
- package/composables/text-priority-fit.mjs +166 -0
- package/composables/text-typography.mjs +138 -0
- package/composables/theme-foundation.ts +192 -0
- package/composables/theme-media.mjs +202 -0
- package/composables/use-theme-config.ts +71 -0
- package/decor-library.md +10 -0
- package/env.d.ts +6 -0
- package/example.md +786 -0
- package/layouts/collection.vue +5 -0
- package/layouts/cover.vue +5 -0
- package/layouts/default.vue +5 -0
- package/layouts/explainer.vue +5 -0
- package/layouts/message.vue +5 -0
- package/layouts/none.vue +5 -0
- package/layouts/section.vue +5 -0
- package/layouts/two-cols.vue +11 -0
- package/package.json +84 -0
- package/public/decor/decor-1.svg +83 -0
- package/public/decor/decor-10.svg +40 -0
- package/public/decor/decor-11.svg +162 -0
- package/public/decor/decor-12.svg +83 -0
- package/public/decor/decor-13.svg +5 -0
- package/public/decor/decor-14.svg +7 -0
- package/public/decor/decor-15.svg +10 -0
- package/public/decor/decor-16.svg +9 -0
- package/public/decor/decor-17.png +0 -0
- package/public/decor/decor-18.png +0 -0
- package/public/decor/decor-19.svg +5 -0
- package/public/decor/decor-2.png +0 -0
- package/public/decor/decor-3.svg +9 -0
- package/public/decor/decor-4.svg +31 -0
- package/public/decor/decor-5.png +0 -0
- package/public/decor/decor-6.png +0 -0
- package/public/decor/decor-7.png +0 -0
- package/public/decor/decor-8.svg +21 -0
- package/public/decor/decor-9.svg +38 -0
- package/public/favicon.svg +11 -0
- package/public/photos/photo-1.png +0 -0
- package/public/photos/photo-10.png +0 -0
- package/public/photos/photo-2.png +0 -0
- package/public/photos/photo-3.png +0 -0
- package/public/photos/photo-4.png +0 -0
- package/public/photos/photo-5.png +0 -0
- package/public/photos/photo-6.png +0 -0
- package/public/photos/photo-7.png +0 -0
- package/public/photos/photo-8.png +0 -0
- package/public/photos/photo-9.png +0 -0
- package/setup/main.ts +3 -0
- package/setup/shiki.ts +10 -0
- package/setup/vite-plugins.ts +106 -0
- package/slidev-theme-practicum.png +0 -0
- package/slidev-theme-practicum.svg +102 -0
- package/styles/example.css +0 -0
- package/styles/index.css +192 -0
- package/styles/vars.css +119 -0
- package/types/slidev-client.d.ts +15 -0
package/styles/index.css
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
@import './vars.css';
|
|
2
|
+
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: 'YS Text';
|
|
5
|
+
src: url('https://yastatic.net/s3/home/fonts/ys/4/text-regular.woff2') format('woff2'),
|
|
6
|
+
url('https://yastatic.net/s3/home/fonts/ys/4/text-regular.woff') format('woff');
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-display: swap;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'YS Text';
|
|
14
|
+
src: url('https://yastatic.net/s3/home/fonts/ys/4/text-regular-italic.woff2') format('woff2'),
|
|
15
|
+
url('https://yastatic.net/s3/home/fonts/ys/4/text-regular-italic.woff') format('woff');
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-style: italic;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
html,
|
|
22
|
+
body,
|
|
23
|
+
#slide-content,
|
|
24
|
+
#app {
|
|
25
|
+
background: var(--theme-bg);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.slidev-layout {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
width: var(--theme-canvas-width);
|
|
31
|
+
height: var(--theme-canvas-height);
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
background: var(--theme-bg);
|
|
34
|
+
color: var(--theme-text);
|
|
35
|
+
font-family: var(--theme-font-sans);
|
|
36
|
+
font-size: var(--theme-text-size-2);
|
|
37
|
+
line-height: var(--theme-text-line-2);
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
font-feature-settings: 'kern' 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.slidev-layout *,
|
|
43
|
+
.slidev-layout *::before,
|
|
44
|
+
.slidev-layout *::after {
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.slidev-layout :where(h1, h2, h3, h4, p, ul, ol, blockquote, pre, table, figure) {
|
|
49
|
+
margin: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.slidev-layout :where(h1, h2, h3, h4) {
|
|
53
|
+
color: inherit;
|
|
54
|
+
font-family: inherit;
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.slidev-layout h1 {
|
|
59
|
+
font-size: var(--theme-text-size-7);
|
|
60
|
+
line-height: var(--theme-text-line-7);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.slidev-layout h2 {
|
|
64
|
+
font-size: var(--theme-text-size-6);
|
|
65
|
+
line-height: var(--theme-text-line-6);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.slidev-layout h3 {
|
|
69
|
+
font-size: var(--theme-text-size-5);
|
|
70
|
+
line-height: var(--theme-text-line-5);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.slidev-layout h4 {
|
|
74
|
+
font-size: var(--theme-text-size-3);
|
|
75
|
+
line-height: var(--theme-text-line-3);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.slidev-layout :where(p, li, td, th) {
|
|
79
|
+
color: inherit;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.slidev-layout :where(p, li) + :where(p, ul, ol) {
|
|
83
|
+
margin-top: var(--theme-space-flow);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.slidev-layout small,
|
|
87
|
+
.slidev-layout .meta,
|
|
88
|
+
.slidev-layout .caption {
|
|
89
|
+
color: var(--theme-text-muted);
|
|
90
|
+
font-size: var(--theme-text-size-0);
|
|
91
|
+
line-height: var(--theme-text-line-0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.slidev-layout ul,
|
|
95
|
+
.slidev-layout ol {
|
|
96
|
+
padding-left: calc(var(--theme-grid-module) * 4);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.slidev-layout li {
|
|
100
|
+
margin-bottom: var(--theme-space-flow);
|
|
101
|
+
font-size: var(--theme-text-size-3);
|
|
102
|
+
line-height: var(--theme-text-line-3);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.slidev-layout li::marker {
|
|
106
|
+
color: var(--theme-text-muted);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.slidev-layout blockquote {
|
|
110
|
+
font-size: var(--theme-text-size-6);
|
|
111
|
+
line-height: var(--theme-text-line-6);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.slidev-layout blockquote p {
|
|
115
|
+
font-size: inherit;
|
|
116
|
+
line-height: inherit;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.slidev-layout a {
|
|
120
|
+
color: var(--theme-link);
|
|
121
|
+
text-decoration-thickness: from-font;
|
|
122
|
+
text-underline-offset: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.slidev-layout strong,
|
|
126
|
+
.slidev-layout b {
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.slidev-layout em,
|
|
131
|
+
.slidev-layout i {
|
|
132
|
+
font-style: italic;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.slidev-layout code,
|
|
136
|
+
.slidev-layout pre {
|
|
137
|
+
font-family: var(--theme-font-mono);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.slidev-layout pre {
|
|
141
|
+
border: var(--theme-stroke-thin) solid var(--theme-code-border);
|
|
142
|
+
overflow: auto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.slidev-layout .shiki {
|
|
146
|
+
background: transparent !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.slidev-layout .shiki span {
|
|
150
|
+
font-style: normal !important;
|
|
151
|
+
font-weight: 400 !important;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.slidev-layout :not(pre) > code {
|
|
155
|
+
border-radius: var(--theme-radius-inline-code);
|
|
156
|
+
background: var(--theme-inline-code-bg);
|
|
157
|
+
color: var(--theme-inline-code-text);
|
|
158
|
+
padding: 0 var(--theme-grid-module);
|
|
159
|
+
font-size: inherit;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.slidev-layout table {
|
|
163
|
+
width: 100%;
|
|
164
|
+
border-collapse: collapse;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.slidev-layout th,
|
|
168
|
+
.slidev-layout td {
|
|
169
|
+
padding: var(--theme-table-row-padding-y) 0;
|
|
170
|
+
text-align: left;
|
|
171
|
+
border-bottom: var(--theme-stroke-thin) solid var(--theme-border-subtle);
|
|
172
|
+
vertical-align: top;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.slidev-layout th {
|
|
176
|
+
color: var(--theme-text-muted);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.slidev-layout img {
|
|
180
|
+
display: block;
|
|
181
|
+
max-width: 100%;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.slidev-layout hr {
|
|
185
|
+
border: 0;
|
|
186
|
+
border-top: var(--theme-stroke-thin) solid var(--theme-border-subtle);
|
|
187
|
+
margin: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.slidev-layout .slidev-code-line.line-highlighted {
|
|
191
|
+
background: var(--theme-inline-code-bg);
|
|
192
|
+
}
|
package/styles/vars.css
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--theme-grid-module: 8px;
|
|
3
|
+
|
|
4
|
+
--theme-canvas-width: 1920px;
|
|
5
|
+
--theme-canvas-height: 1080px;
|
|
6
|
+
--theme-grid-columns: 12;
|
|
7
|
+
--theme-grid-rows: 12;
|
|
8
|
+
--theme-grid-gap: var(--theme-grid-module);
|
|
9
|
+
--theme-cell-width: calc((var(--theme-canvas-width) - var(--theme-margin-left) - var(--theme-margin-right) - (var(--theme-grid-gap) * (var(--theme-grid-columns) - 1))) / var(--theme-grid-columns));
|
|
10
|
+
--theme-cell-height: calc((var(--theme-canvas-height) - var(--theme-margin-top) - var(--theme-margin-bottom) - (var(--theme-grid-gap) * (var(--theme-grid-rows) - 1))) / var(--theme-grid-rows));
|
|
11
|
+
--theme-grid-span-1-width: calc((var(--theme-cell-width) * 1) + (var(--theme-grid-gap) * 0));
|
|
12
|
+
--theme-grid-span-2-width: calc((var(--theme-cell-width) * 2) + (var(--theme-grid-gap) * 1));
|
|
13
|
+
--theme-grid-span-3-width: calc((var(--theme-cell-width) * 3) + (var(--theme-grid-gap) * 2));
|
|
14
|
+
--theme-grid-span-4-width: calc((var(--theme-cell-width) * 4) + (var(--theme-grid-gap) * 3));
|
|
15
|
+
--theme-grid-span-5-width: calc((var(--theme-cell-width) * 5) + (var(--theme-grid-gap) * 4));
|
|
16
|
+
--theme-grid-span-6-width: calc((var(--theme-cell-width) * 6) + (var(--theme-grid-gap) * 5));
|
|
17
|
+
--theme-grid-span-7-width: calc((var(--theme-cell-width) * 7) + (var(--theme-grid-gap) * 6));
|
|
18
|
+
--theme-grid-span-8-width: calc((var(--theme-cell-width) * 8) + (var(--theme-grid-gap) * 7));
|
|
19
|
+
--theme-grid-span-9-width: calc((var(--theme-cell-width) * 9) + (var(--theme-grid-gap) * 8));
|
|
20
|
+
--theme-grid-span-10-width: calc((var(--theme-cell-width) * 10) + (var(--theme-grid-gap) * 9));
|
|
21
|
+
--theme-grid-span-11-width: calc((var(--theme-cell-width) * 11) + (var(--theme-grid-gap) * 10));
|
|
22
|
+
--theme-grid-span-12-width: calc((var(--theme-cell-width) * 12) + (var(--theme-grid-gap) * 11));
|
|
23
|
+
|
|
24
|
+
--theme-stroke-thin: 1px;
|
|
25
|
+
--theme-space-flow: calc(var(--theme-grid-module) * 2);
|
|
26
|
+
--theme-radius-inline-code: var(--theme-grid-module);
|
|
27
|
+
--theme-slot-margin-1: calc(var(--theme-grid-module) * 1);
|
|
28
|
+
--theme-slot-margin-2: calc(var(--theme-grid-module) * 2);
|
|
29
|
+
--theme-slot-margin-3: calc(var(--theme-grid-module) * 3);
|
|
30
|
+
--theme-slot-margin-4: calc(var(--theme-grid-module) * 4);
|
|
31
|
+
--theme-slot-margin-5: calc(var(--theme-grid-module) * 5);
|
|
32
|
+
--theme-slot-margin-6: calc(var(--theme-grid-module) * 6);
|
|
33
|
+
--theme-slot-margin-7: calc(var(--theme-grid-module) * 7);
|
|
34
|
+
--theme-slot-margin-8: calc(var(--theme-grid-module) * 8);
|
|
35
|
+
--theme-panel-radius: 12px;
|
|
36
|
+
--theme-code-padding: var(--theme-slot-margin-3);
|
|
37
|
+
--theme-table-row-padding-y: var(--theme-space-flow);
|
|
38
|
+
|
|
39
|
+
--theme-margin-top: calc(var(--theme-grid-module) * 12);
|
|
40
|
+
--theme-margin-right: calc(var(--theme-grid-module) * 3);
|
|
41
|
+
--theme-margin-bottom: calc(var(--theme-grid-module) * 3);
|
|
42
|
+
--theme-margin-left: calc(var(--theme-grid-module) * 3);
|
|
43
|
+
|
|
44
|
+
--theme-font-sans: 'YS Text', Inter, sans-serif;
|
|
45
|
+
--theme-font-mono: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', monospace;
|
|
46
|
+
|
|
47
|
+
--theme-text-size-0: calc(var(--theme-grid-module) * 2);
|
|
48
|
+
--theme-text-line-0: 1.2;
|
|
49
|
+
--theme-text-size-1: 20px;
|
|
50
|
+
--theme-text-line-1: 1.2;
|
|
51
|
+
--theme-text-size-2: calc(var(--theme-grid-module) * 3);
|
|
52
|
+
--theme-text-line-2: 1.2;
|
|
53
|
+
--theme-text-size-3: 36px;
|
|
54
|
+
--theme-text-line-3: 1.2;
|
|
55
|
+
--theme-text-size-4: 46px;
|
|
56
|
+
--theme-text-line-4: 1.2;
|
|
57
|
+
--theme-text-size-5: calc(var(--theme-grid-module) * 7);
|
|
58
|
+
--theme-text-line-5: 1.2;
|
|
59
|
+
--theme-text-size-6: calc(var(--theme-grid-module) * 10);
|
|
60
|
+
--theme-text-line-6: 1.1;
|
|
61
|
+
--theme-text-size-7: 124px;
|
|
62
|
+
--theme-text-line-7: 1.1;
|
|
63
|
+
--theme-text-size-8: 160px;
|
|
64
|
+
--theme-text-line-8: 0.95;
|
|
65
|
+
--theme-text-size-9: 200px;
|
|
66
|
+
--theme-text-line-9: 0.95;
|
|
67
|
+
--theme-text-size-10: 280px;
|
|
68
|
+
--theme-text-line-10: 0.95;
|
|
69
|
+
--theme-text-size-11: 340px;
|
|
70
|
+
--theme-text-line-11: 0.95;
|
|
71
|
+
--theme-text-size-12: 400px;
|
|
72
|
+
--theme-text-line-12: 0.95;
|
|
73
|
+
|
|
74
|
+
--theme-color-light-0: #ffffff;
|
|
75
|
+
--theme-color-light-1: #f0f0f0;
|
|
76
|
+
--theme-color-dark-0: #1e1e1e;
|
|
77
|
+
--theme-color-dark-1: #3c3c3c;
|
|
78
|
+
--theme-color-dark-2: #969696;
|
|
79
|
+
--theme-color-blue-0: #027ef2;
|
|
80
|
+
--theme-color-blue-1: #98d2fe;
|
|
81
|
+
--theme-color-orange-0: #ff6c26;
|
|
82
|
+
--theme-color-orange-1: #ffd2bd;
|
|
83
|
+
--theme-color-green-0: #07ab4b;
|
|
84
|
+
--theme-color-green-1: #9cddb7;
|
|
85
|
+
--theme-color-red-0: #e84033;
|
|
86
|
+
--theme-color-yellow-0: #ffd20a;
|
|
87
|
+
|
|
88
|
+
--theme-bg: var(--theme-color-light-0);
|
|
89
|
+
--theme-surface-light: var(--theme-color-light-1);
|
|
90
|
+
--theme-surface-dark: color-mix(in srgb, var(--theme-color-light-0) 7%, var(--theme-color-dark-0));
|
|
91
|
+
--theme-text: var(--theme-color-dark-0);
|
|
92
|
+
--theme-text-muted: var(--theme-color-dark-2);
|
|
93
|
+
--theme-text-on-dark: var(--theme-color-light-0);
|
|
94
|
+
--theme-border-subtle: color-mix(in srgb, var(--theme-color-dark-2) 22%, transparent);
|
|
95
|
+
--theme-current-color: var(--theme-color-blue-0);
|
|
96
|
+
--theme-text-muted-on-contrast: color-mix(in srgb, var(--theme-color-light-0) 72%, transparent);
|
|
97
|
+
--theme-link: var(--theme-current-color);
|
|
98
|
+
|
|
99
|
+
--theme-code-bg: var(--theme-color-light-1);
|
|
100
|
+
--theme-code-border: var(--theme-border-subtle);
|
|
101
|
+
--theme-inline-code-bg: color-mix(in srgb, var(--theme-current-color) 8%, transparent);
|
|
102
|
+
--theme-inline-code-text: var(--theme-text);
|
|
103
|
+
|
|
104
|
+
--theme-debug-grid-enabled: var(--slidev-theme-debugGrid, 0);
|
|
105
|
+
--theme-show-page-number: var(--slidev-theme-showPageNumber, 1);
|
|
106
|
+
|
|
107
|
+
--slidev-code-background: var(--theme-code-bg);
|
|
108
|
+
--slidev-code-foreground: var(--theme-text);
|
|
109
|
+
--slidev-code-font-family: var(--theme-font-mono);
|
|
110
|
+
--slidev-code-font-size: var(--theme-text-size-1);
|
|
111
|
+
--slidev-code-line-height: var(--theme-text-line-1);
|
|
112
|
+
--slidev-code-padding: var(--theme-code-padding);
|
|
113
|
+
--slidev-code-radius: var(--theme-panel-radius);
|
|
114
|
+
--slidev-code-margin: 0;
|
|
115
|
+
--slidev-code-tab-font-size: var(--theme-text-size-0);
|
|
116
|
+
--slidev-code-tab-divider: var(--theme-border-subtle);
|
|
117
|
+
--slidev-code-tab-text-color: var(--theme-text-muted);
|
|
118
|
+
--slidev-code-tab-active-text-color: var(--theme-text);
|
|
119
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module '@slidev/client' {
|
|
2
|
+
import type { Ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
export function useSlideContext(): {
|
|
5
|
+
$frontmatter: Record<string, unknown>
|
|
6
|
+
$page?: number | string
|
|
7
|
+
$slidev?: {
|
|
8
|
+
configs?: Record<string, unknown>
|
|
9
|
+
nav?: {
|
|
10
|
+
currentPage?: unknown
|
|
11
|
+
}
|
|
12
|
+
themeConfigs?: Ref<Record<string, unknown>>
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|