@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,82 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Agenda / outline. Lists the deck's `section` slides automatically (or `items` frontmatter); sections
|
|
3
|
+
with `hideInToc: true` and sections after the `appendix` are skipped.
|
|
4
|
+
When placed between sections, the upcoming section is highlighted as the current one (like
|
|
5
|
+
`<Steps current>`); `current: false` disables this, `current: 2` highlights a specific item
|
|
6
|
+
(1-based).
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import {useSlideContext} 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 {listedSections, useIllinois} from "#internal/theme.ts";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* An agenda entry
|
|
18
|
+
*/
|
|
19
|
+
interface Item {
|
|
20
|
+
/**
|
|
21
|
+
* Displayed number
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Route number of the section slide (automatic items only)
|
|
27
|
+
*/
|
|
28
|
+
no?: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Item text
|
|
32
|
+
*/
|
|
33
|
+
title: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const {$nav} = useSlideContext();
|
|
37
|
+
const {frontmatter, page} = useIllinois();
|
|
38
|
+
|
|
39
|
+
const items = computed<Item[]>(() => {
|
|
40
|
+
const value = frontmatter.value["items"];
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
return value.map((item, index) => ({
|
|
43
|
+
label: String(index + 1).padStart(2, "0"),
|
|
44
|
+
title: String(item),
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
return listedSections($nav.value.slides);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Index of the highlighted item (-1 for none)
|
|
51
|
+
const current = computed(() => {
|
|
52
|
+
const value = frontmatter.value["current"];
|
|
53
|
+
if (value === false) {
|
|
54
|
+
return -1;
|
|
55
|
+
}
|
|
56
|
+
if (typeof value === "number") {
|
|
57
|
+
return value - 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Highlight the next section, but only once at least one section has passed
|
|
61
|
+
const passed = items.value.some(item => item.no !== undefined && item.no < page.value);
|
|
62
|
+
if (!passed) {
|
|
63
|
+
return -1;
|
|
64
|
+
}
|
|
65
|
+
return items.value.findIndex(item => item.no !== undefined && item.no > page.value);
|
|
66
|
+
});
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<LayoutRoot name="agenda">
|
|
71
|
+
<header class="il-header">
|
|
72
|
+
<Kicker />
|
|
73
|
+
<slot />
|
|
74
|
+
</header>
|
|
75
|
+
<ol class="il-agenda-list" :class="{'il-agenda-has-current': current >= 0}">
|
|
76
|
+
<li v-for="(item, index) in items" :key="index" :class="{'il-current': index === current}">
|
|
77
|
+
<span class="il-agenda-number">{{ item.label }}</span>
|
|
78
|
+
<span class="il-agenda-title">{{ item.title }}</span>
|
|
79
|
+
</li>
|
|
80
|
+
</ol>
|
|
81
|
+
</LayoutRoot>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `appendix` layout: text on the right. Takes the same options as `appendix`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import AppendixLayout from "./appendix.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<AppendixLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</AppendixLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Appendix / backup-slides divider. Slides after it are numbered A1, A2, ... `appendix-right`
|
|
3
|
+
right-aligns the title.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import Kicker from "#internal/kicker.vue";
|
|
8
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
9
|
+
|
|
10
|
+
const {mirrored = false} = defineProps<{
|
|
11
|
+
/**
|
|
12
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
13
|
+
*/
|
|
14
|
+
mirrored?: boolean;
|
|
15
|
+
}>();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<LayoutRoot :class="{'il-mirrored': mirrored}" name="appendix">
|
|
20
|
+
<div class="il-appendix-body">
|
|
21
|
+
<Kicker />
|
|
22
|
+
<slot />
|
|
23
|
+
</div>
|
|
24
|
+
</LayoutRoot>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Free-form canvas for positioning elements by hand (with `v-drag`). `guides: true` overlays a
|
|
3
|
+
dot grid to help align elements while editing.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import {computed} from "vue";
|
|
8
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
9
|
+
import {useIllinois} from "#internal/theme.ts";
|
|
10
|
+
|
|
11
|
+
const {frontmatter} = useIllinois();
|
|
12
|
+
|
|
13
|
+
const guides = computed(() => frontmatter.value["guides"] === true);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<LayoutRoot name="canvas">
|
|
18
|
+
<div v-if="guides" aria-hidden="true" class="il-canvas-guides" />
|
|
19
|
+
<slot />
|
|
20
|
+
</LayoutRoot>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Content centered on the slide (both axes).
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import Kicker from "#internal/kicker.vue";
|
|
7
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<LayoutRoot name="center">
|
|
12
|
+
<div class="il-center-body">
|
|
13
|
+
<Kicker />
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
</LayoutRoot>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Side-by-side comparison: header (default slot) above two labelled panels (`::left::`,
|
|
3
|
+
`::right::`). Frontmatter: `emphasis` (`left` | `none` | `right`; default `right`), `labels`
|
|
4
|
+
(e.g. `[Before, After]`), `ratio`.
|
|
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 {parseRatio, tracks, useIllinois} from "#internal/theme.ts";
|
|
12
|
+
|
|
13
|
+
const {frontmatter} = useIllinois();
|
|
14
|
+
|
|
15
|
+
const emphasis = computed(() => {
|
|
16
|
+
const value = frontmatter.value["emphasis"];
|
|
17
|
+
return value === "left" || value === "none" ? value : "right";
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const labels = computed(() => {
|
|
21
|
+
const value = frontmatter.value["labels"];
|
|
22
|
+
return Array.isArray(value) ? value.map(String) : [];
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// `ratio` is the share of the left panel
|
|
26
|
+
const style = computed(() => ({
|
|
27
|
+
gridTemplateColumns: tracks(parseRatio(frontmatter.value["ratio"], 0.5)),
|
|
28
|
+
}));
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<LayoutRoot name="compare">
|
|
33
|
+
<header class="il-header">
|
|
34
|
+
<Kicker />
|
|
35
|
+
<slot />
|
|
36
|
+
</header>
|
|
37
|
+
<div class="il-cols" :style="style">
|
|
38
|
+
<section class="il-compare-panel" :class="{'il-emphasis': emphasis === 'left'}">
|
|
39
|
+
<p v-if="labels[0]" class="il-compare-label">{{ labels[0] }}</p>
|
|
40
|
+
<slot name="left" />
|
|
41
|
+
</section>
|
|
42
|
+
<section class="il-compare-panel" :class="{'il-emphasis': emphasis === 'right'}">
|
|
43
|
+
<p v-if="labels[1]" class="il-compare-label">{{ labels[1] }}</p>
|
|
44
|
+
<slot name="right" />
|
|
45
|
+
</section>
|
|
46
|
+
</div>
|
|
47
|
+
</LayoutRoot>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `cover` layout: text on the right, photo or pattern on the left. Takes the same options as `cover`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import CoverLayout from "./cover.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CoverLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</CoverLayout>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Title slide. `cover-right` mirrors it (text on the right, photo or pattern on the left).
|
|
3
|
+
|
|
4
|
+
Content: `# Title` and an optional subtitle paragraph.
|
|
5
|
+
Frontmatter (usually in the headmatter):
|
|
6
|
+
- `authors`: list of names or `{affiliation, email, name, url}`
|
|
7
|
+
- `date`, `event`: shown under the authors
|
|
8
|
+
- `image`: adds a photo panel on the right
|
|
9
|
+
- `mark`: Illinois mark, `block-i` | `formal` | `none` | `vertical` | `wordmark` (default)
|
|
10
|
+
- `pattern`: `dots` | `grid` | `lines` | `none` (default from the look or `themeConfig.pattern`)
|
|
11
|
+
- `surface`: `auto` | `blue` | `orange` | `tint` (default from the look's `titleSurface`), or
|
|
12
|
+
set `background` for a photo
|
|
13
|
+
Unit and affiliation branding come from `themeConfig.unit` and `themeConfig.affiliations`. A unit
|
|
14
|
+
`logo` (an official unit wordmark, which includes the Block I) replaces the Illinois mark; a unit
|
|
15
|
+
given as text is shown apart from the mark, since the brand guidelines forbid pairing the mark
|
|
16
|
+
with a unit name so that it looks like a wordmark.
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import {resolveAssetUrl} from "@slidev/client";
|
|
21
|
+
import {computed} from "vue";
|
|
22
|
+
import BrandLogo from "#internal/brand-logo.vue";
|
|
23
|
+
import Kicker from "#internal/kicker.vue";
|
|
24
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
25
|
+
import Pattern from "#internal/pattern.vue";
|
|
26
|
+
import {
|
|
27
|
+
markFromFrontmatter,
|
|
28
|
+
markUrl,
|
|
29
|
+
normalizeBrand,
|
|
30
|
+
normalizeBrands,
|
|
31
|
+
safeUrl,
|
|
32
|
+
useIllinois,
|
|
33
|
+
} from "#internal/theme.ts";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A presenter
|
|
37
|
+
*/
|
|
38
|
+
interface Author {
|
|
39
|
+
/**
|
|
40
|
+
* Department or institution
|
|
41
|
+
*/
|
|
42
|
+
affiliation?: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Email address
|
|
46
|
+
*/
|
|
47
|
+
email?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Full name
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Link target of the name
|
|
56
|
+
*/
|
|
57
|
+
url?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const {mirrored = false} = defineProps<{
|
|
61
|
+
/**
|
|
62
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
63
|
+
*/
|
|
64
|
+
mirrored?: boolean;
|
|
65
|
+
}>();
|
|
66
|
+
|
|
67
|
+
const {config, darkBackground, frontmatter, markVariant} = useIllinois();
|
|
68
|
+
|
|
69
|
+
const affiliations = computed(() => normalizeBrands(config.value.affiliations));
|
|
70
|
+
const event = computed(() => frontmatter.value["event"] as string | undefined);
|
|
71
|
+
const mark = computed(() => markFromFrontmatter(frontmatter.value["mark"], "wordmark"));
|
|
72
|
+
const unit = computed(() => normalizeBrand(config.value.unit));
|
|
73
|
+
|
|
74
|
+
// `authors` (or Slidev's `author`) as a list of author objects
|
|
75
|
+
const authors = computed<Author[]>(() => {
|
|
76
|
+
const value = frontmatter.value["authors"] ?? frontmatter.value["author"];
|
|
77
|
+
if (value === undefined) {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const list: unknown[] = Array.isArray(value) ? value : [value];
|
|
82
|
+
return list.map(item => (typeof item === "string" ? {name: item} : (item as Author)));
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// YAML parses unquoted dates into Date objects
|
|
86
|
+
const date = computed(() => {
|
|
87
|
+
const value = frontmatter.value["date"];
|
|
88
|
+
if (value instanceof Date) {
|
|
89
|
+
return value.toLocaleDateString(undefined, {dateStyle: "long", timeZone: "UTC"});
|
|
90
|
+
}
|
|
91
|
+
return typeof value === "string" ? value : undefined;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const image = computed(() => {
|
|
95
|
+
const value = frontmatter.value["image"];
|
|
96
|
+
return typeof value === "string" ? resolveAssetUrl(value) : undefined;
|
|
97
|
+
});
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<template>
|
|
101
|
+
<LayoutRoot :class="{'il-cover-has-image': image, 'il-mirrored': mirrored}" name="cover">
|
|
102
|
+
<Pattern v-if="!image" />
|
|
103
|
+
|
|
104
|
+
<div class="il-cover-content">
|
|
105
|
+
<!-- Official unit wordmark, or the Illinois mark (and the unit name, kept apart from it) -->
|
|
106
|
+
<header v-if="mark || unit" class="il-lockup">
|
|
107
|
+
<BrandLogo
|
|
108
|
+
v-if="unit?.logo"
|
|
109
|
+
:brand="unit"
|
|
110
|
+
class="il-lockup-unit-logo"
|
|
111
|
+
:dark="darkBackground"
|
|
112
|
+
/>
|
|
113
|
+
<template v-else>
|
|
114
|
+
<img
|
|
115
|
+
v-if="mark"
|
|
116
|
+
alt="University of Illinois Urbana-Champaign"
|
|
117
|
+
class="il-lockup-mark"
|
|
118
|
+
:class="`il-mark-${mark}`"
|
|
119
|
+
:src="markUrl(mark, markVariant)"
|
|
120
|
+
/>
|
|
121
|
+
<span v-if="unit?.name" class="il-lockup-unit">{{ unit.name }}</span>
|
|
122
|
+
</template>
|
|
123
|
+
</header>
|
|
124
|
+
|
|
125
|
+
<!-- Title and subtitle -->
|
|
126
|
+
<div class="il-cover-main">
|
|
127
|
+
<Kicker />
|
|
128
|
+
<slot />
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<!-- Authors, event and affiliation logos -->
|
|
132
|
+
<footer class="il-cover-meta">
|
|
133
|
+
<ul v-if="authors.length" class="il-cover-authors">
|
|
134
|
+
<li v-for="(author, index) in authors" :key="index">
|
|
135
|
+
<component
|
|
136
|
+
:is="safeUrl(author.url) ? 'a' : 'span'"
|
|
137
|
+
class="il-cover-author"
|
|
138
|
+
:href="safeUrl(author.url)"
|
|
139
|
+
>
|
|
140
|
+
{{ author.name }}
|
|
141
|
+
</component>
|
|
142
|
+
<span v-if="author.affiliation" class="il-cover-affiliation">
|
|
143
|
+
{{ author.affiliation }}
|
|
144
|
+
</span>
|
|
145
|
+
<span v-if="author.email" class="il-cover-email">{{ author.email }}</span>
|
|
146
|
+
</li>
|
|
147
|
+
</ul>
|
|
148
|
+
<p v-if="event || date" class="il-cover-event">
|
|
149
|
+
<span v-if="event">{{ event }}</span>
|
|
150
|
+
<span v-if="event && date" aria-hidden="true" class="il-dot">·</span>
|
|
151
|
+
<span v-if="date">{{ date }}</span>
|
|
152
|
+
</p>
|
|
153
|
+
<div v-if="affiliations.length" class="il-logo-row">
|
|
154
|
+
<BrandLogo
|
|
155
|
+
v-for="(brand, index) in affiliations"
|
|
156
|
+
:key="index"
|
|
157
|
+
:brand="brand"
|
|
158
|
+
:dark="darkBackground"
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
</footer>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div
|
|
165
|
+
v-if="image"
|
|
166
|
+
class="il-cover-media"
|
|
167
|
+
:style="{backgroundImage: `url("${image}")`}"
|
|
168
|
+
/>
|
|
169
|
+
</LayoutRoot>
|
|
170
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Title + body. The workhorse layout.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import Kicker from "#internal/kicker.vue";
|
|
7
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<LayoutRoot name="default">
|
|
12
|
+
<Kicker />
|
|
13
|
+
<slot />
|
|
14
|
+
</LayoutRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `end` layout: text on the right, QR code and pattern on the left. Takes the same options as `end`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import EndLayout from "./end.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<EndLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</EndLayout>
|
|
15
|
+
</template>
|
package/layouts/end.vue
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Closing slide: thanks / questions / contact. `end-right` mirrors it
|
|
3
|
+
(QR code and pattern on the left). Frontmatter: `mark` (see cover), `pattern` (see cover), `qr` (URL to
|
|
4
|
+
encode), `qrLabel`, `sponsors` (overrides `themeConfig.sponsors`), `sponsorsLabel` (default
|
|
5
|
+
"Supported by").
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import {computed} from "vue";
|
|
10
|
+
import QrCode from "#components/qr-code.vue";
|
|
11
|
+
import BrandLogo from "#internal/brand-logo.vue";
|
|
12
|
+
import Kicker from "#internal/kicker.vue";
|
|
13
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
14
|
+
import Pattern from "#internal/pattern.vue";
|
|
15
|
+
import {
|
|
16
|
+
type BrandRef,
|
|
17
|
+
markFromFrontmatter,
|
|
18
|
+
markUrl,
|
|
19
|
+
normalizeBrands,
|
|
20
|
+
useIllinois,
|
|
21
|
+
} from "#internal/theme.ts";
|
|
22
|
+
|
|
23
|
+
const {mirrored = false} = defineProps<{
|
|
24
|
+
/**
|
|
25
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
26
|
+
*/
|
|
27
|
+
mirrored?: boolean;
|
|
28
|
+
}>();
|
|
29
|
+
|
|
30
|
+
const {config, darkBackground, frontmatter, markVariant} = useIllinois();
|
|
31
|
+
|
|
32
|
+
const mark = computed(() => markFromFrontmatter(frontmatter.value["mark"], "wordmark"));
|
|
33
|
+
// QR code target (YAML may parse a bare number)
|
|
34
|
+
const qr = computed(() => {
|
|
35
|
+
const value = frontmatter.value["qr"];
|
|
36
|
+
return typeof value === "string" || typeof value === "number" ? String(value) : undefined;
|
|
37
|
+
});
|
|
38
|
+
const sponsorsLabel = computed(() => String(frontmatter.value["sponsorsLabel"] ?? "Supported by"));
|
|
39
|
+
|
|
40
|
+
// QR label defaults to the URL without protocol and trailing slash
|
|
41
|
+
const qrLabel = computed(() => {
|
|
42
|
+
const value = frontmatter.value["qrLabel"];
|
|
43
|
+
if (typeof value === "string") {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return qr.value?.replace(/^https?:\/\//u, "").replace(/\/$/u, "");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const sponsors = computed(() => {
|
|
50
|
+
const value = frontmatter.value["sponsors"] as (BrandRef | string)[] | undefined;
|
|
51
|
+
return normalizeBrands(value ?? config.value.sponsors);
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<LayoutRoot :class="{'il-mirrored': mirrored}" name="end">
|
|
57
|
+
<Pattern />
|
|
58
|
+
|
|
59
|
+
<div class="il-end-main">
|
|
60
|
+
<div class="il-end-content">
|
|
61
|
+
<Kicker />
|
|
62
|
+
<slot />
|
|
63
|
+
</div>
|
|
64
|
+
<figure v-if="qr" class="il-end-qr">
|
|
65
|
+
<QrCode :value="qr" />
|
|
66
|
+
<figcaption>{{ qrLabel }}</figcaption>
|
|
67
|
+
</figure>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<footer class="il-end-footer">
|
|
71
|
+
<img
|
|
72
|
+
v-if="mark"
|
|
73
|
+
alt="University of Illinois Urbana-Champaign"
|
|
74
|
+
class="il-lockup-mark"
|
|
75
|
+
:class="`il-mark-${mark}`"
|
|
76
|
+
:src="markUrl(mark, markVariant)"
|
|
77
|
+
/>
|
|
78
|
+
<div v-if="sponsors.length" class="il-end-sponsors">
|
|
79
|
+
<span class="il-end-sponsors-label">{{ sponsorsLabel }}</span>
|
|
80
|
+
<div class="il-logo-row">
|
|
81
|
+
<span v-for="(brand, index) in sponsors" :key="index" class="il-sponsor">
|
|
82
|
+
<BrandLogo :brand="brand" :dark="darkBackground" />
|
|
83
|
+
<span v-if="brand.note" class="il-sponsor-note">{{ brand.note }}</span>
|
|
84
|
+
</span>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</footer>
|
|
88
|
+
</LayoutRoot>
|
|
89
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Mirrored `fact` layout: content on the right. Takes the same options as `fact`.
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import FactLayout from "./fact.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<FactLayout mirrored>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
12
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
|
13
|
+
</template>
|
|
14
|
+
</FactLayout>
|
|
15
|
+
</template>
|
package/layouts/fact.vue
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Big numbers. A single fact: `# 87%` followed by a short label. Several facts: a row of `<Stat>`
|
|
3
|
+
components. `fact-right` right-aligns the content.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import Kicker from "#internal/kicker.vue";
|
|
8
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
9
|
+
|
|
10
|
+
const {mirrored = false} = defineProps<{
|
|
11
|
+
/**
|
|
12
|
+
* Mirror the layout horizontally (set by the `-right` variant)
|
|
13
|
+
*/
|
|
14
|
+
mirrored?: boolean;
|
|
15
|
+
}>();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<LayoutRoot :class="{'il-mirrored': mirrored}" name="fact">
|
|
20
|
+
<div class="il-fact-body">
|
|
21
|
+
<Kicker />
|
|
22
|
+
<slot />
|
|
23
|
+
</div>
|
|
24
|
+
</LayoutRoot>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
One large figure (chart, diagram, screenshot) with title, caption and source.
|
|
3
|
+
The figure is either `image` frontmatter or the content after the title (an image, mermaid
|
|
4
|
+
diagram, table, ...). Caption: `caption` frontmatter or the `::caption::` slot (supports
|
|
5
|
+
citations). Frontmatter `source` adds a muted source line; `alt` describes the `image`.
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import {resolveAssetUrl} from "@slidev/client";
|
|
10
|
+
import {computed} from "vue";
|
|
11
|
+
import Kicker from "#internal/kicker.vue";
|
|
12
|
+
import LayoutRoot from "#internal/layout-root.vue";
|
|
13
|
+
import {altText, useIllinois} from "#internal/theme.ts";
|
|
14
|
+
|
|
15
|
+
const {frontmatter} = useIllinois();
|
|
16
|
+
|
|
17
|
+
const alt = computed(() => altText(frontmatter.value));
|
|
18
|
+
const caption = computed(() => frontmatter.value["caption"] as string | undefined);
|
|
19
|
+
const source = computed(() => frontmatter.value["source"] as string | undefined);
|
|
20
|
+
|
|
21
|
+
const image = computed(() => {
|
|
22
|
+
const value = frontmatter.value["image"];
|
|
23
|
+
return typeof value === "string" ? resolveAssetUrl(value) : undefined;
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<LayoutRoot name="figure">
|
|
29
|
+
<figure class="il-figure-body">
|
|
30
|
+
<Kicker />
|
|
31
|
+
<div class="il-figure-main">
|
|
32
|
+
<slot />
|
|
33
|
+
<img v-if="image" :alt="alt" class="il-figure-image" :src="image" />
|
|
34
|
+
</div>
|
|
35
|
+
<figcaption v-if="caption || source || $slots['caption']" class="il-figure-caption">
|
|
36
|
+
<slot name="caption">
|
|
37
|
+
<span v-if="caption">{{ caption }}</span>
|
|
38
|
+
</slot>
|
|
39
|
+
<span v-if="source" class="il-figure-source">{{ source }}</span>
|
|
40
|
+
</figcaption>
|
|
41
|
+
</figure>
|
|
42
|
+
</LayoutRoot>
|
|
43
|
+
</template>
|
package/layouts/grid.vue
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Grid of cells. Every top-level block after the title becomes one cell (wrap multi-part cells in a
|
|
3
|
+
`<Card>` or `<div>`). Titles, kickers, `.il-lead` paragraphs and `.il-span-all` elements span the
|
|
4
|
+
full width. Frontmatter: `columns` (default 3), `gap` (CSS length).
|
|
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 {useIllinois} from "#internal/theme.ts";
|
|
12
|
+
|
|
13
|
+
const {frontmatter} = useIllinois();
|
|
14
|
+
|
|
15
|
+
const style = computed(() => {
|
|
16
|
+
const {columns, gap} = frontmatter.value;
|
|
17
|
+
const count = Number(columns ?? 3);
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
gridTemplateColumns: `repeat(${count > 0 ? count : 3}, minmax(0, 1fr))`,
|
|
21
|
+
...(typeof gap === "number" || typeof gap === "string" ? {gap: String(gap)} : {}),
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<LayoutRoot name="grid">
|
|
28
|
+
<div class="il-grid-body" :style="style">
|
|
29
|
+
<Kicker />
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
32
|
+
</LayoutRoot>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Content with iframe 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="iframe" name="iframe-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 iframe 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="iframe" name="iframe-right" side="right">
|
|
11
|
+
<slot />
|
|
12
|
+
<template v-if="$slots['media']" #media>
|
|
13
|
+
<slot name="media" />
|
|
14
|
+
</template>
|
|
15
|
+
</Split>
|
|
16
|
+
</template>
|