@wakeful-cloud/slidev-theme-illinois 0.0.0-stage → 0.1.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 +45 -0
- package/README.md +592 -2
- package/assets/logos/block-i-blue.svg +54 -0
- package/assets/logos/block-i-full.svg +54 -0
- package/assets/logos/block-i-orange.svg +54 -0
- package/assets/logos/wordmark-blue.svg +94 -0
- package/assets/logos/wordmark-formal-blue.svg +234 -0
- package/assets/logos/wordmark-formal-full.svg +234 -0
- package/assets/logos/wordmark-formal-orange.svg +234 -0
- package/assets/logos/wordmark-full.svg +94 -0
- package/assets/logos/wordmark-orange.svg +94 -0
- package/assets/logos/wordmark-vertical-blue.svg +94 -0
- package/assets/logos/wordmark-vertical-full.svg +94 -0
- package/assets/logos/wordmark-vertical-orange.svg +94 -0
- package/citations/engine.ts +738 -0
- package/citations/errors.ts +79 -0
- package/citations/plugin.ts +137 -0
- package/citations/styles.ts +300 -0
- package/citations/syntax.ts +357 -0
- package/components/bibliography.vue +185 -0
- package/components/callout.vue +42 -0
- package/components/card.vue +37 -0
- package/components/cite.vue +62 -0
- package/components/frame.vue +71 -0
- package/components/illinois-logo.vue +45 -0
- package/components/math-morph.vue +252 -0
- package/components/qr-code.vue +51 -0
- package/components/stat.vue +43 -0
- package/components/steps.vue +77 -0
- package/global.d.ts +14 -0
- package/internal/brand-logo.vue +48 -0
- package/internal/citations.ts +206 -0
- package/internal/kicker.vue +13 -0
- package/internal/layout-root.vue +42 -0
- package/internal/pattern.vue +20 -0
- package/internal/split.vue +147 -0
- package/internal/theme.ts +878 -0
- package/layouts/agenda.vue +82 -0
- package/layouts/appendix-right.vue +15 -0
- package/layouts/appendix.vue +25 -0
- package/layouts/canvas.vue +21 -0
- package/layouts/center.vue +17 -0
- package/layouts/compare.vue +48 -0
- package/layouts/cover-right.vue +15 -0
- package/layouts/cover.vue +170 -0
- package/layouts/default.vue +15 -0
- package/layouts/end-right.vue +15 -0
- package/layouts/end.vue +89 -0
- package/layouts/fact-right.vue +15 -0
- package/layouts/fact.vue +25 -0
- package/layouts/figure.vue +43 -0
- package/layouts/grid.vue +33 -0
- package/layouts/iframe-left.vue +16 -0
- package/layouts/iframe-right.vue +16 -0
- package/layouts/image-left.vue +16 -0
- package/layouts/image-right.vue +16 -0
- package/layouts/image.vue +40 -0
- package/layouts/media-left.vue +17 -0
- package/layouts/media-right.vue +17 -0
- package/layouts/people.vue +98 -0
- package/layouts/quote-right.vue +15 -0
- package/layouts/quote.vue +41 -0
- package/layouts/references.vue +36 -0
- package/layouts/section-right.vue +15 -0
- package/layouts/section.vue +53 -0
- package/layouts/statement-right.vue +15 -0
- package/layouts/statement.vue +30 -0
- package/layouts/two-cols-header.vue +32 -0
- package/layouts/two-cols.vue +31 -0
- package/package.json +114 -4
- package/setup/mermaid.ts +73 -0
- package/setup/shiki.ts +147 -0
- package/setup/transformers.ts +21 -0
- package/setup/unocss.ts +34 -0
- package/setup/vite-plugins.ts +8 -0
- package/slide-top.vue +149 -0
- package/styles/base.css +309 -0
- package/styles/components.css +336 -0
- package/styles/index.ts +19 -0
- package/styles/layouts.css +1242 -0
- package/styles/looks.css +307 -0
- package/styles/tokens.css +324 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Content with image on the left (shortcut for `media-left`).
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import Split from "#internal/split.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<Split kind="image" name="image-left" side="left">
|
|
11
|
+
<slot />
|
|
12
|
+
<template v-if="$slots['media']" #media>
|
|
13
|
+
<slot name="media" />
|
|
14
|
+
</template>
|
|
15
|
+
</Split>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Content with image on the right (shortcut for `media-right`).
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import Split from "#internal/split.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<Split kind="image" name="image-right" side="right">
|
|
11
|
+
<slot />
|
|
12
|
+
<template v-if="$slots['media']" #media>
|
|
13
|
+
<slot name="media" />
|
|
14
|
+
</template>
|
|
15
|
+
</Split>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Full-bleed image with optional overlaid text.
|
|
3
|
+
Frontmatter: `alt` (image description), `caption` (credit line), `fit`
|
|
4
|
+
(`contain` | `cover`), `image` (or `background`),
|
|
5
|
+
`position` (`bottom-left` default, `bottom-right`, `center`, `top-left`, `top-right`), `scrim`
|
|
6
|
+
(`full` | `gradient` default | `none`).
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import {resolveAssetUrl} from "@slidev/client";
|
|
11
|
+
import {computed} from "vue";
|
|
12
|
+
import Kicker from "#internal/kicker.vue";
|
|
13
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
14
|
+
import {altText, useIllinois} from "#internal/theme.ts";
|
|
15
|
+
|
|
16
|
+
const {frontmatter} = useIllinois();
|
|
17
|
+
|
|
18
|
+
const alt = computed(() => altText(frontmatter.value));
|
|
19
|
+
const caption = computed(() => frontmatter.value["caption"] as string | undefined);
|
|
20
|
+
const fit = computed(() => (frontmatter.value["fit"] === "contain" ? "contain" : "cover"));
|
|
21
|
+
const position = computed(() => String(frontmatter.value["position"] ?? "bottom-left"));
|
|
22
|
+
const scrim = computed(() => String(frontmatter.value["scrim"] ?? "gradient"));
|
|
23
|
+
|
|
24
|
+
const src = computed(() => {
|
|
25
|
+
const value = frontmatter.value["image"] ?? frontmatter.value["background"];
|
|
26
|
+
return typeof value === "string" ? resolveAssetUrl(value) : undefined;
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<LayoutRoot :class="[`il-position-${position}`, `il-scrim-${scrim}`]" name="image" own-background>
|
|
32
|
+
<img v-if="src" :alt="alt" class="il-image-media" :class="`il-fit-${fit}`" :src="src" />
|
|
33
|
+
<div aria-hidden="true" class="il-image-scrim" />
|
|
34
|
+
<div class="il-image-content">
|
|
35
|
+
<Kicker />
|
|
36
|
+
<slot />
|
|
37
|
+
</div>
|
|
38
|
+
<p v-if="caption" class="il-image-caption">{{ caption }}</p>
|
|
39
|
+
</LayoutRoot>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Content with media on the left: an image, video or iframe (`image` / `video` / `iframe`
|
|
3
|
+
frontmatter) or anything in the `::media::` slot. See internal/split.vue for options.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import Split from "#internal/split.vue";
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<Split name="media-left" side="left">
|
|
12
|
+
<slot />
|
|
13
|
+
<template v-if="$slots['media']" #media>
|
|
14
|
+
<slot name="media" />
|
|
15
|
+
</template>
|
|
16
|
+
</Split>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Content with media on the right: an image, video or iframe (`image` / `video` / `iframe`
|
|
3
|
+
frontmatter) or anything in the `::media::` slot. See internal/split.vue for options.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import Split from "#internal/split.vue";
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<Split name="media-right" side="right">
|
|
12
|
+
<slot />
|
|
13
|
+
<template v-if="$slots['media']" #media>
|
|
14
|
+
<slot name="media" />
|
|
15
|
+
</template>
|
|
16
|
+
</Split>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Speakers / team / collaborators. Frontmatter `people`: list of
|
|
3
|
+
`{affiliation, image, name, role, url}`; `columns` (default: up to 4 per row).
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import {resolveAssetUrl} from "@slidev/client";
|
|
8
|
+
import {computed} from "vue";
|
|
9
|
+
import Kicker from "#internal/kicker.vue";
|
|
10
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
11
|
+
import {safeUrl, useIllinois} from "#internal/theme.ts";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A person
|
|
15
|
+
*/
|
|
16
|
+
interface Person {
|
|
17
|
+
/**
|
|
18
|
+
* Department or institution
|
|
19
|
+
*/
|
|
20
|
+
affiliation?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Photo URL (initials are shown without one)
|
|
24
|
+
*/
|
|
25
|
+
image?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Full name
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Role, e.g. "Advisor"
|
|
34
|
+
*/
|
|
35
|
+
role?: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Link target of the name
|
|
39
|
+
*/
|
|
40
|
+
url?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const {frontmatter} = useIllinois();
|
|
44
|
+
|
|
45
|
+
const people = computed<Person[]>(() => {
|
|
46
|
+
const value = frontmatter.value["people"];
|
|
47
|
+
if (!Array.isArray(value)) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
return value.map(item => (typeof item === "string" ? {name: item} : (item as Person)));
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const columns = computed(() => {
|
|
54
|
+
const value = Number(frontmatter.value["columns"]);
|
|
55
|
+
return value > 0 ? value : Math.min(Math.max(people.value.length, 1), 4);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Initials shown when a person has no photo
|
|
60
|
+
* @param name Full name
|
|
61
|
+
* @returns Up to two initials
|
|
62
|
+
*/
|
|
63
|
+
const initials = (name: string) =>
|
|
64
|
+
name
|
|
65
|
+
.split(/\s+/u)
|
|
66
|
+
.filter(Boolean)
|
|
67
|
+
.map(part => part[0])
|
|
68
|
+
.slice(0, 2)
|
|
69
|
+
.join("")
|
|
70
|
+
.toUpperCase();
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<LayoutRoot name="people">
|
|
75
|
+
<header class="il-header">
|
|
76
|
+
<Kicker />
|
|
77
|
+
<slot />
|
|
78
|
+
</header>
|
|
79
|
+
<ul class="il-people-list" :style="{gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`}">
|
|
80
|
+
<li v-for="(person, index) in people" :key="index">
|
|
81
|
+
<div class="il-person-photo">
|
|
82
|
+
<img v-if="person.image" :alt="person.name" :src="resolveAssetUrl(person.image)" />
|
|
83
|
+
<span v-else class="il-person-initials">{{ initials(person.name) }}</span>
|
|
84
|
+
</div>
|
|
85
|
+
<component
|
|
86
|
+
:is="safeUrl(person.url) ? 'a' : 'p'"
|
|
87
|
+
class="il-person-name"
|
|
88
|
+
:href="safeUrl(person.url)"
|
|
89
|
+
>
|
|
90
|
+
{{ person.name }}
|
|
91
|
+
</component>
|
|
92
|
+
<p v-if="person.role" class="il-person-role">{{ person.role }}</p>
|
|
93
|
+
<p v-if="person.affiliation" class="il-person-affiliation">{{ person.affiliation }}</p>
|
|
94
|
+
</li>
|
|
95
|
+
</ul>
|
|
96
|
+
<slot name="footer" />
|
|
97
|
+
</LayoutRoot>
|
|
98
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `quote` layout: quote on the right. Takes the same options as `quote`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import QuoteLayout from "./quote.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<QuoteLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</QuoteLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Pull quote. The slide content is the quote; `author` and `role` frontmatter (or the
|
|
3
|
+
`::attribution::` slot) add the attribution. `quote-right` right-aligns the quote.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import {computed} from "vue";
|
|
8
|
+
import Kicker from "#internal/kicker.vue";
|
|
9
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
10
|
+
import {useIllinois} from "#internal/theme.ts";
|
|
11
|
+
|
|
12
|
+
const {mirrored = false} = defineProps<{
|
|
13
|
+
/**
|
|
14
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
15
|
+
*/
|
|
16
|
+
mirrored?: boolean;
|
|
17
|
+
}>();
|
|
18
|
+
|
|
19
|
+
const {frontmatter} = useIllinois();
|
|
20
|
+
|
|
21
|
+
const author = computed(() => frontmatter.value["author"] as string | undefined);
|
|
22
|
+
const role = computed(() => frontmatter.value["role"] as string | undefined);
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<LayoutRoot :class="{'il-mirrored': mirrored}" name="quote">
|
|
27
|
+
<figure class="il-quote-body">
|
|
28
|
+
<Kicker />
|
|
29
|
+
<span aria-hidden="true" class="il-quote-mark">“</span>
|
|
30
|
+
<blockquote class="il-quote-text">
|
|
31
|
+
<slot />
|
|
32
|
+
</blockquote>
|
|
33
|
+
<figcaption v-if="author || role || $slots['attribution']" class="il-quote-attribution">
|
|
34
|
+
<slot name="attribution">
|
|
35
|
+
<span v-if="author" class="il-quote-author">{{ author }}</span>
|
|
36
|
+
<span v-if="role">{{ role }}</span>
|
|
37
|
+
</slot>
|
|
38
|
+
</figcaption>
|
|
39
|
+
</figure>
|
|
40
|
+
</LayoutRoot>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Bibliography slide. Frontmatter: `all`, `columns`, `fit`, `from`, `keys`, `to` (see
|
|
3
|
+
`<Bibliography>`).
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import {computed} from "vue";
|
|
8
|
+
import Bibliography from "#components/bibliography.vue";
|
|
9
|
+
import {splitKeys} from "#internal/citations.ts";
|
|
10
|
+
import Kicker from "#internal/kicker.vue";
|
|
11
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
12
|
+
import {useIllinois} from "#internal/theme.ts";
|
|
13
|
+
|
|
14
|
+
const {frontmatter} = useIllinois();
|
|
15
|
+
|
|
16
|
+
// <Bibliography> props from frontmatter (invalid values are ignored)
|
|
17
|
+
const options = computed(() => {
|
|
18
|
+
const {all, columns, fit, from, keys, to} = frontmatter.value;
|
|
19
|
+
return {
|
|
20
|
+
all: all === true,
|
|
21
|
+
columns: typeof columns === "number" ? columns : 1,
|
|
22
|
+
fit: fit !== false,
|
|
23
|
+
...(typeof from === "number" ? {from} : {}),
|
|
24
|
+
...(typeof keys === "string" || Array.isArray(keys) ? {keys: splitKeys(keys) ?? []} : {}),
|
|
25
|
+
...(typeof to === "number" ? {to} : {}),
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<LayoutRoot name="references">
|
|
32
|
+
<Kicker />
|
|
33
|
+
<slot />
|
|
34
|
+
<Bibliography class="il-references-list" v-bind="options" />
|
|
35
|
+
</LayoutRoot>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `section` layout: text on the right, pattern on the left. Takes the same options as `section`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import SectionLayout from "./section.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<SectionLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</SectionLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Section divider. Sections are numbered automatically (01, 02, ...), matching the agenda: sections
|
|
3
|
+
with `hideInToc: true` are not counted and repeat the number of the section they are in, and
|
|
4
|
+
sections after the `appendix` are not numbered. `number: false` hides the number, `number: 3`
|
|
5
|
+
or `number: "A"` sets it explicitly (also in the agenda). `pattern` overrides the background
|
|
6
|
+
pattern (`dots` | `grid` | `lines` | `none`). `section-right` mirrors it (text on
|
|
7
|
+
the right).
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import {useSlideContext} from "@slidev/client";
|
|
12
|
+
import {computed} from "vue";
|
|
13
|
+
import Kicker from "#internal/kicker.vue";
|
|
14
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
15
|
+
import Pattern from "#internal/pattern.vue";
|
|
16
|
+
import {appendixStart, listedSections, sectionLabel, useIllinois} from "#internal/theme.ts";
|
|
17
|
+
|
|
18
|
+
const {mirrored = false} = defineProps<{
|
|
19
|
+
/**
|
|
20
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
21
|
+
*/
|
|
22
|
+
mirrored?: boolean;
|
|
23
|
+
}>();
|
|
24
|
+
|
|
25
|
+
const {$nav} = useSlideContext();
|
|
26
|
+
const {frontmatter, page} = useIllinois();
|
|
27
|
+
|
|
28
|
+
// Number shown in the agenda. Sections hidden from the agenda repeat the number of the section
|
|
29
|
+
// they are in; sections in the appendix have no automatic number.
|
|
30
|
+
const number = computed(() => {
|
|
31
|
+
const value = frontmatter.value["number"];
|
|
32
|
+
if (value !== undefined) {
|
|
33
|
+
return sectionLabel(value, 1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const appendix = appendixStart($nav.value.slides);
|
|
37
|
+
if (appendix !== undefined && page.value > appendix) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return listedSections($nav.value.slides).findLast(entry => entry.no <= page.value)?.label ?? "01";
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<LayoutRoot :class="{'il-mirrored': mirrored}" name="section">
|
|
46
|
+
<Pattern />
|
|
47
|
+
<div class="il-section-body">
|
|
48
|
+
<span v-if="number" class="il-section-number">{{ number }}</span>
|
|
49
|
+
<Kicker />
|
|
50
|
+
<slot />
|
|
51
|
+
</div>
|
|
52
|
+
</LayoutRoot>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `statement` layout: text on the right. Takes the same options as `statement`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import StatementLayout from "./statement.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<StatementLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</StatementLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
One big idea. `align: center` centers the text (`statement-right` right-aligns it); `*emphasis*` in the title is highlighted.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import {computed} from "vue";
|
|
7
|
+
import Kicker from "#internal/kicker.vue";
|
|
8
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
9
|
+
import {useIllinois} from "#internal/theme.ts";
|
|
10
|
+
|
|
11
|
+
const {mirrored = false} = defineProps<{
|
|
12
|
+
/**
|
|
13
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
14
|
+
*/
|
|
15
|
+
mirrored?: boolean;
|
|
16
|
+
}>();
|
|
17
|
+
|
|
18
|
+
const {frontmatter} = useIllinois();
|
|
19
|
+
|
|
20
|
+
const centered = computed(() => frontmatter.value["align"] === "center");
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<LayoutRoot :class="{'il-centered': centered, 'il-mirrored': mirrored}" name="statement">
|
|
25
|
+
<div class="il-statement-body">
|
|
26
|
+
<Kicker />
|
|
27
|
+
<slot />
|
|
28
|
+
</div>
|
|
29
|
+
</LayoutRoot>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Full-width header (default slot) above two columns (`::left::` and `::right::`).
|
|
3
|
+
Frontmatter: `align`, `ratio` (see two-cols).
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import {computed} from "vue";
|
|
8
|
+
import Kicker from "#internal/kicker.vue";
|
|
9
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
10
|
+
import {columnsStyle, useIllinois} from "#internal/theme.ts";
|
|
11
|
+
|
|
12
|
+
const {frontmatter} = useIllinois();
|
|
13
|
+
|
|
14
|
+
const style = computed(() => columnsStyle(frontmatter.value));
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<LayoutRoot name="two-cols-header">
|
|
19
|
+
<header class="il-header">
|
|
20
|
+
<Kicker />
|
|
21
|
+
<slot />
|
|
22
|
+
</header>
|
|
23
|
+
<div class="il-cols" :style="style">
|
|
24
|
+
<div class="col-left il-col">
|
|
25
|
+
<slot name="left" />
|
|
26
|
+
</div>
|
|
27
|
+
<div class="col-right il-col">
|
|
28
|
+
<slot name="right" />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</LayoutRoot>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Two columns. The default slot (and `::left::`) fill the left column, `::right::` the right one.
|
|
3
|
+
Frontmatter: `align` (`bottom` | `center` | `top`), `ratio` (left column share, e.g. `1/3`,
|
|
4
|
+
`60%`; default `1/2`).
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import {computed} from "vue";
|
|
9
|
+
import Kicker from "#internal/kicker.vue";
|
|
10
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
11
|
+
import {columnsStyle, useIllinois} from "#internal/theme.ts";
|
|
12
|
+
|
|
13
|
+
const {frontmatter} = useIllinois();
|
|
14
|
+
|
|
15
|
+
const style = computed(() => columnsStyle(frontmatter.value));
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<LayoutRoot name="two-cols">
|
|
20
|
+
<div class="il-cols" :style="style">
|
|
21
|
+
<div class="col-left il-col">
|
|
22
|
+
<Kicker />
|
|
23
|
+
<slot />
|
|
24
|
+
<slot name="left" />
|
|
25
|
+
</div>
|
|
26
|
+
<div class="col-right il-col">
|
|
27
|
+
<slot name="right" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</LayoutRoot>
|
|
31
|
+
</template>
|
package/package.json
CHANGED
|
@@ -1,6 +1,116 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "0.1.1",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"imports": {
|
|
5
|
+
"#assets/*": "./assets/*",
|
|
6
|
+
"#citations/*": "./citations/*",
|
|
7
|
+
"#components/*": "./components/*",
|
|
8
|
+
"#internal/*": "./internal/*"
|
|
9
|
+
},
|
|
2
10
|
"name": "@wakeful-cloud/slidev-theme-illinois",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
"description": "A Slidev theme for the University of Illinois Urbana-Champaign",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"bibtex",
|
|
14
|
+
"citations",
|
|
15
|
+
"illinois",
|
|
16
|
+
"slidev",
|
|
17
|
+
"slidev-theme",
|
|
18
|
+
"uiuc",
|
|
19
|
+
"university of illinois urbana-champaign"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=22.18.0"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "slidev build example.md",
|
|
26
|
+
"dev": "slidev example.md --open",
|
|
27
|
+
"export": "slidev export example.md --format pdf --output example.pdf",
|
|
28
|
+
"fmt": "oxfmt",
|
|
29
|
+
"fmt:check": "oxfmt --check",
|
|
30
|
+
"lint": "oxlint",
|
|
31
|
+
"lint:fix": "oxlint --fix",
|
|
32
|
+
"screenshot": "node scripts/screenshots.ts",
|
|
33
|
+
"typecheck": "node scripts/typecheck.ts"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@slidev/cli": "^53.1.0",
|
|
37
|
+
"@slidev/client": "^53.1.0",
|
|
38
|
+
"@slidev/parser": "^53.1.0",
|
|
39
|
+
"oxfmt": "^0.80.0",
|
|
40
|
+
"oxlint": "^1.95.0",
|
|
41
|
+
"playwright-chromium": "^1.65.1",
|
|
42
|
+
"vite": "^8.3.8",
|
|
43
|
+
"vue": "^3.5.46",
|
|
44
|
+
"vue-tsc": "^3.3.14"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@slidev/client": "^53.1.0",
|
|
48
|
+
"vue": "^3.5.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@citation-js/core": "^0.9.0",
|
|
52
|
+
"@citation-js/plugin-bibtex": "^0.9.0",
|
|
53
|
+
"@citation-js/plugin-csl": "^0.9.0",
|
|
54
|
+
"@fontsource-variable/atkinson-hyperlegible-next": "^5.3.0",
|
|
55
|
+
"@fontsource-variable/montserrat": "^5.3.0",
|
|
56
|
+
"@fontsource-variable/source-code-pro": "^5.3.1",
|
|
57
|
+
"@fontsource-variable/source-sans-3": "^5.3.1",
|
|
58
|
+
"@slidev/types": "^53.1.0",
|
|
59
|
+
"katex": "^0.19.1",
|
|
60
|
+
"uqr": "^0.1.3"
|
|
61
|
+
},
|
|
62
|
+
"overrides": {
|
|
63
|
+
"dompurify": "^3.4.17",
|
|
64
|
+
"image-size": "^2.0.3"
|
|
65
|
+
},
|
|
66
|
+
"files": [
|
|
67
|
+
"LICENSE",
|
|
68
|
+
"README.md",
|
|
69
|
+
"assets",
|
|
70
|
+
"citations",
|
|
71
|
+
"components",
|
|
72
|
+
"global.d.ts",
|
|
73
|
+
"internal",
|
|
74
|
+
"layouts",
|
|
75
|
+
"setup",
|
|
76
|
+
"slide-top.vue",
|
|
77
|
+
"styles"
|
|
78
|
+
],
|
|
79
|
+
"publishConfig": {
|
|
80
|
+
"access": "public"
|
|
81
|
+
},
|
|
82
|
+
"homepage": "https://github.com/Wakeful-Cloud/slidev-theme-illinois#readme",
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://github.com/Wakeful-Cloud/slidev-theme-illinois/issues"
|
|
85
|
+
},
|
|
86
|
+
"repository": {
|
|
87
|
+
"type": "git",
|
|
88
|
+
"url": "git+https://github.com/Wakeful-Cloud/slidev-theme-illinois.git"
|
|
89
|
+
},
|
|
90
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
91
|
+
"author": "Wakeful-Cloud",
|
|
92
|
+
"slidev": {
|
|
93
|
+
"colorSchema": "both",
|
|
94
|
+
"highlighter": "shiki",
|
|
95
|
+
"defaults": {
|
|
96
|
+
"canvasWidth": 980,
|
|
97
|
+
"fonts": {
|
|
98
|
+
"sans": "Source Sans 3 Variable",
|
|
99
|
+
"serif": "Montserrat Variable",
|
|
100
|
+
"mono": "Source Code Pro Variable",
|
|
101
|
+
"provider": "none",
|
|
102
|
+
"local": "Source Sans 3 Variable,Montserrat Variable,Source Code Pro Variable"
|
|
103
|
+
},
|
|
104
|
+
"themeConfig": {
|
|
105
|
+
"chrome": "full",
|
|
106
|
+
"citationFooter": true,
|
|
107
|
+
"citationStyle": "ieee",
|
|
108
|
+
"density": "regular",
|
|
109
|
+
"font": "brand",
|
|
110
|
+
"footerMark": "none",
|
|
111
|
+
"footerSponsors": false,
|
|
112
|
+
"look": "classic"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
package/setup/mermaid.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Mermaid setup. Diagrams are rendered inside a shadow root, so page CSS cannot reach them,
|
|
3
|
+
* but CSS custom properties still inherit: `themeCSS` maps the slide's surface tokens onto Mermaid's
|
|
4
|
+
* elements, so diagrams follow the surface (blue, tint, ...) and dark mode.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {defineMermaidSetup} from "@slidev/types";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Body font stack
|
|
11
|
+
*/
|
|
12
|
+
const FONT = '"Source Sans 3 Variable", "Source Sans 3", Arial, sans-serif';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* CSS injected into every diagram
|
|
16
|
+
*/
|
|
17
|
+
const THEME_CSS = `
|
|
18
|
+
/* Nodes */
|
|
19
|
+
.actor, .classGroup rect, .labelBox, .node circle, .node ellipse, .node path, .node polygon,
|
|
20
|
+
.node rect, .stateGroup rect {
|
|
21
|
+
fill: var(--il-panel-strong) !important;
|
|
22
|
+
filter: none !important;
|
|
23
|
+
stroke: var(--il-heading) !important;
|
|
24
|
+
stroke-width: 1.5px !important;
|
|
25
|
+
}
|
|
26
|
+
.node, .node * {
|
|
27
|
+
filter: none !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Text */
|
|
31
|
+
.edgeLabel, .label, .label text, .labelText, .loopText, .messageText, .nodeLabel, .noteText,
|
|
32
|
+
span, text.actor {
|
|
33
|
+
color: var(--il-fg) !important;
|
|
34
|
+
fill: var(--il-fg) !important;
|
|
35
|
+
font-family: var(--il-font-body) !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Edge labels */
|
|
39
|
+
.edgeLabel, .edgeLabel p, .edgeLabel rect, .edgeLabel span, .labelBkg {
|
|
40
|
+
background: var(--il-bg) !important;
|
|
41
|
+
background-color: var(--il-bg) !important;
|
|
42
|
+
fill: var(--il-bg) !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Edges */
|
|
46
|
+
.actor-line, .flowchart-link, .messageLine0, .messageLine1, .relation, .transition {
|
|
47
|
+
stroke: var(--il-muted) !important;
|
|
48
|
+
}
|
|
49
|
+
.arrowheadPath, marker path {
|
|
50
|
+
fill: var(--il-muted) !important;
|
|
51
|
+
stroke: var(--il-muted) !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Groups and notes */
|
|
55
|
+
.cluster rect {
|
|
56
|
+
fill: var(--il-panel) !important;
|
|
57
|
+
stroke: var(--il-rule-color) !important;
|
|
58
|
+
}
|
|
59
|
+
.note {
|
|
60
|
+
fill: var(--il-panel) !important;
|
|
61
|
+
stroke: var(--il-accent) !important;
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
export default defineMermaidSetup(() => ({
|
|
66
|
+
fontFamily: FONT,
|
|
67
|
+
theme: "base",
|
|
68
|
+
themeCSS: THEME_CSS,
|
|
69
|
+
themeVariables: {
|
|
70
|
+
fontFamily: FONT,
|
|
71
|
+
fontSize: "16px",
|
|
72
|
+
},
|
|
73
|
+
}));
|