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.
Files changed (38) hide show
  1. package/.changeset/config.json +11 -0
  2. package/CHANGELOG.md +38 -19
  3. package/config.toml +521 -286
  4. package/exampleSite/config/_default/config.toml +2 -2
  5. package/exampleSite/config/_default/menus.en.toml +38 -47
  6. package/exampleSite/content/changelog/index.md +9 -0
  7. package/exampleSite/data/doc_params.yml +2 -23
  8. package/exampleSite/data/site_params.yml +5 -50
  9. package/exampleSite/layouts/changelog/single.html +43 -0
  10. package/layouts/_default/baseof.html +0 -1
  11. package/layouts/partials/breadcrumbs.html +26 -34
  12. package/layouts/partials/featured_story_popup.html +6 -0
  13. package/layouts/partials/footer.html +60 -19
  14. package/layouts/partials/footer_js.html +1 -1
  15. package/layouts/partials/head.html +10 -10
  16. package/layouts/partials/header.html +8 -8
  17. package/layouts/partials/jumbotron.html +73 -85
  18. package/layouts/partials/main_prefix.html +16 -18
  19. package/layouts/partials/main_suffix.html +1 -18
  20. package/layouts/partials/mega_menu.html +47 -51
  21. package/layouts/partials/mobile_menu.html +43 -97
  22. package/layouts/partials/nav.html +47 -60
  23. package/layouts/partials/navbar.html +108 -29
  24. package/layouts/partials/sidebar.html +48 -54
  25. package/layouts/partials/socials.html +15 -90
  26. package/layouts/partials/toolbar.html +4 -70
  27. package/package.json +7 -4
  28. package/webpack.mix.js +4 -4
  29. package/layouts/partials/featured_story.html +0 -38
  30. package/layouts/partials/footer_links/footer-copyright.html +0 -19
  31. package/layouts/partials/footer_links/footer-eclipse-foundation.html +0 -11
  32. package/layouts/partials/footer_links/footer-legal.html +0 -12
  33. package/layouts/partials/footer_links/footer-other.html +0 -10
  34. package/layouts/partials/footer_links/footer-useful-links.html +0 -11
  35. package/layouts/partials/footer_links/links.html +0 -3
  36. package/layouts/partials/footer_links/prefix.html +0 -0
  37. package/layouts/partials/footer_links/suffix.html +0 -36
  38. package/layouts/partials/working_group_footer.html +0 -55
