slidev-theme-kotlin 0.0.6 → 0.0.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/README.md +3 -2
- package/components/Kodee.vue +11 -6
- package/example.md +1 -0
- package/package.json +1 -1
- package/styles/layout.css +6 -0
- package/.github/workflows/publish.yml +0 -28
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ This theme provides a professional presentation template tailored for Kotlin dev
|
|
|
23
23
|
Install the theme in your Slidev project:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npm install
|
|
26
|
+
npm install slidev-theme-kotlin
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Usage
|
|
@@ -34,7 +34,8 @@ Add the theme to your slides' frontmatter:
|
|
|
34
34
|
|
|
35
35
|
```yaml
|
|
36
36
|
---
|
|
37
|
-
theme:
|
|
37
|
+
theme: kotlin
|
|
38
|
+
transition: view-transition
|
|
38
39
|
---
|
|
39
40
|
|
|
40
41
|
# Your Presentation Title
|
package/components/Kodee.vue
CHANGED
|
@@ -22,8 +22,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
22
22
|
// Compute image source
|
|
23
23
|
const imageSrc = computed(() => {
|
|
24
24
|
const variant = props.variant.startsWith('kodee-') ? props.variant : `kodee-${props.variant}`
|
|
25
|
-
return
|
|
25
|
+
return `theme/${variant}.svg`
|
|
26
26
|
})
|
|
27
|
+
|
|
27
28
|
const kodeeImage = computed(() => {
|
|
28
29
|
const base = import.meta.env.BASE_URL || '/'
|
|
29
30
|
return `${base}${imageSrc.value}`
|
|
@@ -94,10 +95,13 @@ const positionStyles = computed(() => {
|
|
|
94
95
|
const motionConfig = computed(() => {
|
|
95
96
|
const baseScale = props.scale || 1
|
|
96
97
|
|
|
98
|
+
// Check if we're in a view transition (Kodee staying the same between slides)
|
|
99
|
+
const isViewTransitioning = typeof document !== 'undefined' && document.startViewTransition
|
|
100
|
+
|
|
97
101
|
return {
|
|
98
102
|
initial: {
|
|
99
|
-
opacity: 0,
|
|
100
|
-
scale: baseScale
|
|
103
|
+
opacity: isViewTransitioning ? 1 : 0,
|
|
104
|
+
scale: baseScale,
|
|
101
105
|
},
|
|
102
106
|
enter: {
|
|
103
107
|
opacity: 1,
|
|
@@ -107,13 +111,14 @@ const motionConfig = computed(() => {
|
|
|
107
111
|
stiffness: 100,
|
|
108
112
|
damping: 15,
|
|
109
113
|
mass: 1,
|
|
114
|
+
duration: isViewTransitioning ? 0 : undefined,
|
|
110
115
|
},
|
|
111
116
|
},
|
|
112
117
|
leave: {
|
|
113
|
-
opacity: 0,
|
|
114
|
-
scale: baseScale
|
|
118
|
+
opacity: isViewTransitioning ? 1 : 0,
|
|
119
|
+
scale: baseScale,
|
|
115
120
|
transition: {
|
|
116
|
-
duration: 300,
|
|
121
|
+
duration: isViewTransitioning ? 0 : 300,
|
|
117
122
|
},
|
|
118
123
|
},
|
|
119
124
|
}
|
package/example.md
CHANGED
package/package.json
CHANGED
package/styles/layout.css
CHANGED
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
::view-transition-new(kodee-mascot) {
|
|
14
14
|
animation-duration: 0.5s;
|
|
15
15
|
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
16
|
+
mix-blend-mode: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
::view-transition-group(kodee-mascot) {
|
|
20
|
+
animation-duration: 0.5s;
|
|
21
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
.slidev-slide-content {
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: build
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
push:
|
|
6
|
-
branches: [main]
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
packages: write
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v5
|
|
17
|
-
- uses: actions/setup-node@v6
|
|
18
|
-
with:
|
|
19
|
-
node-version: 22.x
|
|
20
|
-
registry-url: 'https://npm.pkg.github.com'
|
|
21
|
-
scope: '@nomisrev'
|
|
22
|
-
cache: 'npm'
|
|
23
|
-
cache-dependency-path: package-lock.json
|
|
24
|
-
|
|
25
|
-
- run: npm ci
|
|
26
|
-
- run: npm publish
|
|
27
|
-
env:
|
|
28
|
-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|