|
|
@ -1,44 +1,10 @@ |
|
|
|
<h2>NOTIFICATION BAR</h2> |
|
|
|
|
|
|
|
<nav class='relative w-full'> |
|
|
|
<% if alert.present? %> |
|
|
|
<div class="absolute inset-x-0 top-10"> |
|
|
|
<div class="flex max-w-sm w-full bg-white shadow-md rounded-lg mx-auto"> |
|
|
|
<div class="w-2 bg-red-600"> |
|
|
|
</div> |
|
|
|
<div class="w-full flex justify-between items-start px-2 py-2"> |
|
|
|
<div class="flex flex-col ml-2"> |
|
|
|
<label class="text-gray-800">Alert</label> |
|
|
|
<p class="text-gray-500 "><%= alert %></p> |
|
|
|
</div> |
|
|
|
<a href="#"> |
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> |
|
|
|
</svg> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% if flash %> |
|
|
|
<script type="module"> |
|
|
|
import { Notyf } from 'notyf'; |
|
|
|
const notyf=new Notyf |
|
|
|
notyf.success('<%=notice%>') |
|
|
|
notyf.error('<%=alert%>') |
|
|
|
</script> |
|
|
|
<%end%> |
|
|
|
|
|
|
|
<% if notice.present? %> |
|
|
|
<div class="absolute inset-x-0 top-50"> |
|
|
|
<div class="flex max-w-sm w-full bg-white shadow-md rounded-lg overflow-hidden mx-auto"> |
|
|
|
<div class="w-2 bg-green-600"> |
|
|
|
</div> |
|
|
|
<div class="w-full flex justify-between items-start px-2 py-2"> |
|
|
|
<div class="flex flex-col ml-2"> |
|
|
|
<label class="text-gray-800">Notice</label> |
|
|
|
<p class="text-gray-500 "><%= notice %></p> |
|
|
|
</div> |
|
|
|
<a href="#"> |
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> |
|
|
|
</svg> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
</nav> |