liveview now works i guess

This commit is contained in:
2021-09-01 13:29:11 +02:00
parent 6c33f540a2
commit 6e568c170a
5 changed files with 91 additions and 2 deletions
@@ -0,0 +1,35 @@
<!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"/>
<title>PokemonCouture · Phoenix Framework</title>
<link rel="stylesheet" href="<%= Routes.static_path(@socket, "/css/app.css") %>"/>
<%= csrf_meta_tag() %>
<script defer type="text/javascript" src="<%= Routes.static_path(@socket, "/js/app.js") %>"></script>
</head>
<body>
<header>
<section class="container">
<nav role="navigation">
<ul>
<li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li>
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@socket, :home) %></li>
<% end %>
</ul>
<%= render "_user_menu.html", assigns %>
</nav>
<a href="http://localhost:4000/" class="phx-logo"> <!-- TODO: needs a way to show the proper link -->
<img src="<%= Routes.static_path(@socket, "/images/phoenix.png") %>" alt="Phoenix Framework Logo"/>
</a>
</section>
</header>
<main role="main" class="container">
<p class="alert alert-info" role="alert"><%= get_flash(@socket, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@socket, :error) %></p>
<%= @inner_content %>
</main>
</body>
</html>
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<%= csrf_meta_tag() %>
<%= live_title_tag assigns[:page_title] || "MyApp" %>
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
</head>
<body>
<%= @inner_content %>
</body>
</html>