Skip to content

Commit

Permalink
style: admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
sorax committed Nov 24, 2023
1 parent 08e569a commit d0c02be
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
34 changes: 24 additions & 10 deletions lib/radiator_web/live/admin_live/index.html.heex
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
<section>
<h1>Admin Dashboard</h1>
<div>
<header>
<h1 class="text-4xl">Admin Dashboard</h1>
<p>Tools to create and manage your prodcasts</p>
</header>

<.link href={~p"/admin/accounts"} class="">
Accounts
</.link>

<.link href={~p"/admin/outline"} class="">
Outline
</.link>
</section>
<section class="my-12">
<.link href={~p"/admin/accounts"} class="flex my-6 bg-[#f0f4f4]">
<div class="bg-[#f0f4f4] p-2">
<.icon name="hero-users" class="w-12 h-12" />
</div>
<div class="p-2 my-auto">
Accounts
</div>
</.link>
<.link href={~p"/admin/outline"} class="flex my-6 bg-[#f0f4f4]">
<div class="bg-[#f0f4f4] p-2">
<.icon name="hero-list-bullet" class="w-12 h-12" />
</div>
<div class="p-2 my-auto">
Outline
</div>
</.link>
</section>
</div>
6 changes: 3 additions & 3 deletions test/radiator_web/live/admin_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule RadiatorWeb.AdminLiveTest do
end
end

describe "Admin page has links" do
describe "Admin page contains" do
setup %{conn: conn} do
user = user_fixture()
%{conn: log_in_user(conn, user)}
Expand All @@ -31,7 +31,7 @@ defmodule RadiatorWeb.AdminLiveTest do

{:ok, conn} =
live
|> element(~s|main a:fl-contains("Accounts")|)
|> element(~s|main a[href="/admin/accounts"]|)
|> render_click()
|> follow_redirect(conn, ~p"/admin/accounts")

Expand All @@ -43,7 +43,7 @@ defmodule RadiatorWeb.AdminLiveTest do

{:ok, conn} =
live
|> element(~s|main a:fl-contains("Outline")|)
|> element(~s|main a[href="/admin/outline"]|)
|> render_click()
|> follow_redirect(conn, ~p"/admin/outline")

Expand Down

0 comments on commit d0c02be

Please sign in to comment.