Skip to content

Commit

Permalink
doc(book): tweak colors and page details
Browse files Browse the repository at this point in the history
Adjust the branding colors for better visual contrast and flip a few
config values of Vitepress.
  • Loading branch information
dnaka91 committed Jan 2, 2024
1 parent 1085e24 commit c43d077
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html,js,json,yaml,yml}]
[*.{css,html,json,mts,svg,ts,yaml,yml}]
indent_size = 2

[Justfile]
Expand Down
2 changes: 1 addition & 1 deletion book/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[*.{md,svg}]
[*.md]
indent_size = 2

[*.kt]
Expand Down
16 changes: 9 additions & 7 deletions book/.vitepress/config.mjs → book/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ import maboGrammar from "../../vscode-extension/syntaxes/mabo.tmLanguage.json";
export default defineConfig({
title: "mabo",
description: "Strongly Typed Encoding Format",
appearance: "dark",
lastUpdated: true,
srcDir: "src",
base: "/mabo",
base: "/mabo/",
markdown: {
theme: {
dark: "one-dark-pro",
light: "min-light",
},
languages: [
{
...maboGrammar,
// biome-ignore lint: the grammar is wrongly reported as incompatible
...(maboGrammar as any),
name: "mabo",
},
],
lineNumbers: true,
image: {
lazyLoading: true,
},
},
vite: {
resolve: {
Expand All @@ -31,6 +37,7 @@ export default defineConfig({
logo: "/logo.svg",
editLink: {
pattern: "https://github.com/dnaka91/mabo/edit/main/book/src/:path",
text: "Edit this page on GitHub",
},
nav: [
{ text: "Guide", link: "/guide/installation", activeMatch: "/guide/" },
Expand Down Expand Up @@ -114,11 +121,6 @@ export default defineConfig({
copyright: "Copyright © 2023-present Dominik Nakamura",
},

docFooter: {
prev: false,
next: false,
},

search: {
provider: "local",
},
Expand Down
4 changes: 4 additions & 0 deletions book/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import DefaultTheme from "vitepress/theme";
import "./style.css";

export default DefaultTheme;
11 changes: 11 additions & 0 deletions book/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:root {
--vp-c-brand-1: hwb(25 0% 15%);
--vp-c-brand-2: hwb(35 0% 15%);
--vp-c-brand-3: hwb(15 0% 15%);
}

.dark {
--vp-c-brand-1: hwb(25 20% 0%);
--vp-c-brand-2: hwb(35 20% 0%);
--vp-c-brand-3: hwb(15 20% 0%);
}
2 changes: 1 addition & 1 deletion book/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview",
"lint": "biome check --apply .vitepress/config.mjs src/**/*.md"
"lint": "biome check --apply .vitepress/config.mts src/**/*.md"
},
"devDependencies": {
"@biomejs/biome": "^1.4.1",
Expand Down
9 changes: 2 additions & 7 deletions book/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,10 @@ features:
---
<style>
:root {
--vp-c-brand-1: #E74D11;
--vp-c-brand-2: #E87917;
--vp-c-brand-3: #E8A41C;
--vp-c-brand-soft: #E9D022;

--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand-3) 30%, var(--vp-c-brand-1));
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, hwb(45 10% 10%) 30%, hwb(15 10% 10%));

--vp-home-hero-image-background-image: linear-gradient(-45deg, var(--vp-c-brand-3) 30%, var(--vp-c-brand-1) 70%);
--vp-home-hero-image-background-image: linear-gradient(-45deg, hwb(45 10% 10%) 30%, hwb(15 10% 10%) 70%);
--vp-home-hero-image-filter: blur(44px);
}

Expand Down

0 comments on commit c43d077

Please sign in to comment.