Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
website
提交
d6925c26
W
website
项目概览
openeuler
/
website
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
website
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d6925c26
编写于
9月 12, 2019
作者:
E
edisonxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs navigate correctly
上级
7aef7778
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
87 addition
and
8 deletion
+87
-8
themes/project/layouts/partials/docs/menu.html
themes/project/layouts/partials/docs/menu.html
+1
-1
themes/project/layouts/partials/docs/search.html
themes/project/layouts/partials/docs/search.html
+1
-1
themes/project/layouts/partials/scripts.html
themes/project/layouts/partials/scripts.html
+61
-2
themes/project/static/css/custom.css
themes/project/static/css/custom.css
+24
-4
未找到文件。
themes/project/layouts/partials/docs/menu.html
浏览文件 @
d6925c26
<nav>
<!-- {{ partial "docs/search" . }} -->
{{ partial "docs/search" . }}
{{ partial "docs/inject/menu-before" . }}
{{ if .Site.Params.BookMenuBundle }}
...
...
themes/project/layouts/partials/docs/search.html
浏览文件 @
d6925c26
{{ if default true .Site.Params.BookSearch }}
<div
class=
"book-search"
>
<div
class=
"book-search"
style=
"display: none;"
>
<input
type=
"text"
placeholder=
"Search"
id=
"book-search-input"
maxlength=
"64"
readonly
/>
<div
class=
"book-search-spinner spinner hidden"
></div>
<ul
id=
"book-search-results"
></ul>
...
...
themes/project/layouts/partials/scripts.html
浏览文件 @
d6925c26
...
...
@@ -22,12 +22,71 @@
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
function
getRelativePath
()
{
var
url
=
location
.
href
;
var
arrURL
=
url
.
split
(
"
//
"
);
return
arrURL
[
1
].
substring
(
arrURL
[
1
].
indexOf
(
"
/
"
));
}
function
getCurrentID
(
wholeData
,
relativeURL
)
{
for
(
var
j
in
wholeData
)
{
var
href
=
wholeData
[
j
].
a_attr
.
href
;
var
text
=
wholeData
[
j
].
text
;
//debugger;
if
((
href
==
relativeURL
)
||
(
text
.
indexOf
(
relativeURL
)
>=
0
))
{
//console.log(wholeData[j].id);
return
wholeData
[
j
].
id
;
}
else
{
if
(
wholeData
[
j
].
children
.
length
>
0
)
{
var
v
=
getCurrentID
(
wholeData
[
j
].
children
,
relativeURL
);
if
(
v
!=
""
)
{
return
v
;
}
}
}
}
return
""
;
}
if
(
$
(
'
#docstreeview
'
).
length
)
{
$
(
'
#docstreeview
'
).
jstree
();
$
(
'
#docstreeview
'
).
jstree
().
hide_dots
();
$
(
'
#docstreeview
'
).
jstree
().
hide_icons
();
$
(
'
#docstreeview
'
).
on
(
"
changed.jstree
"
,
function
(
e
,
data
)
{
location
.
href
=
data
.
node
.
a_attr
.
href
;
if
(
data
.
node
)
{
var
link
=
data
.
node
.
a_attr
.
href
;
if
(
link
==
""
||
link
==
"
#
"
)
{
var
aElementID
=
"
#
"
+
data
.
node
.
id
+
"
_anchor
"
;
var
aElement
=
$
(
aElementID
).
find
(
"
a
"
);
if
(
aElement
.
length
)
{
link
=
aElement
.
attr
(
"
href
"
);
}
}
console
.
log
(
link
);
var
relativeURL
=
getRelativePath
();
console
.
log
(
relativeURL
);
if
(
link
!=
relativeURL
)
{
location
.
href
=
link
;
}
}
});
/* select the node by the relative url
var currentAElement = $('#docstreeview').find("a[href='" + getRelativePath() + "']");
if (currentAElement.length) {
console.log("click");
currentAElement.trigger("click");
}*/
$
(
"
#docstreeview
"
).
on
(
"
ready.jstree
"
,
function
(
e
,
data
)
{
$
(
"
#docstreeview
"
).
fadeIn
(
"
slow
"
)
var
relativeURL
=
getRelativePath
();
var
wholeData
=
$
(
"
#docstreeview
"
).
jstree
().
get_json
();
var
currentID
=
getCurrentID
(
wholeData
,
relativeURL
);
console
.
log
(
currentID
);
$
(
"
#docstreeview
"
).
jstree
().
_open_to
(
currentID
);
$
(
'
#docstreeview
'
).
jstree
().
select_node
(
currentID
);
});
}
function
showNav
()
{
...
...
@@ -41,7 +100,7 @@
}).
attr
(
"
onoff
"
,
"
off
"
);
}
$
(
"
#slideNav
"
).
bind
(
'
click
'
,
function
()
{
$
(
"
#slideNav
"
).
bind
(
'
click
'
,
function
()
{
if
(
$
(
'
#menu
'
).
attr
(
"
onoff
"
)
==
"
on
"
)
{
hideNav
();
}
else
{
...
...
themes/project/static/css/custom.css
浏览文件 @
d6925c26
...
...
@@ -449,8 +449,26 @@ footer .notice span {
margin-bottom
:
148px
;
}
.jstree-default
.jstree-anchor
{
height
:
35px
!important
;
.book-menu
.jstree-default
.jstree-anchor
{
height
:
36px
;
text-decoration
:
none
;
color
:
inherit
;
padding
:
6px
0px
;
}
.book-menu
.jstree-default
.jstree-anchor
a
{
text-decoration
:
none
;
color
:
inherit
;
}
.book-menu
.jstree-default
.jstree-anchor.jstree-hovered
,
.book-menu
.jstree-default
.jstree-anchor.jstree-clicked
{
color
:
#ffffff
;
background-color
:
#467fbf
;
}
.book-menu
.jstree-default
.jstree-icon.jstree-ocl
{
margin-top
:
6px
;
}
.table-bordered.table-striped
td
{
...
...
@@ -469,8 +487,6 @@ footer .notice span {
line-height
:
25px
;
}
.divmail
ul
li
a
{
margin-left
:
10px
;
}
...
...
@@ -491,6 +507,10 @@ footer .notice span {
text-decoration
:
none
!important
;
}
#docstreeview
{
display
:
none
;
}
/*html {
min-width: 1280px;
max-width: 1920px;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录