eclipsefdn-hugo-solstice-theme 2.1.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/config.json +11 -0
- package/CHANGELOG.md +38 -19
- package/config.toml +521 -286
- package/exampleSite/config/_default/config.toml +2 -2
- package/exampleSite/config/_default/menus.en.toml +38 -47
- package/exampleSite/content/changelog/index.md +9 -0
- package/exampleSite/data/doc_params.yml +2 -23
- package/exampleSite/data/site_params.yml +5 -50
- package/exampleSite/layouts/changelog/single.html +43 -0
- package/layouts/_default/baseof.html +0 -1
- package/layouts/partials/breadcrumbs.html +26 -34
- package/layouts/partials/featured_story_popup.html +6 -0
- package/layouts/partials/footer.html +60 -19
- package/layouts/partials/footer_js.html +1 -1
- package/layouts/partials/head.html +10 -10
- package/layouts/partials/header.html +8 -8
- package/layouts/partials/jumbotron.html +73 -85
- package/layouts/partials/main_prefix.html +16 -18
- package/layouts/partials/main_suffix.html +1 -18
- package/layouts/partials/mega_menu.html +47 -51
- package/layouts/partials/mobile_menu.html +43 -97
- package/layouts/partials/nav.html +47 -60
- package/layouts/partials/navbar.html +108 -29
- package/layouts/partials/sidebar.html +48 -54
- package/layouts/partials/socials.html +15 -90
- package/layouts/partials/toolbar.html +4 -70
- package/package.json +7 -4
- package/webpack.mix.js +4 -4
- package/layouts/partials/featured_story.html +0 -38
- package/layouts/partials/footer_links/footer-copyright.html +0 -19
- package/layouts/partials/footer_links/footer-eclipse-foundation.html +0 -11
- package/layouts/partials/footer_links/footer-legal.html +0 -12
- package/layouts/partials/footer_links/footer-other.html +0 -10
- package/layouts/partials/footer_links/footer-useful-links.html +0 -11
- package/layouts/partials/footer_links/links.html +0 -3
- package/layouts/partials/footer_links/prefix.html +0 -0
- package/layouts/partials/footer_links/suffix.html +0 -36
- package/layouts/partials/working_group_footer.html +0 -55
|
@@ -1,102 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c)
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2025 Eclipse Foundation AISBL
|
|
3
3
|
|
|
4
4
|
This program and the accompanying materials are made available under the
|
|
5
5
|
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
6
|
http://www.eclipse.org/legal/epl-2.0.
|
|
7
7
|
|
|
8
|
-
Contributors:
|
|
9
|
-
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
10
|
-
|
|
11
8
|
SPDX-License-Identifier: EPL-2.0
|
|
12
|
-
|
|
9
|
+
-->
|
|
13
10
|
|
|
14
|
-
{{ $show_featured_story := .Page.Params.show_featured_story | default false }}
|
|
15
|
-
{{ $hide_jumbotron := .Page.Params.hide_jumbotron }}
|
|
16
11
|
{{ $jumbotron_container := .Page.Params.jumbotron_container | default "container" }}
|
|
17
|
-
{{ $
|
|
18
|
-
|
|
19
|
-
{{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{{ .Scratch.Set "has_jumbotron" false }}
|
|
12
|
+
{{ $jumbotron_class := .Params.jumbotron_class | default .Site.Params.jumbotron_class | default "col-xs-24" }}
|
|
13
|
+
{{ $headline := .Page.Params.headline }}
|
|
14
|
+
{{ $preheadline := .Page.Params.preheadline }}
|
|
15
|
+
{{ $tagline := .Page.Params.tagline }}
|
|
16
|
+
{{ $links := .Page.Params.links }}
|
|
17
|
+
{{ $default_btn_class := "btn btn-primary" }}
|
|
24
18
|
|
|
25
|
-
{{
|
|
26
|
-
{{ .Scratch.Set "has_jumbotron" true }}
|
|
27
|
-
|
|
28
|
-
<div class="jumbotron featured-jumbotron featured-jumbotron-dark margin-bottom-0">
|
|
29
|
-
<div class="{{ $jumbotron_container }}">
|
|
30
|
-
<div class="row">
|
|
31
|
-
<div class="{{- .Params.jumbotron_class | default .Site.Params.jumbotron_class | default "col-md-20 col-md-offset-2 col-sm-18 col-sm-offset-3" }}">
|
|
32
|
-
{{ if and (.Page.Params.headline) (ne .Page.Params.headline "") }}
|
|
33
|
-
<h1 class="featured-jumbotron-headline">
|
|
34
|
-
{{ if eq (.Page.Params.format_title | default .Site.Params.format_title) false }}
|
|
35
|
-
{{ .Page.Params.headline | safeHTML }}
|
|
36
|
-
{{ else }}
|
|
37
|
-
{{ .Page.Params.headline | title | safeHTML }}
|
|
38
|
-
{{ end }}
|
|
39
|
-
</h1>
|
|
40
|
-
{{ end }}
|
|
41
|
-
{{ if isset .Page.Params "subtitle" }}
|
|
42
|
-
<div class="featured-jumbotron-subtitle">{{ .Page.Params.subtitle | title | safeHTML }}</div>
|
|
43
|
-
{{ end }}
|
|
19
|
+
{{ $jumbotron_background_class := .Page.Params.jumbotron_background_class | default .Site.Params.jumbotron_background_class | default "bg bg-hero-1" }}
|
|
44
20
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<div class="{{- .Params.jumbotron_tagline_class | default .Site.Params.jumbotron_tagline_class | default "col-md-16" }}">
|
|
48
|
-
<p class="featured-jumbotron-tagline">{{ .Page.Params.tagline | safeHTML }}</p>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
{{ end }}
|
|
21
|
+
{{ .Store.Set "has_jumbotron" (or (isset .Page.Params "headline") (isset .Page.Params "custom_jumbotron")) }}
|
|
22
|
+
{{ $has_jumbotron := .Store.Get "has_jumbotron" }}
|
|
52
23
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
24
|
+
{{ if $has_jumbotron }}
|
|
25
|
+
<section class="featured-jumbotron fade-group {{ $jumbotron_background_class }}">
|
|
26
|
+
<div class="{{ $jumbotron_container }}">
|
|
27
|
+
<div class="{{ $jumbotron_class }}">
|
|
28
|
+
<div class="featured-jumbotron-heading-group">
|
|
29
|
+
{{ with $.Page.Params.preheadline }}
|
|
30
|
+
<p
|
|
31
|
+
class="featured-jumbotron-preheadline fade-item"
|
|
32
|
+
data-fade-duration="0.5"
|
|
33
|
+
data-fade-direction="none"
|
|
34
|
+
>
|
|
35
|
+
{{- . | safeHTML -}}
|
|
36
|
+
</p>
|
|
59
37
|
{{ end }}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div class="
|
|
82
|
-
{{
|
|
83
|
-
{{ $publish_target := .Page.Params.featured_content_publish_target | default .Site.Params.featured_content_publish_target | default "eclipse_org" }}
|
|
84
|
-
<div
|
|
85
|
-
class="eclipsefdn-featured-story"
|
|
86
|
-
data-template-id="template-featured-story-jumbotron"
|
|
87
|
-
data-publish-target="{{ $publish_target }}"
|
|
88
|
-
>
|
|
89
|
-
<div class="featured-container"></div>
|
|
90
|
-
</div>
|
|
91
|
-
{{ end }}
|
|
92
|
-
{{ if $custom_jumbotron_end }}
|
|
93
|
-
<div class="featured-jumbotron-end-custom">
|
|
94
|
-
{{ $custom_jumbotron_end | safeHTML }}
|
|
95
|
-
</div>
|
|
96
|
-
{{ end }}
|
|
38
|
+
{{ with $headline }}
|
|
39
|
+
<h1
|
|
40
|
+
class="featured-jumbotron-headline fade-item"
|
|
41
|
+
data-fade-duration="0.5"
|
|
42
|
+
data-fade-direction="none"
|
|
43
|
+
>
|
|
44
|
+
{{- . | safeHTML -}}
|
|
45
|
+
</h1>
|
|
46
|
+
{{ end }}
|
|
47
|
+
</div>
|
|
48
|
+
{{ with $tagline }}
|
|
49
|
+
<p
|
|
50
|
+
class="featured-jumbotron-tagline fade-item"
|
|
51
|
+
data-fade-duration="0.5"
|
|
52
|
+
data-fade-direction="none"
|
|
53
|
+
>
|
|
54
|
+
{{- . -}}
|
|
55
|
+
</p>
|
|
56
|
+
{{ end }}
|
|
57
|
+
{{ if isset .Page.Params "custom_jumbotron" }}
|
|
58
|
+
<div class="row">
|
|
59
|
+
<div class="{{- .Params.custom_jumbotron_class | default .Site.Params.custom_jumbotron_class | default "col-xs-24" }}">
|
|
60
|
+
{{ .Page.Params.custom_jumbotron | safeHTML }}
|
|
97
61
|
</div>
|
|
98
62
|
</div>
|
|
99
|
-
|
|
63
|
+
{{ end }}
|
|
64
|
+
{{ with $links }}
|
|
65
|
+
<ul class="featured-jumbotron-links list-inline">
|
|
66
|
+
{{ range $key,$val := index . }}
|
|
67
|
+
{{ $btn_class := "" }}
|
|
68
|
+
{{ with (index $val 2) }}
|
|
69
|
+
{{ $btn_class = .class }}
|
|
70
|
+
{{ else }}
|
|
71
|
+
{{ $btn_class = $default_btn_class }}
|
|
72
|
+
{{ end }}
|
|
73
|
+
<li>
|
|
74
|
+
<a
|
|
75
|
+
class="{{ $btn_class }} fade-item"
|
|
76
|
+
href="{{ (index $val 0).href }}"
|
|
77
|
+
{{ with (index $val 3) -}} id="{{ .id | safeHTMLAttr }}" {{- end }}
|
|
78
|
+
data-fade-duration="0.5"
|
|
79
|
+
data-fade-direction="none"
|
|
80
|
+
>
|
|
81
|
+
{{ (index $val 1).text}}
|
|
82
|
+
</a>
|
|
83
|
+
</li>
|
|
84
|
+
{{ end }}
|
|
85
|
+
</ul>
|
|
86
|
+
{{ end }}
|
|
100
87
|
</div>
|
|
101
88
|
</div>
|
|
89
|
+
</section>
|
|
102
90
|
{{ end }}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c)
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2025 Eclipse Foundation AISBL
|
|
3
3
|
|
|
4
4
|
This program and the accompanying materials are made available under the
|
|
5
5
|
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
6
|
http://www.eclipse.org/legal/epl-2.0.
|
|
7
7
|
|
|
8
|
-
Contributors:
|
|
9
|
-
Eric Poirier <eric.poirier@eclipse-foundation.org></eric.poirier>
|
|
10
|
-
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
11
|
-
|
|
12
8
|
SPDX-License-Identifier: EPL-2.0
|
|
13
|
-
|
|
9
|
+
-->
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
{{ $has_jumbotron := .Store.Get "has_jumbotron" }}
|
|
12
|
+
<main id="main">
|
|
13
|
+
{{ partial "jumbotron.html" . }}
|
|
14
|
+
{{ partial "breadcrumbs.html" . }}
|
|
16
15
|
<div class="{{- .Params.container | default .Site.Params.container | default "container padding-bottom-30"}}">
|
|
17
16
|
{{ if ne .Page.Params.hide_sidebar true }}
|
|
18
17
|
<div class="row">
|
|
18
|
+
<div class='{{- .Params.main_sidebar_class | default .Site.Params.main_sidebar_class | default "col-md-6" }}'>
|
|
19
|
+
{{ partial "sidebar.html" . }}
|
|
20
|
+
</div>
|
|
19
21
|
<div class="{{- .Params.main_content_class | default .Site.Params.main_content_class | default "col-md-18"}}">
|
|
20
22
|
{{ end }}
|
|
21
|
-
{{ if ne .Page.Params.hide_breadcrumb true }}
|
|
22
|
-
{{ partial "breadcrumbs.html" . }}
|
|
23
|
-
{{ end }}
|
|
24
23
|
{{ if eq .Page.Params.is_deprecated true }}
|
|
25
24
|
{{ $msg := .Page.Params.deprecation_msg | default "This page is deprecated and may contain some information that is no longer relevant or accurate." }}
|
|
26
25
|
<div class="alert alert-danger margin-top-20" role="alert">
|
|
@@ -29,12 +28,11 @@
|
|
|
29
28
|
{{ end }}
|
|
30
29
|
|
|
31
30
|
{{ if ne .Page.Params.hide_page_title true }}
|
|
32
|
-
|
|
33
|
-
{{
|
|
34
|
-
|
|
35
|
-
{{
|
|
36
|
-
|
|
37
|
-
{{ end }}
|
|
38
|
-
</h1>
|
|
31
|
+
{{ if $has_jumbotron }}
|
|
32
|
+
<p class="h1">{{ .Title | safeHTML }}</p>
|
|
33
|
+
{{ else }}
|
|
34
|
+
<h1>{{ .Title | safeHTML }}</h1>
|
|
35
|
+
{{ end }}
|
|
39
36
|
{{ end }}
|
|
40
37
|
|
|
38
|
+
|
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
Copyright (c)
|
|
2
|
+
Copyright (c) 2025 Eclipse Foundation AISBL
|
|
3
3
|
|
|
4
4
|
This program and the accompanying materials are made available under the
|
|
5
5
|
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
6
|
http://www.eclipse.org/legal/epl-2.0.
|
|
7
7
|
|
|
8
|
-
Contributors:
|
|
9
|
-
Eric Poirier <eric.poirier@eclipse-foundation.org>
|
|
10
|
-
|
|
11
8
|
SPDX-License-Identifier: EPL-2.0
|
|
12
9
|
-->
|
|
13
10
|
|
|
14
11
|
{{ partial "related_links.html" .}}
|
|
15
|
-
|
|
16
|
-
{{ if ne .Page.Params.hide_sidebar true }}
|
|
17
|
-
{{ $sidebarLayout := .Page.Params.sidebar_layout | default .Site.Params.sidebar_layout | default "default" }}
|
|
18
|
-
</div>
|
|
19
|
-
<div class="{{- .Params.main_sidebar_class | default .Site.Params.main_sidebar_class | default "col-md-6 padding-bottom-30"}}">
|
|
20
|
-
{{ if eq $sidebarLayout "default" }}
|
|
21
|
-
{{ partial "sidebar.html" . }}
|
|
22
|
-
{{ else if eq $sidebarLayout "sidebar_block" }}
|
|
23
|
-
{{ partial "sidebar-block.html" . }}
|
|
24
|
-
{{ end }}
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
{{ end }}
|
|
28
12
|
</div>
|
|
29
13
|
</main>
|
|
30
|
-
|
|
@@ -1,65 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c)
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2025 Eclipse Foundation AISBL
|
|
3
3
|
|
|
4
4
|
This program and the accompanying materials are made available under the
|
|
5
5
|
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
6
|
http://www.eclipse.org/legal/epl-2.0.
|
|
7
7
|
|
|
8
|
-
Contributors:
|
|
9
|
-
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
10
|
-
|
|
11
8
|
SPDX-License-Identifier: EPL-2.0
|
|
12
|
-
|
|
9
|
+
-->
|
|
13
10
|
|
|
14
11
|
{{ $main_menu := .Scratch.Get "main_menu" }}
|
|
15
|
-
|
|
16
12
|
{{ $current_page := . }}
|
|
17
|
-
{{ $hide_ad := $.Site.Params.hide_ad | default true }}
|
|
18
|
-
{{ $header_ad_format := $.Site.Params.header_ad_format | default "ads_square" }}
|
|
19
|
-
{{ $megaMenu := .Site.Data.mega_menu }}
|
|
20
|
-
|
|
21
|
-
<div class="eclipsefdn-mega-menu">
|
|
22
|
-
{{ range (index .Site.Menus $main_menu) }}
|
|
23
|
-
{{ $menu_id := .Identifier | default (lower .Name) }}
|
|
24
|
-
{{ $menu_id = printf "%s-menu" $menu_id }}
|
|
25
13
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
{{ $has_mega_menu := false }}
|
|
15
|
+
{{/* Unless if any of the menus are 3-levels deep then we will show a mega menu. */}}
|
|
16
|
+
{{ with (index .Site.Menus $main_menu) }}
|
|
17
|
+
{{ range . }}
|
|
18
|
+
{{ if .HasChildren }}
|
|
19
|
+
{{ range .Children }}
|
|
20
|
+
{{ if .HasChildren }}
|
|
21
|
+
{{ $has_mega_menu = true }}
|
|
22
|
+
{{ end }}
|
|
23
|
+
{{ end }}
|
|
24
|
+
{{ end }}
|
|
25
|
+
{{ end }}
|
|
26
|
+
{{ end }}
|
|
37
27
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<div
|
|
56
|
-
class="eclipsefdn-mega-menu-promo-content mega-menu-promo-content"
|
|
57
|
-
data-ad-format="ads_square"
|
|
58
|
-
data-ad-publish-to="eclipse_org_home"
|
|
59
|
-
>
|
|
28
|
+
{{ if $has_mega_menu }}
|
|
29
|
+
<div class="mega-menu">
|
|
30
|
+
{{ range (index .Site.Menus $main_menu) }}
|
|
31
|
+
{{ $menu_id := .Identifier | default (lower .Name) }}
|
|
32
|
+
{{ $menu_id = printf "%s-menu" $menu_id }}
|
|
33
|
+
<div class="menu hidden" id="{{ $menu_id }}">
|
|
34
|
+
<div class="container">
|
|
35
|
+
<nav>
|
|
36
|
+
{{ range .Children }}
|
|
37
|
+
<div class="submenu" {{ with .Params.style -}} style="{{ . | safeCSS }}" {{- end }}>
|
|
38
|
+
<div class="menu-heading-group">
|
|
39
|
+
{{ with .Pre }}
|
|
40
|
+
<span class="menu-pre">
|
|
41
|
+
{{ . | safeHTML }}
|
|
42
|
+
</span>
|
|
43
|
+
{{ end }}
|
|
44
|
+
<h2 class="menu-heading">{{ .Name }}</h2>
|
|
60
45
|
</div>
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
<ul>
|
|
47
|
+
{{ range .Children }}
|
|
48
|
+
<li>
|
|
49
|
+
<a href="{{ .URL }}" {{ with .Params.target -}} target="{{ . | safeHTMLAttr }}" {{- end }}>{{ .Name }}</a>
|
|
50
|
+
{{ with .Params.external }}<i class="external-icon fa-solid fa-arrow-up-right-from-square" aria-hidden="true"></i>{{ end }}
|
|
51
|
+
</li>
|
|
52
|
+
{{ end }}
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
{{ end }}
|
|
56
|
+
</nav>
|
|
63
57
|
</div>
|
|
58
|
+
</div>
|
|
64
59
|
{{ end }}
|
|
65
|
-
</div>
|
|
60
|
+
</div>
|
|
61
|
+
{{ end }}
|
|
@@ -1,108 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c)
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2025 Eclipse Foundation AISBL
|
|
3
3
|
|
|
4
4
|
This program and the accompanying materials are made available under the
|
|
5
5
|
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
6
|
http://www.eclipse.org/legal/epl-2.0.
|
|
7
7
|
|
|
8
|
-
Contributors:
|
|
9
|
-
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
10
|
-
|
|
11
8
|
SPDX-License-Identifier: EPL-2.0
|
|
12
|
-
|
|
9
|
+
-->
|
|
13
10
|
|
|
14
11
|
{{ $main_menu := .Scratch.Get "main_menu" }}
|
|
15
12
|
{{ $current_page := . }}
|
|
16
|
-
|
|
17
|
-
<nav class="mobile-menu
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{{ end }}
|
|
54
|
-
|
|
55
|
-
{{ define "mobile_menu_dropdown" }}
|
|
56
|
-
<li class="mobile-menu-dropdown">
|
|
57
|
-
<a class="mobile-menu-item mobile-menu-dropdown-toggle" data-target="{{ .target_menu }}">
|
|
58
|
-
<span>{{ .Name }}</span>
|
|
59
|
-
<i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
60
|
-
</a>
|
|
61
|
-
<div class="mobile-menu-sub-menu-wrapper">
|
|
62
|
-
<ul class="mobile-menu-sub-menu mobile-menu-links-menu hidden" id="{{ .Identifier }}-menu">
|
|
63
|
-
{{ range .Children }}
|
|
64
|
-
{{ template "mobile_menu_link" . }}
|
|
65
|
-
{{ end }}
|
|
66
|
-
</ul>
|
|
67
|
-
</div>
|
|
68
|
-
</li>
|
|
69
|
-
{{ end }}
|
|
70
|
-
|
|
71
|
-
{{ define "mobile_menu_mega" }}
|
|
72
|
-
<li class="mobile-menu-dropdown">
|
|
73
|
-
<a class="mobile-menu-item mobile-menu-dropdown-toggle" data-target="{{ .target_menu }}">
|
|
74
|
-
<span>{{ .Name }}</span>
|
|
75
|
-
<i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
76
|
-
</a>
|
|
77
|
-
<div class="mobile-menu-sub-menu-wrapper">
|
|
78
|
-
<ul class="mobile-menu-sub-menu hidden" id="{{ .Identifier }}-menu">
|
|
79
|
-
{{ range .Children }}
|
|
80
|
-
<li class="mobile-menu-dropdown">
|
|
81
|
-
<a
|
|
82
|
-
data-target="{{ .Identifier }}-sub-menu"
|
|
83
|
-
class="mobile-menu-item mobile-menu-dropdown-toggle"
|
|
84
|
-
aria-expanded="false"
|
|
85
|
-
>
|
|
86
|
-
<span>{{ .Name }}</span>
|
|
87
|
-
<i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
88
|
-
</a>
|
|
89
|
-
<div class="mobile-menu-sub-menu-wrapper">
|
|
90
|
-
<ul
|
|
91
|
-
class="mobile-menu-sub-menu mobile-menu-links-menu hidden"
|
|
92
|
-
id="{{ .Identifier }}-sub-menu"
|
|
93
|
-
>
|
|
94
|
-
{{ range .Children }}
|
|
95
|
-
<li>
|
|
96
|
-
<a class="mobile-menu-item" href="{{ .URL }}">
|
|
97
|
-
{{ .Name }}
|
|
98
|
-
</a>
|
|
99
|
-
</li>
|
|
100
|
-
{{ end }}
|
|
101
|
-
</ul>
|
|
102
|
-
</div>
|
|
103
|
-
</li>
|
|
13
|
+
<div class="mobile-menu hidden">
|
|
14
|
+
<nav class="mobile-menu-nav">
|
|
15
|
+
{{ template "mobile_menu_list" (dict "current_page" $current_page "menu_id" nil "menu" (index .Site.Menus $main_menu)) }}
|
|
16
|
+
</nav>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
{{ define "mobile_menu_list" }}
|
|
20
|
+
{{ $current_page := .current_page }}
|
|
21
|
+
|
|
22
|
+
{{ $has_parent := false }}
|
|
23
|
+
|
|
24
|
+
<!-- Detect whether this menu is the root or not. -->
|
|
25
|
+
{{ range .menu }}
|
|
26
|
+
{{ if .Parent }}
|
|
27
|
+
{{ $has_parent = true }}
|
|
28
|
+
{{ end }}
|
|
29
|
+
{{ end }}
|
|
30
|
+
|
|
31
|
+
<ul {{ if $has_parent -}} class="collapse" id="{{ .menu_id }}" {{- end -}}>
|
|
32
|
+
{{ range .menu }}
|
|
33
|
+
{{ $menu_id := .Identifier | default (lower .Name) }}
|
|
34
|
+
{{ $target_menu := printf "mobile-menu-%s" $menu_id }}
|
|
35
|
+
<li>
|
|
36
|
+
{{ if .HasChildren }}
|
|
37
|
+
<a
|
|
38
|
+
role="button"
|
|
39
|
+
href="#{{ $target_menu }}"
|
|
40
|
+
data-toggle="collapse"
|
|
41
|
+
aria-expanded="false"
|
|
42
|
+
aria-controls="{{ $target_menu }}"
|
|
43
|
+
>
|
|
44
|
+
{{ .Name }}
|
|
45
|
+
<i class="fa-solid fa-chevron-down" aria-hidden="true"></i>
|
|
46
|
+
</a>
|
|
47
|
+
{{ template "mobile_menu_list" (dict "current_page" $current_page "menu_id" $target_menu "menu" .Children) }}
|
|
48
|
+
{{ else }}
|
|
49
|
+
<a href="{{ .URL }}" {{ with .Params.target -}} target="{{ . | safeHTMLAttr }}" {{- end }}>{{ .Name }}</a>
|
|
104
50
|
{{ end }}
|
|
105
|
-
</
|
|
106
|
-
|
|
107
|
-
</
|
|
51
|
+
</li>
|
|
52
|
+
{{ end }}
|
|
53
|
+
</ul>
|
|
108
54
|
{{ end }}
|