From 215d6030d74ad6c7af3b2ea35b4f6a00766d4a86 Mon Sep 17 00:00:00 2001 From: alexs Date: Tue, 13 Aug 2013 11:36:24 +1000 Subject: [PATCH] Added link to 'About OFN' page (as well as the base for that page). --- app/assets/stylesheets/search/home.css.scss | 22 +++++++--- app/controllers/home_controller.rb | 3 ++ app/views/home/about_us.html.haml | 8 ++++ app/views/home/new_landing_page.html.haml | 45 ++++++++++----------- config/routes.rb | 1 + 5 files changed, 49 insertions(+), 30 deletions(-) create mode 100644 app/views/home/about_us.html.haml diff --git a/app/assets/stylesheets/search/home.css.scss b/app/assets/stylesheets/search/home.css.scss index 51e895d4f4..e86601a897 100644 --- a/app/assets/stylesheets/search/home.css.scss +++ b/app/assets/stylesheets/search/home.css.scss @@ -45,6 +45,18 @@ height: 100%; } +a { + &:link { + color: #FFF; + } + &:visited { + color: #FFF; + } + &:hover { + color: $primary-color; + } +} + #home-page-nav { ul { @@ -58,12 +70,6 @@ font-weight: bold; color: #FFF; - a { - &:link { - color: #FFF; - } - } - &:before { content: " | "; } @@ -91,4 +97,8 @@ .centered { text-align: center; +} + +#logo-container { + margin-bottom: emCalc(25); } \ No newline at end of file diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 64a18c0177..0710e60855 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -3,4 +3,7 @@ class HomeController < ApplicationController def new_landing_page end + + def about_us + end end diff --git a/app/views/home/about_us.html.haml b/app/views/home/about_us.html.haml new file mode 100644 index 0000000000..79e4a657a7 --- /dev/null +++ b/app/views/home/about_us.html.haml @@ -0,0 +1,8 @@ +.row + .large-12.columns + %h2 What is open food network + %p + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna + aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint + occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum \ No newline at end of file diff --git a/app/views/home/new_landing_page.html.haml b/app/views/home/new_landing_page.html.haml index bb319805a6..e97fe604a0 100644 --- a/app/views/home/new_landing_page.html.haml +++ b/app/views/home/new_landing_page.html.haml @@ -1,26 +1,23 @@ %span#image-url-container.hide{ "data-url" => "#{LandingPageImage.random.photo.url(:max_common_res)}" } -%section{ role: "main" } - .row - .large-10.large-centered.columns - #postcode_select_box - .row - = form_tag search_enterprises_path do - .large-10.columns - = text_field_tag :suburb_search, "", - data: { autocomplete_source: suburbs_path }, class: "right", placeholder: "Enter your suburb or postcode..." - = hidden_field_tag :suburb_id - .large-2.columns - = submit_tag "Search", class: "button-huge" - .row - .large-12.large-centered.columns - %p Open Food Web - fresh opportunities for farmers and eaters - .row.show-for-small - .large-12.large-centered.columns#home-page-nav - %ul - %li= link_to "DISTRIBUTORS", "#" - %li= link_to "FARMERS", "#" - - -%section#sidebar{ role: "complementary" } - = render "login" +.row + .large-10.large-centered.columns + #postcode_select_box + .row + = form_tag search_enterprises_path do + .large-10.columns + = text_field_tag :suburb_search, "", + data: { autocomplete_source: suburbs_path }, class: "right", placeholder: "Enter your suburb or postcode..." + = hidden_field_tag :suburb_id + .large-2.columns + = submit_tag "Search", class: "button-huge" + .row + .large-12.large-centered.columns + = link_to about_us_path do + %strong + %i What is open food network? + .row.show-for-small + .large-12.large-centered.columns#home-page-nav + %ul + %li= link_to "DISTRIBUTORS", "#" + %li= link_to "FARMERS", "#" diff --git a/config/routes.rb b/config/routes.rb index fc00014cd7..5df9bf20dd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,6 +24,7 @@ Openfoodweb::Application.routes.draw do end get "new_landing_page", :controller => 'home', :action => "new_landing_page" + get "about_us", :controller => 'home', :action => "about_us" namespace :open_food_web do resources :cart