@slidev/client 0.36.7 → 0.36.8
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/internals/PresenterPrint.vue +51 -0
- package/layouts/image-left.vue +1 -1
- package/layouts/image-right.vue +1 -1
- package/package.json +3 -3
- package/routes.ts +2 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useHead } from '@vueuse/head'
|
|
3
|
+
import { computed } from '@vue/reactivity'
|
|
4
|
+
import { rawRoutes, total } from '../logic/nav'
|
|
5
|
+
import { configs, themeVars } from '../env'
|
|
6
|
+
import NoteViewer from './NoteViewer.vue'
|
|
7
|
+
|
|
8
|
+
useHead({ title: `Notes - ${configs.title}` })
|
|
9
|
+
|
|
10
|
+
const slidesWithNote = computed(() => rawRoutes
|
|
11
|
+
.slice(0, -1)
|
|
12
|
+
.map(route => route.meta?.slide)
|
|
13
|
+
.filter(slide => slide !== undefined && slide.notesHTML !== ''))
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div id="page-root" :style="themeVars">
|
|
18
|
+
<div class="m-4">
|
|
19
|
+
<div class="mb-10">
|
|
20
|
+
<h1 class="text-4xl font-bold mt-2">
|
|
21
|
+
{{ configs.title }}
|
|
22
|
+
</h1>
|
|
23
|
+
<div class="opacity-50">
|
|
24
|
+
{{ new Date().toLocaleString() }}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div v-for="(slide, index) of slidesWithNote" :key="index" class="flex flex-col gap-4">
|
|
29
|
+
<div>
|
|
30
|
+
<h2 class="text-lg">
|
|
31
|
+
<div class="font-bold flex gap-2">
|
|
32
|
+
<div class="opacity-50">
|
|
33
|
+
{{ slide?.no }}/{{ total }}
|
|
34
|
+
</div>
|
|
35
|
+
{{ slide?.title }}
|
|
36
|
+
<div class="flex-auto" />
|
|
37
|
+
</div>
|
|
38
|
+
</h2>
|
|
39
|
+
<NoteViewer :note-html="slide!.notesHTML" class="max-w-full" />
|
|
40
|
+
</div>
|
|
41
|
+
<hr v-if="index < slidesWithNote.length - 1" class="border-gray-400/50 mb-8">
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<style lang="postcss">
|
|
48
|
+
@page {
|
|
49
|
+
size: A4;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
package/layouts/image-left.vue
CHANGED
|
@@ -15,7 +15,7 @@ const style = computed(() => handleBackground(props.image))
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<div class="grid grid-cols-2 w-full h-full">
|
|
18
|
+
<div class="grid grid-cols-2 w-full h-full auto-rows-fr">
|
|
19
19
|
<div class="w-full w-full" :style="style" />
|
|
20
20
|
<div class="slidev-layout default" :class="props.class">
|
|
21
21
|
<slot />
|
package/layouts/image-right.vue
CHANGED
|
@@ -15,7 +15,7 @@ const style = computed(() => handleBackground(props.image))
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<div class="grid grid-cols-2 w-full h-full">
|
|
18
|
+
<div class="grid grid-cols-2 w-full h-full auto-rows-fr">
|
|
19
19
|
<div class="slidev-layout default" :class="props.class">
|
|
20
20
|
<slot />
|
|
21
21
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.8",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.5.2",
|
|
19
|
-
"@slidev/parser": "0.36.
|
|
20
|
-
"@slidev/types": "0.36.
|
|
19
|
+
"@slidev/parser": "0.36.8",
|
|
20
|
+
"@slidev/types": "0.36.8",
|
|
21
21
|
"@unocss/reset": "^0.45.29",
|
|
22
22
|
"@vueuse/core": "^9.3.0",
|
|
23
23
|
"@vueuse/head": "^0.9.8",
|
package/routes.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RouteRecordRaw } from 'vue-router'
|
|
2
2
|
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
|
|
3
3
|
import Play from './internals/Play.vue'
|
|
4
|
+
import PresenterPrint from './internals/PresenterPrint.vue'
|
|
4
5
|
import Print from './internals/Print.vue'
|
|
5
6
|
// @ts-expect-error missing types
|
|
6
7
|
import _rawRoutes from '/@slidev/routes'
|
|
@@ -20,6 +21,7 @@ export const routes: RouteRecordRaw[] = [
|
|
|
20
21
|
{ name: 'print', path: '/print', component: Print },
|
|
21
22
|
{ path: '', redirect: { path: '/1' } },
|
|
22
23
|
{ path: '/:pathMatch(.*)', redirect: { path: '/1' } },
|
|
24
|
+
{ path: '/presenter/print', component: PresenterPrint },
|
|
23
25
|
{
|
|
24
26
|
name: 'presenter',
|
|
25
27
|
path: '/presenter/:no',
|