Skip to content

Commit 77948de

Browse files
committed
Update time handling, fix site building, fix display of sections for future events when none are scheduled
1 parent 5f67819 commit 77948de

File tree

7 files changed

+48
-39
lines changed

7 files changed

+48
-39
lines changed

themes/hugoplate/layouts/index.html

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,58 @@ <h1 class="mb-4 homepage">
88
</h1>
99
<ul class="list-disc pl-6 ml-3 mb-8 text-lg">
1010
<li class="relative mb-4 pl-3">
11-
<a href="/neuromorphic-computing/">Educational content</a> to get you started with the neuromorphic engineering.
11+
<a href="/neuromorphic-computing/">Educational content</a> to get you started with the neuromorphic
12+
engineering.
1213
</li>
1314
<li class="relative mb-4 pl-3">
1415
<a href="/workshops/">Events about neuromorphic research and software</a>, with contributions from both
1516
academia and industry.
1617
</li>
1718
<li class="relative mb-4 pl-3">
18-
A curated list of neuromorphc open source <a href="/neuromorphic-computing/software/">software</a> and <a href="/neuromorphic-computing/hardware/">hardware</a> to make it easier to find <strong>the tool you need</strong>.
19+
A curated list of neuromorphc open source <a href="/neuromorphic-computing/software/">software</a> and <a
20+
href="/neuromorphic-computing/hardware/">hardware</a> to make it easier to find <strong>the tool you
21+
need</strong>.
1922
</li>
2023
<li class="relative mb-4 pl-3">
2124
<a href="https://github.com/open-neuromorphic" target="_blank">A platform for your code</a>. If you wish to
2225
create a new repository or migrate your existing code to ONM, please get in touch with us.
2326
</li>
2427
</ul>
2528
<p class="text-xl pb-3">Ways to Get Involved</p>
26-
<div class="grid grid-cols-2 gap-4">
27-
<!-- Content Team Card -->
28-
<a href="/getting-involved#content" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
29-
<h2 class="text-xl font-semibold mb-2">Blogs & Writing</h2>
30-
<p>Contribute to website content, blogs, newsletters, and technical guides.</p>
31-
</a>
29+
<div class="grid grid-cols-2 gap-4">
30+
<!-- Content Team Card -->
31+
<a href="/getting-involved#content" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
32+
<h2 class="text-xl font-semibold mb-2">Blogs & Writing</h2>
33+
<p>Contribute to website content, blogs, newsletters, and technical guides.</p>
34+
</a>
3235

33-
<!-- Workshop Card -->
34-
<a href="/getting-involved#workshop" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
35-
<h2 class="text-xl font-semibold mb-2">Workshop</h2>
36-
<p>Participate in workshops to share your expertise and insights.</p>
37-
</a>
36+
<!-- Workshop Card -->
37+
<a href="/getting-involved#workshop" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
38+
<h2 class="text-xl font-semibold mb-2">Workshop</h2>
39+
<p>Participate in workshops to share your expertise and insights.</p>
40+
</a>
3841

39-
<!-- Code Card -->
40-
<a href="/getting-involved#code" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
41-
<h2 class="text-xl font-semibold mb-2">Code</h2>
42-
<p>Contribute to ONM projects or host your own project with ONM.</p>
43-
</a>
42+
<!-- Code Card -->
43+
<a href="/getting-involved#code" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
44+
<h2 class="text-xl font-semibold mb-2">Code</h2>
45+
<p>Contribute to ONM projects or host your own project with ONM.</p>
46+
</a>
4447

45-
<!-- Discord Card -->
46-
<a href="#discord" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
47-
<h2 class="text-xl font-semibold mb-2">Discord</h2>
48-
<p>Join our welcoming and collaborative community on Discord.</p>
49-
</a>
50-
</div>
48+
<!-- Discord Card -->
49+
<a href="#discord" class="bg-blue-100 dark:bg-darkmode-theme-light p-4 rounded-lg">
50+
<h2 class="text-xl font-semibold mb-2">Discord</h2>
51+
<p>Join our welcoming and collaborative community on Discord.</p>
52+
</a>
53+
</div>
5154

5255

5356
</div>
5457
<div class="mb:md-0 md:col-5 lg:col-4 mb-6">
58+
{{ $events := where .Site.RegularPages "Section" "workshops" }}
59+
{{ $upcomingEvents := where $events "Params.upcoming" true }}
60+
{{ if $upcomingEvents }}
5561
<div class="bg-theme-light dark:bg-darkmode-theme-light rounded p-7">
5662
<h3 class="pb-5 text-xl">Next Workshop</h3>
57-
{{ $events := where .Site.RegularPages "Section" "workshops" }}
58-
{{ $upcomingEvents := where $events "Params.upcoming" true }}
5963
{{ $sortedUpcomingEvents := sort $upcomingEvents "Params.date" }}
6064
{{ with index $sortedUpcomingEvents 0 }}
6165
<!-- Display the nearest upcoming event -->
@@ -64,11 +68,15 @@ <h3 class="pb-5 text-xl">Next Workshop</h3>
6468
</div>
6569
{{ end }}
6670
</div>
71+
{{ end }}
6772
</div>
6873
<div class="pt-2 pb-0">
69-
<div class="bg-theme-light dark:bg-darkmode-theme-light rounded p-5">
70-
{{ partial "components/upcoming-wide" . }}
71-
</div></div>
74+
{{ if gt (len $upcomingEvents) 1}} <div class="bg-theme-light dark:bg-darkmode-theme-light rounded mt-3 p-5">
75+
{{ partial "components/upcoming-wide" . }}
76+
</div>
77+
{{ end }}
78+
79+
</div>
7280
</div>
7381
</div>
7482
</div>

