diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ec706aa..d376e9e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -8,4 +8,12 @@ module ApplicationHelper 'HVAC, electrical and plumbing services since 1965' @description.nil? ? default : @description end + def stylesheet_links + default = %w{reset grids layout} + styles = @stylesheets.nil? ? default : @stylesheets + html = styles.collect do |style| + "" + end + html.join("\n") + end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 78265a6..9a944de 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -6,9 +6,7 @@ %meta(content='J.Infield' name='author') %meta(name='description' content=page_description) %meta(name='copyright' content='Copyright 2011 J.Infield, all rights reserved') - %link(rel='stylesheet' media='screen' href='stylesheets/reset.css') - %link(rel='stylesheet' media='screen' href='stylesheets/grids.css') - %link(rel='stylesheet' media='screen' href='stylesheets/layout.css') + != stylesheet_links %script(src='javascripts/jquery.min.js') = yield :head %body