Browse Source

Add 'home' page, refactor layouts

- move title and description into helper modules
  - add more structure to application layout
  - create home view (haml and textile)
alt_logo
jimi 14 years ago
parent
commit
f3167059c9
  1. 3
      app/controllers/pages_controller.rb
  2. 9
      app/helpers/application_helper.rb
  3. 18
      app/views/layouts/application.html.haml
  4. 4
      app/views/layouts/soon.html.haml
  5. 32
      app/views/pages/home.html.haml
  6. 2
      config/routes.rb

3
app/controllers/pages_controller.rb

@ -2,5 +2,6 @@ class PagesController < ApplicationController
def soon def soon
render :layout => 'soon' render :layout => 'soon'
end end
def home
end
end end

9
app/helpers/application_helper.rb

@ -1,2 +1,11 @@
module ApplicationHelper 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 end

18
app/views/layouts/application.html.haml

@ -1,20 +1,30 @@
!!! !!!
%html %html
%head %head
%title= @title or 'Air-one Services'
%title= page_title
%meta(charset='utf-8') %meta(charset='utf-8')
%meta(content='J.Infield' name='author') %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') %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/reset.css')
%link(rel='stylesheet' media='screen' href='stylesheets/grids.css') %link(rel='stylesheet' media='screen' href='stylesheets/grids.css')
%link(rel='stylesheet' media='screen' href='stylesheets/layout.css') %link(rel='stylesheet' media='screen' href='stylesheets/layout.css')
%script(src='javascripts/jquery.min.js') %script(src='javascripts/jquery.min.js')
= yield :header
= yield :head
%body %body
#container #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 #footer
:textile :textile
(c)2011 J.Infield -- All rights Reserved (c)2011 J.Infield -- All rights Reserved
/ id='container'
/ © Copyright 2011 J.Infield. All Rights Reserved. / © Copyright 2011 J.Infield. All Rights Reserved.

4
app/views/layouts/soon.html.haml

@ -1,10 +1,10 @@
!!! !!!
%html %html
%head %head
%title= @title or 'Air-one Services'
%title= page_title
%meta(charset='utf-8') %meta(charset='utf-8')
%meta(content='J.Infield' name='author') %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') %meta(name='copyright' content='Copyright 2011 J.Infield, all rights reserved')
%link(rel='stylesheet' media='screen' href='stylesheets/soon.css') %link(rel='stylesheet' media='screen' href='stylesheets/soon.css')
%script(src='javascripts/jquery.min.js') %script(src='javascripts/jquery.min.js')

32
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'

2
config/routes.rb

@ -1,5 +1,5 @@
Aironeac::Application.routes.draw do Aironeac::Application.routes.draw do
get "pages/soon"
match '/home' => 'pages#home'
root :to => 'pages#soon' root :to => 'pages#soon'