From 8efc95e095ddf378939137914044833872771e56 Mon Sep 17 00:00:00 2001 From: alexs Date: Wed, 7 Aug 2013 19:25:48 +1000 Subject: [PATCH] Separated Foundation powered site from the Spree powered content (for now). --- app/assets/javascripts/search/all.js | 13 +++++++++++++ .../{store => search}/jquery.backstretch.js | 0 .../{store => search}/jquery.offcanvas.js | 0 .../{store => search}/landing_page.js.coffee.erb | 0 .../{store => search}/modernizr.foundation.js | 0 app/assets/javascripts/store/all.js | 5 +---- app/assets/stylesheets/application.css.scss | 3 +-- app/assets/stylesheets/search/all.css | 8 ++++++++ .../{ => search}/foundation_and_overrides.scss | 0 app/assets/stylesheets/{ => search}/home.css.scss | 0 .../stylesheets/{store => search}/offcanvas.css | 0 app/views/layouts/landing_page.html.haml | 4 ++-- 12 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 app/assets/javascripts/search/all.js rename app/assets/javascripts/{store => search}/jquery.backstretch.js (100%) rename app/assets/javascripts/{store => search}/jquery.offcanvas.js (100%) rename app/assets/javascripts/{store => search}/landing_page.js.coffee.erb (100%) rename app/assets/javascripts/{store => search}/modernizr.foundation.js (100%) create mode 100644 app/assets/stylesheets/search/all.css rename app/assets/stylesheets/{ => search}/foundation_and_overrides.scss (100%) rename app/assets/stylesheets/{ => search}/home.css.scss (100%) rename app/assets/stylesheets/{store => search}/offcanvas.css (100%) diff --git a/app/assets/javascripts/search/all.js b/app/assets/javascripts/search/all.js new file mode 100644 index 0000000000..39e41b5732 --- /dev/null +++ b/app/assets/javascripts/search/all.js @@ -0,0 +1,13 @@ +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// + +//= require jquery +//= require jquery_ujs +//= require foundation +//= require_tree . + +$(function(){ $(document).foundation(); }); diff --git a/app/assets/javascripts/store/jquery.backstretch.js b/app/assets/javascripts/search/jquery.backstretch.js similarity index 100% rename from app/assets/javascripts/store/jquery.backstretch.js rename to app/assets/javascripts/search/jquery.backstretch.js diff --git a/app/assets/javascripts/store/jquery.offcanvas.js b/app/assets/javascripts/search/jquery.offcanvas.js similarity index 100% rename from app/assets/javascripts/store/jquery.offcanvas.js rename to app/assets/javascripts/search/jquery.offcanvas.js diff --git a/app/assets/javascripts/store/landing_page.js.coffee.erb b/app/assets/javascripts/search/landing_page.js.coffee.erb similarity index 100% rename from app/assets/javascripts/store/landing_page.js.coffee.erb rename to app/assets/javascripts/search/landing_page.js.coffee.erb diff --git a/app/assets/javascripts/store/modernizr.foundation.js b/app/assets/javascripts/search/modernizr.foundation.js similarity index 100% rename from app/assets/javascripts/store/modernizr.foundation.js rename to app/assets/javascripts/search/modernizr.foundation.js diff --git a/app/assets/javascripts/store/all.js b/app/assets/javascripts/store/all.js index e9f4611acd..723f03af31 100644 --- a/app/assets/javascripts/store/all.js +++ b/app/assets/javascripts/store/all.js @@ -6,11 +6,8 @@ // //= require 'jquery' -//= require jquery_ujs //= require store/spree_core //= require store/spree_auth //= require store/spree_promo -//= require foundation -//= require_tree . -$(function(){ $(document).foundation(); }); +//= require_tree . diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 4ad51bbca4..60db6ad7e5 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -3,6 +3,5 @@ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * the top of the compiled file, but it's generally better to create a new file per style scope. *= require_self - *= require foundation_and_overrides - *= require_tree . + *= require_tree . */ \ No newline at end of file diff --git a/app/assets/stylesheets/search/all.css b/app/assets/stylesheets/search/all.css new file mode 100644 index 0000000000..e4409decee --- /dev/null +++ b/app/assets/stylesheets/search/all.css @@ -0,0 +1,8 @@ +/* + * This is a manifest file that'll automatically include all the stylesheets available in this directory + * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at + * the top of the compiled file, but it's generally better to create a new file per style scope. + *= require_self + *= require ./foundation_and_overrides + *= require_tree . +*/ \ No newline at end of file diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/search/foundation_and_overrides.scss similarity index 100% rename from app/assets/stylesheets/foundation_and_overrides.scss rename to app/assets/stylesheets/search/foundation_and_overrides.scss diff --git a/app/assets/stylesheets/home.css.scss b/app/assets/stylesheets/search/home.css.scss similarity index 100% rename from app/assets/stylesheets/home.css.scss rename to app/assets/stylesheets/search/home.css.scss diff --git a/app/assets/stylesheets/store/offcanvas.css b/app/assets/stylesheets/search/offcanvas.css similarity index 100% rename from app/assets/stylesheets/store/offcanvas.css rename to app/assets/stylesheets/search/offcanvas.css diff --git a/app/views/layouts/landing_page.html.haml b/app/views/layouts/landing_page.html.haml index fd77f22f85..c7e902665c 100644 --- a/app/views/layouts/landing_page.html.haml +++ b/app/views/layouts/landing_page.html.haml @@ -5,8 +5,8 @@ %meta{name: 'viewport', content: "width=device-width,initial-scale=1.0"}/ %title= content_for?(:title) ? yield(:title) : 'Welcome to Open Food Web' - = stylesheet_link_tag "application" - = javascript_include_tag "store/all" + = stylesheet_link_tag "search/all" + = javascript_include_tag "search/all" = csrf_meta_tags %body.off-canvas %nav.top-bar