Skip to content

Commit

Permalink
feat: Making buttons better. Removing unnecessary code. #37
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Dec 9, 2022
1 parent d32c90d commit 558b07d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
5 changes: 0 additions & 5 deletions lib/app_web/controllers/item_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ defmodule AppWeb.ItemController do
%Item{}
end

person_email = ""
if Map.has_key?(conn.assigns, :person) do
person_email = Map.get(conn.assigns.person, :email)
end

case Map.has_key?(conn.assigns, :person) do
false ->
items = []
Expand Down
24 changes: 11 additions & 13 deletions lib/app_web/controllers/item_html/index.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,21 @@
<% end %>
</section>
<div class="fixed right-0 mr-10">
<button
class="inline-block px-6 py-2.5 bg-[#fea5a5] text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-[#f76e6e] hover:shadow-lg focus:bg-[#f76e6e] focus:shadow-lg focus:outline-none focus:ring-0 active:bg-[#a23434] active:shadow-lg transition duration-150 ease-in-out"
>
<a href="/logout">
Logout
</a>
</button>
<.link
class="inline-block px-6 py-2.5 bg-[#fea5a5] text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-[#f76e6e] hover:shadow-lg focus:bg-[#f76e6e] focus:shadow-lg focus:outline-none focus:ring-0 active:bg-[#a23434] active:shadow-lg transition duration-150 ease-in-out"
href="/logout"
>
Logout
</.link>
</div>
<% else %>
<div class="fixed h-screen ml-[25%] flex justify-center items-center">
<button
<.link
class="max-h-[35px] inline-block px-6 py-2.5 bg-blue-300 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out"
>
<a href="/login">
Login
</a>
</button>
href="/login"
>
Login
</.link>
</div>
<% end %>
</div>

0 comments on commit 558b07d

Please sign in to comment.