Julian Noble
2 years ago
10 changed files with 178 additions and 24 deletions
@ -1,5 +1,34 @@
|
||||
@import "tailwindcss/base"; |
||||
@import "tailwindcss/components"; |
||||
|
||||
|
||||
@import "tailwindcss/utilities"; |
||||
|
||||
|
||||
/* note import won't work without node based build pipeline - i.e postcss-import */ |
||||
/* @import "./components/buttons.css"; */ |
||||
|
||||
@layer components { |
||||
.btn-primary { |
||||
@apply py-2 px-4 bg-green-500 text-white font-semibold rounded-lg shadow-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-400 focus:ring-opacity-75; |
||||
} |
||||
|
||||
.sidebar-iconbox { |
||||
@apply relative flex items-center justify-center h-12 w-12 mt-2 mb-4 mx-auto ; |
||||
} |
||||
.sidebar-icon { |
||||
@apply stroke-green-500 hover:stroke-cyan-400 fill-transparent shadow-lg |
||||
hover:rounded-xl rounded-3xl transition-all duration-200 ease-linear; |
||||
|
||||
} |
||||
.sidebar-tooltip { |
||||
@apply absolute w-auto p-2 m-2 min-w-max left-14 rounded-md shadow-md |
||||
text-white bg-gray-900 text-xs font-bold |
||||
transition-all duration-100 scale-0 origin-left; |
||||
|
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
/* This file is for your main application CSS */ |
||||
|
@ -0,0 +1,10 @@
|
||||
@tailwind base; |
||||
@tailwind components; |
||||
@tailwind utilities; |
||||
|
||||
@layer components { |
||||
.btn-primary { |
||||
@apply py-2 px-4 bg-green-500 text-white font-semibold rounded-lg shadow-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-400 focus:ring-opacity-75; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,7 @@
|
||||
defmodule ChirpWeb.HelloController do |
||||
use ChirpWeb, :controller |
||||
|
||||
def index(conn, _params) do |
||||
render(conn, "index.html") |
||||
end |
||||
end |
@ -0,0 +1,60 @@
|
||||
<div class="phx-hero"> |
||||
<h2 >Hello World, from Phoenix!</h2> |
||||
<div class="flex"> |
||||
|
||||
<div class="fixed top-o left-o h-screen w-16 flex flex-col bg-gray-300 text-black"> |
||||
<div class="group sidebar-iconbox"> |
||||
<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> |
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z" /> |
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z" /> |
||||
</svg> |
||||
<span class="sidebar-tooltip group-hover:scale-100"> |
||||
Burn |
||||
</span> |
||||
</div> |
||||
|
||||
<div class="group sidebar-iconbox"> |
||||
<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> |
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> |
||||
</svg> |
||||
<span class="sidebar-tooltip group-hover:scale-100"> |
||||
Add |
||||
</span> |
||||
</div> |
||||
|
||||
<div class="group sidebar-iconbox"> |
||||
<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> |
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"/> |
||||
</svg> |
||||
<span class="sidebar-tooltip group-hover:scale-100"> |
||||
action |
||||
</span> |
||||
</div> |
||||
|
||||
<div class="group sidebar-iconbox" > |
||||
<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> |
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> |
||||
</svg> |
||||
<span class="sidebar-tooltip group-hover:scale-100"> |
||||
trash |
||||
</span> |
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
|
||||
<div class="fixed top-o left-o ml-32" > |
||||
|
||||
|
||||
<button class="btn-primary">Some button!</button> |
||||
<p> Test paragraph</p> |
||||
|
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
|
Loading…
Reference in new issue