From 50b36f28bafe8f807d4d16ff095f370833093a18 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Wed, 3 Jul 2024 17:44:37 +0200 Subject: [PATCH] theme changes to operators --- documentation/operators/book.toml | 69 ++++++++++--------- .../{nym_themes => themes}/css/chrome.css | 0 .../{nym_themes => themes}/css/general.css | 0 .../{nym_themes => themes}/css/variables.css | 2 +- .../{nym_themes => themes}/custom.css | 9 ++- .../{nym_themes => themes}/index.hbs | 34 ++------- .../mdbook-admonish.css | 0 .../{nym_themes => themes}/pagetoc.css | 0 .../{nym_themes => themes}/pagetoc.js | 0 9 files changed, 50 insertions(+), 64 deletions(-) rename documentation/operators/{nym_themes => themes}/css/chrome.css (100%) rename documentation/operators/{nym_themes => themes}/css/general.css (100%) rename documentation/operators/{nym_themes => themes}/css/variables.css (99%) rename documentation/operators/{nym_themes => themes}/custom.css (93%) rename documentation/operators/{nym_themes => themes}/index.hbs (92%) rename documentation/operators/{nym_themes => themes}/mdbook-admonish.css (100%) rename documentation/operators/{nym_themes => themes}/pagetoc.css (100%) rename documentation/operators/{nym_themes => themes}/pagetoc.js (100%) diff --git a/documentation/operators/book.toml b/documentation/operators/book.toml index 5776981d30..587ba8fe3b 100644 --- a/documentation/operators/book.toml +++ b/documentation/operators/book.toml @@ -3,7 +3,7 @@ title = "Nym Operators Guide" authors = ["Max Hampshire, Serinko, Alexia Lorenza Martinel"] description = "Everything needed to run Nym Mixnet components" language = "en" -multilingual = false # for the moment - ideally work on chinese, brazillian portugese, spanish next +multilingual = false # for the moment - ideally work on chinese, brazillian portugese, spanish next src = "src" [rust] @@ -14,17 +14,18 @@ edition = "2018" ################# [preprocessor.theme] -sidebar-width = "280px" -content-max-width = "70%" -content-main-margin-left = "5%" -content-main-margin-right = "5%" -root-font-size = "70%" -# DO NOT CHANGE or you might overwrite the custom hbs file +pagetoc = true +sidebar-width = "280px" +content-max-width = "80%" +root-font-size = "70%" +# if you need to change anything in the index.hbs file you need to turn this to `false`, rebuild the book, +# probably remove the additional `comment` that gets appended to the header, and then change this back to `true`. +# this is because of a bug in the `mdbook-theme` plugin turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` +assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` # https://gitlab.com/tglman/mdbook-variables/ [preprocessor.variables.variables] @@ -55,53 +56,57 @@ renderer = ["html"] ######### [build] -build-dir = "book" # the directory where the output is placed -create-missing = true # whether or not to create missing pages -use-default-preprocessors = true # use the default preprocessors -extra-watch-dirs = [] # directories to watch for triggering builds +build-dir = "book" # the directory where the output is placed +create-missing = true # whether or not to create missing pages +use-default-preprocessors = true # use the default preprocessors +extra-watch-dirs = [] # directories to watch for triggering builds ########## # OUTPUT # ########## [output.html] -theme = "nym_themes" +theme = "themes" default-theme = "coal" preferred-dark-theme = "coal" #curly-quotes = true smart-punctuation = true copy-fonts = true no-section-label = false -additional-css = ["./nym_themes/custom.css", "./nym_themes/mdbook-admonish.css", "./nym_themes/pagetoc.css"] -additional-js = ["./nym_themes/pagetoc.js"] +additional-css = [ + "./themes/custom.css", + "./themes/mdbook-admonish.css", + "./themes/pagetoc.css", +] +additional-js = ["./themes/pagetoc.js"] git-repository-url = "https://github.com/nymtech/nym" git-repository-icon = "fa-github" input-404 = "not-found.md" [output.html.fold] -enable = true # whether or not to enable section folding -level = 0 # the depth to start folding +enable = true # whether or not to enable section folding +level = 0 # the depth to start folding # controlling rust sample code blocks [output.html.playground] -editable = false # allows editing the source code -copyable = true # include the copy button for copying code snippets -copy-js = true # includes the JavaScript for the code editor -line-numbers = true # displays line numbers for editable code -runnable = true # displays a run button for rust code +editable = false # allows editing the source code +copyable = true # include the copy button for copying code snippets +copy-js = true # includes the JavaScript for the code editor +line-numbers = true # displays line numbers for editable code +runnable = true # displays a run button for rust code # options for the built in text search [output.html.search] -enable = true # enables the search feature -limit-results = 30 # maximum number of search results -teaser-word-count = 30 # number of words used for a search result teaser -use-boolean-and = true # multiple search terms must all match -boost-title = 2 # ranking boost factor for matches in headers -boost-hierarchy = 1 # ranking boost factor for matches in page names -boost-paragraph = 1 # ranking boost factor for matches in text -expand = true # partial words will match longer terms -heading-split-level = 3 # link results to heading levels -copy-js = true # include Javascript code for search +enable = true # enables the search feature +limit-results = 30 # maximum number of search results +teaser-word-count = 30 # number of words used for a search result teaser +use-boolean-and = true # multiple search terms must all match +boost-title = 2 # ranking boost factor for matches in headers +boost-hierarchy = 1 # ranking boost factor for matches in page names +boost-paragraph = 1 # ranking boost factor for matches in text +expand = true # partial words will match longer terms +heading-split-level = 3 # link results to heading levels +copy-js = true # include Javascript code for search [output.linkcheck] warning-policy = "warn" diff --git a/documentation/operators/nym_themes/css/chrome.css b/documentation/operators/themes/css/chrome.css similarity index 100% rename from documentation/operators/nym_themes/css/chrome.css rename to documentation/operators/themes/css/chrome.css diff --git a/documentation/operators/nym_themes/css/general.css b/documentation/operators/themes/css/general.css similarity index 100% rename from documentation/operators/nym_themes/css/general.css rename to documentation/operators/themes/css/general.css diff --git a/documentation/operators/nym_themes/css/variables.css b/documentation/operators/themes/css/variables.css similarity index 99% rename from documentation/operators/nym_themes/css/variables.css rename to documentation/operators/themes/css/variables.css index 93de90cb02..51b94cfc5a 100644 --- a/documentation/operators/nym_themes/css/variables.css +++ b/documentation/operators/themes/css/variables.css @@ -6,7 +6,7 @@ --sidebar-resize-indicator-width: 8px; --sidebar-resize-indicator-space: 2px; --page-padding: 15px; - --content-max-width: 70%; + --content-max-width: 80%; --menu-bar-height: 40px; --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */ diff --git a/documentation/operators/nym_themes/custom.css b/documentation/operators/themes/custom.css similarity index 93% rename from documentation/operators/nym_themes/custom.css rename to documentation/operators/themes/custom.css index 8005eb68df..6613d3e08b 100644 --- a/documentation/operators/nym_themes/custom.css +++ b/documentation/operators/themes/custom.css @@ -8,10 +8,12 @@ --sidebar-active: #fb6e4e; --icons-hover: #fb6e4e; --links: #fb6e4e; + ::selection { color: #121726; background-color: #c5573d; } + select option { background-color: #121726; } @@ -21,17 +23,18 @@ --sidebar-active: #fb6e4e; --icons-hover: #fb6e4e; --links: #fb6e4e; + ::selection { - color:#f2f2f2; + color: #f2f2f2; background-color: #c5573d; } } /*properly centering the title given the additional header items*/ .menu-title { - position: absolute; - left: 50%; + left: 45%; } + .menu-bar .a:hover, /*necessary because of ^*/ diff --git a/documentation/operators/nym_themes/index.hbs b/documentation/operators/themes/index.hbs similarity index 92% rename from documentation/operators/nym_themes/index.hbs rename to documentation/operators/themes/index.hbs index 505111d5b9..02e0a4ffeb 100644 --- a/documentation/operators/nym_themes/index.hbs +++ b/documentation/operators/themes/index.hbs @@ -159,20 +159,14 @@ - - - - - -