feat(ui): implement header ui
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
6 files changed
+50
-152
No files matched your search
@@ -3,6 +3,18 @@
|
|||||||
@import "tailwindcss/components";
|
@import "tailwindcss/components";
|
||||||
@import "tailwindcss/utilities";
|
@import "tailwindcss/utilities";
|
||||||
|
|
||||||
|
|
||||||
|
* {
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
@apply text-amber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@import "./phoenix.css";
|
@import "./phoenix.css";
|
||||||
|
|
||||||
/* Alerts and form errors */
|
/* Alerts and form errors */
|
||||||
|
|||||||
@@ -5,97 +5,3 @@
|
|||||||
/* Milligram v1.3.0 https://milligram.github.io
|
/* Milligram v1.3.0 https://milligram.github.io
|
||||||
* Copyright (c) 2017 CJ Patoilo Licensed under the MIT license
|
* Copyright (c) 2017 CJ Patoilo Licensed under the MIT license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#000000;font-family:'Helvetica', 'Arial', sans-serif;font-size:1.6em;font-weight:300;line-height:1.6}blockquote{border-left:0.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}.button,button,input[type='button'],input[type='reset'],input[type='submit']{background-color:#0069d9;border:0.1rem solid #0069d9;border-radius:.4rem;color:#fff;cursor:pointer;display:inline-block;font-size:1.1rem;font-weight:700;height:3.8rem;letter-spacing:.1rem;line-height:3.8rem;padding:0 3.0rem;text-align:center;text-decoration:none;text-transform:uppercase;white-space:nowrap}.button:focus,.button:hover,button:focus,button:hover,input[type='button']:focus,input[type='button']:hover,input[type='reset']:focus,input[type='reset']:hover,input[type='submit']:focus,input[type='submit']:hover{background-color:#606c76;border-color:#606c76;color:#fff;outline:0}.button[disabled],button[disabled],input[type='button'][disabled],input[type='reset'][disabled],input[type='submit'][disabled]{cursor:default;opacity:.5}.button[disabled]:focus,.button[disabled]:hover,button[disabled]:focus,button[disabled]:hover,input[type='button'][disabled]:focus,input[type='button'][disabled]:hover,input[type='reset'][disabled]:focus,input[type='reset'][disabled]:hover,input[type='submit'][disabled]:focus,input[type='submit'][disabled]:hover{background-color:#0069d9;border-color:#0069d9}.button.button-outline,button.button-outline,input[type='button'].button-outline,input[type='reset'].button-outline,input[type='submit'].button-outline{background-color:transparent;color:#0069d9}.button.button-outline:focus,.button.button-outline:hover,button.button-outline:focus,button.button-outline:hover,input[type='button'].button-outline:focus,input[type='button'].button-outline:hover,input[type='reset'].button-outline:focus,input[type='reset'].button-outline:hover,input[type='submit'].button-outline:focus,input[type='submit'].button-outline:hover{background-color:transparent;border-color:#606c76;color:#606c76}.button.button-outline[disabled]:focus,.button.button-outline[disabled]:hover,button.button-outline[disabled]:focus,button.button-outline[disabled]:hover,input[type='button'].button-outline[disabled]:focus,input[type='button'].button-outline[disabled]:hover,input[type='reset'].button-outline[disabled]:focus,input[type='reset'].button-outline[disabled]:hover,input[type='submit'].button-outline[disabled]:focus,input[type='submit'].button-outline[disabled]:hover{border-color:inherit;color:#0069d9}.button.button-clear,button.button-clear,input[type='button'].button-clear,input[type='reset'].button-clear,input[type='submit'].button-clear{background-color:transparent;border-color:transparent;color:#0069d9}.button.button-clear:focus,.button.button-clear:hover,button.button-clear:focus,button.button-clear:hover,input[type='button'].button-clear:focus,input[type='button'].button-clear:hover,input[type='reset'].button-clear:focus,input[type='reset'].button-clear:hover,input[type='submit'].button-clear:focus,input[type='submit'].button-clear:hover{background-color:transparent;border-color:transparent;color:#606c76}.button.button-clear[disabled]:focus,.button.button-clear[disabled]:hover,button.button-clear[disabled]:focus,button.button-clear[disabled]:hover,input[type='button'].button-clear[disabled]:focus,input[type='button'].button-clear[disabled]:hover,input[type='reset'].button-clear[disabled]:focus,input[type='reset'].button-clear[disabled]:hover,input[type='submit'].button-clear[disabled]:focus,input[type='submit'].button-clear[disabled]:hover{color:#0069d9}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:0.3rem solid #0069d9;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:0.1rem solid #f4f5f6;margin:3.0rem 0}input[type='email'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='url'],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1.0rem;width:100%}input[type='email']:focus,input[type='number']:focus,input[type='password']:focus,input[type='search']:focus,input[type='tel']:focus,input[type='text']:focus,input[type='url']:focus,textarea:focus,select:focus{border-color:#0069d9;outline:0}select{background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="14" viewBox="0 0 29 14" width="29"><path fill="%23d1d1d1" d="M9.37727 3.625l5.08154 6.93523L19.54036 3.625"/></svg>') center right no-repeat;padding-right:3.0rem}select:focus{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" Line truncated
|
|
||||||
|
|
||||||
/* General style */
|
|
||||||
h1{font-size: 3.6rem; line-height: 1.25}
|
|
||||||
h2{font-size: 2.8rem; line-height: 1.3}
|
|
||||||
h3{font-size: 2.2rem; letter-spacing: -.08rem; line-height: 1.35}
|
|
||||||
h4{font-size: 1.8rem; letter-spacing: -.05rem; line-height: 1.5}
|
|
||||||
h5{font-size: 1.6rem; letter-spacing: 0; line-height: 1.4}
|
|
||||||
h6{font-size: 1.4rem; letter-spacing: 0; line-height: 1.2}
|
|
||||||
pre{padding: 1em;}
|
|
||||||
|
|
||||||
.container{
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 80.0rem;
|
|
||||||
padding: 0 2.0rem;
|
|
||||||
position: relative;
|
|
||||||
width: 100%
|
|
||||||
}
|
|
||||||
select {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Phoenix promo and logo */
|
|
||||||
.phx-hero {
|
|
||||||
text-align: center;
|
|
||||||
border-bottom: 1px solid #e3e3e3;
|
|
||||||
background: #eee;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 3em 3em 1em;
|
|
||||||
margin-bottom: 3rem;
|
|
||||||
font-weight: 200;
|
|
||||||
font-size: 120%;
|
|
||||||
}
|
|
||||||
.phx-hero input {
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
.phx-logo {
|
|
||||||
min-width: 300px;
|
|
||||||
margin: 1rem;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.phx-logo img {
|
|
||||||
width: auto;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Headers */
|
|
||||||
header {
|
|
||||||
width: 100%;
|
|
||||||
background: #fdfdfd;
|
|
||||||
border-bottom: 1px solid #eaeaea;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
header section {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
header section :first-child {
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
header section :last-child {
|
|
||||||
order: 1;
|
|
||||||
}
|
|
||||||
header nav ul,
|
|
||||||
header nav li {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: block;
|
|
||||||
text-align: right;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
header nav ul {
|
|
||||||
margin: 1rem;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
header nav a {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 40.0rem) { /* Small devices (landscape phones, 576px and up) */
|
|
||||||
header section {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
header nav ul {
|
|
||||||
margin: 1rem;
|
|
||||||
}
|
|
||||||
.phx-logo {
|
|
||||||
flex-basis: 527px;
|
|
||||||
margin: 2rem 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 264 KiB |
@@ -1,11 +1,20 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
purge: [],
|
purge: [
|
||||||
|
"../lib/**/*.ex",
|
||||||
|
"../lib/**/*.leex",
|
||||||
|
"../lib/**/*.eex",
|
||||||
|
"./js/**/*.js",
|
||||||
|
],
|
||||||
darkMode: false, // or 'media' or 'class'
|
darkMode: false, // or 'media' or 'class'
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {
|
||||||
|
colors: {
|
||||||
|
amber: '#ff9800',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
extend: {},
|
extend: {},
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
}
|
};
|
||||||
@@ -4,28 +4,34 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<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="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>
|
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header class="flex w-full justify-between items-center py-3 px-6">
|
||||||
<section class="container">
|
<a href="<%= Routes.page_path(@conn, :index) %>">
|
||||||
<nav role="navigation">
|
<span class="font-semibold text-xl tracking-tight">
|
||||||
<ul>
|
<span class="text-amber"><Kat</span>bin/>
|
||||||
<li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li>
|
</span>
|
||||||
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
|
</a>
|
||||||
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
|
|
||||||
<% end %>
|
<nav role="navigation">
|
||||||
</ul>
|
<ul>
|
||||||
<%= render "_user_menu.html", assigns %>
|
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
|
||||||
</nav>
|
<li>
|
||||||
<a href="https://phoenixframework.org/" class="phx-logo">
|
<%# <%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %>
|
||||||
<img src="<%= Routes.static_path(@conn, "/images/phoenix.png") %>" alt="Phoenix Framework Logo"/>
|
</li>
|
||||||
</a>
|
<% end %>
|
||||||
</section>
|
</ul>
|
||||||
|
<%= render "_user_menu.html", assigns %>
|
||||||
|
</nav>
|
||||||
|
|
||||||
</header>
|
</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-info" role="alert"><%= get_flash(@conn, :info) %></p>
|
||||||
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
|
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
|
||||||
<%= @inner_content %>
|
<%= @inner_content %>
|
||||||
|
|||||||
@@ -1,38 +1,3 @@
|
|||||||
<section class="phx-hero">
|
<div>
|
||||||
<h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1>
|
hello, world!
|
||||||
<p>Peace of mind from prototype to production</p>
|
</div>
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="row">
|
|
||||||
<article class="column">
|
|
||||||
<h2>Resources</h2>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="https://hexdocs.pm/phoenix/overview.html">Guides & 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>
|
|
||||||
Reference in new issue
Block a user