eclipsefdn-hugo-solstice-theme 0.0.180 → 0.0.182

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/Jenkinsfile CHANGED
@@ -4,7 +4,7 @@ hugo (
4
4
  appName: 'webdev.eclipse.org-docs-hugo',
5
5
  productionDomain: 'webdev.eclipse.org',
6
6
  build: [
7
- containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1',
7
+ containerImage: 'eclipsefdn/hugo-node:h0.110.0-n18.13.0',
8
8
  script: 'bin/build.sh'
9
9
  ],
10
10
  deployment: [
package/README.md CHANGED
@@ -9,9 +9,9 @@ Dependencies:
9
9
 
10
10
  | Program | Version |
11
11
  |---------|---------|
12
- | node.js | ~ 12.22.0 |
13
- | npm | ~ 7.11 |
14
- | Hugo | > 0.76 |
12
+ | node.js | 18.13.0 |
13
+ | npm | 8.19 |
14
+ | Hugo | 0.110 |
15
15
  | Git | > 2.31 |
16
16
  | Make | > 4.3 |
17
17
 
@@ -28,6 +28,7 @@ baseURL = "https://webdev.eclipse.org/docs/hugo"
28
28
  hide_cfa_same_page = true
29
29
  show_collapsible_menu = true
30
30
  sidebar_layout = "default"
31
+ hide_deprecation_warnings = true
31
32
 
32
33
  [Author]
33
34
  name = "Christopher Guindon"
@@ -109,7 +109,7 @@
109
109
  name = "Meeting Minutes"
110
110
  url = "/components/meeting_minutes/"
111
111
  weight = 3
112
- parent = "solstice"
112
+ parent = "deprecated"
113
113
 
114
114
  [[main]]
115
115
  name = "Membership"
@@ -354,3 +354,14 @@
354
354
  weight = 2
355
355
  parent = "membership"
356
356
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
357
+
358
+ [[main_menu_demo]]
359
+ identifier = "custom-menu"
360
+ name = "Custom Menu"
361
+ weight = 1
362
+
363
+ [[main_menu_demo]]
364
+ parent = "custom-menu"
365
+ name = "Go Home"
366
+ url = "/"
367
+ weight = 1
@@ -342,3 +342,14 @@
342
342
  weight = 2
343
343
  parent = "membership"
344
344
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
345
+
346
+ [[main_menu_demo]]
347
+ identifier = "custom-menu"
348
+ name = "Custom Menu"
349
+ weight = 1
350
+
351
+ [[main_menu_demo]]
352
+ parent = "custom-menu"
353
+ name = "Go Home"
354
+ url = "/"
355
+ weight = 1
@@ -345,3 +345,13 @@
345
345
  parent = "membership"
346
346
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
347
347
 
348
+ [[main_menu_demo]]
349
+ identifier = "custom-menu"
350
+ name = "Custom Menu"
351
+ weight = 1
352
+
353
+ [[main_menu_demo]]
354
+ parent = "custom-menu"
355
+ name = "Go Home"
356
+ url = "/"
357
+ weight = 1
@@ -342,3 +342,14 @@
342
342
  weight = 2
343
343
  parent = "membership"
344
344
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
345
+
346
+ [[main_menu_demo]]
347
+ identifier = "custom-menu"
348
+ name = "Custom Menu"
349
+ weight = 1
350
+
351
+ [[main_menu_demo]]
352
+ parent = "custom-menu"
353
+ name = "Go Home"
354
+ url = "/"
355
+ weight = 1
@@ -342,3 +342,14 @@
342
342
  weight = 2
343
343
  parent = "membership"
344
344
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
345
+
346
+ [[main_menu_demo]]
347
+ identifier = "custom-menu"
348
+ name = "Custom Menu"
349
+ weight = 1
350
+
351
+ [[main_menu_demo]]
352
+ parent = "custom-menu"
353
+ name = "Go Home"
354
+ url = "/"
355
+ weight = 1
@@ -342,3 +342,14 @@
342
342
  weight = 2
343
343
  parent = "membership"
344
344
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
345
+
346
+ [[main_menu_demo]]
347
+ identifier = "custom-menu"
348
+ name = "Custom Menu"
349
+ weight = 1
350
+
351
+ [[main_menu_demo]]
352
+ parent = "custom-menu"
353
+ name = "Go Home"
354
+ url = "/"
355
+ weight = 1
@@ -342,3 +342,14 @@
342
342
  weight = 2
343
343
  parent = "membership"
344
344
  pre = "<i class=\"fa fa-chevron-right fa-fw\"></i>"
345
+
346
+ [[main_menu_demo]]
347
+ identifier = "custom-menu"
348
+ name = "Custom Menu"
349
+ weight = 1
350
+
351
+ [[main_menu_demo]]
352
+ parent = "custom-menu"
353
+ name = "Go Home"
354
+ url = "/"
355
+ weight = 1
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: EclipseFdn Meeting Minutes
3
+ hide_sidebar: true
4
+ ---
5
+
6
+ You can add meeting minutes to a markdown file using the shortcode:
7
+ `{{</* eclipsefdn_meeting_minutes */>}}`
8
+
9
+ {{< grid/div class="alert alert-warning" isMarkdown="false" >}} This is for
10
+ demonstration only. The only link which is expected to work is under the
11
+ Specification Committee tab. {{</ grid/div >}}
12
+
13
+ {{< eclipsefdn_meeting_minutes >}}
14
+
15
+ ## Parameters
16
+
17
+ | Name | Type | Description |
18
+ | ------------------------- | -------- | ----------- | ------------------------------------------------------------- |
19
+ | `tabs_class` | `string | nil` | replace the default class for the navigation tabs |
20
+ | `yearly_sections_enabled` | `boolean | nil` | splits meeting minutes into yearly sections if set to `true`. |
21
+
22
+ ### Example of `tabs_class`
23
+
24
+ If your site has its own styles for navigation tabs, it may be using the
25
+ `.solstice-tabs` class. If you want the meeting minutes tabs to look identical
26
+ to your other tabs, pass in `solstice-tabs` or your own custom class into the
27
+ `tabs_class` parameter.
28
+
29
+ ```
30
+ {{</* eclipsefdn_meeting_minutes tabs_class="solstice-tabs" */>}}
31
+ ```
32
+
33
+ ### More examples of parameters
34
+
35
+ - [yearly_sections_enabled example](./yearly_sections_enabled)
36
+
37
+ ## Setup
38
+
39
+ To add meeting minutes, create a **meeting_minutes.yml** file in the data
40
+ folder. The YAML file should have a similar shape to the following:
41
+
42
+ ```
43
+ dir: '/path/to/directory/with/committees/'
44
+ yearly_sections_enabled: true
45
+ order:
46
+ - specification_committee
47
+ - marketing_committee
48
+ items:
49
+ marketing_committee:
50
+ - title: August 18, 2022 (pdf)
51
+ url: marketing_committee/2022-08-18-marketing-minutes.pdf
52
+ year: 2022
53
+ specification_committee:
54
+ - title: June 28, 2018 (pdf)
55
+ url: https://jakarta.ee/about/meeting_minutes/steering_committee/2018-06-28-specification-minutes.pdf
56
+ year: 2018
57
+ ```
58
+
59
+ #### Data File Properties
60
+
61
+ | Property | Description |
62
+ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
+ | `dir` | is the directory for which to search for the meeting minutes. |
64
+ | `order` | modifies the order of the tabs. It needs to be an array of committee names corresponding to their key under `items`. If this is not set, the tabs will be alphabetically sorted. |
65
+ | `items` | contains the committees such as `marketing_committee` and `specification_committee`. You can give the committee any key. This committee will appear as a tab on the component. |
66
+ | `title` | is the link text of a meeting minutes item. |
67
+ | `url` | locates the meeting minute file. If `dir` was set, it will locate the file from `dir`. |
68
+ | `year` | is the year which the meeting was taken. This will dictate which year-section the item will appear under. This is not required if `yearly_sections_enabled` is set to `false`. |
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: Demonstrating yearly_sections_enabled Param
3
+ hide_sidebar: true
4
+ ---
5
+
6
+ The `yearly_sections_enabled` parameter splits meeting minutes into yearly sections if set to `true`.
7
+
8
+ ```
9
+ {{</* eclipsefdn_meeting_minutes yearly_sections_enabled="true" */>}}
10
+ ```
11
+
12
+ {{< eclipsefdn_meeting_minutes yearly_sections_enabled="true" >}}
13
+
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: "Meeting Minutes"
3
+ date: 2019-04-17T15:52:13-04:00
4
+ ---
5
+
6
+ {{< grid/div class="alert alert-danger" isMarkdown="false" >}}
7
+ The "meeting_minutes" shortcode is deprecated and will be removed in Hugo Solstice Theme v1.0.
8
+ {{</ grid/div >}}
9
+
10
+ You can add meeting minutes to a markdown file using the shortcode: **{{&lt; meeting_minutes &gt;}}**
11
+
12
+ To add meeting minutes, create a **meeting_minutes.yml** file in the data folder and add the code below:
13
+
14
+ ~~~~
15
+ items:
16
+ type_1:
17
+ -
18
+ title: Type 1 - Hugo Solstice Theme Num-1
19
+ url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
20
+
21
+ type_2:
22
+ -
23
+ title: Type 2 - Hugo Solstice Theme Num-1
24
+ url: https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme
25
+ ~~~~
26
+
27
+ **Examples:**
28
+
29
+ Here is an example of the output of the meeting minutes shortcode.
30
+
31
+ {{< meeting_minutes >}}
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: Main Menu
3
+ main_menu: main_menu_demo
4
+ hide_sidebar: true
5
+ ---
6
+
7
+ The `main_menu` parameter allows you to use a different navigation bar menu.
8
+ This page uses the `main_menu` parameter to show the "Custom Menu" on the
9
+ navigation bar above.
10
+
11
+ If `main_menu` is not specified, it will use the default `main` menu from the
12
+ config.toml, or menus.toml file.
13
+
14
+ ## Example
15
+
16
+ Let's create an example which uses a menu named `my_custom_menu`.
17
+
18
+ config.toml:
19
+
20
+ ```
21
+ [[menu.my_custom_menu]]
22
+ name = "home"
23
+ url = "/awesome-event-2022"
24
+ weight = 1
25
+
26
+ [[menu.my_custom_menu]]
27
+ name = "News"
28
+ url = "/awesome-event-2022/news"
29
+ weight = 2
30
+ ```
31
+
32
+ We want this custom menu to appear on a section named "awesome-event-2022" whose
33
+ url is located at "/awesome-event-2022". To do this, we need to add the front
34
+ matter parameter `main_menu` in our markdown file for awesome-event-2022.
35
+
36
+ awesome-event-2022/\_index.md:
37
+
38
+ ```
39
+ ---
40
+ title: Awesome Event 2022
41
+ main_menu: my_custom_menu
42
+ layout: single
43
+ ---
44
+
45
+ This is the home page for the Awesome Event 2022
46
+ ```
47
+
48
+ ### Front Matter Cascade
49
+
50
+ You can use the `cascade` front matter parameter to make all subpages use the
51
+ new menu as well:
52
+
53
+ ```
54
+ ---
55
+ title: Awesome Event 2022
56
+ layout: single
57
+ cascade:
58
+ main_menu: my_custom_menu
59
+ ---
60
+
61
+ This is the home page for the Awesome Event 2022
62
+ ```
63
+
64
+ For more information about `cascade`, visit the
65
+ [Hugo docs](https://gohugo.io/content-management/front-matter/#front-matter-cascade).
@@ -60,6 +60,13 @@ items:
60
60
  - Array of URL objects that each contain values for "text" and "href"
61
61
  example: |
62
62
  [[href: "about/", text: "About"], [href: "news/", text: "News"]]
63
+ -
64
+ name: main_menu
65
+ description: |
66
+ Replaces the default main menu for one defined in config.toml or menus.toml.
67
+ <a href="./params/main-menu">See more information here</a>.
68
+ values:
69
+ - Any string value
63
70
  -
64
71
  name: redirect_url
65
72
  description: Set the redirect URL for client-side page forwarding. Used in the head.html layout file, and is used in the canonical URL, and in an instant refresh meta tag for page target. If set, it will also set the page to not be indexed in the future by robots.
@@ -1,5 +1,4 @@
1
- yearly_sections_enabled: true
2
- dir: '/docs/hugo/components/meeting_minutes/documents/'
1
+ dir: '/docs/hugo/components/eclipsefdn_meeting_minutes/documents/'
3
2
  order:
4
3
  - specification_committee
5
4
  - marketing_committee
@@ -46,6 +45,6 @@ items:
46
45
  title: February 11, 2021 (pdf)
47
46
  year: 2021
48
47
  specification_committee:
49
- - url: specification_committee/minutes-specification-june-18-2018.pdf
50
- title: June 18, 2018 (pdf)
48
+ - url: specification_committee/minutes-specification-june-28-2018.pdf
49
+ title: June 28, 2018 (pdf)
51
50
  year: 2018
@@ -1,5 +1,5 @@
1
- <!--
2
- Copyright (c) 2018 Eclipse Foundation, Inc.
1
+ {{/*
2
+ Copyright (c) 2018, 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
@@ -7,11 +7,15 @@
7
7
 
8
8
  Contributors:
9
9
  Christopher Guindon <chris.guindon@eclipse-foundation.org>
10
+ Olivier Goulet <olivier.goulet@eclipse-foundation.org>
10
11
 
11
12
  SPDX-License-Identifier: EPL-2.0
12
- -->
13
+ */}}
14
+
15
+ {{ $main_menu := .Page.Params.main_menu | default "main" }}
16
+
13
17
  {{ $currentNode := . }}
14
- {{ range .Site.Menus.main }}
18
+ {{ range (index .Site.Menus $main_menu) }}
15
19
  {{ if .HasChildren }}
16
20
  {{ $multicol := false }}
17
21
  {{ range .Children }}
@@ -19,10 +23,9 @@
19
23
  {{ $multicol = true }}
20
24
  {{ end }}
21
25
  {{ end }}
22
- <li class="dropdown{{ if $multicol }} eclipse-more{{ end }}">
26
+ <li class="dropdown {{ if $multicol -}} eclipse-more {{- end }}">
23
27
  <a href="#" data-toggle="dropdown" class="dropdown-toggle">
24
28
  {{ .Pre }}
25
- <!--<i class="icon_desktop"></i>-->
26
29
  <span>{{ .Name }}</span>
27
30
  <b class="caret"></b>
28
31
  </a>
@@ -41,7 +44,7 @@
41
44
  <li><p><a href="{{.URL}}"><strong>{{ .Name }}</strong></a></p>
42
45
  </li>
43
46
  {{ range .Children }}
44
- <li{{if $currentNode.IsMenuCurrent "main" . }} class="active"{{end}}><a href="{{.URL}}">{{ .Name }}</a> </li>
47
+ <li {{if $currentNode.IsMenuCurrent "{{ $main_menu }}" . }} class="active"{{end}}><a href="{{.URL}}">{{ .Name }}</a> </li>
45
48
  {{ end }}
46
49
  </ul>
47
50
  {{ end }}
@@ -50,7 +53,7 @@
50
53
  </li>
51
54
  {{ else }}
52
55
  {{ range .Children }}
53
- <li{{if $currentNode.IsMenuCurrent "main" . }} class="active"{{end}}><a href="{{.URL}}">{{ .Name }}</a> </li>
56
+ <li {{if $currentNode.IsMenuCurrent "{{ $main_menu }}" . }} class="active"{{end}}><a href="{{.URL}}">{{ .Name }}</a> </li>
54
57
  {{ end }}
55
58
  {{ end }}
56
59
  </ul>
@@ -0,0 +1,138 @@
1
+ <!--
2
+ Copyright (c) 2019, 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
+ Eric Poirier <eric.poirier@eclipse-foundation.org>
10
+ Olivier Goulet <olivier.goulet@eclipse-foundation.org>
11
+
12
+ SPDX-License-Identifier: EPL-2.0
13
+ -->
14
+
15
+ {{ $tabs_class := .Get "tabs_class" | default "meeting-minutes-tabs-default" }}
16
+ {{ $yearly_sections_enabled := .Get "yearly_sections_enabled" | default false }}
17
+ {{ $data := .Site.Data.meeting_minutes }}
18
+
19
+ {{/* We need to create a set of years for each committee in order to know which year sections to render. */}}
20
+ {{ $committee_years_set := dict }}
21
+ {{ if $yearly_sections_enabled }}
22
+ {{ range $key, $committee := $data.items }}
23
+ {{ $years_set := slice }}
24
+ {{ range $committee }}
25
+ {{ if not (in $years_set .year) }}
26
+ {{ $years_set = $years_set | append .year }}
27
+ {{ end }}
28
+ {{ end }}
29
+ {{ $committee_years_set = merge $committee_years_set (dict $key $years_set) }}
30
+ {{ end }}
31
+ {{ end }}
32
+
33
+ {{/*
34
+ We need to sort the committees by the `order` field in the data file. To do this, we create an ordered slice containing
35
+ a dict with the committee name as the key and the committee object as value. The committee object which originally comes
36
+ from `items` in the data file. If no `order` field was provided then the default behavior of YAML gets used
37
+ (alphabetical).
38
+ */}}
39
+ {{ $ordered_committees := slice }}
40
+ {{ if $data.order }}
41
+ {{ range $committee_name := $data.order }}
42
+ {{ $committee := index $data.items $committee_name }}
43
+ {{ $ordered_committees = $ordered_committees | append (dict "committee_name" $committee_name "items" $committee) }}
44
+ {{ end }}
45
+ {{ else }}
46
+ {{ range $committee_name, $committee := $data.items }}
47
+ {{ $ordered_committees = $ordered_committees | append (dict "committee_name" $committee_name "items" $committee) }}
48
+ {{ end }}
49
+ {{ end }}
50
+
51
+ {{ $committee_count := len $data.items }}
52
+
53
+ <div class="eclipsefdn-meeting-minutes">
54
+ {{/* We don't need to render the nav tabs if there is only one committee */}}
55
+ {{ if not (eq $committee_count 1) }}
56
+ {{ $.Scratch.Set "counter" 0}}
57
+ <ul class="meeting-minutes-tab nav nav-tabs link-unstyled {{ $tabs_class }}" role="tablist">
58
+ {{ range $ordered_committees }}
59
+ {{ $index := index . "committee_name" }}
60
+ {{ $counter := $.Scratch.Get "counter" }}
61
+ {{ if eq $counter 0 }}
62
+ <li role="presentation" class="meeting-minutes-tab-item active"><a class="meeting-minutes-tab-item-link" href="#{{ $index }}" aria-controls="{{ $index }}" role="tab" data-toggle="tab">{{ humanize $index | title }}</a></li>
63
+ {{ $.Scratch.Add "counter" 1}}
64
+ {{ else }}
65
+ <li role="presentation" class="meeting-minutes-tab-item"><a class="meeting-minutes-tab-item-link" href="#{{ $index }}" aria-controls="{{ $index }}" role="tab" data-toggle="tab">{{ humanize $index | title }}</a></li>
66
+ {{ end }}
67
+ {{ end }}
68
+ </ul>
69
+ {{ end }}
70
+
71
+ {{ $.Scratch.Set "types_counter" 0}}
72
+ <div class="tab-content row">
73
+ {{ range $ordered_committees }}
74
+ {{ $committee_name := index . "committee_name" }}
75
+ {{ $items := index . "items" }}
76
+
77
+ {{ $types_counter := $.Scratch.Get "types_counter" }}
78
+ {{ if eq $types_counter 0 }}
79
+ <div role="tabpanel" class="tab-pane active" id="{{$committee_name}}">
80
+ {{ else }}
81
+ <div role="tabpanel" class="tab-pane" id="{{$committee_name}}">
82
+ {{ end }}
83
+ {{/* Creates an iterable sequence or slice. The value of the slice is equal to the year if yearly sections are enabled. */}}
84
+ {{ $sections := seq 1 }}
85
+ {{ if $yearly_sections_enabled }}
86
+ {{ $sections = index $committee_years_set $committee_name }}
87
+ {{ end }}
88
+
89
+ {{ range $section_name := $sections }}
90
+
91
+ {{ $year := "" }}
92
+ {{ if $yearly_sections_enabled }}
93
+ {{ $year = $section_name }}
94
+ {{ end }}
95
+
96
+ <div class="card-container col-sm-24">
97
+ {{ if $yearly_sections_enabled }} <div class="glyph-highlight left-align"><div class="glyph-container text">{{ $year }}</div><div class="glyph-bottom"></div></div>{{ end }}
98
+ <div class="card-panel bordered panel panel-default {{ if $yearly_sections_enabled -}} with-glyph {{- end }}">
99
+ <div class="panel-body">
100
+ <ul class="meeting-minutes-list tri-col margin-bottom-0">
101
+
102
+ {{/* Meeting minutes to render for current section */}}
103
+ {{ $meeting_minutes := slice }}
104
+ {{ if $yearly_sections_enabled }}
105
+ {{ range $meeting_minute := (where $items "year" $year) }}
106
+ {{ $meeting_minutes = $meeting_minutes | append $meeting_minute }}
107
+ {{ end }}
108
+ {{ else }}
109
+ {{ $meeting_minutes = $items }}
110
+ {{ end }}
111
+
112
+ {{ range $index, $el := $meeting_minutes }}
113
+
114
+ {{/* Handle relative and absolute paths */}}
115
+ {{ $url := "" }}
116
+ {{ if and $data.dir (not (hasPrefix $el.url "http") ) }}
117
+ {{ $url = (path.Join $data.dir $el.url) | absURL }}
118
+ {{ else }}
119
+ {{ $url = $el.url }}
120
+ {{ end }}
121
+
122
+ <li>
123
+ <a class="link-unstyled" href="{{ $url }}">
124
+ {{ $el.title }}
125
+ </a>
126
+ </li>
127
+
128
+ {{ end }}
129
+ </ul>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ {{ end }}
134
+ </div>
135
+ {{ $.Scratch.Add "types_counter" 1}}
136
+ {{ end }}
137
+ </div>
138
+ </div>
@@ -1,5 +1,5 @@
1
- <!--
2
- Copyright (c) 2020 Eclipse Foundation, Inc.
1
+ {{/*
2
+ Copyright (c) 2020, 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
@@ -7,9 +7,11 @@
7
7
 
8
8
  Contributors:
9
9
  Martin Lowe <martin.lowe@eclipse-foundation.org>
10
+ Olivier Goulet <olivier.goulet@eclipse-foundation.org>
10
11
 
11
12
  SPDX-License-Identifier: EPL-2.0
12
- -->
13
+ */}}
14
+
13
15
  {{ if $.Site.Data.eclipsefdn_projects }}
14
16
  <section wg-filter="{{$.Site.Params.projects_working_group}}">
15
17
  <style>
@@ -47,7 +49,7 @@
47
49
  <div class="col-xs-24 col-md-4 text-center margin-top-20 margin-bottom-20">
48
50
  <div class="btn-group">
49
51
  <a class="btn btn-primary" href="{{ .url }}/downloads">{{ i18n "project-list-downloads" }}</a>
50
- <button type="button" class="btn btn-sm btn-warning dropdown-toggle details-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
52
+ <button type="button" class="btn btn-primary dropdown-toggle details-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
51
53
  <span class="caret"></span>
52
54
  <span class="sr-only">{{ i18n "project-list-dropdown-sr" }}</span>
53
55
  </button>
@@ -1,5 +1,5 @@
1
1
  <!--
2
- Copyright (c) 2019 Eclipse Foundation, Inc.
2
+ Copyright (c) 2019, 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
@@ -11,127 +11,55 @@
11
11
 
12
12
  SPDX-License-Identifier: EPL-2.0
13
13
  -->
14
-
15
- {{ $data := .Site.Data.meeting_minutes }}
16
- {{ $yearly_sections_enabled := $data.yearly_sections_enabled | default false }}
17
-
18
- {{/* We need to create a set of years for each committee in order to know which year sections to render. */}}
19
- {{ $committee_years_set := dict }}
20
- {{ if $yearly_sections_enabled }}
21
- {{ range $key, $committee := $data.items }}
22
- {{ $years_set := slice }}
23
- {{ range $committee }}
24
- {{ if not (in $years_set .year) }}
25
- {{ $years_set = $years_set | append .year }}
26
- {{ end }}
27
- {{ end }}
28
- {{ $committee_years_set = merge $committee_years_set (dict $key $years_set) }}
29
- {{ end }}
14
+ {{ $migration_link := "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/wikis/Hugo-Solstice-Theme-1.x.x/Migrating-to-1.x.x#replacing-meeting_minutes-shortcode-with-eclipsefdn_meeting_minutes" }}
15
+ {{ if not (eq .Site.Params.hide_deprecation_warnings true) }}
16
+ {{ warnf "Deprecation Warning: The meeting_minutes shortcode is deprecated and will be removed in Hugo Solstice Theme 1.0. Consider using `eclipsefdn_meeting_minutes`. Find out how to migrate here: %s" $migration_link }}
30
17
  {{ end }}
31
18
 
32
- {{/*
33
- We need to sort the committees by the `order` field in the data file. To do this, we create an ordered slice containing
34
- a dict with the committee name as the key and the committee object as value. The committee object which originally comes
35
- from `items` in the data file. If no `order` field was provided then the default behavior of YAML gets used
36
- (alphabetical).
37
- */}}
38
- {{ $ordered_committees := slice }}
39
- {{ if $data.order }}
40
- {{ range $committee_name := $data.order }}
41
- {{ $committee := index $data.items $committee_name }}
42
- {{ $ordered_committees = $ordered_committees | append (dict "committee_name" $committee_name "items" $committee) }}
43
- {{ end }}
44
- {{ else }}
45
- {{ range $committee_name, $committee := $data.items }}
46
- {{ $ordered_committees = $ordered_committees | append (dict "committee_name" $committee_name "items" $committee) }}
19
+ {{ $.Scratch.Set "counter" 0}}
20
+ <ul class="nav nav-tabs" role="tablist">
21
+ {{ range $index, $meeting_minute_types := .Site.Data.meeting_minutes.items }}
22
+ {{ $counter := $.Scratch.Get "counter" }}
23
+ {{ if eq $counter 0 }}
24
+ <li role="presentation" class="active"><a href="#{{ $index }}" aria-controls="{{ $index }}" role="tab" data-toggle="tab">{{ humanize $index }}</a></li>
25
+ {{ $.Scratch.Add "counter" 1}}
26
+ {{ else }}
27
+ <li role="presentation"><a href="#{{ $index }}" aria-controls="{{ $index }}" role="tab" data-toggle="tab">{{ humanize $index }}</a></li>
47
28
  {{ end }}
48
29
  {{ end }}
30
+ </ul>
49
31
 
50
- {{ $committee_count := len $data.items }}
51
32
 
52
- <div class="eclipsefdn-meeting-minutes">
53
- {{/* We don't need to render the nav tabs if there is only one committee */}}
54
- {{ if not (eq $committee_count 1) }}
55
- {{ $.Scratch.Set "counter" 0}}
56
- <ul class="nav nav-tabs solstice-tabs" role="tablist">
57
- {{ range $ordered_committees }}
58
- {{ $index := index . "committee_name" }}
59
- {{ $counter := $.Scratch.Get "counter" }}
60
- {{ if eq $counter 0 }}
61
- <li role="presentation" class="active"><a href="#{{ $index }}" aria-controls="{{ $index }}" role="tab" data-toggle="tab">{{ humanize $index | title }}</a></li>
62
- {{ $.Scratch.Add "counter" 1}}
63
- {{ else }}
64
- <li role="presentation"><a href="#{{ $index }}" aria-controls="{{ $index }}" role="tab" data-toggle="tab">{{ humanize $index | title }}</a></li>
65
- {{ end }}
33
+ {{ $.Scratch.Set "types_counter" 0}}
34
+ <div class="tab-content">
35
+ {{ range $index_type, $meeting_minute_types := .Site.Data.meeting_minutes.items}}
36
+ {{ $types_counter := $.Scratch.Get "types_counter" }}
37
+ {{ if eq $types_counter 0 }}
38
+ <div role="tabpanel" class="tab-pane active" id="{{$index_type}}">
39
+ {{ else }}
40
+ <div role="tabpanel" class="tab-pane" id="{{$index_type}}">
66
41
  {{ end }}
67
- </ul>
68
- {{ end }}
69
-
70
- {{ $.Scratch.Set "types_counter" 0}}
71
- <div class="tab-content row">
72
- {{ range $ordered_committees }}
73
- {{ $committee_name := index . "committee_name" }}
74
- {{ $items := index . "items" }}
75
-
76
- {{ $types_counter := $.Scratch.Get "types_counter" }}
77
- {{ if eq $types_counter 0 }}
78
- <div role="tabpanel" class="tab-pane active" id="{{$committee_name}}">
79
- {{ else }}
80
- <div role="tabpanel" class="tab-pane" id="{{$committee_name}}">
81
- {{ end }}
82
- {{/* Creates an iterable sequence or slice. The value of the slice is equal to the year if yearly sections are enabled. */}}
83
- {{ $sections := seq 1 }}
84
- {{ if $yearly_sections_enabled }}
85
- {{ $sections = index $committee_years_set $committee_name }}
86
- {{ end }}
87
-
88
- {{ range $section_name := $sections }}
89
-
90
- {{ $year := "" }}
91
- {{ if $yearly_sections_enabled }}
92
- {{ $year = $section_name }}
42
+ {{ $num_items := len $meeting_minute_types }}
43
+ {{ $items_per_col := math.Ceil (div $num_items 3.0) }}
44
+ {{ $.Scratch.Set "items_counter" 1 }}
45
+ {{ $.Scratch.Set "items_counter_per_row" 1 }}
46
+ <div class="row">
47
+ {{ range $meeting_minute_types }}
48
+ {{ $items_counter := $.Scratch.Get "items_counter" }}
49
+ {{ $items_counter_per_row := $.Scratch.Get "items_counter_per_row" }}
50
+ {{ if eq $items_counter_per_row 1}}
51
+ <div class="col-sm-8"><ul>
93
52
  {{ end }}
94
-
95
- <div class="card-container col-sm-24">
96
- {{ if $yearly_sections_enabled }} <div class="glyph-highlight left-align"><div class="glyph-container text">{{ $year }}</div><div class="glyph-bottom"></div></div>{{ end }}
97
- <div class="card-panel bordered panel panel-default {{ if $yearly_sections_enabled -}} with-glyph {{- end }}">
98
- <div class="panel-body">
99
- <ul class="meeting-minutes-list tri-col margin-bottom-0">
100
-
101
- {{/* Meeting minutes to render for current section */}}
102
- {{ $meeting_minutes := slice }}
103
- {{ if $yearly_sections_enabled }}
104
- {{ range $meeting_minute := (where $items "year" $year) }}
105
- {{ $meeting_minutes = $meeting_minutes | append $meeting_minute }}
106
- {{ end }}
107
- {{ else }}
108
- {{ $meeting_minutes = $items }}
109
- {{ end }}
110
-
111
- {{ range $index, $el := $meeting_minutes }}
112
-
113
- {{/* Handle relative and absolute paths */}}
114
- {{ $url := "" }}
115
- {{ if and $data.dir (not (hasPrefix $el.url "http") ) }}
116
- {{ $url = (path.Join $data.dir $el.url) | absURL }}
117
- {{ else }}
118
- {{ $url = $el.url }}
119
- {{ end }}
120
-
121
- <li>
122
- <a class="link-unstyled" href="{{ $url }}">
123
- {{ $el.title }}
124
- </a>
125
- </li>
126
-
127
- {{ end }}
128
- </ul>
129
- </div>
130
- </div>
131
- </div>
132
- {{ end }}
53
+ <li><a href="{{.url}}">{{.title}}</a></li>
54
+ {{ if or (eq (float $items_counter_per_row) $items_per_col) (eq $items_counter $num_items) }}
55
+ {{ $.Scratch.Set "items_counter_per_row" 0}}
56
+ </ul></div>
57
+ {{ end }}
58
+ {{ $.Scratch.Add "items_counter" 1}}
59
+ {{ $.Scratch.Add "items_counter_per_row" 1}}
60
+ {{ end }}
133
61
  </div>
134
- {{ $.Scratch.Add "types_counter" 1}}
135
- {{ end }}
136
- </div>
62
+ </div>
63
+ {{ $.Scratch.Add "types_counter" 1}}
64
+ {{ end }}
137
65
  </div>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "webpack.min.js",
5
5
  "author": "Christopher Guindon",
6
6
  "license": "EPL-2.0",
7
- "version": "0.0.180",
7
+ "version": "0.0.182",
8
8
  "bugs": {
9
9
  "url": "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues"
10
10
  },
@@ -23,7 +23,7 @@
23
23
  "readmeFilename": "README.md",
24
24
  "dependencies": {
25
25
  "axios": "^0.21.1",
26
- "eclipsefdn-solstice-assets": "0.0.215",
26
+ "eclipsefdn-solstice-assets": "0.0.216",
27
27
  "json2yaml": "^1.1.0",
28
28
  "toml": "^3.0.0"
29
29
  },
@@ -1,47 +0,0 @@
1
- ---
2
- title: Meeting Minutes
3
- hide_sidebar: true
4
- ---
5
-
6
- You can add meeting minutes to a markdown file using the shortcode:
7
- **{{&lt; meeting_minutes &gt;}}**
8
-
9
- {{< grid/div class="alert alert-warning" isMarkdown="false" >}} This is for
10
- demonstration only. The only link which is expected to work is under the
11
- Specification Committee tab. {{</ grid/div >}}
12
-
13
- {{< meeting_minutes >}}
14
-
15
- ## Setup
16
-
17
- To add meeting minutes, create a **meeting_minutes.yml** file in the data
18
- folder. The YAML file should have a similar shape to the following:
19
-
20
- ```
21
- dir: '/path/to/directory/with/committees/'
22
- yearly_sections_enabled: true
23
- order:
24
- - specification_committee
25
- - marketing_committee
26
- items:
27
- marketing_committee:
28
- - title: August 18, 2022 (pdf)
29
- url: marketing_committee/2022-08-18-marketing-minutes.pdf
30
- year: 2022
31
- specification_committee:
32
- - title: June 28, 2018 (pdf)
33
- url: https://jakarta.ee/about/meeting_minutes/steering_committee/2018-06-28-specification-minutes.pdf
34
- year: 2018
35
- ```
36
-
37
- #### Properties
38
-
39
- | Property | Description |
40
- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | `dir` | is the directory for which to search for the meeting minutes. |
42
- | `yearly_sections_enabled` | splits meeting minutes into yearly sections if set to `true`. |
43
- | `order` | modifies the order of the tabs. It needs to be an array of committee names corresponding to their key under `items`. If this is not set, the tabs will be alphabetically sorted. |
44
- | `items` | contains the committees such as `marketing_committee` and `specification_committee`. You can give the committee any key. This committee will appear as a tab on the component. |
45
- | `title` | is the link text of a meeting minutes item. |
46
- | `url` | locates the meeting minute file. If `dir` was set, it will locate the file from `dir`. |
47
- | `year` | is the year which the meeting was taken. This will dictate which year-section the item will appear under. This is not required if `yearly_sections_enabled` is set to `false`. |