Skip to content

Commit 2fcab1e

Browse files
committed
feat: enhance footer and dashboard with updated contact information
- Added support email and formatted phone number to constants. - Updated footer component to include links for Twitter, phone, and support email. - Refactored dashboard to utilize new constants for displaying contact information. - Improved accessibility by adding rel and target attributes to external links.
1 parent 8c5a607 commit 2fcab1e

File tree

3 files changed

+60
-25
lines changed

3 files changed

+60
-25
lines changed

lib/algora_web/components/footer.ex

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,47 +167,68 @@ defmodule AlgoraWeb.Components.Footer do
167167
</div>
168168
</div>
169169
</div>
170-
<div class="mt-16 border-t border-white/10 pt-8 sm:mt-20 md:flex md:justify-between lg:mt-24">
170+
<div class="mt-16 border-t border-white/10 pt-8 sm:mt-20 flex flex-col md:flex-row md:justify-between md:items-start lg:mt-24 gap-8">
171171
<div class="flex gap-4 sm:gap-6 md:order-2">
172-
<a
172+
<.link
173173
class="rounded-xl border-2 border-gray-500 p-3 text-gray-400 transition-colors hover:border-gray-400 hover:text-gray-300 sm:p-3"
174174
href={Constants.get(:discord_url)}
175+
rel="noopener"
176+
target="_blank"
175177
>
176178
<span class="sr-only">Discord</span>
177179
<.icon name="tabler-brand-discord-filled" class="h-6 w-6 sm:h-8 sm:w-8" />
178-
</a>
179-
<a
180+
</.link>
181+
<.link
180182
class="rounded-xl border-2 border-gray-500 p-3 text-gray-400 transition-colors hover:border-gray-400 hover:text-gray-300 sm:p-3"
181183
href={Constants.get(:twitter_url)}
184+
rel="noopener"
185+
target="_blank"
182186
>
183187
<span class="sr-only">X (formerly Twitter)</span>
184188
<.icon name="tabler-brand-x" class="h-6 w-6 sm:h-8 sm:w-8" />
185-
</a>
186-
<a
189+
</.link>
190+
<.link
187191
class="rounded-xl border-2 border-gray-500 p-3 text-gray-400 transition-colors hover:border-gray-400 hover:text-gray-300 sm:p-3"
188192
href={Constants.get(:github_url)}
193+
rel="noopener"
194+
target="_blank"
189195
>
190196
<span class="sr-only">GitHub</span>
191197
<Logos.github class="h-6 w-6 sm:h-8 sm:w-8" />
192-
</a>
193-
<a
198+
</.link>
199+
<.link
194200
class="rounded-xl border-2 border-gray-500 p-3 text-gray-400 transition-colors hover:border-gray-400 hover:text-gray-300 sm:p-3"
195201
href={Constants.get(:youtube_url)}
202+
rel="noopener"
203+
target="_blank"
196204
>
197205
<span class="sr-only">YouTube</span>
198206
<.icon name="tabler-brand-youtube-filled" class="h-6 w-6 sm:h-8 sm:w-8" />
199-
</a>
200-
<a
207+
</.link>
208+
<.link
201209
class="rounded-xl border-2 border-gray-500 p-3 text-gray-400 transition-colors hover:border-gray-400 hover:text-gray-300 sm:p-3"
202210
href={"mailto:" <> Constants.get(:email)}
203211
>
204212
<span class="sr-only">Email</span>
205213
<.icon name="tabler-mail-filled" class="h-6 w-6 sm:h-8 sm:w-8" />
206-
</a>
214+
</.link>
215+
</div>
216+
217+
<div class="flex flex-col gap-4 md:gap-2">
218+
<div class="text-sm font-medium leading-5 text-gray-400 md:text-base">
219+
© {Date.utc_today().year} Algora, Public Benefit Corporation
220+
</div>
221+
222+
<div class="flex flex-col gap-2">
223+
<.link
224+
class="flex w-max items-center gap-2 rounded-full border border-gray-700 py-2 pl-2 pr-3.5 text-xs text-muted-foreground hover:text-foreground transition-colors hover:border-gray-600"
225+
href={"tel:" <> Constants.get(:tel)}
226+
>
227+
<.icon name="tabler-phone-filled" class="size-4" /> Call us
228+
<span>{Constants.get(:tel_formatted)}</span>
229+
</.link>
230+
</div>
207231
</div>
208-
<p class="mt-8 text-sm font-medium leading-5 text-gray-400 md:order-1 md:mt-0 md:text-base">
209-
© {Date.utc_today().year} Algora, Public Benefit Corporation
210-
</p>
211232
</div>
212233
</div>
213234
</footer>