themes/hugoplate/layouts/partials/components/session-card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h4 class="mb-3">
2121
{{ end }}
2222
{{ if .Params.upcoming }}
2323
<li class="mr-4 inline-block">
24-
<i class="fa-regular fa-clock mr-2"></i>{{ partial "timeConv" .Params.start_time }} - {{ partial "timeConv" .Params.end_time }} {{ .Params.time_zone }}
24+
<i class="fa-regular fa-clock mr-2"></i>{{ .Params.start_time }} - {{ .Params.end_time }} {{ .Params.time_zone }}
2525
</li>
2626
{{ end }}
2727
</ul>

themes/hugoplate/layouts/partials/components/upcoming-events.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</a>
1919
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-circle-user mr-2"></i>{{delimit .Params.author ", "}}<br>
2020
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-calendar mr-2"></i>{{ dateFormat "2006, Jan 2" $event.Params.Date }}&nbsp;&nbsp;&nbsp;
21-
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-clock mr-2"></i>{{ partial "timeConv" $event.Params.start_time }}- {{ partial "timeConv" $event.Params.end_time}} {{ $event.Params.time_zone }}
21+
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-clock mr-2"></i>{{ .Params.start_time }} - {{ .Params.end_time}} {{ $event.Params.time_zone }}
2222
</div>
2323

2424
</div>

themes/hugoplate/layouts/partials/components/upcoming-wide.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h3 class="text-xl pb-4">Upcoming Workshops</h3>
2020
</a>
2121
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-circle-user mr-2"></i>{{delimit .Params.author ", "}}<br>
2222
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-calendar mr-2"></i>{{ dateFormat "2006, Jan 2" $event.Params.Date }}&nbsp;&nbsp;&nbsp;
23-
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-clock mr-2"></i>{{ partial "timeConv" $event.Params.start_time }}- {{ partial "timeConv" $event.Params.end_time}} {{ $event.Params.time_zone }}
23+
<i class="fa-regular dark:text-gray-300 text-gray-600 fa-clock mr-2"></i>{{ .Params.start_time }} - {{ .Params.end_time}} {{ $event.Params.time_zone }}
2424
</div>
2525
</div>
2626
{{ end }}

themes/hugoplate/layouts/partials/essentials/head.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
{{ if .IsHome }}
44
{{ $title = printf "%s" .Site.Params.homepageTitle }}
55
{{ else }}
6-
{{ $pathParts := split .File.Dir "/" }}
7-
{{ $numParts := len $pathParts }}
6+
{{ $type := .Type }}
7+
{{ $product := .Params.product }}
88

9-
{{ if and (eq (index $pathParts 1) "hardware") (gt $numParts 2) (ne (index $pathParts 2) "") }}
10-
{{ $title = printf "A Look at %s - %s - %s" .Title "Neuromorphic Chip" .Site.Title}}
9+
{{ if (and (eq $type "neuromorphic-hardware") $product) }}
10+
{{ $title = printf "A Look at %s - %s - %s" .Page.Title "Neuromorphic Chip" .Site.Title}}
1111
{{ else }}
12-
{{ $title = printf "%s - %s" .Title .Site.Title }}
12+
{{ $title = printf "%s - %s" .Page.Title .Site.Title }}
1313
{{ end }}
1414
{{ end }}
1515

16+
1617
<title>{{ $title }}</title>
1718

1819
<meta

themes/hugoplate/layouts/workshops/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"Telegram" false) }}
1818
</div>
1919
<div class="px-7 pt-7 bg-theme-light dark:bg-darkmode-theme-light rounded">
20-
<h3 class="pb-5 text-xl">Upcoming Workshops</h3>
20+
<h3 class="pb-5 pt-5 text-xl">Upcoming Workshops</h3>
2121
{{ partial "components/upcoming-events" . }}
2222
<div class="text-right pb-5"> <!-- Right-align the button -->
2323
<a href="/getting-involved/" class="btn-primary btn-sm btn">Host a workshop</a>

themes/hugoplate/layouts/workshops/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<i class="fa-regular fa-clock mr-2"></i>
2323
{{ time.Format ":date_long" .PublishDate }}
2424
{{ if .Params.upcoming }}
25-
{{ partial "timeConv" .Params.start_time }} - {{ partial "timeConv" .Params.end_time }} {{ .Params.time_zone }}
25+
{{ .Params.start_time }} - {{ .Params.end_time }} {{ .Params.time_zone }}
2626
{{ end }}
2727
</li>
2828
<li class=" mr-4 inline-block">

0 commit comments

Comments
 (0)