homepage redesign

This commit is contained in:
Lee Lawlor
2014-05-08 20:01:41 -04:00
parent e5570ec3af
commit ac83280b68
57 changed files with 569 additions and 328 deletions

View File

@ -1,9 +1,10 @@
class PagesController < ApplicationController
layout 'application', :except => [:social_home]
layout 'application', :except => [:home, :social_home]
def home
@menu = 'home'
@title = 'Internet of Things'
render layout: 'home'
end
def social_home; ; end
@ -19,5 +20,22 @@ class PagesController < ApplicationController
def headers
end
# post contact email
def contact_us
# if no email address
if params[:email].blank? || params[:email].index('@').blank?
flash[:alert] = t(:contact_us_no_email)
# if no message
elsif params[:message].blank?
flash[:alert] = t(:contact_us_no_message)
# else send email
else
Mailer.contact_us(params[:email], params[:message]).deliver
flash[:notice] = t(:contact_us_success)
end
redirect_to root_path
end
end