Add the simple index page.

main
KKlochko 2 years ago
parent a6af0b6e96
commit 16b1a4180f

@ -13,4 +13,6 @@
Added a method to create an Link using a generator. Added a method to create an Link using a generator.
** 0.3.0 <2023-07-08 Sat> ** 0.3.0 <2023-07-08 Sat>
Added the redirect route. Added the redirect route.
** 0.3.1 <2023-07-09 Sun>
Added the simple index page.

@ -0,0 +1,29 @@
<!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] || "LinkShortener", 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">
<nav>
<ul>
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
<% end %>
</ul>
</nav>
<a href={Routes.page_path(@conn, :index)} class="phx-logo">
Link Shortener
</a>
</section>
</header>
<%= @inner_content %>
</body>
</html>

@ -0,0 +1,4 @@
<section class="phx-hero">
<h1> Usage </h1>
<p> Go to a url like: "/u/{shorten name}". </p>
</section>
Loading…
Cancel
Save