slidev-theme-neversink 0.2.0 → 0.3.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.
@@ -0,0 +1,37 @@
1
+ # Thumb
2
+
3
+ ## Description
4
+
5
+ Draws a set of illustration of a hand with a thumb. Useful icon but larger than using the slidev icondes.
6
+
7
+ ## `Thumb` component
8
+
9
+ The Thumbs component has the following props:
10
+
11
+ - `dir` (optional) the thumb could point up or down
12
+ - `color` (optional) the color scheme of the thumb. the default is 'white'. The best options tend to be the light colors (e.g., `green-light`, `red-light`, `blue-light`)
13
+ - `width` (optional) the initial width of the image. Default is 140px
14
+
15
+ ```md
16
+ <Thumb color='green-light' width="300px" v-drag />
17
+ ```
18
+
19
+ Renders as:
20
+
21
+ <Thumb color='green-light' width="300px"/>
22
+
23
+ ```md
24
+ <Thumb color="sky-light" v-drag />
25
+ ```
26
+
27
+ Renders as:
28
+
29
+ <Thumb color="sky-light" />
30
+
31
+ ```md
32
+ <Thumb color="red-light" dir='down' v-drag />
33
+ ```
34
+
35
+ Renders as:
36
+
37
+ <Thumb color="red-light" dir='down'/>
@@ -0,0 +1,6 @@
1
+ # VDragLine
2
+
3
+ ## Description
4
+
5
+ Draws a line using the dragging feature.
6
+ See [VDragArrow](https://sli.dev/builtin/components#vdragarrow) in the main slidev. This uses the same props as the [`Line` component](/components/line).
@@ -18,6 +18,16 @@ The current components are:
18
18
 
19
19
  - [Email](/components/email) - formats email addresses
20
20
 
21
+ - [ArrowDraw](/components/arrowdraw) - draws a hand-drawn looking arrow
22
+
21
23
  - [ArrowHeads](/components/arrowheads) - draws a bunch of arrows pointing at a central place. Useful for drawing attention to a particular part of a slide.
22
24
 
25
+ - [Thumb](/components/thumb) - draws a hand with thumb up or down. Useful for signaling agreement or disagreement.
26
+
27
+ - [Line](/components/line) - draws a straight line (no arrowheads)
28
+
29
+ - [VDragLine](/components/vdragline) - draws a straight line (no arrowheads), the v-drag version.
30
+
31
+ - [Box](/components/box) - draws a box or rectangle shape
32
+
23
33
  Most component can just be included in-line in your markdown. However, in some cases it can make sense to position these components using the `v-drag` directive. For example, the `SpeechBubble` component can be positioned using the `v-drag` directive to place it in a specific location on the slide. This can be useful for creating custom layouts or animations. In that case, it makes sense to keep the component in the [default slot](/layouts#slots) of each layout.
@@ -10,11 +10,11 @@ In the conception of this design system, the entire slide is divided into 12 equ
10
10
 
11
11
  <img src="/layouts/side-title-12row.svg" alt="side-title slide example" width="600" />
12
12
 
13
- For example, if `columns: is-6` is specified in the frontmatter, the title will be allocated 6 units and the main content will be allocated 6 units like this:
13
+ For example, if `titlewidth: is-6` is specified in the frontmatter, the title will be allocated 6 units and the main content will be allocated 6 units like this:
14
14
 
15
15
  <img src="/layouts/side-title-is-6.svg" alt="side-title slide example" width="600" />
16
16
 
17
- If `columns: is-3` is specified, the title will be allocated 3 units and the content will be allocated 9 units like this:
17
+ If `titlewidth: is-3` is specified, the title will be allocated 3 units and the content will be allocated 9 units like this:
18
18
 
19
19
  <img src="/layouts/side-title-is-3.svg" alt="side-title slide example" width="600" />
20
20
 
package/docs/markdown.md CHANGED
@@ -20,7 +20,7 @@ Make this **bold** using markdown.
20
20
  </div>
21
21
  ```
22
22
 
23
- With the new before the markdown text begins.
23
+ with the new line before the markdown text begins.
24
24
 
25
25
  This is also true around [slots in layouts](/layouts#slots).
26
26
 
@@ -15,7 +15,7 @@
15
15
  </a>
16
16
  </div>
17
17
  <div class="grid-item grid-col-span-1">
18
- <a href="layouts/two-cols-header">
18
+ <a href="layouts/two-cols-title">
19
19
  <img src="/screenshots/8.png" alt="two-col-header slide example" width="300" class="screenshot mb-10 mt-10"/>
20
20
  </a>
21
21
  </div>
Binary file
package/docs/styling.md CHANGED
@@ -37,7 +37,7 @@ If you want to make bullets a little closer together to make spaceadd the `class
37
37
 
38
38
  Other options are `ns-c-tight` and `ns-c-supertight`.
39
39
 
40
- ## V-click faders
40
+ ## `v-clicks` faders
41
41
 
42
42
  If you want to fade out a bullet as you step through, add the `class='ns-c-fader'`
43
43
 
@@ -100,6 +100,8 @@ If you write an icon in a link it includes the underline styleing. To remove tha
100
100
  }
101
101
  ```
102
102
 
103
+ Aliases include `ns-c-plainlink` and `ns-c-nounderline`.
104
+
103
105
  ## Grids
104
106
 
105
107
  This is not a specific `ns-c-` class but a general unocss/tailwind utility for making grids.
package/example.md CHANGED
@@ -10,10 +10,7 @@ neversink_string: "Neversink Example Deck"
10
10
  # Neversink
11
11
 
12
12
  A [Slidev](https://sli.dev) theme designed by **Todd Gureckis**
13
- <div class="iconlink">
14
-
15
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
16
- </div>
13
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
17
14
 
18
15
 
19
16
 
@@ -89,63 +86,69 @@ The project uses tailwind-like color schemes arranged in ==monochromatic pairs==
89
86
 
90
87
  **B&W**:
91
88
 
89
+ <div class="leading-[1.5em]">
92
90
  <span class="text-white bg-black p-1 pl-3 pr-3 m-1 rounded font-size-3">black</span>
93
- <span class="text-black bg-white border-1 border-solid border-black p1 pl-3 pr-3 m-1 rounded font-size-3">white</span>
94
- <span class="text-gray-100 bg-gray-800 p1 pl-3 pr-3 m-1 rounded font-size-3">dark</span>
95
- <span class="text-gray-800 bg-gray-100 p1 pl-3 pr-3 m-1 rounded font-size-3">light</span>
91
+ <span class="text-black bg-white border-1 border-solid border-black p-1 pl-3 pr-3 m-1 rounded font-size-3">white</span>
92
+ <span class="text-gray-100 bg-gray-800 p-1 pl-3 pr-3 m-1 rounded font-size-3">dark</span>
93
+ <span class="text-gray-800 bg-gray-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">light</span>
94
+
95
+ </div>
96
96
 
97
97
  **Light**:
98
98
 
99
- <span class="bg-slate-100 text-slate-500 p1 pl-3 pr-3 m-1 rounded font-size-3">slate-light</span>
100
- <span class="bg-gray-100 text-gray-500 p1 pl-3 pr-3 m-1 rounded font-size-3">gray-light</span>
101
- <span class="bg-zinc-100 text-zinc-500 p1 pl-3 pr-3 m-1 rounded font-size-3">zinc-light</span>
102
- <span class="bg-neutral-100 text-neutral-500 p1 pl-3 pr-3 m-1 rounded font-size-3">neutral-light</span>
103
- <span class="bg-stone-100 text-stone-500 p1 pl-3 pr-3 m-1 rounded font-size-3">stone-light</span>
104
- <span class="bg-red-100 text-red-500 p1 pl-3 pr-3 m-1 rounded font-size-3">red-light</span>
105
- <span class="bg-orange-100 text-orange-500 p1 pl-3 pr-3 m-1 rounded font-size-3">orange-light</span>
106
- <span class="bg-amber-100 text-amber-500 p1 pl-3 pr-3 m-1 rounded font-size-3">amber-light</span>
107
- <span class="bg-yellow-100 text-yellow-500 p1 pl-3 pr-3 m-1 rounded font-size-3">yellow-light</span><br />
108
- <span class="bg-lime-100 text-lime-500 p1 pl-3 pr-3 m-1 rounded font-size-3">lime-light</span>
109
- <span class="bg-green-100 text-green-500 p1 pl-3 pr-3 m-1 rounded font-size-3">green-light</span>
110
- <span class="bg-emerald-100 text-emerald-500 p1 pl-3 pr-3 m-1 rounded font-size-3">emerald-light</span>
111
- <span class="bg-teal-100 text-teal-500 p1 pl-3 pr-3 m-1 rounded font-size-3">teal-light</span>
112
- <span class="bg-cyan-100 text-cyan-500 p1 pl-3 pr-3 m-1 rounded font-size-3">cyan-light</span>
113
- <span class="bg-sky-100 text-sky-500 p1 pl-3 pr-3 m-1 rounded font-size-3">sky-light</span>
114
- <span class="bg-blue-100 text-blue-500 p1 pl-3 pr-3 m-1 rounded font-size-3">blue-light</span>
115
- <span class="bg-indigo-100 text-indigo-500 p1 pl-3 pr-3 m-1 rounded font-size-3">indigo-light</span>
116
- <span class="bg-violet-100 text-violet-500 p1 pl-3 pr-3 m-1 rounded font-size-3">violet-light</span><br />
117
- <span class="bg-purple-100 text-purple-500 p1 pl-3 pr-3 m-1 rounded font-size-3">purple-light</span>
118
- <span class="bg-pink-100 text-pink-500 p1 pl-3 pr-3 m-1 rounded font-size-3">pink-light</span>
119
- <span class="bg-rose-100 text-rose-500 p1 pl-3 pr-3 m-1 rounded font-size-3">rose-light</span>
120
- <span class="bg-fuchsia-100 text-fuchsia-500 p1 pl-3 pr-3 m-1 rounded font-size-3">fuchsia-light</span>
121
- <span class="bg-gray-50 text-navy-900 p1 pl-3 pr-3 m-1 rounded font-size-3">navy-light</span>
99
+ <div class="leading-[1.5em]">
100
+ <span class="bg-slate-100 text-slate-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">slate-light</span>
101
+ <span class="bg-gray-100 text-gray-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">gray-light</span>
102
+ <span class="bg-zinc-100 text-zinc-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">zinc-light</span>
103
+ <span class="bg-neutral-100 text-neutral-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">neutral-light</span>
104
+ <span class="bg-stone-100 text-stone-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">stone-light</span>
105
+ <span class="bg-red-100 text-red-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">red-light</span>
106
+ <span class="bg-orange-100 text-orange-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">orange-light</span>
107
+ <span class="bg-amber-100 text-amber-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">amber-light</span>
108
+ <span class="bg-yellow-100 text-yellow-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">yellow-light</span><br />
109
+ <span class="bg-lime-100 text-lime-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">lime-light</span>
110
+ <span class="bg-green-100 text-green-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">green-light</span>
111
+ <span class="bg-emerald-100 text-emerald-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">emerald-light</span>
112
+ <span class="bg-teal-100 text-teal-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">teal-light</span>
113
+ <span class="bg-cyan-100 text-cyan-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">cyan-light</span>
114
+ <span class="bg-sky-100 text-sky-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">sky-light</span>
115
+ <span class="bg-blue-100 text-blue-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">blue-light</span>
116
+ <span class="bg-indigo-100 text-indigo-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">indigo-light</span>
117
+ <span class="bg-violet-100 text-violet-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">violet-light</span><br />
118
+ <span class="bg-purple-100 text-purple-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">purple-light</span>
119
+ <span class="bg-pink-100 text-pink-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">pink-light</span>
120
+ <span class="bg-rose-100 text-rose-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">rose-light</span>
121
+ <span class="bg-fuchsia-100 text-fuchsia-500 p-1 pl-3 pr-3 m-1 rounded font-size-3">fuchsia-light</span>
122
+ <span class="bg-gray-50 text-navy-900 p-1 pl-3 pr-3 m-1 rounded font-size-3">navy-light</span>
123
+ </div>
122
124
 
123
125
  **Regular**:
124
126
 
125
- <span class="bg-slate-500 text-slate-100 p1 pl-3 pr-3 m-1 rounded font-size-3">slate</span>
126
- <span class="bg-gray-500 text-gray-100 p1 pl-3 pr-3 m-1 rounded font-size-3">gray</span>
127
- <span class="bg-zinc-500 text-zinc-100 p1 pl-3 pr-3 m-1 rounded font-size-3">zinc</span>
128
- <span class="bg-neutral-500 text-neutral-100 p1 pl-3 pr-3 m-1 rounded font-size-3">neutral</span>
129
- <span class="bg-stone-500 text-stone-100 p1 pl-3 pr-3 m-1 rounded font-size-3">stone</span>
130
- <span class="bg-red-500 text-red-100 p1 pl-3 pr-3 m-1 rounded font-size-3">red</span>
131
- <span class="bg-orange-500 text-orange-100 p1 pl-3 pr-3 m-1 rounded font-size-3">orange</span>
132
- <span class="bg-amber-500 text-amber-100 p1 pl-3 pr-3 m-1 rounded font-size-3">amber</span>
133
- <span class="bg-yellow-500 text-yellow-100 p1 pl-3 pr-3 m-1 rounded font-size-3">yellow</span>
134
- <span class="bg-lime-500 text-lime-100 p1 pl-3 pr-3 m-1 rounded font-size-3">lime</span>
135
- <span class="bg-green-500 text-green-100 p1 pl-3 pr-3 m-1 rounded font-size-3">green</span>
136
- <span class="bg-emerald-500 text-emerald-100 p1 pl-3 pr-3 m-1 rounded font-size-3">emerald</span>
137
- <span class="bg-teal-500 text-teal-100 p1 pl-3 pr-3 m-1 rounded font-size-3">teal</span>
138
- <span class="bg-cyan-500 text-cyan-100 p1 pl-3 pr-3 m-1 rounded font-size-3">cyan</span><br/>
139
- <span class="text-gray-300 bg-navy-900 p1 pl-3 pr-3 m-1 rounded font-size-3">navy</span>
140
- <span class="bg-sky-500 text-sky-100 p1 pl-3 pr-3 m-1 rounded font-size-3">sky</span>
141
- <span class="bg-blue-500 text-blue-100 p1 pl-3 pr-3 m-1 rounded font-size-3">blue</span>
142
- <span class="bg-indigo-500 text-indigo-100 p1 pl-3 pr-3 m-1 rounded font-size-3">indigo</span>
143
- <span class="bg-violet-500 text-violet-100 p1 pl-3 pr-3 m-1 rounded font-size-3">violet</span>
144
- <span class="bg-purple-500 text-purple-100 p1 pl-3 pr-3 m-1 rounded font-size-3">purple</span>
145
- <span class="bg-pink-500 text-pink-100 p1 pl-3 pr-3 m-1 rounded font-size-3">pink</span>
146
- <span class="bg-rose-500 text-rose-100 p1 pl-3 pr-3 m-1 rounded font-size-3">rose</span>
147
- <span class="bg-fuchsia-500 text-fuchsia-100 p1 pl-3 pr-3 m-1 rounded font-size-3">fuchsia</span>
148
-
127
+ <div class="leading-[1.5em]">
128
+ <span class="bg-slate-500 text-slate-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">slate</span>
129
+ <span class="bg-gray-500 text-gray-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">gray</span>
130
+ <span class="bg-zinc-500 text-zinc-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">zinc</span>
131
+ <span class="bg-neutral-500 text-neutral-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">neutral</span>
132
+ <span class="bg-stone-500 text-stone-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">stone</span>
133
+ <span class="bg-red-500 text-red-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">red</span>
134
+ <span class="bg-orange-500 text-orange-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">orange</span>
135
+ <span class="bg-amber-500 text-amber-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">amber</span>
136
+ <span class="bg-yellow-500 text-yellow-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">yellow</span>
137
+ <span class="bg-lime-500 text-lime-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">lime</span>
138
+ <span class="bg-green-500 text-green-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">green</span>
139
+ <span class="bg-emerald-500 text-emerald-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">emerald</span>
140
+ <span class="bg-teal-500 text-teal-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">teal</span>
141
+ <span class="bg-cyan-500 text-cyan-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">cyan</span><br/>
142
+ <span class="text-gray-300 bg-navy-900 p-1 pl-3 pr-3 m-1 rounded font-size-3">navy</span>
143
+ <span class="bg-sky-500 text-sky-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">sky</span>
144
+ <span class="bg-blue-500 text-blue-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">blue</span>
145
+ <span class="bg-indigo-500 text-indigo-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">indigo</span>
146
+ <span class="bg-violet-500 text-violet-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">violet</span>
147
+ <span class="bg-purple-500 text-purple-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">purple</span>
148
+ <span class="bg-pink-500 text-pink-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">pink</span>
149
+ <span class="bg-rose-500 text-rose-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">rose</span>
150
+ <span class="bg-fuchsia-500 text-fuchsia-100 p-1 pl-3 pr-3 m-1 rounded font-size-3">fuchsia</span>
151
+ </div>
149
152
 
150
153
  ---
151
154
  layout: default
@@ -342,10 +345,7 @@ layout: cover
342
345
  # This is the `cover` layout
343
346
 
344
347
  **Todd Gureckis**
345
- <div class="iconlink">
346
-
347
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
348
- </div>
348
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
349
349
 
350
350
  :: note ::
351
351
 
@@ -364,10 +364,7 @@ color: dark
364
364
  # This is the `cover` layout
365
365
 
366
366
  **Todd Gureckis**
367
- <div class="iconlink">
368
-
369
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
370
- </div>
367
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
371
368
 
372
369
  :: note ::
373
370
 
@@ -386,14 +383,12 @@ color: amber
386
383
  # This is the `cover` layout
387
384
 
388
385
  **Todd Gureckis**
389
- <div class="iconlink">
386
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
390
387
 
391
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
392
- </div>
393
388
 
394
389
  :: note ::
395
390
 
396
- <div class="fw-200" >
391
+ <div class="fw-200">
397
392
 
398
393
  \* Here we set `color: amber` in the frontmatter.
399
394
 
@@ -408,10 +403,8 @@ color: amber-light
408
403
  # This is the `cover` layout
409
404
 
410
405
  **Todd Gureckis**
411
- <div class="iconlink">
406
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
412
407
 
413
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
414
- </div>
415
408
 
416
409
  :: note ::
417
410
 
@@ -430,10 +423,8 @@ color: pink
430
423
  ### This is the `cover` layout with a longer title for your talk you just use more `#`s
431
424
 
432
425
  **Todd Gureckis**
433
- <div class="iconlink">
426
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
434
427
 
435
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
436
- </div>
437
428
 
438
429
  :: note ::
439
430
 
@@ -452,10 +443,8 @@ color: emerald-light
452
443
  # This is the `intro` layout
453
444
 
454
445
  **Todd Gureckis**
455
- <div class="iconlink">
446
+ _New York University_ <a href="https://todd.gureckislab.org" class="ns-c-iconlink"><mdi-open-in-new /></a>
456
447
 
457
- _New York University_ <a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
458
- </div>
459
448
 
460
449
  <br />
461
450
 
@@ -560,7 +549,7 @@ layout: section
560
549
  color: navy
561
550
  ---
562
551
 
563
- <div class="w-1/2 ml-30">
552
+ <div class="w-2/3 ml-30">
564
553
 
565
554
  # The `section` layout
566
555
  <hr>
@@ -1066,6 +1055,7 @@ title: Top Title (Another)
1066
1055
 
1067
1056
  # `top-title`: A variation with different parameters
1068
1057
 
1058
+
1069
1059
  :: content ::
1070
1060
 
1071
1061
  Todd has used this navy color on many projects in the past. This is a top title layout.
@@ -1294,6 +1284,16 @@ Result:
1294
1284
  <QRCode value="https://gureckislab.org" :size="200" render-as='svg'/>
1295
1285
 
1296
1286
 
1287
+
1288
+ ---
1289
+ layout: default
1290
+ title: Lines
1291
+ ---
1292
+
1293
+ # Lines
1294
+
1295
+ <Line :x1=0 :y1=0 :x2=200 :y2=200 :width=2 color='red-400' v-drag="[326,136,250,250]" />
1296
+
1297
1297
  ---
1298
1298
  layout: side-title
1299
1299
  side: left
package/layoutHelper.ts CHANGED
@@ -1,4 +1,41 @@
1
1
  import type { CSSProperties } from 'vue'
2
+ import { colors } from '@unocss/preset-mini'
3
+
4
+ export function resolveColor(colorName: string, defaultColor: string = '#000000'): string {
5
+ // If the input is already a hex code, return it
6
+ if (/^#([0-9A-F]{3}){1,2}$/i.test(colorName)) {
7
+ return colorName
8
+ }
9
+
10
+ // Split the color name into base and shade
11
+ const [baseColor, shade] = colorName.toLowerCase().split('-')
12
+
13
+ // Function to find the color in the colors object
14
+ function findColor(obj: any, base: string, shade?: string): string | null {
15
+ if (base in obj) {
16
+ if (shade && typeof obj[base] === 'object' && shade in obj[base]) {
17
+ return obj[base][shade]
18
+ } else if (!shade && typeof obj[base] === 'string') {
19
+ return obj[base]
20
+ }
21
+ }
22
+
23
+ for (const value of Object.values(obj)) {
24
+ if (typeof value === 'object' && value !== null) {
25
+ const result = findColor(value, base, shade)
26
+ if (result) return result
27
+ }
28
+ }
29
+
30
+ return null
31
+ }
32
+
33
+ // Search for the color in the UnoCSS colors object
34
+ const hexCode = findColor(colors, baseColor, shade)
35
+
36
+ // If a valid color is found, return its hex code; otherwise, return the default color
37
+ return hexCode || defaultColor
38
+ }
2
39
 
3
40
  /**
4
41
  * Resolve urls from frontmatter and append with the base url
@@ -38,7 +38,7 @@ const colorscheme = computed(() => {
38
38
  .slidev-layout.section h1 {
39
39
  font-family: var(--neversink-title-font);
40
40
  font-weight: 500;
41
- font-size: 1.8em;
41
+ font-size: 2.8em;
42
42
  padding-bottom: 0.3rem;
43
43
  line-height: normal;
44
44
  }
@@ -47,12 +47,14 @@ const colorscheme = computed(() => {
47
47
  font-family: var(--neversink-title-font);
48
48
  font-weight: 500;
49
49
  font-size: 2.5em;
50
+ line-height: normal;
50
51
  }
51
52
 
52
53
  .slidev-layout.section h3 {
53
54
  font-family: var(--neversink-title-font);
54
55
  font-weight: 500;
55
56
  font-size: 1.9em;
57
+ line-height: normal;
56
58
  }
57
59
 
58
60
  .slidev-layout.section {
@@ -83,7 +83,7 @@ const colorscheme = computed(() => {
83
83
 
84
84
  <p>The <code>color</code> parameter determines color of the title.</p>
85
85
  </div>
86
- <template v-else>
86
+ <div class="h-full" v-else>
87
87
  <div v-if="side === 'left'" class="flex h-full w-full">
88
88
  <div class="slidecolor column-title" :class="colorscheme">
89
89
  <div class="slidev-layout sidetitle w-full p-6" :class="alignment.l"><slot name="title" /></div>
@@ -106,7 +106,7 @@ const colorscheme = computed(() => {
106
106
  <div class="slidev-layout sidetitle w-full p-6" :class="alignment.r"><slot name="title" /></div>
107
107
  </div>
108
108
  </div>
109
- </template>
109
+ </div>
110
110
  </template>
111
111
 
112
112
  <style>
@@ -62,11 +62,11 @@ const colorscheme = computed(() => {
62
62
  <template v-else>
63
63
  <div class="flex flex-col h-full w-full">
64
64
  <div class="w-full h-fit min-h-13 pt-2 pb-2 slidecolor" :class="colorscheme">
65
- <div class="slidev-layout toptitlebar p-0 ml-6 mr-6 mt-auto mb-auto" :class="alignment.t">
65
+ <div class="slidev-layout toptitle title p-0 ml-6 mr-6 mt-auto mb-auto" :class="alignment.t">
66
66
  <slot name="title" />
67
67
  </div>
68
68
  </div>
69
- <div class="slidev-layout toptitlecontent w-full">
69
+ <div class="slidev-layout toptitle content w-full">
70
70
  <div class="flex flex-row h-full w-full">
71
71
  <div class="col-left" :class="alignment.l">
72
72
  <slot name="left" />
@@ -84,14 +84,14 @@ const colorscheme = computed(() => {
84
84
  </template>
85
85
 
86
86
  <style>
87
- .slidev-layout.toptitlecontent {
87
+ .slidev-layout.toptitle .content {
88
88
  padding-top: 1.3rem;
89
89
  }
90
90
 
91
- .slidev-layout.toptitlecontent h1 + ul {
91
+ .slidev-layout.toptitle .content h1 + ul {
92
92
  margin-top: 0em;
93
93
  }
94
- .slidev-layout.toptitlecontent h2 + ul {
94
+ .slidev-layout.toptitle .content h2 + ul {
95
95
  margin-top: 0em;
96
96
  }
97
97
 
@@ -110,59 +110,63 @@ li li {
110
110
  margin-bottom: 0rem;
111
111
  }
112
112
 
113
- .slidev-layout.toptitlecontent h2 {
113
+ .slidev-layout.toptitle .content h2 {
114
114
  font-size: 1.4em;
115
115
  font-family: var(--neversink-title-font);
116
116
  font-weight: 500;
117
117
  margin-bottom: 0rem;
118
118
  }
119
119
 
120
- .slidev-layout.toptitlecontent h3 {
120
+ .slidev-layout.toptitle .content h3 {
121
121
  font-size: 1.1em;
122
122
  font-family: var(--neversink-title-font);
123
123
  font-weight: 500;
124
124
  margin-bottom: 0rem;
125
125
  }
126
126
 
127
- .toptitlebar {
127
+ .slidev-layout .toptitle .title {
128
128
  padding: 0;
129
129
  margin: 0;
130
130
  margin-left: 20px;
131
131
  margin-right: 20px;
132
132
  }
133
133
 
134
- .slidev-layout.toptitle h1 {
134
+ .slidev-layout.toptitle.title h1 {
135
135
  font-size: 1.8em;
136
136
  font-family: var(--neversink-title-font);
137
137
  font-weight: 500;
138
- padding-left: 25px;
139
138
  letter-spacing: 0.07em;
140
139
  }
141
140
 
142
- .slidev-layout.toptitle h2 {
141
+ .slidev-layout.toptitle.title h2 {
143
142
  font-size: 1.5em;
144
143
  font-family: var(--neversink-title-font);
145
144
  font-weight: 300;
146
- padding-left: 25px;
147
145
  letter-spacing: 0.07em;
148
146
  }
149
147
 
150
- .slidev-layout.toptitle h3 {
148
+ .slidev-layout.toptitle.title h3 {
151
149
  font-size: 1.1em;
152
150
  font-family: var(--neversink-title-font);
153
151
  font-weight: 300;
154
- padding-left: 25px;
155
152
  letter-spacing: 0.07em;
156
153
  }
154
+
155
+ .slidev-layout.toptitle.title h1 + p,
156
+ .slidev-layout.toptitle.title h2 + p,
157
+ .slidev-layout.toptitle.title h3 + p {
158
+ margin-top: 0.85em;
159
+ margin-bottom: 0.3em;
160
+ }
157
161
  </style>
158
162
 
159
163
  <style scoped>
160
- .slidev-layout.toptitlecontent .col-left {
164
+ .slidev-layout.toptitle.content .col-left {
161
165
  flex: v-bind(colwidth.l); /* Makes each column take up equal space */
162
166
  margin-right: 15px;
163
167
  }
