Initial commit

This commit is contained in:
2022-05-23 15:57:15 +02:00
commit 5608d2e5ec
99 changed files with 5636 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<div class="user-box flex flex-wrap">
<%= if @current_user do %>
<h4 class="w-full"><%= @current_user.email %></h4>
<%= link "Settings", class: "link",
to: Routes.user_settings_path(@conn, :edit) %>
<%= button "Log out", class: "btn btn-sm",
to: Routes.user_session_path(@conn, :delete), method: :delete %>
<% else %>
<%= link "Register", class: "link",
to: Routes.user_registration_path(@conn, :new) %>
<%= button "Log in", class: "btn btn-sm",
to: Routes.user_session_path(@conn, :new) %>
<% end %>
</div>

View File

@ -0,0 +1,5 @@
<main class="container mx-auto">
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<%= @inner_content %>
</main>

View File

@ -0,0 +1,11 @@
<main class="container mx-auto">
<p class="alert alert-info" role="alert"
phx-click="lv:clear-flash"
phx-value-key="info"><%= live_flash(@flash, :info) %></p>
<p class="alert alert-danger" role="alert"
phx-click="lv:clear-flash"
phx-value-key="error"><%= live_flash(@flash, :error) %></p>
<%= @inner_content %>
</main>

View File

@ -0,0 +1,26 @@
<!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_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) %>
<% end %>
<div class="grow"></div>
<%= render "_user_menu.html", assigns %>
</nav>
</section>
</header>
<%= @inner_content %>
</body>
</html>