Skip to content

Commit 06a3d71

Browse files
committed
feat: Replace specific CTAs with generic component
This commit replaces the existing blog-contribute-cta.html with a more generic content-contribute-cta.html component and implements it across site.
1 parent ca3e1b4 commit 06a3d71

File tree

12 files changed

+127
-30
lines changed

12 files changed

+127
-30
lines changed

layouts/about/list.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
<div class="content">
88
{{ .Content }}
99
</div>
10+
<div class="mt-16">
11+
{{ partial "components/content-contribute-cta.html" (dict
12+
"icon" "solid rocket"
13+
"title" "Ready to Shape the Future of <span class=\"gradient-text\">Neuromorphics?</span>"
14+
"description" "Join our mission to advance open, collaborative, and accessible neuromorphic computing. Your expertise and passion can make a real difference."
15+
"link" "/getting-involved/"
16+
"link_text" "Get Involved Now"
17+
) }}
18+
</div>
1019
</div>
1120
</div>
1221
</div>

layouts/blog/list.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@
1616
{{ end }}
1717
</div>
1818
{{ partial "components/pagination.html" . }}
19+
20+
<div class="mt-16">
21+
{{ partial "components/content-contribute-cta.html" (dict
22+
"icon" "solid pen-to-square"
23+
"title" "Have an idea? <span class=\"gradient-text\">Share your voice.</span>"
24+
"description" "Open Neuromorphic is a community-driven platform. We invite you to share your research, tutorials, or insights by writing a blog post."
25+
"link" "/getting-involved/write-a-blog-post/"
26+
"link_text" "Write for Our Blog"
27+
) }}
28+
</div>
1929
</div>
20-
<div class="mt-16">
21-
{{ partial "components/blog-contribute-cta.html" . }}
22-
</div>
2330
</div>
2431
</div>
2532
</section>

layouts/blog/single.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@
1919
{{ partial "components/author-bios.html" . }}
2020

2121
<div class="mt-16">
22-
{{ partial "components/blog-contribute-cta.html" . }}
22+
{{ partial "components/content-contribute-cta.html" (dict
23+
"icon" "solid pen-to-square"
24+
"title" "Have an idea? <span class=\"gradient-text\">Share your voice.</span>"
25+
"description" "Open Neuromorphic is a community-driven platform. We invite you to share your research, tutorials, or insights by writing a blog post."
26+
"link" "/getting-involved/write-a-blog-post/"
27+
"link_text" "Write for Our Blog"
28+
) }}
2329
</div>
30+
2431
</article>
2532
{{ partial "components/sidebar-toc-shared.html" . }}
2633
</div>

layouts/contributors/list.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,19 @@ <h2 class="text-3xl font-bold mb-6 pb-2 border-b border-border dark:border-darkm
181181
{{ end }}
182182
</div>
183183
{{ end }}
184+
{{ if not $uniqueYearsSorted }}
185+
<p class="text-center text-xl">No contributions found with yearly data.</p>
186+
{{ end }}
184187

185-
{{ if not $uniqueYearsSorted }}
186-
<p class="text-center text-xl">No contributions found with yearly data.</p>
187-
{{ end }}
188-
</div>
188+
<div class="mt-8">
189+
{{ partial "components/content-contribute-cta.html" (dict
190+
"icon" "solid user-group"
191+
"title" "Ready to <span class=\"gradient-text\">Join Us?</span>"
192+
"description" "Become part of our growing community of researchers, developers, and enthusiasts. Explore the many ways you can contribute to the future of open-source neuromorphic computing."
193+
"link" "/getting-involved/"
194+
"link_text" "See How to Get Involved"
195+
) }}
196+
</div>
197+
</div>
189198
</section>
190199
{{ end }}

layouts/neuromorphic-computing/list.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ <h3 class="section-title text-3xl font-semibold mb-3">Blog</h3>
102102
</div>
103103
</div>
104104

105+
<div class="mt-16">
106+
{{ partial "components/content-contribute-cta.html" (dict
107+
"icon" "solid brain"
108+
"title" "Join the <span class=\"gradient-text\">Conversation</span>"
109+
"description" "The Open Neuromorphic community thrives on collaboration. Join our Discord, attend an event, or contribute to a project to help push the boundaries of brain-inspired computing."
110+
"link" "/getting-involved/"
111+
"link_text" "Find Your Place in Our Community"
112+
) }}
113+
</div>
114+
105115
</div>
106116
</section>
107117
{{ end }}

layouts/neuromorphic-hardware/list.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ <h2 class="text-3xl font-bold mb-6 pb-2 border-primary dark:border-darkmode-prim
3030
{{ end }}
3131
</ul>
3232

33+
<div class="max-w-4xl mx-auto mt-12 mb-16">
34+
{{ partial "components/content-contribute-cta.html" (dict
35+
"icon" "solid microchip"
36+
"title" "Help Us <span class=\"gradient-text\">Improve this Guide</span>"
37+
"description" "Our hardware guide is community-maintained. If you know of a chip we should add, see an error, or have updated information, please let us know by opening an issue on our GitHub repository."
38+
"link" "https://github.com/open-neuromorphic/open-neuromorphic.github.io/issues/new/choose"
39+
"link_text" "Suggest an Edit on GitHub"
40+
) }}
41+
</div>
42+
3343
<div id="glossary" class="pt-12 max-w-4xl mx-auto">
3444
<h2 class="text-3xl font-bold text-center mb-8">Glossary of Terms</h2>
3545
<details class="bg-theme-light dark:bg-darkmode-theme-light rounded-lg shadow-md p-6 cursor-pointer">

