refactor(layout): use heex templates

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2021-10-07 05:54:37 +05:30
parent 2fa19381dc
commit 2ddccce85d
No known key found for this signature in database
GPG Key ID: F0EA64BC1B44A7F3
3 changed files with 13 additions and 13 deletions

View File

@ -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>

View 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>

View File

@ -5,12 +5,12 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Katbin</title> <title>Katbin</title>
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/assets/app.css") %>"/> <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> <script defer type="text/javascript" src={ Routes.static_path(@conn, "/assets/app.js") }></script>
</head> </head>
<body class="flex flex-col "> <body class="flex flex-col ">
<header class="flex w-full justify-between items-center py-3 px-6"> <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="font-semibold text-xl tracking-tight">
<span class="text-amber text-xl">&lt;Kat</span>bin/&gt; <span class="text-amber text-xl">&lt;Kat</span>bin/&gt;
</span> </span>