Просмотр исходного кода

Display flash errors and notices

tags/last-sinatra-version
Adrian Short 12 лет назад
Родитель
Сommit
06deeab3c9
2 измененных файлов: 12 добавлений и 0 удалений
  1. +6
    -0
      public/style.css
  2. +6
    -0
      views/layout.haml

+ 6
- 0
public/style.css Просмотреть файл

@@ -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 Просмотреть файл

@@ -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


Загрузка…
Отмена
Сохранить