something awful login data
all the stuff to add 2 fields to the user object and to access the logged0in user in a liveview session
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<div class="user-box flex flex-wrap">
|
||||
<div class="user-box">
|
||||
<%= if @current_user do %>
|
||||
<h4 class="w-full"><%= @current_user.email %></h4>
|
||||
<%= link "Settings", class: "link",
|
||||
|
@ -5,21 +5,27 @@
|
||||
<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_tag assigns[:page_title] || "SomethingErlang", suffix: " · Phoenix Framework" %>
|
||||
<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>
|
||||
<%= live_title_tag assigns[:page_title] || "SomethingErlang",
|
||||
suffix: " · Phoenix Framework" %>
|
||||
<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>
|
||||
<section class="container mx-auto">
|
||||
<nav class="flex space-around">
|
||||
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
|
||||
<%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %>
|
||||
<nav>
|
||||
<div class="navbar">
|
||||
<div class="navbar-start"></div>
|
||||
<div class="navbar-end">
|
||||
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
|
||||
<%= link "LiveDashboard",
|
||||
to: Routes.live_dashboard_path(@conn, :home) %>
|
||||
<% end %>
|
||||
<div class="grow"></div>
|
||||
<%= render "_user_menu.html", assigns %>
|
||||
<%= render "_user_menu.html", assigns %>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</section>
|
||||
</header>
|
||||
<%= @inner_content %>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user