From d3ab9faede950e406ff73369cee3aa7f051947a7 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 3 Aug 2016 15:03:14 +1000 Subject: [PATCH] Show registration CTA in footer rather than connect and learn CTA --- app/assets/stylesheets/darkswarm/footer.sass | 4 +-- .../shared/_connect_learn_call.html.haml | 10 +++++++ app/views/shared/_page_alert.html.haml | 5 ++++ app/views/shared/_register_call.html.haml | 28 +++++-------------- app/views/shared/menu/_alert.html.haml | 2 +- 5 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 app/views/shared/_connect_learn_call.html.haml create mode 100644 app/views/shared/_page_alert.html.haml diff --git a/app/assets/stylesheets/darkswarm/footer.sass b/app/assets/stylesheets/darkswarm/footer.sass index a0d2244c0e..80681cedfb 100644 --- a/app/assets/stylesheets/darkswarm/footer.sass +++ b/app/assets/stylesheets/darkswarm/footer.sass @@ -30,7 +30,7 @@ footer background-color: transparent border: none padding: 0 - a.alert-cta + .alert-cta @include csstrans width: 100% border: 1px solid rgba($dark-grey, 0.35) @@ -44,7 +44,7 @@ footer color: #333 strong letter-spacing: 0.5px - &:hover, &:active, &:focus + a:hover, a:active, a:focus text-decoration: none border-color: white &, & * diff --git a/app/views/shared/_connect_learn_call.html.haml b/app/views/shared/_connect_learn_call.html.haml new file mode 100644 index 0000000000..99f2990990 --- /dev/null +++ b/app/views/shared/_connect_learn_call.html.haml @@ -0,0 +1,10 @@ +:css + .page-alert .alert-box { background-color: #f27052; } + +.alert-cta + %h6 + %strong + = link_to "Connect", "https://openfoodnetwork.org/au/connect/", target: '_blank' + and + %strong + = link_to "Learn", "https://openfoodnetwork.org/au/learn/", target: '_blank' diff --git a/app/views/shared/_page_alert.html.haml b/app/views/shared/_page_alert.html.haml new file mode 100644 index 0000000000..92def240e7 --- /dev/null +++ b/app/views/shared/_page_alert.html.haml @@ -0,0 +1,5 @@ +- if feature? :connect_learn_homepage + = render "shared/connect_learn_call" + +- else + = render "shared/register_call" diff --git a/app/views/shared/_register_call.html.haml b/app/views/shared/_register_call.html.haml index c5bf5b7830..f4c03b7b92 100644 --- a/app/views/shared/_register_call.html.haml +++ b/app/views/shared/_register_call.html.haml @@ -1,22 +1,8 @@ -- if feature? :connect_learn_homepage - :css - .page-alert .alert-box { background-color: #f27052; } - - .alert-cta - %h6 +.alert-cta + %h6 + %a{href: registration_path, target: "_blank"} + = t '.selling_on_ofn' +   %strong - = link_to "Connect", "https://openfoodnetwork.org/au/connect/", target: '_blank' - and - %strong - = link_to "Learn", "https://openfoodnetwork.org/au/learn/", target: '_blank' - - -- else - .alert-cta - %h6 - %a{href: registration_path, target: "_blank"} - = t '.selling_on_ofn' -   - %strong - = t '.register' - %i.ofn-i_054-point-right + = t '.register' + %i.ofn-i_054-point-right diff --git a/app/views/shared/menu/_alert.html.haml b/app/views/shared/menu/_alert.html.haml index 6512358cc3..e3eb53fe74 100644 --- a/app/views/shared/menu/_alert.html.haml +++ b/app/views/shared/menu/_alert.html.haml @@ -1,4 +1,4 @@ .text-center.page-alert.fixed{ "ofn-page-alert" => true } .alert-box - = render 'shared/register_call' + = render 'shared/page_alert' %a.close{ ng: { click: "close()" } } ×