-
- {% for item in items %}
-
-
- {% if item.subitem %}
- - - {{ item.title }} - - -- {% else %} - {{ item.title }} - {% endif %} -
- {% endfor %}
-
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1882839..ce9c75d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,29 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-json - - id: check-added-large-files - - id: check-merge-conflict - - id: check-symlinks - - id: check-toml -# Python -- repo: https://github.com/astral-sh/ruff-pre-commit + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-json + - id: check-added-large-files + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + # Python + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.7 hooks: - - id: ruff - args: ["--fix"] - - id: ruff-format + - id: ruff + args: ["--fix"] + - id: ruff-format + # markdown, yaml + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + types_or: [markdown, yaml, html, javascript, css] + # workflow files cannot be modified by pre-commit.ci + exclude: ^(\.github/workflows) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d56afbe..3a99f8a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,12 +13,12 @@ build: # Build documentation in the docs/ directory with Sphinx sphinx: - configuration: docs/conf.py + configuration: docs/conf.py # If using Sphinx, optionally build your docs in additional formats such as PDF formats: all # Optionally declare the Python requirements required to build your docs python: - install: - - requirements: docs/requirements.txt + install: + - requirements: docs/requirements.txt diff --git a/deepmodeling_sphinx/banner.css b/deepmodeling_sphinx/banner.css index 7b7fc06..f390720 100644 --- a/deepmodeling_sphinx/banner.css +++ b/deepmodeling_sphinx/banner.css @@ -4,584 +4,582 @@ under MIT license */ .header-container { - max-width: none; - margin-top: 4px; + max-width: none; + margin-top: 4px; } @media screen and (min-width: 1101px) { - .header-container { - margin-top: 0; - } + .header-container { + margin-top: 0; + } } @media screen and (min-width: 1600px) { - .header-container { - margin-top: 0; - } + .header-container { + margin-top: 0; + } } .container-fluid.header-holder { - padding-right: 0; - padding-left: 0; - /* pydata theme has z-index 1030; we should be the largest */ - z-index: 2000; + padding-right: 0; + padding-left: 0; + /* pydata theme has z-index 1030; we should be the largest */ + z-index: 2000; } .header-holder .container { - max-width: none; - padding-right: 1.875rem; - padding-left: 1.875rem; + max-width: none; + padding-right: 1.875rem; + padding-left: 1.875rem; } @media screen and (min-width: 1101px) { - .header-holder .container { - padding-right: 1.875rem; - padding-left: 1.875rem; - } + .header-holder .container { + padding-right: 1.875rem; + padding-left: 1.875rem; + } } .header-holder .main-menu { - -webkit-box-pack: unset; - -ms-flex-pack: unset; - justify-content: unset; - position: relative; + -webkit-box-pack: unset; + -ms-flex-pack: unset; + justify-content: unset; + position: relative; } @media screen and (min-width: 1101px) { - .header-holder .main-menu ul { - padding-left: 0; - margin-left: 26%; - } + .header-holder .main-menu ul { + padding-left: 0; + margin-left: 26%; + } } @media screen and (min-width: 1600px) { - .header-holder .main-menu ul { - padding-left: 38px; - margin-left: 310px; - } + .header-holder .main-menu ul { + padding-left: 38px; + margin-left: 310px; + } } - .header-holder { - height: 68px; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - left: 0; - margin-left: auto; - margin-right: auto; - position: fixed; - right: 0; - top: 0; - width: 100%; - z-index: 9999; - background-color: #ffffff; - border-bottom: 1px solid #e2e2e2; -} - -.wy-nav-side, .shift { - margin-top: 68px; + height: 68px; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + left: 0; + margin-left: auto; + margin-right: auto; + position: fixed; + right: 0; + top: 0; + width: 100%; + z-index: 9999; + background-color: #ffffff; + border-bottom: 1px solid #e2e2e2; +} + +.wy-nav-side, +.shift { + margin-top: 68px; } @media screen and (min-width: 1100px) { + .wy-nav-side { + margin-top: 90px; + } - .wy-nav-side { - margin-top: 90px; - } - - .header-holder { - height: 90px; - } + .header-holder { + height: 90px; + } } .header-container { - position: relative; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; } .header-container:before, .header-container:after { - content: ""; - display: table; + content: ""; + display: table; } .header-container:after { - clear: both; + clear: both; } .header-container { - *zoom: 1; + *zoom: 1; } @media screen and (min-width: 1100px) { - .header-container { - display: block; - } + .header-container { + display: block; + } } .header-logo { - height: 50px; - width: 50px; - background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/logos/deepmodeling.svg"); - background-repeat: no-repeat; - background-size: 50px 50px; - display: block; - float: left; - z-index: 10; + height: 50px; + width: 50px; + background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/logos/deepmodeling.svg"); + background-repeat: no-repeat; + background-size: 50px 50px; + display: block; + float: left; + z-index: 10; } .header-logo::after { - content: "DeepModeling"; - font-size: 1.375rem; - margin-left: 60px; - padding-top: 10px; - display: block; - color: #262626; + content: "DeepModeling"; + font-size: 1.375rem; + margin-left: 60px; + padding-top: 10px; + display: block; + color: #262626; } .main-menu ul li a { - color: #262626; + color: #262626; } @media screen and (min-width: 1100px) { - /* only fix for read the docs theme */ - .wy-body-for-nav .header-logo { - background-size: 50px 50px; - position: fixed; - height: 50px; - width: 50px; - top: -8px; - float: none; - margin-top: 25px; - } + /* only fix for read the docs theme */ + .wy-body-for-nav .header-logo { + background-size: 50px 50px; + position: fixed; + height: 50px; + width: 50px; + top: -8px; + float: none; + margin-top: 25px; + } } @media screen and (min-width: 1100px) { - .main-menu-open-button { - display: none; - } + .main-menu-open-button { + display: none; + } } .header-holder .main-menu { - display: none; + display: none; } @media screen and (min-width: 1100px) { - .header-holder .main-menu { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: end; - -ms-flex-pack: end; - } -} - -.header-holder .main-menu ul { + .header-holder .main-menu { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; + -webkit-box-pack: end; + -ms-flex-pack: end; + } +} + +.header-holder .main-menu ul { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; } .header-holder .main-menu ul li { - display: inline-block; - margin-right: 40px; - position: relative; + display: inline-block; + margin-right: 40px; + position: relative; } .header-holder .main-menu ul li.active:after { - content: "•"; - bottom: -24px; - color: #1E90FF; - font-size: 1.375rem; - left: 0; - position: absolute; - right: 0; - text-align: center; + content: "•"; + bottom: -24px; + color: #1e90ff; + font-size: 1.375rem; + left: 0; + position: absolute; + right: 0; + text-align: center; } .header-holder .main-menu ul li.active a { - color: #1E90FF; + color: #1e90ff; } .header-holder .main-menu ul li.docs-active:after { - content: "•"; - bottom: -24px; - color: #1E90FF; - font-size: 1.375rem; - left: -24px; - position: absolute; - right: 0; - text-align: center; + content: "•"; + bottom: -24px; + color: #1e90ff; + font-size: 1.375rem; + left: -24px; + position: absolute; + right: 0; + text-align: center; } .header-holder .main-menu ul li:last-of-type { - margin-right: 0; + margin-right: 0; } .header-holder .main-menu ul li a { - color: #000000; - font-size: 1.3rem; - letter-spacing: 0; - line-height: 2.125rem; - text-align: center; - text-decoration: none; + color: #000000; + font-size: 1.3rem; + letter-spacing: 0; + line-height: 2.125rem; + text-align: center; + text-decoration: none; } @media screen and (min-width: 1100px) { - .header-holder .main-menu ul li a:hover { - color: #1E90FF; - } + .header-holder .main-menu ul li a:hover { + color: #1e90ff; + } } .mobile-main-menu { - display: none; + display: none; } .mobile-main-menu.open { - background-color: #262626; - display: block; - height: 100%; - left: 0; - margin-left: auto; - margin-right: auto; - min-height: 100%; - position: fixed; - right: 0; - top: 0; - width: 100%; - z-index: 99999; + background-color: #262626; + display: block; + height: 100%; + left: 0; + margin-left: auto; + margin-right: auto; + min-height: 100%; + position: fixed; + right: 0; + top: 0; + width: 100%; + z-index: 99999; } .mobile-main-menu .container-fluid { - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - height: 68px; - position: relative; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + height: 68px; + position: relative; } .mobile-main-menu .container-fluid:before, .mobile-main-menu .container-fluid:after { - content: ""; - display: table; + content: ""; + display: table; } .mobile-main-menu .container-fluid:after { - clear: both; + clear: both; } .mobile-main-menu .container-fluid { - *zoom: 1; + *zoom: 1; } .mobile-main-menu.open ul { - list-style-type: none; - padding: 0; + list-style-type: none; + padding: 0; } .mobile-main-menu.open ul li a, .mobile-main-menu.open .resources-mobile-menu-title { - font-size: 2rem; - color: #ffffff; - letter-spacing: 0; - line-height: 4rem; - text-decoration: none; + font-size: 2rem; + color: #ffffff; + letter-spacing: 0; + line-height: 4rem; + text-decoration: none; } .mobile-main-menu.open ul li.active a { - color: #1E90FF; + color: #1e90ff; } .main-menu-close-button { - background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/icon-close-opt.svg"); - background-position: center center; - background-repeat: no-repeat; - background-size: 24px 24px; - height: 24px; - position: absolute; - right: 0; - width: 24px; - top: -4px; + background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/icon-close-opt.svg"); + background-position: center center; + background-repeat: no-repeat; + background-size: 24px 24px; + height: 24px; + position: absolute; + right: 0; + width: 24px; + top: -4px; } .mobile-main-menu-header-container { - position: relative; + position: relative; } .mobile-main-menu-links-container { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding-left: 2.8125rem; - height: 90vh; - margin-top: -25px; - padding-top: 50%; - overflow-y: scroll; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding-left: 2.8125rem; + height: 90vh; + margin-top: -25px; + padding-top: 50%; + overflow-y: scroll; } .mobile-main-menu-links-container .main-menu { - height: 100vh; + height: 100vh; } .mobile-main-menu-links-container ul.resources-mobile-menu-items li { - padding-left: 15px; + padding-left: 15px; } .main-menu ul li .resources-dropdown a { - cursor: pointer; + cursor: pointer; } .main-menu ul li .dropdown-menu { - border-radius: 0; - padding: 0; + border-radius: 0; + padding: 0; } .main-menu ul li .dropdown-menu .dropdown-item { - color: #6c6c6d; - border-bottom: 1px solid #e2e2e2; + color: #6c6c6d; + border-bottom: 1px solid #e2e2e2; } .main-menu ul li .dropdown-menu .dropdown-item:last-of-type { - border-bottom-color: transparent; + border-bottom-color: transparent; } .main-menu ul li .dropdown-menu .dropdown-item:hover { - background-color: #1E90FF; + background-color: #1e90ff; } .main-menu ul li .dropdown-menu .dropdown-item p { - font-size: 1rem; - color: #979797; + font-size: 1rem; + color: #979797; } .main-menu ul li .dropdown-menu a.dropdown-item:hover { - color: #ffffff; + color: #ffffff; } .main-menu ul li .dropdown-menu a.dropdown-item:hover p { - color: #ffffff; + color: #ffffff; } .resources-dropdown-menu { - left: -75px; - width: 226px; - display: none; - position: absolute; - z-index: 1000; - display: none; - float: left; - min-width: 10rem; - padding: 0.5rem 0; - font-size: 1rem; - color: #212529; - text-align: left; - list-style: none; - background-color: #ffffff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 0.25rem; + left: -75px; + width: 226px; + display: none; + position: absolute; + z-index: 1000; + display: none; + float: left; + min-width: 10rem; + padding: 0.5rem 0; + font-size: 1rem; + color: #212529; + text-align: left; + list-style: none; + background-color: #ffffff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; } .resources-dropdown:hover .resources-dropdown-menu { - display: block; + display: block; } .main-menu ul li .resources-dropdown-menu { - border-radius: 0; - padding: 0; + border-radius: 0; + padding: 0; } .main-menu ul li.active:hover .resources-dropdown-menu { - display: block; + display: block; } .main-menu ul li .resources-dropdown-menu .dropdown-item { - color: #6c6c6d; - border-bottom: 1px solid #e2e2e2; + color: #6c6c6d; + border-bottom: 1px solid #e2e2e2; } .resources-dropdown .with-down-orange-arrow { - padding-right: 2rem; - position: relative; - background: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/chevron-down-black-opt.svg"); - background-size: 14px 18px; - background-position: top 7px right 10px; - background-repeat: no-repeat; + padding-right: 2rem; + position: relative; + background: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/chevron-down-black-opt.svg"); + background-size: 14px 18px; + background-position: top 7px right 10px; + background-repeat: no-repeat; } .with-down-arrow { - padding-right: 2rem; - position: relative; - background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/chevron-down-black-opt.svg"); - background-size: 14px 18px; - background-position: top 7px right 10px; - background-repeat: no-repeat; + padding-right: 2rem; + position: relative; + background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/chevron-down-black-opt.svg"); + background-size: 14px 18px; + background-position: top 7px right 10px; + background-repeat: no-repeat; } .with-down-arrow:hover { - background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/chevron-down-black-opt.svg"); - background-repeat: no-repeat; + background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/chevron-down-black-opt.svg"); + background-repeat: no-repeat; } .header-holder .main-menu ul li .resources-dropdown .doc-dropdown-option { - padding-top: 1rem; + padding-top: 1rem; } .header-holder .main-menu ul li a.nav-dropdown-item { - display: block; - font-size: 1rem; - line-height: 1.3125rem; - width: 100%; - padding: 0.25rem 1.5rem; - clear: both; - font-weight: 400; - color: #979797; - text-align: center; - background-color: transparent; - border-bottom: 1px solid #e2e2e2; + display: block; + font-size: 1rem; + line-height: 1.3125rem; + width: 100%; + padding: 0.25rem 1.5rem; + clear: both; + font-weight: 400; + color: #979797; + text-align: center; + background-color: transparent; + border-bottom: 1px solid #e2e2e2; } .header-holder .main-menu ul li a.nav-dropdown-item:last-of-type { - border-bottom-color: transparent; + border-bottom-color: transparent; } .header-holder .main-menu ul li a.nav-dropdown-item:hover { - background-color: #1E90FF; - color: white; + background-color: #1e90ff; + color: white; } .header-holder .main-menu ul li a.nav-dropdown-item .dropdown-title { - font-size: 1.125rem; - color: #6c6c6d; - letter-spacing: 0; - line-height: 34px; + font-size: 1.125rem; + color: #6c6c6d; + letter-spacing: 0; + line-height: 34px; } .header-holder .main-menu ul li a.nav-dropdown-item:hover .dropdown-title { - background-color: #1E90FF; - color: white; + background-color: #1e90ff; + color: white; } .main-menu-open-button { - background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/icon-menu-dots-dark-opt.svg"); - background-position: center center; - background-size: 25px 7px; - background-repeat: no-repeat; - width: 25px; - height: 17px; - position: absolute; - right: 0; - top: 14px; + background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/icon-menu-dots-dark-opt.svg"); + background-position: center center; + background-size: 25px 7px; + background-repeat: no-repeat; + width: 25px; + height: 17px; + position: absolute; + right: 0; + top: 14px; } @media screen and (min-width: 1100px) { - .main-menu-open-button { - display: none; - } + .main-menu-open-button { + display: none; + } } .tutorials-header .main-menu-open-button { - background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/icon-menu-dots-dark-opt.svg"); + background-image: url("https://unpkg.com/@njzjz/icons@0.0.5/deepmodeling/icon-menu-dots-dark-opt.svg"); } - .container { - width: 100%; - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; } @media (min-width: 576px) { - .container { - max-width: 540px; - } + .container { + max-width: 540px; + } } @media (min-width: 768px) { - .container { - max-width: 720px; - } + .container { + max-width: 720px; + } } @media (min-width: 992px) { - .container { - max-width: 960px; - } + .container { + max-width: 960px; + } } @media (min-width: 1200px) { - .container { - max-width: 1140px; - } + .container { + max-width: 1140px; + } } .container-fluid { - width: 100%; - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; } .header-holder { - position: relative; - z-index: 201; - } + position: relative; + z-index: 201; +} .wy-side-scroll { - height: calc(100% - 68px)!important; + height: calc(100% - 68px) !important; } @media screen and (min-width: 1100px) { - .wy-side-scroll { - height: calc(100% - 90px)!important; - } + .wy-side-scroll { + height: calc(100% - 90px) !important; + } } @media (prefers-color-scheme: dark) { - /* Dark mode */ - .header-holder { - background-color: #1E1E1E; - } - .header-logo::after { - color: #ffffff; - } - .header-holder .main-menu ul li a { - color: #ffffff; - } - .resources-dropdown-menu { - color: #ffffff; - background-color: #1E1E1E; - } - .header-holder .main-menu ul li a.nav-dropdown-item { - color: #ffffff; - } - .header-holder .main-menu ul li a.nav-dropdown-item .dropdown-title { - color: #ffffff; - } - .wy-body-for-nav { - background-color: #1E1E1E; - } + /* Dark mode */ + .header-holder { + background-color: #1e1e1e; + } + .header-logo::after { + color: #ffffff; + } + .header-holder .main-menu ul li a { + color: #ffffff; + } + .resources-dropdown-menu { + color: #ffffff; + background-color: #1e1e1e; + } + .header-holder .main-menu ul li a.nav-dropdown-item { + color: #ffffff; + } + .header-holder .main-menu ul li a.nav-dropdown-item .dropdown-title { + color: #ffffff; + } + .wy-body-for-nav { + background-color: #1e1e1e; + } } diff --git a/deepmodeling_sphinx/banner.html b/deepmodeling_sphinx/banner.html index cdc32ad..e0f60e5 100644 --- a/deepmodeling_sphinx/banner.html +++ b/deepmodeling_sphinx/banner.html @@ -1,65 +1,94 @@ - +