Skip to content

Commit 3fd4c15

Browse files
committed
chore(ci): upstream update
1 parent f340b49 commit 3fd4c15

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

index.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="apple-mobile-web-app-capable" content="yes" />
6-
<meta name="generator" content="slidesdown 1.2.11" />
6+
<meta name="generator" content="slidesdown 1.2.12" />
77
<link href="https://slidesdown.github.io" rel="canonical" />
88
<meta content="Slidesdown" property="og:title" />
99
<meta content="Presentations at the speed of Markdown" name="description" />
@@ -110,27 +110,33 @@
110110
<script src="/vendor/unocss/preset-attributify.global.js"></script>
111111
<script src="/vendor/unocss/preset-icons.global.js"></script>
112112
<script src="/vendor/unocss/preset-typography.global.js"></script>
113-
<script src="/vendor/unocss/preset-uno.global.js"></script>
114113
<script src="/vendor/unocss/preset-wind4.global.js"></script>
115114
<script src="/vendor/unocss/preset-web-fonts.global.js"></script>
116115
<script>
117116
// Documentation: https://unocss.dev/integrations/runtime#usage
118117
window.__unocss = {
119118
presets: [
120-
() => window.__unocss_runtime.presets.presetWind4(),
119+
() =>
120+
window.__unocss_runtime.presets.presetWind4({
121+
preflights: { reset: false },
122+
}),
121123
() => window.__unocss_runtime.presets.presetAttributify(),
122124
() =>
123125
window.__unocss_runtime.presets.presetIcons({
124126
scale: 1.2,
125127
cdn: "/vendor/",
128+
extraProperties: {
129+
"display": "inline-block",
130+
"vertical-align": "middle",
131+
},
126132
}),
127133
() => window.__unocss_runtime.presets.presetTypography(),
128-
() => window.__unocss_runtime.presets.presetUno(),
129134
() => window.__unocss_runtime.presets.presetWebFonts(),
130135
],
131136
};
132137
</script>
133-
<script src="/vendor/unocss/core.global.js"></script>
138+
<!-- UnoCSS is loaded by slidesdown.js to avoid a double-initialization -->
139+
<!-- <script src="/vendor/unocss/core.global.js"></script> -->
134140
<script
135141
async
136142
src="https://scripts.simpleanalyticscdn.com/latest.js"

learn.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ <h2>Get your first slideshow up and running in less than 5 minutes.</h2>
104104
favicon: /favicon.svg
105105
# Theme, list of supported themes: https://github.com/slidesdown/slidesdown.github.io/tree/main/vendor/reveal.js/dist/theme
106106
theme: white
107+
# URL to JSON file that contains a UnoCSS theme configuration https://unocss.dev/config/theme
108+
# unocss: /unocss.json
107109
# Code highlighting theme, list of supported themes: https://github.com/slidesdown/slidesdown.github.io/tree/main/vendor/highlight.js
108110
highlight-theme: tokyo-night-dark
109111

plugin/slidesdown.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ const Plugin = () => {
727727
let deck;
728728

729729
/**
730-
* Apply metadta to presentation.
730+
* Apply metadata / frontmatter to presentation.
731731
*/
732732
function applyMetadata(metadata) {
733733
const defaultMetadata = {
@@ -755,6 +755,25 @@ const Plugin = () => {
755755
}
756756
document.body.appendChild(script);
757757
};
758+
const loadTheme = (name) => async (url) => {
759+
try {
760+
let response = await fetch(url);
761+
let json = await response.json();
762+
window.__unocss = {
763+
...window.__unocss,
764+
theme: {
765+
...(window.__unocss.theme || {}),
766+
...json,
767+
},
768+
};
769+
} catch (e) {
770+
console.error(
771+
`An error occurred while fetching the unocss theme configuration, URL ${url}:`,
772+
e,
773+
);
774+
}
775+
await import("/vendor/unocss/core.global.js?url");
776+
};
758777
const addMeta = (name) => (content) => {
759778
const meta = document.createElement("meta");
760779
meta.name = name;
@@ -818,6 +837,7 @@ const Plugin = () => {
818837
"subject": addMeta("subject"),
819838
"summary": addMeta("summary"),
820839
"topic": addMeta("topic"),
840+
"unocss": loadTheme("unocss"),
821841
"url": (url) =>
822842
S.map((fn) => fn(url))([addMeta("url"), addMeta("og:url")]),
823843
"_customcontrols": () => {

0 commit comments

Comments
 (0)