From 767478a0eef9bef004ca2adef790d6fc5dc27f5f Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 23 Sep 2013 09:17:17 +1000 Subject: [PATCH] Add link to change hub --- app/assets/stylesheets/store/openfoodweb.css.scss | 14 +++++++++++++- .../replace_logo_with_link_text.html.haml.deface | 6 +++--- .../adjust_top_nav_columns.html.haml.deface | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 app/overrides/spree/shared/_nav_bar/adjust_top_nav_columns.html.haml.deface diff --git a/app/assets/stylesheets/store/openfoodweb.css.scss b/app/assets/stylesheets/store/openfoodweb.css.scss index 787a3e908d..6dda18f6bd 100644 --- a/app/assets/stylesheets/store/openfoodweb.css.scss +++ b/app/assets/stylesheets/store/openfoodweb.css.scss @@ -17,12 +17,24 @@ table { /* Style current distributor in main nav bar */ #header { - position: relative; margin-bottom: 40px; #logo { + position: relative; margin-top: 40px; padding-top: 10px; + + h1 { + position: absolute; + top: 10px; + left: 0px; + } + + .change-location { + position: absolute; + top: 22px; + right: -104px; + } } } diff --git a/app/overrides/spree/shared/_header/replace_logo_with_link_text.html.haml.deface b/app/overrides/spree/shared/_header/replace_logo_with_link_text.html.haml.deface index a701f63146..5d090321f0 100644 --- a/app/overrides/spree/shared/_header/replace_logo_with_link_text.html.haml.deface +++ b/app/overrides/spree/shared/_header/replace_logo_with_link_text.html.haml.deface @@ -1,8 +1,8 @@ -/ - replace "#logo" +/ replace "#logo" -%figure#logo.columns.six +%figure#logo.columns.eight - if current_distributor %h1= link_to current_distributor.name, main_app.shop_enterprise_path(current_distributor) + .change-location= link_to 'Change Location', root_path - else %h1= link_to "OPEN FOOD NETWORK", root_path diff --git a/app/overrides/spree/shared/_nav_bar/adjust_top_nav_columns.html.haml.deface b/app/overrides/spree/shared/_nav_bar/adjust_top_nav_columns.html.haml.deface new file mode 100644 index 0000000000..f22a49cc40 --- /dev/null +++ b/app/overrides/spree/shared/_nav_bar/adjust_top_nav_columns.html.haml.deface @@ -0,0 +1,2 @@ +/ set_attributes '#top-nav-bar' +/ attributes({:class => "columns eight"})