refactor(layout): use heex templates
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
parent
2fa19381dc
commit
2ddccce85d
@ -1,10 +0,0 @@
|
||||
<ul>
|
||||
<%= if @current_user do %>
|
||||
<li><%= @current_user.email %></li>
|
||||
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
|
||||
<li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
|
||||
<% else %>
|
||||
<li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li>
|
||||
<li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li>
|
||||
<% end %>
|
||||
</ul>
|
10
lib/ketbin_web/templates/layout/_user_menu.html.heex
Normal file
10
lib/ketbin_web/templates/layout/_user_menu.html.heex
Normal file
@ -0,0 +1,10 @@
|
||||
<ul>
|
||||
<%= if @current_user do %>
|
||||
<li><%= @current_user.email %></li>
|
||||
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
|
||||
<li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
|
||||
<% else %>
|
||||
<li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li>
|
||||
<li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li>
|
||||
<% end %>
|
||||
</ul>
|
@ -5,12 +5,12 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Katbin</title>
|
||||
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/assets/app.css") %>"/>
|
||||
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/assets/app.js") %>"></script>
|
||||
<link rel="stylesheet" href={ Routes.static_path(@conn, "/assets/app.css") }/>
|
||||
<script defer type="text/javascript" src={ Routes.static_path(@conn, "/assets/app.js") }></script>
|
||||
</head>
|
||||
<body class="flex flex-col ">
|
||||
<header class="flex w-full justify-between items-center py-3 px-6">
|
||||
<a href="<%= Routes.page_path(@conn, :index) %>">
|
||||
<a href={ Routes.page_path(@conn, :index) }>
|
||||
<span class="font-semibold text-xl tracking-tight">
|
||||
<span class="text-amber text-xl"><Kat</span>bin/>
|
||||
</span>
|
Loading…
Reference in New Issue
Block a user