eclipsefdn-hugo-solstice-theme 1.0.1 → 2.1.0
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/CHANGELOG.md +32 -0
- package/config.toml +403 -7
- package/exampleSite/config/_default/config.toml +2 -2
- package/layouts/_default/baseof.html +0 -1
- package/layouts/partials/breadcrumbs.html +12 -5
- package/layouts/partials/featured_story.html +16 -9
- package/layouts/partials/footer.html +16 -10
- package/layouts/partials/footer_js.html +1 -1
- package/layouts/partials/footer_links/footer-copyright.html +0 -1
- package/layouts/partials/footer_links/footer-eclipse-foundation.html +7 -11
- package/layouts/partials/footer_links/footer-legal.html +6 -5
- package/layouts/partials/footer_links/footer-other.html +6 -8
- package/layouts/partials/footer_links/links.html +0 -2
- package/layouts/partials/footer_links/suffix.html +23 -0
- package/layouts/partials/head.html +1 -1
- package/layouts/partials/header.html +8 -5
- package/layouts/partials/jumbotron.html +84 -47
- package/layouts/partials/main_prefix.html +11 -8
- package/layouts/partials/mega_menu.html +65 -0
- package/layouts/partials/mobile_menu.html +108 -0
- package/layouts/partials/nav.html +59 -55
- package/layouts/partials/navbar.html +38 -61
- package/layouts/partials/sidebar.html +62 -28
- package/layouts/partials/socials.html +22 -16
- package/layouts/partials/toolbar.html +65 -27
- package/layouts/partials/working_group_footer.html +55 -0
- package/package.json +2 -2
- package/webpack.mix.js +4 -4
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
{{ $footer_section_other_class := .Params.footer_section_other_class | default .Site.Params.footer_section_other_class | default "col-sm-
|
|
2
|
-
<section class="{{ $footer_section_other_class }}"
|
|
3
|
-
<
|
|
1
|
+
{{ $footer_section_other_class := .Params.footer_section_other_class | default .Site.Params.footer_section_other_class | default "footer-section col-sm-8" }}
|
|
2
|
+
<section id="footer-more" class="{{ $footer_section_other_class }}">
|
|
3
|
+
<div class="menu-heading">{{ i18n "footer-other-section-text" }}</div>
|
|
4
4
|
<ul class="nav">
|
|
5
|
-
<li><a href="https://www.eclipse.org/ide/">{{ i18n "footer-other-tools-text" }}</a></li>
|
|
6
|
-
<li><a href="https://www.eclipse.org/projects">{{ i18n "footer-other-community-projects-text" }}</a></li>
|
|
7
|
-
<li><a href="https://www.eclipse.org/org/workinggroups/">{{ i18n "footer-other-working-groups-text" }}</a></li>
|
|
8
|
-
<li><a href="https://www.eclipse.org/org/research/">{{ i18n "footer-other-research-text" }}</a></li>
|
|
9
5
|
<li><a href="https://www.eclipse.org/security/">{{ i18n "footer-other-report-vulnerability-text" }}</a></li>
|
|
10
|
-
<li><a href="https://status.eclipse.org">{{ i18n "footer-other-status-text" }}</a></li>
|
|
6
|
+
<li><a href="https://status.eclipse.org/">{{ i18n "footer-other-status-text" }}</a></li>
|
|
7
|
+
<li><a href="https://www.eclipse.org/org/foundation/contact.php">{{ i18n "footer-other-contact-text" }}</a></li>
|
|
8
|
+
<li><a href="https://www.eclipse.org/projects/support/">{{ i18n "footer-other-support-text" }}</a></li>
|
|
11
9
|
</ul>
|
|
12
10
|
</section>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
{{ partial "footer_links/footer-eclipse-foundation.html" . }}
|
|
2
2
|
{{ partial "footer_links/footer-legal.html" . }}
|
|
3
|
-
{{ partial "footer_links/footer-useful-links.html" . }}
|
|
4
3
|
{{ partial "footer_links/footer-other.html" . }}
|
|
5
|
-
{{ partial "footer_links/footer-copyright.html" . }}
|
|
@@ -11,3 +11,26 @@
|
|
|
11
11
|
SPDX-License-Identifier: EPL-2.0
|
|
12
12
|
*/}}
|
|
13
13
|
|
|
14
|
+
{{ $hide_footer_newsletter := $.Site.Params.hide_footer_newsletter | default false }}
|
|
15
|
+
|
|
16
|
+
<div id="footer-end" class="footer-section col-md-8 col-md-offset-1 col-sm-24">
|
|
17
|
+
{{ if not $hide_footer_newsletter }}
|
|
18
|
+
<div class="footer-end-newsletter">
|
|
19
|
+
<form
|
|
20
|
+
id="mc-embedded-subscribe-form"
|
|
21
|
+
action="https://eclipse.us6.list-manage.com/subscribe/post?u=eaf9e1f06f194eadc66788a85&id=e7538485cd&f_id=00f9c2e1f0"
|
|
22
|
+
method="post"
|
|
23
|
+
novalidate
|
|
24
|
+
target="_blank"
|
|
25
|
+
>
|
|
26
|
+
<label class="footer-end-newsletter-label" for="email">Subscribe to our Newsletter</label>
|
|
27
|
+
<div class="footer-end-newsletter-input-wrapper">
|
|
28
|
+
<input class="footer-end-newsletter-input" type="email" id="email" name="EMAIL" autocomplete="email" placeholder="Enter your email address" />
|
|
29
|
+
<button class="footer-end-newsletter-submit btn btn-link" id="mc-embedded-subscribe" type="submit" name="subscribe">
|
|
30
|
+
<i class="fa fa-solid fa-envelope fa-lg" aria-hidden="true"></i>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
</form>
|
|
34
|
+
</div>
|
|
35
|
+
{{ end }}
|
|
36
|
+
</div>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="">
|
|
76
76
|
{{ end }}
|
|
77
77
|
{{ if ne .Page.Params.disable_css "true" }}
|
|
78
|
-
{{- $default_css := "https://www.eclipse.org/public/css/
|
|
78
|
+
{{- $default_css := "https://www.eclipse.org/public/css/astro.css" -}}
|
|
79
79
|
{{- with .Site.Params.styles | default $default_css }}
|
|
80
80
|
<link rel="stylesheet" href="{{ . | relURL }}?v={{ now.Unix }}">
|
|
81
81
|
{{- end }}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
{{/*
|
|
2
|
-
Copyright (c)
|
|
1
|
+
{{/*
|
|
2
|
+
Copyright (c) 2023 Eclipse Foundation, Inc.
|
|
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
8
|
Contributors:
|
|
9
|
-
Christopher Guindon <chris.guindon@eclipse-foundation.org>
|
|
10
9
|
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
11
10
|
|
|
12
11
|
SPDX-License-Identifier: EPL-2.0
|
|
13
12
|
*/}}
|
|
14
13
|
|
|
15
|
-
{{
|
|
14
|
+
{{ $header_wrapper_class := .Params.header_wrapper_class | default .Site.Params.header_wrapper_class }}
|
|
15
|
+
|
|
16
|
+
{{ partial "google_tag_manager_no_script.html" . }}
|
|
16
17
|
<a class="sr-only" href="#content">{{ i18n "navigation-content-skip" }}</a>
|
|
17
|
-
<header class="header-wrapper{{
|
|
18
|
+
<header class="header-wrapper {{ $header_wrapper_class }}" id="header">
|
|
18
19
|
{{ partial "toolbar.html" . }}
|
|
19
20
|
{{ partial "navbar.html" . }}
|
|
21
|
+
{{ partial "mobile_menu.html" . }}
|
|
22
|
+
{{ partial "mega_menu.html" . }}
|
|
20
23
|
{{ partial "jumbotron.html" . }}
|
|
21
24
|
</header>
|
|
@@ -1,65 +1,102 @@
|
|
|
1
1
|
{{/*
|
|
2
|
-
Copyright (c)
|
|
2
|
+
Copyright (c) 2023 Eclipse Foundation, Inc.
|
|
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
8
|
Contributors:
|
|
9
|
-
Christopher Guindon <chris.guindon@eclipse-foundation.org>
|
|
10
9
|
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
11
10
|
|
|
12
11
|
SPDX-License-Identifier: EPL-2.0
|
|
13
12
|
*/}}
|
|
14
13
|
|
|
15
|
-
{{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<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"}}">
|
|
20
|
-
<h1>
|
|
21
|
-
{{ if eq .Page.Params.format_title false }}
|
|
22
|
-
{{ .Page.Params.headline | safeHTML }}
|
|
23
|
-
{{ else }}
|
|
24
|
-
{{ .Page.Params.headline | title | safeHTML }}
|
|
25
|
-
{{ end }}
|
|
26
|
-
</h1>
|
|
27
|
-
{{ if isset .Page.Params "subtitle" }}
|
|
28
|
-
<h2>{{ .Page.Params.subtitle | title | safeHTML }}</h2>
|
|
29
|
-
{{end}}
|
|
30
|
-
|
|
31
|
-
{{ if isset .Page.Params "tagline" }}
|
|
32
|
-
<div class="row">
|
|
33
|
-
<div class="{{- .Params.jumbotron_tagline_class | default .Site.Params.jumbotron_tagline_class | default "col-sm-18 col-sm-offset-3"}}">
|
|
34
|
-
<p>{{ .Page.Params.tagline | safeHTML }}</p>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
{{end}}
|
|
14
|
+
{{ $show_featured_story := .Page.Params.show_featured_story | default false }}
|
|
15
|
+
{{ $hide_jumbotron := .Page.Params.hide_jumbotron }}
|
|
16
|
+
{{ $jumbotron_container := .Page.Params.jumbotron_container | default "container" }}
|
|
17
|
+
{{ $custom_jumbotron_end := .Page.Params.custom_jumbotron_end }}
|
|
38
18
|
|
|
39
|
-
|
|
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 }}
|
|
24
|
+
|
|
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 }}">
|
|
40
30
|
<div class="row">
|
|
41
|
-
<div class="{{- .Params.
|
|
42
|
-
{{ .Page.Params.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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 }}
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{{ $btn_class = .class }}
|
|
54
|
-
{{ else }}
|
|
55
|
-
{{ $btn_class = $.Scratch.Get "jumbotron_btn" }}
|
|
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>
|
|
56
51
|
{{ end }}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
|
|
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>
|
|
59
|
+
{{ 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 }}
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
61
100
|
</div>
|
|
62
101
|
</div>
|
|
63
|
-
|
|
64
|
-
</div>
|
|
65
|
-
{{ end }}
|
|
102
|
+
{{ end }}
|
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
{{/*
|
|
2
|
-
Copyright (c) 2019 Eclipse Foundation, Inc.
|
|
2
|
+
Copyright (c) 2019, 2023, 2024 Eclipse Foundation, Inc.
|
|
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
8
|
Contributors:
|
|
9
|
-
Eric Poirier <eric.poirier@eclipse-foundation.org>
|
|
9
|
+
Eric Poirier <eric.poirier@eclipse-foundation.org></eric.poirier>
|
|
10
|
+
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
10
11
|
|
|
11
12
|
SPDX-License-Identifier: EPL-2.0
|
|
12
13
|
*/}}
|
|
13
14
|
|
|
14
|
-
{{ partial "collapsible-menu.html" . }}
|
|
15
15
|
<main>
|
|
16
|
-
<div class="{{- .Params.container | default .Site.Params.container | default "container"}}">
|
|
16
|
+
<div class="{{- .Params.container | default .Site.Params.container | default "container padding-bottom-30"}}">
|
|
17
17
|
{{ if ne .Page.Params.hide_sidebar true }}
|
|
18
18
|
<div class="row">
|
|
19
|
-
<div class="{{- .Params.main_content_class | default .Site.Params.main_content_class | default "col-md-18
|
|
19
|
+
<div class="{{- .Params.main_content_class | default .Site.Params.main_content_class | default "col-md-18"}}">
|
|
20
|
+
{{ end }}
|
|
21
|
+
{{ if ne .Page.Params.hide_breadcrumb true }}
|
|
22
|
+
{{ partial "breadcrumbs.html" . }}
|
|
20
23
|
{{ end }}
|
|
21
|
-
|
|
22
24
|
{{ if eq .Page.Params.is_deprecated true }}
|
|
25
|
+
{{ $msg := .Page.Params.deprecation_msg | default "This page is deprecated and may contain some information that is no longer relevant or accurate." }}
|
|
23
26
|
<div class="alert alert-danger margin-top-20" role="alert">
|
|
24
|
-
|
|
27
|
+
{{ $msg }}
|
|
25
28
|
</div>
|
|
26
29
|
{{ end }}
|
|
27
30
|
|
|
28
31
|
{{ if ne .Page.Params.hide_page_title true }}
|
|
29
32
|
<h1>
|
|
30
|
-
{{ if eq .Page.Params.format_title false }}
|
|
33
|
+
{{ if eq (.Page.Params.format_title | default .Site.Params.format_title) false }}
|
|
31
34
|
{{ .Title | safeHTML }}
|
|
32
35
|
{{ else }}
|
|
33
36
|
{{ .Title | safeHTML | title }}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Copyright (c) 2023 Eclipse Foundation, Inc.
|
|
3
|
+
|
|
4
|
+
This program and the accompanying materials are made available under the
|
|
5
|
+
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
|
|
8
|
+
Contributors:
|
|
9
|
+
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
10
|
+
|
|
11
|
+
SPDX-License-Identifier: EPL-2.0
|
|
12
|
+
*/}}
|
|
13
|
+
|
|
14
|
+
{{ $main_menu := .Scratch.Get "main_menu" }}
|
|
15
|
+
|
|
16
|
+
{{ $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
|
+
|
|
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 }}
|
|
37
|
+
|
|
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
|
+
>
|
|
60
|
+
</div>
|
|
61
|
+
{{ end }}
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
{{ end }}
|
|
65
|
+
</div>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Copyright (c) 2023 Eclipse Foundation, Inc.
|
|
3
|
+
|
|
4
|
+
This program and the accompanying materials are made available under the
|
|
5
|
+
terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
|
|
8
|
+
Contributors:
|
|
9
|
+
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
10
|
+
|
|
11
|
+
SPDX-License-Identifier: EPL-2.0
|
|
12
|
+
*/}}
|
|
13
|
+
|
|
14
|
+
{{ $main_menu := .Scratch.Get "main_menu" }}
|
|
15
|
+
{{ $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>
|
|
104
|
+
{{ end }}
|
|
105
|
+
</ul>
|
|
106
|
+
</div>
|
|
107
|
+
</li>
|
|
108
|
+
{{ end }}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{{/*
|
|
2
|
-
Copyright (c)
|
|
2
|
+
Copyright (c) 2023 Eclipse Foundation, Inc.
|
|
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
8
|
Contributors:
|
|
9
|
-
Christopher Guindon <chris.guindon@eclipse-foundation.org>
|
|
10
9
|
Olivier Goulet <olivier.goulet@eclipse-foundation.org>
|
|
11
10
|
|
|
12
11
|
SPDX-License-Identifier: EPL-2.0
|
|
@@ -17,62 +16,67 @@
|
|
|
17
16
|
{{ else if (index .Site.Menus "main") }}
|
|
18
17
|
{{ .Scratch.Set "main_menu" "main" }}
|
|
19
18
|
{{ else }}
|
|
20
|
-
{{ .Scratch.Set "main_menu" "
|
|
19
|
+
{{ .Scratch.Set "main_menu" "astro" }}
|
|
21
20
|
{{ end }}
|
|
22
21
|
|
|
23
22
|
{{ $main_menu := .Scratch.Get "main_menu" }}
|
|
23
|
+
{{ $current_page := . }}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{{ if gt (len .Children) 2 }}
|
|
44
|
-
{{ $colClass = "col-sm-8" }}
|
|
45
|
-
{{ end }}
|
|
46
|
-
<li>
|
|
47
|
-
<!-- Content container to add padding -->
|
|
48
|
-
<div class="yamm-content">
|
|
49
|
-
<div class="row">
|
|
50
|
-
{{ range .Children }}
|
|
51
|
-
<ul class="{{ $colClass }} list-unstyled padding-bottom-20">
|
|
52
|
-
<li><p><a href="{{.URL}}"><strong>{{ .Name }}</strong></a></p>
|
|
53
|
-
</li>
|
|
25
|
+
<nav class="header-navbar-nav">
|
|
26
|
+
<ul class="header-navbar-nav-links">
|
|
27
|
+
{{ range (index .Site.Menus $main_menu) }}
|
|
28
|
+
{{ $menu_id := .Identifier | default (lower .Name) }}
|
|
29
|
+
{{ $target_menu := printf "%s-menu" $menu_id }}
|
|
30
|
+
{{ $active_class := "" }}
|
|
31
|
+
{{ $menu_type := "link" }}
|
|
32
|
+
|
|
33
|
+
{{ if $current_page.IsMenuCurrent $main_menu . }}
|
|
34
|
+
{{ $active_class = "active" }}
|
|
35
|
+
{{ end }}
|
|
36
|
+
|
|
37
|
+
{{/* If the menu has children, we will show a dropdown */}}
|
|
38
|
+
{{ if .HasChildren }}
|
|
39
|
+
{{ $menu_type = "dropdown" }}
|
|
40
|
+
{{ end }}
|
|
41
|
+
|
|
42
|
+
{{/* Unless if any of the menus are 3-levels deep then we will show a mega menu. */}}
|
|
54
43
|
{{ range .Children }}
|
|
55
|
-
|
|
44
|
+
{{ if .HasChildren }}
|
|
45
|
+
{{ $menu_type = "mega" }}
|
|
46
|
+
{{ end }}
|
|
56
47
|
{{ end }}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<li>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{{
|
|
48
|
+
|
|
49
|
+
<li class="navbar-nav-links-item {{ $active_class }}">
|
|
50
|
+
{{ if eq $menu_type "link" }}
|
|
51
|
+
<a class="link-unstyled" href="{{ .URL }}">{{ .Name }}</a>
|
|
52
|
+
{{ else if eq $menu_type "dropdown" }}
|
|
53
|
+
<div class="dropdown">
|
|
54
|
+
<button class="btn-link link-unstyled" id="{{ $menu_id }}" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
55
|
+
{{ .Name }}
|
|
56
|
+
<i class="fa fa-caret-down" aria-hidden="true"></i>
|
|
57
|
+
</button>
|
|
58
|
+
<ul class="dropdown-menu" aria-labelledby="{{ $menu_id }}">
|
|
59
|
+
{{ range .Children }}
|
|
60
|
+
<li>
|
|
61
|
+
<a class="link-unstyled" href="{{ .URL }}" {{ with .Params.target -}} target="{{ . | safeHTMLAttr }}" {{- end }}>
|
|
62
|
+
{{ .Name }}
|
|
63
|
+
{{ with .Params.external }}<i class="external-icon fa-solid fa-arrow-up-right-from-square" aria-hidden="true"></i>{{ end }}
|
|
64
|
+
</a>
|
|
65
|
+
</li>
|
|
66
|
+
{{ end }}
|
|
67
|
+
</ul>
|
|
68
|
+
</div>
|
|
69
|
+
{{ else }}
|
|
70
|
+
<button
|
|
71
|
+
class="nav-link-js btn-link link-unstyled"
|
|
72
|
+
type="button"
|
|
73
|
+
aria-expanded="true"
|
|
74
|
+
data-menu-target="{{ $target_menu }}"
|
|
75
|
+
>
|
|
76
|
+
{{ .Name }}
|
|
77
|
+
</button>
|
|
78
|
+
{{ end }}
|
|
79
|
+
</li>
|
|
80
|
+
{{ end }}
|
|
81
|
+
</ul>
|
|
82
|
+
</nav>
|