Skip to content

Commit 64c89bb

Browse files
Add Course Shelf CTA to bootcamp details page
Adds a Course Shelf call-to-action banner on bootcamp pages that links to Course Shelf with a pre-filled search for the bootcamp topic. Changes: - Add Course Shelf CTA badge below bootcamp title - Create sanitize_bootcamp_name helper to clean search terms: - Remove "expert" and "development" keywords - Replace "node backend" with "Node.js" - Include UTM tracking (source: techschool, campaign: bootcamp_details) - Add bilingual support (EN: "on Course Shelf", PT: "no Course Shelf") The CTA uses the same purple-themed styling as the homepage banner for consistency across the site. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f8f1a79 commit 64c89bb

File tree

5 files changed

+78
-36
lines changed

5 files changed

+78
-36
lines changed

lib/techschool_web/live/bootcamp_live/show.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,18 @@ defmodule TechschoolWeb.BootcampLive.Show do
2727
page_description
2828
)
2929
|> assign(:bootcamp, bootcamp)
30+
|> assign(:bootcamp_search_name, sanitize_bootcamp_name(bootcamp.name))
3031
|> ok()
3132
end
3233

34+
defp sanitize_bootcamp_name(name) do
35+
name
36+
|> String.replace(~r/expert/i, "")
37+
|> String.replace(~r/development/i, "")
38+
|> String.replace(~r/node\s+backend/i, "Node.js")
39+
|> String.trim()
40+
end
41+
3342
def build_lesson_url(locale, lesson) do
3443
cond do
3544
lesson.language_names != "" ->

lib/techschool_web/live/bootcamp_live/show.html.heex

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010

1111
<h1 class="text-xl md:text-2xl font-bold mt-2 text-center">{@bootcamp.name}</h1>
1212
</div>
13+
14+
<!-- Course Shelf CTA -->
15+
<a
16+
href={"https://thecourseshelf.com/courses?search=#{URI.encode(@bootcamp_search_name)}&utm_source=techschool&utm_medium=banner&utm_campaign=bootcamp_details"}
17+
target="_blank"
18+
rel="noreferrer"
19+
class="group inline-flex items-center justify-center gap-3 px-6 py-3 bg-purple-900/30 border border-purple-700/50 hover:border-purple-600 rounded-xl backdrop-blur-sm transition-all duration-200 ease-out hover:scale-[1.02] active:scale-95 transform focus:outline-none focus:ring-2 focus:ring-purple-500/50 focus:ring-offset-2 focus:ring-offset-slate-900 mb-6"
20+
>
21+
<img
22+
src={~p"/images/courseshelf-logo.svg"}
23+
alt="Course Shelf"
24+
class="w-5 h-5 md:w-6 md:h-6 shrink-0"
25+
/>
26+
<span class="text-sm md:text-base font-medium text-purple-200 group-hover:text-white transition-colors">
27+
{@bootcamp_search_name} {gettext("on Course Shelf")}
28+
</span>
29+
</a>
30+
1331
<div class="flex flex-col justify-center gap-6 md:gap-8">
1432
<.lesson_card
1533
:for={lesson <- @bootcamp.lessons}

priv/gettext/default.pot

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
msgid ""
1212
msgstr ""
1313

14-
#: lib/techschool_web/live/page_live/home.html.heex:84
14+
#: lib/techschool_web/live/page_live/home.html.heex:70
1515
#, elixir-autogen, elixir-format
1616
msgid "Free technology education for everyone"
1717
msgstr ""
@@ -25,7 +25,7 @@ msgstr ""
2525
#: lib/techschool_web/components/layouts/components/navbar.html.heex:17
2626
#: lib/techschool_web/components/layouts/components/navbar_live.ex:35
2727
#: lib/techschool_web/live/course_live/index.ex:44
28-
#: lib/techschool_web/live/page_live/home.html.heex:186
28+
#: lib/techschool_web/live/page_live/home.html.heex:172
2929
#, elixir-autogen, elixir-format
3030
msgid "Courses"
3131
msgstr ""
@@ -35,7 +35,7 @@ msgstr ""
3535
msgid "Developed by"
3636
msgstr ""
3737

