slidev-theme-neversink 0.1.0 → 0.1.1
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/docs/.vitepress/config.js +1 -1
- package/docs/customizing.md +3 -3
- package/docs/getting-started.md +6 -3
- package/docs/markdown.md +0 -24
- package/docs/styling.md +68 -2
- package/layouts/two-cols-title.vue +13 -1
- package/package.json +1 -1
- package/styles/base.css +4 -5
- package/styles/neversink-c.css +7 -0
- package/uno.config.ts +2 -1
- package/vite.config.ts +2 -1
|
@@ -17,7 +17,7 @@ export default defineConfig({
|
|
|
17
17
|
{ text: 'Example Deck', link: 'https://gureckis.github.io/slidev-theme-neversink/example/#1', target: '_self' },
|
|
18
18
|
{
|
|
19
19
|
text: `v${version}`,
|
|
20
|
-
items: [{ text: 'Release Notes', link: 'https://github.com/
|
|
20
|
+
items: [{ text: 'Release Notes', link: 'https://github.com/gureckis/slidev-theme-neversink/releases' }],
|
|
21
21
|
},
|
|
22
22
|
],
|
|
23
23
|
|
package/docs/customizing.md
CHANGED
|
@@ -7,7 +7,7 @@ Generally you can customize this theme following the recommendations of [Slidev]
|
|
|
7
7
|
To add custom CSS styles to your project simply create a folder in the same files as your slide markdown file (usually `slides.md`) called `styles`.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
your-
|
|
10
|
+
your-presentation-folder/
|
|
11
11
|
├── slides.md
|
|
12
12
|
└── styles/
|
|
13
13
|
├── index.ts
|
|
@@ -32,7 +32,7 @@ To customize the fonts used in the theme, you can set the following CSS variable
|
|
|
32
32
|
:root {
|
|
33
33
|
--neversink-title-font: 'Inter', sans-serif;
|
|
34
34
|
--neversink-main-font: 'Inter', sans-serif;
|
|
35
|
-
--neversink-mono-font: '
|
|
36
|
-
--neversink-quote-font: '
|
|
35
|
+
--neversink-mono-font: 'Fira Code', monospace;
|
|
36
|
+
--neversink-quote-font: 'Fira Code', monospace;
|
|
37
37
|
}
|
|
38
38
|
```
|
package/docs/getting-started.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Getting started with Neversink
|
|
2
2
|
|
|
3
|
-
The theme depends on Slidev.
|
|
3
|
+
The theme depends on Node.js and [Slidev](https://sli.dev). If you don't have Node.js installed, you can download it from [nodejs.org](https://nodejs.org/). Once you have Node.js installed, you can create a new Slidev project with the Neversink theme by running the following command:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm
|
|
6
|
+
npm init slidev@latest
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Then
|
|
9
|
+
Then answer the sequence of questions. When it asks for the theme select `neversink`.
|
|
10
|
+
|
|
11
|
+
Alternatively if you already have installed Slidev globally you can just create a slidev markdown file (e.g., `slides.md`) and add the theme to the frontmatter of your first slide:
|
|
10
12
|
|
|
11
13
|
```md
|
|
12
14
|
---
|
|
@@ -23,6 +25,7 @@ If you are new to Slidev highly recommend you check out the [Slidev documentatio
|
|
|
23
25
|
- [Markdown features](markdown.md) - special addons to the Slidev markdown syntax
|
|
24
26
|
- [Color schemes](colors.md) - the color schemes available in Neversink
|
|
25
27
|
- [Branding](branding.md) - how to customize the theme to your brand/logos
|
|
28
|
+
- [Styling](styling.md) - the custom CSS classes available in Neversink
|
|
26
29
|
- [Custom layouts](layouts.md) - the custom slide layouts available in Neversink
|
|
27
30
|
- [Components](components.md) - the custom components such as sticky notes and admonitions
|
|
28
31
|
- [Customizing](customizing.md) - how to customize the theme with your own CSS/fonts, etc...
|
package/docs/markdown.md
CHANGED
|
@@ -50,27 +50,3 @@ This is my ==highlighted text==.
|
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Using the `==` syntax. Like ==this==.
|
|
53
|
-
|
|
54
|
-
## Icon link
|
|
55
|
-
|
|
56
|
-
Drops the underline styling from icons.
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
<a href="https://todd.gureckislab.org" class="iconlink"><mdi-open-in-new /></a>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
````
|
|
63
|
-
|
|
64
|
-
## V-click faders
|
|
65
|
-
|
|
66
|
-
If you want to fade out a bullet as you step through, add the `class='fader'`
|
|
67
|
-
|
|
68
|
-
```md
|
|
69
|
-
<v-clicks at="+0" class="fader">
|
|
70
|
-
|
|
71
|
-
- This one appears immediately on slide load
|
|
72
|
-
- This is a second click
|
|
73
|
-
- This is a third click
|
|
74
|
-
|
|
75
|
-
</v-clicks>
|
|
76
|
-
````
|
package/docs/styling.md
CHANGED
|
@@ -37,6 +37,20 @@ 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
|
|
41
|
+
|
|
42
|
+
If you want to fade out a bullet as you step through, add the `class='ns-c-fader'`
|
|
43
|
+
|
|
44
|
+
```md
|
|
45
|
+
<v-clicks at="+0" class="ns-c-fader">
|
|
46
|
+
|
|
47
|
+
- This one appears immediately on slide load
|
|
48
|
+
- This is a second click
|
|
49
|
+
- This is a third click
|
|
50
|
+
|
|
51
|
+
</v-clicks>
|
|
52
|
+
```
|
|
53
|
+
|
|
40
54
|
## References
|
|
41
55
|
|
|
42
56
|
Including references often you want to include them but have them fade a bit relative to the main content of the tslide for this `ns-c-cite` is useful as it
|
|
@@ -86,9 +100,24 @@ If you write an icon in a link it includes the underline styleing. To remove tha
|
|
|
86
100
|
}
|
|
87
101
|
```
|
|
88
102
|
|
|
89
|
-
##
|
|
103
|
+
## Grids
|
|
90
104
|
|
|
105
|
+
This is not a specific `ns-c-` class but a general unocss/tailwind utility for making grids.
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<div class="grid grid-cols-2 gap-4 w-full">
|
|
109
|
+
<div class="grid-item grid-span-1 center">Row 1, Col 1</div>
|
|
110
|
+
<div class="grid-item grid-span-1 center">Row 1, Col 2</div>
|
|
111
|
+
<div class="grid-item grid-span-1 center">Row 2, Col 1</div>
|
|
112
|
+
<div class="grid-item grid-span-1 center">Row 2, Col 2</div>
|
|
113
|
+
</div>
|
|
91
114
|
```
|
|
115
|
+
|
|
116
|
+
### For putting images in grids
|
|
117
|
+
|
|
118
|
+
If you want to put images in a grid and have them fill the space you can use the `ns-c-imgtile` class.
|
|
119
|
+
|
|
120
|
+
```css
|
|
92
121
|
.ns-c-imgtile img {
|
|
93
122
|
width: 100%;
|
|
94
123
|
height: fit-content;
|
|
@@ -96,7 +125,44 @@ If you write an icon in a link it includes the underline styleing. To remove tha
|
|
|
96
125
|
}
|
|
97
126
|
```
|
|
98
127
|
|
|
99
|
-
|
|
128
|
+
then you use it like this:
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<div class="grid grid-cols-2 gap-4 w-full">
|
|
132
|
+
<div class="grid-item grid-span-1 center"><img src="/images/img1.jpg" /></div>
|
|
133
|
+
<div class="grid-item grid-span-1 center"><img src="/images/img2.jpg" /></div>
|
|
134
|
+
<div class="grid-item grid-span-1 center"><img src="/images/img3.jpg" /></div>
|
|
135
|
+
<div class="grid-item grid-span-1 center"><img src="/images/img4.jpg" /></div>
|
|
136
|
+
</div>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Columns
|
|
140
|
+
|
|
141
|
+
To make side by side columns use a flex box with `flex-wrap` and `w-1/X` where X is the proportion you want to give to each column.
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
<div class="flex flex-wrap ">
|
|
145
|
+
<div class="w-1/5">Hit wall</div>
|
|
146
|
+
<div class="w-1/5">Hit wall and goes on floor</div>
|
|
147
|
+
<div class="w-1/5">Hit wall and goes in bucket</div>
|
|
148
|
+
<div class="w-1/5">Misses wall</div>
|
|
149
|
+
<div class="w-1/5">Hit bucket and then hits walls</div>
|
|
150
|
+
</div>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
To add a border
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<div class="flex flex-wrap ">
|
|
157
|
+
<div class="w-1/5 border-1 border-r-0">Hit wall</div>
|
|
158
|
+
<div class="w-1/5 border-1 border-r-0">Hit wall and goes on floor</div>
|
|
159
|
+
<div class="w-1/5 border-1 border-r-0">Hit wall and goes in bucket</div>
|
|
160
|
+
<div class="w-1/5 border-1 border-r-0">Misses wall</div>
|
|
161
|
+
<div class="w-1/5 border-1">Hit bucket and then hits walls</div>
|
|
162
|
+
</div>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Borders
|
|
100
166
|
|
|
101
167
|
I forgot why i made this utility
|
|
102
168
|
|
|
@@ -105,7 +105,7 @@ const flexclass = computed(() => {
|
|
|
105
105
|
</div>
|
|
106
106
|
</template>
|
|
107
107
|
|
|
108
|
-
<style
|
|
108
|
+
<style>
|
|
109
109
|
.slidev-layout.two-cols-header,
|
|
110
110
|
.slidev-layout.two-cols-footer {
|
|
111
111
|
display: grid;
|
|
@@ -129,6 +129,18 @@ const flexclass = computed(() => {
|
|
|
129
129
|
margin-bottom: 1rem;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
.slidev-layout.two-cols-header .title h1 + p,
|
|
133
|
+
.slidev-layout.two-cols-footer .title h1 + p {
|
|
134
|
+
margin-top: 0.2em;
|
|
135
|
+
margin-bottom: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.slidev-layout.two-cols-header .title p,
|
|
139
|
+
.slidev-layout.two-cols-footer .title p {
|
|
140
|
+
margin-top: 0.2em;
|
|
141
|
+
margin-bottom: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
132
144
|
.slidev-layout.two-cols .left-col,
|
|
133
145
|
.slidev-layout.two-cols-header .left-col,
|
|
134
146
|
.slidev-layout.two-cols-footer .left-col {
|
package/package.json
CHANGED
package/styles/base.css
CHANGED
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
line-height: 1.5em;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
.slidev-layout ul {
|
|
39
|
+
margin-top: 0.7em;
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
/* change the bold and strong fonts */
|
|
39
43
|
.slidev-layout strong,
|
|
40
44
|
.slidev-layout b {
|
|
@@ -188,11 +192,6 @@ img {
|
|
|
188
192
|
pointer-events: none;
|
|
189
193
|
}
|
|
190
194
|
|
|
191
|
-
.ns-c-fader .slidev-vclick-prior {
|
|
192
|
-
opacity: 0.3;
|
|
193
|
-
pointer-events: none;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
195
|
html.dark {
|
|
197
196
|
/* dark mode css here */
|
|
198
197
|
.lectureno {
|
package/styles/neversink-c.css
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
.ns-c-tight li {
|
|
50
50
|
line-height: normal;
|
|
51
51
|
margin-bottom: 0.4em;
|
|
52
|
+
margin-top: 0.4em;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
.ns-c-verytight li {
|
|
@@ -101,3 +102,9 @@
|
|
|
101
102
|
border-style: none !important;
|
|
102
103
|
border-bottom: none !important;
|
|
103
104
|
}
|
|
105
|
+
|
|
106
|
+
/* fader for past bullets */
|
|
107
|
+
.ns-c-fader .slidev-vclick-prior {
|
|
108
|
+
opacity: 0.3;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
package/uno.config.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { defineConfig } from 'unocss'
|
|
|
3
3
|
import presetUno from '@unocss/preset-uno'
|
|
4
4
|
import { colors } from '@unocss/preset-mini'
|
|
5
5
|
import transformerDirectives from '@unocss/transformer-directives'
|
|
6
|
+
import { version } from './package.json'
|
|
6
7
|
|
|
7
8
|
// Tailwind CSS color palette
|
|
8
9
|
const colornames = [
|
|
@@ -169,7 +170,7 @@ const generateRows = (max) => {
|
|
|
169
170
|
|
|
170
171
|
const schemes = generate_color_schemes(colors)
|
|
171
172
|
|
|
172
|
-
console.log(
|
|
173
|
+
console.log(`Loading Neversink ${version} theme uno.config.ts...`)
|
|
173
174
|
export default defineConfig({
|
|
174
175
|
// ...UnoCSS options
|
|
175
176
|
presets: [presetUno()],
|
package/vite.config.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { defineConfig } from 'vite'
|
|
|
2
2
|
//import MarkdownItMagicLink from 'markdown-it-magic-link'
|
|
3
3
|
import { sub } from '@mdit/plugin-sub'
|
|
4
4
|
import Mark from 'markdown-it-mark'
|
|
5
|
+
import { version } from './package.json'
|
|
5
6
|
|
|
6
|
-
console.log(
|
|
7
|
+
console.log(`Loading Neversink ${version} theme vite.config.ts...`)
|
|
7
8
|
export default defineConfig({
|
|
8
9
|
slidev: {
|
|
9
10
|
markdown: {
|