layouts/neuromorphic-software/list.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020
{{ partial "components/software-categories" . }}
2121
</div>
2222
</div>
23+
24+
<div class="mt-16">
25+
{{ partial "components/content-contribute-cta.html" (dict
26+
"icon" "solid code"
27+
"title" "Know a Tool <span class=\"gradient-text\">We Missed?</span>"
28+
"description" "Help us keep the software guide comprehensive and up-to-date. Suggest new frameworks, data tools, or corrections by opening an issue on our GitHub repository."
29+
"link" "https://github.com/open-neuromorphic/open-neuromorphic.github.io/issues/new/choose"
30+
"link_text" "Suggest an Addition on GitHub"
31+
) }}
32+
</div>
33+
2334
</div>
2435
</section>
2536
{{ end }}

layouts/partials/components/blog-contribute-cta.html

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{ $icon := .icon | default "solid pen-to-square" }}
2+
{{ $title := .title | default "Have an idea? <span class=\"gradient-text\">Share your voice.</span>" }}
3+
{{ $description := .description | default "Open Neuromorphic is a community-driven platform. We invite you to share your research, tutorials, or insights with a global audience of neuromorphic enthusiasts." }}
4+
{{ $link := .link | default "/getting-involved/" }}
5+
{{ $link_text := .link_text | default "Learn How to Contribute" }}
6+
7+
<div class="p-8 rounded-lg bg-theme-light dark:bg-darkmode-theme-light shadow-lg">
8+
<div class="flex flex-col md:flex-row items-center text-center md:text-left gap-8">
9+
<div class="flex-shrink-0">
10+
{{ $icon_data := partial "helpers/parse-fa-class.html" $icon }}
11+
{{ partial "icon.html" (dict "style" $icon_data.style "name" $icon_data.name "class" "text-6xl text-primary dark:text-darkmode-primary") }}
12+
</div>
13+
<div class="flex-grow">
14+
<h2 class="text-3xl font-bold mb-2">
15+
{{ $title | safeHTML }}
16+
</h2>
17+
<p class="text-lg text-gray-600 dark:text-gray-400 mb-4">
18+
{{ $description | markdownify }}
19+
</p>
20+
<a href="{{ $link | relLangURL }}" class="btn btn-new-primary">
21+
{{ $link_text }}
22+
</a>
23+
</div>
24+
</div>
25+
</div>

layouts/partials/event-single-layout.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
{{ partial $sidebar_content_partial $page_context }}
2727
</div>
2828
{{ partial "components/speaker-details.html" $page_context }}
29+
30+
<div class="lg:col-12 mt-16">
31+
{{ partial "components/content-contribute-cta.html" (dict
32+
"icon" "solid chalkboard-user"
33+
"title" "Inspired? <span class=\"gradient-text\">Host an event.</span>"
34+
"description" "Share your expertise with the community by hosting a workshop, student talk, or hacking hour. It's a great way to get feedback and help others learn."
35+
"link" "/getting-involved/host-an-event/"
36+
"link_text" "Learn How to Host"
37+
) }}
38+
</div>
2939
</article>
3040

3141
{{ $related := (where site.RegularPages "Section" $related_section_name) }}

layouts/partials/helpers/parse-fa-class.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
{{- $parts := split $classString " " -}}
33
{{- $style := "solid" -}}
44
{{- $name := "" -}}
5+
56
{{- range $part := $parts -}}
6-
{{- if or (eq $part "fas") (eq $part "fa-solid") -}}{{- $style = "solid" -}}
7-
{{- else if or (eq $part "far") (eq $part "fa-regular") -}}{{- $style = "regular" -}}
8-
{{- else if or (eq $part "fab") (eq $part "fa-brands") -}}{{- $style = "brands" -}}
9-
{{- else if hasPrefix $part "fa-" -}}{{- $name = strings.TrimPrefix "fa-" $part -}}
7+
{{- if or (eq $part "fas") (eq $part "fa-solid") (eq $part "solid") -}}
8+
{{- $style = "solid" -}}
9+
{{- else if or (eq $part "far") (eq $part "fa-regular") (eq $part "regular") -}}
10+
{{- $style = "regular" -}}
11+
{{- else if or (eq $part "fab") (eq $part "fa-brands") (eq $part "brands") -}}
12+
{{- $style = "brands" -}}
13+
{{- else -}}
14+
{{- /* If it's not a style keyword, it must be the name */ -}}
15+
{{- $name = strings.TrimPrefix "fa-" $part -}}
1016
{{- end -}}
1117
{{- end -}}
18+
1219
{{- return (dict "style" $style "name" $name) -}}

layouts/partials/shared/event-list-page.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,15 @@
7171
</div>
7272
{{ end }}
7373
</div>
74+
75+
<div class="mt-8">
76+
{{ partial "components/content-contribute-cta.html" (dict
77+
"icon" "solid chalkboard-user"
78+
"title" "Inspired? <span class=\"gradient-text\">Host an event.</span>"
79+
"description" "Share your expertise with the community by hosting a workshop, student talk, or hacking hour. It's a great way to get feedback and help others learn."
80+
"link" "/getting-involved/host-an-event/"
81+
"link_text" "Learn How to Host"
82+
) }}
83+
</div>
7484
</div>
7585
</section>

0 commit comments

Comments
 (0)