38-
#: lib/techschool_web/live/page_live/home.html.heex:161
38+
#: lib/techschool_web/live/page_live/home.html.heex:147
3939
#, elixir-autogen, elixir-format
4040
msgid "Our mission"
4141
msgstr ""
@@ -46,7 +46,7 @@ msgstr ""
4646
msgid "close"
4747
msgstr ""
4848

49-
#: lib/techschool_web/live/page_live/home.html.heex:87
49+
#: lib/techschool_web/live/page_live/home.html.heex:73
5050
#, elixir-autogen, elixir-format
5151
msgid "Go from zero to your first job without any financial loss"
5252
msgstr ""
@@ -56,12 +56,12 @@ msgstr ""
5656
msgid "Translate"
5757
msgstr ""
5858

59-
#: lib/techschool_web/live/page_live/home.html.heex:164
59+
#: lib/techschool_web/live/page_live/home.html.heex:150
6060
#, elixir-autogen, elixir-format
6161
msgid "TechSchool is all about making tech education accessible to everyone for free. There are tons of awesome courses online, but we don't have big bucks for marketing. So, newbies often run into the expensive courses first, making it seem like you have to shell out a ton of money."
6262
msgstr ""
6363

64-
#: lib/techschool_web/live/page_live/home.html.heex:170
64+
#: lib/techschool_web/live/page_live/home.html.heex:156
6565
#, elixir-autogen, elixir-format
6666
msgid "That's where TechSchool steps in. We're here to shine a light on those awesome free courses that might be flying under the radar. Our website has a bunch of courses covering different areas. The goal? Help anyone go from zero to landing their first job without breaking the bank. We want to tackle the expensive course culture and make tech education fair and equal for everyone."
6767
msgstr ""
@@ -102,7 +102,7 @@ msgstr ""
102102
msgid "TechSchool offers a variety of bootcamps to help you learn the skills you need to start a new career in tech."
103103
msgstr ""
104104

105-
#: lib/techschool_web/live/bootcamp_live/show.html.heex:22
105+
#: lib/techschool_web/live/bootcamp_live/show.html.heex:40
106106
#, elixir-autogen, elixir-format
107107
msgid "Back"
108108
msgstr ""
@@ -124,12 +124,12 @@ msgstr ""
124124
msgid "Fundamentals"
125125
msgstr ""
126126

127-
#: lib/techschool_web/live/page_live/home.html.heex:218
127+
#: lib/techschool_web/live/page_live/home.html.heex:204
128128
#, elixir-autogen, elixir-format
129129
msgid "Huge thanks to our contributors"
130130
msgstr ""
131131

132-
#: lib/techschool_web/live/page_live/home.html.heex:246
132+
#: lib/techschool_web/live/page_live/home.html.heex:232
133133
#, elixir-autogen, elixir-format
134134
msgid "Add course to TechSchool"
135135
msgstr ""
@@ -193,17 +193,17 @@ msgid "new"
193193
msgstr ""
194194

195195
#: lib/techschool_web/components/layouts/components/navbar.html.heex:24
196-
#: lib/techschool_web/live/page_live/home.html.heex:193
196+
#: lib/techschool_web/live/page_live/home.html.heex:179
197197
#, elixir-autogen, elixir-format
198198
msgid "Bootcamps"
199199
msgstr ""
200200

201-
#: lib/techschool_web/live/page_live/home.html.heex:181
201+
#: lib/techschool_web/live/page_live/home.html.heex:167
202202
#, elixir-autogen, elixir-format
203203
msgid "Platform Statistics"
204204
msgstr ""
205205

206-
#: lib/techschool_web/live/page_live/home.html.heex:198
206+
#: lib/techschool_web/live/page_live/home.html.heex:184
207207
#, elixir-autogen, elixir-format
208208
msgid "Total Views"
209209
msgstr ""
@@ -222,3 +222,8 @@ msgstr ""
222222
#, elixir-autogen, elixir-format
223223
msgid "Introducing Course Shelf - A Better Learning Experience"
224224
msgstr ""
225+
226+
#: lib/techschool_web/live/bootcamp_live/show.html.heex:27
227+
#, elixir-autogen, elixir-format
228+
msgid "on Course Shelf"
229+
msgstr ""

