Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Open WIN Community
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
open-science
community
Open WIN Community
Commits
93f93f48
Commit
93f93f48
authored
4 years ago
by
Silvio Giebl
Browse files
Options
Downloads
Patches
Plain Diff
Added doc collections and categories
parent
654da0a6
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
_includes/nav.html
+2
-2
2 additions, 2 deletions
_includes/nav.html
_layouts/default.html
+13
-1
13 additions, 1 deletion
_layouts/default.html
_sass/navigation.scss
+23
-0
23 additions, 0 deletions
_sass/navigation.scss
assets/js/zzzz-search-data.json
+14
-4
14 additions, 4 deletions
assets/js/zzzz-search-data.json
with
52 additions
and
7 deletions
_includes/nav.html
+
2
−
2
View file @
93f93f48
<ul
class=
"nav-list"
>
<ul
class=
"nav-list"
>
{%- assign ordered_pages_list =
site.html_
pages | where_exp:"item", "item.nav_order != nil" -%}
{%- assign ordered_pages_list =
include.
pages | where_exp:"item", "item.nav_order != nil" -%}
{%- assign unordered_pages_list =
site.html_
pages | where_exp:"item", "item.nav_order == nil" -%}
{%- assign unordered_pages_list =
include.
pages | where_exp:"item", "item.nav_order == nil" -%}
{%- if site.nav_sort == 'case_insensitive' -%}
{%- if site.nav_sort == 'case_insensitive' -%}
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
...
...
This diff is collapsed.
Click to expand it.
_layouts/default.html
+
13
−
1
View file @
93f93f48
...
@@ -48,7 +48,19 @@ layout: table_wrappers
...
@@ -48,7 +48,19 @@ layout: table_wrappers
</a>
</a>
</div>
</div>
<nav
role=
"navigation"
aria-label=
"Main"
id=
"site-nav"
class=
"site-nav"
>
<nav
role=
"navigation"
aria-label=
"Main"
id=
"site-nav"
class=
"site-nav"
>
{% include nav.html %}
{% if site.doc_collections %}
{% assign doc_collections_size = site.doc_collections | size %}
{% for doc_collection in site.doc_collections %}
{% assign name = doc_collection.name %}
{% assign collection = site[doc_collection.collection] %}
{% if doc_collections_size > 1 %}
<div
class=
"nav-category"
>
{{ name }}
</div>
{% endif %}
{% include nav.html pages=collection %}
{% endfor %}
{% else %}
{% include nav.html pages=site.html_pages %}
{% endif %}
</nav>
</nav>
<footer
class=
"site-footer"
>
<footer
class=
"site-footer"
>
This site uses
<a
href=
"https://github.com/pmarsceill/just-the-docs"
>
Just the Docs
</a>
, a documentation theme for Jekyll.
This site uses
<a
href=
"https://github.com/pmarsceill/just-the-docs"
>
Just the Docs
</a>
, a documentation theme for Jekyll.
...
...
This diff is collapsed.
Click to expand it.
_sass/navigation.scss
+
23
−
0
View file @
93f93f48
...
@@ -131,6 +131,29 @@
...
@@ -131,6 +131,29 @@
}
}
}
}
.nav-category
{
padding-top
:
$sp-2
;
padding-right
:
$gutter-spacing-sm
;
padding-bottom
:
$sp-2
;
padding-left
:
$gutter-spacing-sm
;
font-weight
:
600
;
text-align
:
end
;
text-transform
:
uppercase
;
border-bottom
:
$border
$border-color
;
@include
fs-2
;
@include
mq
(
md
)
{
padding-right
:
$gutter-spacing
;
padding-left
:
$gutter-spacing
;
margin-top
:
$gutter-spacing-sm
;
text-align
:
start
;
&
:first-child
{
margin-top
:
0
;
}
}
}
// Aux nav
// Aux nav
.aux-nav
{
.aux-nav
{
...
...
This diff is collapsed.
Click to expand it.
assets/js/zzzz-search-data.json
+
14
−
4
View file @
93f93f48
...
@@ -2,8 +2,17 @@
...
@@ -2,8 +2,17 @@
permalink:
/assets/js/search-data.json
permalink:
/assets/js/search-data.json
---
---
{
{
{
%-
assign
i
=
0
-%
}
{
%
assign
i
=
0
-%
}
{
%
for
page
in
site.html_pages
%
}
{
%-
assign
pages_array
=
''
|
split:
''
-%
}
{
%-
assign
pages_array
=
pages_array
|
push:
site.html_pages
-%
}
{
%-
if
site.doc_collections
-%
}
{
%-
for
doc_collection
in
site.doc_collections
-%
}
{
%-
assign
collection
=
site
[
doc_collection.collection
]
-%
}
{
%-
assign
pages_array
=
pages_array
|
push:
collection
-%
}
{
%-
endfor
-%
}
{
%-
endif
-%
}
{
%-
for
pages
in
pages_array
-%
}
{
%-
for
page
in
pages
-%
}
{
%-
if
page.title
and
page.search_exclude
!=
true
-%
}
{
%-
if
page.title
and
page.search_exclude
!=
true
-%
}
{
%-
assign
page_content
=
page.content
-%
}
{
%-
assign
page_content
=
page.content
-%
}
{
%-
assign
heading_level
=
site.search.heading_level
|
default:
2
-%
}
{
%-
assign
heading_level
=
site.search.heading_level
|
default:
2
-%
}
...
@@ -14,7 +23,7 @@ permalink: /assets/js/search-data.json
...
@@ -14,7 +23,7 @@ permalink: /assets/js/search-data.json
{
%-
endfor
-%
}
{
%-
endfor
-%
}
{
%-
assign
parts
=
page_content
|
split:
'<h
1
'
-%
}
{
%-
assign
parts
=
page_content
|
split:
'<h
1
'
-%
}
{
%-
assign
title_found
=
false
-%
}
{
%-
assign
title_found
=
false
-%
}
{
%
for
part
in
parts
offset:
1
%
}
{
%
-
for
part
in
parts
offset:
1
-
%
}
{
%-
assign
titleAndContent
=
part
|
split:
'</h
1
>'
-%
}
{
%-
assign
titleAndContent
=
part
|
split:
'</h
1
>'
-%
}
{
%-
assign
title
=
titleAndContent
[
0
]
|
replace_first:
'>'
,
'<h
1
>'
|
split:
'<h
1
>'
-%
}
{
%-
assign
title
=
titleAndContent
[
0
]
|
replace_first:
'>'
,
'<h
1
>'
|
split:
'<h
1
>'
-%
}
{
%-
assign
title
=
title
[
1
]
|
strip_html
-%
}
{
%-
assign
title
=
title
[
1
]
|
strip_html
-%
}
...
@@ -54,5 +63,6 @@ permalink: /assets/js/search-data.json
...
@@ -54,5 +63,6 @@ permalink: /assets/js/search-data.json
{
%-
assign
i
=
i
|
plus:
1
-%
}
{
%-
assign
i
=
i
|
plus:
1
-%
}
{
%-
endunless
-%
}
{
%-
endunless
-%
}
{
%-
endif
-%
}
{
%-
endif
-%
}
{
%
endfor
%
}
{
%-
endfor
-%
}
{
%-
endfor
%
}
}
}
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