slidev-theme-neversink 0.3.4 → 0.4.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/README.md +5 -5
- package/components/Admonition.vue +13 -3
- package/components/StickyNote.vue +12 -9
- package/docs/colors.md +14 -6
- package/docs/components/admonitions.md +25 -10
- package/docs/components/arrowdraw.md +2 -2
- package/docs/components/arrowheads.md +4 -4
- package/docs/components/box.md +10 -10
- package/docs/components/email.md +1 -1
- package/docs/components/kawaii.md +1 -1
- package/docs/components/line.md +2 -2
- package/docs/components/qrcode.md +2 -2
- package/docs/components/speechbubble.md +8 -8
- package/docs/components/stickynote.md +26 -7
- package/docs/components/thumb.md +6 -6
- package/docs/styling.md +36 -1
- package/example.md +19 -6
- package/layouts/cover.vue +1 -1
- package/layouts/full.vue +1 -1
- package/layouts/top-title-two-cols.vue +1 -1
- package/layouts/top-title.vue +1 -1
- package/package.json +15 -15
- package/styles/base.css +1 -5
- package/styles/neversink-c.css +13 -0
- package/uno.config.ts +18 -0
package/README.md
CHANGED
|
@@ -24,11 +24,11 @@ theme: neversink
|
|
|
24
24
|
|
|
25
25
|
## Features
|
|
26
26
|
|
|
27
|
-
- [Color schemes](colors
|
|
28
|
-
- [Custom layouts](layouts
|
|
29
|
-
- [Branding](branding
|
|
30
|
-
- [Components](components
|
|
31
|
-
- [Markdown features](markdown
|
|
27
|
+
- [Color schemes](https://gureckis.github.io/slidev-theme-neversink/colors) - the color schemes available in Neversink
|
|
28
|
+
- [Custom layouts](https://gureckis.github.io/slidev-theme-neversink/layouts) - the custom slide layouts available in Neversink
|
|
29
|
+
- [Branding](https://gureckis.github.io/slidev-theme-neversink/branding) - how to customize the theme to your brand/logos
|
|
30
|
+
- [Components](https://gureckis.github.io/slidev-theme-neversink/components) - the custom components such as sticky notes and admonitions
|
|
31
|
+
- [Markdown features](https://gureckis.github.io/slidev-theme-neversink/markdown) - special addons to the Slidev markdown syntax
|
|
32
32
|
|
|
33
33
|
## Examples
|
|
34
34
|
|
|
@@ -18,6 +18,16 @@ const props = defineProps({
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: '100%',
|
|
20
20
|
},
|
|
21
|
+
custom: {
|
|
22
|
+
// add a custom class if you want
|
|
23
|
+
type: String,
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
26
|
+
customTitle: {
|
|
27
|
+
// add a custom class if you want
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
30
|
+
},
|
|
21
31
|
})
|
|
22
32
|
|
|
23
33
|
const colorscheme = computed(() => {
|
|
@@ -27,10 +37,10 @@ const colorscheme = computed(() => {
|
|
|
27
37
|
|
|
28
38
|
<template>
|
|
29
39
|
<div class="markdown-alert markdown-alert-custom" :class="colorscheme">
|
|
30
|
-
<p class="markdown-alert-title-custom">
|
|
31
|
-
<span class="font-size-1.3rem"><Icon :icon="props.icon" /></span> {{ props.title }}
|
|
40
|
+
<p class="markdown-alert-title-custom" :class="props.customTitle">
|
|
41
|
+
<span :class="`[font-size-1.3rem, customTitle]`"><Icon :icon="props.icon" /></span> {{ props.title }}
|
|
32
42
|
</p>
|
|
33
|
-
<p><slot></slot></p>
|
|
43
|
+
<p :class="props.custom"><slot></slot></p>
|
|
34
44
|
</div>
|
|
35
45
|
</template>
|
|
36
46
|
|
|
@@ -18,6 +18,16 @@ const props = defineProps({
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: '',
|
|
20
20
|
},
|
|
21
|
+
custom: {
|
|
22
|
+
// add a custom class if you want
|
|
23
|
+
type: String,
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
26
|
+
customTitle: {
|
|
27
|
+
// add a custom class if you want
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'block text-xs font-mono tracking-normal font-bold',
|
|
30
|
+
},
|
|
21
31
|
})
|
|
22
32
|
|
|
23
33
|
const colorscheme = computed(() => {
|
|
@@ -40,9 +50,9 @@ const stickyStyles = computed(() => ({
|
|
|
40
50
|
<template>
|
|
41
51
|
<div :class="stickyClasses" :style="stickyStyles">
|
|
42
52
|
<template v-if="props.title !== ''"
|
|
43
|
-
><
|
|
53
|
+
><span :class="props.customTitle">{{ props.title }}</span></template
|
|
44
54
|
>
|
|
45
|
-
<slot></slot>
|
|
55
|
+
<div :class="props.custom"><slot></slot></div>
|
|
46
56
|
</div>
|
|
47
57
|
</template>
|
|
48
58
|
|
|
@@ -61,11 +71,4 @@ const stickyStyles = computed(() => ({
|
|
|
61
71
|
color: var(--text-color);
|
|
62
72
|
border: 0.4px solid var(--border-color);
|
|
63
73
|
}
|
|
64
|
-
.sticky-note strong {
|
|
65
|
-
display: block;
|
|
66
|
-
font-size: 0.8rem;
|
|
67
|
-
font-family: monospace;
|
|
68
|
-
letter-spacing: 0em;
|
|
69
|
-
word-spacing: -0.3em;
|
|
70
|
-
}
|
|
71
74
|
</style>
|
package/docs/colors.md
CHANGED
|
@@ -89,19 +89,27 @@ which contains values for these options which might go well together in a monoch
|
|
|
89
89
|
|
|
90
90
|
To apply the theme to a element you simply add the `neversink-{name}-scheme` class to the element and then add another class which binds the CSS vars as you like.
|
|
91
91
|
|
|
92
|
+
There is one built-in one called `.ns-c-bind-scheme` which applies the color to the background, text, and border of the element. It's definition looks like this:
|
|
93
|
+
|
|
94
|
+
```css
|
|
95
|
+
.ns-c-bind-scheme {
|
|
96
|
+
background-color: var(--neversink-bg-color);
|
|
97
|
+
color: var(--neversink-text-color);
|
|
98
|
+
border-color: var(--neversink-border-color);
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
92
102
|
For example, to apply the `red` scheme from above to a `div` element you would add the following classes:
|
|
93
103
|
|
|
94
104
|
```html
|
|
95
|
-
<div class="neversink-red-scheme
|
|
105
|
+
<div class="neversink-red-scheme ns-c-bind-scheme">This is a red div</div>
|
|
96
106
|
```
|
|
97
107
|
|
|
98
|
-
|
|
108
|
+
You can also define you own custom binding classes if you want to map the colors from the theme in a different way. For example, you could define a class like this:
|
|
99
109
|
|
|
100
110
|
```css
|
|
101
|
-
.
|
|
102
|
-
background-color: var(--neversink-
|
|
103
|
-
color: var(--neversink-text-color);
|
|
104
|
-
border-color: var(--neversink-border-color);
|
|
111
|
+
.my-bind-scheme {
|
|
112
|
+
background-color: var(--neversink-text-color);
|
|
105
113
|
}
|
|
106
114
|
```
|
|
107
115
|
|
|
@@ -16,11 +16,13 @@ The `Admonition` component is used to create a colored box with an icon and a ti
|
|
|
16
16
|
- `color` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `amber-light`.
|
|
17
17
|
- `width` (optional) the width of the admonition. Default is `100%`.
|
|
18
18
|
- `icon` (optional) the icon to display. Default is `mdi-information-variant-circle-outline`.
|
|
19
|
+
- `custom` (optional) a custom CSS class to apply to the admonition content. Default is empty.
|
|
20
|
+
- `customTitle` (optional) a custom CSS class to apply to the admonition title. Default is empty.
|
|
19
21
|
|
|
20
22
|
Example:
|
|
21
23
|
|
|
22
|
-
```
|
|
23
|
-
<Admonition title="Info" color=
|
|
24
|
+
```vue
|
|
25
|
+
<Admonition title="Info" color="teal-light" width="300px">
|
|
24
26
|
This is my admonition content.
|
|
25
27
|
</Admonition>
|
|
26
28
|
```
|
|
@@ -30,10 +32,23 @@ Renders as:
|
|
|
30
32
|
This is my admonition content.
|
|
31
33
|
</Admonition>
|
|
32
34
|
|
|
35
|
+
You can also add custom CSS classes to style the admonition content and title:
|
|
36
|
+
|
|
37
|
+
```vue
|
|
38
|
+
<Admonition title="Custom Styled" color="purple-light" custom="text-lg font-bold" customTitle="text-red-500">
|
|
39
|
+
This content has custom styling applied.
|
|
40
|
+
</Admonition>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Renders as:
|
|
44
|
+
<Admonition title="Custom Styled" color='purple-light' custom="text-lg font-bold" customTitle="text-red-500">
|
|
45
|
+
This content has custom styling applied.
|
|
46
|
+
</Admonition>
|
|
47
|
+
|
|
33
48
|
If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the width to something fixed (e.g., `300px`):
|
|
34
49
|
|
|
35
|
-
```
|
|
36
|
-
<Admonition title="V-draggable" color=
|
|
50
|
+
```vue
|
|
51
|
+
<Admonition title="V-draggable" color="teal-light" width="300px" v-drag>
|
|
37
52
|
This is my admonition content.
|
|
38
53
|
</Admonition>
|
|
39
54
|
```
|
|
@@ -47,7 +62,7 @@ The `AdmonitionType` component is used to create a colored box with an icon and
|
|
|
47
62
|
|
|
48
63
|
Example:
|
|
49
64
|
|
|
50
|
-
```
|
|
65
|
+
```vue
|
|
51
66
|
<AdmonitionType type="info" width="300px">
|
|
52
67
|
This is my info
|
|
53
68
|
</AdmonitionType>
|
|
@@ -57,7 +72,7 @@ This is my info
|
|
|
57
72
|
This is my warning
|
|
58
73
|
</AdmonitionType>
|
|
59
74
|
|
|
60
|
-
```
|
|
75
|
+
```vue
|
|
61
76
|
<AdmonitionType type="important" width="300px">
|
|
62
77
|
This is my important
|
|
63
78
|
</AdmonitionType>
|
|
@@ -67,7 +82,7 @@ This is my important
|
|
|
67
82
|
This is my important
|
|
68
83
|
</AdmonitionType>
|
|
69
84
|
|
|
70
|
-
```
|
|
85
|
+
```vue
|
|
71
86
|
<AdmonitionType type="tip" width="300px">
|
|
72
87
|
This is my tip
|
|
73
88
|
</AdmonitionType>
|
|
@@ -77,7 +92,7 @@ This is my tip
|
|
|
77
92
|
This is my tip
|
|
78
93
|
</AdmonitionType>
|
|
79
94
|
|
|
80
|
-
```
|
|
95
|
+
```vue
|
|
81
96
|
<AdmonitionType type="warning" width="300px">
|
|
82
97
|
This is mywarning
|
|
83
98
|
</AdmonitionType>
|
|
@@ -87,7 +102,7 @@ This is mywarning
|
|
|
87
102
|
This is my warning
|
|
88
103
|
</AdmonitionType>
|
|
89
104
|
|
|
90
|
-
```
|
|
105
|
+
```vue
|
|
91
106
|
<AdmonitionType type="caution" width="300px">
|
|
92
107
|
This is my caution
|
|
93
108
|
</AdmonitionType>
|
|
@@ -99,7 +114,7 @@ This is my caution
|
|
|
99
114
|
|
|
100
115
|
If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the width to something fixed (e.g., `300px`)
|
|
101
116
|
|
|
102
|
-
```
|
|
117
|
+
```vue
|
|
103
118
|
<AdmonitionType type="warning" width="300px" v-drag>
|
|
104
119
|
This is my my warning
|
|
105
120
|
</Admonition>
|
|
@@ -12,8 +12,8 @@ changed according to the [color schemes](/colors) in the theme. The ArrowDraw co
|
|
|
12
12
|
- `color` (optional) the color of the arrow stroke. Colors are from the themes. The background color is applied as the stroke so `red` is red, `black` is black. Default is 'black'.
|
|
13
13
|
- width (optional) the initial width of the image. Default is 140px
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
<ArrowDraw color=
|
|
15
|
+
```vue
|
|
16
|
+
<ArrowDraw color="red" v-drag />
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Renders as:
|
|
@@ -11,16 +11,16 @@ The ArrowHeads component has the following props:
|
|
|
11
11
|
- `color` (optional) the color of the arrow stroke. Colors are from the themes. The background color is applied as the stroke so `red` is red, `black` is black. Default is 'black'.
|
|
12
12
|
- width (optional) the initial width of the image. Default is 140px
|
|
13
13
|
|
|
14
|
-
```
|
|
15
|
-
<ArrowHeads color=
|
|
14
|
+
```vue
|
|
15
|
+
<ArrowHeads color="pink" width="300px" v-drag />
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Renders as:
|
|
19
19
|
|
|
20
20
|
<ArrowHeads color='pink' width="300px"/>
|
|
21
21
|
|
|
22
|
-
```
|
|
23
|
-
<ArrowHeads
|
|
22
|
+
```vue
|
|
23
|
+
<ArrowHeads v-drag />
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Renders as:
|
package/docs/components/box.md
CHANGED
|
@@ -13,7 +13,7 @@ The `Box` component is used to just draw a rectangle. It has the following props
|
|
|
13
13
|
- `color` (optional) the color of the shape. It uses the color schemes in the theme. The default is 'white' (which means a black border and white fill).
|
|
14
14
|
- `custom` (optional) any custom classes you want to add to the box. The default is none. For example, opacity only applies to the fill not the border but you can change that using `custom` classes.
|
|
15
15
|
|
|
16
|
-
```
|
|
16
|
+
```vue
|
|
17
17
|
<Box v-drag />
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -25,29 +25,29 @@ well a box, what did you expect.
|
|
|
25
25
|
|
|
26
26
|
But of course you can customise it:
|
|
27
27
|
|
|
28
|
-
```
|
|
29
|
-
<Box shape=
|
|
28
|
+
```vue
|
|
29
|
+
<Box shape="r-d-8-0" width="200px" custom="m-10 " />
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<Box shape='r-d-8-0' width='200px' custom='m-10 ' />
|
|
33
33
|
|
|
34
|
-
```
|
|
35
|
-
<Box shape=
|
|
34
|
+
```vue
|
|
35
|
+
<Box shape="f-o-5-0" color="sky-light" custom="m-10" />
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
<Box shape='f-o-5-0' color='sky-light' custom='m-10' />
|
|
39
39
|
|
|
40
40
|
more transparent:
|
|
41
41
|
|
|
42
|
-
```
|
|
43
|
-
<Box shape=
|
|
42
|
+
```vue
|
|
43
|
+
<Box shape="f-o-5-75" color="sky-light" custom="m-10" />
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
<Box shape='f-o-5-75' color='sky-light' custom='m-10' />
|
|
47
47
|
|
|
48
48
|
If can include text as well using a slot
|
|
49
49
|
|
|
50
|
-
```
|
|
50
|
+
```vue
|
|
51
51
|
<Box>Hi there</Box>
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -57,8 +57,8 @@ renders as:
|
|
|
57
57
|
|
|
58
58
|
You might like to syle it a bit
|
|
59
59
|
|
|
60
|
-
```
|
|
61
|
-
<Box custom=
|
|
60
|
+
```vue
|
|
61
|
+
<Box custom="pt-10">Hi there</Box>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
<Box custom='p-10'>Hi there</Box>
|
package/docs/components/email.md
CHANGED
package/docs/components/line.md
CHANGED
|
@@ -15,8 +15,8 @@ The `Line` component is used to just draw a straight line. It has the following
|
|
|
15
15
|
- `width` (optional) the width of the line (default '2')
|
|
16
16
|
- `color` (optional) the color of the line. Colors can be any of the color schemes. the default is 'black'. The background color of the theme is applied to the stroke of the line so `black` is black line, `red` is red line, `red-light` is a light red line, etc.
|
|
17
17
|
|
|
18
|
-
```
|
|
19
|
-
<Line :x1=0 :y1=0 :x2=200 :y2=200 :width=2 color=
|
|
18
|
+
```vue
|
|
19
|
+
<Line :x1="0" :y1="0" :x2="200" :y2="200" :width="2" color="red" v-drag />
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Renders as:
|
|
@@ -16,8 +16,8 @@ The `Qr` component is used to create QR code in SVG format. The QRCode component
|
|
|
16
16
|
|
|
17
17
|
Example:
|
|
18
18
|
|
|
19
|
-
```
|
|
20
|
-
<QRCode value="https://sli.dev" :size="200" render-as="svg"/>
|
|
19
|
+
```vue
|
|
20
|
+
<QRCode value="https://sli.dev" :size="200" render-as="svg" />
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Renders as:
|
|
@@ -20,8 +20,8 @@ The `SpeechBubble` component is used to create a colored bubble with a speech bu
|
|
|
20
20
|
|
|
21
21
|
Example:
|
|
22
22
|
|
|
23
|
-
```
|
|
24
|
-
<SpeechBubble position="r" color=
|
|
23
|
+
```vue
|
|
24
|
+
<SpeechBubble position="r" color="sky" shape="round" maxWidth="300px">
|
|
25
25
|
|
|
26
26
|
Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
27
27
|
</SpeechBubble>
|
|
@@ -33,8 +33,8 @@ Renders as:
|
|
|
33
33
|
Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
34
34
|
</SpeechBubble>
|
|
35
35
|
|
|
36
|
-
```
|
|
37
|
-
<SpeechBubble position="b" color=
|
|
36
|
+
```vue
|
|
37
|
+
<SpeechBubble position="b" color="sky" shape="round" maxWidth="300px">
|
|
38
38
|
|
|
39
39
|
Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
40
40
|
</SpeechBubble>
|
|
@@ -46,8 +46,8 @@ Renders as:
|
|
|
46
46
|
Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
47
47
|
</SpeechBubble>
|
|
48
48
|
|
|
49
|
-
```
|
|
50
|
-
<SpeechBubble position="t" color=
|
|
49
|
+
```vue
|
|
50
|
+
<SpeechBubble position="t" color="amber" shape="round" maxWidth="300px">
|
|
51
51
|
|
|
52
52
|
Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
53
53
|
</SpeechBubble>
|
|
@@ -61,8 +61,8 @@ Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
|
61
61
|
|
|
62
62
|
If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the maxWidth to something fixed (e.g., `300px`):
|
|
63
63
|
|
|
64
|
-
```
|
|
65
|
-
<SpeechBubble position="t" color=
|
|
64
|
+
```vue
|
|
65
|
+
<SpeechBubble position="t" color="sky" shape="round" maxWidth="300px" v-drag>
|
|
66
66
|
|
|
67
67
|
Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
|
|
68
68
|
</SpeechBubble>
|
|
@@ -14,13 +14,14 @@ The `StickyNote` component is used to create a colored box with an title and con
|
|
|
14
14
|
- `color` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `amber-light`.
|
|
15
15
|
- `width` (optional) the width of the admonition. Default is `180px`.
|
|
16
16
|
- `textAlign` (optional) the text alignment of the content. Default is `left`.
|
|
17
|
+
- `custom` (optional) a custom CSS class to apply to the sticky note content. Default is empty.
|
|
18
|
+
- `customTitle` (optional) a custom CSS class to apply to the sticky note title. Default is `block text-xs font-mono tracking-normal font-bold`.
|
|
17
19
|
|
|
18
20
|
Example:
|
|
19
21
|
|
|
20
|
-
```
|
|
22
|
+
```vue
|
|
21
23
|
<StickyNote color="amber-light" textAlign="left" width="180px" title="Title">
|
|
22
|
-
|
|
23
|
-
Hello, I'm a **sticky note**.
|
|
24
|
+
Hello, I'm a **sticky note**.
|
|
24
25
|
</StickyNote>
|
|
25
26
|
```
|
|
26
27
|
|
|
@@ -30,9 +31,28 @@ Renders as:
|
|
|
30
31
|
Hello, I'm a **sticky note**.
|
|
31
32
|
</StickyNote>
|
|
32
33
|
|
|
34
|
+
You can also add custom CSS classes to style the sticky note content and title:
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<StickyNote
|
|
38
|
+
color="teal-light"
|
|
39
|
+
width="200px"
|
|
40
|
+
title="Custom Styled"
|
|
41
|
+
custom="text-lg font-bold text-center"
|
|
42
|
+
customTitle="text-red-500 text-lg"
|
|
43
|
+
>
|
|
44
|
+
This content has custom styling applied.
|
|
45
|
+
</StickyNote>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Renders as:
|
|
49
|
+
<StickyNote color="teal-light" width="200px" title="Custom Styled" custom="text-lg font-bold text-center" customTitle="text-red-500 text-lg">
|
|
50
|
+
This content has custom styling applied.
|
|
51
|
+
</StickyNote>
|
|
52
|
+
|
|
33
53
|
If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the width to something fixed (e.g., `300px`):
|
|
34
54
|
|
|
35
|
-
```
|
|
55
|
+
```vue
|
|
36
56
|
<StickyNote color="amber-light" textAlign="left" width="180px" title="Title" v-drag>
|
|
37
57
|
|
|
38
58
|
Hello, I'm a **sticky note**.
|
|
@@ -41,10 +61,9 @@ Hello, I'm a **sticky note**.
|
|
|
41
61
|
|
|
42
62
|
Another color:
|
|
43
63
|
|
|
44
|
-
```
|
|
64
|
+
```vue
|
|
45
65
|
<StickyNote color="pink-light" textAlign="left" width="180px" title="Title">
|
|
46
|
-
|
|
47
|
-
Hello, I'm a **sticky note**.
|
|
66
|
+
Hello, I'm a **sticky note**.
|
|
48
67
|
</StickyNote>
|
|
49
68
|
```
|
|
50
69
|
|
package/docs/components/thumb.md
CHANGED
|
@@ -12,24 +12,24 @@ The Thumbs component has the following props:
|
|
|
12
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
13
|
- `width` (optional) the initial width of the image. Default is 140px
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
<Thumb color=
|
|
15
|
+
```vue
|
|
16
|
+
<Thumb color="green-light" width="300px" v-drag />
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Renders as:
|
|
20
20
|
|
|
21
21
|
<Thumb color='green-light' width="300px"/>
|
|
22
22
|
|
|
23
|
-
```
|
|
24
|
-
<Thumb color="sky-light"
|
|
23
|
+
```vue
|
|
24
|
+
<Thumb color="sky-light" v-drag />
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Renders as:
|
|
28
28
|
|
|
29
29
|
<Thumb color="sky-light" />
|
|
30
30
|
|
|
31
|
-
```
|
|
32
|
-
<Thumb color="red-light" dir=
|
|
31
|
+
```vue
|
|
32
|
+
<Thumb color="red-light" dir="down" v-drag />
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Renders as:
|
package/docs/styling.md
CHANGED
|
@@ -20,7 +20,30 @@ In addition to the main color [schemes](/colors) there are some additional short
|
|
|
20
20
|
| `ns-c-COLOR-scheme` | `neversink-COLOR-scheme` |
|
|
21
21
|
| `ns-c-COLOR-lt-scheme` | `neversink-COLOR-light-scheme` |
|
|
22
22
|
|
|
23
|
-
where color
|
|
23
|
+
where color is the **first two letters** of the [colors](/colors) in the project (e.g., `ns-c-pi-scheme` for `neversink-pink-scheme`).
|
|
24
|
+
|
|
25
|
+
## Color bind
|
|
26
|
+
|
|
27
|
+
When you want to apply a theme color to an element on a page you can use the
|
|
28
|
+
`ns-c-bind-scheme` class. This will apply the color to the text and the background.
|
|
29
|
+
|
|
30
|
+
It has a definition like this:
|
|
31
|
+
|
|
32
|
+
```css
|
|
33
|
+
.ns-c-bind-scheme {
|
|
34
|
+
background-color: var(--neversink-bg-color);
|
|
35
|
+
color: var(--neversink-text-color);
|
|
36
|
+
border-color: var(--neversink-border-color);
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
so to bind the color to a `div` element you can do this:
|
|
41
|
+
|
|
42
|
+
```md
|
|
43
|
+
<div class="ns-c-bind-scheme ns-c-sk-scheme">
|
|
44
|
+
This is a with the `ns-c-sk-scheme` (i.e., `neversink-sky-scheme`) color applied.
|
|
45
|
+
</div>
|
|
46
|
+
```
|
|
24
47
|
|
|
25
48
|
## Tight bullets
|
|
26
49
|
|
|
@@ -37,6 +60,18 @@ If you want to make bullets a little closer together to make spaceadd the `class
|
|
|
37
60
|
|
|
38
61
|
Other options are `ns-c-tight` and `ns-c-supertight`.
|
|
39
62
|
|
|
63
|
+
## Centering content
|
|
64
|
+
|
|
65
|
+
If you have a div and want to to appear in the center of enclosing element:
|
|
66
|
+
|
|
67
|
+
```md
|
|
68
|
+
<div class="ns-c-center-item">
|
|
69
|
+
This is centered
|
|
70
|
+
</div>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This sets the `margin-left` and `margin-right` to `auto` and the `width` to `fit-content`.
|
|
74
|
+
|
|
40
75
|
## `v-clicks` faders
|
|
41
76
|
|
|
42
77
|
If you want to fade out a bullet as you step through, add the `class='ns-c-fader'`
|
package/example.md
CHANGED
|
@@ -1006,7 +1006,7 @@ title: Side Title Layout (Another)
|
|
|
1006
1006
|
|
|
1007
1007
|
:: content ::
|
|
1008
1008
|
|
|
1009
|
-
This is `layout: side-title` with `side:
|
|
1009
|
+
This is `layout: side-title` with `side: left` in the front matter.
|
|
1010
1010
|
|
|
1011
1011
|
```yaml
|
|
1012
1012
|
side: left
|
|
@@ -1121,8 +1121,8 @@ dragPos:
|
|
|
1121
1121
|
"'admon'": 55,300,287,106
|
|
1122
1122
|
---
|
|
1123
1123
|
|
|
1124
|
-
<Admonition title="
|
|
1125
|
-
If you want to
|
|
1124
|
+
<Admonition title="draggable admonition" color='teal-light' width="300px" v-drag="[93,303,300,145,-14]">
|
|
1125
|
+
If you want to drag an admonition, you should set the width to a fixed value.
|
|
1126
1126
|
</Admonition>
|
|
1127
1127
|
|
|
1128
1128
|
:: title ::
|
|
@@ -1160,7 +1160,7 @@ This is a tip
|
|
|
1160
1160
|
This is a tip
|
|
1161
1161
|
</AdmonitionType>
|
|
1162
1162
|
|
|
1163
|
-
<AdmonitionType type='caution' >
|
|
1163
|
+
<AdmonitionType type='caution' custom="text-lg" customTitle="font-size-6">
|
|
1164
1164
|
This is warning text
|
|
1165
1165
|
</AdmonitionType>
|
|
1166
1166
|
|
|
@@ -1204,16 +1204,29 @@ title: Sticky Notes
|
|
|
1204
1204
|
Hello, I'm a **sticky note**.
|
|
1205
1205
|
</StickyNote>
|
|
1206
1206
|
|
|
1207
|
-
<StickyNote color="sky-light" textAlign="left" width="180px" title="This is my title" v-drag="[
|
|
1207
|
+
<StickyNote color="sky-light" textAlign="left" width="180px" title="This is my title" v-drag="[304,295,180,180,-15]">
|
|
1208
1208
|
|
|
1209
1209
|
Hello, I'm also a **sticky note** but am blue sky title.
|
|
1210
1210
|
</StickyNote>
|
|
1211
1211
|
|
|
1212
|
-
<StickyNote color="pink-light" textAlign="left" width="180px" v-drag="[
|
|
1212
|
+
<StickyNote color="pink-light" textAlign="left" width="180px" v-drag="[549,292,185,171,8]">
|
|
1213
1213
|
|
|
1214
1214
|
Hello, I'm also a **sticky note** but I lack a title.
|
|
1215
1215
|
</StickyNote>
|
|
1216
1216
|
|
|
1217
|
+
|
|
1218
|
+
<StickyNote color="pink-light" textAlign="left" width="180px" v-drag="[549,292,185,171,8]">
|
|
1219
|
+
|
|
1220
|
+
Hello, I'm also a **sticky note** but I lack a title.
|
|
1221
|
+
</StickyNote>
|
|
1222
|
+
|
|
1223
|
+
<StickyNote color="emerald-light" textAlign="left" width="180px" title="This is my
|
|
1224
|
+
title" customTitle="font-size-6" custom="font-size-2"
|
|
1225
|
+
v-drag="[749,292,185,171,-8]">
|
|
1226
|
+
|
|
1227
|
+
Hello, I'm also a **sticky note** but I'm customized with a title and a custom class.
|
|
1228
|
+
</StickyNote>
|
|
1229
|
+
|
|
1217
1230
|
# Sticky Notes
|
|
1218
1231
|
|
|
1219
1232
|
- Sticky notes are moveable elements you can use for notes.
|
package/layouts/cover.vue
CHANGED
|
@@ -34,7 +34,6 @@ const colorscheme = computed(() => {
|
|
|
34
34
|
|
|
35
35
|
.slidev-layout.cover {
|
|
36
36
|
font-family: var(--neversink-main-font);
|
|
37
|
-
|
|
38
37
|
font-weight: 300;
|
|
39
38
|
}
|
|
40
39
|
|
|
@@ -55,6 +54,7 @@ const colorscheme = computed(() => {
|
|
|
55
54
|
.slidev-layout.cover .note {
|
|
56
55
|
font-weight: 300;
|
|
57
56
|
font-size: 0.9rem;
|
|
57
|
+
margin-right: 200px;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.slidev-layout.cover h1 {
|
package/layouts/full.vue
CHANGED
package/layouts/top-title.vue
CHANGED
|
@@ -49,7 +49,7 @@ const colorscheme = computed(() => {
|
|
|
49
49
|
<div class="slidev-layout toptitle content h-fit w-full">
|
|
50
50
|
<slot name="content" />
|
|
51
51
|
</div>
|
|
52
|
-
<div v-if="$slots.default" class="slidev-layout default h-
|
|
52
|
+
<div v-if="$slots.default" class="slidev-layout default h-full w-full">
|
|
53
53
|
<slot name="default" />
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slidev-theme-neversink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"author": "gureckis",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
],
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18.0.0",
|
|
12
|
-
"slidev": ">=
|
|
12
|
+
"slidev": ">=52.1.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@iconify-json/logos": "^1.
|
|
16
|
-
"@iconify-json/mdi": "^1.
|
|
17
|
-
"@iconify-json/twemoji": "^1.
|
|
18
|
-
"@iconify-json/uim": "^1.
|
|
19
|
-
"@iconify/json": "^2.2.
|
|
20
|
-
"@iconify/vue": "^4.
|
|
15
|
+
"@iconify-json/logos": "^1.2.9",
|
|
16
|
+
"@iconify-json/mdi": "^1.2.3",
|
|
17
|
+
"@iconify-json/twemoji": "^1.2.4",
|
|
18
|
+
"@iconify-json/uim": "^1.2.3",
|
|
19
|
+
"@iconify/json": "^2.2.380",
|
|
20
|
+
"@iconify/vue": "^4.3.0",
|
|
21
21
|
"@mdit/plugin-sub": "^0.12.0",
|
|
22
|
-
"@slidev/types": "^
|
|
22
|
+
"@slidev/types": "^52.1.0",
|
|
23
23
|
"markdown-it-mark": "^4.0.0",
|
|
24
|
-
"qrcode.vue": "^3.
|
|
24
|
+
"qrcode.vue": "^3.6.0"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"highlighter": "all"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
39
|
+
"@slidev/cli": "^52.1.0",
|
|
40
|
+
"bumpp": "^9.11.1",
|
|
41
|
+
"playwright-chromium": "^1.55.0",
|
|
42
|
+
"pnpm": "^9.15.9",
|
|
43
|
+
"vitepress": "^1.6.4"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "slidev build example.md -o docs/public/example --base /slidev-theme-neversink/example/",
|
package/styles/base.css
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.slidev-layout p {
|
|
29
|
-
line-height:
|
|
29
|
+
line-height: 1.2;
|
|
30
30
|
}
|
|
31
31
|
/* adjust default bullets */
|
|
32
32
|
.slidev-layout li {
|
|
@@ -133,10 +133,6 @@
|
|
|
133
133
|
display: inline;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
img {
|
|
137
|
-
display: inline;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
136
|
/* customize the v-clicks */
|
|
141
137
|
.slidev-vclick-target {
|
|
142
138
|
transition: opacity 100ms ease;
|
package/styles/neversink-c.css
CHANGED
|
@@ -60,6 +60,12 @@
|
|
|
60
60
|
align-items: start;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.ns-c-center-item {
|
|
64
|
+
margin-left: auto;
|
|
65
|
+
margin-right: auto;
|
|
66
|
+
width: fit-content;
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
.ns-c-center {
|
|
64
70
|
justify-content: center; /* Horizontally center the content */
|
|
65
71
|
text-align: center;
|
|
@@ -153,3 +159,10 @@
|
|
|
153
159
|
opacity: 0.3;
|
|
154
160
|
pointer-events: none;
|
|
155
161
|
}
|
|
162
|
+
|
|
163
|
+
.ns-c-bind-scheme,
|
|
164
|
+
.ns-c-mixin {
|
|
165
|
+
background-color: var(--neversink-bg-color);
|
|
166
|
+
color: var(--neversink-text-color);
|
|
167
|
+
border-color: var(--neversink-border-color);
|
|
168
|
+
}
|
package/uno.config.ts
CHANGED
|
@@ -68,6 +68,9 @@ const generate_color_schemes = (colors) => {
|
|
|
68
68
|
'--neversink-text-color': colors['white'],
|
|
69
69
|
'--neversink-border-color': colors['white'],
|
|
70
70
|
'--neversink-highlight-color': '#FFA500',
|
|
71
|
+
'--neversink-admon-bg-color': colors['black'],
|
|
72
|
+
'--neversink-admon-border-color': colors['white'],
|
|
73
|
+
'--neversink-admon-text-color': colors['white'],
|
|
71
74
|
})
|
|
72
75
|
|
|
73
76
|
addScheme('neversink-white-scheme', 'ns-c-wh-scheme', {
|
|
@@ -78,6 +81,9 @@ const generate_color_schemes = (colors) => {
|
|
|
78
81
|
'--neversink-text-color': colors['black'],
|
|
79
82
|
'--neversink-border-color': colors['gray'][950],
|
|
80
83
|
'--neversink-highlight-color': '#FFA500',
|
|
84
|
+
'--neversink-admon-bg-color': colors['white'],
|
|
85
|
+
'--neversink-admon-border-color': colors['gray'][950],
|
|
86
|
+
'--neversink-admon-text-color': colors['black'],
|
|
81
87
|
})
|
|
82
88
|
|
|
83
89
|
addScheme('neversink-dark-scheme', 'ns-c-dk-scheme', {
|
|
@@ -88,6 +94,9 @@ const generate_color_schemes = (colors) => {
|
|
|
88
94
|
'--neversink-text-color': colors['gray'][100],
|
|
89
95
|
'--neversink-border-color': colors['gray'][100],
|
|
90
96
|
'--neversink-highlight-color': '#FFA500',
|
|
97
|
+
'--neversink-admon-bg-color': colors['gray'][800],
|
|
98
|
+
'--neversink-admon-border-color': colors['gray'][100],
|
|
99
|
+
'--neversink-admon-text-color': colors['gray'][100],
|
|
91
100
|
})
|
|
92
101
|
|
|
93
102
|
addScheme('neversink-light-scheme', 'ns-c-lt-scheme', {
|
|
@@ -97,6 +106,9 @@ const generate_color_schemes = (colors) => {
|
|
|
97
106
|
'--neversink-text-color': colors['gray'][800],
|
|
98
107
|
'--neversink-border-color': colors['gray'][800],
|
|
99
108
|
'--neversink-highlight-color': '#FFA500',
|
|
109
|
+
'--neversink-admon-bg-color': colors['gray'][100],
|
|
110
|
+
'--neversink-admon-border-color': colors['gray'][800],
|
|
111
|
+
'--neversink-admon-text-color': colors['gray'][800],
|
|
100
112
|
})
|
|
101
113
|
|
|
102
114
|
for (const color of colornames) {
|
|
@@ -108,6 +120,9 @@ const generate_color_schemes = (colors) => {
|
|
|
108
120
|
'--neversink-text-color': colors['gray'][300],
|
|
109
121
|
'--neversink-border-color': colors['gray'][300],
|
|
110
122
|
'--neversink-highlight-color': '#FFA500',
|
|
123
|
+
'--neversink-admon-bg-color': '#2a373a',
|
|
124
|
+
'--neversink-admon-border-color': colors['gray'][300],
|
|
125
|
+
'--neversink-admon-text-color': colors['gray'][300],
|
|
111
126
|
})
|
|
112
127
|
|
|
113
128
|
addScheme('neversink-navy-light-scheme', 'ns-c-nv-lt-scheme', {
|
|
@@ -117,6 +132,9 @@ const generate_color_schemes = (colors) => {
|
|
|
117
132
|
'--neversink-text-color': '#2a373a',
|
|
118
133
|
'--neversink-border-color': '#2a373a',
|
|
119
134
|
'--neversink-highlight-color': '#FFA500',
|
|
135
|
+
'--neversink-admon-bg-color': colors['gray'][50],
|
|
136
|
+
'--neversink-admon-border-color': '#2a373a',
|
|
137
|
+
'--neversink-admon-text-color': '#2a373a',
|
|
120
138
|
})
|
|
121
139
|
} else {
|
|
122
140
|
const shortColor = color.slice(0, 2)
|