@sit-onyx/vitepress-theme 0.1.0-alpha.1 → 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 CHANGED
@@ -1,10 +1,12 @@
1
- <p>
2
- <a href="https://gruppe.schwarz">
3
- <div align="center">
4
- <img src="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/schwarz-group.svg" width="400px" />
5
- </div>
6
- </a>
7
- </p>
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,13 +1,14 @@
1
1
  {
2
2
  "name": "@sit-onyx/vitepress-theme",
3
3
  "description": "VitePress theme that uses the onyx design system",
4
- "version": "0.1.0-alpha.1",
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
13
  ".": "./src/index.ts",
13
14
  "./mixins.scss": "./src/mixins.scss"
@@ -24,7 +25,7 @@
24
25
  "peerDependencies": {
25
26
  "sass": ">= 1",
26
27
  "vitepress": ">= 1.0.0-rc.0",
27
- "sit-onyx": "^0.1.0-alpha.2"
28
+ "sit-onyx": "^1.0.0-alpha.11"
28
29
  },
29
30
  "scripts": {
30
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-brand);
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
- @include mixins.home-page-gradients(
37
- var(--onyx-color-base-brand-500),
38
- var(--onyx-color-base-info-500)
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
@@ -28,30 +28,6 @@
28
28
  @include hex-to-soft-color(--vp-c-#{$name}-soft, var(#{$onyx-color-base}-#{400 + $offset}));
29
29
  }
30
30
 
31
- /**
32
- * Adds CSS for using a colored gradient for the name and logo background on the home page
33
- */
34
- @mixin home-page-gradients($primary, $secondary) {
35
- // https://vitepress.dev/reference/default-theme-home-page#customizing-the-name-color
36
- --vp-home-hero-name-color: #{$primary};
37
-
38
- // Home page logo
39
- --vp-home-hero-image-background-image: linear-gradient(
40
- -45deg,
41
- #{$primary} 50%,
42
- #{$secondary} 50%
43
- );
44
- --vp-home-hero-image-filter: blur(44px);
45
-
46
- @include breakpoint(min, l) {
47
- --vp-home-hero-image-filter: blur(68px);
48
- }
49
-
50
- @include breakpoint(min, s) {
51
- --vp-home-hero-image-filter: blur(56px);
52
- }
53
- }
54
-
55
31
  /**
56
32
  * Applies CSS only to the given VitePress breakpoint.
57
33
  * @param {string} $min-max - Whether the breakpoint should be considered as min or max width.