fix flash messages
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="<%= local_assigns[:class] %>" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||||
|
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
|
||||||
|
<path d="M12 9v4"></path>
|
||||||
|
<path d="M12 16v.01"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 414 B |
@@ -14,7 +14,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<turbo-frame id="modal"></turbo-frame>
|
<turbo-frame id="modal"></turbo-frame>
|
||||||
<%= render 'shared/navbar' %>
|
<%= render 'shared/navbar' %>
|
||||||
<% if flash.present? %><% render 'shared/flash' %><% end %>
|
<% if flash.present? %><%= render 'shared/flash' %><% end %>
|
||||||
<div class="max-w-6xl mx-auto px-4 md:px-2">
|
<div class="max-w-6xl mx-auto px-4 md:px-2">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<%= stylesheet_pack_tag 'application', media: 'all' %>
|
<%= stylesheet_pack_tag 'application', media: 'all' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<% if flash.present? %><% render 'shared/flash' %><% end %>
|
<% if flash.present? %><%= render 'shared/flash' %><% end %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
<div id="flash" class="absolute top-0 w-full h-0">
|
<div id="flash" class="absolute top-0 w-full h-0">
|
||||||
<div class="max-w-xl mx-auto mt-1.5">
|
<div class="max-w-xl mx-auto mt-1.5">
|
||||||
<div class="alert py-3">
|
<div class="alert py-3">
|
||||||
<%= svg_icon('info_circle', class: 'stroke-info flex-shrink-0 w-6 h-6') %>
|
<% if flash[:notice] %>
|
||||||
|
<%= svg_icon('info_circle', class: 'stroke-info flex-shrink-0 w-6 h-6') %>
|
||||||
|
<% else %>
|
||||||
|
<%= svg_icon('exclamation_circle', class: 'stroke-error flex-shrink-0 w-6 h-6') %>
|
||||||
|
<% end %>
|
||||||
<div>
|
<div>
|
||||||
<span><%= flash[:notice] || flash[:alert] %></span>
|
<span><%= flash[:notice] || flash[:alert] %></span>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" class="w-6 h-6 rounded-lg text-center hover:bg-base-300" onclick="[event.preventDefault(), window.flash.remove()]">×</a>
|
<a href="#" onclick="[event.preventDefault(), window.flash.remove()]">×</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user