From fc82dc36558ea92af71360d3fa0185a14c3c4775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Thu, 12 Oct 2023 09:57:14 +0800 Subject: [PATCH 1/8] add topbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- docs/requirements.txt | 32 ++++ docs/source/_static/img/ch-flag.a61145a4.svg | 9 + docs/source/_static/img/logo.2f7049e2.svg | 6 + docs/source/_static/topbar.css | 171 +++++++++++++++++++ docs/source/_templates/layout.html | 49 ++++++ docs/source/_templates/versions.html | 33 ---- docs/source/conf.py | 2 +- 7 files changed, 268 insertions(+), 34 deletions(-) create mode 100644 docs/requirements.txt create mode 100644 docs/source/_static/img/ch-flag.a61145a4.svg create mode 100644 docs/source/_static/img/logo.2f7049e2.svg create mode 100644 docs/source/_static/topbar.css create mode 100644 docs/source/_templates/layout.html delete mode 100644 docs/source/_templates/versions.html diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..25e29e6 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,32 @@ +alabaster==0.7.13 +Babel==2.12.1 +certifi==2023.7.22 +charset-normalizer==3.2.0 +docutils==0.18.1 +idna==3.4 +imagesize==1.4.1 +importlib-metadata==6.8.0 +Jinja2==3.1.2 +markdown-it-py==2.2.0 +MarkupSafe==2.1.3 +mdit-py-plugins==0.3.5 +mdurl==0.1.2 +myst-parser==1.0.0 +packaging==23.1 +Pygments==2.16.1 +PyYAML==6.0.1 +requests==2.31.0 +snowballstemmer==2.2.0 +sphinx==5.3.0 +sphinx-copybutton==0.5.2 +sphinx-multiversion==0.2.4 +sphinx-rtd-theme==1.3.0 +sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-jquery==4.1 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-serializinghtml==1.1.9 +urllib3==2.0.5 +zipp==3.17.0 diff --git a/docs/source/_static/img/ch-flag.a61145a4.svg b/docs/source/_static/img/ch-flag.a61145a4.svg new file mode 100644 index 0000000..9f340c6 --- /dev/null +++ b/docs/source/_static/img/ch-flag.a61145a4.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/source/_static/img/logo.2f7049e2.svg b/docs/source/_static/img/logo.2f7049e2.svg new file mode 100644 index 0000000..6a6e0f5 --- /dev/null +++ b/docs/source/_static/img/logo.2f7049e2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/source/_static/topbar.css b/docs/source/_static/topbar.css new file mode 100644 index 0000000..b0fe39c --- /dev/null +++ b/docs/source/_static/topbar.css @@ -0,0 +1,171 @@ +/* Customize for top bar (testing and outdated docs)*/ + +.wy-nav-side +{ + margin-top: 50px !important; +} + +.wy-nav-content-wrap +{ + margin-top: 50px !important; +} + +/* The navigation bar */ +nav.navbar { + z-index: 3; + overflow: hidden; + background-color: #333; + position: fixed; /* Set the navbar to fixed position */ + top: 0; /* Position the navbar at the top of the page */ + width: 100%; /* Full width */ +} + +/* Links inside the navbar */ +nav.navbar a { + float: left; + display: block; + color: rgba(255,255,255,0.5); + text-align: center; + padding: 14px 16px; + text-decoration: none; + text-wrap: nowrap; +} + +.jn_container-view { + width: 100%; + height: 50px; + background: #0d0d0d; + position: fixed; + left: 0; + top: 0; + z-index: 1501; +} + +.jn_menu-container { + width: 100%; + max-width: 1100px; + height: 50px; + align-items: center; + margin: 0 auto; + display: flex; + position: relative +} + +.jn_menu-container .logo { + width: 157px; + height: 28px; + background: url(img/logo.2f7049e2.svg) no-repeat 100%; + background-size: auto 100%; +} + +.jn_menu-container .menu-list { + display: flex; + height: 100%; + font-size: 16px; + color: rgba(255,255,255,0.4); + margin-left: 78px; + max-width: 506px; +} + +.menu-list .menu-item { + margin-right: 30px; + height: 100%; + cursor: pointer; + display: flex; + align-items: center; +} + +@media (max-width: 768px) { + .logo { + display: none; + } + + .menu-list .menu-item { + margin-right: 0; + } + + .jn_menu-container .menu-list { + margin-left: 0; + justify-content: space-around; + flex-grow: 1; + } + + nav.navbar a { + padding: 3px; + } +} + +.jn_menu-container .menu-item.active a { + color: #fff +} + +.jn_menu-container .menu-item:last-child { + margin-right: 0 +} + +.jn_menu-container .active, +.jn_menu-container .menu-item a:hover { + color: #fff +} + +.jn_menu-container .menu-lang { + position: absolute; + right: 0; + top: 50%; + font-size: 14px; + color: hsla(0, 0%, 100%, .5); + transform: translateY(-50%) +} + +.jn_menu-container .menu-lang .lang-txt { + height: 20px; + padding-right: 28px; + background: url(img/ch-flag.a61145a4.svg) no-repeat 100%; + background-size: auto 70%; + display: block; + cursor: pointer +} + +.menu-doc a { + color: #f2f2f2 !important; +} + +.model-list { + position: absolute; + top: 50px; + background: #0d0d0d; + display: none; + cursor: pointer; + flex-direction: column; +} + +.menu-doc:hover > .model-list { + display: flex; + align-items: center; +} + +.document-select { + padding: 10px !important; + color: #fff; + text-align: start !important; +} + +.document-select:hover { + background-color: #249ee8 !important; +} + +.expanded-menu { + position: relative; +} +.expanded-menu-container { + display: none; + flex-direction: column; + position: absolute; + top: 0; + right: -120px; + width: 120px; + background-color: #0d0d0d; +} +.expanded-menu:hover .expanded-menu-container { + display: flex; +} diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html new file mode 100644 index 0000000..1c96ffd --- /dev/null +++ b/docs/source/_templates/layout.html @@ -0,0 +1,49 @@ +{% extends "sphinx_rtd_theme/layout.html" %} + +{%block extrabody %} + + + +{{ super() }} + +{% endblock extrabody %} diff --git a/docs/source/_templates/versions.html b/docs/source/_templates/versions.html deleted file mode 100644 index 9180fa1..0000000 --- a/docs/source/_templates/versions.html +++ /dev/null @@ -1,33 +0,0 @@ -{%- if current_version %} -
- - Other Versions - v: {{ current_version.name }} - - -
- {%- if versions.tags %} -
-
Tags
- {%- for item in versions.tags %} -
{{ item.name }}
- {%- endfor %} -
- {%- endif %} - {%- if versions.branches %} -
-
Branches
- {%- for item in versions.branches %} -
{{ item.name }}
- {%- endfor %} -
-
-
External links
-
- arduino-k210 -
-
- {%- endif %} -
-
-{%- endif %} diff --git a/docs/source/conf.py b/docs/source/conf.py index e880d49..8f5233c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,7 +48,7 @@ html_static_path = ['_static'] # if want to add top nav for canann, enable this. -# html_css_files = ['topbar.css'] +html_css_files = ['topbar.css'] default_dark_mode = True From c791765e33b7fd0035bf118f71ef41d0fa8f750e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Thu, 12 Oct 2023 10:05:25 +0800 Subject: [PATCH 2/8] update URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- docs/source/_templates/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index 1c96ffd..25aa9a6 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -17,7 +17,7 @@ K210
From 458134f1a39455538b52f4ceadea57fe0fbed26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Fri, 13 Oct 2023 09:12:19 +0800 Subject: [PATCH 3/8] update style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- .../exts/sphinx_rtd_dark_mode/static/dark_mode_css/dark.css | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_css/dark.css b/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_css/dark.css index 29cca1b..6a47f69 100644 --- a/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_css/dark.css +++ b/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_css/dark.css @@ -16,7 +16,6 @@ html[data-theme='dark'] .wy-nav-content-wrap { html[data-theme='dark'] .wy-nav-content { /* background-color: #141414; */ background-color: #393939; - max-width: 900px; } html[data-theme='dark'] .section { From baf4f617dbc3c9e0f37624213977fba49bd0ab84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Fri, 13 Oct 2023 09:12:47 +0800 Subject: [PATCH 4/8] update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- .../static/dark_mode_js/theme_switcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_js/theme_switcher.js b/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_js/theme_switcher.js index a19a358..860bd5d 100644 --- a/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_js/theme_switcher.js +++ b/docs/source/exts/sphinx_rtd_dark_mode/static/dark_mode_js/theme_switcher.js @@ -11,8 +11,8 @@ const createThemeSwitcher = () => { }; $(document).ready(() => { - // createThemeSwitcher(); - // $('#themeSwitcher').click(switchTheme); + createThemeSwitcher(); + $('#themeSwitcher').click(switchTheme); $('footer').html( $('footer').html() + From f6997491bc9f625a45cffb9913a4345a65539581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Thu, 19 Oct 2023 11:02:58 +0800 Subject: [PATCH 5/8] update statistics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- docs/source/_templates/layout.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index 25aa9a6..f96297e 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -4,6 +4,24 @@ + + +
- + From eb2302205e6406341f91367a9d1f9e6f2f21376c Mon Sep 17 00:00:00 2001 From: huangziyi Date: Mon, 27 May 2024 11:33:23 +0800 Subject: [PATCH 8/8] remove CI test Signed-off-by: huangziyi --- .github/workflows/push.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 24e3598..825d840 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -38,21 +38,3 @@ jobs: run: | bash ./tools/on-push.sh - test-arduino-linux: - if: endsWith(github.ref, 'main') - name: Arduino Test on ubuntu-20.04 - runs-on: self-hosted - needs: build-arduino - - steps: - - uses: actions/checkout@v3 - - name: Build testcases - run: | - bash ./tools/tests_build.sh -c -b canaan_k1 -i 0 -m 1 - - name: Run testcases - run: | - bash ./tools/tests_run_simple.sh - - uses: actions/upload-artifact@v3 - with: - name: "arduino-test-report-${{ github.sha }}" - path: ${{ github.workspace }}/tests/report/**