From d49ba6e025f72958ad8c8f3e9aa3c3743348d02a Mon Sep 17 00:00:00 2001 From: Gala Date: Wed, 9 Aug 2023 17:56:36 +0200 Subject: [PATCH 1/2] theme change --- documentation/dev-portal/book.toml | 6 ++-- documentation/dev-portal/custom.css | 38 +++++++++++++++++++++++ documentation/dev-portal/last-changed.css | 6 ---- 3 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 documentation/dev-portal/custom.css delete mode 100644 documentation/dev-portal/last-changed.css diff --git a/documentation/dev-portal/book.toml b/documentation/dev-portal/book.toml index 3b34e41d86..d9853f839c 100644 --- a/documentation/dev-portal/book.toml +++ b/documentation/dev-portal/book.toml @@ -17,7 +17,7 @@ src = "src" # - run `mdbook build`: this will rebuild the `./theme` directory # - change value of `turn-off` back to `true` [preprocessor.theme] -pagetoc = true +pagetoc = true # some variables related (defined in theme/css/variables.css) # `content-max-width` + `pagetoc-width` = 95% seems the best pagetoc-width = "13%" @@ -37,7 +37,7 @@ nav-chapters-min-width = "auto" chapter-line-height = "2em" section-line-height = "1.5em" -# # if true, never read and touch the files in theme dir +# if true, never read and touch the files in theme dir turn-off = false [preprocessor.admonish] @@ -77,7 +77,7 @@ curly-quotes = true # mathjax-support = false # useful if we want to pull equations in ? copy-fonts = true no-section-label = false -additional-css = ["theme/pagetoc.css", "././mdbook-admonish.css", "last-changed.css"] +additional-css = ["theme/pagetoc.css", "././mdbook-admonish.css", "custom.css"] additional-js = ["theme/pagetoc.js"] git-repository-url = "https://github.com/nymtech/nym" git-repository-icon = "fa-github" diff --git a/documentation/dev-portal/custom.css b/documentation/dev-portal/custom.css new file mode 100644 index 0000000000..0174c7796c --- /dev/null +++ b/documentation/dev-portal/custom.css @@ -0,0 +1,38 @@ +:root { + --mono-font: "Open Sans", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", + monospace, monospace; +} +.coal { + --bg: #121726; + --fg: #f2f2f2; + + --sidebar-bg: #121726; + --sidebar-fg: #f2f2f2; + --sidebar-active: #fb6e4e; + + --icons: #f2f2f2; + --icons-hover: #fb6e4e; + + --links: #fb6e4e; +} + +.light { + --bg: #f4f6f8; + --fg: #121726; + + --sidebar-bg: #f4f6f8; + --sidebar-fg: #121726; + --sidebar-active: #fb6e4e; + + --icons: #121726; + --icons-hover: #fb6e4e; + + --links: #fb6e4e; +} + +footer { + font-size: 0.8em; + text-align: center; + border-top: 1px solid black; + padding: 5px 0; +} \ No newline at end of file diff --git a/documentation/dev-portal/last-changed.css b/documentation/dev-portal/last-changed.css deleted file mode 100644 index 0c4228de32..0000000000 --- a/documentation/dev-portal/last-changed.css +++ /dev/null @@ -1,6 +0,0 @@ -footer { - font-size: 0.8em; - text-align: center; - border-top: 1px solid black; - padding: 5px 0; - } \ No newline at end of file From ae79dc4ec68d4bde9a6e14b38493d004f0b2e1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 10 Aug 2023 14:40:15 +0100 Subject: [PATCH 2/2] using stricter version requirements for mdbook and mdbook-variables --- .github/workflows/ci-dev.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 82068fce76..16a4dda0b4 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -22,10 +22,13 @@ jobs: with: toolchain: stable - name: Install mdbook - run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook) + # to make sure we don't run into toml dependency issue, make sure to pull fixed mdbook that depends on old 0.5 + # and OLD mdbook-variables that uses the same dependency + # (mdbook-variables 0.2.3 updated to 0.7 which was used by mdbook incorrectly and extremely briefly) + run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4.33" mdbook) - name: Install mdbook plugins run: | - cargo install --vers "^0.2.0" mdbook-variables && cargo install \ + cargo install --vers "=0.2.2" mdbook-variables && cargo install \ --vers "^1.8.0" mdbook-admonish && cargo install --vers \ "^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" mdbook-theme \ && cargo install --vers "^0.7.7" mdbook-linkcheck