-
Notifications
You must be signed in to change notification settings - Fork 13
/
root.html.heex
55 lines (54 loc) · 1.74 KB
/
root.html.heex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="csrf-token" content={csrf_token_value()} />
<.live_title suffix=" · Phoenix Framework">
<%= assigns[:page_title] || "LiveviewChat" %>
</.live_title>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")} />
<script
defer
phx-track-static
type="text/javascript"
src={Routes.static_path(@conn, "/assets/app.js")}
>
</script>
</head>
<body>
<header class="bg-slate-800 w-full min-h-[15%] pt-5 pb-1 mb-2">
<section>
<nav>
<div class="text-white width-[10%] float-left ml-3 -mt-5 align-middle">
<b>People in Chat:</b>
<ul>
<%= for name <- @presence do %>
<li>
<%= name %>
</li>
<% end %>
</ul>
</div>
<ul class="float-right mr-3">
<%= if @loggedin do %>
<li>
<img width="42px" src={@person.picture} class="-mt-3" />
</li>
<li class="text-white">
<%= link("logout", to: "/logout") %>
</li>
<% else %>
<li class="bg-green-600 text-white rounded-xl px-4 py-2 w-full mb-2 font-bold">
<%= link("Login", to: "/login") %>
</li>
<% end %>
</ul>
</nav>
<h1 class="text-3xl mb-4 text-center font-mono text-white">LiveView Chat Example</h1>
</section>
</header>
<%= @inner_content %>
</body>
</html>