Skip to content

Instantly share code, notes, and snippets.

@lengarvey
Last active December 16, 2015 01:08
Show Gist options
  • Save lengarvey/5352323 to your computer and use it in GitHub Desktop.
Save lengarvey/5352323 to your computer and use it in GitHub Desktop.
Zurb Foundation Rails Flash partial
- flashes = {:notice => 'success', :alert => 'standard', :error => 'alert', :secondary => 'secondary'}
- flashes.each do |key, value|
- if flash[key]
.alert-box{:class => value, :data => { :alert => '' } }
= flash[key]
= link_to '×'.html_safe, '#', :class => 'close'
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!-- Uncomment to make IE8 render like IE7 -->
<!-- <meta http-equiv="X-UA-Compatible" content="IE=7" /> -->
<!-- Set the viewport width to device width for mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= content_for?(:title) ? yield(:title) : "Your page title" %></title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "vendor/custom.modernizr" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= render :partial => 'navigation/top_bar' %>
<section id="main">
<%= render :partial => 'layouts/do_flash' %>
<%= yield %>
</section>
<%= javascript_include_tag "application" %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment