Skip to content

Commit 690152b

Browse files
committed
fix: miscellanea
1 parent ae2313f commit 690152b

File tree

4 files changed

+68
-16
lines changed

4 files changed

+68
-16
lines changed

lib/algora_web/components/header.ex

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,17 @@ 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 flex items-center"
51+
class="group w-fit outline-none items-center hidden lg:flex"
5252
target="_blank"
5353
rel="noopener"
5454
href={AlgoraWeb.Constants.get(:github_repo_url)}
5555
>
5656
<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-foreground/80 group-hover:text-foreground transition" />
58+
<.icon
59+
name="github"
60+
class="mr-0.5 h-5 shrink-0 justify-start text-foreground/80 group-hover:text-foreground transition"
61+
/>
5962
<span class="hidden xl:block">Star</span>
6063
<span class="font-semibold text-foreground/80 group-hover:text-foreground">
6164
{Algora.Stargazer.count()}
@@ -105,6 +108,23 @@ defmodule AlgoraWeb.Components.Header do
105108
<% end %>
106109
</div>
107110
<div class="py-6 space-y-4">
111+
<.button
112+
:if={Algora.Stargazer.count()}
113+
class="group w-full flex items-center"
114+
target="_blank"
115+
rel="noopener"
116+
variant="secondary"
117+
href={AlgoraWeb.Constants.get(:github_repo_url)}
118+
>
119+
<.icon
120+
name="github"
121+
class="mr-2 h-5 shrink-0 justify-start text-foreground/80 group-hover:text-foreground transition"
122+
/>
123+
<span class="mr-1">Star</span>
124+
<span class="font-semibold text-foreground/80 group-hover:text-foreground">
125+
{Algora.Stargazer.count()}
126+
</span>
127+
</.button>
108128
<.button navigate={~p"/auth/signup"} class="w-full">
109129
Sign up
110130
</.button>

lib/algora_web/components/layouts/user.html.heex

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<div class="flex h-16 shrink-0 items-center">
5050
<.wordmark class="h-8 w-auto text-white" />
5151
</div>
52-
<nav class="flex flex-1 flex-col">
53-
<ul role="list" class="-mx-2 flex-1 space-y-1">
52+
<nav class="flex flex-1 flex-col divide-y divide-border">
53+
<ul role="list" class="-mx-2 space-y-1 pb-6">
5454
<%= for item <- @nav |> List.first() |> Map.get(:items) do %>
5555
<li>
5656
<.link
@@ -70,6 +70,37 @@
7070
</li>
7171
<% end %>
7272
</ul>
73+
74+
<div class="py-6 space-y-4">
75+
<.button
76+
:if={Algora.Stargazer.count()}
77+
class="group w-full flex items-center"
78+
target="_blank"
79+
rel="noopener"
80+
variant="secondary"
81+
href={AlgoraWeb.Constants.get(:github_repo_url)}
82+
>
83+
<.icon
84+
name="github"
85+
class="mr-2 h-5 shrink-0 justify-start text-foreground/80 group-hover:text-foreground transition"
86+
/>
87+
<span class="mr-1">Star</span>
88+
<span class="font-semibold text-foreground/80 group-hover:text-foreground">
89+
{Algora.Stargazer.count()}
90+
</span>
91+
</.button>
92+
<.button :if={!@current_user.handle} navigate={~p"/auth/signup"} class="w-full">
93+
Sign up
94+
</.button>
95+
<.button
96+
:if={!@current_user.handle}
97+
navigate={~p"/auth/login"}
98+
class="w-full"
99+
variant="secondary"
100+
>
101+
Sign in
102+
</.button>
103+
</div>
73104
</nav>
74105
</div>
75106
</div>
@@ -94,7 +125,8 @@
94125
if(@active_tab == item.tab,
95126
do: "bg-gray-800 text-white",
96127
else: "text-gray-400 hover:bg-gray-800 hover:text-white"
97-
)
128+
),
129+
item[:class]
98130
]}
99131
>
100132
<.icon name={item.icon} class="h-6 w-6 shrink-0" />
@@ -200,7 +232,7 @@
200232
<div class="ml-auto flex items-center gap-x-6">
201233
<.link
202234
:if={Algora.Stargazer.count()}
203-
class="group w-fit outline-none"
235+
class="group w-fit outline-none hidden lg:flex"
204236
target="_blank"
205237
rel="noopener"
206238
href={AlgoraWeb.Constants.get(:github_repo_url)}

lib/algora_web/live/org/dashboard_live.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
194194
def render(assigns) do
195195
~H"""
196196
<div class="lg:pr-96">
197-
<div class="container mx-auto max-w-7xl space-y-8 lg:space-y-16 p-8">
197+
<div class="container mx-auto max-w-7xl space-y-8 lg:space-y-16 p-4 sm:p-6 lg:p-8">
198198
<.section :if={@payable_bounties != %{}}>
199199
<.card>
200200
<.card_header>
@@ -1254,7 +1254,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
12541254
>
12551255
<.icon name="tabler-contract" class="size-4 text-current mr-2 -ml-1" /> Contract
12561256
</.button>
1257-
<.dropdown_menu>
1257+
<%!-- <.dropdown_menu>
12581258
<.dropdown_menu_trigger>
12591259
<.button variant="ghost" size="icon">
12601260
<.icon name="tabler-dots" class="h-4 w-4" />
@@ -1271,7 +1271,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
12711271
Remove
12721272
</.dropdown_menu_item>
12731273
</.dropdown_menu_content>
1274-
</.dropdown_menu>
1274+
</.dropdown_menu> --%>
12751275
</div>
12761276
</div>
12771277
</td>

lib/algora_web/live/org/preview_nav.ex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ defmodule AlgoraWeb.Org.PreviewNav do
9999
{:cont, assign(socket, :active_tab, active_tab)}
100100
end
101101

102-
def nav_items(repo_owner, repo_name) do
102+
def nav_items(_repo_owner, _repo_name) do
103103
[
104104
%{
105105
title: "Overview",
106106
items: [
107-
%{
108-
href: "/go/#{repo_owner}/#{repo_name}",
109-
tab: :dashboard,
110-
icon: "tabler-sparkles",
111-
label: "Dashboard"
112-
}
107+
%{href: "/", tab: :home, icon: "tabler-home", label: "Home"},
108+
%{href: ~p"/bounties", tab: :bounties, icon: "tabler-briefcase", label: "Bounties", class: "lg:hidden"},
109+
%{href: ~p"/testimonials", tab: :testimonials, icon: "tabler-quote", label: "Testimonials", class: "lg:hidden"},
110+
%{href: ~p"/crowdfund", tab: :crowdfund, icon: "tabler-heart", label: "Crowdfund", class: "lg:hidden"},
111+
%{href: ~p"/docs", tab: :docs, icon: "tabler-book", label: "Docs", class: "lg:hidden"},
112+
%{href: ~p"/pricing", tab: :pricing, icon: "tabler-credit-card", label: "Pricing", class: "lg:hidden"}
113113
]
114114
}
115115
]

0 commit comments

Comments
 (0)