slidev-theme-neversink 0.3.4 → 0.3.6

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/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 colorbinding">This is a red div</div>
105
+ <div class="neversink-red-scheme ns-c-bind-scheme">This is a red div</div>
96
106
  ```
97
107
 
98
- and then define the color binding class
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
- .colorbinding {
102
- background-color: var(--neversink-bg-color);
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
 
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 can be any of the [colors](/colors) in the project.
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
 
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidev-theme-neversink",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "author": "gureckis",
5
5
  "type": "module",
6
6
  "keywords": [
package/styles/base.css CHANGED
@@ -26,7 +26,7 @@
26
26
  }
27
27
 
28
28
  .slidev-layout p {
29
- line-height: relaxed;
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;
@@ -153,3 +153,10 @@
153
153
  opacity: 0.3;
154
154
  pointer-events: none;
155
155
  }
156
+
157
+ .ns-c-bind-scheme,
158
+ .ns-c-mixin {
159
+ background-color: var(--neversink-bg-color);
160
+ color: var(--neversink-text-color);
161
+ border-color: var(--neversink-border-color);
162
+ }
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)