Skip to content

Commit 4ce2b4a

Browse files
committed
refactor: update header component styles for improved visual consistency
- Removed unused import from the router file. - Adjusted CSS classes in the header component for better text visibility and hover effects. - Enhanced layout properties for buttons and links to ensure a cohesive design across the header.
1 parent fa7d5e9 commit 4ce2b4a

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

lib/algora_web/components/header.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ defmodule AlgoraWeb.Components.Header do
2727
<div class="hidden lg:flex lg:gap-x-12">
2828
<.link
2929
href={AlgoraWeb.Constants.get(:docs_url)}
30-
class="text-sm/6 font-semibold text-muted-foreground hover:text-foreground"
30+
class="text-sm/6 font-medium text-foreground/80 hover:text-foreground"
3131
>
3232
Docs
3333
</.link>
3434
<.link
3535
href={AlgoraWeb.Constants.get(:blog_url)}
36-
class="text-sm/6 font-semibold text-muted-foreground hover:text-foreground"
36+
class="text-sm/6 font-semibold text-foreground/80 hover:text-foreground"
3737
>
3838
Blog
3939
</.link>
4040
<.link
4141
navigate={~p"/pricing"}
42-
class="text-sm/6 font-semibold text-muted-foreground hover:text-foreground"
42+
class="text-sm/6 font-semibold text-foreground/80 hover:text-foreground"
4343
>
4444
Pricing
4545
</.link>
@@ -48,25 +48,25 @@ defmodule AlgoraWeb.Components.Header do
4848
<div class="hidden lg:flex lg:flex-1 lg:justify-end gap-2">
4949
<.link
5050
:if={Algora.Stargazer.count()}
51-
class="group w-fit outline-none"
51+
class="group w-fit outline-none flex items-center"
5252
target="_blank"
5353
rel="noopener"
5454
href={AlgoraWeb.Constants.get(:github_url)}
5555
>
56-
<div class="rounded-[3px] hidden h-8 shrink-0 select-none items-center justify-center whitespace-nowrap bg-transparent p-2 text-center text-sm font-semibold transition duration-150 hover:bg-gray-850 disabled:opacity-50 group-focus:outline-none group-disabled:pointer-events-none group-disabled:opacity-75 lg:flex">
56+
<div class="rounded-[3px] hidden shrink-0 select-none items-center justify-center whitespace-nowrap bg-transparent text-center text-sm font-semibold transition duration-150 hover:bg-gray-850 disabled:opacity-50 group-focus:outline-none group-disabled:pointer-events-none group-disabled:opacity-75 lg:flex">
5757
<div class="flex w-full items-center justify-center gap-x-1">
58-
<AlgoraWeb.Components.Logos.github class="mr-0.5 h-5 shrink-0 justify-start text-gray-300 transition" />
58+
<AlgoraWeb.Components.Logos.github class="mr-0.5 h-5 shrink-0 justify-start text-foreground/80 group-hover:text-foreground transition" />
5959
<span class="hidden xl:block">Star</span>
60-
<span class="font-semibold text-gray-300">
60+
<span class="font-semibold text-foreground/80 group-hover:text-foreground">
6161
{Algora.Stargazer.count()}
6262
</span>
6363
</div>
6464
</div>
6565
</.link>
66-
<.button navigate={~p"/auth/login"} variant="ghost">
66+
<.button navigate={~p"/auth/login"} variant="ghost" class="font-semibold text-foreground/80 hover:text-foreground">
6767
Sign in
6868
</.button>
69-
<.button navigate={~p"/auth/signup"} variant="subtle">
69+
<.button navigate={~p"/auth/signup"} variant="subtle" class="font-semibold">
7070
Sign up
7171
</.button>
7272
</div>

lib/algora_web/router.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ defmodule AlgoraWeb.Router do
55
import AlgoraWeb.UserAuth, only: [fetch_current_user: 2, require_authenticated_admin: 2]
66
import AlgoraWeb.VisitorCountry, only: [fetch_current_country: 2]
77
import Oban.Web.Router
8-
import Phoenix.LiveDashboard.Router, only: [live_dashboard: 2]
98

109
pipeline :browser do
1110
plug :accepts, ["html"]

0 commit comments

Comments
 (0)