Skip to content

Commit de28699

Browse files
committed
update docs/zh
1 parent 85874a7 commit de28699

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

docs/zh/_static/css/custom.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* docs/zh/_static/css/custom.css */
2+
3+
.wy-nav-content {
4+
max-width: none; /* 取消内容区域最大宽度限制 */
5+
}
6+
7+
.wy-nav-content-wrap {
8+
background: #fcfcfc; /* 设置内容区域背景颜色 */
9+
}
10+
11+
/* 版本选择器样式 */
12+
.smv-current-version {
13+
background-color: #f5f5f5;
14+
padding: 10px;
15+
margin-bottom: 10px;
16+
border: 1px solid #ddd;
17+
border-radius: 4px;
18+
}
19+
20+
.smv-current-version a {
21+
color: #333;
22+
}
23+
24+
.smv-other-versions {
25+
margin-top: 10px;
26+
}
27+
28+
.smv-other-versions ul {
29+
list-style-type: none;
30+
padding: 0;
31+
}
32+
33+
.smv-other-versions li {
34+
margin-bottom: 5px;
35+
}
36+
37+
.smv-other-versions a {
38+
color: #2980b9;
39+
}

docs/zh/conf.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,31 @@
2323

2424
html_logo = '../images/TuyaOpen.png'
2525

26+
def setup(app):
27+
app.add_css_file('css/custom.css')
28+
2629
# -- Options for HTML output -------------------------------------------------
2730
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
2831

2932
html_theme = 'sphinx_rtd_theme'
33+
34+
html_theme_options = {
35+
'display_version': True,
36+
'prev_next_buttons_location': 'both',
37+
'style_external_links': False,
38+
'sticky_navigation': True,
39+
'navigation_depth': 4,
40+
'includehidden': True,
41+
'titles_only': False,
42+
'collapse_navigation': False,
43+
'logo_only': True,
44+
'body_max_width': None, # 取消页面宽度限制
45+
'sidebarwidth': '25%', # 调整侧边栏宽度
46+
}
47+
48+
html_js_files = [
49+
'js/custom.js', # 如果有自定义 JavaScript 文件
50+
'js/include_html.js' # 如果需要引入其他 JavaScript 文件
51+
]
52+
3053
html_static_path = ['_static']

0 commit comments

Comments
 (0)