Skip to content

Commit cd1f530

Browse files
committed
update homepage
1 parent 925b33c commit cd1f530

File tree

1 file changed

+69
-75
lines changed

1 file changed

+69
-75
lines changed

lib/algora_web/live/home_live.ex

Lines changed: 69 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ defmodule AlgoraWeb.HomeLive do
2424

2525
require Logger
2626

27+
#
28+
2729
@impl true
2830
def mount(%{"country_code" => country_code}, _session, socket) do
2931
Gettext.put_locale(AlgoraWeb.Gettext, Algora.Util.locale_from_country_code(country_code))
@@ -196,11 +198,17 @@ defmodule AlgoraWeb.HomeLive do
196198
/>
197199
</div>
198200
<div class="text-base leading-6 flex-1">
199-
<div class="text-2xl font-semibold text-foreground">GitHub cofounder funds new feature in Zed Editor</div>
200-
<div class="text-lg font-medium text-muted-foreground">Zed Editor, Scott Chacon</div>
201+
<div class="text-2xl font-semibold text-foreground">
202+
GitHub cofounder funds new feature in Zed Editor
203+
</div>
204+
<div class="text-lg font-medium text-muted-foreground">
205+
Zed Editor, Scott Chacon
206+
</div>
201207
</div>
202-
<.button size="lg" variant="secondary"><Logos.github class="size-4 mr-4 -ml-2" /> View issue</.button>
203-
</.link>
208+
<.button size="lg" variant="secondary">
209+
<Logos.github class="size-4 mr-4 -ml-2" /> View issue
210+
</.button>
211+
</.link>
204212
205213
<.link
206214
href="https://github.com/PX4/PX4-Autopilot/issues/22464"
@@ -213,50 +221,70 @@ defmodule AlgoraWeb.HomeLive do
213221
src="https://pbs.twimg.com/profile_images/1277333515412045824/Xys6F_6E_400x400.jpg"
214222
alt="Alex Klimaj"
215223
/>
216-
<img class="h-16 w-16 z-20" src="https://github.com/PX4.png" alt="PX4" />
224+
<img class="h-16 w-16 z-20" src="https://github.com/PX4.png" alt="PX4" />
217225
<img
218226
class="h-20 w-20 rounded-full z-10"
219227
src="https://pbs.twimg.com/profile_images/1768744461243387905/AHYQnqY9_400x400.jpg"
220228
alt="Andrew Wilkins"
221229
/>
222230
</div>
223231
<div class="text-base leading-6 flex-1">
224-
<div class="text-2xl font-semibold text-foreground">DefenceTech CEOs fund obstacle avoidance in PX4 Drone Autopilot</div>
225-
<div class="text-lg font-medium text-muted-foreground">Alex Klimaj, CEO/CTO of ARK Electronics, and Andrew Wilkins, CEO of Ascend Engineering</div>
232+
<div class="text-2xl font-semibold text-foreground">
233+
DefenceTech CEOs fund obstacle avoidance in PX4 Drone Autopilot
234+
</div>
235+
<div class="text-lg font-medium text-muted-foreground">
236+
Alex Klimaj, CEO/CTO of ARK Electronics, and Andrew Wilkins, CEO of Ascend Engineering
237+
</div>
226238
</div>
227-
<.button size="lg" variant="secondary"><Logos.github class="size-4 mr-4 -ml-2" /> View issue</.button>
239+
<.button size="lg" variant="secondary">
240+
<Logos.github class="size-4 mr-4 -ml-2" /> View issue
241+
</.button>
228242
</.link>
229243
230-
<div
231-
class="relative grid grid-cols-5 items-center w-full gap-x-4 rounded-xl bg-card/50 p-6 ring-2 ring-success/20 hover:bg-card/70 transition-colors"
232-
>
244+
<div class="relative grid grid-cols-5 items-center w-full gap-x-4 rounded-xl bg-card/50 p-6 ring-2 ring-success/20 hover:bg-card/70 transition-colors">
233245
<div class="col-span-2 text-base leading-6 flex-1">
234-
<div class="text-2xl font-semibold text-foreground">Fund any issue <span class="text-success">in seconds</span></div>
235-
<div class="text-lg font-medium text-muted-foreground">Help improve the OSS you love and rely on</div>
246+
<div class="text-2xl font-semibold text-foreground">
247+
Fund any issue <span class="text-success">in seconds</span>
248+
</div>
249+
<div class="text-lg font-medium text-muted-foreground">
250+
Help improve the OSS you love and rely on
251+
</div>
236252
<div class="pt-1 col-span-3 text-sm text-muted-foreground space-y-0.5">
237-
<div><.icon name="tabler-check" class="h-4 w-4 mr-1 text-success-400" /> Pay when PRs are merged</div>
238-
<div><.icon name="tabler-check" class="h-4 w-4 mr-1 text-success-400" /> Pool bounties with other sponsors</div>
239-
<div><.icon name="tabler-check" class="h-4 w-4 mr-1 text-success-400" /> Algora handles invoices, payouts, compliance & 1099s</div>
240-
</div>
253+
<div>
254+
<.icon name="tabler-check" class="h-4 w-4 mr-1 text-success-400" />
255+
Pay when PRs are merged
256+
</div>
257+
<div>
258+
<.icon name="tabler-check" class="h-4 w-4 mr-1 text-success-400" />
259+
Pool bounties with other sponsors
260+
</div>
261+
<div>
262+
<.icon name="tabler-check" class="h-4 w-4 mr-1 text-success-400" />
263+
Algora handles invoices, payouts, compliance & 1099s
264+
</div>
265+
</div>
241266
</div>
242-
<.form for={@bounty_form} phx-submit="create_bounty" class="col-span-3 grid grid-cols-3 gap-6 w-full">
243-
<.input
244-
label="URL"
245-
field={@bounty_form[:url]}
246-
placeholder="https://github.com/owner/repo/issues/1337"
247-
/>
248-
<.input
249-
label="Amount"
250-
icon="tabler-currency-dollar"
251-
field={@bounty_form[:amount]}
252-
class="placeholder:text-success"
253-
/>
254-
<div class="flex flex-col items-center gap-2">
255-
<div class="text-sm text-muted-foreground">No credit card required</div>
256-
<.button size="lg" class="w-full" >Fund issue</.button>
257-
</div>
258-
259-
</.form>
267+
<.form
268+
for={@bounty_form}
269+
phx-submit="create_bounty"
270+
class="col-span-3 grid grid-cols-3 gap-6 w-full"
271+
>
272+
<.input
273+
label="URL"
274+
field={@bounty_form[:url]}
275+
placeholder="https://github.com/owner/repo/issues/1337"
276+
/>
277+
<.input
278+
label="Amount"
279+
icon="tabler-currency-dollar"
280+
field={@bounty_form[:amount]}
281+
class="placeholder:text-success"
282+
/>
283+
<div class="flex flex-col items-center gap-2">
284+
<div class="text-sm text-muted-foreground">No credit card required</div>
285+
<.button size="lg" class="w-full">Fund issue</.button>
286+
</div>
287+
</.form>
260288
</div>
261289
</div>
262290
</div>
@@ -320,7 +348,7 @@ defmodule AlgoraWeb.HomeLive do
320348
</div>
321349
</section>
322350
323-
<section class="bg-muted/20 border-t py-16 sm:py-24">
351+
<section class="bg-black border-t py-16 sm:py-24">
324352
<div class="mx-auto max-w-7xl px-6 lg:px-8">
325353
<h2 class="font-display text-3xl font-semibold tracking-tight text-foreground sm:text-4xl text-center mb-4">
326354
Streamline Contract Work
@@ -524,7 +552,7 @@ defmodule AlgoraWeb.HomeLive do
524552
</div>
525553
</section>
526554
527-
<section class="bg-muted/20 border-t py-16 sm:py-24">
555+
<section class="bg-black border-t py-16 sm:py-24">
528556
<div class="mx-auto max-w-7xl px-6 lg:px-8">
529557
<h2 class="font-display text-3xl font-semibold tracking-tight text-foreground sm:text-4xl text-center mb-4">
530558
Hire with Confidence
@@ -758,39 +786,7 @@ defmodule AlgoraWeb.HomeLive do
758786
</div>
759787
</section>
760788
761-
<section class="bg-muted/20 border-t py-16 sm:py-24">
762-
<div class="mx-auto max-w-7xl px-6 lg:px-8">
763-
<h2 class="mb-12 text-center text-3xl font-bold text-popover-foreground">
764-
Frequently asked questions
765-
</h2>
766-
<div class="mx-auto max-w-3xl space-y-4">
767-
<%= for item <- @faq_items do %>
768-
<div class="rounded-lg border bg-background/50">
769-
<button
770-
phx-click={
771-
%JS{}
772-
|> JS.toggle(to: "#faq-#{item.id}")
773-
|> JS.toggle_class("rotate-180", to: "#icon-#{item.id}")
774-
}
775-
class="flex w-full justify-between p-4 text-left"
776-
>
777-
<span class="font-medium text-foreground">{item.question}</span>
778-
<.icon
779-
id={"icon-#{item.id}"}
780-
name="tabler-chevron-down"
781-
class="h-5 w-5 shrink-0 text-muted-foreground transition-transform duration-200"
782-
/>
783-
</button>
784-
<div id={"faq-#{item.id}"} class="hidden p-4 pt-0 text-muted-foreground">
785-
{Phoenix.HTML.raw(item.answer)}
786-
</div>
787-
</div>
788-
<% end %>
789-
</div>
790-
</div>
791-
</section>
792-
793-
<section class="bg-background border-t py-16 sm:py-24">
789+
<section class="bg-black border-t py-16 sm:py-24">
794790
<div class="mx-auto max-w-7xl px-6 lg:px-8">
795791
<h2 class="mb-8 text-3xl font-bold text-card-foreground text-center">
796792
<span class="text-muted-foreground">The open source</span>
@@ -807,7 +803,7 @@ defmodule AlgoraWeb.HomeLive do
807803
</div>
808804
</section>
809805
810-
<div class="bg-muted/20">
806+
<div class="bg-black">
811807
<Footer.footer />
812808
<div class="mx-auto max-w-7xl px-6 pb-4 text-center text-xs text-muted-foreground">
813809
Upwork® is a registered trademark of Upwork Global Inc. Algora is not affiliated with, sponsored by, or endorsed by Upwork Global Inc, mmmkay?
@@ -843,8 +839,7 @@ defmodule AlgoraWeb.HomeLive do
843839
|> redirect(to: ~p"/")}
844840

845841
{:error, :already_exists} ->
846-
{:noreply,
847-
put_flash(socket, :warning, "You have already created a bounty for this ticket")}
842+
{:noreply, put_flash(socket, :warning, "You have already created a bounty for this ticket")}
848843

849844
{:error, _reason} ->
850845
{:noreply, put_flash(socket, :error, "Something went wrong")}
@@ -1075,8 +1070,7 @@ defmodule AlgoraWeb.HomeLive do
10751070
"""
10761071
end
10771072

1078-
defp format_money(money),
1079-
do: money |> Money.round(currency_digits: 0) |> Money.to_string!(no_fraction_if_integer: true)
1073+
defp format_money(money), do: money |> Money.round(currency_digits: 0) |> Money.to_string!(no_fraction_if_integer: true)
10801074

10811075
defp format_number(number), do: Number.Delimit.number_to_delimited(number, precision: 0)
10821076

0 commit comments

Comments
 (0)