Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
ab04bb6f
Commit
ab04bb6f
authored
Oct 26, 2017
by
Tobias Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for subsections
parent
cc9e98ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
docs.css
content/css/docs.css
+5
-1
nav.rb
lib/helpers/nav.rb
+7
-3
docs.js
static/docs.js
+1
-1
No files found.
content/css/docs.css
View file @
ab04bb6f
...
...
@@ -281,7 +281,7 @@ footer {
text-decoration
:
none
;
}
.side-nav
ul
.active
li
.active
{
.side-nav
li
.current
{
border-left
:
3px
solid
#e6522c
;
margin-left
:
-2px
;
font-weight
:
bold
;
...
...
@@ -291,6 +291,10 @@ footer {
border-left
:
1px
solid
#e9eff2
;
}
.side-nav
li
li
li
a
{
padding
:
5px
15px
5px
40px
;
}
.doc-content
{
font-size
:
16px
;
}
...
...
lib/helpers/nav.rb
View file @
ab04bb6f
...
...
@@ -12,14 +12,18 @@ def nav(root_item, buffer='', layer=0)
end
if
nav_active?
(
root_item
)
buffer
<<
"<li class=
\"
active
\"
>"
buffer
<<
"<li class=
\"
active
#{
"current"
unless
children
.
any?
}
\"
>"
else
buffer
<<
"<li>"
end
title
=
nav_title_of
(
root_item
)
if
layer
==
0
buffer
<<
"<span class=
\"
nav-header
\"
><i class=
\"
fa fa-
#{
root_item
[
:nav_icon
]
}
\"
></i> <span>
#{
title
}
</span></span>"
if
children
.
any?
if
layer
==
0
buffer
<<
"<span class=
\"
nav-header
\"
><i class=
\"
fa fa-
#{
root_item
[
:nav_icon
]
}
\"
></i> <span>
#{
title
}
</span></span>"
else
buffer
<<
"<span class=
\"
nav-subheader
\"
>
#{
title
}
</span>"
end
else
buffer
<<
link_to
(
title
,
root_item
.
path
)
end
...
...
static/docs.js
View file @
ab04bb6f
...
...
@@ -15,7 +15,7 @@ $(document).ready(function() {
}
};
$
(
'
.nav-header span
'
).
each
(
function
()
{
$
(
'
.nav-header span
,.nav-subheader
'
).
each
(
function
()
{
var
link
=
$
(
'
<a href="#">
'
).
text
(
$
(
this
).
text
()).
click
(
navToggle
);
$
(
this
).
replaceWith
(
link
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment