@alphacifer/slidev-addon-theme 0.0.11 → 0.0.13
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 +2 -5
- package/components/comparisons/table-comparison/TableComparison.vue +7 -9
- package/components/core/MetaList.vue +50 -0
- package/components/core/Speaker.vue +2 -2
- package/components/core/arc-orbit/ArcOrbitCallout.vue +9 -11
- package/components/core/thanks/SquareThanksContent.vue +15 -17
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradCallout.vue +9 -11
- package/layouts/core/bg-center.vue +2 -2
- package/layouts/core/references.vue +84 -0
- package/layouts/core/style.css +30 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Shared Slidev components and layouts for Alpha presentations.
|
|
4
4
|
|
|
5
|
-
For the pre-refactor inventory of all components, props, slots, layouts, and
|
|
6
|
-
migration-sensitive behavior, see [Component baseline](./COMPONENTS_BASELINE.md).
|
|
7
|
-
|
|
8
5
|
For Alpha's light-only academic styling, combine this addon with
|
|
9
6
|
`@alphacifer/slidev-academic-theme`.
|
|
10
7
|
|
|
@@ -84,8 +81,8 @@ overrides such as `--alpha-square-pyramid-stack-1-color` and
|
|
|
84
81
|
|
|
85
82
|
## Core
|
|
86
83
|
|
|
87
|
-
- Components: `Date`, `QnA`, `Quote`, `ReflectedTitle`, `Speaker`
|
|
88
|
-
- Layouts: `arc-toc`, `bg-center`
|
|
84
|
+
- Components: `Date`, `MetaList`, `QnA`, `Quote`, `ReflectedTitle`, `Speaker`
|
|
85
|
+
- Layouts: `arc-toc`, `bg-center`, `references`
|
|
89
86
|
|
|
90
87
|
## Shifting heading
|
|
91
88
|
|
|
@@ -160,15 +160,13 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
163
|
+
.alpha-table-comparison :deep(tr) {
|
|
164
|
+
background-color: transparent;
|
|
165
|
+
border: none;
|
|
166
|
+
}
|
|
168
167
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
168
|
+
.alpha-table-comparison :deep(th),
|
|
169
|
+
.alpha-table-comparison :deep(td) {
|
|
170
|
+
border: none;
|
|
173
171
|
}
|
|
174
172
|
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export interface IMetaListItem {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
items: {
|
|
17
|
+
type: Array as PropType<IMetaListItem[]>,
|
|
18
|
+
required: false,
|
|
19
|
+
default: () => [],
|
|
20
|
+
},
|
|
21
|
+
separator: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: false,
|
|
24
|
+
default: ': ',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
29
|
+
'alpha-meta-list flex flex-col gap-2 text-left text-xl',
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<dl v-bind="forwardedAttrs()" :class="className()">
|
|
35
|
+
<slot>
|
|
36
|
+
<div
|
|
37
|
+
v-for="(item, index) in props.items"
|
|
38
|
+
:key="`${item.label}-${index}`"
|
|
39
|
+
class="alpha-meta-list__item"
|
|
40
|
+
>
|
|
41
|
+
<dt class="alpha-meta-list__label inline font-medium">
|
|
42
|
+
{{ item.label }}{{ props.separator }}
|
|
43
|
+
</dt>
|
|
44
|
+
<dd class="alpha-meta-list__value inline m-0">
|
|
45
|
+
{{ item.value }}
|
|
46
|
+
</dd>
|
|
47
|
+
</div>
|
|
48
|
+
</slot>
|
|
49
|
+
</dl>
|
|
50
|
+
</template>
|
|
@@ -25,8 +25,8 @@ const props = defineProps({
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const { className, forwardedAttrs } = useMergedUnoAttrs(() => [
|
|
28
|
-
'alpha-speaker flex absolute bottom-3.75 right-7.5 flex-col',
|
|
29
|
-
props.team.length ? '
|
|
28
|
+
'alpha-speaker flex absolute bottom-3.75 right-7.5 flex-col text-left',
|
|
29
|
+
props.team.length ? 'gap-2' : undefined,
|
|
30
30
|
]);
|
|
31
31
|
</script>
|
|
32
32
|
|
|
@@ -321,17 +321,15 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
321
321
|
</template>
|
|
322
322
|
|
|
323
323
|
<style scoped>
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
padding: 0;
|
|
334
|
-
}
|
|
324
|
+
.alpha-arc-orbit-callout :deep(p),
|
|
325
|
+
.alpha-arc-orbit-callout :deep(h1),
|
|
326
|
+
.alpha-arc-orbit-callout :deep(h2),
|
|
327
|
+
.alpha-arc-orbit-callout :deep(h3),
|
|
328
|
+
.alpha-arc-orbit-callout :deep(h4),
|
|
329
|
+
.alpha-arc-orbit-callout :deep(h5),
|
|
330
|
+
.alpha-arc-orbit-callout :deep(h6) {
|
|
331
|
+
margin: 0;
|
|
332
|
+
padding: 0;
|
|
335
333
|
}
|
|
336
334
|
|
|
337
335
|
.alpha-arc-orbit-callout--animated.alpha-arc-orbit-callout--left-0 {
|
|
@@ -68,22 +68,20 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<style scoped>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
color: inherit;
|
|
87
|
-
}
|
|
71
|
+
.alpha-square-thanks-content :deep(h1),
|
|
72
|
+
.alpha-square-thanks-content :deep(h2),
|
|
73
|
+
.alpha-square-thanks-content :deep(h3),
|
|
74
|
+
.alpha-square-thanks-content :deep(h4),
|
|
75
|
+
.alpha-square-thanks-content :deep(h5),
|
|
76
|
+
.alpha-square-thanks-content :deep(h6),
|
|
77
|
+
.alpha-square-thanks-content :deep(p),
|
|
78
|
+
.alpha-square-thanks-content :deep(div) {
|
|
79
|
+
margin: 0;
|
|
80
|
+
padding: 0;
|
|
81
|
+
font-family: inherit;
|
|
82
|
+
font-size: inherit;
|
|
83
|
+
font-weight: inherit;
|
|
84
|
+
line-height: inherit;
|
|
85
|
+
color: inherit;
|
|
88
86
|
}
|
|
89
87
|
</style>
|
|
@@ -226,17 +226,15 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(() => {
|
|
|
226
226
|
</template>
|
|
227
227
|
|
|
228
228
|
<style scoped>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
padding: 0;
|
|
239
|
-
}
|
|
229
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(p),
|
|
230
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(h1),
|
|
231
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(h2),
|
|
232
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(h3),
|
|
233
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(h4),
|
|
234
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(h5),
|
|
235
|
+
.alpha-rectangle-orbit-tetrad-callout :deep(h6) {
|
|
236
|
+
margin: 0;
|
|
237
|
+
padding: 0;
|
|
240
238
|
}
|
|
241
239
|
|
|
242
240
|
.alpha-rectangle-orbit-tetrad-callout--animated.alpha-rectangle-orbit-tetrad-callout--0 {
|
|
@@ -18,7 +18,7 @@ const { background, indexed, dim } = defineProps({
|
|
|
18
18
|
},
|
|
19
19
|
dim: {
|
|
20
20
|
type: Boolean,
|
|
21
|
-
default:
|
|
21
|
+
default: false,
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -51,7 +51,7 @@ const tocIndex = computed(() => {
|
|
|
51
51
|
class="alpha-bg-center__indexed-content flex flex-col items-center gap-2"
|
|
52
52
|
>
|
|
53
53
|
<span
|
|
54
|
-
class="alpha-bg-center__index text-5xl font-extrabold leading-none text-(--alpha-bg-center-text)
|
|
54
|
+
class="alpha-bg-center__index text-5xl font-extrabold leading-none text-(--alpha-bg-center-text) tracking-tighter"
|
|
55
55
|
>{{
|
|
56
56
|
tocIndex
|
|
57
57
|
}}</span
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { handleBackground } from '@slidev/client';
|
|
3
|
+
import { computed, type PropType } from 'vue';
|
|
4
|
+
|
|
5
|
+
import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
|
|
6
|
+
|
|
7
|
+
defineOptions({
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export interface IReferenceItem {
|
|
12
|
+
authors: string;
|
|
13
|
+
year: number | string;
|
|
14
|
+
title: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
references: {
|
|
20
|
+
type: Array as PropType<IReferenceItem[]>,
|
|
21
|
+
default: () => [],
|
|
22
|
+
},
|
|
23
|
+
columns: {
|
|
24
|
+
type: [Number, String],
|
|
25
|
+
default: 2,
|
|
26
|
+
},
|
|
27
|
+
background: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const style = computed(() =>
|
|
34
|
+
props.background ? handleBackground(props.background) : undefined,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const columnClass = computed(() => {
|
|
38
|
+
const cols = Number(props.columns) || 2;
|
|
39
|
+
if (cols === 1) return 'columns-1';
|
|
40
|
+
if (cols === 3) return 'columns-3';
|
|
41
|
+
return 'columns-2';
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
45
|
+
'alpha-references slidev-layout h-full',
|
|
46
|
+
);
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<div v-bind="forwardedAttrs()" :class="className()" :style="style">
|
|
51
|
+
<slot />
|
|
52
|
+
<ul
|
|
53
|
+
v-if="props.references.length"
|
|
54
|
+
class="alpha-references__list list-none p-0 m-0 mt-3"
|
|
55
|
+
:class="[columnClass, 'gap-x-8']"
|
|
56
|
+
>
|
|
57
|
+
<li
|
|
58
|
+
v-for="(ref, index) in props.references"
|
|
59
|
+
:key="`${ref.authors}-${ref.year}-${index}`"
|
|
60
|
+
class="alpha-references__item break-inside-avoid mb-4 text-lg leading-snug"
|
|
61
|
+
>
|
|
62
|
+
<strong class="alpha-references__authors text-foreground-primary block">
|
|
63
|
+
{{ ref.authors }}
|
|
64
|
+
({{ ref.year }})
|
|
65
|
+
</strong>
|
|
66
|
+
<a
|
|
67
|
+
v-if="ref.url"
|
|
68
|
+
:href="ref.url"
|
|
69
|
+
target="_blank"
|
|
70
|
+
rel="noopener noreferrer"
|
|
71
|
+
class="alpha-references__title text-foreground-accent hover:underline block"
|
|
72
|
+
>
|
|
73
|
+
{{ ref.title }}
|
|
74
|
+
</a>
|
|
75
|
+
<span
|
|
76
|
+
v-else
|
|
77
|
+
class="alpha-references__title text-foreground-secondary block"
|
|
78
|
+
>
|
|
79
|
+
{{ ref.title }}
|
|
80
|
+
</span>
|
|
81
|
+
</li>
|
|
82
|
+
</ul>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
package/layouts/core/style.css
CHANGED
|
@@ -15,3 +15,33 @@
|
|
|
15
15
|
--alpha-bg-center-text: var(--alpha-foreground-accent, #fff);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
.slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) {
|
|
20
|
+
columns: 2;
|
|
21
|
+
column-gap: 2rem;
|
|
22
|
+
list-style: none;
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin-top: 0.75rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) > li {
|
|
28
|
+
margin-bottom: 1rem;
|
|
29
|
+
font-size: 1.125rem;
|
|
30
|
+
line-height: 1.375;
|
|
31
|
+
break-inside: avoid;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) {
|
|
35
|
+
columns: 2;
|
|
36
|
+
column-gap: 2rem;
|
|
37
|
+
list-style: none;
|
|
38
|
+
padding: 0;
|
|
39
|
+
margin-top: 0.75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) > li {
|
|
43
|
+
margin-bottom: 1rem;
|
|
44
|
+
font-size: 1.125rem;
|
|
45
|
+
line-height: 1.375;
|
|
46
|
+
break-inside: avoid;
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alphacifer/slidev-addon-theme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "All Slidev addons for Alpha presentations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@vueuse/motion": "3.0.3",
|
|
35
35
|
"@alphacifer/core-utils": "^0.0.10",
|
|
36
|
-
"@alphacifer/slidev-core-theme": "^0.0.
|
|
36
|
+
"@alphacifer/slidev-core-theme": "^0.0.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@slidev/cli": "52.19.0",
|