feat(ui): implement header ui

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2021-08-12 02:47:23 +05:30
parent 92ee2be4cc
commit 5a7bece725
No known key found for this signature in database
GPG Key ID: ED5C54FBBB920E51
6 changed files with 50 additions and 152 deletions

View File

@ -3,6 +3,18 @@
@import "tailwindcss/components";
@import "tailwindcss/utilities";
* {
font-family: 'JetBrains Mono', monospace;
background-color: #1a1a1a;
color: white;
}
a:hover {
@apply text-amber;
}
@import "./phoenix.css";
/* Alerts and form errors */

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 264 KiB

View File

@ -1,11 +1,20 @@
module.exports = {
purge: [],
purge: [
"../lib/**/*.ex",
"../lib/**/*.leex",
"../lib/**/*.eex",
"./js/**/*.js",
],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
extend: {
colors: {
amber: '#ff9800',
},
},
},
variants: {
extend: {},
},
plugins: [],
}
};

View File

@ -4,28 +4,34 @@
<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>Ketbin · Phoenix Framework</title>
<title>Katbin</title>
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/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, "/js/app.js") %>"></script>
</head>
<body>
<header>
<section class="container">
<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">&lt;Kat</span>bin/&gt;
</span>
</a>
<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(@conn, :home) %></li>
<li>
<%# <%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %>
</li>
<% end %>
</ul>
<%= render "_user_menu.html", assigns %>
</nav>
<a href="https://phoenixframework.org/" class="phx-logo">
<img src="<%= Routes.static_path(@conn, "/images/phoenix.png") %>" alt="Phoenix Framework Logo"/>
</a>
</section>
</header>
<main role="main" class="container">
<main 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 %>

View File

@ -1,38 +1,3 @@
<section class="phx-hero">
<h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1>
<p>Peace of mind from prototype to production</p>
</section>
<section class="row">
<article class="column">
<h2>Resources</h2>
<ul>
<li>
<a href="https://hexdocs.pm/phoenix/overview.html">Guides &amp; Docs</a>
</li>
<li>
<a href="https://github.com/phoenixframework/phoenix">Source</a>
</li>
<li>
<a href="https://github.com/phoenixframework/phoenix/blob/v1.5/CHANGELOG.md">v1.5 Changelog</a>
</li>
</ul>
</article>
<article class="column">
<h2>Help</h2>
<ul>
<li>
<a href="https://elixirforum.com/c/phoenix-forum">Forum</a>
</li>
<li>
<a href="https://webchat.freenode.net/?channels=elixir-lang">#elixir-lang on Freenode IRC</a>
</li>
<li>
<a href="https://twitter.com/elixirphoenix">Twitter @elixirphoenix</a>
</li>
<li>
<a href="https://elixir-slackin.herokuapp.com/">Elixir on Slack</a>
</li>
</ul>
</article>
</section>
<div>
hello, world!
</div>