Skip to content

Commit 18e9276

Browse files
committed
Updated flash message styles and js
1 parent 905c155 commit 18e9276

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$(document).on('turbolinks:load', function() {
2+
$('.alert').delay(1000).fadeOut(4000);
3+
});

saasapp/app/assets/stylesheets/application.css.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,16 @@ h1, h2, h3 {
7373
padding-bottom: 100px;
7474
}
7575

76-
.alert-notice {
77-
display: none;
76+
.flash-container {
77+
position: absolute;
78+
width: 100%;
79+
}
80+
81+
.alert-notice, .alert-alert {
82+
text-align: center;
83+
background: rgba(255, 255, 255, 0.3);
84+
border-color: rgba(255, 255, 255, 0.5);
85+
margin-top :-14px;
7886
}
7987

8088
.home-signup-links {

saasapp/app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</div>
4343
</nav>
4444

45-
<div class="container">
45+
<div class="container flash-container">
4646
<% flash.each do |type, msg| %>
4747
<%= content_tag :div, msg, class: "alert alert-#{type}" %>
4848
<% end %>

0 commit comments

Comments
 (0)