priv/gettext/en/LC_MESSAGES/default.po

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgstr ""
1111
"Language: en\n"
1212
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1313

14-
#: lib/techschool_web/live/page_live/home.html.heex:84
14+
#: lib/techschool_web/live/page_live/home.html.heex:70
1515
#, elixir-autogen, elixir-format
1616
msgid "Free technology education for everyone"
1717
msgstr ""
@@ -25,7 +25,7 @@ msgstr ""
2525
#: lib/techschool_web/components/layouts/components/navbar.html.heex:17
2626
#: lib/techschool_web/components/layouts/components/navbar_live.ex:35
2727
#: lib/techschool_web/live/course_live/index.ex:44
28-
#: lib/techschool_web/live/page_live/home.html.heex:186
28+
#: lib/techschool_web/live/page_live/home.html.heex:172
2929
#, elixir-autogen, elixir-format
3030
msgid "Courses"
3131
msgstr ""
@@ -35,7 +35,7 @@ msgstr ""
3535
msgid "Developed by"
3636
msgstr ""
3737

38-
#: lib/techschool_web/live/page_live/home.html.heex:161
38+
#: lib/techschool_web/live/page_live/home.html.heex:147
3939
#, elixir-autogen, elixir-format
4040
msgid "Our mission"
4141
msgstr ""
@@ -46,7 +46,7 @@ msgstr ""
4646
msgid "close"
4747
msgstr ""
4848

49-
#: lib/techschool_web/live/page_live/home.html.heex:87
49+
#: lib/techschool_web/live/page_live/home.html.heex:73
5050
#, elixir-autogen, elixir-format, fuzzy
5151
msgid "Go from zero to your first job without any financial loss"
5252
msgstr ""
@@ -56,12 +56,12 @@ msgstr ""
5656
msgid "Translate"
5757
msgstr "Traduzir"
5858

59-
#: lib/techschool_web/live/page_live/home.html.heex:164
59+
#: lib/techschool_web/live/page_live/home.html.heex:150
6060
#, elixir-autogen, elixir-format
6161
msgid "TechSchool is all about making tech education accessible to everyone for free. There are tons of awesome courses online, but we don't have big bucks for marketing. So, newbies often run into the expensive courses first, making it seem like you have to shell out a ton of money."
6262
msgstr ""
6363

64-
#: lib/techschool_web/live/page_live/home.html.heex:170
64+
#: lib/techschool_web/live/page_live/home.html.heex:156
6565
#, elixir-autogen, elixir-format
6666
msgid "That's where TechSchool steps in. We're here to shine a light on those awesome free courses that might be flying under the radar. Our website has a bunch of courses covering different areas. The goal? Help anyone go from zero to landing their first job without breaking the bank. We want to tackle the expensive course culture and make tech education fair and equal for everyone."
6767
msgstr ""
@@ -102,7 +102,7 @@ msgstr ""
102102
msgid "TechSchool offers a variety of bootcamps to help you learn the skills you need to start a new career in tech."
103103
msgstr ""
104104

105-
#: lib/techschool_web/live/bootcamp_live/show.html.heex:22
105+
#: lib/techschool_web/live/bootcamp_live/show.html.heex:40
106106
#, elixir-autogen, elixir-format
107107
msgid "Back"
108108
msgstr ""
@@ -124,12 +124,12 @@ msgstr ""
124124
msgid "Fundamentals"
125125
msgstr ""
126126

127-
#: lib/techschool_web/live/page_live/home.html.heex:218
127+
#: lib/techschool_web/live/page_live/home.html.heex:204
128128
#, elixir-autogen, elixir-format
129129
msgid "Huge thanks to our contributors"
130130
msgstr ""
131131

132-
#: lib/techschool_web/live/page_live/home.html.heex:246
132+
#: lib/techschool_web/live/page_live/home.html.heex:232
133133
#, elixir-autogen, elixir-format
134134
msgid "Add course to TechSchool"
135135
msgstr ""
@@ -193,17 +193,17 @@ msgid "new"
193193
msgstr ""
194194