@@ -1,102 +1,90 @@
1
- {{/*
2
- Copyright (c) 2023 Eclipse Foundation, Inc.
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
- {{ $custom_jumbotron_end := .Page.Params.custom_jumbotron_end }}
18
-
19
- {{/*
20
- We need to keep track of whether or not a jumbotron is present on the
21
- page to know where to render the featured story.
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
- {{ if or (isset .Page.Params "headline") (eq $hide_jumbotron false) }}
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
- {{ if isset .Page.Params "tagline" }}
46
- <div class="row">
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
- {{ if isset .Page.Params "custom_jumbotron" }}
54
- <div class="row">
55
- <div class="{{- .Params.custom_jumbotron_class | default .Site.Params.custom_jumbotron_class | default "col-sm-18 col-sm-offset-3"}}">
56
- {{ .Page.Params.custom_jumbotron | safeHTML }}
57
- </div>
58
- </div>
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
- {{ if isset .Page.Params "links" }}
62
- {{- with .Params.jumbotron_btn_class | default .Site.Params.jumbotron_btn_class | default "btn btn-primary" }}
63
- {{ $.Scratch.Set "jumbotron_btn" . }}
64
- {{ end }}
65
- <ul class="featured-jumbotron-links list-inline">
66
- {{ range $key,$val := index .Page.Params.links}}
67
- {{ $btn_class := "" }}
68
- {{ with (index $val 2) }}
69
- {{ $btn_class = .class }}
70
- {{ else }}
71
- {{ $btn_class = $.Scratch.Get "jumbotron_btn" }}
72
- {{ end }}
73
- <li>
74
- <a class="{{ $btn_class }}" href="{{ (index $val 0).href}}" {{ with (index $val 3) -}} id="{{ .id | safeHTMLAttr }}" {{- end }}>
75
- {{ (index $val 1).text}}
76
- </a>
77
- </li>
78
- {{ end }}
79
- </ul>
80
- {{ end }}
81
- <div class="featured-jumbotron-end">
82
- {{ if (eq $show_featured_story true) }}
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
- </div>
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) 2019, 2023, 2024 Eclipse Foundation, Inc.
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
- <main>
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
- <h1>
33
- {{ if eq (.Page.Params.format_title | default .Site.Params.format_title) false }}
34
- {{ .Title | safeHTML }}
35
- {{ else }}
36
- {{ .Title | safeHTML | title }}
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) 2019, 2024 Eclipse Foundation, Inc.
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) 2023 Eclipse Foundation, Inc.
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
- <div class="mega-menu-submenu container hidden" data-menu-id="{{ $menu_id }}">
27
- <div class="mega-menu-submenu-featured-story">
28
-
29
- {{ if .Params.description }}
30
- <p class="mega-menu-submenu-featured-story-heading">{{ .Params.heading | default .Name }}</p>
31
- <p class="mega-menu-submenu-featured-story-text">{{ .Params.description }}</p>
32
- {{ end }}
33
-
34
- {{ with .Params.link }}
35
- <a class="mega-menu-submenu-featured-story-btn btn btn-primary" href="{{ .url }}">{{ .text }}</a>
36
- {{ end }}
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
- </div>
39
- <div class="mega-menu-submenu-links-section">
40
- {{ range .Children }}
41
- <div class="mega-menu-submenu-links">
42
- <p class="menu-heading">{{ .Name }}</p>
43
- <ul>
44
- {{ range .Children }}
45
- <li>
46
- <a href="{{ .URL }}">{{ .Name }}</a>
47
- </li>
48
- {{ end }}
49
- </ul>
50
- </div>
51
- {{ end }}
52
- </div>
53
- <div class="mega-menu-submenu-ad-wrapper">
54
- {{ if eq $hide_ad false }}
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
- {{ end }}
62
- </div>
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) 2023 Eclipse Foundation, Inc.
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 hidden" aria-expanded="false">
18
- <ul>
19
- {{ range (index .Site.Menus $main_menu) }}
20
- {{ $menu_id := .Identifier | default (lower .Name) }}
21
- {{ $target_menu := printf "%s-menu" $menu_id }}
22
- {{ $menu_type := "link" }}
23
-
24
- {{/* If the desktop menu uses basic dropdowns, set menu type to "dropdown". */}}
25
- {{ if .HasChildren }}
26
- {{ $menu_type = "dropdown" }}
27
- {{ end }}
28
-
29
- {{/* Unless if any of the menus are 3-levels deep then we know the desktop menu type is "mega". */}}
30
- {{ range .Children }}
31
- {{ if .HasChildren }}
32
- {{ $menu_type = "mega" }}
33
- {{ end }}
34
- {{ end }}
35
-
36
- {{ $args := dict "target_menu" $target_menu "Name" .Name "URL" .URL "Identifier" .Identifier "Children" .Children }}
37
-
38
- {{ if eq $menu_type "link" }}
39
- {{ template "mobile_menu_link" $args }}
40
- {{ else if eq $menu_type "dropdown" }}
41
- {{ template "mobile_menu_dropdown" $args }}
42
- {{ else if eq $menu_type "mega" }}
43
- {{ template "mobile_menu_mega" $args }}
44
- {{ end }}
45
- {{ end }}
46
- </ul>
47
- </nav>
48
-
49
- {{ define "mobile_menu_link" }}
50
- <li>
51
- <a class="mobile-menu-item" href="{{ .URL }}">{{ .Name }}</a>
52
- </li>
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
- </ul>
106
- </div>
107
- </li>
51
+ </li>
52
+ {{ end }}
53
+ </ul>
108
54
  {{ end }}