From 5dcd0abe168d68c0576d8f421ca1197dfe77f41d Mon Sep 17 00:00:00 2001 From: ParampreetR Date: Mon, 28 Feb 2022 11:00:49 +0530 Subject: [PATCH 1/3] Upgraded `mkdocs-material` from `5.2.3` to `8.2.3` --- docs/en/mkdocs.yml | 65 +++++++++++++++++++++++----------------------- requirements.txt | 2 +- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index b3edf1c5..3bd1e5d4 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -1,59 +1,60 @@ # Project information -site_name: 'Sailfish Documentation' +site_name: "Sailfish Documentation" # site_description: 'Sailfish Documentation' -site_author: 'Ryohei Machida' +site_author: "Ryohei Machida" # site_url: 'https://***.com' # Copyright -copyright: '© 2020 Ryohei Machida' +copyright: "© 2020 Ryohei Machida" # Repository -repo_name: 'rust-sailfish/sailfish' -repo_url: 'https://github.com/rust-sailfish/sailfish' +repo_name: "rust-sailfish/sailfish" +repo_url: "https://github.com/rust-sailfish/sailfish" # Configuration theme: - name: 'material' - language: 'en' - logo: 'images/logo.svg' + name: "material" + language: "en" + logo: "images/logo.svg" palette: - scheme: 'default' - primary: 'deep purple' - accent: 'deep purple' - favicon: 'images/favicon.ico' + scheme: "default" + primary: "deep purple" + accent: "deep purple" + favicon: "images/favicon.ico" font: - text: 'Ubuntu' - code: 'Ubuntu Mono' + text: "Ubuntu" + code: "Ubuntu Mono" features: - - 'navigation.expand' + - "navigation.expand" # Extensions markdown_extensions: - - 'admonition' - - 'footnotes' - - 'pymdownx.highlight' - - 'pymdownx.tabbed' - - 'pymdownx.superfences': + - "admonition" + - "footnotes" + - "pymdownx.highlight" + - "pymdownx.tabbed": + alternate_style: true + - "pymdownx.superfences": custom_fences: - name: mermaid class: mermaid extra_css: - - 'assets/css/custom.css' + - "assets/css/custom.css" extra: social: - - icon: 'fontawesome/brands/github-alt' - link: 'https://github.com/rust-sailfish' + - icon: "fontawesome/brands/github-alt" + link: "https://github.com/rust-sailfish" # Page tree nav: - - 'Welcome': 'index.md' - - 'Installation': 'installation.md' - - 'Getting Started': 'getting-started.md' - - 'Configuration': 'options.md' - - 'Syntax': - - 'Overview': 'syntax/overview.md' - - 'Tags': 'syntax/tags.md' - - 'Includes': 'syntax/includes.md' - - 'Filters': 'syntax/filters.md' + - "Welcome": "index.md" + - "Installation": "installation.md" + - "Getting Started": "getting-started.md" + - "Configuration": "options.md" + - "Syntax": + - "Overview": "syntax/overview.md" + - "Tags": "syntax/tags.md" + - "Includes": "syntax/includes.md" + - "Filters": "syntax/filters.md" diff --git a/requirements.txt b/requirements.txt index f6798a40..5215838b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -mkdocs-material==5.2.3 +mkdocs-material==8.2.3 mkdocs==1.2.3 From 2608eb2397c03183d7098c8f87b16c8dfe6b5a11 Mon Sep 17 00:00:00 2001 From: ParampreetR Date: Mon, 28 Feb 2022 11:14:08 +0530 Subject: [PATCH 2/3] docs: Added dark theme --- docs/en/docs/assets/css/custom.css | 25 ++++++++++++++++++++----- docs/en/mkdocs.yml | 18 ++++++++++++++---- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/docs/en/docs/assets/css/custom.css b/docs/en/docs/assets/css/custom.css index f74aeeb0..0278e4b0 100644 --- a/docs/en/docs/assets/css/custom.css +++ b/docs/en/docs/assets/css/custom.css @@ -1,5 +1,5 @@ .md-typeset__table table { - font-size: .75rem !important; + font-size: 0.75rem !important; } .md-typeset__table table tr td:first-child { @@ -8,16 +8,16 @@ .md-typeset code { background-color: rgb(240, 240, 240); - font-size: .95em; + font-size: 0.95em; } .md-typeset pre > code { background-color: rgb(245, 245, 245); - font-size: .90em; + font-size: 0.9em; } .md-typeset .admonition { - font-size: .70rem; + font-size: 0.7rem; } body { @@ -29,7 +29,7 @@ body { border-bottom-color: rgb(234, 236, 239); border-bottom-style: solid; border-bottom-width: 1px; - padding-bottom: .3rem; + padding-bottom: 0.3rem; } .md-content a:hover { @@ -39,3 +39,18 @@ body { .highlight code .cp { color: #a83; } + +[data-md-color-scheme="dark"] { + --md-primary-fg-color: #321860; + --md-default-bg-color: #170a1c; + --md-default-fg-color: #dabaff; + --md-typeset-color: #ffffff; + --md-default-fg-color--light: #b0a8b9; + --md-typeset-a-color: #472a63; + --md-code-bg-color: #f5f5f5; + --md-code-fg-color: #170a1c; + --md-admonition-fg-color: #ffffff; + --md-default-fg-color--lighter: #acb7c0; + --md-default-fg-color--lightest: #d2d5db; + --md-code-hl-variable-color: #815abb; +} diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index 3bd1e5d4..845be1c9 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -11,15 +11,25 @@ copyright: "© 2020 Ryohei Machida" repo_name: "rust-sailfish/sailfish" repo_url: "https://github.com/rust-sailfish/sailfish" -# Configuration theme: name: "material" language: "en" logo: "images/logo.svg" palette: - scheme: "default" - primary: "deep purple" - accent: "deep purple" + - media: "(prefers-color-scheme: dark)" + scheme: "dark" + primary: "deep purple" + accent: "deep purple" + toggle: + icon: "material/lightbulb-outline" + name: "Light Mode" + - media: "(prefers-color-scheme: light)" + scheme: "default" + primary: "deep purple" + accent: "deep purple" + toggle: + icon: "material/lightbulb" + name: "Dark Mode" favicon: "images/favicon.ico" font: text: "Ubuntu" From f8d67125832a8f4147c27289ef9beb6b40f73631 Mon Sep 17 00:00:00 2001 From: ParampreetR Date: Mon, 7 Mar 2022 16:14:52 +0530 Subject: [PATCH 3/3] Added contrast to links --- docs/en/docs/assets/css/custom.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en/docs/assets/css/custom.css b/docs/en/docs/assets/css/custom.css index 0278e4b0..37e63aab 100644 --- a/docs/en/docs/assets/css/custom.css +++ b/docs/en/docs/assets/css/custom.css @@ -40,13 +40,17 @@ body { color: #a83; } +a code { + color: #472a63 !important; +} + [data-md-color-scheme="dark"] { --md-primary-fg-color: #321860; --md-default-bg-color: #170a1c; --md-default-fg-color: #dabaff; --md-typeset-color: #ffffff; --md-default-fg-color--light: #b0a8b9; - --md-typeset-a-color: #472a63; + --md-typeset-a-color: #b596d2; --md-code-bg-color: #f5f5f5; --md-code-fg-color: #170a1c; --md-admonition-fg-color: #ffffff;