From f3167059c9538e221f42d4587492a64d73d43bc7 Mon Sep 17 00:00:00 2001 From: jimi Date: Fri, 18 Feb 2011 16:48:59 -0600 Subject: [PATCH] Add 'home' page, refactor layouts - move title and description into helper modules - add more structure to application layout - create home view (haml and textile) --- app/controllers/pages_controller.rb | 3 ++- app/helpers/application_helper.rb | 9 +++++++ app/views/layouts/application.html.haml | 18 ++++++++++---- app/views/layouts/soon.html.haml | 4 ++-- app/views/pages/home.html.haml | 32 +++++++++++++++++++++++++ config/routes.rb | 2 +- 6 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 app/views/pages/home.html.haml diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 8268071..2cd7eca 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -2,5 +2,6 @@ class PagesController < ApplicationController def soon render :layout => 'soon' end - + def home + end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..ec706aa 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,11 @@ module ApplicationHelper + def page_title + default = 'Air-one Services' + @title.nil? ? default : @title + end + def page_description + default = 'Quality commercial, residential, and industrial '+ + 'HVAC, electrical and plumbing services since 1965' + @description.nil? ? default : @description + end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 1398f08..78265a6 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,20 +1,30 @@ !!! %html %head - %title= @title or 'Air-one Services' + %title= page_title %meta(charset='utf-8') %meta(content='J.Infield' name='author') - %meta(name='description' content='Quality commercial, residential, and industrial HVAC, electrical and plumbing services') + %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') %script(src='javascripts/jquery.min.js') - = yield :header + = yield :head %body #container - = yield + #header + %img.left#badge(src='images/logo.png' alt='Air-one Logo') + %img.right#gallery(src='images/sprinter.png' alt='Gallery') + #menu + %ul#nav + %li + %a(href='/')>Home + #content + = yield + / id='content' #footer :textile (c)2011 J.Infield -- All rights Reserved + / id='container' / © Copyright 2011 J.Infield. All Rights Reserved. diff --git a/app/views/layouts/soon.html.haml b/app/views/layouts/soon.html.haml index 3c722c6..69217b3 100644 --- a/app/views/layouts/soon.html.haml +++ b/app/views/layouts/soon.html.haml @@ -1,10 +1,10 @@ !!! %html %head - %title= @title or 'Air-one Services' + %title= page_title %meta(charset='utf-8') %meta(content='J.Infield' name='author') - %meta(name='description' content='Quality commercial, residential, and industrial HVAC, electrical and plumbing services') + %meta(name='description' content=page_description) %meta(name='copyright' content='Copyright 2011 J.Infield, all rights reserved') %link(rel='stylesheet' media='screen' href='stylesheets/soon.css') %script(src='javascripts/jquery.min.js') diff --git a/app/views/pages/home.html.haml b/app/views/pages/home.html.haml new file mode 100644 index 0000000..3c984d1 --- /dev/null +++ b/app/views/pages/home.html.haml @@ -0,0 +1,32 @@ +- content_for :head do + %script(src='javascripts/jquery.color.min.js') + +#main + :textile + h1. Welcome to Air-one Services + + This section of the site will contain the most recent article, which will include industry specific content. This content will contain many of the industry specific buzzwords and keywords. Proper use of these keywords will help drive the site to the top of the right search lists. + + !(left)images/topten.png(Top Ten)! The content over here will generally be the new information that I have researched for you. Here, for example, we would need to go into detail about what the image to the left signifies. Specifically, I need to have more information about what this "Top Ten" logo means. + + bq. "...key phrases from the main body of content can be displayed to the side" + + When the visitor leaves your site with a better understanding of the state or your industry, or an explanation of how and why some work is done, it will only boost their confidence in your abilities to get the job done. Another interesting concept that will be used over here is the "Pull Quote", where key phrases from the main body of content can be displayed to the side. These eye-catching phrases are both visually pleasing and give the reader a quick glimpse of the content included. In addition to their visual appeal, this use of images, bullet lists, and tabular data can entice the site visitor to read the article. + + The following list contains the kind of terms we need to pin down: + * Types of services... like heating, plumbing, electric + * Supported brand names... + * Equipment brand names sold, and/or preferred + * Which, if any, products or services are specific to residential customers + * Which, if any, products or services are specific to commercial customers +/ id='main' +#sidebar + :textile + h1. About Us + + Established in 1965, _Air-one Services_ is driven to provide the mid-south region with premium HVAC(Heating, Ventilation, and Air-Conditioning), plumbing and electrical services. In addition, we are one of the area's largest providers of restaurant equipment sales and service. + + !(left)images/family.jpg(family)! _Air-one Services_ is a family owned and operated company. This in itself should help ensure you that we will strive to provide you with that personal touch that will leave you feeling comfortable and confident in the work we have done. This personalized service also helps form a relationship between you and our company that will leave you with the confidence that you should bring your future business to us. Our experienced technicians are trained to help provide you with a prompt, professional solution for all your service needs. + + Here we can also include detailed information about the origins of the company, and other details that will help interest potential customers. +/ id='sidebar' diff --git a/config/routes.rb b/config/routes.rb index adf0e15..36e76a3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Aironeac::Application.routes.draw do - get "pages/soon" + match '/home' => 'pages#home' root :to => 'pages#soon'