diff --git a/source/_static/custom-theme.css b/source/_static/custom-theme.css index 50ec0bc..8da8d3e 100644 --- a/source/_static/custom-theme.css +++ b/source/_static/custom-theme.css @@ -1,179 +1,191 @@ -nav.bd-links li>a:active, .logo__title:hover, nav.bd-links li>a:hover { - text-decoration: none; - } - html[data-theme=light] { - --pst-color-primary: #4d8eef; - --pst-color-primary-highlight: #2d0ef1; - --sd-color-primary: var(--pst-color-primary); - --sd-color-primary-text: var(--pst-color-primary-text); - --sd-color-primary-highlight: var(--pst-color-primary-highlight); - --sd-color-primary-bg: #547fca; - --sd-color-primary-bg-text: #14181e; - - --pst-color-secondary: #4d8eef; - --pst-color-secondary-highlight: #2d0ef1; - --sd-color-secondary: var(--pst-color-secondary); - --sd-color-secondary-text: var(--pst-color-secondary-text); - --sd-color-secondary-highlight: var(--pst-color-secondary-highlight); - --sd-color-secondary-bg: #547fca; - --pst-color-primary-bg: #84baf4; - --pst-color-secondary-bg: #547fca; - --pst-color-accent: #4d8eef; - --pst-color-accent-bg: #92abd0; - } - .bd-sidebar-primary { - /* 使元素可滚动 */ - overflow-y: scroll; /* 垂直滚动条 */ - overflow-x: hidden; /* 隐藏水平滚动条,如果不需要的话 */ - - /* 隐藏滚动条但保持滚动功能 */ - scrollbar-width: none; /* Firefox */ - -ms-overflow-style: none; /* Internet Explorer 和 Edge */ - } - - .bd-sidebar-primary::-webkit-scrollbar { - display: none; /* 隐藏滚动条 */ - } - .bd-sidebar-primary label.toctree-toggle { +nav.bd-links li > a:active, +.logo__title:hover, +nav.bd-links li > a:hover { + text-decoration: none; +} +html[data-theme="light"] { + --pst-color-primary: #4d8eef; + --pst-color-primary-highlight: #2d0ef1; + --sd-color-primary: var(--pst-color-primary); + --sd-color-primary-text: var(--pst-color-primary-text); + --sd-color-primary-highlight: var(--pst-color-primary-highlight); + --sd-color-primary-bg: #547fca; + --sd-color-primary-bg-text: #14181e; + + --pst-color-secondary: #4d8eef; + --pst-color-secondary-highlight: #2d0ef1; + --sd-color-secondary: var(--pst-color-secondary); + --sd-color-secondary-text: var(--pst-color-secondary-text); + --sd-color-secondary-highlight: var(--pst-color-secondary-highlight); + --sd-color-secondary-bg: #547fca; + --pst-color-primary-bg: #84baf4; + --pst-color-secondary-bg: #547fca; + --pst-color-accent: #4d8eef; + --pst-color-accent-bg: #92abd0; +} +.search-button-field:hover { + border: 1px solid var(--pst-color-border); + box-shadow: 0 0 0 0.1875rem var(--pst-color-link-hover); +} +.bd-sidebar-primary { + overflow-y: scroll; + overflow-x: hidden; + scrollbar-width: none; + -ms-overflow-style: none; +} + +.bd-sidebar-primary::-webkit-scrollbar { + display: none; +} +.bd-sidebar-primary label.toctree-toggle { height: 20px; width: 20px; opacity: 0.8; - } - .navbar-brand:hover:hover, .navbar-brand:visited:hover:hover { +} +.navbar-brand:hover:hover, +.navbar-brand:visited:hover:hover { text-decoration: none !important; - } - .bd-sidebar-primary label.toctree-toggle { +} +.bd-sidebar-primary label.toctree-toggle { height: 20px; width: 20px; - } - cite { - font-style: normal; - } - .bd-sidebar { - counter-reset: toctree-l2counter; - } - .bd-article-container { - counter-reset: h2counter; - } - .bd-toc { - counter-reset: toc-h2counter; - } - /* body { - counter-reset: h2counter toc-h2counter toctree-l2counter; -} */ +} +cite { + font-style: normal; +} +.bd-footer { + background-color: #303846; +} +.bd-sidebar { + counter-reset: toctree-l2counter; +} +.bd-article-container { + counter-reset: h2counter; +} +.bd-toc { + counter-reset: toc-h2counter; +} h2 { - counter-reset: h3counter; + counter-reset: h3counter; } h3 { - counter-reset: h4counter; + counter-reset: h4counter; } h4 { - counter-reset: h5counter; + counter-reset: h5counter; } h5 { - counter-reset: h6counter; + counter-reset: h6counter; } h2::before { - counter-increment: h2counter; - content: counter(h2counter) ". "; + counter-increment: h2counter; + content: counter(h2counter) ". "; } h3::before { - counter-increment: h3counter; - content: counter(h2counter) "." counter(h3counter) " "; + counter-increment: h3counter; + content: counter(h2counter) "." counter(h3counter) " "; } h4::before { - counter-increment: h4counter; - content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) " "; + counter-increment: h4counter; + content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) " "; } h5::before { - counter-increment: h5counter; - content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) " "; + counter-increment: h5counter; + content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." + counter(h5counter) " "; } h6::before { - counter-increment: h6counter; - content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter) " "; + counter-increment: h6counter; + content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." + counter(h5counter) "." counter(h6counter) " "; } /* TOC heading counters */ .toc-h2 { - counter-reset: toc-h3counter; + counter-reset: toc-h3counter; } .toc-h3 { - counter-reset: toc-h4counter; + counter-reset: toc-h4counter; } .toc-h4 { - counter-reset: toc-h5counter; + counter-reset: toc-h5counter; } .toc-h5 { - counter-reset: toc-h6counter; + counter-reset: toc-h6counter; } .toc-h2 > .nav-link::before { - counter-increment: toc-h2counter; - content: counter(toc-h2counter) ". "; + counter-increment: toc-h2counter; + content: counter(toc-h2counter) ". "; } .toc-h3 > .nav-link::before { - counter-increment: toc-h3counter; - content: counter(toc-h2counter) "." counter(toc-h3counter) " "; + counter-increment: toc-h3counter; + content: counter(toc-h2counter) "." counter(toc-h3counter) " "; } .toc-h4 > .nav-link::before { - counter-increment: toc-h4counter; - content: counter(toc-h2counter) "." counter(toc-h3counter) "." counter(toc-h4counter) " "; + counter-increment: toc-h4counter; + content: counter(toc-h2counter) "." counter(toc-h3counter) "." + counter(toc-h4counter) " "; } .toc-h5 > .nav-link::before { - counter-increment: toc-h5counter; - content: counter(toc-h2counter) "." counter(toc-h3counter) "." counter(toc-h4counter) "." counter(toc-h5counter) " "; + counter-increment: toc-h5counter; + content: counter(toc-h2counter) "." counter(toc-h3counter) "." + counter(toc-h4counter) "." counter(toc-h5counter) " "; } .toc-h6 > .nav-link::before { - counter-increment: toc-h6counter; - content: counter(toc-h2counter) "." counter(toc-h3counter) "." counter(toc-h4counter) "." counter(toc-h5counter) "." counter(toc-h6counter) " "; + counter-increment: toc-h6counter; + content: counter(toc-h2counter) "." counter(toc-h3counter) "." + counter(toc-h4counter) "." counter(toc-h5counter) "." counter(toc-h6counter) + " "; } /* Toctree counters */ .toctree-l2 { - counter-reset: toctree-l3counter; + counter-reset: toctree-l3counter; } .toctree-l3 { - counter-reset: toctree-l4counter; + counter-reset: toctree-l4counter; } .toctree-l4 { - counter-reset: toctree-l5counter; + counter-reset: toctree-l5counter; } .bd-sidebar .toctree-l2 > a::before { - counter-increment: toctree-l2counter; - content: counter(toctree-l2counter) ". "; + counter-increment: toctree-l2counter; + content: counter(toctree-l2counter) ". "; } .bd-sidebar .toctree-l3 > a::before { - counter-increment: toctree-l3counter; - content: counter(toctree-l2counter) "." counter(toctree-l3counter) " "; + counter-increment: toctree-l3counter; + content: counter(toctree-l2counter) "." counter(toctree-l3counter) " "; } .bd-sidebar .toctree-l4 > a::before { - counter-increment: toctree-l4counter; - content: counter(toctree-l2counter) "." counter(toctree-l3counter) "." counter(toctree-l4counter) " "; + counter-increment: toctree-l4counter; + content: counter(toctree-l2counter) "." counter(toctree-l3counter) "." + counter(toctree-l4counter) " "; } .bd-sidebar .toctree-l5 > a::before { - counter-increment: toctree-l5counter; - content: counter(toctree-l2counter) "." counter(toctree-l3counter) "." counter(toctree-l4counter) "." counter(toctree-l5counter) " "; -} \ No newline at end of file + counter-increment: toctree-l5counter; + content: counter(toctree-l2counter) "." counter(toctree-l3counter) "." + counter(toctree-l4counter) "." counter(toctree-l5counter) " "; +} diff --git a/source/_templates/Fleft.html b/source/_templates/Fleft.html new file mode 100644 index 0000000..629b401 --- /dev/null +++ b/source/_templates/Fleft.html @@ -0,0 +1,23 @@ + +
\ No newline at end of file diff --git a/source/_templates/Footer.html b/source/_templates/Footer.html new file mode 100644 index 0000000..87906c6 --- /dev/null +++ b/source/_templates/Footer.html @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/source/_templates/Fright.html b/source/_templates/Fright.html new file mode 100644 index 0000000..7ebe6a4 --- /dev/null +++ b/source/_templates/Fright.html @@ -0,0 +1,22 @@ + + \ No newline at end of file diff --git a/source/conf.py b/source/conf.py index 63fe653..e133019 100644 --- a/source/conf.py +++ b/source/conf.py @@ -11,7 +11,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'K210 CanMV' -copyright = '2022 Canaan Inc' +copyright = '2024 Canaan Inc' author = 'Canaan' # release = '0.1' @@ -65,7 +65,6 @@ # if want to add top nav for canann, enable this. # html_css_files = ['topbar.css'] html_css_files = ['topbar.css', 'custom-theme.css'] - html_theme_options = { "repository_url": "https://github.com/kendryte/canmv_docs", 'collapse_navigation': True, @@ -73,4 +72,8 @@ "show_navbar_depth": 2, "use_repository_button": True, "primary_sidebar_end": ["versionsFlex.html"], + "footer_start": ["Fleft.html"], + "footer_center": ["Footer.html"], + "footer_end" : ["Fright.html"], + "content_footer_items": '', }