Skip to content

Commit

Permalink
[Docs] add switch-language (open-mmlab#25)
Browse files Browse the repository at this point in the history
* add switch-language

* Update shared menu

* Modify logo

* Modify image

* Modify image

* Modify css

* transparent logo
  • Loading branch information
SingleZombie authored Dec 30, 2021
1 parent b55bf8e commit db00e84
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 154 deletions.
4 changes: 2 additions & 2 deletions docs/en/_static/css/readthedocs.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.header-logo {
background-image: url("../image/mmdeploy-logo.png");
background-size: 120px 60px;
background-size: 150px 60px;
height: 60px;
width: 120px;
width: 150px;
}
Binary file modified docs/en/_static/image/mmdeploy-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 5 additions & 74 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,80 +104,11 @@
html_theme_options = {
# TODO: Add log_url
# 'logo_url': 'https://mmocr.readthedocs.io/en/latest/',
'menu': [
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmdeploy'
},
{
'name':
'Projects',
'children': [
{
'name': 'MMAction2',
'url': 'https://github.com/open-mmlab/mmaction2',
},
{
'name': 'MMClassification',
'url': 'https://github.com/open-mmlab/mmclassification',
},
{
'name': 'MMDetection',
'url': 'https://github.com/open-mmlab/mmdetection',
},
{
'name': 'MMDetection3D',
'url': 'https://github.com/open-mmlab/mmdetection3d',
},
{
'name': 'MMEditing',
'url': 'https://github.com/open-mmlab/mmediting',
},
{
'name': 'MMGeneration',
'url': 'https://github.com/open-mmlab/mmgeneration',
},
{
'name': 'MMOCR',
'url': 'https://github.com/open-mmlab/mmocr',
},
{
'name': 'MMPose',
'url': 'https://github.com/open-mmlab/mmpose',
},
{
'name': 'MMSegmentation',
'url': 'https://github.com/open-mmlab/mmsegmentation',
},
{
'name': 'MMTracking',
'url': 'https://github.com/open-mmlab/mmtracking',
},
]
},
{
'name':
'OpenMMLab',
'children': [
{
'name': 'Homepage',
'url': 'https://openmmlab.com/'
},
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/'
},
{
'name': 'Twitter',
'url': 'https://twitter.com/OpenMMLab'
},
{
'name': 'Zhihu',
'url': 'https://zhihu.com/people/openmmlab'
},
]
},
]
'menu': [{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmdeploy'
}],
'menu_lang': 'en'
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
5 changes: 5 additions & 0 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ You can switch between Chinese and English documents in the lower-left corner of

faq.md

.. toctree::
:caption: Switch Language

switch_language.md

.. toctree::
:maxdepth: 1
:caption: API Reference
Expand Down
3 changes: 3 additions & 0 deletions docs/en/switch_language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## <a href='https://mmdeploy.readthedocs.io/en/latest/'>English</a>

## <a href='https://mmdeploy.readthedocs.io/zh_CN/latest/'>简体中文</a>
4 changes: 2 additions & 2 deletions docs/zh_cn/_static/css/readthedocs.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.header-logo {
background-image: url("../image/mmdeploy-logo.png");
background-size: 120px 60px;
background-size: 150px 60px;
height: 60px;
width: 120px;
width: 150px;
}
Binary file modified docs/zh_cn/_static/image/mmdeploy-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 6 additions & 76 deletions docs/zh_cn/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,82 +102,12 @@
# documentation.
#
html_theme_options = {
'logo_url':
'https://mmdeploy.readthedocs.io/en/latest/',
'menu': [
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmdeploy'
},
{
'name':
'算法库',
'children': [
{
'name': 'MMAction2',
'url': 'https://github.com/open-mmlab/mmaction2',
},
{
'name': 'MMClassification',
'url': 'https://github.com/open-mmlab/mmclassification',
},
{
'name': 'MMDetection',
'url': 'https://github.com/open-mmlab/mmdetection',
},
{
'name': 'MMDetection3D',
'url': 'https://github.com/open-mmlab/mmdetection3d',
},
{
'name': 'MMEditing',
'url': 'https://github.com/open-mmlab/mmediting',
},
{
'name': 'MMGeneration',
'url': 'https://github.com/open-mmlab/mmgeneration',
},
{
'name': 'MMOCR',
'url': 'https://github.com/open-mmlab/mmocr',
},
{
'name': 'MMPose',
'url': 'https://github.com/open-mmlab/mmpose',
},
{
'name': 'MMSegmentation',
'url': 'https://github.com/open-mmlab/mmsegmentation',
},
{
'name': 'MMTracking',
'url': 'https://github.com/open-mmlab/mmtracking',
},
]
},
{
'name':
'OpenMMLab',
'children': [
{
'name': '官网',
'url': 'https://openmmlab.com/'
},
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/'
},
{
'name': '推特',
'url': 'https://twitter.com/OpenMMLab'
},
{
'name': '知乎',
'url': 'https://zhihu.com/people/openmmlab'
},
]
},
]
'logo_url': 'https://mmdeploy.readthedocs.io/en/latest/',
'menu': [{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmdeploy'
}],
'menu_lang': 'cn',
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
5 changes: 5 additions & 0 deletions docs/zh_cn/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@

faq.md

.. toctree::
:caption: 语言切换

switch_language.md

.. toctree::
:maxdepth: 1
:caption: API 文档
Expand Down
3 changes: 3 additions & 0 deletions docs/zh_cn/switch_language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## <a href='https://mmdeploy.readthedocs.io/en/latest/'>English</a>

## <a href='https://mmdeploy.readthedocs.io/zh_CN/latest/'>简体中文</a>

0 comments on commit db00e84

Please sign in to comment.