164
168
 
165
- .slidev-layout.toptitlecontent .col-right {
169
+ .slidev-layout.toptitle.content .col-right {
166
170
  flex: v-bind(colwidth.r); /*Makes each column take up equal space */
167
171
  margin-left: 15px;
168
172
  }
@@ -44,11 +44,11 @@ const colorscheme = computed(() => {
44
44
  <template v-else>
45
45
  <div class="flex flex-col h-full w-full">
46
46
  <div class="w-full h-fit min-h-13 pt-2 pb-2 slidecolor" :class="colorscheme">
47
- <div class="slidev-layout toptitlebar p-0 pt-0 ml-6 mr-6 mt-auto mb-auto" :class="alignment">
47
+ <div class="slidev-layout toptitle title p-0 pt-0 ml-6 mr-6 mt-auto mb-auto" :class="alignment">
48
48
  <slot name="title" />
49
49
  </div>
50
50
  </div>
51
- <div class="slidev-layout toptitlecontent h-fit w-full">
51
+ <div class="slidev-layout toptitle content h-fit w-full">
52
52
  <slot name="content" />
53
53
  </div>
54
54
  <div v-if="$slots.default" class="slidev-layout default h-fit w-full">
@@ -130,8 +130,12 @@ const flexclass = computed(() => {
130
130
  }
131
131
 
132
132
  .slidev-layout.two-cols-header .title h1 + p,
133
- .slidev-layout.two-cols-footer .title h1 + p {
134
- margin-top: 0.2em;
133
+ .slidev-layout.two-cols-footer .title h1 + p,
134
+ .slidev-layout.two-cols-header .title h2 + p,
135
+ .slidev-layout.two-cols-footer .title h2 + p,
136
+ .slidev-layout.two-cols-header .title h3 + p,
137
+ .slidev-layout.two-cols-footer .title h3 + p {
138
+ margin-top: 0.1em;
135
139
  margin-bottom: 0;
136
140
  }
137
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidev-theme-neversink",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "author": "gureckis",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -39,7 +39,8 @@
39
39
  "pnpm": "^9.4.0",
40
40
  "vitepress": "^1.2.3",
41
41
  "@slidev/cli": "^0.49.16",
42
- "playwright-chromium": "^1.45.0"
42
+ "playwright-chromium": "^1.45.0",
43
+ "bumpp": "^9.4.1"
43
44
  },
44
45
  "scripts": {
45
46
  "build": "slidev build example.md -o docs/public/example --base /slidev-theme-neversink/example/",
@@ -50,6 +51,7 @@
50
51
  "docs:dev": "vitepress dev docs",
51
52
  "docs:build": "vitepress build docs",
52
53
  "docs:preview": "vitepress preview docs",
53
- "ci:publish": "pnpm publish --access public --no-git-checks"
54
+ "ci:publish": "pnpm publish --access public --no-git-checks",
55
+ "release": "bumpp package.json"
54
56
  }
55
57
  }
package/styles/base.css CHANGED
@@ -17,7 +17,6 @@
17
17
  #page-root {
18
18
  font-family: var(--neversink-main-font);
19
19
  font-weight: 400;
20
- letter-spacing: 0.015rem;
21
20
  }
22
21
 
23
22
  /* binds variable to the color of a slide*/
@@ -27,7 +26,7 @@
27
26
  }
28
27
 
29
28
  .slidev-layout p {
30
- line-height: normal;
29
+ line-height: relaxed;
31
30
  }
32
31
  /* adjust default bullets */
33
32
  .slidev-layout li {