195195
#: lib/techschool_web/components/layouts/components/navbar.html.heex:24
196-
#: lib/techschool_web/live/page_live/home.html.heex:193
196+
#: lib/techschool_web/live/page_live/home.html.heex:179
197197
#, elixir-autogen, elixir-format
198198
msgid "Bootcamps"
199199
msgstr ""
200200

201-
#: lib/techschool_web/live/page_live/home.html.heex:181
201+
#: lib/techschool_web/live/page_live/home.html.heex:167
202202
#, elixir-autogen, elixir-format
203203
msgid "Platform Statistics"
204204
msgstr ""
205205

206-
#: lib/techschool_web/live/page_live/home.html.heex:198
206+
#: lib/techschool_web/live/page_live/home.html.heex:184
207207
#, elixir-autogen, elixir-format
208208
msgid "Total Views"
209209
msgstr ""
@@ -222,3 +222,8 @@ msgstr ""
222222
#, elixir-autogen, elixir-format, fuzzy
223223
msgid "Introducing Course Shelf - A Better Learning Experience"
224224
msgstr ""
225+
226+
#: lib/techschool_web/live/bootcamp_live/show.html.heex:27
227+
#, elixir-autogen, elixir-format
228+
msgid "on Course Shelf"
229+
msgstr ""

priv/gettext/pt/LC_MESSAGES/default.po

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgstr ""
1111
"Language: pt\n"
1212
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1313

14-
#: lib/techschool_web/live/page_live/home.html.heex:84
14+
#: lib/techschool_web/live/page_live/home.html.heex:70
1515
#, elixir-autogen, elixir-format
1616
msgid "Free technology education for everyone"
1717
msgstr "Ensino de tecnologia acessível para todos"
@@ -25,7 +25,7 @@ msgstr ""
2525
#: lib/techschool_web/components/layouts/components/navbar.html.heex:17
2626
#: lib/techschool_web/components/layouts/components/navbar_live.ex:35
2727
#: lib/techschool_web/live/course_live/index.ex:44
28-
#: lib/techschool_web/live/page_live/home.html.heex:186
28+
#: lib/techschool_web/live/page_live/home.html.heex:172
2929
#, elixir-autogen, elixir-format
3030
msgid "Courses"
3131
msgstr "Cursos"
@@ -35,7 +35,7 @@ msgstr "Cursos"
3535
msgid "Developed by"
3636
msgstr "Desenvolvido por"
3737

38-
#: lib/techschool_web/live/page_live/home.html.heex:161
38+
#: lib/techschool_web/live/page_live/home.html.heex:147
3939
#, elixir-autogen, elixir-format
4040
msgid "Our mission"
4141
msgstr "Nossa missão"
@@ -46,7 +46,7 @@ msgstr "Nossa missão"
4646
msgid "close"
4747
msgstr ""
4848

49-
#: lib/techschool_web/live/page_live/home.html.heex:87
49+
#: lib/techschool_web/live/page_live/home.html.heex:73
5050
#, elixir-autogen, elixir-format, fuzzy
5151
msgid "Go from zero to your first job without any financial loss"
5252
msgstr "Saia do zero até o primeiro emprego sem ter nenhum prejuízo financeiro"
@@ -56,12 +56,12 @@ msgstr "Saia do zero até o primeiro emprego sem ter nenhum prejuízo financeiro
5656
msgid "Translate"
5757
msgstr "Translate"
5858

59-
#: lib/techschool_web/live/page_live/home.html.heex:164
59+
#: lib/techschool_web/live/page_live/home.html.heex:150
6060
#, elixir-autogen, elixir-format
6161
msgid "TechSchool is all about making tech education accessible to everyone for free. There are tons of awesome courses online, but we don't have big bucks for marketing. So, newbies often run into the expensive courses first, making it seem like you have to shell out a ton of money."
6262
msgstr "O TechSchool foi criado pra tornar o ensino em tecnologia acessível pra todo mundo, de graça. Tem muitos cursos bons na internet, mas a gente não tem dinheiro infinito pra gastar em marketing. Então quem tá começando geralmente esbarra nos cursos caros primeiro, dando a impressão de que precisa gastar muito dinheiro pra entrar na área."
6363