lib/algora_web/constants.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ defmodule AlgoraWeb.Constants do
55
def constants do
66
%{
77
8+
# TODO: use [email protected]
9+
support_email: "[email protected]",
810
twitter_url: "https://x.com/algoraio",
11+
twitter_handle: "algoraio",
912
youtube_url: "https://www.youtube.com/@algora-io",
1013
discord_url: ~p"/discord",
1114
github_url: "https://github.com/algora-io",
@@ -21,7 +24,9 @@ defmodule AlgoraWeb.Constants do
2124
terms_url: ~p"/legal/terms",
2225
blog_url: "https://blog.algora.io",
2326
contact_url: "https://docs.algora.io/contact",
24-
algora_tv_url: "https://algora.tv"
27+
algora_tv_url: "https://algora.tv",
28+
tel_formatted: "+1 (650) 420-2207",
29+
tel: "+16504202207"
2530
}
2631
end
2732

lib/algora_web/live/org/dashboard_live.ex

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
2323
alias Algora.Workspace.Contributor
2424
alias Algora.Workspace.Ticket
2525
alias AlgoraWeb.Components.Logos
26+
alias AlgoraWeb.Constants
2627
alias AlgoraWeb.Forms.BountyForm
2728
alias AlgoraWeb.Forms.ContractForm
2829
alias AlgoraWeb.Forms.TipForm
@@ -462,7 +463,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
462463
</p>
463464
<div class="pt-2 flex gap-2">
464465
<.button
465-
navigate={AlgoraWeb.Constants.get(:calendar_url)}
466+
navigate={Constants.get(:calendar_url)}
466467
variant="purple"
467468
size="lg"
468469
class="drop-shadow-[0_1px_5px_#c084fc80]"
@@ -1412,15 +1413,23 @@ defmodule AlgoraWeb.Org.DashboardLive do
14121413
Chat with founders
14131414
</button>
14141415
</div>
1415-
<div class="flex items-center gap-2">
1416-
<.icon name="tabler-brand-x" class="size-6 text-muted-foreground" /> @algoraio
1417-
</div>
1418-
<div class="flex items-center gap-2">
1419-
<.icon name="tabler-phone" class="size-6 text-muted-foreground" /> +1 (650) 420-2207
1420-
</div>
1421-
<div class="flex items-center gap-2">
1422-
<.icon name="tabler-mail" class="size-6 text-muted-foreground" /> [email protected]
1423-
</div>
1416+
<.link
1417+
href={Constants.get(:twitter_url)}
1418+
rel="noopener"
1419+
target="_blank"
1420+
class="flex items-center gap-2"
1421+
>
1422+
<.icon name="tabler-brand-x" class="size-6 text-muted-foreground" />
1423+
@{Constants.get(:twitter_handle)}
1424+
</.link>
1425+
<.link href={"tel:" <> Constants.get(:tel)} class="flex items-center gap-2">
1426+
<.icon name="tabler-phone" class="size-6 text-muted-foreground" />
1427+
{Constants.get(:tel_formatted)}
1428+
</.link>
1429+
<.link href={"mailto:" <> Constants.get(:support_email)} class="flex items-center gap-2">
1430+
<.icon name="tabler-mail" class="size-6 text-muted-foreground" />
1431+
{Constants.get(:support_email)}
1432+
</.link>
14241433
</div>
14251434
14261435
<%= if @show_chat do %>

0 commit comments

Comments
 (0)