slidev-theme-neversink 0.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/.github/workflows/deploy.yml +67 -0
- package/.prettierrc +15 -0
- package/.vscode/settings.json +4 -0
- package/LICENSE +21 -0
- package/README.md +112 -0
- package/assets/nyu_long_black_on_white.svg +41 -0
- package/components/Admonition.vue +80 -0
- package/components/AdmonitionType.vue +56 -0
- package/components/CreditScroll.vue +94 -0
- package/components/SpeechBubble.vue +294 -0
- package/components/StickyNote.vue +71 -0
- package/components/vue3-kawaii/README.md +5 -0
- package/components/vue3-kawaii/components/backpack/BackPack.vue +123 -0
- package/components/vue3-kawaii/components/backpack/backpackpaths.js +17 -0
- package/components/vue3-kawaii/components/browser/Browser.vue +56 -0
- package/components/vue3-kawaii/components/browser/browserpaths.js +9 -0
- package/components/vue3-kawaii/components/cat/Cat.vue +89 -0
- package/components/vue3-kawaii/components/cat/catpaths.js +8 -0
- package/components/vue3-kawaii/components/common/face/Face.vue +95 -0
- package/components/vue3-kawaii/components/common/face/facepaths.js +24 -0
- package/components/vue3-kawaii/components/common/wrapper/Wrapper.vue +24 -0
- package/components/vue3-kawaii/components/creditCard/CreditCard.vue +47 -0
- package/components/vue3-kawaii/components/creditCard/creditcardpaths.js +8 -0
- package/components/vue3-kawaii/components/ghost/Ghost.vue +48 -0
- package/components/vue3-kawaii/components/ghost/ghostpaths.js +8 -0
- package/components/vue3-kawaii/components/iceCream/IceCream.vue +49 -0
- package/components/vue3-kawaii/components/iceCream/icecreampaths.js +9 -0
- package/components/vue3-kawaii/components/mug/Mug.vue +48 -0
- package/components/vue3-kawaii/components/mug/mugpaths.js +7 -0
- package/components/vue3-kawaii/components/planet/Planet.vue +58 -0
- package/components/vue3-kawaii/components/planet/planetpaths.js +7 -0
- package/components/vue3-kawaii/components/speechBubble/SpeechBubbleGuy.vue +63 -0
- package/components/vue3-kawaii/components/speechBubble/speechbubblepaths.js +8 -0
- package/components/vue3-kawaii/utils/getUniqueId.js +10 -0
- package/docs/.vitepress/config.js +75 -0
- package/docs/.vitepress/theme/index.js +50 -0
- package/docs/.vitepress/theme/style.css +145 -0
- package/docs/api-examples.md +49 -0
- package/docs/branding.md +43 -0
- package/docs/colors.md +108 -0
- package/docs/components/admonitions.md +106 -0
- package/docs/components/creditscroll.md +1 -0
- package/docs/components/kawaii.md +26 -0
- package/docs/components/qrcode.md +24 -0
- package/docs/components/speechbubble.md +69 -0
- package/docs/components/stickynote.md +54 -0
- package/docs/components.md +19 -0
- package/docs/contributing.md +5 -0
- package/docs/customizing.md +38 -0
- package/docs/getting-started.md +32 -0
- package/docs/index.md +19 -0
- package/docs/layouts/cover.md +69 -0
- package/docs/layouts/credits.md +111 -0
- package/docs/layouts/default.md +88 -0
- package/docs/layouts/full.md +131 -0
- package/docs/layouts/intro.md +63 -0
- package/docs/layouts/quote.md +51 -0
- package/docs/layouts/section.md +67 -0
- package/docs/layouts/side-title.md +180 -0
- package/docs/layouts/top-title-two-cols.md +171 -0
- package/docs/layouts/top-title.md +103 -0
- package/docs/layouts/two-cols-title.md +273 -0
- package/docs/layouts.md +92 -0
- package/docs/markdown-examples.md +85 -0
- package/docs/markdown.md +87 -0
- package/docs/parts/columnsystem.md +18 -0
- package/docs/parts/layoutpicker.md +73 -0
- package/docs/public/deck.png +0 -0
- package/docs/public/layouts/side-title-12row.svg +27 -0
- package/docs/public/layouts/side-title-is-3.svg +7 -0
- package/docs/public/layouts/side-title-is-6.svg +7 -0
- package/docs/public/layouts/side-title-side.svg +13 -0
- package/docs/public/layouts/two-col-title-12row.svg +31 -0
- package/docs/public/layouts/two-col-title-align.svg +13 -0
- package/docs/public/layouts/two-col-title-is-4.svg +23 -0
- package/docs/public/layouts/two-col-title-is-6.svg +23 -0
- package/docs/public/layouts/two-col-title-titlepos.svg +31 -0
- package/docs/public/screenshots/1.png +0 -0
- package/docs/public/screenshots/10.png +0 -0
- package/docs/public/screenshots/11.png +0 -0
- package/docs/public/screenshots/12.png +0 -0
- package/docs/public/screenshots/13.png +0 -0
- package/docs/public/screenshots/14.png +0 -0
- package/docs/public/screenshots/15.png +0 -0
- package/docs/public/screenshots/16.png +0 -0
- package/docs/public/screenshots/17.png +0 -0
- package/docs/public/screenshots/18.png +0 -0
- package/docs/public/screenshots/19.png +0 -0
- package/docs/public/screenshots/2.png +0 -0
- package/docs/public/screenshots/20.png +0 -0
- package/docs/public/screenshots/21.png +0 -0
- package/docs/public/screenshots/22.png +0 -0
- package/docs/public/screenshots/23.png +0 -0
- package/docs/public/screenshots/24.png +0 -0
- package/docs/public/screenshots/25.png +0 -0
- package/docs/public/screenshots/26.png +0 -0
- package/docs/public/screenshots/27.png +0 -0
- package/docs/public/screenshots/28.png +0 -0
- package/docs/public/screenshots/29.png +0 -0
- package/docs/public/screenshots/3.png +0 -0
- package/docs/public/screenshots/30.png +0 -0
- package/docs/public/screenshots/31.png +0 -0
- package/docs/public/screenshots/32.png +0 -0
- package/docs/public/screenshots/33.png +0 -0
- package/docs/public/screenshots/34.png +0 -0
- package/docs/public/screenshots/35.png +0 -0
- package/docs/public/screenshots/36.png +0 -0
- package/docs/public/screenshots/37.png +0 -0
- package/docs/public/screenshots/38.png +0 -0
- package/docs/public/screenshots/4.png +0 -0
- package/docs/public/screenshots/5.png +0 -0
- package/docs/public/screenshots/6.png +0 -0
- package/docs/public/screenshots/7.png +0 -0
- package/docs/public/screenshots/8.png +0 -0
- package/docs/public/screenshots/9.png +0 -0
- package/example.md +1503 -0
- package/layoutHelper.ts +118 -0
- package/layouts/cover.vue +93 -0
- package/layouts/credits.vue +35 -0
- package/layouts/default.vue +18 -0
- package/layouts/four-cell.vue +210 -0
- package/layouts/full.vue +22 -0
- package/layouts/intro.vue +75 -0
- package/layouts/quote.vue +62 -0
- package/layouts/section.vue +84 -0
- package/layouts/side-title.vue +142 -0
- package/layouts/top-title-two-cols.vue +131 -0
- package/layouts/top-title.vue +63 -0
- package/layouts/two-cols-title.vue +176 -0
- package/layouts/two-cols.vue +141 -0
- package/package.json +54 -0
- package/public/images/photo.png +0 -0
- package/public/images/photo2.png +0 -0
- package/public/images/scatter1.png +0 -0
- package/public/images/scatter1.svg +20 -0
- package/screenshot.md +874 -0
- package/setup/main.ts +45 -0
- package/setup/shiki.ts +14 -0
- package/slide-bottom.vue +107 -0
- package/styles/base.css +240 -0
- package/styles/bubbles.css +4 -0
- package/styles/colors.css +12 -0
- package/styles/index.ts +11 -0
- package/styles/layouts.css +76 -0
- package/styles/stickynote.css +4 -0
- package/uno.config.ts +222 -0
- package/vite.config.ts +16 -0
package/layoutHelper.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolve urls from frontmatter and append with the base url
|
|
5
|
+
*/
|
|
6
|
+
export function resolveAssetUrl(url: string) {
|
|
7
|
+
if (url.startsWith('/')) return import.meta.env.BASE_URL + url.slice(1)
|
|
8
|
+
return url
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function handleBackground(background?: string, dim = false): CSSProperties {
|
|
12
|
+
const isColor = background && ['#', 'rgb', 'hsl'].some((v) => background.indexOf(v) === 0)
|
|
13
|
+
|
|
14
|
+
const style = {
|
|
15
|
+
background: isColor ? background : undefined,
|
|
16
|
+
color: background && !isColor ? 'white' : undefined,
|
|
17
|
+
backgroundImage: isColor
|
|
18
|
+
? undefined
|
|
19
|
+
: background
|
|
20
|
+
? dim
|
|
21
|
+
? `linear-gradient(#0005, #0008), url(${resolveAssetUrl(background)})`
|
|
22
|
+
: `url("${resolveAssetUrl(background)}")`
|
|
23
|
+
: undefined,
|
|
24
|
+
backgroundRepeat: 'no-repeat',
|
|
25
|
+
backgroundPosition: 'center',
|
|
26
|
+
backgroundSize: 'cover',
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (!style.background) delete style.background
|
|
30
|
+
|
|
31
|
+
return style
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function compute_alignment(val) {
|
|
35
|
+
switch (val) {
|
|
36
|
+
case 'ct':
|
|
37
|
+
return 'center top'
|
|
38
|
+
case 'cm':
|
|
39
|
+
return 'center middle'
|
|
40
|
+
case 'cb':
|
|
41
|
+
return 'center bottom'
|
|
42
|
+
case 'lt':
|
|
43
|
+
return 'left top'
|
|
44
|
+
case 'lm':
|
|
45
|
+
return 'left middle'
|
|
46
|
+
case 'lb':
|
|
47
|
+
return 'left bottom'
|
|
48
|
+
case 'rt':
|
|
49
|
+
return 'right top'
|
|
50
|
+
case 'rm':
|
|
51
|
+
return 'right middle'
|
|
52
|
+
case 'rb':
|
|
53
|
+
return 'right bottom'
|
|
54
|
+
case 'c':
|
|
55
|
+
return 'center top'
|
|
56
|
+
case 'l':
|
|
57
|
+
return 'left top'
|
|
58
|
+
case 'r':
|
|
59
|
+
return 'right top'
|
|
60
|
+
default:
|
|
61
|
+
return 'error'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function compute_size(left) {
|
|
66
|
+
return { l: left, r: 12 - left }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function compute_column_size(val) {
|
|
70
|
+
switch (val) {
|
|
71
|
+
case 'is-1':
|
|
72
|
+
case 'is-1-11':
|
|
73
|
+
case 'is-one-twelfth':
|
|
74
|
+
return compute_size(1)
|
|
75
|
+
case 'is-2':
|
|
76
|
+
case 'is-2-10':
|
|
77
|
+
case 'is-one-sixth':
|
|
78
|
+
return compute_size(2)
|
|
79
|
+
case 'is-3':
|
|
80
|
+
case 'is-3-9':
|
|
81
|
+
case 'is-one-quarter':
|
|
82
|
+
return compute_size(3)
|
|
83
|
+
case 'is-4':
|
|
84
|
+
case 'is-4-8':
|
|
85
|
+
case 'is-one-third':
|
|
86
|
+
return compute_size(4)
|
|
87
|
+
case 'is-5':
|
|
88
|
+
case 'is-5-7':
|
|
89
|
+
return compute_size(5)
|
|
90
|
+
case 'is-6':
|
|
91
|
+
case 'is-6-6':
|
|
92
|
+
case 'is-two-quarters':
|
|
93
|
+
case 'is-two-fourths':
|
|
94
|
+
case 'is-one-half':
|
|
95
|
+
case 'is-half':
|
|
96
|
+
return compute_size(6)
|
|
97
|
+
case 'is-7':
|
|
98
|
+
case 'is-7-5':
|
|
99
|
+
return compute_size(7)
|
|
100
|
+
case 'is-8':
|
|
101
|
+
case 'is-8-4':
|
|
102
|
+
case 'is-two-thirds':
|
|
103
|
+
return compute_size(8)
|
|
104
|
+
case 'is-9':
|
|
105
|
+
case 'is-9-3':
|
|
106
|
+
case 'is-three-quarters':
|
|
107
|
+
case 'three-fourths':
|
|
108
|
+
return compute_size(9)
|
|
109
|
+
case 'is-10':
|
|
110
|
+
case 'is-10-2':
|
|
111
|
+
return compute_size(10)
|
|
112
|
+
case 'is-11':
|
|
113
|
+
case 'is-11-1':
|
|
114
|
+
return compute_size(11)
|
|
115
|
+
default:
|
|
116
|
+
return 'error'
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup lang="js">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
//import { handleBackground } from '../layoutHelper'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
// background: {
|
|
7
|
+
// default: '',
|
|
8
|
+
// },
|
|
9
|
+
color: {
|
|
10
|
+
default: 'white',
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
//const style = computed(() => handleBackground(props.background, true))
|
|
15
|
+
|
|
16
|
+
const colorscheme = computed(() => {
|
|
17
|
+
return `neversink-${props.color}-scheme`
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div class="slidev-layout cover h-full slidecolor" :class="colorscheme">
|
|
23
|
+
<div class="my-auto w-full">
|
|
24
|
+
<slot />
|
|
25
|
+
</div>
|
|
26
|
+
<div class="absolute bottom-10">
|
|
27
|
+
<slot name="note" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
/* cover slide type */
|
|
34
|
+
|
|
35
|
+
.slidev-layout.cover {
|
|
36
|
+
font-family: var(--neversink-main-font);
|
|
37
|
+
font-weight: 300;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.slidev-layout.cover strong {
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slidev-layout.cover h1 {
|
|
45
|
+
font-family: var(--neversink-title-font);
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
font-size: 3em;
|
|
48
|
+
line-height: normal;
|
|
49
|
+
margin-bottom: 0.9rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.slidev-layout.cover h2 {
|
|
53
|
+
font-family: var(--neversink-title-font);
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
font-size: 2.5em;
|
|
56
|
+
line-height: normal;
|
|
57
|
+
margin-bottom: 0.9rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.slidev-layout.cover h3 {
|
|
61
|
+
font-family: var(--neversink-title-font);
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
font-size: 1.9em;
|
|
64
|
+
line-height: normal;
|
|
65
|
+
margin-bottom: 0.9rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.slidev-layout.cover h1 + p {
|
|
69
|
+
padding: 0;
|
|
70
|
+
margin: 0;
|
|
71
|
+
opacity: 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.slidev-layout.cover h2 + p {
|
|
75
|
+
padding: 0;
|
|
76
|
+
margin: 0;
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.slidev-layout.cover h3 + p {
|
|
81
|
+
padding: 0;
|
|
82
|
+
margin: 0;
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* this is specific to this instance */
|
|
87
|
+
.slidev-layout.cover h1,
|
|
88
|
+
.slidev-layout.cover h2,
|
|
89
|
+
.slidev-layout.cover h3 {
|
|
90
|
+
padding-bottom: 0.3em;
|
|
91
|
+
border-bottom: 1px solid var(--neversink-highlight-color);
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
color: {
|
|
5
|
+
default: 'light',
|
|
6
|
+
},
|
|
7
|
+
speed: {
|
|
8
|
+
default: 0.5,
|
|
9
|
+
},
|
|
10
|
+
loop: {
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const colorscheme = computed(() => {
|
|
16
|
+
return `neversink-${props.color}-scheme`
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
<template>
|
|
20
|
+
<div class="slidecolor slidev-layout full" :class="colorscheme">
|
|
21
|
+
<div class="my-auto w-full h-full">
|
|
22
|
+
<CreditScroll :speed="props.speed" :loop="props.loop">
|
|
23
|
+
<slot name="default"></slot>
|
|
24
|
+
</CreditScroll>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<style scoped>
|
|
30
|
+
.quote {
|
|
31
|
+
background-color: var(--neversink-bg-color);
|
|
32
|
+
color: var(--neversink-text-color);
|
|
33
|
+
border-color: var(--neversink-border-color);
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="js">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
color: {
|
|
6
|
+
default: 'white',
|
|
7
|
+
},
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const colorscheme = computed(() => {
|
|
11
|
+
return `neversink-${props.color}-scheme`
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
<template>
|
|
15
|
+
<div class="slidev-layout default slidecolor" :class="colorscheme">
|
|
16
|
+
<slot />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useSlots } from 'vue'
|
|
3
|
+
|
|
4
|
+
const slots = useSlots()
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
rowheight: {
|
|
8
|
+
default: 'is-one-half',
|
|
9
|
+
},
|
|
10
|
+
colwidth: {
|
|
11
|
+
default: 'is-one-half',
|
|
12
|
+
},
|
|
13
|
+
color: {
|
|
14
|
+
default: 'light,white,white,light',
|
|
15
|
+
},
|
|
16
|
+
align: {
|
|
17
|
+
default: 'lt-lt-lt-lt',
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
function compute_size_col(title) {
|
|
22
|
+
return { l: 'col-span-' + title, r: 'col-span-' + (12 - title) }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function compute_size_row(title) {
|
|
26
|
+
return { t: 'row-span-' + title, b: 'row-span-' + (12 - title) }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const colw = computed(() => {
|
|
30
|
+
switch (props.colwidth) {
|
|
31
|
+
case 'is-1':
|
|
32
|
+
case 'is-1-11':
|
|
33
|
+
return compute_size_col(1)
|
|
34
|
+
case 'is-2':
|
|
35
|
+
case 'is-2-10':
|
|
36
|
+
return compute_size_col(2)
|
|
37
|
+
case 'is-3':
|
|
38
|
+
case 'is-3-9':
|
|
39
|
+
case 'is-one-quarter':
|
|
40
|
+
return compute_size_col(3)
|
|
41
|
+
case 'is-4':
|
|
42
|
+
case 'is-4-8':
|
|
43
|
+
case 'is-one-third':
|
|
44
|
+
return compute_size_col(4)
|
|
45
|
+
case 'is-5':
|
|
46
|
+
case 'is-5-7':
|
|
47
|
+
return compute_size_col(5)
|
|
48
|
+
case 'is-6':
|
|
49
|
+
case 'is-6-6':
|
|
50
|
+
case 'is-two-quarters':
|
|
51
|
+
case 'is-two-fourths':
|
|
52
|
+
case 'is-one-half':
|
|
53
|
+
case 'is-half':
|
|
54
|
+
return compute_size_col(6)
|
|
55
|
+
case 'is-7':
|
|
56
|
+
case 'is-7-5':
|
|
57
|
+
return compute_size_col(7)
|
|
58
|
+
case 'is-8':
|
|
59
|
+
case 'is-8-4':
|
|
60
|
+
case 'is-two-thirds':
|
|
61
|
+
return compute_size_col(8)
|
|
62
|
+
case 'is-9':
|
|
63
|
+
case 'is-9-3':
|
|
64
|
+
case 'is-three-quarters':
|
|
65
|
+
case 'three-fourths':
|
|
66
|
+
return compute_size_col(9)
|
|
67
|
+
case 'is-10':
|
|
68
|
+
case 'is-10-2':
|
|
69
|
+
return compute_size_col(10)
|
|
70
|
+
case 'is-11':
|
|
71
|
+
case 'is-11-1':
|
|
72
|
+
return compute_size_col(11)
|
|
73
|
+
default:
|
|
74
|
+
return 'error'
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
const rowh = computed(() => {
|
|
79
|
+
switch (props.rowheight) {
|
|
80
|
+
case 'is-1':
|
|
81
|
+
case 'is-1-11':
|
|
82
|
+
return compute_size_row(1)
|
|
83
|
+
case 'is-2':
|
|
84
|
+
case 'is-2-10':
|
|
85
|
+
return compute_size_row(2)
|
|
86
|
+
case 'is-3':
|
|
87
|
+
case 'is-3-9':
|
|
88
|
+
case 'is-one-quarter':
|
|
89
|
+
return compute_size_row(3)
|
|
90
|
+
case 'is-4':
|
|
91
|
+
case 'is-4-8':
|
|
92
|
+
case 'is-one-third':
|
|
93
|
+
return compute_size_row(4)
|
|
94
|
+
case 'is-5':
|
|
95
|
+
case 'is-5-7':
|
|
96
|
+
return compute_size_row(5)
|
|
97
|
+
case 'is-6':
|
|
98
|
+
case 'is-6-6':
|
|
99
|
+
case 'is-two-quarters':
|
|
100
|
+
case 'is-two-fourths':
|
|
101
|
+
case 'is-one-half':
|
|
102
|
+
case 'is-half':
|
|
103
|
+
return compute_size_row(6)
|
|
104
|
+
case 'is-7':
|
|
105
|
+
case 'is-7-5':
|
|
106
|
+
return compute_size_row(7)
|
|
107
|
+
case 'is-8':
|
|
108
|
+
case 'is-8-4':
|
|
109
|
+
case 'is-two-thirds':
|
|
110
|
+
return compute_size_row(8)
|
|
111
|
+
case 'is-9':
|
|
112
|
+
case 'is-9-3':
|
|
113
|
+
case 'is-three-quarters':
|
|
114
|
+
case 'three-fourths':
|
|
115
|
+
return compute_size_row(9)
|
|
116
|
+
case 'is-10':
|
|
117
|
+
case 'is-10-2':
|
|
118
|
+
return compute_size_row(10)
|
|
119
|
+
case 'is-11':
|
|
120
|
+
case 'is-11-1':
|
|
121
|
+
return compute_size_row(11)
|
|
122
|
+
default:
|
|
123
|
+
return 'error'
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
function compute_alignment(val) {
|
|
128
|
+
switch (val) {
|
|
129
|
+
case 'ct':
|
|
130
|
+
return 'center top'
|
|
131
|
+
case 'cm':
|
|
132
|
+
return 'center middle'
|
|
133
|
+
case 'cb':
|
|
134
|
+
return 'center bottom'
|
|
135
|
+
case 'lt':
|
|
136
|
+
return 'left top'
|
|
137
|
+
case 'lm':
|
|
138
|
+
return 'left middle'
|
|
139
|
+
case 'lb':
|
|
140
|
+
return 'left bottom'
|
|
141
|
+
case 'rt':
|
|
142
|
+
return 'right top'
|
|
143
|
+
case 'rm':
|
|
144
|
+
return 'right middle'
|
|
145
|
+
case 'rb':
|
|
146
|
+
return 'right bottom'
|
|
147
|
+
case 'c':
|
|
148
|
+
return 'center top'
|
|
149
|
+
case 'l':
|
|
150
|
+
return 'left top'
|
|
151
|
+
case 'r':
|
|
152
|
+
return 'right top'
|
|
153
|
+
default:
|
|
154
|
+
return 'error'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const alignment = computed(() => {
|
|
159
|
+
const parts = props.align.split('-')
|
|
160
|
+
return { l: compute_alignment(parts[0]), r: compute_alignment(parts[1]) }
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
function color(code) {
|
|
164
|
+
if (code === 'black') {
|
|
165
|
+
return 'text-white bg-black'
|
|
166
|
+
}
|
|
167
|
+
if (code === 'white') {
|
|
168
|
+
return 'text-black bg-white'
|
|
169
|
+
}
|
|
170
|
+
if (code === 'dark') {
|
|
171
|
+
return 'text-gray-100 bg-gray-800'
|
|
172
|
+
}
|
|
173
|
+
if (code === 'light') {
|
|
174
|
+
return 'text-gray-800 bg-gray-100'
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (code.includes('-light')) {
|
|
178
|
+
const parts = code.split('-')
|
|
179
|
+
return 'bg-' + parts[0] + '-100 text-' + parts[0] + '-500'
|
|
180
|
+
} else {
|
|
181
|
+
return 'text-' + code + '-100 bg-' + code + '-500'
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const cellcolor = computed(() => {
|
|
186
|
+
const parts = props.color.split(',')
|
|
187
|
+
return {
|
|
188
|
+
tl: color(parts[0]),
|
|
189
|
+
tr: color(parts[1]),
|
|
190
|
+
bl: color(parts[2]),
|
|
191
|
+
br: color(parts[3]),
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
</script>
|
|
195
|
+
<template>
|
|
196
|
+
<div class="grid grid-cols-12 grid-rows-12 w-full h-full auto-rows-fr">
|
|
197
|
+
<div class="slidev-layout default w-full h-full" :class="colw.l + ' ' + rowh.t + ' ' + cellcolor.tl">
|
|
198
|
+
<slot name="top-left"></slot>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="slidev-layout default w-full h-full" :class="colw.r + ' ' + rowh.t + ' ' + cellcolor.tr">
|
|
201
|
+
<slot name="top-right"></slot>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="slidev-layout default w-full h-full" :class="colw.l + ' ' + rowh.b + ' ' + cellcolor.bl">
|
|
204
|
+
<slot name="bottom-left"></slot>
|
|
205
|
+
</div>
|
|
206
|
+
<div class="slidev-layout default w-full h-full" :class="colw.r + ' ' + rowh.b + ' ' + cellcolor.br">
|
|
207
|
+
<slot name="bottom-right"></slot>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</template>
|
package/layouts/full.vue
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="js">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
//import { handleBackground } from '../layoutHelper'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
// background: {
|
|
7
|
+
// default: '',
|
|
8
|
+
// },
|
|
9
|
+
color: {
|
|
10
|
+
default: 'white',
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const colorscheme = computed(() => {
|
|
15
|
+
return `neversink-${props.color}-scheme`
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
18
|
+
<template>
|
|
19
|
+
<div class="slidev-layout full w-full h-full slidecolor" :class="colorscheme">
|
|
20
|
+
<slot class="w-full h-full" />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang="js">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
color: {
|
|
6
|
+
default: 'white',
|
|
7
|
+
},
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const colorscheme = computed(() => {
|
|
11
|
+
return `neversink-${props.color}-scheme`
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div class="slidev-layout intro slidecolor" :class="colorscheme">
|
|
17
|
+
<div class="my-auto">
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
<div class="absolute bottom-10">
|
|
21
|
+
<slot name="note" />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<style>
|
|
27
|
+
/* intro slide type */
|
|
28
|
+
|
|
29
|
+
.slidev-layout.intro {
|
|
30
|
+
font-family: var(--neversink-main-font);
|
|
31
|
+
font-weight: 300;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.slidev-layout.intro strong {
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
}
|
|
37
|
+
.slidev-layout.intro h1 {
|
|
38
|
+
font-family: var(--neversink-title-font);
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
font-size: 3em;
|
|
41
|
+
line-height: 5rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slidev-layout.intro h2 {
|
|
45
|
+
font-family: var(--neversink-title-font);
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
font-size: 2.5em;
|
|
48
|
+
line-height: 5rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.slidev-layout.intro h3 {
|
|
52
|
+
font-family: var(--neversink-title-font);
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
font-size: 1.9em;
|
|
55
|
+
line-height: 5rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.slidev-layout.intro h1 + p {
|
|
59
|
+
padding: 0;
|
|
60
|
+
margin: 0;
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.slidev-layout.intro h2 + p {
|
|
65
|
+
padding: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.slidev-layout.intro h3 + p {
|
|
71
|
+
padding: 0;
|
|
72
|
+
margin: 0;
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
color: {
|
|
5
|
+
default: 'light',
|
|
6
|
+
},
|
|
7
|
+
author: {
|
|
8
|
+
default: null,
|
|
9
|
+
},
|
|
10
|
+
quotesize: {
|
|
11
|
+
default: 'text-2xl',
|
|
12
|
+
},
|
|
13
|
+
authorsize: {
|
|
14
|
+
default: 'text-l',
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const colorscheme = computed(() => {
|
|
19
|
+
return `neversink-${props.color}-scheme`
|
|
20
|
+
})
|
|
21
|
+
</script>
|
|
22
|
+
<template>
|
|
23
|
+
<div class="slidev-layout quote">
|
|
24
|
+
<div class="my-auto">
|
|
25
|
+
<div class="p-5 w-95% ml-auto mr-auto rounded-lg border-1px quotecolor" :class="colorscheme">
|
|
26
|
+
<div class="leading-normal" :class="quotesize">
|
|
27
|
+
<slot name="default" /><br />
|
|
28
|
+
<div v-if="author !== null" class="quote_author" :class="authorsize">- {{ author }}</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
.quotecolor {
|
|
37
|
+
background-color: var(--neversink-bg-color);
|
|
38
|
+
color: var(--neversink-text-color);
|
|
39
|
+
border-color: var(--neversink-border-color);
|
|
40
|
+
/* add a drop shadow */
|
|
41
|
+
box-shadow: 5px 4px 6px rgba(0, 0, 0, 0.1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.quote_author {
|
|
45
|
+
font-family: var(--neversink-title-font);
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
text-align: right;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.slidev-layout.quote {
|
|
51
|
+
margin-top: 2em;
|
|
52
|
+
padding-left: 1em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.slidev-layout.quote p {
|
|
56
|
+
font-size: 1.5em;
|
|
57
|
+
font-family: var(--neversink-quote-font);
|
|
58
|
+
line-height: 1.2em;
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
text-align: left;
|
|
61
|
+
}
|
|
62
|
+
</style>
|