64-
#: lib/techschool_web/live/page_live/home.html.heex:170
64+
#: lib/techschool_web/live/page_live/home.html.heex:156
6565
#, elixir-autogen, elixir-format
6666
msgid "That's where TechSchool steps in. We're here to shine a light on those awesome free courses that might be flying under the radar. Our website has a bunch of courses covering different areas. The goal? Help anyone go from zero to landing their first job without breaking the bank. We want to tackle the expensive course culture and make tech education fair and equal for everyone."
6767
msgstr "É aí que o TechSchool entra na jogada. Estamos aqui para destacar aqueles cursos gratuitos incríveis que podem passar despercebidos. Nosso site oferece uma variedade de cursos em diferentes áreas. A meta é ajudar qualquer pessoa a sair do zero e conseguir o primeiro emprego sem gastar dinheiro. Queremos combater a cultura de bootcamps caros e tornar a educação em tecnologia justa e acessível para todos."
@@ -102,7 +102,7 @@ msgstr "Linguagem de programação"
102102
msgid "TechSchool offers a variety of bootcamps to help you learn the skills you need to start a new career in tech."
103103
msgstr "TechSchool oferece uma variedade de bootcamps para ajudar você a aprender as habilidades necessárias para começar uma nova carreira em tecnologia."
104104

105-
#: lib/techschool_web/live/bootcamp_live/show.html.heex:22
105+
#: lib/techschool_web/live/bootcamp_live/show.html.heex:40
106106
#, elixir-autogen, elixir-format
107107
msgid "Back"
108108
msgstr "Voltar"
@@ -124,12 +124,12 @@ msgstr "Pesquisa sem resultados"
124124
msgid "Fundamentals"
125125
msgstr "Fundamentos"
126126

127-
#: lib/techschool_web/live/page_live/home.html.heex:218
127+
#: lib/techschool_web/live/page_live/home.html.heex:204
128128
#, elixir-autogen, elixir-format
129129
msgid "Huge thanks to our contributors"
130130
msgstr "Agradecimento aos contribuidores"
131131

132-
#: lib/techschool_web/live/page_live/home.html.heex:246
132+
#: lib/techschool_web/live/page_live/home.html.heex:232
133133
#, elixir-autogen, elixir-format
134134
msgid "Add course to TechSchool"
135135
msgstr "Adicionar curso no TechSchool"
@@ -193,17 +193,17 @@ msgid "new"
193193
msgstr "novo"
194194

195195
#: lib/techschool_web/components/layouts/components/navbar.html.heex:24
196-
#: lib/techschool_web/live/page_live/home.html.heex:193
196+
#: lib/techschool_web/live/page_live/home.html.heex:179
197197
#, elixir-autogen, elixir-format
198198
msgid "Bootcamps"
199199
msgstr ""
200200

201-
#: lib/techschool_web/live/page_live/home.html.heex:181
201+
#: lib/techschool_web/live/page_live/home.html.heex:167
202202
#, elixir-autogen, elixir-format
203203
msgid "Platform Statistics"
204204
msgstr "Estatísticas da plataforma"
205205

206-
#: lib/techschool_web/live/page_live/home.html.heex:198
206+
#: lib/techschool_web/live/page_live/home.html.heex:184
207207
#, elixir-autogen, elixir-format
208208
msgid "Total Views"
209209
msgstr "Total de visualizações"
@@ -222,3 +222,8 @@ msgstr "Carregando mais cursos..."
222222
#, elixir-autogen, elixir-format
223223
msgid "Introducing Course Shelf - A Better Learning Experience"
224224
msgstr "Apresentando Course Shelf - Uma Experiência de Aprendizado Melhor"
225+
226+
#: lib/techschool_web/live/bootcamp_live/show.html.heex:27
227+
#, elixir-autogen, elixir-format
228+
msgid "on Course Shelf"
229+
msgstr "no Course Shelf"

0 commit comments

Comments
 (0)