slidev-theme-kotlin 0.0.8 → 0.10.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/CHANGELOG.md +42 -0
- package/README.md +68 -12
- package/components/DrawnAnnotation.vue +1669 -0
- package/components/Kodee.vue +56 -24
- package/components/KodeeWrapper.vue +52 -8
- package/components/README.md +263 -0
- package/layouts/cover.vue +0 -5
- package/layouts/default.vue +0 -5
- package/layouts/intro.vue +0 -5
- package/package.json +23 -8
- package/slide-bottom.vue +30 -0
- package/styles/layout.css +16 -0
- package/.github/workflows/pages.yml +0 -54
- package/example.md +0 -221
- /package/{public → assets}/kodee-drinking.svg +0 -0
- /package/{public → assets}/kodee-greeting.svg +0 -0
- /package/{public → assets}/kodee-heart.svg +0 -0
- /package/{public → assets}/kodee-in-love.svg +0 -0
- /package/{public → assets}/kodee-jumping.svg +0 -0
- /package/{public → assets}/kodee-sitting.svg +0 -0
- /package/{public → assets}/kodee-tiny.svg +0 -0
- /package/{public → assets}/kodee-wave.svg +0 -0
- /package/{public → assets}/kodee-welcome.svg +0 -0
- /package/{public → assets}/kodee-wink.svg +0 -0
- /package/{public → assets}/kodee-winter.svg +0 -0
package/example.md
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
theme: ./
|
|
3
|
-
transition: view-transition
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Kodee Magic Move Demo
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
kodee:
|
|
10
|
-
variant: greeting
|
|
11
|
-
size: large
|
|
12
|
-
position: featured
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Kodee Magic Move Demo
|
|
16
|
-
|
|
17
|
-
## Welcome to Kotlin!
|
|
18
|
-
|
|
19
|
-
Meet Kodee, the Kotlin mascot!
|
|
20
|
-
|
|
21
|
-
- Kodee appears large on this slide
|
|
22
|
-
- Watch the magic move to the next slide
|
|
23
|
-
- Smooth scale and position animation
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
kodee:
|
|
27
|
-
variant: greeting
|
|
28
|
-
size: small
|
|
29
|
-
position: corner
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
# Details Slide
|
|
33
|
-
|
|
34
|
-
## Code Example
|
|
35
|
-
|
|
36
|
-
Here's some Kotlin code with Kodee in the corner:
|
|
37
|
-
|
|
38
|
-
```kotlin
|
|
39
|
-
fun greet(name: String) {
|
|
40
|
-
println("Hello, $name!")
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
fun main() {
|
|
44
|
-
greet("Kotlin Developer")
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Notice how Kodee smoothly transitioned from large to small!
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
kodee:
|
|
52
|
-
variant: wink
|
|
53
|
-
size: large
|
|
54
|
-
position: featured
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
# Different Kodee Variants
|
|
58
|
-
|
|
59
|
-
You can use different Kodee images:
|
|
60
|
-
|
|
61
|
-
- `greeting` - Kodee waving hello
|
|
62
|
-
- `wink` - Kodee winking
|
|
63
|
-
- `jumping` - Kodee jumping with joy
|
|
64
|
-
- `sitting` - Kodee sitting down
|
|
65
|
-
- `drinking` - Kodee with a drink
|
|
66
|
-
- And more!
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
kodee:
|
|
70
|
-
variant: wink
|
|
71
|
-
size: small
|
|
72
|
-
position: corner
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
# Minimal Boilerplate
|
|
76
|
-
|
|
77
|
-
Just add to your slide's frontmatter:
|
|
78
|
-
|
|
79
|
-
```yaml
|
|
80
|
-
---
|
|
81
|
-
kodee:
|
|
82
|
-
variant: greeting
|
|
83
|
-
size: large
|
|
84
|
-
position: featured
|
|
85
|
-
---
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
That's it! Kodee will automatically appear and animate between slides.
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
kodee:
|
|
92
|
-
variant: wave
|
|
93
|
-
size: large
|
|
94
|
-
position: featured
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
# Different Kodee Variants
|
|
98
|
-
|
|
99
|
-
You can use different Kodee images:
|
|
100
|
-
|
|
101
|
-
- `greeting` - Kodee waving hello
|
|
102
|
-
- `wink` - Kodee winking
|
|
103
|
-
- `jumping` - Kodee jumping with joy
|
|
104
|
-
- `sitting` - Kodee sitting down
|
|
105
|
-
- `drinking` - Kodee with a drink
|
|
106
|
-
- And more!
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
kodee:
|
|
110
|
-
variant: wave
|
|
111
|
-
size: small
|
|
112
|
-
position: corner
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
# Minimal Boilerplate
|
|
116
|
-
|
|
117
|
-
Just add to your slide's frontmatter:
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
---
|
|
121
|
-
kodee:
|
|
122
|
-
variant: greeting
|
|
123
|
-
size: large
|
|
124
|
-
position: featured
|
|
125
|
-
---
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
That's it! Kodee will automatically appear and animate between slides.
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
kodee:
|
|
132
|
-
variant: wave
|
|
133
|
-
size: small
|
|
134
|
-
position: corner
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
# IntelliJ like Syntax Highlighting
|
|
138
|
-
|
|
139
|
-
```kotlin
|
|
140
|
-
interface User {
|
|
141
|
-
val id: Int
|
|
142
|
-
val firstName: String
|
|
143
|
-
val lastName: String
|
|
144
|
-
val role: String
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
fun getUser(id: Long): User? = null
|
|
148
|
-
|
|
149
|
-
fun updateUser(id: Long, update: User?) {
|
|
150
|
-
if (update == null) return
|
|
151
|
-
getUser(id)
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
kodee:
|
|
157
|
-
variant: wave
|
|
158
|
-
size: small
|
|
159
|
-
position: corner
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
# Magic Kotlin Code Move
|
|
163
|
-
|
|
164
|
-
````md magic-move
|
|
165
|
-
```kotlin
|
|
166
|
-
fun updateUser(id: Long, update: User?) {
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
```kotlin
|
|
171
|
-
fun updateUser(id: Long, update: User?) {
|
|
172
|
-
if (update == null) return
|
|
173
|
-
getUser(id)
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
````
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
kodee:
|
|
180
|
-
variant: wave
|
|
181
|
-
size: small
|
|
182
|
-
position: corner
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
# Magic move & line highlighting
|
|
186
|
-
|
|
187
|
-
````md magic-move
|
|
188
|
-
```kotlin
|
|
189
|
-
val plusOne: (Int) -> Int = { it + 1 }
|
|
190
|
-
```
|
|
191
|
-
```kotlin{3}
|
|
192
|
-
val plusOne: (Int) -> Int = { it + 1 }
|
|
193
|
-
|
|
194
|
-
val sum: (Int, Int) -> Int = { a, b -> a + b }
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
```kotlin{5}
|
|
198
|
-
val plusOne: (Int) -> Int = { it + 1 }
|
|
199
|
-
|
|
200
|
-
val sum: (Int, Int) -> Int = { a, b -> a + b }
|
|
201
|
-
|
|
202
|
-
val plus: (Int, Int) -> Int = Int::plus
|
|
203
|
-
```
|
|
204
|
-
````
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
kodee:
|
|
208
|
-
variant: wave
|
|
209
|
-
size: small
|
|
210
|
-
position: corner
|
|
211
|
-
---
|
|
212
|
-
|
|
213
|
-
# Kotlin code & Rough Notation
|
|
214
|
-
|
|
215
|
-
```kotlin
|
|
216
|
-
operator fun <span v-mark.underline>Content</span>.unaryPlus(): Unit {
|
|
217
|
-
<span v-mark.circle>println</span>("Hello, World!")
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
---
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|