update to 1.6
This commit is contained in:
@ -1,19 +1,19 @@
|
||||
<main role="main" class="container min-h-full min-w-full">
|
||||
<main class="container min-h-full min-w-full">
|
||||
<header class="mb-4 px-8 py-4 w-full bg-primary-400">
|
||||
<%= render "topbar.html", assigns %>
|
||||
|
||||
|
||||
<%= if get_flash(@conn, :info) do %>
|
||||
<p class="alert alert-info" role="alert">
|
||||
<%= get_flash(@conn, :info) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
<%= if get_flash(@conn, :error) do %>
|
||||
<p class="alert alert-danger" role="alert">
|
||||
<%= get_flash(@conn, :error) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</header>
|
||||
|
||||
|
||||
<%= @inner_content %>
|
||||
</main>
|
19
lib/lokal_web/templates/layout/live.html.heex
Normal file
19
lib/lokal_web/templates/layout/live.html.heex
Normal file
@ -0,0 +1,19 @@
|
||||
<main class="container">
|
||||
<LokalWeb.Component.Topbar.topbar
|
||||
current_user={assigns[:current_user]}>
|
||||
</LokalWeb.Component.Topbar.topbar>
|
||||
|
||||
<%= if @flash && @flash |> Map.has_key?(:info) do %>
|
||||
<p class="alert alert-info" role="alert"
|
||||
phx-click="lv:clear-flash"
|
||||
phx-value-key="info"><%= live_flash(@flash, :info) %></p>
|
||||
<% end %>
|
||||
|
||||
<%= if @flash && @flash |> Map.has_key?(:error) do %>
|
||||
<p class="alert alert-danger" role="alert"
|
||||
phx-click="lv:clear-flash"
|
||||
phx-value-key="error"><%= live_flash(@flash, :error) %></p>
|
||||
<% end %>
|
||||
|
||||
<%= @inner_content %>
|
||||
</main>
|
@ -1,5 +0,0 @@
|
||||
<main role="main" class="container min-w-full min-h-full">
|
||||
<%= live_component LokalWeb.Live.Component.Topbar, current_user: assigns[:current_user] %>
|
||||
|
||||
<%= @inner_content %>
|
||||
</main>
|
@ -6,8 +6,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<%= csrf_meta_tag() %>
|
||||
<%= live_title_tag assigns[:page_title] || "Lokal", suffix: "" %>
|
||||
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
|
||||
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
||||
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")}/>
|
||||
<script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/js/app.js")}></script>
|
||||
</head>
|
||||
<body class="m-0 p-0 min-w-full min-h-full">
|
||||
<%= @inner_content %>
|
@ -1,15 +1,16 @@
|
||||
<nav role="navigation">
|
||||
<div class="flex flex-row justify-between items-center space-x-4">
|
||||
<%= link to: Routes.page_path(LokalWeb.Endpoint, :index) do %>
|
||||
<%= link to: Routes.live_path(LokalWeb.Endpoint, PageLive) do %>
|
||||
<h1 class="leading-5 text-xl text-white hover:underline">Lokal</h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
<ul class="flex flex-row flex-wrap justify-center items-center
|
||||
space-x-4 text-lg text-white">
|
||||
<%# user settings %>
|
||||
<%= if assigns |> Map.has_key?(:current_user) && @current_user do %>
|
||||
<li>
|
||||
<%= @current_user.email %></li>
|
||||
<%= @current_user.email %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link "Settings", class: "hover:underline",
|
||||
to: Routes.user_settings_path(LokalWeb.Endpoint, :edit) %>
|
||||
@ -37,4 +38,4 @@
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
||||
|
Reference in New Issue
Block a user