@miragon/slidev-toolkit 1.0.0
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 +21 -0
- package/assets/fonts/Geist-Variable.woff2 +0 -0
- package/assets/fonts/GeistMono-Variable.woff2 +0 -0
- package/assets/fonts/LICENSE.txt +92 -0
- package/assets/komet.svg +1 -0
- package/assets/logo.svg +1 -0
- package/components/Agenda.vue +517 -0
- package/components/BrandMeshBackground.vue +159 -0
- package/components/Card.vue +72 -0
- package/components/CardGrid.vue +46 -0
- package/components/Figure.vue +101 -0
- package/components/SplitView.vue +71 -0
- package/components/Step.vue +19 -0
- package/components/StepList.vue +28 -0
- package/layouts/bpmn.vue +162 -0
- package/layouts/closing.vue +127 -0
- package/layouts/compare.vue +214 -0
- package/layouts/content-image.vue +182 -0
- package/layouts/content.vue +186 -0
- package/layouts/cover.vue +114 -0
- package/layouts/goodbad.vue +308 -0
- package/layouts/hero.vue +168 -0
- package/layouts/person.vue +287 -0
- package/layouts/section.vue +127 -0
- package/layouts/showcase.vue +244 -0
- package/package.json +38 -0
- package/styles/fonts.css +23 -0
- package/styles/index.css +25 -0
- package/styles/theme.css +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Miragon GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Copyright (c) 2023 Vercel, in collaboration with basement.studio
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------------
|
|
8
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
PREAMBLE
|
|
12
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
13
|
+
development of collaborative font projects, to support the font creation
|
|
14
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
15
|
+
open framework in which fonts may be shared and improved in partnership
|
|
16
|
+
with others.
|
|
17
|
+
|
|
18
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
19
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
20
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
21
|
+
redistributed and/or sold with any software provided that any reserved
|
|
22
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
23
|
+
however, cannot be released under any other type of license. The
|
|
24
|
+
requirement for fonts to remain under this license does not apply
|
|
25
|
+
to any document created using the fonts or their derivatives.
|
|
26
|
+
|
|
27
|
+
DEFINITIONS
|
|
28
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
29
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
30
|
+
include source files, build scripts and documentation.
|
|
31
|
+
|
|
32
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
33
|
+
copyright statement(s).
|
|
34
|
+
|
|
35
|
+
"Original Version" refers to the collection of Font Software components as
|
|
36
|
+
distributed by the Copyright Holder(s).
|
|
37
|
+
|
|
38
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
39
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
40
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
41
|
+
new environment.
|
|
42
|
+
|
|
43
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
44
|
+
writer or other person who contributed to the Font Software.
|
|
45
|
+
|
|
46
|
+
PERMISSION AND CONDITIONS
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
49
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
50
|
+
Software, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
1) Neither the Font Software nor any of its individual components,
|
|
53
|
+
in Original or Modified Versions, may be sold by itself.
|
|
54
|
+
|
|
55
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
56
|
+
redistributed and/or sold with any software, provided that each copy
|
|
57
|
+
contains the above copyright notice and this license. These can be
|
|
58
|
+
included either as stand-alone text files, human-readable headers or
|
|
59
|
+
in the appropriate machine-readable metadata fields within text or
|
|
60
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
61
|
+
|
|
62
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
63
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
64
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
65
|
+
presented to the users.
|
|
66
|
+
|
|
67
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
68
|
+
Software shall not be used to promote, endorse or advertise any
|
|
69
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
70
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
71
|
+
permission.
|
|
72
|
+
|
|
73
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
74
|
+
must be distributed entirely under this license, and must not be
|
|
75
|
+
distributed under any other license. The requirement for fonts to
|
|
76
|
+
remain under this license does not apply to any document created
|
|
77
|
+
using the Font Software.
|
|
78
|
+
|
|
79
|
+
TERMINATION
|
|
80
|
+
This license becomes null and void if any of the above conditions are
|
|
81
|
+
not met.
|
|
82
|
+
|
|
83
|
+
DISCLAIMER
|
|
84
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
85
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
86
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
87
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
88
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
89
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
90
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
91
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
92
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/assets/komet.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Ebene_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 288.08 89.63"><defs><style>.cls-1{fill:#00e676;}</style></defs><g id="Logo"><g id="Bildmaterial_6"><path class="cls-1" d="M0,89.63l220.2-14.78c11.65-.78,23.38-2.66,33.31-5.14s22.92-8.94,29.16-19.41c3.65-6.12,5.09-13.73,5.38-18.91,.27-4.94-.99-10.2-2.54-13.33-2.76-5.55-6.11-8.42-8.55-10.26-2.45-1.84-7.55-5.77-18.08-7.35-10.53-1.58-29.62,1.2-44.31,5.84C199.87,10.92,0,89.63,0,89.63Z"/></g></g></svg>
|
package/assets/logo.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 181.58 28.42"><defs><style>.e{fill:#00e476;}</style></defs><g id="a"></g><g id="b"><g id="c"><g id="d"><g><path class="e" d="M91.43,.56h-7.14l-15.15,27.23h6.75l2.97-5.45h10.07l.99,5.45h6.71L91.43,.56Zm-9.27,16.34l4.22-7.67,1.35,7.67h-5.57Z"></path><polygon class="e" points="25.28 .56 16.32 17.63 13.3 .56 4.79 .56 0 27.79 6.65 27.79 9.54 11.6 12.37 27.79 16.99 27.79 25.5 11.6 22.62 27.79 29.31 27.79 34.1 .56 25.28 .56"></polygon><path class="e" d="M112.16,18.71h4.24c-.77,2.03-2.8,3.48-5.37,3.48-3.43,0-5.51-2.57-5.51-6.41,0-5.51,2.84-9.48,7.18-9.48,2.48,0,4.06,1.31,4.47,3.34h7.13c-.4-5.56-4.48-9.64-11.39-9.64-8.52,0-14.61,7.17-14.61,15.91,0,7.35,4.84,12.51,12.51,12.51,6.86,0,11.92-4.66,13.04-11.25l.67-3.9h-11.41l-.95,5.45Z"></path><path class="e" d="M140.37,.59c-8.01,0-14.27,6.57-14.27,15.54,0,7.14,4.64,12.22,12.08,12.22,8.01,0,14.27-6.57,14.27-15.54,0-7.14-4.64-12.22-12.08-12.22Zm-1.97,21.59c-3.2,0-5.21-2.58-5.21-6.22,0-5.69,3.02-9.2,6.96-9.2,3.2,0,5.21,2.58,5.21,6.22,0,5.69-3.06,9.2-6.96,9.2Z"></path><polygon class="e" points="174.71 .56 171.96 16.04 164.02 .56 157.63 .56 152.84 27.79 159.72 27.79 162.6 11.38 171.29 27.79 176.79 27.79 181.58 .56 174.71 .56"></polygon><path class="e" d="M33.84,27.79h7.05l2.64-15.02c-3.57-.15-6.43-.29-6.99-.31l-2.7,15.34Z"></path><polygon class="e" points="38.57 .56 36.55 12.07 43.98 9.91 45.62 .56 38.57 .56"></polygon><path class="e" d="M70.7,8.54c0-5.06-3.33-7.98-8.69-7.98h-11.75l-1.41,8.01,8.17-2.37s3.51-1.11,5.05-.56c4.13,1.5,2.65,6.76-1.79,7.26-1.54,.17-6.89,.04-12.16-.14l-2.64,15.03h7.03l1.61-9.08h2.73l4.38,9.08h7.49l-4.92-9.76c4.04-1.37,6.92-4.61,6.92-9.49Z"></path></g></g></g></g></svg>
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Agenda — the red thread at the chapter level (STATIC world, no shader).
|
|
4
|
+
*
|
|
5
|
+
* A clickable stepper across the deck's chapters (numbered dots strung on one
|
|
6
|
+
* continuous line, chapter labels centred above each dot); below it, the slides
|
|
7
|
+
* of the selected chapter render as LIVE miniature previews (the same mechanism
|
|
8
|
+
* the Slidev overview uses, not iframes or screenshots) and auto-fit the
|
|
9
|
+
* remaining space, shrinking as a chapter holds more slides. Clicking a chapter
|
|
10
|
+
* switches the preview; clicking a mini jumps to that slide. Because chapters
|
|
11
|
+
* and slides are read from the live deck, the agenda updates itself.
|
|
12
|
+
*
|
|
13
|
+
* Chapters are discovered automatically: every `layout: section` slide starts a
|
|
14
|
+
* chapter, and the slides up to the next section belong to it.
|
|
15
|
+
*
|
|
16
|
+
* Frontmatter / props:
|
|
17
|
+
* eyebrow — uppercase kicker (default "Agenda")
|
|
18
|
+
* title — optional h2-level title
|
|
19
|
+
* accent — "blue" | "green" | "mixed" (default mixed)
|
|
20
|
+
*/
|
|
21
|
+
import { computed, ref, watch } from 'vue'
|
|
22
|
+
import { useElementSize } from '@vueuse/core'
|
|
23
|
+
import { useNav } from '@slidev/client'
|
|
24
|
+
// The `.ts` extension is required for Vite to resolve these deep imports (the
|
|
25
|
+
// @slidev/client `exports` map is `"./*": "./*"`, which adds no extension), but
|
|
26
|
+
// tsc/Volar reject it without `allowImportingTsExtensions`; suppress there.
|
|
27
|
+
// @ts-ignore - .ts extension needed for Vite resolution, not for type-checking
|
|
28
|
+
import { createFixedClicks } from '@slidev/client/composables/useClicks.ts'
|
|
29
|
+
// @ts-ignore - .ts extension needed for Vite resolution, not for type-checking
|
|
30
|
+
import { CLICKS_MAX } from '@slidev/client/constants.ts'
|
|
31
|
+
import SlideContainer from '@slidev/client/internals/SlideContainer.vue'
|
|
32
|
+
import SlideWrapper from '@slidev/client/internals/SlideWrapper.vue'
|
|
33
|
+
|
|
34
|
+
const props = withDefaults(
|
|
35
|
+
defineProps<{
|
|
36
|
+
eyebrow?: string
|
|
37
|
+
title?: string
|
|
38
|
+
accent?: 'blue' | 'green' | 'mixed'
|
|
39
|
+
}>(),
|
|
40
|
+
{ eyebrow: 'Agenda', accent: 'mixed' },
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
const { slides, go, currentPage } = useNav()
|
|
44
|
+
|
|
45
|
+
const gradientVar = computed(() => `var(--miragon-gradient-${props.accent})`)
|
|
46
|
+
const accentVar = computed(() =>
|
|
47
|
+
props.accent === 'green' ? 'var(--miragon-green-deep)' : 'var(--miragon-blue)',
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
// Markdown bold (** **) survives into the auto-extracted title; strip it.
|
|
51
|
+
function clean(s?: string) {
|
|
52
|
+
return (s ?? '').replace(/\*\*/g, '').trim()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface Chapter {
|
|
56
|
+
no: number
|
|
57
|
+
eyebrow: string
|
|
58
|
+
title: string
|
|
59
|
+
routes: any[]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Walk the deck once: each `layout: section` slide opens a chapter, every slide
|
|
63
|
+
// after it (until the next section) belongs to that chapter. Slides before the
|
|
64
|
+
// first section (cover, this agenda) are intentionally ignored.
|
|
65
|
+
const chapters = computed<Chapter[]>(() => {
|
|
66
|
+
const out: Chapter[] = []
|
|
67
|
+
// slides.value is typed loosely (SlideRoute's deep types don't resolve in the
|
|
68
|
+
// editor), so annotate as any[] to read .meta/.no without TS2339.
|
|
69
|
+
for (const route of slides.value as any[]) {
|
|
70
|
+
const fm = route.meta?.slide?.frontmatter ?? {}
|
|
71
|
+
if (fm.layout === 'section') {
|
|
72
|
+
const n = out.length + 1
|
|
73
|
+
out.push({
|
|
74
|
+
no: route.no,
|
|
75
|
+
eyebrow: clean(fm.eyebrow) || `Chapter ${n}`,
|
|
76
|
+
title: clean(route.meta?.slide?.title) || clean(fm.eyebrow) || `Chapter ${n}`,
|
|
77
|
+
routes: [route],
|
|
78
|
+
})
|
|
79
|
+
} else if (out.length) {
|
|
80
|
+
out[out.length - 1].routes.push(route)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return out
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const selected = ref(0)
|
|
87
|
+
|
|
88
|
+
// Keep the selection valid and follow the live position: if the deck is on a
|
|
89
|
+
// slide that lives inside a chapter, preselect that chapter.
|
|
90
|
+
watch(
|
|
91
|
+
[chapters, currentPage],
|
|
92
|
+
([chs, page]) => {
|
|
93
|
+
if (selected.value >= chs.length) selected.value = 0
|
|
94
|
+
const idx = chs.findIndex(
|
|
95
|
+
(c, i) => page >= c.no && (i === chs.length - 1 || page < chs[i + 1].no),
|
|
96
|
+
)
|
|
97
|
+
if (idx >= 0) selected.value = idx
|
|
98
|
+
},
|
|
99
|
+
{ immediate: true },
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
const activeChapter = computed(() => chapters.value[selected.value])
|
|
103
|
+
|
|
104
|
+
// A chapter of up to MAX_MINIS slides renders cleanly in the available height.
|
|
105
|
+
// ALL slides are always rendered, but the mini size is computed as if the
|
|
106
|
+
// chapter held at most MAX_MINIS: so the frame size never shrinks below the
|
|
107
|
+
// clean 21-slide size, and any slides past that simply extend below the fold,
|
|
108
|
+
// reachable by scrolling the preview.
|
|
109
|
+
const MAX_MINIS = 21
|
|
110
|
+
|
|
111
|
+
// Above five chapters the single row of labels crowds. Stagger them above/below
|
|
112
|
+
// the line (chapter 1 above, 2 below, ...) so each label only neighbours the one
|
|
113
|
+
// two steps away, which roughly doubles its horizontal breathing room.
|
|
114
|
+
const alternate = computed(() => chapters.value.length > 5)
|
|
115
|
+
|
|
116
|
+
// Geometry of the connecting thread: dots are centred in their equal columns,
|
|
117
|
+
// so the line runs from the first dot centre to the last, and the coloured fill
|
|
118
|
+
// reaches the selected dot.
|
|
119
|
+
const trackLeft = computed(() => `${50 / chapters.value.length}%`)
|
|
120
|
+
const trackWidth = computed(() => `${((chapters.value.length - 1) * 100) / chapters.value.length}%`)
|
|
121
|
+
const fillWidth = computed(() => `${(selected.value * 100) / chapters.value.length}%`)
|
|
122
|
+
|
|
123
|
+
// A mini renders at fixed clicks (fully revealed). Cache one context per route.
|
|
124
|
+
const clicksCtx = new WeakMap<object, ReturnType<typeof createFixedClicks>>()
|
|
125
|
+
function ctxFor(route: any) {
|
|
126
|
+
if (!clicksCtx.has(route)) clicksCtx.set(route, createFixedClicks(route, CLICKS_MAX))
|
|
127
|
+
return clicksCtx.get(route)!
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Auto-fit the minis into whatever space is left below the stepper: measure the
|
|
131
|
+
// stage, then pick the largest mini width whose grid (N items, 16:9) still fits
|
|
132
|
+
// both the width and the remaining height. More slides => more rows => smaller.
|
|
133
|
+
const stage = ref<HTMLElement | null>(null)
|
|
134
|
+
const { width: stageW, height: stageH } = useElementSize(stage)
|
|
135
|
+
const GAP = 16
|
|
136
|
+
const ASPECT = 16 / 9
|
|
137
|
+
const MAX_W = 320
|
|
138
|
+
|
|
139
|
+
const miniWidth = computed(() => {
|
|
140
|
+
// Size as if the chapter held at most MAX_MINIS slides, so the frame never
|
|
141
|
+
// shrinks below the clean 21-slide size; extra slides scroll below the fold.
|
|
142
|
+
const n = Math.min(activeChapter.value?.routes.length ?? 0, MAX_MINIS)
|
|
143
|
+
const W = stageW.value
|
|
144
|
+
const H = stageH.value
|
|
145
|
+
if (!n || W < 1 || H < 1) return 200
|
|
146
|
+
let best = 0
|
|
147
|
+
for (let cols = 1; cols <= n; cols++) {
|
|
148
|
+
const rows = Math.ceil(n / cols)
|
|
149
|
+
const w = (W - (cols - 1) * GAP) / cols
|
|
150
|
+
const totalH = rows * (w / ASPECT) + (rows - 1) * GAP
|
|
151
|
+
if (totalH <= H && w > best) best = w
|
|
152
|
+
}
|
|
153
|
+
if (!best) best = (W - (n - 1) * GAP) / n // never larger than one row across
|
|
154
|
+
return Math.max(96, Math.min(best, MAX_W))
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
// After a click, drop focus off the <button> back to the document, otherwise the
|
|
158
|
+
// focused button swallows Slidev's arrow-key navigation and the next-slide key
|
|
159
|
+
// stops working until the user clicks the slide again.
|
|
160
|
+
function selectChapter(i: number, ev: MouseEvent) {
|
|
161
|
+
selected.value = i
|
|
162
|
+
;(ev.currentTarget as HTMLElement | null)?.blur()
|
|
163
|
+
}
|
|
164
|
+
function openSlide(no: number, ev: MouseEvent) {
|
|
165
|
+
;(ev.currentTarget as HTMLElement | null)?.blur()
|
|
166
|
+
go(no)
|
|
167
|
+
}
|
|
168
|
+
</script>
|
|
169
|
+
|
|
170
|
+
<template>
|
|
171
|
+
<div class="agenda-layout" :style="{ '--ag-grad': gradientVar, '--ag-accent': accentVar }">
|
|
172
|
+
<div class="agenda-inner">
|
|
173
|
+
<header class="agenda-head">
|
|
174
|
+
<span class="agenda-bar" aria-hidden="true"></span>
|
|
175
|
+
<div v-if="eyebrow" class="agenda-eyebrow">{{ eyebrow }}</div>
|
|
176
|
+
<h2 v-if="title" class="agenda-title">{{ title }}</h2>
|
|
177
|
+
</header>
|
|
178
|
+
|
|
179
|
+
<!-- Stepper: labels centred above numbered dots strung on one line. -->
|
|
180
|
+
<nav class="agenda-stepper" :class="{ 'is-alternating': alternate }" aria-label="Chapters">
|
|
181
|
+
<div class="track" aria-hidden="true">
|
|
182
|
+
<span class="track-line" :style="{ left: trackLeft, width: trackWidth }"></span>
|
|
183
|
+
<span class="track-fill" :style="{ left: trackLeft, width: fillWidth }"></span>
|
|
184
|
+
</div>
|
|
185
|
+
<button
|
|
186
|
+
v-for="(ch, i) in chapters"
|
|
187
|
+
:key="ch.no"
|
|
188
|
+
type="button"
|
|
189
|
+
class="step"
|
|
190
|
+
:class="{ 'is-active': i === selected, 'is-done': i < selected, 'label-below': alternate && i % 2 === 1 }"
|
|
191
|
+
@click="selectChapter(i, $event)"
|
|
192
|
+
>
|
|
193
|
+
<span class="step-meta">
|
|
194
|
+
<span class="step-eyebrow">{{ ch.eyebrow }}</span>
|
|
195
|
+
<span class="step-label">{{ ch.title }}</span>
|
|
196
|
+
</span>
|
|
197
|
+
<span class="step-dot"><span class="step-num">{{ i + 1 }}</span></span>
|
|
198
|
+
</button>
|
|
199
|
+
</nav>
|
|
200
|
+
|
|
201
|
+
<!-- Preview: the selected chapter's slides as live miniatures, auto-fit. -->
|
|
202
|
+
<div class="agenda-preview">
|
|
203
|
+
<div ref="stage" class="preview-stage">
|
|
204
|
+
<transition name="fade-preview" mode="out-in">
|
|
205
|
+
<div :key="selected" class="preview-row">
|
|
206
|
+
<button
|
|
207
|
+
v-for="route in activeChapter?.routes"
|
|
208
|
+
:key="route.no"
|
|
209
|
+
type="button"
|
|
210
|
+
class="mini"
|
|
211
|
+
:style="{ width: `${miniWidth}px` }"
|
|
212
|
+
:title="`Go to slide ${route.no}`"
|
|
213
|
+
@click="openSlide(route.no, $event)"
|
|
214
|
+
>
|
|
215
|
+
<SlideContainer :width="miniWidth" class="mini-frame">
|
|
216
|
+
<SlideWrapper :clicks-context="ctxFor(route)" :route="route" render-context="overview" />
|
|
217
|
+
</SlideContainer>
|
|
218
|
+
<span class="mini-no">{{ route.no }}</span>
|
|
219
|
+
</button>
|
|
220
|
+
</div>
|
|
221
|
+
</transition>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
</template>
|
|
227
|
+
|
|
228
|
+
<style scoped>
|
|
229
|
+
.agenda-layout {
|
|
230
|
+
/* Declared so the custom properties resolve statically (linter + fallback);
|
|
231
|
+
the inline :style binding on this element overrides them at runtime. */
|
|
232
|
+
--ag-grad: var(--miragon-gradient-mixed);
|
|
233
|
+
--ag-accent: var(--miragon-blue);
|
|
234
|
+
position: absolute;
|
|
235
|
+
inset: 0;
|
|
236
|
+
width: 100%;
|
|
237
|
+
height: 100%;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
background: var(--miragon-gray-bg);
|
|
240
|
+
color: var(--miragon-text-primary);
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: stretch;
|
|
243
|
+
}
|
|
244
|
+
.agenda-inner {
|
|
245
|
+
position: relative;
|
|
246
|
+
z-index: 1;
|
|
247
|
+
width: 100%;
|
|
248
|
+
max-width: 76rem;
|
|
249
|
+
margin: 0 auto;
|
|
250
|
+
padding: 2.4rem 3.6rem 2.1rem;
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.agenda-head {
|
|
256
|
+
flex: 0 0 auto;
|
|
257
|
+
margin-bottom: 1.4rem;
|
|
258
|
+
}
|
|
259
|
+
.agenda-bar {
|
|
260
|
+
display: block;
|
|
261
|
+
width: 3.5rem;
|
|
262
|
+
height: 0.35rem;
|
|
263
|
+
border-radius: 999px;
|
|
264
|
+
background: var(--ag-grad);
|
|
265
|
+
margin-bottom: 0.85rem;
|
|
266
|
+
}
|
|
267
|
+
.agenda-eyebrow {
|
|
268
|
+
font-size: 0.9rem;
|
|
269
|
+
font-weight: 600;
|
|
270
|
+
letter-spacing: 0.18em;
|
|
271
|
+
text-transform: uppercase;
|
|
272
|
+
color: var(--ag-accent);
|
|
273
|
+
margin-bottom: 0.5rem;
|
|
274
|
+
}
|
|
275
|
+
.agenda-title {
|
|
276
|
+
font-size: clamp(1.6rem, 2.6vw, 2.1rem);
|
|
277
|
+
line-height: 1.15;
|
|
278
|
+
font-weight: 800;
|
|
279
|
+
letter-spacing: -0.02em;
|
|
280
|
+
margin: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* ---- Stepper ------------------------------------------------------------ */
|
|
284
|
+
.agenda-stepper {
|
|
285
|
+
position: relative;
|
|
286
|
+
flex: 0 0 auto;
|
|
287
|
+
display: grid;
|
|
288
|
+
grid-auto-flow: column;
|
|
289
|
+
grid-auto-columns: 1fr;
|
|
290
|
+
align-items: end;
|
|
291
|
+
margin-bottom: 1.5rem;
|
|
292
|
+
}
|
|
293
|
+
/* the one continuous thread, drawn through the dot centres */
|
|
294
|
+
.track {
|
|
295
|
+
position: absolute;
|
|
296
|
+
left: 0;
|
|
297
|
+
right: 0;
|
|
298
|
+
bottom: 1.1rem; /* == dot radius, so the line runs through the dots */
|
|
299
|
+
height: 0;
|
|
300
|
+
z-index: 0;
|
|
301
|
+
}
|
|
302
|
+
.track-line,
|
|
303
|
+
.track-fill {
|
|
304
|
+
position: absolute;
|
|
305
|
+
top: -0.09rem;
|
|
306
|
+
height: 0.18rem;
|
|
307
|
+
border-radius: 999px;
|
|
308
|
+
}
|
|
309
|
+
.track-line { background: #E2E6F0; }
|
|
310
|
+
.track-fill { background: var(--ag-accent); transition: width 320ms cubic-bezier(0.2, 0.7, 0.2, 1); }
|
|
311
|
+
|
|
312
|
+
.step {
|
|
313
|
+
position: relative;
|
|
314
|
+
z-index: 1;
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
align-items: center;
|
|
318
|
+
justify-content: flex-end;
|
|
319
|
+
gap: 0.7rem;
|
|
320
|
+
text-align: center;
|
|
321
|
+
background: none;
|
|
322
|
+
border: 0;
|
|
323
|
+
padding: 0 0.5rem;
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
font: inherit;
|
|
326
|
+
color: inherit;
|
|
327
|
+
}
|
|
328
|
+
.step-meta {
|
|
329
|
+
display: flex;
|
|
330
|
+
flex-direction: column;
|
|
331
|
+
align-items: center;
|
|
332
|
+
gap: 0.15rem;
|
|
333
|
+
max-width: 100%;
|
|
334
|
+
}
|
|
335
|
+
.step-eyebrow {
|
|
336
|
+
font-size: 0.66rem;
|
|
337
|
+
font-weight: 700;
|
|
338
|
+
letter-spacing: 0.13em;
|
|
339
|
+
text-transform: uppercase;
|
|
340
|
+
color: var(--miragon-text-muted);
|
|
341
|
+
white-space: nowrap;
|
|
342
|
+
}
|
|
343
|
+
.step-label {
|
|
344
|
+
font-size: 1.04rem;
|
|
345
|
+
font-weight: 700;
|
|
346
|
+
letter-spacing: -0.01em;
|
|
347
|
+
color: var(--miragon-text-primary);
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
overflow: hidden;
|
|
350
|
+
text-overflow: ellipsis;
|
|
351
|
+
max-width: 100%;
|
|
352
|
+
transition: color 280ms ease;
|
|
353
|
+
}
|
|
354
|
+
.step.is-active .step-label { color: var(--ag-accent); }
|
|
355
|
+
|
|
356
|
+
.step-dot {
|
|
357
|
+
position: relative;
|
|
358
|
+
z-index: 1;
|
|
359
|
+
width: 2.2rem;
|
|
360
|
+
height: 2.2rem;
|
|
361
|
+
border-radius: 999px;
|
|
362
|
+
display: grid;
|
|
363
|
+
place-items: center;
|
|
364
|
+
background: var(--miragon-white);
|
|
365
|
+
border: 2px solid #E2E6F0;
|
|
366
|
+
box-shadow: 0 4px 12px rgba(51, 93, 229, 0.08);
|
|
367
|
+
transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 280ms ease, background 280ms ease;
|
|
368
|
+
}
|
|
369
|
+
.step-num {
|
|
370
|
+
font-size: 0.95rem;
|
|
371
|
+
font-weight: 700;
|
|
372
|
+
color: var(--miragon-text-muted);
|
|
373
|
+
transition: color 280ms ease;
|
|
374
|
+
}
|
|
375
|
+
.step.is-done .step-dot { border-color: var(--ag-accent); }
|
|
376
|
+
.step.is-done .step-num { color: var(--ag-accent); }
|
|
377
|
+
/* Solid accent fill, not the mixed gradient: on a small circle the blue->green
|
|
378
|
+
gradient muddies into an ugly green corner. Flat fill, border matches the fill
|
|
379
|
+
so no inner ring (no inset sheen) shows through. */
|
|
380
|
+
.step.is-active .step-dot {
|
|
381
|
+
background: var(--ag-accent);
|
|
382
|
+
border-color: var(--ag-accent);
|
|
383
|
+
box-shadow: 0 6px 16px rgba(51, 93, 229, 0.28);
|
|
384
|
+
transform: scale(1.1);
|
|
385
|
+
}
|
|
386
|
+
.step.is-active .step-num { color: var(--miragon-white); }
|
|
387
|
+
|
|
388
|
+
/* ---- Alternating labels (only above five chapters) ---------------------- */
|
|
389
|
+
/* One label row crowds past five chapters, so stagger labels above/below the
|
|
390
|
+
line. Each step becomes a grid with FIXED, EQUAL top and bottom zones and the
|
|
391
|
+
dot in the centre row, so every dot lands dead centre on the one line no
|
|
392
|
+
matter which side carries the label. Labels are single-line (nowrap), so a
|
|
393
|
+
fixed zone always fits eyebrow + title. */
|
|
394
|
+
.agenda-stepper.is-alternating {
|
|
395
|
+
align-items: stretch;
|
|
396
|
+
}
|
|
397
|
+
/* Only the dot stays in flow (a fixed 2.2rem, far under a 1fr column), so the
|
|
398
|
+
columns remain strictly equal and the dots are evenly spaced. Each label is
|
|
399
|
+
taken OUT of flow (absolute) and centred on its own dot, above for odd
|
|
400
|
+
chapters and below for even ones, so a wide label can never widen its column
|
|
401
|
+
and throw the spacing off. */
|
|
402
|
+
.agenda-stepper.is-alternating .step {
|
|
403
|
+
position: relative;
|
|
404
|
+
min-width: 0;
|
|
405
|
+
height: 8rem;
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-direction: column;
|
|
408
|
+
align-items: center;
|
|
409
|
+
justify-content: center;
|
|
410
|
+
gap: 0;
|
|
411
|
+
}
|
|
412
|
+
.agenda-stepper.is-alternating .step-meta {
|
|
413
|
+
position: absolute;
|
|
414
|
+
left: 50%;
|
|
415
|
+
transform: translateX(-50%);
|
|
416
|
+
width: max-content;
|
|
417
|
+
bottom: calc(50% + 1.7rem);
|
|
418
|
+
}
|
|
419
|
+
.agenda-stepper.is-alternating .step.label-below .step-meta {
|
|
420
|
+
top: calc(50% + 1.7rem);
|
|
421
|
+
bottom: auto;
|
|
422
|
+
/* Flip eyebrow/title so the title sits next to the line and "Kapitel 0X" stays
|
|
423
|
+
on the outer edge, mirroring the row above. */
|
|
424
|
+
flex-direction: column-reverse;
|
|
425
|
+
}
|
|
426
|
+
/* Labels are centred on their dot and same-level neighbours are two steps apart,
|
|
427
|
+
so show them at full width instead of clipping to one column. */
|
|
428
|
+
.agenda-stepper.is-alternating .step-label {
|
|
429
|
+
overflow: visible;
|
|
430
|
+
text-overflow: clip;
|
|
431
|
+
max-width: none;
|
|
432
|
+
}
|
|
433
|
+
/* The thread runs through the vertically centred dots. */
|
|
434
|
+
.agenda-stepper.is-alternating .track {
|
|
435
|
+
top: 50%;
|
|
436
|
+
bottom: auto;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* ---- Preview ------------------------------------------------------------ */
|
|
440
|
+
.agenda-preview {
|
|
441
|
+
flex: 1 1 auto;
|
|
442
|
+
min-height: 0;
|
|
443
|
+
display: flex;
|
|
444
|
+
flex-direction: column;
|
|
445
|
+
}
|
|
446
|
+
.preview-stage {
|
|
447
|
+
flex: 1 1 auto;
|
|
448
|
+
min-height: 0;
|
|
449
|
+
/* Safety net: minis are sized to fit up to MAX_MINIS within this height, but
|
|
450
|
+
if a capped chapter still overflows (short viewport), scroll to reach the
|
|
451
|
+
rest rather than clip or shrink them further. */
|
|
452
|
+
overflow-y: auto;
|
|
453
|
+
}
|
|
454
|
+
.preview-row {
|
|
455
|
+
min-height: 100%;
|
|
456
|
+
display: flex;
|
|
457
|
+
flex-wrap: wrap;
|
|
458
|
+
/* `safe` centers when the minis fit, but falls back to top-alignment once the
|
|
459
|
+
chapter overflows, so the first row never lands above the scroll origin
|
|
460
|
+
(where it would be unreachable). */
|
|
461
|
+
align-content: safe center;
|
|
462
|
+
justify-content: center;
|
|
463
|
+
gap: 16px;
|
|
464
|
+
}
|
|
465
|
+
.mini {
|
|
466
|
+
position: relative;
|
|
467
|
+
display: block;
|
|
468
|
+
padding: 0;
|
|
469
|
+
border: 0;
|
|
470
|
+
background: none;
|
|
471
|
+
cursor: pointer;
|
|
472
|
+
border-radius: 0.7rem;
|
|
473
|
+
transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
|
|
474
|
+
}
|
|
475
|
+
.mini:hover { transform: translateY(-4px); }
|
|
476
|
+
.mini-frame {
|
|
477
|
+
border-radius: 0.7rem;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
border: 1px solid #E5E7EB;
|
|
480
|
+
box-shadow: 0 10px 24px rgba(51, 93, 229, 0.12);
|
|
481
|
+
pointer-events: none;
|
|
482
|
+
transition: border-color 280ms ease, box-shadow 280ms ease;
|
|
483
|
+
}
|
|
484
|
+
.mini:hover .mini-frame,
|
|
485
|
+
.mini:focus-visible .mini-frame {
|
|
486
|
+
border-color: var(--ag-accent);
|
|
487
|
+
box-shadow: 0 16px 34px rgba(51, 93, 229, 0.2);
|
|
488
|
+
}
|
|
489
|
+
.mini-frame :deep(*) { user-select: none; }
|
|
490
|
+
.mini:focus-visible { outline: none; }
|
|
491
|
+
.mini-no {
|
|
492
|
+
position: absolute;
|
|
493
|
+
top: 0.35rem;
|
|
494
|
+
right: 0.35rem;
|
|
495
|
+
display: inline-grid;
|
|
496
|
+
place-items: center;
|
|
497
|
+
min-width: 1.05rem;
|
|
498
|
+
height: 1.05rem;
|
|
499
|
+
padding: 0 0.28rem;
|
|
500
|
+
border-radius: 0.35rem;
|
|
501
|
+
background: rgba(15, 23, 42, 0.72);
|
|
502
|
+
color: var(--miragon-white);
|
|
503
|
+
font-size: 0.6rem;
|
|
504
|
+
font-weight: 700;
|
|
505
|
+
letter-spacing: 0.02em;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.fade-preview-enter-active,
|
|
509
|
+
.fade-preview-leave-active {
|
|
510
|
+
transition: opacity 200ms ease, transform 200ms ease;
|
|
511
|
+
}
|
|
512
|
+
.fade-preview-enter-from,
|
|
513
|
+
.fade-preview-leave-to {
|
|
514
|
+
opacity: 0;
|
|
515
|
+
transform: translateY(6px);
|
|
516
|
+
}
|
|
517
|
+
</style>
|