From 0c2054e8333474fc1ce380ddfaa0dbf8c2107e5c Mon Sep 17 00:00:00 2001 From: JulioV Date: Sun, 8 Nov 2020 15:08:46 -0500 Subject: [PATCH] Add new material theme features --- docs/stylesheets/extra.css | 28 ++++++++++++++++++++++++++++ mkdocs.yml | 31 +++++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 docs/stylesheets/extra.css diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 00000000..b82c04f4 --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,28 @@ +.md-nav__list { + margin: 0; + padding: 0; + padding-top: 0px; + padding-right: 0px; + padding-bottom: 0px; + padding-left: 0px; + list-style: none; + padding-left: 7px; +} + +.md-nav__item--section > .md-nav > .md-nav__title { + display: block; + padding: 0; + padding-top: 0px; + pointer-events: none; + scroll-snap-align: start; + padding-top: 10px; +} + +.md-nav__item .md-nav__link--active { + color: var(--md-typeset-a-color); + background-color: var(--md-code-bg-color); +} + +.md-nav__item .md-nav__link--active::before { + /* content: ">"; */ +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index db0f4c33..2bc4cd10 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,4 @@ site_name: RAPIDS -# theme: 'material' markdown_extensions: - toc: permalink: True @@ -31,11 +30,12 @@ markdown_extensions: - pymdownx.tilde - attr_list - pymdownx.keys -site_favicon: material/air-filter extra: social: - icon: fontawesome/brands/twitter link: 'https://twitter.com/julio_ui' + version: + method: mike extra_javascript: - javascripts/config.js - https://polyfill.io/v3/polyfill.min.js?features=es6 @@ -46,13 +46,27 @@ repo_url: 'https://github.com/carissalow/rapids' copyright: 'Released under AGPL' theme: name: material - palette: - primary: blue icon: logo: material/air-filter + palette: + - scheme: default + primary: blue + accent: blue + toggle: + icon: material/toggle-switch + name: Switch to light mode + - scheme: slate + primary: blue + accent: blue + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode features: - navigation.sections - + - search.suggest + - search.highlight +extra_css: + - stylesheets/extra.css nav: - Home: 'index.md' - Setup: @@ -86,6 +100,7 @@ nav: - Documentation: developers/documentation.md - Testing: developers/testing.md - Test cases: developers/test-cases.md - - Frequently Asked Questions: faq.md - - Team: team.md - - Citation: citation.md + - Others: + - Frequently Asked Questions: faq.md + - Team: team.md + - Citation: citation.md