Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Community Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bio-IT
Community Documentation
Commits
0a8138a6
Commit
0a8138a6
authored
5 years ago
by
Silvio Giebl
Browse files
Options
Downloads
Patches
Plain Diff
Improved navigation
(cherry picked from commit 6684f7c7faa15d6d59df35fbff9ea6666634d754)
parent
ec420a38
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_includes/nav.html
+9
-9
9 additions, 9 deletions
_includes/nav.html
_sass/navigation.scss
+9
-8
9 additions, 8 deletions
_sass/navigation.scss
with
18 additions
and
17 deletions
_includes/nav.html
+
9
−
9
View file @
0a8138a6
<ul
class=
"nav
igation
-list"
>
<ul
class=
"nav-list"
>
{%- assign pages_list = site.html_pages | sort:"nav_order" -%}
{%- for node in pages_list -%}
{%- unless node.nav_exclude -%}
{%- if node.parent == nil -%}
<li
class=
"nav
igation
-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}"
>
<li
class=
"nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}"
>
{%- if page.parent == node.title or page.grand_parent == node.title -%}
{%- assign first_level_url = node.url | absolute_url -%}
{%- endif -%}
<a
href=
"{{ node.url | absolute_url }}"
class=
"nav
igation
-list-link{% if page.url == node.url %} active{% endif %}"
>
{{ node.title }}
</a>
<a
href=
"{{ node.url | absolute_url }}"
class=
"nav-list-link{% if page.url == node.url %} active{% endif %}"
>
{{ node.title }}
</a>
{%- if node.has_children -%}
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
<ul
class=
"nav
igation
-list-child-list "
>
<ul
class=
"nav-list-child-list "
>
{%- for child in children_list -%}
<li
class=
"nav
igation
-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"
>
<li
class=
"nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"
>
{%- if page.url == child.url or page.parent == child.title -%}
{%- assign second_level_url = child.url | absolute_url -%}
{%- endif -%}
<a
href=
"{{ child.url | absolute_url }}"
class=
"nav
igation
-list-link{% if page.url == child.url %} active{% endif %}"
>
{{ child.title }}
</a>
<a
href=
"{{ child.url | absolute_url }}"
class=
"nav-list-link{% if page.url == child.url %} active{% endif %}"
>
{{ child.title }}
</a>
{%- if child.has_children -%}
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
<ul
class=
"nav
igation
-list-child-list"
>
<ul
class=
"nav-list-child-list"
>
{%- for grand_child in grand_children_list -%}
<li
class=
"nav
igation
-list-item {% if page.url == grand_child.url %} active{% endif %}"
>
<a
href=
"{{ grand_child.url | absolute_url }}"
class=
"nav
igation
-list-link{% if page.url == grand_child.url %} active{% endif %}"
>
{{ grand_child.title }}
</a>
<li
class=
"nav-list-item {% if page.url == grand_child.url %} active{% endif %}"
>
<a
href=
"{{ grand_child.url | absolute_url }}"
class=
"nav-list-link{% if page.url == grand_child.url %} active{% endif %}"
>
{{ grand_child.title }}
</a>
</li>
{%- endfor -%}
</ul>
...
...
This diff is collapsed.
Click to expand it.
_sass/navigation.scss
+
9
−
8
View file @
0a8138a6
//
// Main nav, breadcrumb, etc...
//
.navigation-list
{
.nav-list
{
padding
:
0
;
margin-top
:
0
;
margin-bottom
:
0
;
list-style
:
none
;
}
.nav
igation
-list-child-list
{
.nav-list-child-list
{
padding-left
:
$sp-3
;
list-style
:
none
;
.nav
igation
-list-link
{
.nav-list-link
{
color
:
$nav-child-link-color
;
}
.nav
igation
-list-item
{
.nav-list-item
{
position
:
relative
;
&
::before
{
...
...
@@ -35,7 +36,7 @@
}
}
.nav
igation
-list-item
{
.nav-list-item
{
@include
fs-4
;
margin
:
0
;
...
...
@@ -43,18 +44,18 @@
@include
fs-3
;
}
.nav
igation
-list-child-list
{
.nav-list-child-list
{
display
:
none
;
}
&
.active
{
.nav
igation
-list-child-list
{
.nav-list-child-list
{
display
:
block
;
}
}
}
.nav
igation
-list-link
{
.nav-list-link
{
display
:
block
;
padding-top
:
$sp-1
;
padding-bottom
:
$sp-1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment