-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update home design and start adding new domain to presentation (#…
…103)
- Loading branch information
Showing
6 changed files
with
117 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,39 @@ | ||
<header class="px-4 sm:px-6 lg:px-8"> | ||
<div class="flex items-center justify-between border-b border-zinc-100 py-3 text-sm"> | ||
<div class="flex items-center gap-4"> | ||
<.link href={~p"/"}>Flick</.link> | ||
<%!-- Logo and Navigation --%> | ||
<section class="bg-gradient-to-r from-teal-500 to-blue-500 py-4"> | ||
<FlickWeb.UI.page_column> | ||
<div class="text-4xl"> | ||
<div class="flex justify-between"> | ||
<.link | ||
class="font-bold text-white drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]" | ||
href={~p"/"} | ||
> | ||
RankedVoting<span class="text-2xl">.app</span> | ||
</.link> | ||
<.button class="shadow-none"> | ||
<.link navigate={~p"/ballot/new"}> | ||
Create Ballot | ||
</.link> | ||
</.button> | ||
</div> | ||
</div> | ||
<div class="flex items-center gap-4 font-semibold leading-6 text-zinc-900"> | ||
<a href="https://github.com/zorn/flick" class="hover:text-zinc-700"> | ||
GitHub | ||
</a> | ||
</div> | ||
</div> | ||
</header> | ||
<main class="px-4 py-20 sm:px-6 lg:px-8"> | ||
<div class="mx-auto max-w-5xl"> | ||
</FlickWeb.UI.page_column> | ||
</section> | ||
|
||
<%!-- Page Content --%> | ||
<section> | ||
<FlickWeb.UI.page_column class="my-4"> | ||
<.flash_group flash={@flash} /> | ||
<%= @inner_content %> | ||
</div> | ||
</main> | ||
</FlickWeb.UI.page_column> | ||
</section> | ||
|
||
<%!-- Footer --%> | ||
<section class="mt-8"> | ||
<hr class="mb-4" /> | ||
<FlickWeb.UI.page_column class="text-center"> | ||
<a href="https://github.com/zorn/flick" class="underline"> | ||
GitHub Project | ||
</a> | ||
• <a href="mailto:[email protected]" class="underline">Contact</a> | ||
</FlickWeb.UI.page_column>. | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
defmodule FlickWeb.UI do | ||
@moduledoc """ | ||
Domain-specific components to express the the UI for Flick. | ||
""" | ||
|
||
use Phoenix.Component | ||
use FlickWeb, :verified_routes | ||
|
||
alias Phoenix.LiveView.Rendered | ||
alias Phoenix.LiveView.Socket | ||
|
||
slot :inner_block, required: true | ||
attr :rest, :global | ||
|
||
@spec page_column(Socket.assigns()) :: Rendered.t() | ||
def page_column(assigns) do | ||
~H""" | ||
<div class="max-w-2xl mx-auto px-4"> | ||
<div {@rest}> | ||
<%= render_slot(@inner_block) %> | ||
</div> | ||
</div> | ||
""" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters