From 0830a5bd85fc5fb1c28f59a5a2cf948b68e762cb Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 7 Jul 2016 14:58:07 +1000 Subject: [PATCH] Add basic sell page Conflicts: config/routes.rb --- .../stylesheets/darkswarm/home_panes.css.sass | 2 +- app/controllers/home_controller.rb | 4 +++ app/views/home/sell.html.haml | 32 +++++++++++++++++++ config/locales/en.yml | 7 ++++ config/routes.rb | 1 + 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 app/views/home/sell.html.haml diff --git a/app/assets/stylesheets/darkswarm/home_panes.css.sass b/app/assets/stylesheets/darkswarm/home_panes.css.sass index 631d43e07b..2173284b6e 100644 --- a/app/assets/stylesheets/darkswarm/home_panes.css.sass +++ b/app/assets/stylesheets/darkswarm/home_panes.css.sass @@ -21,7 +21,7 @@ #system.pane background-color: white -#brand-story.pane, #cta.pane, #shops.pane +#brand-story.pane, #cta.pane, #shops.pane, #sell.pane @include tiledPane #connect.pane diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 07ba097f85..fbf1819277 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -9,4 +9,8 @@ class HomeController < BaseController @num_orders = Spree::Order.complete.count end end + + def sell + end + end diff --git a/app/views/home/sell.html.haml b/app/views/home/sell.html.haml new file mode 100644 index 0000000000..40fd87e028 --- /dev/null +++ b/app/views/home/sell.html.haml @@ -0,0 +1,32 @@ +- content_for(:title) do + = t :sell_title + +#panes + #sell.pane + .row.header + .small-12.medium-12.columns.text-center + %h2 + = t :sell_headline + .row.content + .small-12.medium-6.medium-offset-3.columns.text-center + %p.text-big + = t :sell_motivation + + .pane + .row + .small-12.medium-4.columns.text-center + %h3= t :sell_producers + %a.button.transparent{href: signup_producers_path} + = t :register_title + + .small-12.medium-4.columns.text-center + %h3= t :sell_shops + %a.button.transparent{href: signup_shops_path} + = t :register_title + + .small-12.medium-4.columns.text-center + %h3= t :sell_groups + %a.button.transparent{href: signup_groups_path} + = t :register_title + += render "shared/footer" diff --git a/config/locales/en.yml b/config/locales/en.yml index d9b438e04d..5788987462 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -605,6 +605,13 @@ See the %{link} to find out more about %{sitename}'s features and to start using register_title: Register + sell_title: "Sell" + sell_headline: "Sell food" + sell_motivation: "Here's why" + sell_producers: "Producers" + sell_shops: "Shops" + sell_groups: "Groups" + shops_title: Shops shops_headline: Shopping, transformed. shops_text: Food grows in cycles, farmers harvest in cycles, and we order food in cycles. If you find an order cycle closed, check back soon. diff --git a/config/routes.rb b/config/routes.rb index cd7c7780c4..e625cca37b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,6 +15,7 @@ Openfoodnetwork::Application.routes.draw do get "/discourse/sso", to: "discourse_sso#sso" get "/map", to: "map#index", as: :map + get "/sell", to: "home#sell", as: :sell get "/register", to: "registration#index", as: :registration get "/register/auth", to: "registration#authenticate", as: :registration_auth