<!DOCTYPE html>

<%= render :partial => 'layouts/version.html.erb' %>

<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<title><%= content_for?(:title) ? yield(:title) : "Snorby #{Snorby::VERSION}" %></title>
		
		<meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="description" content="Snorby - All About Simplicity" />
    <link rel="icon" href="/favicon.png" type="image/png" />

		<% @severities ||= Severity.all %>

		<script type="text/javascript">
			<% @severities.each do |sev| %>
				var sev<%= sev.sig_id %>_bg_color = '<%= sev.bg_color %>';
			<% end %>
		</script>

		<%= csrf_meta_tag %>
		
		<%= include_stylesheets :snorby, :media => 'all' %>
		<%= include_javascripts :snorby %>

		<%= yield(:header) %>

		<style type="text/css">
			<%- @severities.each do |sev| -%>
				ul.table li div.small span.severity.sev<%= sev.sig_id %>{
					background-color: <%= sev.bg_color %>;
					color: <%= sev.text_color %>;
				}
			<%- end -%>
		</style>

  </head>
  
	<body>
		
		<%= render :partial => 'layouts/header.html.erb' %>

    <div id="wrapper">
      <%= render :partial => 'layouts/content.html.erb' %>		
    </div>

		<%= render :partial => 'layouts/footer.html.erb' %>
		
		<%- flash.each do |type, message| -%>

      <script type="text/javascript" charset="utf-8">
				flash_message.push({type: "<%= type %>", message: "<%= message %>"}); flash();
      </script>

    <%- end -%>
		
		<%= yield(:footer) %>
		
  </body> 
</html> 
