Skip to content

Commit 3c52243

Browse files
feat!: migrate to UnoCSS and Shiki highlighter
1 parent 31b9680 commit 3c52243

File tree

9 files changed

+9276
-5265
lines changed

9 files changed

+9276
-5265
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"build": {
44
"dockerfile": "./vscode-dev-containers/containers/typescript-node/.devcontainer/Dockerfile",
55
"args": {
6-
"VARIANT": "16-bullseye"
6+
"VARIANT": "20-bullseye"
77
}
88
},
99
"customizations": {
@@ -22,7 +22,6 @@
2222
"shan.code-settings-sync",
2323
"sleistner.vscode-fileutils",
2424
"pustelto.bracketeer",
25-
"voorjaar.windicss-intellisense",
2625
"vscode-icons-team.vscode-icons",
2726
"vue.volar",
2827
"wakatime.vscode-wakatime",

layouts/cover.vue

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@ const {
2727
coverAuthor: coverAuthorTransferred,
2828
coverAuthorUrl: coverAuthorUrlTransferred,
2929
coverBackgroundUrl,
30-
} = withDefaults(
31-
defineProps<{
32-
coverAuthor?: string | string[];
33-
coverAuthorUrl?: string | string[];
34-
coverBackgroundUrl?: string;
35-
coverBackgroundSource?: string;
36-
coverBackgroundSourceUrl?: string;
37-
coverDate?: string | Date;
38-
}>(),
39-
{ coverDate: new Date().toLocaleDateString() },
40-
);
30+
coverDate = new Date().toLocaleDateString(),
31+
} = defineProps<{
32+
coverAuthor?: string | string[];
33+
coverAuthorUrl?: string | string[];
34+
coverBackgroundUrl?: string;
35+
coverBackgroundSource?: string;
36+
coverBackgroundSourceUrl?: string;
37+
coverDate?: string | Date;
38+
}>();
4139
4240
const coverAuthors = computed(() => transformIntoArray(coverAuthorTransferred));
4341
const coverAuthorUrls = computed(() => transformIntoArray(coverAuthorUrlTransferred));

layouts/index.vue

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div class="slidev-layout">
33
<slot> <h1>Index</h1> </slot>
4-
<TocList v-if="indexEntriesInternal" :level="1" :list="indexEntriesInternal" />
5-
<ol v-else>
4+
<ol>
65
<li v-for="{ uri, title } in indexEntries" :key="title">
7-
<TextWithOptionalLink :link="uri" :text="title" />
6+
<Link v-if="indexRedirectType === 'internal'" :to="uri">{{ title }}</Link>
7+
<TextWithOptionalLink v-else :link="uri" :text="title" />
88
</li>
99
</ol>
1010
</div>
@@ -13,26 +13,14 @@
1313
<script setup lang="ts">
1414
import { computed, PropType } from 'vue';
1515
16-
const { indexEntries, indexRedirectType } = defineProps({
16+
const { indexEntries, indexRedirectType = 'internal' } = defineProps({
1717
indexEntries: {
1818
type: Array as PropType<{ title: string; uri?: number | string }[]>,
1919
required: true,
2020
},
2121
indexRedirectType: {
22-
default: 'internal',
2322
type: String as PropType<'external' | 'internal'>,
2423
validator: (value) => value === 'external' || value === 'internal',
2524
},
2625
});
27-
28-
const indexEntriesInternal =
29-
indexRedirectType === 'internal' &&
30-
computed(() =>
31-
indexEntries.map(({ title, uri }) => ({
32-
children: [],
33-
level: 1,
34-
path: uri.toString(),
35-
title,
36-
})),
37-
);
3826
</script>

0 commit comments

Comments
 (0)