3f5b1d10ac
- Remove all webpack and babel related npm dependencies - Add esbuild and esbuild-plugin-postcss2 as a dependency - Add a custom `build.js` script to build css and js with esbuild and copy static files to the priv/static directory - Modify `config/dev.exs` to use that build script as a watcher instead of webpack - Modify `package.json` to use that build script in instead of webpack - Modify `KetbinWeb.Endpoint` to serve the assets directory instead of css and js directories from static - Modify the `app.html.eex` layout to use `assets` directory instead of separate css and js directories Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
51 lines
2.0 KiB
Elixir
51 lines
2.0 KiB
Elixir
<!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>Katbin</title>
|
|
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/assets/app.css") %>"/>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/assets/app.js") %>"></script>
|
|
</head>
|
|
<body class="flex flex-col ">
|
|
<header class="flex w-full justify-between items-center py-3 px-6">
|
|
<a href="<%= Routes.page_path(@conn, :index) %>">
|
|
<span class="font-semibold text-xl tracking-tight">
|
|
<span class="text-amber text-xl"><Kat</span>bin/>
|
|
</span>
|
|
</a>
|
|
|
|
<nav role="navigation">
|
|
<ul>
|
|
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
|
|
<li>
|
|
<%# <%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<%= render "_user_menu.html", assigns %>
|
|
</nav>
|
|
|
|
</header>
|
|
<main class="flex flex-col w-full h-full max-h-full overflow-hidden bg-light-grey" role="main">
|
|
<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>
|
|
<footer class="font-bold">
|
|
<div class="flex px-4 py-1 text-xs sm:text-base justify-between text-amber" style="background: #1a1a1a; font-family: JetbrainsMono">
|
|
<a href="https://sphericalk.at">
|
|
© <%= DateTime.utc_now().year %> SphericalKat
|
|
</a>
|
|
<a href="https://github.com/sphericalkat/katbin-elixir">
|
|
Fork me!
|
|
</a>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|