Selaa lähdekoodia

Display flash errors and notices

tags/last-sinatra-version
Adrian Short 12 vuotta sitten
vanhempi
commit
06deeab3c9
2 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. +6
    -0
      public/style.css
  2. +6
    -0
      views/layout.haml

+ 6
- 0
public/style.css Näytä tiedosto

@@ -185,6 +185,12 @@ tr
padding: 10px 25px; padding: 10px 25px;
} }


#notice {
background-color: green;
color: white;
padding: 10px 20px;
}

#error { #error {
background-color: red; background-color: red;
color: white; color: white;


+ 6
- 0
views/layout.haml Näytä tiedosto

@@ -8,6 +8,12 @@
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
%body %body
#main #main
- if flash[:notice]
#notice
%p= flash[:notice]
- if flash[:error]
#error
%p= flash[:error]
= yield = yield
#footer #footer
#footer_inner #footer_inner


Ladataan…
Peruuta
Tallenna