eclipsefdn-hugo-solstice-theme 0.1.18 → 0.1.20
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/exampleSite/config/_default/config.toml +1 -0
- package/exampleSite/data/doc_params.yml +4 -0
- package/layouts/partials/astro/jumbotron.html +1 -1
- package/layouts/partials/astro/main_prefix.html +1 -1
- package/layouts/partials/breadcrumbs.html +4 -4
- package/layouts/shortcodes/events/agenda.html +29 -24
- package/package.json +2 -2
|
@@ -157,3 +157,7 @@ items:
|
|
|
157
157
|
description: Add classes to the body element.
|
|
158
158
|
values:
|
|
159
159
|
- Any string value
|
|
160
|
+
name: format_title
|
|
161
|
+
description: Formats the page title in headings and breadcrumbs to title case. If there is no value set, will default to true.
|
|
162
|
+
values:
|
|
163
|
+
- "false"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
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
32
|
{{ if and (.Page.Params.headline) (ne .Page.Params.headline "") }}
|
|
33
33
|
<h1 class="featured-jumbotron-headline">
|
|
34
|
-
{{ if eq .Page.Params.format_title false }}
|
|
34
|
+
{{ if eq (.Page.Params.format_title | default .Site.Params.format_title) false }}
|
|
35
35
|
{{ .Page.Params.headline | safeHTML }}
|
|
36
36
|
{{ else }}
|
|
37
37
|
{{ .Page.Params.headline | title | safeHTML }}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
{{ if ne .Page.Params.hide_page_title true }}
|
|
32
32
|
<h1>
|
|
33
|
-
{{ if eq .Page.Params.format_title false }}
|
|
33
|
+
{{ if eq (.Page.Params.format_title | default .Site.Params.format_title) false }}
|
|
34
34
|
{{ .Title | safeHTML }}
|
|
35
35
|
{{ else }}
|
|
36
36
|
{{ .Title | safeHTML | title }}
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
<div class="row">
|
|
27
27
|
<div class="col-sm-24">
|
|
28
28
|
<ol aria-label="Breadcrumb" class="breadcrumb">
|
|
29
|
-
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
|
29
|
+
{{ template "breadcrumbnav" (dict "p1" . "p2" . "site_params" $.Site.Params) }}
|
|
30
30
|
</ol>
|
|
31
31
|
{{ define "breadcrumbnav" }}
|
|
32
32
|
{{ if .p1.Parent }}
|
|
33
|
-
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
|
33
|
+
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 "site_params" .site_params) }}
|
|
34
34
|
{{ else if not .p1.IsHome }}
|
|
35
|
-
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
|
35
|
+
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 "site_params" .site_params) }}
|
|
36
36
|
{{ end }}
|
|
37
37
|
<li {{ if eq .p1 .p2 }} class="active" aria-current="page"{{ end }}>
|
|
38
|
-
<a href="{{ .p1.Permalink }}">{{ if eq .p1.Params.format_title false }}{{ .p1.Title | safeHTML }}{{ else }}{{ .p1.Title | safeHTML | title }}{{ end }}</a>
|
|
38
|
+
<a href="{{ .p1.Permalink }}">{{ if eq (.p1.Params.format_title | default .site_params.format_title) false }}{{ .p1.Title | safeHTML }}{{ else }}{{ .p1.Title | safeHTML | title }}{{ end }}</a>
|
|
39
39
|
</li>
|
|
40
40
|
{{ end }}
|
|
41
41
|
</div>
|
|
@@ -62,36 +62,18 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
|
|
|
62
62
|
{{ if $multiSet }}
|
|
63
63
|
{{ $agendaItemsBase = $agendabase.sets }}
|
|
64
64
|
|
|
65
|
-
<div
|
|
66
|
-
<
|
|
67
|
-
<div class="vertical-align">
|
|
68
|
-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-agenda">
|
|
69
|
-
<p class="nav-label"><strong>{{ .Get "navLabel" | default "Session tracks" }}</strong></p>
|
|
70
|
-
<div class="hamburger-wrapper">
|
|
71
|
-
<span class="sr-only">Toggle navigation</span>
|
|
72
|
-
<span class="icon-bar"></span>
|
|
73
|
-
<span class="icon-bar"></span>
|
|
74
|
-
<span class="icon-bar"></span>
|
|
75
|
-
</div>
|
|
76
|
-
</button>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div class="row">
|
|
82
|
-
<div class="navbar-collapse collapse" id="navbar-agenda">
|
|
83
|
-
<ul class="nav nav-tabs solstice-tabs content-nav-tab" role="tablist">
|
|
65
|
+
<div id="navbar-agenda">
|
|
66
|
+
<ul class="nav nav-tabs solstice-tabs content-nav-tab" role="tablist">
|
|
84
67
|
{{ range $index,$set := $agendabase.sets }}
|
|
85
68
|
<li role="presentation" {{- if eq $index 0 }}class="active"{{ end -}}>
|
|
86
|
-
<a href="#agenda-sessions-{{ $
|
|
69
|
+
<a href="#agenda-sessions-{{ $set.name | urlize }}" data-toggle="tab" aria-controls="agenda-sessions-{{ $set.name | urlize }}" role="tab">
|
|
87
70
|
{{ .name }}
|
|
88
71
|
</a>
|
|
89
72
|
</li>
|
|
90
73
|
{{ end }}
|
|
91
|
-
|
|
92
|
-
</div>
|
|
74
|
+
</ul>
|
|
93
75
|
</div>
|
|
94
|
-
<div class="content-nav-tab-body tab-content no-gutters-mobile
|
|
76
|
+
<div class="content-nav-tab-body tab-content no-gutters-mobile margin-bottom-30" id="tabs-content">
|
|
95
77
|
{{ end }}
|
|
96
78
|
|
|
97
79
|
{{ $hasOrgs := false }}
|
|
@@ -128,7 +110,7 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
|
|
|
128
110
|
|
|
129
111
|
<!-- Check if multiple session sets -->
|
|
130
112
|
{{ if $multiSet }}
|
|
131
|
-
<div role="tabpanel" class="tab-pane
|
|
113
|
+
<div role="tabpanel" class="tab-pane{{ if eq $index 0}} active{{ end }}" id="agenda-sessions-{{ $set.name | urlize }}">
|
|
132
114
|
{{ end }}
|
|
133
115
|
<div class="eclipsefdn-agenda-schedule">
|
|
134
116
|
<table class="table">
|
|
@@ -248,3 +230,26 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
|
|
|
248
230
|
</div>
|
|
249
231
|
{{ end }}
|
|
250
232
|
</div>
|
|
233
|
+
|
|
234
|
+
<script>
|
|
235
|
+
// Since bootstrap default tabs behaviour prevents scrolling to the anchor
|
|
236
|
+
// we need to handle this ourselves. We also allow for a custom scroll target
|
|
237
|
+
// to be set via the shortcode parameter "scroll_target". If not set we default
|
|
238
|
+
// to "navbar-agenda" which is the id of the tab navigation bar.
|
|
239
|
+
|
|
240
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
241
|
+
const hash = window.location.hash;
|
|
242
|
+
if (hash && hash.startsWith('#agenda-session')) {
|
|
243
|
+
const targetId = '{{ .Get "scroll_target" | default "navbar-agenda" }}';
|
|
244
|
+
let element = document.getElementById(targetId);
|
|
245
|
+
if (!element) {
|
|
246
|
+
element = document.getElementById('navbar-agenda');
|
|
247
|
+
}
|
|
248
|
+
if (element) {
|
|
249
|
+
setTimeout(() => {
|
|
250
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
251
|
+
}, 150);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
</script>
|
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.1.
|
|
7
|
+
"version": "0.1.20",
|
|
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": "^1.7.7",
|
|
26
|
-
"eclipsefdn-solstice-assets": "0.1.
|
|
26
|
+
"eclipsefdn-solstice-assets": "0.1.21",
|
|
27
27
|
"json2yaml": "^1.1.0",
|
|
28
28
|
"toml": "^3.0.0"
|
|
29
29
|
},
|