diff --git a/docs/_static/style.css b/docs/_static/style.css index c353f9692..de896609d 100755 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -1,5 +1,5 @@ :root { - --max-sidebar-width: 30%; + --max-sidebar-width: 35%; } @font-face { @@ -8,55 +8,21 @@ } body { - padding-top: 4em; + padding-top: 3em; padding-bottom: 0; font-family: 'DejaVu Sans', sans-serif; } -h1 { - font-size: 2.2em; - font-weight: 700; - padding: 0 0 0.3em; - border-bottom: 1px solid silver; - margin-bottom: 0.8em; -} - -h2 { - font-size: 1.6em; - font-weight: 500; - color: #70360f; - border-bottom: 1px solid silver; - margin: 1.25em 0 0.6em; - padding: 8px 0; - /* border-radius: 8px; */ - /* box-shadow: 0 0 1px 0 #4e4e4e57; */ - /* background-color: #e7e7f3; */ -} - .output_html.output_result h2 { font-size: 1.2em; - color: #663d3d; } h3 { - font-size: 1.3em; text-decoration: underline; - color: #3f3f3f; } h4 { margin-top: 1.4em; - font-size: 1.2em; - color: #663d3d; -} - -h5 { - font-size: 1.1em; - color: #353535; -} - -h6 { - font-size: 1em; } pre { @@ -125,6 +91,15 @@ img.sphx-glr-single-img:hover, padding-right: 3.5em; } +table { + display: contents; +} +table thead, +table tbody, +table caption, +table colgroup { + width: 100%; +} table caption:hover { position: relative; color: gray; @@ -160,7 +135,7 @@ table caption:hover { width: auto; } .highlighttable .code { - max-width: 100%; + width: 100%; } .highlighttable .linenos { width: auto; @@ -191,168 +166,14 @@ table caption:hover { box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.7); } -#content-wrapper { - margin-left: var(--max-sidebar-width); - box-sizing: border-box; - width: calc(100% - var(--max-sidebar-width)); - min-height: 100%; - padding-bottom: 0; - margin-bottom: 0; -} - -/* sidebar */ -#sidebar-wrapper { - position: fixed; - top: 3.5em; - bottom: 0; - left: 0; - height: calc(100% - 3.5em); - width: var(--max-sidebar-width); - padding: 0; - background-color: #333333; - overflow-x: hidden; - overflow-y: hidden; - z-index: 50; -} - -.sidebar.hidden-xs { - position: relative; - overflow-x: hidden; - overflow-y: scroll; - width: calc(100% + 16px); - height: calc(100% - 2em); - padding-top: 1em; - /* margin-bottom: 2em; */ - box-sizing: border-box; - padding-bottom: 0.5em; -} - -/* logo */ -.sidebar > .logo { - margin: auto; - /* padding: 1em; */ - padding-right: 16px; - width: 100%; - max-width: 275px; - padding-bottom: 1em; - padding-top: 1em; - /* padding-left: 0.5em; - padding-right: 1.5em; */ -} - -/* searchbar */ -#searchbox > h3, -#searchbox > p { - display: none; -} - -#searchbox { - /* box-sizing: border-box; */ - display: flex; - justify-content: space-around; - padding-right: 16px; -} - -.search.form-inline > .input-append.input-group { - display: flex; - width: 30vw; - padding-left: 24px; - padding-right: 24px; -} -.sidebar.hidden-xs > h3 { - display: none; -} -.toctree-wrapper.compound > p.caption { - display: none; -} -.sidebar.hidden-xs > p.caption { - padding-left: 24px; - padding-top: 2px; - padding-bottom: 2px; - font-size: 1.11em; - font-weight: 400; - color: #6e6e6e; - margin: 10px 0 0; -} -.sidebar.hidden-xs > ul { - padding: 0; -} -.sidebar.hidden-xs > ul:last-child { - padding-bottom: 1em; - margin-bottom: 1em; -} - -.sidebar.hidden-xs > h3 > a, -.sidebar.hidden-xs > div > h3 { - display: block; - padding-left: 24px; - color: white; - text-decoration: none; -} -.sidebar > ul > li > a > code { - color: white; -} -.sidebar > ul > li.current > a > code { - color: #c7254e; -} -.sidebar > ul > li:hover { - background-color: rgb(66, 66, 66); -} - -.sidebar > ul > li.current, -.sidebar > ul > li.current:hover { - background-color: rgb(255, 255, 255); -} - -.sidebar > ul > li > a { - display: block; - padding-top: 0.15em; - padding-bottom: 0.15em; - padding-left: 24px; - padding-right: 24px; - color: rgb(209, 209, 209); - text-decoration: none; - cursor: pointer; -} - -/* selected list item header */ -.sidebar > ul > li.current > a { - color: black; - font-weight: 500; +.bd-sidebar { + background: #f1f1f1; } -/* selected list item's sub-list */ -.sidebar > ul > li.current > ul { - padding: 0; -} - -/* selected list item's sub-list items */ -.sidebar > ul > li.current > ul > li { - list-style: none; - background-color: rgb(235, 235, 235); - color: gray; -} - -/* selected list item's sub-list's item on hover */ -.sidebar > ul > li.current > ul > li:hover { - background-color: rgb(214, 214, 214); -} - -/* selected list item's sub-list's item a tags */ -.sidebar > ul > li.current > ul > li > a { - display: block; - padding-left: 48px; - padding-right: 48px; - padding-top: 0.1em; - padding-bottom: 0.1em; - color: rgb(58, 58, 58); - text-decoration: none; - cursor: pointer; -} -/* selected list item's sub-list's item selected a tags */ -.sidebar > ul > li.current > ul > li > a.current { - color: black; - font-weight: 500; +.bd-sidebar .logo { + filter: invert(1); + max-width: 100%; + height: auto; } ul.this-page-menu { @@ -368,41 +189,6 @@ ul.this-page-menu a { display: none; } -/* footer */ -footer { - margin-left: calc(var(--max-sidebar-width) + 0.6em); - box-sizing: border-box; - min-height: 100%; - /* width: calc(75% - 0.35em); */ - width: calc(100% - var(--max-sidebar-width) - 0.55em); - max-width: 900px; - padding-left: 2em; - padding-right: 2em; - padding-top: 1.5em; - padding-bottom: 2.25em; - color: whitesmoke; - background-color: #333333; - box-shadow: 0 0 30px 0 rgb(128, 128, 128, 0.3); -} - -footer .flex { - width: 100%; - display: flex; - justify-content: space-between; - padding-bottom: 0.5em; -} -footer .flex a { - text-decoration: none; -} -footer a, -footer a:visited { - color: rgb(255, 166, 94); -} -footer a:hover, -footer a:active { - color: rgb(255, 205, 164); -} - table:not([class]):not([id]) { display: block; font-size: small; @@ -436,48 +222,26 @@ tr td { background-blend-mode: soft-light, screen; } -/* @media screen and (max-width: 1300px) { - #sidebar-wrapper { - width: 30%; - } - #content-wrapper { - margin-left: 30%; - width: 70%; - } - .bodywrapper > .body { - width: calc(70vw - 2em); - max-width: 992px; - } -} */ - @media screen and (max-width: 992px) { .bodywrapper > .body { width: calc(100vw - 2em); max-width: 992px; } - footer { - width: calc(100vw - 2em); - margin-left: 0; - max-width: 992px; - } #content-wrapper { margin: 0; width: 100%; } - #sidebar-wrapper { - display: none; + table:not([class]):not([id]) { + width: 100%; + max-width: 992px; } } @media screen and (max-width: 650px) { - #content-wrapper { - padding: 0; - } - footer { - margin-left: -15px; - width: calc(100% + 30px); + table:not([class]):not([id]) { + width: 100%; } .bodywrapper > .body { margin-top: 0; @@ -503,12 +267,6 @@ tr td { align-items: center; justify-content: center; } -/* .sim-gallery a:first-child { - background-color: #ffeeee; -} -.sim-gallery a:last-child { - background-color: #e5f6fd; -} */ .sim-gallery div { display: block; justify-content: center; @@ -516,7 +274,6 @@ tr td { padding: 1em; border-radius: 0.5em; border: 1px solid silver; - /* cursor: pointer; */ box-shadow: 0 0 15px 0 #3b3b3b8a; } .sim-gallery div:first-child p { @@ -534,8 +291,6 @@ tr td { background-size: 170px 160px; } .sim-gallery a { - /* margin: 1em; */ - /* padding: 3em 1.5em; */ text-decoration: none; font-size: 1.2em; text-align: center; diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html deleted file mode 100644 index 05b5b6f6d..000000000 --- a/docs/_templates/layout.html +++ /dev/null @@ -1,65 +0,0 @@ -{% extends "!layout.html" %} - -{# Add the google webfonts needed for the logo #} -{% block extrahead %} - - - - - - - - -{% endblock %} - -{# Silence the bottom relbar. #} -{% block relbar2 %} {% endblock %} - -{%- block footer %} - - -{%- endblock %} diff --git a/docs/conf.py b/docs/conf.py index 64283fdf5..175d6597d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,7 +62,7 @@ "sphinx_copybutton", # "sphinxcontrib.bibtex", "breathe", - "sphinxjp.themes.basicstrap", + "sphinx_book_theme", "sphinx_gallery.gen_gallery", "sphinx.ext.intersphinx", "sphinx_tabs.tabs", @@ -251,13 +251,8 @@ # Tell sphinx what the primary language being documented is. primary_domain = "py" - -# Tell sphinx what the pygments highlight language should be. highlight_language = "c" -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # @@ -284,7 +279,7 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = None +pygments_style = "default" # ---------------------------------------------------------------------------- # @@ -296,78 +291,31 @@ # # Some html_theme options are 'alabaster', 'bootstrap', 'sphinx_rtd_theme', # 'classic', 'basicstrap' -html_theme = "basicstrap" +html_theme = "sphinx_book_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = { - # Set the lang attribute of the html tag. Defaults to 'en' - "lang": "en", - # Disable showing the sidebar. Defaults to 'false' - "nosidebar": False, - # Show header searchbox. Defaults to false. works only "nosidebar=True", - "header_searchbox": False, - # Put the sidebar on the right side. Defaults to false. - "rightsidebar": False, - # Set the width of the sidebar. Defaults to 3 - "sidebar_span": 3, - # Fix navbar to top of screen. Defaults to true - "nav_fixed_top": True, - # Fix the width of the sidebar. Defaults to false - "nav_fixed": True, - # Set the width of the sidebar. Defaults to '900px' - "nav_width": "300px", - # Fix the width of the content area. Defaults to false - "content_fixed": False, - # Set the width of the content area. Defaults to '900px' - "content_width": "900px", - # Fix the width of the row. Defaults to false - "row_fixed": False, - # Disable the responsive design. Defaults to false - "noresponsive": False, - # Disable the responsive footer relbar. Defaults to false - "noresponsiverelbar": False, - # Disable flat design. Defaults to false. - # Works only "bootstrap_version = 3" - "noflatdesign": False, - # Enable Google Web Font. Defaults to false - # "googlewebfont": True, - # Set the URL of Google Web Font's CSS. - # Defaults to 'http://fonts.googleapis.com/css?family=Text+Me+One' - # "googlewebfont_url": "http://fonts.googleapis.com/css?family=Roboto+Script+One", # NOQA - # "googlewebfont_url": "http://fonts.googleapis.com/css2?family=Inter", - # Set the Style of Google Web Font's CSS. - # Defaults to "font-family: 'Text Me One', sans-serif;" - # "googlewebfont_style": "font-family: Helvetica", - # "googlewebfont_style": "font-family: 'Inter', sans-serif;", - # Set 'navbar-inverse' attribute to header navbar. Defaults to false. - "header_inverse": True, - # Set 'navbar-inverse' attribute to relbar navbar. Defaults to false. - "relbar_inverse": False, - # Enable inner theme by Bootswatch. Defaults to false - "inner_theme": False, - # Set the name of inner theme. Defaults to 'bootswatch-simplex' - # "inner_theme_name": "bootswatch-Yeti", - # Select Twitter bootstrap version 2 or 3. Defaults to '3' - "bootstrap_version": "3", - # Show "theme preview" button in header navbar. Defaults to false. - "theme_preview": False, + "repository_url": "https://github.com/DeepanshS/mrsimulator", + "use_repository_button": True, + "use_issues_button": True, + "use_download_button": True, + "launch_buttons": { + "notebook_interface": "jupyterlab", + "binderhub_url": "https://mybinder.org", + "colab_url": "https://colab.research.google.com", + }, } -html_style = "style.css" -html_title = f"mrsimulator:docs v{__version__}" + +# html_style = "style.css" +html_title = "" # f"mrsimulator:docs v{__version__}" html_logo = "_static/mrsimulator_logo.png" html_favicon = "_static/favicon.ico" html_last_updated_fmt = "" -html_sidebars = { - "**": ["searchbox.html", "globaltoc.html"], - "using/windows": ["searchbox.html", "windowssidebar.html"], -} -# ---------------------------------------------------------------------------- # - # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". diff --git a/docs/installation/requirements.rst b/docs/installation/requirements.rst index fe58e46bf..9db372114 100644 --- a/docs/installation/requirements.rst +++ b/docs/installation/requirements.rst @@ -27,6 +27,6 @@ Package dependencies - pytest>=4.5.0 for unit tests. - pre-commit for code formatting - sphinx>=2.0 for generating the documentation -- sphinxjp.themes.basicstrap for documentation. +- sphinx-book-theme for documentation. - breathe==4.26 for generating C documentation - sphinx-copybutton diff --git a/docs/requirements.txt b/docs/requirements.txt index d21a1781a..1e1844627 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -12,7 +12,7 @@ joblib>=1.0.0 cython>=0.29.11 # Building Docs requirements -sphinxjp.themes.basicstrap +sphinx_book_theme sphinx>=2.0 sphinx-gallery>0.6.2 pillow>=7.1.2 diff --git a/environment-dev.yml b/environment-dev.yml index 6fd0c7a6f..f39c7a41a 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -28,7 +28,7 @@ dependencies: - sybil>=3.0.0 # building docs - sphinx>=2.0 - - sphinxjp.themes.basicstrap + - sphinx-book-theme - sphinx-copybutton>=0.2.12 - sphinx-gallery>=0.10 - pillow>=7.1.2 diff --git a/requirements-dev.txt b/requirements-dev.txt index b37174219..63af1c2a1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -22,7 +22,7 @@ pytest-cov sybil>=3.0.0 # Building Docs requirements -sphinxjp.themes.basicstrap +sphinx-book-theme sphinx>=2.0 sphinx-gallery>=0.10 pillow>=7.1.2