Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
cd3f4da2
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cd3f4da2
编写于
9月 15, 2021
作者:
G
Guillaume Gomez
2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add rustdoc version into the help popup
上级
e0c38af2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
39 addition
and
13 deletion
+39
-13
src/librustdoc/html/render/write_shared.rs
src/librustdoc/html/render/write_shared.rs
+12
-4
src/librustdoc/html/static/css/rustdoc.css
src/librustdoc/html/static/css/rustdoc.css
+12
-3
src/librustdoc/html/static/css/themes/ayu.css
src/librustdoc/html/static/css/themes/ayu.css
+2
-2
src/librustdoc/html/static/css/themes/dark.css
src/librustdoc/html/static/css/themes/dark.css
+2
-2
src/librustdoc/html/static/css/themes/light.css
src/librustdoc/html/static/css/themes/light.css
+2
-2
src/librustdoc/html/static/js/main.js
src/librustdoc/html/static/js/main.js
+9
-0
未找到文件。
src/librustdoc/html/render/write_shared.rs
浏览文件 @
cd3f4da2
...
...
@@ -268,10 +268,18 @@ fn add_background_image_to_css(
// Maybe we can change the representation to move this out of main.js?
write_minify
(
"main.js"
,
static_files
::
MAIN_JS
.replace
(
"/* INSERT THEMES HERE */"
,
&
format!
(
" = {}"
,
serde_json
::
to_string
(
&
themes
)
.unwrap
()),
),
static_files
::
MAIN_JS
.replace
(
"/* INSERT THEMES HERE */"
,
&
format!
(
" = {}"
,
serde_json
::
to_string
(
&
themes
)
.unwrap
()),
)
.replace
(
"/* INSERT RUSTDOC_VERSION HERE */"
,
&
format!
(
"rustdoc {}"
,
rustc_interface
::
util
::
version_str
()
.unwrap_or
(
"unknown version"
)
),
),
cx
,
options
,
)
?
;
...
...
src/librustdoc/html/static/css/rustdoc.css
浏览文件 @
cd3f4da2
...
...
@@ -928,15 +928,24 @@ body.blur > :not(#help) {
display
:
block
;
margin-right
:
0.5rem
;
}
#help
>
div
>
span
{
#help
span
.top
,
#help
span
.bottom
{
text-align
:
center
;
display
:
block
;
margin
:
10px
0
;
font-size
:
18px
;
border-bottom
:
1px
solid
#ccc
;
}
#help
span
.top
{
text-align
:
center
;
display
:
block
;
margin
:
10px
0
;
border-bottom
:
1px
solid
;
padding-bottom
:
4px
;
margin-bottom
:
6px
;
}
#help
span
.bottom
{
clear
:
both
;
border-top
:
1px
solid
;
}
#help
dd
{
margin
:
5px
35px
;
}
#help
.infos
{
padding-left
:
0
;
}
#help
h1
,
#help
h2
{
margin-top
:
0
;
}
...
...
src/librustdoc/html/static/css/themes/ayu.css
浏览文件 @
cd3f4da2
...
...
@@ -286,8 +286,8 @@ details.undocumented > summary::before {
border-radius
:
4px
;
}
#help
>
div
>
span
{
border-
bottom-
color
:
#5c6773
;
#help
span
.bottom
,
#help
span
.top
{
border-color
:
#5c6773
;
}
.since
{
...
...
src/librustdoc/html/static/css/themes/dark.css
浏览文件 @
cd3f4da2
...
...
@@ -242,8 +242,8 @@ details.undocumented > summary::before {
border-color
:
#bfbfbf
;
}
#help
>
div
>
span
{
border-
bottom-
color
:
#bfbfbf
;
#help
span
.bottom
,
#help
span
.top
{
border-color
:
#bfbfbf
;
}
#help
dt
{
...
...
src/librustdoc/html/static/css/themes/light.css
浏览文件 @
cd3f4da2
...
...
@@ -232,8 +232,8 @@ details.undocumented > summary::before {
border-color
:
#bfbfbf
;
}
#help
>
div
>
span
{
border-
bottom-
color
:
#bfbfbf
;
#help
span
.bottom
,
#help
span
.top
{
border-color
:
#bfbfbf
;
}
.since
{
...
...
src/librustdoc/html/static/js/main.js
浏览文件 @
cd3f4da2
...
...
@@ -911,6 +911,7 @@ function hideThemeButtonState() {
});
var
book_info
=
document
.
createElement
(
"
span
"
);
book_info
.
className
=
"
top
"
;
book_info
.
innerHTML
=
"
You can find more information in
\
<a href=
\"
https://doc.rust-lang.org/rustdoc/
\"
>the rustdoc book</a>.
"
;
...
...
@@ -961,6 +962,14 @@ function hideThemeButtonState() {
container
.
appendChild
(
div_shortcuts
);
container
.
appendChild
(
div_infos
);
var
rustdoc_version
=
document
.
createElement
(
"
span
"
);
rustdoc_version
.
className
=
"
bottom
"
;
var
rustdoc_version_code
=
document
.
createElement
(
"
code
"
);
rustdoc_version_code
.
innerText
=
"
/* INSERT RUSTDOC_VERSION HERE */
"
;
rustdoc_version
.
appendChild
(
rustdoc_version_code
);
container
.
appendChild
(
rustdoc_version
);
popup
.
appendChild
(
container
);
insertAfter
(
popup
,
searchState
.
outputElement
());
// So that it's only built once and then it'll do nothing when called!
...
...
yitter
@yitter
mentioned in commit
3bbb328e
·
9月 29, 2022
mentioned in commit
3bbb328e
mentioned in commit 3bbb328e68fd38b7d5307d7df05aec1b78cee9d9
开关提交列表
yitter
@yitter
mentioned in commit
5971b1a9
·
9月 29, 2022
mentioned in commit
5971b1a9
mentioned in commit 5971b1a92123a6e643649d971c8a48a3c7c88e7a
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录