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/** 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..bd66107 --- /dev/null +++ b/docs/source/_static/topbar.css @@ -0,0 +1,177 @@ +/* Customize for top bar (testing and outdated docs)*/ + +:target { + scroll-margin-top: 50px; +} + +.wy-nav-side +{ + min-height: calc(100% - 50px); + top: 50px; +} + +.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; + text-wrap: wrap !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..a1dde12 --- /dev/null +++ b/docs/source/_templates/layout.html @@ -0,0 +1,70 @@ +{% 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 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 { 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() +