@sit-onyx/vitepress-theme 0.0.1-alpha.0 → 1.0.0-alpha.10
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 +10 -8
- package/package.json +5 -3
- package/src/index.scss +15 -9
- package/src/mixins.scss +18 -18
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
</
|
|
7
|
-
</
|
|
1
|
+
<div align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo-light.svg">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo-dark.svg">
|
|
5
|
+
<img alt="onyx logo" src="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo-dark.svg" width="160px">
|
|
6
|
+
</picture>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<br>
|
|
8
10
|
|
|
9
11
|
# onyx VitePress theme
|
|
10
12
|
|
|
@@ -12,4 +14,4 @@ VitePress theme that uses the onyx design system created by [Schwarz IT](https:/
|
|
|
12
14
|
|
|
13
15
|
## Documentation
|
|
14
16
|
|
|
15
|
-
You can find our documentation [here](https://onyx.schwarz/packages/vitepress-theme.html).
|
|
17
|
+
You can find our documentation [here](https://onyx.schwarz/development/packages/vitepress-theme.html).
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/vitepress-theme",
|
|
3
3
|
"description": "VitePress theme that uses the onyx design system",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "1.0.0-alpha.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Schwarz IT KG",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"files": [
|
|
9
9
|
"src"
|
|
10
10
|
],
|
|
11
|
+
"types": "./src/index.ts",
|
|
11
12
|
"exports": {
|
|
12
|
-
".": "./src/index.ts"
|
|
13
|
+
".": "./src/index.ts",
|
|
14
|
+
"./mixins.scss": "./src/mixins.scss"
|
|
13
15
|
},
|
|
14
16
|
"homepage": "https://onyx.schwarz/packages/vitepress-theme.html",
|
|
15
17
|
"repository": {
|
|
@@ -23,7 +25,7 @@
|
|
|
23
25
|
"peerDependencies": {
|
|
24
26
|
"sass": ">= 1",
|
|
25
27
|
"vitepress": ">= 1.0.0-rc.0",
|
|
26
|
-
"sit-onyx": "^
|
|
28
|
+
"sit-onyx": "^1.0.0-alpha.11"
|
|
27
29
|
},
|
|
28
30
|
"scripts": {
|
|
29
31
|
"build": "tsc --noEmit"
|
package/src/index.scss
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// see: https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css#L178
|
|
6
6
|
:root {
|
|
7
7
|
// color palette
|
|
8
|
-
@include mixins.define-vitepress-color(brand, --onyx-color-base-
|
|
8
|
+
@include mixins.define-vitepress-color(brand, --onyx-color-base-primary);
|
|
9
9
|
@include mixins.define-vitepress-color(tip, --onyx-color-base-info);
|
|
10
10
|
@include mixins.define-vitepress-color(warning, --onyx-color-base-warning);
|
|
11
11
|
@include mixins.define-vitepress-color(danger, --onyx-color-base-danger);
|
|
@@ -26,17 +26,23 @@
|
|
|
26
26
|
--vp-c-gutter: var(--onyx-color-base-neutral-200);
|
|
27
27
|
|
|
28
28
|
// typography
|
|
29
|
-
--vp-c-text-1: var(--onyx-color-text-neutral-intense); // regular text
|
|
30
|
-
--vp-c-text-2: var(--onyx-color-text-neutral-medium); // muted text (e.g. inactive menu)
|
|
31
|
-
--vp-c-text-3: var(--onyx-color-text-neutral-soft); // subtle text (e.g. placeholders)
|
|
29
|
+
--vp-c-text-1: var(--onyx-color-text-icons-neutral-intense); // regular text
|
|
30
|
+
--vp-c-text-2: var(--onyx-color-text-icons-neutral-medium); // muted text (e.g. inactive menu)
|
|
31
|
+
--vp-c-text-3: var(--onyx-color-text-icons-neutral-soft); // subtle text (e.g. placeholders)
|
|
32
32
|
--vp-font-family-base: var(--onyx-font-family);
|
|
33
33
|
--vp-font-family-mono: var(--onyx-font-family-mono);
|
|
34
34
|
--vp-code-color: var(--vp-c-brand-2);
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
);
|
|
36
|
+
// add colored gradient background to the logo on the home page
|
|
37
|
+
// the gradient colors are exceptions so we don't have CSS variables for them
|
|
38
|
+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #008ca0 50%, #00dce6 50%);
|
|
39
|
+
--vp-home-hero-image-filter: blur(44px);
|
|
40
|
+
@include mixins.breakpoint(min, l) {
|
|
41
|
+
--vp-home-hero-image-filter: blur(68px);
|
|
42
|
+
}
|
|
43
|
+
@include mixins.breakpoint(min, s) {
|
|
44
|
+
--vp-home-hero-image-filter: blur(56px);
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
.dark {
|
|
@@ -56,5 +62,5 @@
|
|
|
56
62
|
.custom-block.tip code {
|
|
57
63
|
// use a higher contrast color for links/code inside tip blocks
|
|
58
64
|
// because the default contrast is too low
|
|
59
|
-
color: var(--onyx-color-text-info-bold);
|
|
65
|
+
color: var(--onyx-color-text-icons-info-bold);
|
|
60
66
|
}
|
package/src/mixins.scss
CHANGED
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
@
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
* Applies CSS only to the given VitePress breakpoint.
|
|
33
|
+
* @param {string} $min-max - Whether the breakpoint should be considered as min or max width.
|
|
34
|
+
* @param {string} $name - name of the VitePress breakpoint. One of: xs, s, m, l, xl or xxl
|
|
35
|
+
* @param {number} $offset - optional offset to add to the min/max width. Useful if both min and max are used for the same breakpoint
|
|
36
|
+
*
|
|
37
|
+
* @example breakpoint(min, m)
|
|
38
|
+
* @example breakpoint(max, m)
|
|
39
|
+
*/
|
|
40
|
+
@mixin breakpoint($min-max, $name, $offset: 0) {
|
|
41
|
+
$breakpoints: (
|
|
42
|
+
xs: 375px,
|
|
43
|
+
s: 640px,
|
|
44
|
+
m: 768px,
|
|
45
|
+
l: 960px,
|
|
46
|
+
xl: 1280px,
|
|
47
|
+
xxl: 1440px,
|
|
43
48
|
);
|
|
44
|
-
--vp-home-hero-image-filter: blur(44px);
|
|
45
|
-
|
|
46
|
-
@media (min-width: 960px) {
|
|
47
|
-
--vp-home-hero-image-filter: blur(68px);
|
|
48
|
-
}
|
|
49
49
|
|
|
50
|
-
@media (min-width:
|
|
51
|
-
|
|
50
|
+
@media (#{$min-max}-width: #{map-get($breakpoints, $name) + $offset}) {
|
|
51
|
+
@content;
|
|
52
52
|
}
|
|
53
53
|
}
|