Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

[doc] Updated github button & removed announcement (#1292)

Jian Shi31ce136221ed
diff --git a/docs/source/_static/js/custom.js b/docs/source/_static/js/custom.js
index df5ae48a3..c714701d7 100644
--- a/docs/source/_static/js/custom.js
+++ b/docs/source/_static/js/custom.js
@@ -1,9 +1,10 @@
// Based on https://github.com/huggingface/transformers/blob/master/docs/source/_static/js/custom.js
+// TODO (Jian): probably update this by the latest https://buttons.github.io/, which added dark and light mode to align furo theme.
function addGithubButton() {
const div = `
- <div class="github-repo">
+ <div class="github-repo" style="margin: auto">
<a
class="github-button"
href="https://github.com/kornia/kornia" data-size="large" data-show-count="true" aria-label="Star kornia/kornia on GitHub">
@@ -11,7 +12,7 @@ function addGithubButton() {
</a>
</div>
`;
- document.querySelector(".wy-side-nav-search .icon-home").insertAdjacentHTML('afterend', div);
+ document.querySelector(".sidebar-brand").insertAdjacentHTML('afterend', div);
}
/*!
diff --git a/docs/source/community/chinese.rst b/docs/source/community/chinese.rst
new file mode 100644
index 000000000..e5640a1a4
--- /dev/null
+++ b/docs/source/community/chinese.rst
@@ -0,0 +1,8 @@
+Kornia 社区
+===============
+
+欢迎加入 Kornia 社区!扫描下方的二维码可关注 Kornia 团队的 `官方交流 QQ 群 <https://jq.qq.com/?_wv=1027&k=y8iqu7Do>`_.
+
+.. image:: https://github.com/kornia/kornia/raw/master/docs/source/_static/img/cn_community_qq.jpg
+ :width: 300
+ :alt: QQ group
diff --git a/docs/source/conf.py b/docs/source/conf.py
index f6b88fb48..b9f1c0f59 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -110,19 +110,22 @@ html_theme = 'furo'
# TODO(jian): make to work with https://docs.kornia.org
html_baseurl = 'https://kornia.readthedocs.io'
+# Changing sidebar title to Kornia
+html_title = "Kornia"
+
html_theme_options = {
'light_logo': 'img/kornia_logo_only_light.svg',
'dark_logo': 'img/kornia_logo_only_dark.svg',
"sidebar_hide_name": True,
"navigation_with_keys": True,
'display_version': False,
- "announcement": """
- <a style=\"text-decoration: none; color: white;\"
- href=\"https://github.com/kornia/kornia\">
- <img src=\"https://github.com/kornia/data/raw/main/GitHub-Mark-Light-32px.png\" width=20 height=20/>
- Star Kornia on GitHub
- </a>
- """,
+ # "announcement": """
+ # <a style=\"text-decoration: none; color: white;\"
+ # href=\"https://github.com/kornia/kornia\">
+ # <img src=\"https://github.com/kornia/data/raw/main/GitHub-Mark-Light-32px.png\" width=20 height=20/>
+ # Star Kornia on GitHub
+ # </a>
+ # """,
}
# html_logo = '_static/img/kornia_logo.svg'
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 4f158690d..c6db29c2f 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -82,6 +82,7 @@ Join the community
Slack community <https://join.slack.com/t/kornia/shared_invite/zt-csobk21g-CnydWe5fmvkcktIeRFGCEQ>
LibreCV community <https://librecv.org>
Twitter @kornia_foss <https://twitter.com/kornia_foss>
+ community/chinese
Kornia Youtube <https://www.youtube.com/channel/UCI1SE1Ij2Fast5BSKxoa7Ag>
Kornia LinkedIn <https://www.linkedin.com/company/kornia/>
Kornia AI <https://kornia.org>