From 7e2c39b7e5715a06019e4c6259054419d0605bff Mon Sep 17 00:00:00 2001 From: yunfachi Date: Sun, 6 Oct 2024 13:20:17 +0300 Subject: [PATCH] docs: add icon and color scheme --- docs/.vitepress/config.mts | 7 +++++++ docs/.vitepress/theme/style.css | 36 ++++++++++++++++++++++++--------- docs/src/index.md | 3 +++ docs/src/ru/index.md | 3 +++ 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 22e86f1..86ec02e 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -12,7 +12,14 @@ export default defineConfig({ sitemap: { hostname: 'https://yunfachi.github.io/denix/' }, + head: [ + ["link", { rel: "icon", href: "https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_dark.svg" }], + ], themeConfig: { + logo: { + light: "https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_light.svg", + dark: "https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_dark.svg", + }, // https://vitepress.dev/reference/default-theme-config socialLinks: [ { icon: "github", link: "https://github.com/yunfachi/denix" } diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index d63aee8..3e1248c 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -49,11 +49,6 @@ --vp-c-default-3: var(--vp-c-gray-3); --vp-c-default-soft: var(--vp-c-gray-soft); - --vp-c-brand-1: var(--vp-c-indigo-1); - --vp-c-brand-2: var(--vp-c-indigo-2); - --vp-c-brand-3: var(--vp-c-indigo-3); - --vp-c-brand-soft: var(--vp-c-indigo-soft); - --vp-c-tip-1: var(--vp-c-brand-1); --vp-c-tip-2: var(--vp-c-brand-2); --vp-c-tip-3: var(--vp-c-brand-3); @@ -94,16 +89,37 @@ --vp-home-hero-name-color: transparent; --vp-home-hero-name-background: -webkit-linear-gradient( 120deg, - #bd34fe 30%, - #41d1ff + #95b695 30%, + #6f866f ); + --vp-home-hero-image-filter: blur(44px); +} + +.dark { --vp-home-hero-image-background-image: linear-gradient( -45deg, - #bd34fe 50%, - #47caff 50% + #6f866f 50%, + #6f866f 50% ); - --vp-home-hero-image-filter: blur(44px); + + --vp-c-brand-1: #95b695; + --vp-c-brand-2: #869e86; + --vp-c-brand-3: #6f866f; + --vp-c-brand-soft: var(--vp-c-green-soft); +} + +html:not(.dark) { + --vp-home-hero-image-background-image: linear-gradient( + -45deg, + #a7caa7 50%, + #a7caa7 50% + ); + + --vp-c-brand-1: #6f866f; + --vp-c-brand-2: #869e86; + --vp-c-brand-3: #95b695; + --vp-c-brand-soft: var(--vp-c-green-soft); } @media (min-width: 640px) { diff --git a/docs/src/index.md b/docs/src/index.md index 7f47156..54dd0af 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -6,6 +6,9 @@ hero: name: "Denix Documentation" text: "Nix Library for Configurations" tagline: "Denix provides tools for creating scalable NixOS and Home Manager configurations with modules, hosts, and rices" + image: + light: https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_light.svg + dark: https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_dark.svg actions: - theme: brand text: Introduction diff --git a/docs/src/ru/index.md b/docs/src/ru/index.md index dae161e..1ddc93d 100644 --- a/docs/src/ru/index.md +++ b/docs/src/ru/index.md @@ -6,6 +6,9 @@ hero: name: "Denix Документация" text: "Библиотека Nix для конфигураций" tagline: Denix предоставляет инструменты для создания масштабируемых конфигураций NixOS и Home Manager с модулями, хостами и райсами + image: + light: https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_light.svg + dark: https://raw.githubusercontent.com/yunfachi/denix/master/.github/assets/logo_dark.svg actions: - theme: brand text: Введение