diff --git a/.gitignore b/.gitignore index 6db3c9a5bc..0bb97dce5f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,20 @@ # Ignore bundler config. /.bundle + +/coverage/ +#Ignore .DS_Store +/.DS_Store +.DS_Store + +#ignore our secrets +/.env + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal + # Ignore all logfiles and tempfiles. /log/* !/log/.keep /tmp - -.DS_Store diff --git a/.ruby-gemset b/.ruby-gemset deleted file mode 100644 index d5c660823f..0000000000 --- a/.ruby-gemset +++ /dev/null @@ -1 +0,0 @@ -betsy diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 2bf1c1ccf3..0000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.3.1 diff --git a/Gemfile b/Gemfile index c69f4ddde9..0ed3d10f2e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,22 @@ source 'https://rubygems.org' -ruby '2.3.1' + +#Foundation Rails gem +gem 'foundation-rails' +gem 'jquery-turbolinks' +gem "awesome_print" +gem "omniauth" +gem "omniauth-github" + +gem 'simplecov', group: :test +gem 'pg', group: :production +gem 'rails_12factor', group: :production # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.2.6' -# Use postgresql as the database for Active Record -# gem 'pg', '~> 0.15' +gem 'rails', '4.2.7' +# Use sqlite3 as the database for Active Record +gem 'sqlite3', group: [:development, :test] # Use SCSS for stylesheets + gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' @@ -35,6 +46,9 @@ gem 'sdoc', '~> 0.4.0', group: :doc group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' + gem 'dotenv-rails' + gem 'better_errors' + gem 'pry' end group :development do @@ -44,3 +58,7 @@ group :development do # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' end + +group :test do + gem 'minitest-reporters' +end diff --git a/Gemfile.lock b/Gemfile.lock index 20975578b8..f79301bfe3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,46 +1,57 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) + actionmailer (4.2.7) + actionpack (= 4.2.7) + actionview (= 4.2.7) + activejob (= 4.2.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) + actionpack (4.2.7) + actionview (= 4.2.7) + activesupport (= 4.2.7) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) + actionview (4.2.7) + activesupport (= 4.2.7) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) + activejob (4.2.7) + activesupport (= 4.2.7) globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) + activemodel (4.2.7) + activesupport (= 4.2.7) builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) + activerecord (4.2.7) + activemodel (= 4.2.7) + activesupport (= 4.2.7) arel (~> 6.0) - activesupport (4.2.6) + activesupport (4.2.7) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) + ansi (1.5.0) arel (6.0.3) + awesome_print (1.7.0) + babel-source (5.8.35) + babel-transpiler (0.7.0) + babel-source (>= 4.0, < 6) + execjs (~> 2.0) + better_errors (2.1.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) builder (3.2.2) - byebug (8.2.5) + byebug (9.0.6) + coderay (1.1.1) coffee-rails (4.1.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.1.x) @@ -48,46 +59,90 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - concurrent-ruby (1.0.1) + concurrent-ruby (1.0.2) debug_inspector (0.0.2) + docile (1.1.5) + dotenv (2.1.1) + dotenv-rails (2.1.1) + dotenv (= 2.1.1) + railties (>= 4.0, < 5.1) erubis (2.7.0) - execjs (2.6.0) - globalid (0.3.6) + execjs (2.7.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + foundation-rails (6.2.4.0) + railties (>= 3.1.0) + sass (>= 3.3.0, < 3.5) + sprockets-es6 (>= 0.9.0) + globalid (0.3.7) activesupport (>= 4.1.0) + hashie (3.4.6) i18n (0.7.0) - jbuilder (2.4.1) + jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) - jquery-rails (4.1.1) + jquery-rails (4.2.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks json (1.8.3) + jwt (1.5.6) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) - mime-types (3.0) + method_source (0.8.2) + mime-types (3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) - mini_portile2 (2.0.0) - minitest (5.8.4) - multi_json (1.11.3) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (5.9.1) + minitest-reporters (1.1.11) + ansi + builder + minitest (>= 5.0) + ruby-progressbar + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + nokogiri (1.6.8.1) + mini_portile2 (~> 2.1.0) + oauth2 (1.2.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-oauth2 (1.4.0) + oauth2 (~> 1.0) + omniauth (~> 1.2) + pg (0.19.0) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) + rails (4.2.7) + actionmailer (= 4.2.7) + actionpack (= 4.2.7) + actionview (= 4.2.7) + activejob (= 4.2.7) + activemodel (= 4.2.7) + activerecord (= 4.2.7) + activesupport (= 4.2.7) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) + railties (= 4.2.7) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -97,40 +152,59 @@ GEM rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) + rails_12factor (0.0.3) + rails_serve_static_assets + rails_stdout_logging + rails_serve_static_assets (0.0.5) + rails_stdout_logging (0.0.5) + railties (4.2.7) + actionpack (= 4.2.7) + activesupport (= 4.2.7) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (11.1.2) + rake (11.3.0) rdoc (4.2.2) json (~> 1.4) + ruby-progressbar (1.8.1) sass (3.4.22) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sdoc (0.4.1) + sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - spring (1.7.1) - sprockets (3.6.0) + simplecov (0.12.0) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + slop (3.6.0) + spring (2.0.0) + activesupport (>= 4.2) + sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.4) + sprockets-es6 (0.9.2) + babel-source (>= 5.8.11) + babel-transpiler + sprockets (>= 3.0.0) + sprockets-rails (3.2.0) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) + sqlite3 (1.3.12) thor (0.19.1) thread_safe (0.3.5) - tilt (2.0.2) - turbolinks (2.5.3) - coffee-rails + tilt (2.0.5) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.0) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (3.0.2) execjs (>= 0.3.0, < 3) web-console (2.3.0) activemodel (>= 4.0) @@ -142,20 +216,30 @@ PLATFORMS ruby DEPENDENCIES + awesome_print + better_errors byebug coffee-rails (~> 4.1.0) + dotenv-rails + foundation-rails jbuilder (~> 2.0) jquery-rails - rails (= 4.2.6) + jquery-turbolinks + minitest-reporters + omniauth + omniauth-github + pg + pry + rails (= 4.2.7) + rails_12factor sass-rails (~> 5.0) sdoc (~> 0.4.0) + simplecov spring + sqlite3 turbolinks uglifier (>= 1.3.0) web-console (~> 2.0) -RUBY VERSION - ruby 2.3.1p112 - BUNDLED WITH - 1.13.5 + 1.13.1 diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000000..dd4e97e22e --- /dev/null +++ b/README.rdoc @@ -0,0 +1,28 @@ +== README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... + + +Please feel free to use a different markup language if you do not plan to run +rake doc:app. diff --git a/app/assets/images/NoProductImage.png b/app/assets/images/NoProductImage.png new file mode 100644 index 0000000000..29dc815944 Binary files /dev/null and b/app/assets/images/NoProductImage.png differ diff --git a/app/assets/images/NotYetsyLogo.png b/app/assets/images/NotYetsyLogo.png new file mode 100644 index 0000000000..6d0fc01b3c Binary files /dev/null and b/app/assets/images/NotYetsyLogo.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.16.29 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.16.29 PM.png new file mode 100644 index 0000000000..e1aa569760 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.16.29 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.16.41 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.16.41 PM.png new file mode 100644 index 0000000000..e8f17d82f3 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.16.41 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.16.54 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.16.54 PM.png new file mode 100644 index 0000000000..84b615f849 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.16.54 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.17.06 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.17.06 PM.png new file mode 100644 index 0000000000..18e0518067 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.17.06 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.17.18 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.17.18 PM.png new file mode 100644 index 0000000000..6b863b9a24 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.17.18 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.17.26 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.17.26 PM.png new file mode 100644 index 0000000000..d84d507c8c Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.17.26 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.17.33 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.17.33 PM.png new file mode 100644 index 0000000000..4119d7d160 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.17.33 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.17.47 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.17.47 PM.png new file mode 100644 index 0000000000..4ff7f1afe0 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.17.47 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.17.55 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.17.55 PM.png new file mode 100644 index 0000000000..d5850fbd32 Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.17.55 PM.png differ diff --git a/app/assets/images/Screen Shot 2016-10-24 at 5.18.04 PM.png b/app/assets/images/Screen Shot 2016-10-24 at 5.18.04 PM.png new file mode 100644 index 0000000000..a04f9c933b Binary files /dev/null and b/app/assets/images/Screen Shot 2016-10-24 at 5.18.04 PM.png differ diff --git a/app/assets/images/bath_bomb.jpg b/app/assets/images/bath_bomb.jpg new file mode 100644 index 0000000000..a27252cf99 Binary files /dev/null and b/app/assets/images/bath_bomb.jpg differ diff --git a/app/assets/images/bone_fish.jpg b/app/assets/images/bone_fish.jpg new file mode 100644 index 0000000000..44523a5134 Binary files /dev/null and b/app/assets/images/bone_fish.jpg differ diff --git a/app/assets/images/card_humanity.jpg b/app/assets/images/card_humanity.jpg new file mode 100644 index 0000000000..78af573409 Binary files /dev/null and b/app/assets/images/card_humanity.jpg differ diff --git a/app/assets/images/cat_watch.jpg b/app/assets/images/cat_watch.jpg new file mode 100644 index 0000000000..126e6ee631 Binary files /dev/null and b/app/assets/images/cat_watch.jpg differ diff --git a/app/assets/images/drunk_stoned_or_stupid.jpg b/app/assets/images/drunk_stoned_or_stupid.jpg new file mode 100644 index 0000000000..99f5eb9111 Binary files /dev/null and b/app/assets/images/drunk_stoned_or_stupid.jpg differ diff --git a/app/assets/images/elephant_wine.jpg b/app/assets/images/elephant_wine.jpg new file mode 100644 index 0000000000..f2435b2782 Binary files /dev/null and b/app/assets/images/elephant_wine.jpg differ diff --git a/app/assets/images/eyelash_goggles.jpg b/app/assets/images/eyelash_goggles.jpg new file mode 100644 index 0000000000..9dfeca6ca3 Binary files /dev/null and b/app/assets/images/eyelash_goggles.jpg differ diff --git a/app/assets/images/face.jpg b/app/assets/images/face.jpg new file mode 100644 index 0000000000..07f327964b Binary files /dev/null and b/app/assets/images/face.jpg differ diff --git a/app/assets/images/fake_banana.jpg b/app/assets/images/fake_banana.jpg new file mode 100644 index 0000000000..b51959c959 Binary files /dev/null and b/app/assets/images/fake_banana.jpg differ diff --git a/app/assets/images/finger_stash.jpg b/app/assets/images/finger_stash.jpg new file mode 100644 index 0000000000..fd0930ab41 Binary files /dev/null and b/app/assets/images/finger_stash.jpg differ diff --git a/app/assets/images/flamingo_lights.jpg b/app/assets/images/flamingo_lights.jpg new file mode 100644 index 0000000000..d5fa18b62d Binary files /dev/null and b/app/assets/images/flamingo_lights.jpg differ diff --git a/app/assets/images/galaxy_lollipops.jpg b/app/assets/images/galaxy_lollipops.jpg new file mode 100644 index 0000000000..f65ec5ac4f Binary files /dev/null and b/app/assets/images/galaxy_lollipops.jpg differ diff --git a/app/assets/images/giraffe.jpg b/app/assets/images/giraffe.jpg new file mode 100644 index 0000000000..c77c37f97b Binary files /dev/null and b/app/assets/images/giraffe.jpg differ diff --git a/app/assets/images/glass_dino.jpg b/app/assets/images/glass_dino.jpg new file mode 100644 index 0000000000..f97dc64187 Binary files /dev/null and b/app/assets/images/glass_dino.jpg differ diff --git a/app/assets/images/gosling_blanket.jpg b/app/assets/images/gosling_blanket.jpg new file mode 100644 index 0000000000..e4ca458fa3 Binary files /dev/null and b/app/assets/images/gosling_blanket.jpg differ diff --git a/app/assets/images/gosling_pillow.jpg b/app/assets/images/gosling_pillow.jpg new file mode 100644 index 0000000000..c7f6fa7e3d Binary files /dev/null and b/app/assets/images/gosling_pillow.jpg differ diff --git a/app/assets/images/hamock.jpg b/app/assets/images/hamock.jpg new file mode 100644 index 0000000000..190e6ff79a Binary files /dev/null and b/app/assets/images/hamock.jpg differ diff --git a/app/assets/images/hand.jpg b/app/assets/images/hand.jpg new file mode 100644 index 0000000000..c020f57751 Binary files /dev/null and b/app/assets/images/hand.jpg differ diff --git a/app/assets/images/hey_girl.jpg b/app/assets/images/hey_girl.jpg new file mode 100644 index 0000000000..e6eb2a19e8 Binary files /dev/null and b/app/assets/images/hey_girl.jpg differ diff --git a/app/assets/images/horse_lamp.jpg b/app/assets/images/horse_lamp.jpg new file mode 100644 index 0000000000..9fae6de4b6 Binary files /dev/null and b/app/assets/images/horse_lamp.jpg differ diff --git a/app/assets/images/hotdog_lego.jpg b/app/assets/images/hotdog_lego.jpg new file mode 100644 index 0000000000..5443e3ae14 Binary files /dev/null and b/app/assets/images/hotdog_lego.jpg differ diff --git a/app/assets/images/knives.jpg b/app/assets/images/knives.jpg new file mode 100644 index 0000000000..1562423bde Binary files /dev/null and b/app/assets/images/knives.jpg differ diff --git a/app/assets/images/ludicrous_choices.jpg b/app/assets/images/ludicrous_choices.jpg new file mode 100644 index 0000000000..1ce8fd3d9a Binary files /dev/null and b/app/assets/images/ludicrous_choices.jpg differ diff --git a/app/assets/images/mask.jpg b/app/assets/images/mask.jpg new file mode 100644 index 0000000000..f4eca0a2af Binary files /dev/null and b/app/assets/images/mask.jpg differ diff --git a/app/assets/images/mermaid_lego.jpg b/app/assets/images/mermaid_lego.jpg new file mode 100644 index 0000000000..db9dfd390f Binary files /dev/null and b/app/assets/images/mermaid_lego.jpg differ diff --git a/app/assets/images/monkey_pizza_cutter.jpg b/app/assets/images/monkey_pizza_cutter.jpg new file mode 100644 index 0000000000..7ec525956b Binary files /dev/null and b/app/assets/images/monkey_pizza_cutter.jpg differ diff --git a/app/assets/images/mustache_clips.jpg b/app/assets/images/mustache_clips.jpg new file mode 100644 index 0000000000..8b15cc3edb Binary files /dev/null and b/app/assets/images/mustache_clips.jpg differ diff --git a/app/assets/images/mythical_pillow.jpg b/app/assets/images/mythical_pillow.jpg new file mode 100644 index 0000000000..3670f1810e Binary files /dev/null and b/app/assets/images/mythical_pillow.jpg differ diff --git a/app/assets/images/nude_cat_pillow.jpg b/app/assets/images/nude_cat_pillow.jpg new file mode 100644 index 0000000000..9fa5103e14 Binary files /dev/null and b/app/assets/images/nude_cat_pillow.jpg differ diff --git a/app/assets/images/nude_cat_statue.jpg b/app/assets/images/nude_cat_statue.jpg new file mode 100644 index 0000000000..2ed82a37bb Binary files /dev/null and b/app/assets/images/nude_cat_statue.jpg differ diff --git a/app/assets/images/nudes_book.jpg b/app/assets/images/nudes_book.jpg new file mode 100644 index 0000000000..de36469ba4 Binary files /dev/null and b/app/assets/images/nudes_book.jpg differ diff --git a/app/assets/images/outlet_stash.jpg b/app/assets/images/outlet_stash.jpg new file mode 100644 index 0000000000..d67f25bce5 Binary files /dev/null and b/app/assets/images/outlet_stash.jpg differ diff --git a/app/assets/images/pac_man_clock.jpg b/app/assets/images/pac_man_clock.jpg new file mode 100644 index 0000000000..ea7e0c4ac5 Binary files /dev/null and b/app/assets/images/pac_man_clock.jpg differ diff --git a/app/assets/images/party_plungers.jpg b/app/assets/images/party_plungers.jpg new file mode 100644 index 0000000000..125c0d1eae Binary files /dev/null and b/app/assets/images/party_plungers.jpg differ diff --git a/app/assets/images/pens.jpg b/app/assets/images/pens.jpg new file mode 100644 index 0000000000..1d7c90e44d Binary files /dev/null and b/app/assets/images/pens.jpg differ diff --git a/app/assets/images/phone_case.jpg b/app/assets/images/phone_case.jpg new file mode 100644 index 0000000000..ad56f42d40 Binary files /dev/null and b/app/assets/images/phone_case.jpg differ diff --git a/app/assets/images/pig_egg.jpg b/app/assets/images/pig_egg.jpg new file mode 100644 index 0000000000..23e7b29e33 Binary files /dev/null and b/app/assets/images/pig_egg.jpg differ diff --git a/app/assets/images/pizza_raft.jpg b/app/assets/images/pizza_raft.jpg new file mode 100644 index 0000000000..2a87395739 Binary files /dev/null and b/app/assets/images/pizza_raft.jpg differ diff --git a/app/assets/images/rainbow_maker.jpg b/app/assets/images/rainbow_maker.jpg new file mode 100644 index 0000000000..37d9d7bddc Binary files /dev/null and b/app/assets/images/rainbow_maker.jpg differ diff --git a/app/assets/images/sheep.jpg b/app/assets/images/sheep.jpg new file mode 100644 index 0000000000..260f6386a8 Binary files /dev/null and b/app/assets/images/sheep.jpg differ diff --git a/app/assets/images/sphinx_bedding.jpg b/app/assets/images/sphinx_bedding.jpg new file mode 100644 index 0000000000..9e79db6b2f Binary files /dev/null and b/app/assets/images/sphinx_bedding.jpg differ diff --git a/app/assets/images/sphinx_book.jpg b/app/assets/images/sphinx_book.jpg new file mode 100644 index 0000000000..1e5ba4e847 Binary files /dev/null and b/app/assets/images/sphinx_book.jpg differ diff --git a/app/assets/images/sphinx_clock.jpg b/app/assets/images/sphinx_clock.jpg new file mode 100644 index 0000000000..d97047e1bb Binary files /dev/null and b/app/assets/images/sphinx_clock.jpg differ diff --git a/app/assets/images/sphinx_mask.jpg b/app/assets/images/sphinx_mask.jpg new file mode 100644 index 0000000000..fb76d917ac Binary files /dev/null and b/app/assets/images/sphinx_mask.jpg differ diff --git a/app/assets/images/sphinx_shirt.jpg b/app/assets/images/sphinx_shirt.jpg new file mode 100644 index 0000000000..58910bb50b Binary files /dev/null and b/app/assets/images/sphinx_shirt.jpg differ diff --git a/app/assets/images/spinning_zombie_game.jpg b/app/assets/images/spinning_zombie_game.jpg new file mode 100644 index 0000000000..87d8b07fd3 Binary files /dev/null and b/app/assets/images/spinning_zombie_game.jpg differ diff --git a/app/assets/images/sticky_notes.jpg b/app/assets/images/sticky_notes.jpg new file mode 100644 index 0000000000..1fd2393612 Binary files /dev/null and b/app/assets/images/sticky_notes.jpg differ diff --git a/app/assets/images/stress_balls.jpg b/app/assets/images/stress_balls.jpg new file mode 100644 index 0000000000..70fb826d1b Binary files /dev/null and b/app/assets/images/stress_balls.jpg differ diff --git a/app/assets/images/tea_infuser.jpg b/app/assets/images/tea_infuser.jpg new file mode 100644 index 0000000000..c79817f4e7 Binary files /dev/null and b/app/assets/images/tea_infuser.jpg differ diff --git a/app/assets/images/tire_swing.jpg b/app/assets/images/tire_swing.jpg new file mode 100644 index 0000000000..9b4b040e64 Binary files /dev/null and b/app/assets/images/tire_swing.jpg differ diff --git a/app/assets/images/umbrella.jpg b/app/assets/images/umbrella.jpg new file mode 100644 index 0000000000..8c4665010f Binary files /dev/null and b/app/assets/images/umbrella.jpg differ diff --git a/app/assets/images/unicorn.jpg b/app/assets/images/unicorn.jpg new file mode 100644 index 0000000000..5de6eb8bd5 Binary files /dev/null and b/app/assets/images/unicorn.jpg differ diff --git a/app/assets/images/unicorn_animal.jpg b/app/assets/images/unicorn_animal.jpg new file mode 100644 index 0000000000..ba3772f06d Binary files /dev/null and b/app/assets/images/unicorn_animal.jpg differ diff --git a/app/assets/images/unicorn_head.jpg b/app/assets/images/unicorn_head.jpg new file mode 100644 index 0000000000..394c9eab8f Binary files /dev/null and b/app/assets/images/unicorn_head.jpg differ diff --git a/app/assets/images/view_master.jpg b/app/assets/images/view_master.jpg new file mode 100644 index 0000000000..bba058655a Binary files /dev/null and b/app/assets/images/view_master.jpg differ diff --git a/app/assets/images/water.jpg b/app/assets/images/water.jpg new file mode 100644 index 0000000000..8ebaa16a68 Binary files /dev/null and b/app/assets/images/water.jpg differ diff --git a/app/assets/images/wedding_ring.jpg b/app/assets/images/wedding_ring.jpg new file mode 100644 index 0000000000..5d9547ebd3 Binary files /dev/null and b/app/assets/images/wedding_ring.jpg differ diff --git a/app/assets/images/wig.jpg b/app/assets/images/wig.jpg new file mode 100644 index 0000000000..ca17f66514 Binary files /dev/null and b/app/assets/images/wig.jpg differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e07c5a830f..038d8d7ecc 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,5 +12,15 @@ // //= require jquery //= require jquery_ujs +//= require foundation //= require turbolinks //= require_tree . + +$(function(){ $(document).foundation(); }); + +//= require foundation +$(document).foundation(); + +$(document).on('turbolinks:load', function() { + $(function(){ $(document).foundation(); }); +}); diff --git a/app/assets/javascripts/categories.coffee b/app/assets/javascripts/categories.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/categories.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/guests.coffee b/app/assets/javascripts/guests.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/guests.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/landing.coffee b/app/assets/javascripts/landing.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/landing.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/merchants.coffee b/app/assets/javascripts/merchants.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/merchants.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/orders.coffee b/app/assets/javascripts/orders.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/orders.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/products.coffee b/app/assets/javascripts/products.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/products.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/reviews.coffee b/app/assets/javascripts/reviews.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/reviews.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sessions.coffee b/app/assets/javascripts/sessions.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/app/assets/javascripts/sessions.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss new file mode 100644 index 0000000000..703053eb9d --- /dev/null +++ b/app/assets/stylesheets/_settings.scss @@ -0,0 +1,574 @@ +// Foundation for Sites Settings +// ----------------------------- +// +// Table of Contents: +// +// 1. Global +// 2. Breakpoints +// 3. The Grid +// 4. Base Typography +// 5. Typography Helpers +// 6. Abide +// 7. Accordion +// 8. Accordion Menu +// 9. Badge +// 10. Breadcrumbs +// 11. Button +// 12. Button Group +// 13. Callout +// 14. Close Button +// 15. Drilldown +// 16. Dropdown +// 17. Dropdown Menu +// 18. Flex Video +// 19. Forms +// 20. Label +// 21. Media Object +// 22. Menu +// 23. Meter +// 24. Off-canvas +// 25. Orbit +// 26. Pagination +// 27. Progress Bar +// 28. Reveal +// 29. Slider +// 30. Switch +// 31. Table +// 32. Tabs +// 33. Thumbnail +// 34. Title Bar +// 35. Tooltip +// 36. Top Bar + +@import 'util/util'; + +// 1. Global +// --------- + +$global-font-size: 100%; +$global-width: rem-calc(1200); +$global-lineheight: 1.5; +$foundation-palette: ( + primary: #2199e8, + secondary: #777, + success: #3adb76, + warning: #ffae00, + alert: #ec5840, +); +$light-gray: #e6e6e6; +$medium-gray: #cacaca; +$dark-gray: #8a8a8a; +$black: #0a0a0a; +$white: #fefefe; +$body-background: $white; +$body-font-color: $black; +$body-font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; +$body-antialiased: true; +$global-margin: 1rem; +$global-padding: 1rem; +$global-weight-normal: normal; +$global-weight-bold: bold; +$global-radius: 0; +$global-text-direction: ltr; +$global-flexbox: false; +$print-transparent-backgrounds: true; + +@include add-foundation-colors; + +// 2. Breakpoints +// -------------- + +$breakpoints: ( + small: 0, + medium: 640px, + large: 1024px, + xlarge: 1200px, + xxlarge: 1440px, +); +$breakpoint-classes: (small medium large); + +// 3. The Grid +// ----------- + +$grid-row-width: $global-width; +$grid-column-count: 12; +$grid-column-gutter: ( + small: 20px, + medium: 30px, +); +$grid-column-align-edge: true; +$block-grid-max: 8; + +// 4. Base Typography +// ------------------ + +$header-font-family: $body-font-family; +$header-font-weight: $global-weight-normal; +$header-font-style: normal; +$font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace; +$header-sizes: ( + small: ( + 'h1': 24, + 'h2': 20, + 'h3': 19, + 'h4': 18, + 'h5': 17, + 'h6': 16, + ), + medium: ( + 'h1': 48, + 'h2': 40, + 'h3': 31, + 'h4': 25, + 'h5': 20, + 'h6': 16, + ), +); +$header-color: inherit; +$header-lineheight: 1.4; +$header-margin-bottom: 0.5rem; +$header-text-rendering: optimizeLegibility; +$small-font-size: 80%; +$header-small-font-color: $medium-gray; +$paragraph-lineheight: 1.6; +$paragraph-margin-bottom: 1rem; +$paragraph-text-rendering: optimizeLegibility; +$code-color: $black; +$code-font-family: $font-family-monospace; +$code-font-weight: $global-weight-normal; +$code-background: $light-gray; +$code-border: 1px solid $medium-gray; +$code-padding: rem-calc(2 5 1); +$anchor-color: $primary-color; +$anchor-color-hover: scale-color($anchor-color, $lightness: -14%); +$anchor-text-decoration: none; +$anchor-text-decoration-hover: none; +$hr-width: $global-width; +$hr-border: 1px solid $medium-gray; +$hr-margin: rem-calc(20) auto; +$list-lineheight: $paragraph-lineheight; +$list-margin-bottom: $paragraph-margin-bottom; +$list-style-type: disc; +$list-style-position: outside; +$list-side-margin: 1.25rem; +$list-nested-side-margin: 1.25rem; +$defnlist-margin-bottom: 1rem; +$defnlist-term-weight: $global-weight-bold; +$defnlist-term-margin-bottom: 0.3rem; +$blockquote-color: $dark-gray; +$blockquote-padding: rem-calc(9 20 0 19); +$blockquote-border: 1px solid $medium-gray; +$cite-font-size: rem-calc(13); +$cite-color: $dark-gray; +$keystroke-font: $font-family-monospace; +$keystroke-color: $black; +$keystroke-background: $light-gray; +$keystroke-padding: rem-calc(2 4 0); +$keystroke-radius: $global-radius; +$abbr-underline: 1px dotted $black; + +// 5. Typography Helpers +// --------------------- + +$lead-font-size: $global-font-size * 1.25; +$lead-lineheight: 1.6; +$subheader-lineheight: 1.4; +$subheader-color: $dark-gray; +$subheader-font-weight: $global-weight-normal; +$subheader-margin-top: 0.2rem; +$subheader-margin-bottom: 0.5rem; +$stat-font-size: 2.5rem; + +// 6. Abide +// -------- + +$abide-inputs: true; +$abide-labels: true; +$input-background-invalid: map-get($foundation-palette, alert); +$form-label-color-invalid: map-get($foundation-palette, alert); +$input-error-color: map-get($foundation-palette, alert); +$input-error-font-size: rem-calc(12); +$input-error-font-weight: $global-weight-bold; + +// 7. Accordion +// ------------ + +$accordion-background: $white; +$accordion-plusminus: true; +$accordion-item-color: foreground($accordion-background, $primary-color); +$accordion-item-background-hover: $light-gray; +$accordion-item-padding: 1.25rem 1rem; +$accordion-content-background: $white; +$accordion-content-border: 1px solid $light-gray; +$accordion-content-color: foreground($accordion-content-background, $body-font-color); +$accordion-content-padding: 1rem; + +// 8. Accordion Menu +// ----------------- + +$accordionmenu-arrows: true; +$accordionmenu-arrow-color: $primary-color; + +// 9. Badge +// -------- + +$badge-background: $primary-color; +$badge-color: foreground($badge-background); +$badge-padding: 0.3em; +$badge-minwidth: 2.1em; +$badge-font-size: 0.6rem; + +// 10. Breadcrumbs +// --------------- + +$breadcrumbs-margin: 0 0 $global-margin 0; +$breadcrumbs-item-font-size: rem-calc(11); +$breadcrumbs-item-color: $primary-color; +$breadcrumbs-item-color-current: $black; +$breadcrumbs-item-color-disabled: $medium-gray; +$breadcrumbs-item-margin: 0.75rem; +$breadcrumbs-item-uppercase: true; +$breadcrumbs-item-slash: true; + +// 11. Button +// ---------- + +$button-padding: 0.85em 1em; +$button-margin: 0 0 $global-margin 0; +$button-fill: solid; +$button-background: $primary-color; +$button-background-hover: scale-color($button-background, $lightness: -15%); +$button-color: $white; +$button-color-alt: $black; +$button-radius: $global-radius; +$button-sizes: ( + tiny: 0.6rem, + small: 0.75rem, + default: 0.9rem, + large: 1.25rem, +); +$button-opacity-disabled: 0.25; +$button-background-hover-lightness: -20%; +$button-hollow-hover-lightness: -50%; + +// 12. Button Group +// ---------------- + +$buttongroup-margin: 1rem; +$buttongroup-spacing: 1px; +$buttongroup-child-selector: '.button'; +$buttongroup-expand-max: 6; + +// 13. Callout +// ----------- + +$callout-background: $white; +$callout-background-fade: 85%; +$callout-border: 1px solid rgba($black, 0.25); +$callout-margin: 0 0 1rem 0; +$callout-padding: 1rem; +$callout-font-color: $body-font-color; +$callout-font-color-alt: $body-background; +$callout-radius: $global-radius; +$callout-link-tint: 30%; + +// 14. Close Button +// ---------------- + +$closebutton-position: right top; +$closebutton-offset-horizontal: 1rem; +$closebutton-offset-vertical: 0.5rem; +$closebutton-size: 2em; +$closebutton-lineheight: 1; +$closebutton-color: $dark-gray; +$closebutton-color-hover: $black; + +// 15. Drilldown +// ------------- + +$drilldown-transition: transform 0.15s linear; +$drilldown-arrows: true; +$drilldown-arrow-color: $primary-color; +$drilldown-background: $white; + +// 16. Dropdown +// ------------ + +$dropdown-padding: 1rem; +$dropdown-border: 1px solid $medium-gray; +$dropdown-font-size: 1rem; +$dropdown-width: 300px; +$dropdown-radius: $global-radius; +$dropdown-sizes: ( + tiny: 100px, + small: 200px, + large: 400px, +); + +// 17. Dropdown Menu +// ----------------- + +$dropdownmenu-arrows: true; +$dropdownmenu-arrow-color: $anchor-color; +$dropdownmenu-min-width: 200px; +$dropdownmenu-background: $white; +$dropdownmenu-border: 1px solid $medium-gray; + +// 18. Flex Video +// -------------- + +$flexvideo-margin-bottom: rem-calc(16); +$flexvideo-ratio: 4 by 3; +$flexvideo-ratio-widescreen: 16 by 9; + +// 19. Forms +// --------- + +$fieldset-border: 1px solid $medium-gray; +$fieldset-padding: rem-calc(20); +$fieldset-margin: rem-calc(18 0); +$legend-padding: rem-calc(0 3); +$form-spacing: rem-calc(16); +$helptext-color: $black; +$helptext-font-size: rem-calc(13); +$helptext-font-style: italic; +$input-prefix-color: $black; +$input-prefix-background: $light-gray; +$input-prefix-border: 1px solid $medium-gray; +$input-prefix-padding: 1rem; +$form-label-color: $black; +$form-label-font-size: rem-calc(14); +$form-label-font-weight: $global-weight-normal; +$form-label-line-height: 1.8; +$select-background: $white; +$select-triangle-color: $dark-gray; +$select-radius: $global-radius; +$input-color: $black; +$input-placeholder-color: $medium-gray; +$input-font-family: inherit; +$input-font-size: rem-calc(16); +$input-background: $white; +$input-background-focus: $white; +$input-background-disabled: $light-gray; +$input-border: 1px solid $medium-gray; +$input-border-focus: 1px solid $dark-gray; +$input-shadow: inset 0 1px 2px rgba($black, 0.1); +$input-shadow-focus: 0 0 5px $medium-gray; +$input-cursor-disabled: not-allowed; +$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out; +$input-number-spinners: true; +$input-radius: $global-radius; +$button-radius: $global-radius; + +// 20. Label +// --------- + +$label-background: $primary-color; +$label-color: foreground($label-background); +$label-font-size: 0.8rem; +$label-padding: 0.33333rem 0.5rem; +$label-radius: $global-radius; + +// 21. Media Object +// ---------------- + +$mediaobject-margin-bottom: $global-margin; +$mediaobject-section-padding: $global-padding; +$mediaobject-image-width-stacked: 100%; + +// 22. Menu +// -------- + +$menu-margin: 0; +$menu-margin-nested: 1rem; +$menu-item-padding: 0.7rem 1rem; +$menu-item-color-active: $white; +$menu-item-background-active: map-get($foundation-palette, primary); +$menu-icon-spacing: 0.25rem; + +// 23. Meter +// --------- + +$meter-height: 1rem; +$meter-radius: $global-radius; +$meter-background: $medium-gray; +$meter-fill-good: $success-color; +$meter-fill-medium: $warning-color; +$meter-fill-bad: $alert-color; + +// 24. Off-canvas +// -------------- + +$offcanvas-size: 250px; +$offcanvas-background: $light-gray; +$offcanvas-zindex: -1; +$offcanvas-transition-length: 0.5s; +$offcanvas-transition-timing: ease; +$offcanvas-fixed-reveal: true; +$offcanvas-exit-background: rgba($white, 0.25); +$maincontent-class: 'off-canvas-content'; +$maincontent-shadow: 0 0 10px rgba($black, 0.5); + +// 25. Orbit +// --------- + +$orbit-bullet-background: $medium-gray; +$orbit-bullet-background-active: $dark-gray; +$orbit-bullet-diameter: 1.2rem; +$orbit-bullet-margin: 0.1rem; +$orbit-bullet-margin-top: 0.8rem; +$orbit-bullet-margin-bottom: 0.8rem; +$orbit-caption-background: rgba($black, 0.5); +$orbit-caption-padding: 1rem; +$orbit-control-background-hover: rgba($black, 0.5); +$orbit-control-padding: 1rem; +$orbit-control-zindex: 10; + +// 26. Pagination +// -------------- + +$pagination-font-size: rem-calc(14); +$pagination-margin-bottom: $global-margin; +$pagination-item-color: $black; +$pagination-item-padding: rem-calc(3 10); +$pagination-item-spacing: rem-calc(1); +$pagination-radius: $global-radius; +$pagination-item-background-hover: $light-gray; +$pagination-item-background-current: $primary-color; +$pagination-item-color-current: foreground($pagination-item-background-current); +$pagination-item-color-disabled: $medium-gray; +$pagination-ellipsis-color: $black; +$pagination-mobile-items: false; +$pagination-mobile-current-item: false; +$pagination-arrows: true; + +// 27. Progress Bar +// ---------------- + +$progress-height: 1rem; +$progress-background: $medium-gray; +$progress-margin-bottom: $global-margin; +$progress-meter-background: $primary-color; +$progress-radius: $global-radius; + +// 28. Reveal +// ---------- + +$reveal-background: $white; +$reveal-width: 600px; +$reveal-max-width: $global-width; +$reveal-padding: $global-padding; +$reveal-border: 1px solid $medium-gray; +$reveal-radius: $global-radius; +$reveal-zindex: 1005; +$reveal-overlay-background: rgba($black, 0.45); + +// 29. Slider +// ---------- + +$slider-width-vertical: 0.5rem; +$slider-transition: all 0.2s ease-in-out; +$slider-height: 0.5rem; +$slider-background: $light-gray; +$slider-fill-background: $medium-gray; +$slider-handle-height: 1.4rem; +$slider-handle-width: 1.4rem; +$slider-handle-background: $primary-color; +$slider-opacity-disabled: 0.25; +$slider-radius: $global-radius; + +// 30. Switch +// ---------- + +$switch-background: $medium-gray; +$switch-background-active: $primary-color; +$switch-height: 2rem; +$switch-height-tiny: 1.5rem; +$switch-height-small: 1.75rem; +$switch-height-large: 2.5rem; +$switch-radius: $global-radius; +$switch-margin: $global-margin; +$switch-paddle-background: $white; +$switch-paddle-offset: 0.25rem; +$switch-paddle-radius: $global-radius; +$switch-paddle-transition: all 0.25s ease-out; + +// 31. Table +// --------- + +$table-background: $white; +$table-color-scale: 5%; +$table-border: 1px solid smart-scale($table-background, $table-color-scale); +$table-padding: rem-calc(8 10 10); +$table-hover-scale: 2%; +$table-row-hover: darken($table-background, $table-hover-scale); +$table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale); +$table-striped-background: smart-scale($table-background, $table-color-scale); +$table-stripe: even; +$table-head-background: smart-scale($table-background, $table-color-scale / 2); +$table-head-row-hover: darken($table-head-background, $table-hover-scale); +$table-foot-background: smart-scale($table-background, $table-color-scale); +$table-foot-row-hover: darken($table-foot-background, $table-hover-scale); +$table-head-font-color: $body-font-color; +$table-foot-font-color: $body-font-color; +$show-header-for-stacked: false; + +// 32. Tabs +// -------- + +$tab-margin: 0; +$tab-background: $white; +$tab-background-active: $light-gray; +$tab-item-font-size: rem-calc(12); +$tab-item-background-hover: $white; +$tab-item-padding: 1.25rem 1.5rem; +$tab-expand-max: 6; +$tab-content-background: $white; +$tab-content-border: $light-gray; +$tab-content-color: foreground($tab-background, $primary-color); +$tab-content-padding: 1rem; + +// 33. Thumbnail +// ------------- + +$thumbnail-border: solid 4px $white; +$thumbnail-margin-bottom: $global-margin; +$thumbnail-shadow: 0 0 0 1px rgba($black, 0.2); +$thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5); +$thumbnail-transition: box-shadow 200ms ease-out; +$thumbnail-radius: $global-radius; + +// 34. Title Bar +// ------------- + +$titlebar-background: $black; +$titlebar-color: $white; +$titlebar-padding: 0.5rem; +$titlebar-text-font-weight: bold; +$titlebar-icon-color: $white; +$titlebar-icon-color-hover: $medium-gray; +$titlebar-icon-spacing: 0.25rem; + +// 35. Tooltip +// ----------- + +$has-tip-font-weight: $global-weight-bold; +$has-tip-border-bottom: dotted 1px $dark-gray; +$tooltip-background-color: $black; +$tooltip-color: $white; +$tooltip-padding: 0.75rem; +$tooltip-font-size: $small-font-size; +$tooltip-pip-width: 0.75rem; +$tooltip-pip-height: $tooltip-pip-width * 0.866; +$tooltip-radius: $global-radius; + +// 36. Top Bar +// ----------- + +$topbar-padding: 0.5rem; +$topbar-background: $light-gray; +$topbar-submenu-background: $topbar-background; +$topbar-title-spacing: 1rem; +$topbar-input-width: 200px; +$topbar-unstack-breakpoint: medium; + diff --git a/app/assets/stylesheets/app.css b/app/assets/stylesheets/app.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index f9cd5b3483..0000000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any styles - * defined in the other CSS/SCSS files in this directory. It is generally better to create a new - * file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 0000000000..e54c8cd2e8 --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1,308 @@ +@import url('foundation.css'); + +// /* +// * This is a manifest file that'll be compiled into application.css, which will include all the files +// * listed below. +// * +// * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, +// * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. +// * +// * You're free to add application-wide styles to this file and they'll appear at the bottom of the +// * compiled file so the styles you add here take precedence over styles defined in any styles +// * defined in the other CSS/SCSS files in this directory. It is generally better to create a new +// * file per style scope. +// * +// *= require_tree . +// *= require_self +//= require foundation_and_overrides + + +header { + width: 100%; + border-bottom: 1px solid black; +} + +main { + padding-bottom: 12vh; +} + +div#checkout form { + padding-bottom: 20vh; +} +.greeting-message { + margin: 2%; + font-family: 'Unica One', 'Kaushan Script', cursive; + letter-spacing: 4px; +} + + +footer { + display: block; + width: 100%; + border-top: 1px solid black; + margin-top: 5vh; + background-color: white; + color: black; + vertical-align: middle; + font-weight: 200; + text-align: center; + position: fixed; + bottom: 0; + clear: both; +} + +footer p { + padding-top: 1%; +} + + +.dropdown { + display: inline-block; +} + + + h1{font-size: 2em;} + h2 {font-size: 1.5em;} + +ul li { + display: block; + text-align: center; + margin-left: auto; + margin-right: auto; +} +ul.row { + width: 80%; +} + +table { + margin-left: auto; + margin-right: auto; + width: 80%; + font-size: .9em; +} + +.give_me_a_margin { + border: 1px solid black; +} +body {margin: 1%;} + + + + + + + + + + +.top-bar { + border-bottom: 1px solid black; + border-top: 1px solid black; + background-color: white; +} + +.categories-explaination { + padding: 0.7rem 1rem; + margin: 0; +} + + +.top-bar-left { + width: 80%; + margin-left: 9%; + background-color: white; +} + +.top-bar-left .dropdown { + background-color: white; +} + +.orbit-slide div h3 a { + font-family: 'Unica One', 'Kaushan Script', cursive; + color: black; +} + +.orbit-slide div h3 a:hover { + font-weight: 600; +} + +.orbit-slide div { + text-align: center; +} + +.orbit-slide div p.orbit-display { + display: inline-block; + margin: 1% 2%; + text-align: center; +} + +.product-name { + text-align: center; +} + +.product-name a { + font-family: 'Unica One', 'Kaushan Script', cursive; + color: black; + font-size: 1.8rem; + letter-spacing: 2px; +} + +.product-name a:hover { + font-weight: 600; +} + +h1.product-name { + text-align: center; + margin: auto; + font-family: 'Raleway', cursive; + text-transform: uppercase; + padding-bottom: 1%; + width: 50%; + border-bottom: 0.75px solid black; + color: black; + letter-spacing: 2px; +} + +.product-info-main-container { + margin-top: 3%; +} + +.product-image-main { + text-align: right; +} +.price-and-inventory-container, .product-merchant-buttons-container, .add-to-cart-section-container { + margin: 3% 0; +} + +.price-and-inventory, .product-merchant-buttons, .add-to-cart-section { + display: inline-block; +} + +.price-and-inventory:last-of-type, .product-merchant-buttons:last-of-type { + margin-left: 10%; +} + + +.add-to-cart-section.quantity-input { + width: 60%; +} + +.add-to-cart-section-container form .add-to-cart { + display: inline-block; +} + +.quantity-input-button .btn-primary { + padding: 7%; +} + +span.identifier-field { + font-weight: 600; + text-transform: uppercase; +} +p.product-description-paragraph { + line-height: 2; +} + +.product-reviews-heading { + border-bottom: 0.75px solid black; + margin-top: 5%; +} + +.one-review { + margin: 5% 0; + border-bottom: 0.25px solid lightgray; +} + +.stars-and-author { + // border-bottom: 0.75px solid black; + margin-left: 3%; +} + + +div.product-name-div { + height: 15vh; +} + +.product-photo { + max-height: 250px; +} + +.product-grid { + margin-top: 3%; +} + + +h4.order-number { + text-align: center; + margin-top: 3%; +} + + +// ###### Media Screen Differences ###### + +@media only screen { + div.top-header { + text-align: center; + } + + img.not-yetsy-main-logo { + // width: 60%; + // margin: 0 20%; + display: none; + } + + nav { + margin-top: 0%; + text-align: center; + } + + nav ul.nav-list li { + display: inline-block; + margin: 1% 2%; + font-size: 1rem; + } + + h1.mobile-header { + display: block; + font-size: .7rem; + letter-spacing: 2px; + } + + h1.mobile-header span { + font-family: 'Unica One', 'Kaushan Script', cursive; + font-size: 2.1rem; + } + + div.top-bar { + display: none; + } +} + + + +@media only screen and (min-width: 40.063em) { + img.not-yetsy-main-logo { + width: 25%; + display: inline-block; + } + + nav { + margin-top: 5%; + text-align: center; + } + + nav ul.nav-list li { + display: inline-block; + margin: 1% 1.2%; + font-size: 1.2rem; + } + + + h1.mobile-header { + display: none; + } + + div.top-bar { + display: block; + } +} diff --git a/app/assets/stylesheets/categories.scss b/app/assets/stylesheets/categories.scss new file mode 100644 index 0000000000..ef1657f8c9 --- /dev/null +++ b/app/assets/stylesheets/categories.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the categories controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/foundation.css b/app/assets/stylesheets/foundation.css new file mode 100644 index 0000000000..14a0d5a9f6 --- /dev/null +++ b/app/assets/stylesheets/foundation.css @@ -0,0 +1,4196 @@ +@charset "UTF-8"; +/** + * Foundation for Sites by ZURB + * Version 6.2.3 + * foundation.zurb.com + * Licensed under MIT Open Source + */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS and IE text size adjust after device orientation change, + * without disabling user zoom. + */ +html { + font-family:'Open Sans Condensed', 'Raleway', sans-serif; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ } + +/** + * Remove default margin. + */ +body { + margin: 0; } + +/* HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; } + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ +audio, +canvas, +progress, +video { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ } + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; } + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. + */ +[hidden], +template { + display: none; } + +/* Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +a { + background-color: transparent; } + +/** + * Improve readability of focused elements when they are also in an + * active/hover state. + */ +a:active, +a:hover { + outline: 0; } + +/* Text-level semantics + ========================================================================== */ +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; } + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ +b, +strong { + font-weight: bold; } + +/** + * Address styling not present in Safari and Chrome. + */ +dfn { + font-style: italic; } + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; } + +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; } + +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; } + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +/* Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9/10. + */ +img { + border: 0; } + +/** + * Correct overflow not hidden in IE 9/10/11. + */ +svg:not(:root) { + overflow: hidden; } + +/* Grouping content + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari. + */ +figure { + margin: 1em 40px; } + +/** + * Address differences between Firefox and other browsers. + */ +hr { + box-sizing: content-box; + height: 0; } + +/** + * Contain overflow in all browsers. + */ +pre { + overflow: auto; } + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; } + +/* Forms + ========================================================================== */ +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ +button, +input, +optgroup, +select, +textarea { + color: inherit; + /* 1 */ + font: inherit; + /* 2 */ + margin: 0; + /* 3 */ } + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ +button { + overflow: visible; } + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ +button, +select { + text-transform: none; } + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ } + +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: not-allowed; } + +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; } + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +input { + line-height: normal; } + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + box-sizing: content-box; + /* 2 */ } + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +/** + * Define consistent border, margin, and padding. + * [NOTE] We don't enable this ruleset in Foundation, because we want the
element to have plain styling. + */ +/* fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; + } */ +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ +textarea { + overflow: auto; } + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ +optgroup { + font-weight: bold; } + +/* Tables + ========================================================================== */ +/** + * Remove most spacing between table cells. + */ +table { + border-collapse: collapse; + border-spacing: 0; } + +td, +th { + padding: 0; } + +.foundation-mq { + font-family: "small=0em&medium=40em&large=64em&xlarge=75em&xxlarge=90em"; } + +html { + font-size: 100%; + box-sizing: border-box; } + +*, +*::before, +*::after { + box-sizing: inherit; } + +body { + padding: 0; + margin: 0; + font-family: 'Raleway', Helvetica, Roboto, Arial, sans-serif; + letter-spacing: 1px; + font-weight: normal; + line-height: 1.5; + color: #0a0a0a; + background: #fefefe; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } + +img { + max-width: 100%; + height: auto; + -ms-interpolation-mode: bicubic; + display: inline-block; + vertical-align: middle; } + +textarea { + height: auto; + min-height: 50px; + border-radius: 0; } + +select { + width: 100%; + border-radius: 0; } + +#map_canvas img, +#map_canvas embed, +#map_canvas object, +.map_canvas img, +.map_canvas embed, +.map_canvas object, +.mqa-display img, +.mqa-display embed, +.mqa-display object { + max-width: none !important; } + +button { + -webkit-appearance: none; + -moz-appearance: none; + background: transparent; + padding: 0; + border: 0; + border-radius: 0; + line-height: 1; } + [data-whatinput='mouse'] button { + outline: 0; } + +.is-visible { + display: block !important; } + +.is-hidden { + display: none !important; } + +.row { + max-width: 75rem; + margin-left: auto; + margin-right: auto; } + .row::before, .row::after { + content: ' '; + display: table; } + .row::after { + clear: both; } + .row.collapse > .column, .row.collapse > .columns { + padding-left: 0; + padding-right: 0; } + .row .row { + max-width: none; + margin-left: -0.625rem; + margin-right: -0.625rem; } + @media screen and (min-width: 40em) { + .row .row { + margin-left: -0.9375rem; + margin-right: -0.9375rem; } } + .row .row.collapse { + margin-left: 0; + margin-right: 0; } + .row.expanded { + max-width: none; } + .row.expanded .row { + margin-left: auto; + margin-right: auto; } + +.column, .columns { + width: 100%; + float: left; + padding-left: 0.625rem; + padding-right: 0.625rem; } + @media screen and (min-width: 40em) { + .column, .columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; } } + .column:last-child:not(:first-child), .columns:last-child:not(:first-child) { + float: right; } + .column.end:last-child:last-child, .end.columns:last-child:last-child { + float: left; } + +.column.row.row, .row.row.columns { + float: none; } + .row .column.row.row, .row .row.row.columns { + padding-left: 0; + padding-right: 0; + margin-left: 0; + margin-right: 0; } + +.small-1 { + width: 8.33333%; } + +.small-push-1 { + position: relative; + left: 8.33333%; } + +.small-pull-1 { + position: relative; + left: -8.33333%; } + +.small-offset-0 { + margin-left: 0%; } + +.small-2 { + width: 16.66667%; } + +.small-push-2 { + position: relative; + left: 16.66667%; } + +.small-pull-2 { + position: relative; + left: -16.66667%; } + +.small-offset-1 { + margin-left: 8.33333%; } + +.small-3 { + width: 25%; } + +.small-push-3 { + position: relative; + left: 25%; } + +.small-pull-3 { + position: relative; + left: -25%; } + +.small-offset-2 { + margin-left: 16.66667%; } + +.small-4 { + width: 33.33333%; } + +.small-push-4 { + position: relative; + left: 33.33333%; } + +.small-pull-4 { + position: relative; + left: -33.33333%; } + +.small-offset-3 { + margin-left: 25%; } + +.small-5 { + width: 41.66667%; } + +.small-push-5 { + position: relative; + left: 41.66667%; } + +.small-pull-5 { + position: relative; + left: -41.66667%; } + +.small-offset-4 { + margin-left: 33.33333%; } + +.small-6 { + width: 50%; } + +.small-push-6 { + position: relative; + left: 50%; } + +.small-pull-6 { + position: relative; + left: -50%; } + +.small-offset-5 { + margin-left: 41.66667%; } + +.small-7 { + width: 58.33333%; } + +.small-push-7 { + position: relative; + left: 58.33333%; } + +.small-pull-7 { + position: relative; + left: -58.33333%; } + +.small-offset-6 { + margin-left: 50%; } + +.small-8 { + width: 66.66667%; } + +.small-push-8 { + position: relative; + left: 66.66667%; } + +.small-pull-8 { + position: relative; + left: -66.66667%; } + +.small-offset-7 { + margin-left: 58.33333%; } + +.small-9 { + width: 75%; } + +.small-push-9 { + position: relative; + left: 75%; } + +.small-pull-9 { + position: relative; + left: -75%; } + +.small-offset-8 { + margin-left: 66.66667%; } + +.small-10 { + width: 83.33333%; } + +.small-push-10 { + position: relative; + left: 83.33333%; } + +.small-pull-10 { + position: relative; + left: -83.33333%; } + +.small-offset-9 { + margin-left: 75%; } + +.small-11 { + width: 91.66667%; } + +.small-push-11 { + position: relative; + left: 91.66667%; } + +.small-pull-11 { + position: relative; + left: -91.66667%; } + +.small-offset-10 { + margin-left: 83.33333%; } + +.small-12 { + width: 100%; } + +.small-offset-11 { + margin-left: 91.66667%; } + +.small-up-1 > .column, .small-up-1 > .columns { + width: 100%; + float: left; } + .small-up-1 > .column:nth-of-type(1n), .small-up-1 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-1 > .column:nth-of-type(1n+1), .small-up-1 > .columns:nth-of-type(1n+1) { + clear: both; } + .small-up-1 > .column:last-child, .small-up-1 > .columns:last-child { + float: left; } + +.small-up-2 > .column, .small-up-2 > .columns { + width: 50%; + float: left; } + .small-up-2 > .column:nth-of-type(1n), .small-up-2 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-2 > .column:nth-of-type(2n+1), .small-up-2 > .columns:nth-of-type(2n+1) { + clear: both; } + .small-up-2 > .column:last-child, .small-up-2 > .columns:last-child { + float: left; } + +.small-up-3 > .column, .small-up-3 > .columns { + width: 33.33333%; + float: left; } + .small-up-3 > .column:nth-of-type(1n), .small-up-3 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-3 > .column:nth-of-type(3n+1), .small-up-3 > .columns:nth-of-type(3n+1) { + clear: both; } + .small-up-3 > .column:last-child, .small-up-3 > .columns:last-child { + float: left; } + +.small-up-4 > .column, .small-up-4 > .columns { + width: 25%; + float: left; } + .small-up-4 > .column:nth-of-type(1n), .small-up-4 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-4 > .column:nth-of-type(4n+1), .small-up-4 > .columns:nth-of-type(4n+1) { + clear: both; } + .small-up-4 > .column:last-child, .small-up-4 > .columns:last-child { + float: left; } + +.small-up-5 > .column, .small-up-5 > .columns { + width: 20%; + float: left; } + .small-up-5 > .column:nth-of-type(1n), .small-up-5 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-5 > .column:nth-of-type(5n+1), .small-up-5 > .columns:nth-of-type(5n+1) { + clear: both; } + .small-up-5 > .column:last-child, .small-up-5 > .columns:last-child { + float: left; } + +.small-up-6 > .column, .small-up-6 > .columns { + width: 16.66667%; + float: left; } + .small-up-6 > .column:nth-of-type(1n), .small-up-6 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-6 > .column:nth-of-type(6n+1), .small-up-6 > .columns:nth-of-type(6n+1) { + clear: both; } + .small-up-6 > .column:last-child, .small-up-6 > .columns:last-child { + float: left; } + +.small-up-7 > .column, .small-up-7 > .columns { + width: 14.28571%; + float: left; } + .small-up-7 > .column:nth-of-type(1n), .small-up-7 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-7 > .column:nth-of-type(7n+1), .small-up-7 > .columns:nth-of-type(7n+1) { + clear: both; } + .small-up-7 > .column:last-child, .small-up-7 > .columns:last-child { + float: left; } + +.small-up-8 > .column, .small-up-8 > .columns { + width: 12.5%; + float: left; } + .small-up-8 > .column:nth-of-type(1n), .small-up-8 > .columns:nth-of-type(1n) { + clear: none; } + .small-up-8 > .column:nth-of-type(8n+1), .small-up-8 > .columns:nth-of-type(8n+1) { + clear: both; } + .small-up-8 > .column:last-child, .small-up-8 > .columns:last-child { + float: left; } + +.small-collapse > .column, .small-collapse > .columns { + padding-left: 0; + padding-right: 0; } + +.small-collapse .row, +.expanded.row .small-collapse.row { + margin-left: 0; + margin-right: 0; } + +.small-uncollapse > .column, .small-uncollapse > .columns { + padding-left: 0.625rem; + padding-right: 0.625rem; } + +.small-centered { + float: none; + margin-left: auto; + margin-right: auto; } + +.small-uncentered, +.small-push-0, +.small-pull-0 { + position: static; + margin-left: 0; + margin-right: 0; + float: left; } + +@media screen and (min-width: 40em) { + .medium-1 { + width: 8.33333%; } + .medium-push-1 { + position: relative; + left: 8.33333%; } + .medium-pull-1 { + position: relative; + left: -8.33333%; } + .medium-offset-0 { + margin-left: 0%; } + .medium-2 { + width: 16.66667%; } + .medium-push-2 { + position: relative; + left: 16.66667%; } + .medium-pull-2 { + position: relative; + left: -16.66667%; } + .medium-offset-1 { + margin-left: 8.33333%; } + .medium-3 { + width: 25%; } + .medium-push-3 { + position: relative; + left: 25%; } + .medium-pull-3 { + position: relative; + left: -25%; } + .medium-offset-2 { + margin-left: 16.66667%; } + .medium-4 { + width: 33.33333%; } + .medium-push-4 { + position: relative; + left: 33.33333%; } + .medium-pull-4 { + position: relative; + left: -33.33333%; } + .medium-offset-3 { + margin-left: 25%; } + .medium-5 { + width: 41.66667%; } + .medium-push-5 { + position: relative; + left: 41.66667%; } + .medium-pull-5 { + position: relative; + left: -41.66667%; } + .medium-offset-4 { + margin-left: 33.33333%; } + .medium-6 { + width: 50%; } + .medium-push-6 { + position: relative; + left: 50%; } + .medium-pull-6 { + position: relative; + left: -50%; } + .medium-offset-5 { + margin-left: 41.66667%; } + .medium-7 { + width: 58.33333%; } + .medium-push-7 { + position: relative; + left: 58.33333%; } + .medium-pull-7 { + position: relative; + left: -58.33333%; } + .medium-offset-6 { + margin-left: 50%; } + .medium-8 { + width: 66.66667%; } + .medium-push-8 { + position: relative; + left: 66.66667%; } + .medium-pull-8 { + position: relative; + left: -66.66667%; } + .medium-offset-7 { + margin-left: 58.33333%; } + .medium-9 { + width: 75%; } + .medium-push-9 { + position: relative; + left: 75%; } + .medium-pull-9 { + position: relative; + left: -75%; } + .medium-offset-8 { + margin-left: 66.66667%; } + .medium-10 { + width: 83.33333%; } + .medium-push-10 { + position: relative; + left: 83.33333%; } + .medium-pull-10 { + position: relative; + left: -83.33333%; } + .medium-offset-9 { + margin-left: 75%; } + .medium-11 { + width: 91.66667%; } + .medium-push-11 { + position: relative; + left: 91.66667%; } + .medium-pull-11 { + position: relative; + left: -91.66667%; } + .medium-offset-10 { + margin-left: 83.33333%; } + .medium-12 { + width: 100%; } + .medium-offset-11 { + margin-left: 91.66667%; } + .medium-up-1 > .column, .medium-up-1 > .columns { + width: 100%; + float: left; } + .medium-up-1 > .column:nth-of-type(1n), .medium-up-1 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-1 > .column:nth-of-type(1n+1), .medium-up-1 > .columns:nth-of-type(1n+1) { + clear: both; } + .medium-up-1 > .column:last-child, .medium-up-1 > .columns:last-child { + float: left; } + .medium-up-2 > .column, .medium-up-2 > .columns { + width: 50%; + float: left; } + .medium-up-2 > .column:nth-of-type(1n), .medium-up-2 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-2 > .column:nth-of-type(2n+1), .medium-up-2 > .columns:nth-of-type(2n+1) { + clear: both; } + .medium-up-2 > .column:last-child, .medium-up-2 > .columns:last-child { + float: left; } + .medium-up-3 > .column, .medium-up-3 > .columns { + width: 33.33333%; + float: left; } + .medium-up-3 > .column:nth-of-type(1n), .medium-up-3 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-3 > .column:nth-of-type(3n+1), .medium-up-3 > .columns:nth-of-type(3n+1) { + clear: both; } + .medium-up-3 > .column:last-child, .medium-up-3 > .columns:last-child { + float: left; } + .medium-up-4 > .column, .medium-up-4 > .columns { + width: 25%; + float: left; } + .medium-up-4 > .column:nth-of-type(1n), .medium-up-4 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-4 > .column:nth-of-type(4n+1), .medium-up-4 > .columns:nth-of-type(4n+1) { + clear: both; } + .medium-up-4 > .column:last-child, .medium-up-4 > .columns:last-child { + float: left; } + .medium-up-5 > .column, .medium-up-5 > .columns { + width: 20%; + float: left; } + .medium-up-5 > .column:nth-of-type(1n), .medium-up-5 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-5 > .column:nth-of-type(5n+1), .medium-up-5 > .columns:nth-of-type(5n+1) { + clear: both; } + .medium-up-5 > .column:last-child, .medium-up-5 > .columns:last-child { + float: left; } + .medium-up-6 > .column, .medium-up-6 > .columns { + width: 16.66667%; + float: left; } + .medium-up-6 > .column:nth-of-type(1n), .medium-up-6 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-6 > .column:nth-of-type(6n+1), .medium-up-6 > .columns:nth-of-type(6n+1) { + clear: both; } + .medium-up-6 > .column:last-child, .medium-up-6 > .columns:last-child { + float: left; } + .medium-up-7 > .column, .medium-up-7 > .columns { + width: 14.28571%; + float: left; } + .medium-up-7 > .column:nth-of-type(1n), .medium-up-7 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-7 > .column:nth-of-type(7n+1), .medium-up-7 > .columns:nth-of-type(7n+1) { + clear: both; } + .medium-up-7 > .column:last-child, .medium-up-7 > .columns:last-child { + float: left; } + .medium-up-8 > .column, .medium-up-8 > .columns { + width: 12.5%; + float: left; } + .medium-up-8 > .column:nth-of-type(1n), .medium-up-8 > .columns:nth-of-type(1n) { + clear: none; } + .medium-up-8 > .column:nth-of-type(8n+1), .medium-up-8 > .columns:nth-of-type(8n+1) { + clear: both; } + .medium-up-8 > .column:last-child, .medium-up-8 > .columns:last-child { + float: left; } + .medium-collapse > .column, .medium-collapse > .columns { + padding-left: 0; + padding-right: 0; } + .medium-collapse .row, + .expanded.row .medium-collapse.row { + margin-left: 0; + margin-right: 0; } + .medium-uncollapse > .column, .medium-uncollapse > .columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; } + .medium-centered { + float: none; + margin-left: auto; + margin-right: auto; } + .medium-uncentered, + .medium-push-0, + .medium-pull-0 { + position: static; + margin-left: 0; + margin-right: 0; + float: left; } } + +@media screen and (min-width: 64em) { + .large-1 { + width: 8.33333%; } + .large-push-1 { + position: relative; + left: 8.33333%; } + .large-pull-1 { + position: relative; + left: -8.33333%; } + .large-offset-0 { + margin-left: 0%; } + .large-2 { + width: 16.66667%; } + .large-push-2 { + position: relative; + left: 16.66667%; } + .large-pull-2 { + position: relative; + left: -16.66667%; } + .large-offset-1 { + margin-left: 8.33333%; } + .large-3 { + width: 25%; } + .large-push-3 { + position: relative; + left: 25%; } + .large-pull-3 { + position: relative; + left: -25%; } + .large-offset-2 { + margin-left: 16.66667%; } + .large-4 { + width: 33.33333%; } + .large-push-4 { + position: relative; + left: 33.33333%; } + .large-pull-4 { + position: relative; + left: -33.33333%; } + .large-offset-3 { + margin-left: 25%; } + .large-5 { + width: 41.66667%; } + .large-push-5 { + position: relative; + left: 41.66667%; } + .large-pull-5 { + position: relative; + left: -41.66667%; } + .large-offset-4 { + margin-left: 33.33333%; } + .large-6 { + width: 50%; } + .large-push-6 { + position: relative; + left: 50%; } + .large-pull-6 { + position: relative; + left: -50%; } + .large-offset-5 { + margin-left: 41.66667%; } + .large-7 { + width: 58.33333%; } + .large-push-7 { + position: relative; + left: 58.33333%; } + .large-pull-7 { + position: relative; + left: -58.33333%; } + .large-offset-6 { + margin-left: 50%; } + .large-8 { + width: 66.66667%; } + .large-push-8 { + position: relative; + left: 66.66667%; } + .large-pull-8 { + position: relative; + left: -66.66667%; } + .large-offset-7 { + margin-left: 58.33333%; } + .large-9 { + width: 75%; } + .large-push-9 { + position: relative; + left: 75%; } + .large-pull-9 { + position: relative; + left: -75%; } + .large-offset-8 { + margin-left: 66.66667%; } + .large-10 { + width: 83.33333%; } + .large-push-10 { + position: relative; + left: 83.33333%; } + .large-pull-10 { + position: relative; + left: -83.33333%; } + .large-offset-9 { + margin-left: 75%; } + .large-11 { + width: 91.66667%; } + .large-push-11 { + position: relative; + left: 91.66667%; } + .large-pull-11 { + position: relative; + left: -91.66667%; } + .large-offset-10 { + margin-left: 83.33333%; } + .large-12 { + width: 100%; } + .large-offset-11 { + margin-left: 91.66667%; } + .large-up-1 > .column, .large-up-1 > .columns { + width: 100%; + float: left; } + .large-up-1 > .column:nth-of-type(1n), .large-up-1 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-1 > .column:nth-of-type(1n+1), .large-up-1 > .columns:nth-of-type(1n+1) { + clear: both; } + .large-up-1 > .column:last-child, .large-up-1 > .columns:last-child { + float: left; } + .large-up-2 > .column, .large-up-2 > .columns { + width: 50%; + float: left; } + .large-up-2 > .column:nth-of-type(1n), .large-up-2 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-2 > .column:nth-of-type(2n+1), .large-up-2 > .columns:nth-of-type(2n+1) { + clear: both; } + .large-up-2 > .column:last-child, .large-up-2 > .columns:last-child { + float: left; } + .large-up-3 > .column, .large-up-3 > .columns { + width: 33.33333%; + float: left; } + .large-up-3 > .column:nth-of-type(1n), .large-up-3 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-3 > .column:nth-of-type(3n+1), .large-up-3 > .columns:nth-of-type(3n+1) { + clear: both; } + .large-up-3 > .column:last-child, .large-up-3 > .columns:last-child { + float: left; } + .large-up-4 > .column, .large-up-4 > .columns { + width: 25%; + float: left; } + .large-up-4 > .column:nth-of-type(1n), .large-up-4 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-4 > .column:nth-of-type(4n+1), .large-up-4 > .columns:nth-of-type(4n+1) { + clear: both; } + .large-up-4 > .column:last-child, .large-up-4 > .columns:last-child { + float: left; } + .large-up-5 > .column, .large-up-5 > .columns { + width: 20%; + float: left; } + .large-up-5 > .column:nth-of-type(1n), .large-up-5 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-5 > .column:nth-of-type(5n+1), .large-up-5 > .columns:nth-of-type(5n+1) { + clear: both; } + .large-up-5 > .column:last-child, .large-up-5 > .columns:last-child { + float: left; } + .large-up-6 > .column, .large-up-6 > .columns { + width: 16.66667%; + float: left; } + .large-up-6 > .column:nth-of-type(1n), .large-up-6 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-6 > .column:nth-of-type(6n+1), .large-up-6 > .columns:nth-of-type(6n+1) { + clear: both; } + .large-up-6 > .column:last-child, .large-up-6 > .columns:last-child { + float: left; } + .large-up-7 > .column, .large-up-7 > .columns { + width: 14.28571%; + float: left; } + .large-up-7 > .column:nth-of-type(1n), .large-up-7 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-7 > .column:nth-of-type(7n+1), .large-up-7 > .columns:nth-of-type(7n+1) { + clear: both; } + .large-up-7 > .column:last-child, .large-up-7 > .columns:last-child { + float: left; } + .large-up-8 > .column, .large-up-8 > .columns { + width: 12.5%; + float: left; } + .large-up-8 > .column:nth-of-type(1n), .large-up-8 > .columns:nth-of-type(1n) { + clear: none; } + .large-up-8 > .column:nth-of-type(8n+1), .large-up-8 > .columns:nth-of-type(8n+1) { + clear: both; } + .large-up-8 > .column:last-child, .large-up-8 > .columns:last-child { + float: left; } + .large-collapse > .column, .large-collapse > .columns { + padding-left: 0; + padding-right: 0; } + .large-collapse .row, + .expanded.row .large-collapse.row { + margin-left: 0; + margin-right: 0; } + .large-uncollapse > .column, .large-uncollapse > .columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; } + .large-centered { + float: none; + margin-left: auto; + margin-right: auto; } + .large-uncentered, + .large-push-0, + .large-pull-0 { + position: static; + margin-left: 0; + margin-right: 0; + float: left; } } + +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +form, +p, +blockquote, +th, +td { + margin: 0; + padding: 0; } + +p { + font-size: inherit; + line-height: 1.6; + margin-bottom: 1rem; + text-rendering: optimizeLegibility; } + +em, +i { + font-style: italic; + line-height: inherit; } + +strong, +b { + font-weight: bold; + line-height: inherit; } + +small { + font-size: 80%; + line-height: inherit; } + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Raleway", Helvetica, Roboto, Arial, sans-serif; + letter-spacing: 2px; + font-weight: normal; + font-style: normal; + color: inherit; + text-rendering: optimizeLegibility; + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.4; } + h1 small, + h2 small, + h3 small, + h4 small, + h5 small, + h6 small { + color: #cacaca; + line-height: 0; } + +h1 { + font-size: 1.5rem; } + +h2 { + font-size: 1.25rem; } + +h3 { + font-size: 1.1875rem; } + +h4 { + font-size: 1.125rem; } + +h5 { + font-size: 1.0625rem; } + +h6 { + font-size: 1rem; } + +@media screen and (min-width: 40em) { + h1 { + font-size: 3rem; } + h2 { + font-size: 2.5rem; } + h3 { + font-size: 1.9375rem; } + h4 { + font-size: 1.5625rem; } + h5 { + font-size: 1.25rem; } + h6 { + font-size: 1rem; } } + +a { + color: #2199e8; + text-decoration: none; + line-height: inherit; + cursor: pointer; } + a:hover, a:focus { + color: #1585cf; } + a img { + border: 0; } + +hr { + max-width: 75rem; + height: 0; + border-right: 0; + border-top: 0; + border-bottom: 1px solid #cacaca; + border-left: 0; + margin: 1.25rem auto; + clear: both; } + +ul, +ol, +dl { + line-height: 1.6; + margin-bottom: 1rem; + list-style-position: outside; } + +li { + font-size: inherit; } + +ul { + list-style-type: disc; + margin-left: 1.25rem; } + +ol { + margin-left: 1.25rem; } + +ul ul, ol ul, ul ol, ol ol { + margin-left: 1.25rem; + margin-bottom: 0; } + +dl { + margin-bottom: 1rem; } + dl dt { + margin-bottom: 0.3rem; + font-weight: bold; } + +blockquote { + margin: 0 0 1rem; + padding: 0.5625rem 1.25rem 0 1.1875rem; + border-left: 1px solid #cacaca; } + blockquote, blockquote p { + line-height: 1.6; + color: #8a8a8a; } + +cite { + display: block; + font-size: 0.8125rem; + color: #8a8a8a; } + cite:before { + content: '\2014 \0020'; } + +abbr { + color: #0a0a0a; + cursor: help; + border-bottom: 1px dotted #0a0a0a; } + +code { + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-weight: normal; + color: #0a0a0a; + background-color: #e6e6e6; + border: 1px solid #cacaca; + padding: 0.125rem 0.3125rem 0.0625rem; } + +kbd { + padding: 0.125rem 0.25rem 0; + margin: 0; + background-color: #e6e6e6; + color: #0a0a0a; + font-family: Consolas, "Liberation Mono", Courier, monospace; } + +.subheader { + margin-top: 0.2rem; + margin-bottom: 0.5rem; + font-weight: normal; + line-height: 1.4; + color: #8a8a8a; } + +.lead { + font-size: 125%; + line-height: 1.6; } + +.stat { + font-size: 2.5rem; + line-height: 1; } + p + .stat { + margin-top: -1rem; } + +.no-bullet { + margin-left: 0; + list-style: none; } + +.text-left { + text-align: left; } + +.text-right { + text-align: right; } + +.text-center { + text-align: center; } + +.text-justify { + text-align: justify; } + +@media screen and (min-width: 40em) { + .medium-text-left { + text-align: left; } + .medium-text-right { + text-align: right; } + .medium-text-center { + text-align: center; } + .medium-text-justify { + text-align: justify; } } + +@media screen and (min-width: 64em) { + .large-text-left { + text-align: left; } + .large-text-right { + text-align: right; } + .large-text-center { + text-align: center; } + .large-text-justify { + text-align: justify; } } + +.show-for-print { + display: none !important; } + +@media print { + * { + background: transparent !important; + color: black !important; + box-shadow: none !important; + text-shadow: none !important; } + .show-for-print { + display: block !important; } + .hide-for-print { + display: none !important; } + table.show-for-print { + display: table !important; } + thead.show-for-print { + display: table-header-group !important; } + tbody.show-for-print { + display: table-row-group !important; } + tr.show-for-print { + display: table-row !important; } + td.show-for-print { + display: table-cell !important; } + th.show-for-print { + display: table-cell !important; } + a, + a:visited { + text-decoration: underline; } + a[href]:after { + content: " (" attr(href) ")"; } + .ir a:after, + a[href^='javascript:']:after, + a[href^='#']:after { + content: ''; } + abbr[title]:after { + content: " (" attr(title) ")"; } + pre, + blockquote { + border: 1px solid #8a8a8a; + page-break-inside: avoid; } + thead { + display: table-header-group; } + tr, + img { + page-break-inside: avoid; } + img { + max-width: 100% !important; } + @page { + margin: 0.5cm; } + p, + h2, + h3 { + orphans: 3; + widows: 3; } + h2, + h3 { + page-break-after: avoid; } } + +.button { + display: inline-block; + text-align: center; + line-height: 1; + cursor: pointer; + -webkit-appearance: none; + transition: background-color 0.25s ease-out, color 0.25s ease-out; + vertical-align: middle; + border: 1px solid transparent; + border-radius: 0; + padding: 0.85em 1em; + margin: 0 0 1rem 0; + font-size: 0.9rem; + background-color: #2199e8; + color: #fefefe; } + [data-whatinput='mouse'] .button { + outline: 0; } + .button:hover, .button:focus { + background-color: #1583cc; + color: #fefefe; } + .button.tiny { + font-size: 0.6rem; } + .button.small { + font-size: 0.75rem; } + .button.large { + font-size: 1.25rem; } + .button.expanded { + display: block; + width: 100%; + margin-left: 0; + margin-right: 0; } + .button.primary { + background-color: #2199e8; + color: #fefefe; } + .button.primary:hover, .button.primary:focus { + background-color: #147cc0; + color: #fefefe; } + .button.secondary { + background-color: #777; + color: #fefefe; } + .button.secondary:hover, .button.secondary:focus { + background-color: #5f5f5f; + color: #fefefe; } + .button.success { + background-color: #3adb76; + color: #fefefe; } + .button.success:hover, .button.success:focus { + background-color: #22bb5b; + color: #fefefe; } + .button.warning { + background-color: #ffae00; + color: #fefefe; } + .button.warning:hover, .button.warning:focus { + background-color: #cc8b00; + color: #fefefe; } + .button.alert { + background-color: #ec5840; + color: #fefefe; } + .button.alert:hover, .button.alert:focus { + background-color: #da3116; + color: #fefefe; } + .button.hollow { + border: 1px solid #2199e8; + color: #2199e8; } + .button.hollow, .button.hollow:hover, .button.hollow:focus { + background-color: transparent; } + .button.hollow:hover, .button.hollow:focus { + border-color: #0c4d78; + color: #0c4d78; } + .button.hollow.primary { + border: 1px solid #2199e8; + color: #2199e8; } + .button.hollow.primary:hover, .button.hollow.primary:focus { + border-color: #0c4d78; + color: #0c4d78; } + .button.hollow.secondary { + border: 1px solid #777; + color: #777; } + .button.hollow.secondary:hover, .button.hollow.secondary:focus { + border-color: #3c3c3c; + color: #3c3c3c; } + .button.hollow.success { + border: 1px solid #3adb76; + color: #3adb76; } + .button.hollow.success:hover, .button.hollow.success:focus { + border-color: #157539; + color: #157539; } + .button.hollow.warning { + border: 1px solid #ffae00; + color: #ffae00; } + .button.hollow.warning:hover, .button.hollow.warning:focus { + border-color: #805700; + color: #805700; } + .button.hollow.alert { + border: 1px solid #ec5840; + color: #ec5840; } + .button.hollow.alert:hover, .button.hollow.alert:focus { + border-color: #881f0e; + color: #881f0e; } + .button.disabled, .button[disabled] { + opacity: 0.25; + cursor: not-allowed; } + .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + background-color: #2199e8; + color: #fefefe; } + .button.dropdown::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 0.4em; + border-color: #fefefe transparent transparent; + border-top-style: solid; + border-bottom-width: 0; + position: relative; + top: 0.4em; + float: right; + margin-left: 1em; + display: inline-block; } + .button.arrow-only::after { + margin-left: 0; + float: none; + top: -0.1em; } + +[type='text'], [type='password'], [type='date'], [type='datetime'], [type='datetime-local'], [type='month'], [type='week'], [type='email'], [type='number'], [type='search'], [type='tel'], [type='time'], [type='url'], [type='color'], +textarea { + display: block; + box-sizing: border-box; + width: 100%; + height: 2.4375rem; + padding: 0.5rem; + border: 1px solid #cacaca; + margin: 0 0 1rem; + font-family: inherit; + font-size: 1rem; + color: #0a0a0a; + background-color: #fefefe; + box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1); + border-radius: 0; + transition: box-shadow 0.5s, border-color 0.25s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; } + [type='text']:focus, [type='password']:focus, [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus, [type='color']:focus, + textarea:focus { + border: 1px solid #8a8a8a; + background-color: #fefefe; + outline: none; + box-shadow: 0 0 5px #cacaca; + transition: box-shadow 0.5s, border-color 0.25s ease-in-out; } + +textarea { + max-width: 100%; } + textarea[rows] { + height: auto; } + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #cacaca; } + +input::-moz-placeholder, +textarea::-moz-placeholder { + color: #cacaca; } + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #cacaca; } + +input::placeholder, +textarea::placeholder { + color: #cacaca; } + +input:disabled, input[readonly], +textarea:disabled, +textarea[readonly] { + background-color: #e6e6e6; + cursor: not-allowed; } + +[type='submit'], +[type='button'] { + border-radius: 0; + -webkit-appearance: none; + -moz-appearance: none; } + +input[type='search'] { + box-sizing: border-box; } + +[type='file'], +[type='checkbox'], +[type='radio'] { + margin: 0 0 1rem; } + +[type='checkbox'] + label, +[type='radio'] + label { + display: inline-block; + margin-left: 0.5rem; + margin-right: 1rem; + margin-bottom: 0; + vertical-align: baseline; } + [type='checkbox'] + label[for], + [type='radio'] + label[for] { + cursor: pointer; } + +label > [type='checkbox'], +label > [type='radio'] { + margin-right: 0.5rem; } + +[type='file'] { + width: 100%; } + +label { + display: block; + margin: 0; + font-size: 0.875rem; + font-weight: normal; + line-height: 1.8; + color: #0a0a0a; } + label.middle { + margin: 0 0 1rem; + padding: 0.5625rem 0; } + +.help-text { + margin-top: -0.5rem; + font-size: 0.8125rem; + font-style: italic; + color: #0a0a0a; } + +.input-group { + display: table; + width: 100%; + margin-bottom: 1rem; } + .input-group > :first-child { + border-radius: 0 0 0 0; } + .input-group > :last-child > * { + border-radius: 0 0 0 0; } + +.input-group-label, .input-group-field, .input-group-button { + margin: 0; + white-space: nowrap; + display: table-cell; + vertical-align: middle; } + +.input-group-label { + text-align: center; + padding: 0 1rem; + background: #e6e6e6; + color: #0a0a0a; + border: 1px solid #cacaca; + white-space: nowrap; + width: 1%; + height: 100%; } + .input-group-label:first-child { + border-right: 0; } + .input-group-label:last-child { + border-left: 0; } + +.input-group-field { + border-radius: 0; + height: 2.5rem; } + +.input-group-button { + padding-top: 0; + padding-bottom: 0; + text-align: center; + height: 100%; + width: 1%; } + .input-group-button a, + .input-group-button input, + .input-group-button button { + margin: 0; } + +.input-group .input-group-button { + display: table-cell; } + +fieldset { + border: 0; + padding: 0; + margin: 0; } + +legend { + margin-bottom: 0.5rem; + max-width: 100%; } + +.fieldset { + border: 1px solid #cacaca; + padding: 1.25rem; + margin: 1.125rem 0; } + .fieldset legend { + background: #fefefe; + padding: 0 0.1875rem; + margin: 0; + margin-left: -0.1875rem; } + +select { + height: 2.4375rem; + padding: 0.5rem; + border: 1px solid #cacaca; + margin: 0 0 1rem; + font-size: 1rem; + font-family: inherit; + line-height: normal; + color: #0a0a0a; + background-color: #fefefe; + border-radius: 0; + -webkit-appearance: none; + -moz-appearance: none; + background-image: url("data:image/svg+xml;utf8,"); + background-size: 9px 6px; + background-position: right -1rem center; + background-origin: content-box; + background-repeat: no-repeat; + padding-right: 1.5rem; } + @media screen and (min-width: 0\0) { + select { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNrEkckNgDAMBBfRkEt0ObRBBdsGXUDgmQfK4XhH2m8czQAAy27R3tsw4Qfe2x8uOO6oYLb6GlOor3GF+swURAOmUJ+RwtEJs9WvTGEYxBXqI1MQAZhCfUQKRzDMVj+TwrAIV6jvSUEkYAr1LSkcyTBb/V+KYfX7xAeusq3sLDtGH3kEGACPWIflNZfhRQAAAABJRU5ErkJggg=="); } } + select:disabled { + background-color: #e6e6e6; + cursor: not-allowed; } + select::-ms-expand { + display: none; } + select[multiple] { + height: auto; + background-image: none; } + +.is-invalid-input:not(:focus) { + background-color: rgba(236, 88, 64, 0.1); + border-color: #ec5840; } + +.is-invalid-label { + color: #ec5840; } + +.form-error { + display: none; + margin-top: -0.5rem; + margin-bottom: 1rem; + font-size: 0.75rem; + font-weight: bold; + color: #ec5840; } + .form-error.is-visible { + display: block; } + +.accordion { + list-style-type: none; + background: #fefefe; + margin-left: 0; } + +.accordion-item:first-child > :first-child { + border-radius: 0 0 0 0; } + +.accordion-item:last-child > :last-child { + border-radius: 0 0 0 0; } + +.accordion-title { + display: block; + padding: 1.25rem 1rem; + line-height: 1; + font-size: 0.75rem; + color: #2199e8; + position: relative; + border: 1px solid #e6e6e6; + border-bottom: 0; } + :last-child:not(.is-active) > .accordion-title { + border-radius: 0 0 0 0; + border-bottom: 1px solid #e6e6e6; } + .accordion-title:hover, .accordion-title:focus { + background-color: #e6e6e6; } + .accordion-title::before { + content: '+'; + position: absolute; + right: 1rem; + top: 50%; + margin-top: -0.5rem; } + .is-active > .accordion-title::before { + content: '–'; } + +.accordion-content { + padding: 1rem; + display: none; + border: 1px solid #e6e6e6; + border-bottom: 0; + background-color: #fefefe; + color: #0a0a0a; } + :last-child > .accordion-content:last-child { + border-bottom: 1px solid #e6e6e6; } + +.is-accordion-submenu-parent > a { + position: relative; } + .is-accordion-submenu-parent > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: #2199e8 transparent transparent; + border-top-style: solid; + border-bottom-width: 0; + position: absolute; + top: 50%; + margin-top: -4px; + right: 1rem; } + +.is-accordion-submenu-parent[aria-expanded='true'] > a::after { + -webkit-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; + -webkit-transform: scaleY(-1); + -ms-transform: scaleY(-1); + transform: scaleY(-1); } + +.badge { + display: inline-block; + padding: 0.3em; + min-width: 2.1em; + font-size: 0.6rem; + text-align: center; + border-radius: 50%; + background: #2199e8; + color: #fefefe; } + .badge.secondary { + background: #777; + color: #fefefe; } + .badge.success { + background: #3adb76; + color: #fefefe; } + .badge.warning { + background: #ffae00; + color: #fefefe; } + .badge.alert { + background: #ec5840; + color: #fefefe; } + +.breadcrumbs { + list-style: none; + margin: 0 0 1rem 0; } + .breadcrumbs::before, .breadcrumbs::after { + content: ' '; + display: table; } + .breadcrumbs::after { + clear: both; } + .breadcrumbs li { + float: left; + color: #0a0a0a; + font-size: 0.6875rem; + cursor: default; + text-transform: uppercase; } + .breadcrumbs li:not(:last-child)::after { + color: #cacaca; + content: "/"; + margin: 0 0.75rem; + position: relative; + top: 1px; + opacity: 1; } + .breadcrumbs a { + color: #2199e8; } + .breadcrumbs a:hover { + text-decoration: underline; } + .breadcrumbs .disabled { + color: #cacaca; + cursor: not-allowed; } + +.button-group { + margin-bottom: 1rem; + font-size: 0; } + .button-group::before, .button-group::after { + content: ' '; + display: table; } + .button-group::after { + clear: both; } + .button-group .button { + margin: 0; + margin-right: 1px; + margin-bottom: 1px; + font-size: 0.9rem; } + .button-group .button:last-child { + margin-right: 0; } + .button-group.tiny .button { + font-size: 0.6rem; } + .button-group.small .button { + font-size: 0.75rem; } + .button-group.large .button { + font-size: 1.25rem; } + .button-group.expanded { + margin-right: -1px; } + .button-group.expanded::before, .button-group.expanded::after { + display: none; } + .button-group.expanded .button:first-child:nth-last-child(2), .button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2) ~ .button { + display: inline-block; + width: calc(50% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(2):last-child, .button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(3), .button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3) ~ .button { + display: inline-block; + width: calc(33.33333% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(3):last-child, .button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(4), .button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4) ~ .button { + display: inline-block; + width: calc(25% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(4):last-child, .button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(5), .button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5) ~ .button { + display: inline-block; + width: calc(20% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(5):last-child, .button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5) ~ .button:last-child { + margin-right: -6px; } + .button-group.expanded .button:first-child:nth-last-child(6), .button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6) ~ .button { + display: inline-block; + width: calc(16.66667% - 1px); + margin-right: 1px; } + .button-group.expanded .button:first-child:nth-last-child(6):last-child, .button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6) ~ .button:last-child { + margin-right: -6px; } + .button-group.primary .button { + background-color: #2199e8; + color: #fefefe; } + .button-group.primary .button:hover, .button-group.primary .button:focus { + background-color: #147cc0; + color: #fefefe; } + .button-group.secondary .button { + background-color: #777; + color: #fefefe; } + .button-group.secondary .button:hover, .button-group.secondary .button:focus { + background-color: #5f5f5f; + color: #fefefe; } + .button-group.success .button { + background-color: #3adb76; + color: #fefefe; } + .button-group.success .button:hover, .button-group.success .button:focus { + background-color: #22bb5b; + color: #fefefe; } + .button-group.warning .button { + background-color: #ffae00; + color: #fefefe; } + .button-group.warning .button:hover, .button-group.warning .button:focus { + background-color: #cc8b00; + color: #fefefe; } + .button-group.alert .button { + background-color: #ec5840; + color: #fefefe; } + .button-group.alert .button:hover, .button-group.alert .button:focus { + background-color: #da3116; + color: #fefefe; } + .button-group.stacked .button, .button-group.stacked-for-small .button, .button-group.stacked-for-medium .button { + width: 100%; } + .button-group.stacked .button:last-child, .button-group.stacked-for-small .button:last-child, .button-group.stacked-for-medium .button:last-child { + margin-bottom: 0; } + @media screen and (min-width: 40em) { + .button-group.stacked-for-small .button { + width: auto; + margin-bottom: 0; } } + @media screen and (min-width: 64em) { + .button-group.stacked-for-medium .button { + width: auto; + margin-bottom: 0; } } + @media screen and (max-width: 39.9375em) { + .button-group.stacked-for-small.expanded { + display: block; } + .button-group.stacked-for-small.expanded .button { + display: block; + margin-right: 0; } } + +.callout { + margin: 0 0 1rem 0; + padding: 1rem; + border: 1px solid rgba(10, 10, 10, 0.25); + border-radius: 0; + position: relative; + color: #0a0a0a; + background-color: white; } + .callout > :first-child { + margin-top: 0; } + .callout > :last-child { + margin-bottom: 0; } + .callout.primary { + background-color: #def0fc; } + .callout.secondary { + background-color: #ebebeb; } + .callout.success { + background-color: #e1faea; } + .callout.warning { + background-color: #fff3d9; } + .callout.alert { + background-color: #fce6e2; } + .callout.small { + padding-top: 0.5rem; + padding-right: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; } + .callout.large { + padding-top: 3rem; + padding-right: 3rem; + padding-bottom: 3rem; + padding-left: 3rem; } + +.close-button { + position: absolute; + color: #8a8a8a; + right: 1rem; + top: 0.5rem; + font-size: 2em; + line-height: 1; + cursor: pointer; } + [data-whatinput='mouse'] .close-button { + outline: 0; } + .close-button:hover, .close-button:focus { + color: #0a0a0a; } + +.menu { + margin: 0; + list-style-type: none; } + .menu > li { + display: table-cell; + vertical-align: middle; } + [data-whatinput='mouse'] .menu > li { + outline: 0; } + .menu > li > a { + display: block; + padding: 0.7rem 1rem; + line-height: 1; } + .menu input, + .menu a, + .menu button { + margin-bottom: 0; } + .menu > li > a img, + .menu > li > a i, + .menu > li > a svg { + vertical-align: middle; } + .menu > li > a img + span, + .menu > li > a i + span, + .menu > li > a svg + span { + vertical-align: middle; } + .menu > li > a img, + .menu > li > a i, + .menu > li > a svg { + margin-right: 0.25rem; + display: inline-block; } + .menu > li { + display: table-cell; } + .menu.vertical > li { + display: block; } + @media screen and (min-width: 40em) { + .menu.medium-horizontal > li { + display: table-cell; } + .menu.medium-vertical > li { + display: block; } } + @media screen and (min-width: 64em) { + .menu.large-horizontal > li { + display: table-cell; } + .menu.large-vertical > li { + display: block; } } + .menu.simple li { + line-height: 1; + display: inline-block; + margin-right: 1rem; } + .menu.simple a { + padding: 0; } + .menu.align-right::before, .menu.align-right::after { + content: ' '; + display: table; } + .menu.align-right::after { + clear: both; } + .menu.align-right > li { + float: right; } + .menu.expanded { + width: 100%; + display: table; + table-layout: fixed; } + .menu.expanded > li:first-child:last-child { + width: 100%; } + .menu.icon-top > li > a { + text-align: center; } + .menu.icon-top > li > a img, + .menu.icon-top > li > a i, + .menu.icon-top > li > a svg { + display: block; + margin: 0 auto 0.25rem; } + .menu.nested { + margin-left: 1rem; } + .menu .active > a { + color: #fefefe; + background: #2199e8; } + +.menu-text { + font-weight: bold; + color: inherit; + line-height: 1; + padding-top: 0; + padding-bottom: 0; + padding: 0.7rem 1rem; } + +.menu-centered { + text-align: center; } + .menu-centered > .menu { + display: inline-block; } + +.no-js [data-responsive-menu] ul { + display: none; } + +.menu-icon { + position: relative; + display: inline-block; + vertical-align: middle; + cursor: pointer; + width: 20px; + height: 16px; } + .menu-icon::after { + content: ''; + position: absolute; + display: block; + width: 100%; + height: 2px; + background: #fefefe; + top: 0; + left: 0; + box-shadow: 0 7px 0 #fefefe, 0 14px 0 #fefefe; } + .menu-icon:hover::after { + background: #cacaca; + box-shadow: 0 7px 0 #cacaca, 0 14px 0 #cacaca; } + +.menu-icon.dark { + position: relative; + display: inline-block; + vertical-align: middle; + cursor: pointer; + width: 20px; + height: 16px; } + .menu-icon.dark::after { + content: ''; + position: absolute; + display: block; + width: 100%; + height: 2px; + background: #0a0a0a; + top: 0; + left: 0; + box-shadow: 0 7px 0 #0a0a0a, 0 14px 0 #0a0a0a; } + .menu-icon.dark:hover::after { + background: #8a8a8a; + box-shadow: 0 7px 0 #8a8a8a, 0 14px 0 #8a8a8a; } + +.is-drilldown { + position: relative; + overflow: hidden; } + .is-drilldown li { + display: block !important; } + +.is-drilldown-submenu { + position: absolute; + top: 0; + left: 100%; + z-index: -1; + height: 100%; + width: 100%; + background: #fefefe; + transition: -webkit-transform 0.15s linear; + transition: transform 0.15s linear; } + .is-drilldown-submenu.is-active { + z-index: 1; + display: block; + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); } + .is-drilldown-submenu.is-closing { + -webkit-transform: translateX(100%); + -ms-transform: translateX(100%); + transform: translateX(100%); } + +.is-drilldown-submenu-parent > a { + position: relative; } + .is-drilldown-submenu-parent > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: transparent transparent transparent #2199e8; + border-left-style: solid; + border-right-width: 0; + position: absolute; + top: 50%; + margin-top: -6px; + right: 1rem; } + +.js-drilldown-back > a::before { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: transparent #2199e8 transparent transparent; + border-right-style: solid; + border-left-width: 0; + border-left-width: 0; + display: inline-block; + vertical-align: middle; + margin-right: 0.75rem; } + +.dropdown-pane { + background-color: #fefefe; + border: 1px solid #cacaca; + border-radius: 0; + display: block; + font-size: 1rem; + padding: 1rem; + position: absolute; + visibility: hidden; + width: 300px; + z-index: 10; } + .dropdown-pane.is-open { + visibility: visible; } + +.dropdown-pane.tiny { + width: 100px; } + +.dropdown-pane.small { + width: 200px; } + +.dropdown-pane.large { + width: 400px; } + +.dropdown.menu > li.opens-left > .is-dropdown-submenu { + left: auto; + right: 0; + top: 100%; } + +.dropdown.menu > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 0; + top: 100%; } + +.dropdown.menu > li.is-dropdown-submenu-parent > a { + padding-right: 1.5rem; + position: relative; } + +.dropdown.menu > li.is-dropdown-submenu-parent > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: #2199e8 transparent transparent; + border-top-style: solid; + border-bottom-width: 0; + right: 5px; + margin-top: -2px; } + +[data-whatinput='mouse'] .dropdown.menu a { + outline: 0; } + +.no-js .dropdown.menu ul { + display: none; } + +.dropdown.menu.vertical > li .is-dropdown-submenu { + top: 0; } + +.dropdown.menu.vertical > li.opens-left > .is-dropdown-submenu { + left: auto; + right: 100%; } + +.dropdown.menu.vertical > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + +.dropdown.menu.vertical > li > a::after { + right: 14px; + margin-top: -3px; } + +.dropdown.menu.vertical > li.opens-left > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent #2199e8 transparent transparent; + border-right-style: solid; + border-left-width: 0; } + +.dropdown.menu.vertical > li.opens-right > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent transparent transparent #2199e8; + border-left-style: solid; + border-right-width: 0; } + +@media screen and (min-width: 40em) { + .dropdown.menu.medium-horizontal > li.opens-left > .is-dropdown-submenu { + left: auto; + right: 0; + top: 100%; } + .dropdown.menu.medium-horizontal > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 0; + top: 100%; } + .dropdown.menu.medium-horizontal > li.is-dropdown-submenu-parent > a { + padding-right: 1.5rem; + position: relative; } + .dropdown.menu.medium-horizontal > li.is-dropdown-submenu-parent > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: #2199e8 transparent transparent; + border-top-style: solid; + border-bottom-width: 0; + right: 5px; + margin-top: -2px; } + .dropdown.menu.medium-vertical > li .is-dropdown-submenu { + top: 0; } + .dropdown.menu.medium-vertical > li.opens-left > .is-dropdown-submenu { + left: auto; + right: 100%; } + .dropdown.menu.medium-vertical > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + .dropdown.menu.medium-vertical > li > a::after { + right: 14px; + margin-top: -3px; } + .dropdown.menu.medium-vertical > li.opens-left > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent #2199e8 transparent transparent; + border-right-style: solid; + border-left-width: 0; } + .dropdown.menu.medium-vertical > li.opens-right > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent transparent transparent #2199e8; + border-left-style: solid; + border-right-width: 0; } } + +@media screen and (min-width: 64em) { + .dropdown.menu.large-horizontal > li.opens-left > .is-dropdown-submenu { + left: auto; + right: 0; + top: 100%; } + .dropdown.menu.large-horizontal > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 0; + top: 100%; } + .dropdown.menu.large-horizontal > li.is-dropdown-submenu-parent > a { + padding-right: 1.5rem; + position: relative; } + .dropdown.menu.large-horizontal > li.is-dropdown-submenu-parent > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: #2199e8 transparent transparent; + border-top-style: solid; + border-bottom-width: 0; + right: 5px; + margin-top: -2px; } + .dropdown.menu.large-vertical > li .is-dropdown-submenu { + top: 0; } + .dropdown.menu.large-vertical > li.opens-left > .is-dropdown-submenu { + left: auto; + right: 100%; } + .dropdown.menu.large-vertical > li.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + .dropdown.menu.large-vertical > li > a::after { + right: 14px; + margin-top: -3px; } + .dropdown.menu.large-vertical > li.opens-left > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent #2199e8 transparent transparent; + border-right-style: solid; + border-left-width: 0; } + .dropdown.menu.large-vertical > li.opens-right > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent transparent transparent #2199e8; + border-left-style: solid; + border-right-width: 0; } } + +.dropdown.menu.align-right .is-dropdown-submenu.first-sub { + top: 100%; + left: auto; + right: 0; } + +.is-dropdown-menu.vertical { + width: 100px; } + .is-dropdown-menu.vertical.align-right { + float: right; } + +.is-dropdown-submenu-parent { + position: relative; } + .is-dropdown-submenu-parent a::after { + position: absolute; + top: 50%; + right: 5px; + margin-top: -2px; } + .is-dropdown-submenu-parent.opens-inner > .is-dropdown-submenu { + top: 100%; + left: auto; } + .is-dropdown-submenu-parent.opens-left > .is-dropdown-submenu { + left: auto; + right: 100%; } + .is-dropdown-submenu-parent.opens-right > .is-dropdown-submenu { + right: auto; + left: 100%; } + +.is-dropdown-submenu { + display: none; + position: absolute; + top: 0; + left: 100%; + min-width: 200px; + z-index: 1; + background: #fefefe; + border: 1px solid #cacaca; } + .is-dropdown-submenu .is-dropdown-submenu-parent > a::after { + right: 14px; + margin-top: -3px; } + .is-dropdown-submenu .is-dropdown-submenu-parent.opens-left > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent #2199e8 transparent transparent; + border-right-style: solid; + border-left-width: 0; } + .is-dropdown-submenu .is-dropdown-submenu-parent.opens-right > a::after { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent transparent transparent #2199e8; + border-left-style: solid; + border-right-width: 0; } + .is-dropdown-submenu .is-dropdown-submenu { + margin-top: -1px; } + .is-dropdown-submenu > li { + width: 100%; } + .is-dropdown-submenu.js-dropdown-active { + display: block; } + +.flex-video { + position: relative; + height: 0; + padding-bottom: 75%; + margin-bottom: 1rem; + overflow: hidden; } + .flex-video iframe, + .flex-video object, + .flex-video embed, + .flex-video video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + .flex-video.widescreen { + padding-bottom: 56.25%; } + .flex-video.vimeo { + padding-top: 0; } + +.label { + display: inline-block; + padding: 0.33333rem 0.5rem; + font-size: 0.8rem; + line-height: 1; + white-space: nowrap; + cursor: default; + border-radius: 0; + background: #2199e8; + color: #fefefe; } + .label.secondary { + background: #777; + color: #fefefe; } + .label.success { + background: #3adb76; + color: #fefefe; } + .label.warning { + background: #ffae00; + color: #fefefe; } + .label.alert { + background: #ec5840; + color: #fefefe; } + +.media-object { + margin-bottom: 1rem; + display: block; } + .media-object img { + max-width: none; } + @media screen and (max-width: 39.9375em) { + .media-object.stack-for-small .media-object-section { + padding: 0; + padding-bottom: 1rem; + display: block; } + .media-object.stack-for-small .media-object-section img { + width: 100%; } } + +.media-object-section { + display: table-cell; + vertical-align: top; } + .media-object-section:first-child { + padding-right: 1rem; } + .media-object-section:last-child:not(:nth-child(2)) { + padding-left: 1rem; } + .media-object-section > :last-child { + margin-bottom: 0; } + .media-object-section.middle { + vertical-align: middle; } + .media-object-section.bottom { + vertical-align: bottom; } + +html, +body { + height: 100%; } + +.off-canvas-wrapper { + width: 100%; + overflow-x: hidden; + position: relative; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-overflow-scrolling: auto; } + +.off-canvas-wrapper-inner { + position: relative; + width: 100%; + transition: -webkit-transform 0.5s ease; + transition: transform 0.5s ease; } + .off-canvas-wrapper-inner::before, .off-canvas-wrapper-inner::after { + content: ' '; + display: table; } + .off-canvas-wrapper-inner::after { + clear: both; } + +.off-canvas-content, +.off-canvas-content { + min-height: 100%; + background: #fefefe; + transition: -webkit-transform 0.5s ease; + transition: transform 0.5s ease; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; + padding-bottom: 0.1px; + box-shadow: 0 0 10px rgba(10, 10, 10, 0.5); } + +.js-off-canvas-exit { + display: none; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(254, 254, 254, 0.25); + cursor: pointer; + transition: background 0.5s ease; } + +.off-canvas { + position: absolute; + background: #e6e6e6; + z-index: -1; + max-height: 100%; + overflow-y: auto; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); } + [data-whatinput='mouse'] .off-canvas { + outline: 0; } + .off-canvas.position-left { + left: -250px; + top: 0; + width: 250px; } + .is-open-left { + -webkit-transform: translateX(250px); + -ms-transform: translateX(250px); + transform: translateX(250px); } + .off-canvas.position-right { + right: -250px; + top: 0; + width: 250px; } + .is-open-right { + -webkit-transform: translateX(-250px); + -ms-transform: translateX(-250px); + transform: translateX(-250px); } + +@media screen and (min-width: 40em) { + .position-left.reveal-for-medium { + left: 0; + z-index: auto; + position: fixed; } + .position-left.reveal-for-medium ~ .off-canvas-content { + margin-left: 250px; } + .position-right.reveal-for-medium { + right: 0; + z-index: auto; + position: fixed; } + .position-right.reveal-for-medium ~ .off-canvas-content { + margin-right: 250px; } } + +@media screen and (min-width: 64em) { + .position-left.reveal-for-large { + left: 0; + z-index: auto; + position: fixed; } + .position-left.reveal-for-large ~ .off-canvas-content { + margin-left: 250px; } + .position-right.reveal-for-large { + right: 0; + z-index: auto; + position: fixed; } + .position-right.reveal-for-large ~ .off-canvas-content { + margin-right: 250px; } } + +.orbit { + position: relative; } + +.orbit-container { + position: relative; + margin: 0; + overflow: hidden; + list-style: none; } + +.orbit-slide { + width: 100%; + max-height: 100%; } + .orbit-slide.no-motionui.is-active { + top: 0; + left: 0; } + +.orbit-figure { + margin: 0; } + +.orbit-image { + margin: 0; + width: 100%; + max-width: 100%; } + +.orbit-caption { + position: absolute; + bottom: 0; + width: 100%; + padding: 1rem; + margin-bottom: 0; + color: #fefefe; + background-color: rgba(10, 10, 10, 0.5); } + +.orbit-previous, .orbit-next { + position: absolute; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + z-index: 10; + padding: 1rem; + color: #fefefe; } + [data-whatinput='mouse'] .orbit-previous, [data-whatinput='mouse'] .orbit-next { + outline: 0; } + .orbit-previous:hover, .orbit-next:hover, .orbit-previous:active, .orbit-next:active, .orbit-previous:focus, .orbit-next:focus { + background-color: rgba(10, 10, 10, 0.5); } + +.orbit-previous { + left: 0; } + +.orbit-next { + left: auto; + right: 0; } + +.orbit-bullets { + position: relative; + margin-top: 0.8rem; + margin-bottom: 0.8rem; + text-align: center; } + [data-whatinput='mouse'] .orbit-bullets { + outline: 0; } + .orbit-bullets button { + width: 1.2rem; + height: 1.2rem; + margin: 0.1rem; + background-color: #cacaca; + border-radius: 50%; } + .orbit-bullets button:hover { + background-color: #8a8a8a; } + .orbit-bullets button.is-active { + background-color: #8a8a8a; } + +.pagination { + margin-left: 0; + margin-bottom: 1rem; } + .pagination::before, .pagination::after { + content: ' '; + display: table; } + .pagination::after { + clear: both; } + .pagination li { + font-size: 0.875rem; + margin-right: 0.0625rem; + border-radius: 0; + display: none; } + .pagination li:last-child, .pagination li:first-child { + display: inline-block; } + @media screen and (min-width: 40em) { + .pagination li { + display: inline-block; } } + .pagination a, + .pagination button { + color: #0a0a0a; + display: block; + padding: 0.1875rem 0.625rem; + border-radius: 0; } + .pagination a:hover, + .pagination button:hover { + background: #e6e6e6; } + .pagination .current { + padding: 0.1875rem 0.625rem; + background: #2199e8; + color: #fefefe; + cursor: default; } + .pagination .disabled { + padding: 0.1875rem 0.625rem; + color: #cacaca; + cursor: not-allowed; } + .pagination .disabled:hover { + background: transparent; } + .pagination .ellipsis::after { + content: '\2026'; + padding: 0.1875rem 0.625rem; + color: #0a0a0a; } + +.pagination-previous a::before, +.pagination-previous.disabled::before { + content: '\00ab'; + display: inline-block; + margin-right: 0.5rem; } + +.pagination-next a::after, +.pagination-next.disabled::after { + content: '\00bb'; + display: inline-block; + margin-left: 0.5rem; } + +.progress { + background-color: #cacaca; + height: 1rem; + margin-bottom: 1rem; + border-radius: 0; } + .progress.primary .progress-meter { + background-color: #2199e8; } + .progress.secondary .progress-meter { + background-color: #777; } + .progress.success .progress-meter { + background-color: #3adb76; } + .progress.warning .progress-meter { + background-color: #ffae00; } + .progress.alert .progress-meter { + background-color: #ec5840; } + +.progress-meter { + position: relative; + display: block; + width: 0%; + height: 100%; + background-color: #2199e8; } + +.progress-meter-text { + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + position: absolute; + margin: 0; + font-size: 0.75rem; + font-weight: bold; + color: #fefefe; + white-space: nowrap; } + +body.is-reveal-open { + overflow: hidden; } + +html.is-reveal-open, +html.is-reveal-open body { + height: 100%; + overflow: hidden; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + +.reveal-overlay { + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1005; + background-color: rgba(10, 10, 10, 0.45); + overflow-y: scroll; } + +.reveal { + display: none; + z-index: 1006; + padding: 1rem; + border: 1px solid #cacaca; + background-color: #fefefe; + border-radius: 0; + position: relative; + top: 100px; + margin-left: auto; + margin-right: auto; + overflow-y: auto; } + [data-whatinput='mouse'] .reveal { + outline: 0; } + @media screen and (min-width: 40em) { + .reveal { + min-height: 0; } } + .reveal .column, .reveal .columns, + .reveal .columns { + min-width: 0; } + .reveal > :last-child { + margin-bottom: 0; } + @media screen and (min-width: 40em) { + .reveal { + width: 600px; + max-width: 75rem; } } + @media screen and (min-width: 40em) { + .reveal .reveal { + left: auto; + right: auto; + margin: 0 auto; } } + .reveal.collapse { + padding: 0; } + @media screen and (min-width: 40em) { + .reveal.tiny { + width: 30%; + max-width: 75rem; } } + @media screen and (min-width: 40em) { + .reveal.small { + width: 50%; + max-width: 75rem; } } + @media screen and (min-width: 40em) { + .reveal.large { + width: 90%; + max-width: 75rem; } } + .reveal.full { + top: 0; + left: 0; + width: 100%; + height: 100%; + height: 100vh; + min-height: 100vh; + max-width: none; + margin-left: 0; + border: 0; + border-radius: 0; } + @media screen and (max-width: 39.9375em) { + .reveal { + top: 0; + left: 0; + width: 100%; + height: 100%; + height: 100vh; + min-height: 100vh; + max-width: none; + margin-left: 0; + border: 0; + border-radius: 0; } } + .reveal.without-overlay { + position: fixed; } + +.slider { + position: relative; + height: 0.5rem; + margin-top: 1.25rem; + margin-bottom: 2.25rem; + background-color: #e6e6e6; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -ms-touch-action: none; + touch-action: none; } + +.slider-fill { + position: absolute; + top: 0; + left: 0; + display: inline-block; + max-width: 100%; + height: 0.5rem; + background-color: #cacaca; + transition: all 0.2s ease-in-out; } + .slider-fill.is-dragging { + transition: all 0s linear; } + +.slider-handle { + position: absolute; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + position: absolute; + left: 0; + z-index: 1; + display: inline-block; + width: 1.4rem; + height: 1.4rem; + background-color: #2199e8; + transition: all 0.2s ease-in-out; + -ms-touch-action: manipulation; + touch-action: manipulation; + border-radius: 0; } + [data-whatinput='mouse'] .slider-handle { + outline: 0; } + .slider-handle:hover { + background-color: #1583cc; } + .slider-handle.is-dragging { + transition: all 0s linear; } + +.slider.disabled, +.slider[disabled] { + opacity: 0.25; + cursor: not-allowed; } + +.slider.vertical { + display: inline-block; + width: 0.5rem; + height: 12.5rem; + margin: 0 1.25rem; + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); } + .slider.vertical .slider-fill { + top: 0; + width: 0.5rem; + max-height: 100%; } + .slider.vertical .slider-handle { + position: absolute; + top: 0; + left: 50%; + width: 1.4rem; + height: 1.4rem; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); } + +.sticky-container { + position: relative; } + +.sticky { + position: absolute; + z-index: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } + +.sticky.is-stuck { + position: fixed; + z-index: 5; } + .sticky.is-stuck.is-at-top { + top: 0; } + .sticky.is-stuck.is-at-bottom { + bottom: 0; } + +.sticky.is-anchored { + position: absolute; + left: auto; + right: auto; } + .sticky.is-anchored.is-at-bottom { + bottom: 0; } + +.switch { + margin-bottom: 1rem; + outline: 0; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: #fefefe; + font-weight: bold; + font-size: 0.875rem; } + +.switch-input { + opacity: 0; + position: absolute; } + +.switch-paddle { + background: #cacaca; + cursor: pointer; + display: block; + position: relative; + width: 4rem; + height: 2rem; + transition: all 0.25s ease-out; + border-radius: 0; + color: inherit; + font-weight: inherit; } + input + .switch-paddle { + margin: 0; } + .switch-paddle::after { + background: #fefefe; + content: ''; + display: block; + position: absolute; + height: 1.5rem; + left: 0.25rem; + top: 0.25rem; + width: 1.5rem; + transition: all 0.25s ease-out; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + border-radius: 0; } + input:checked ~ .switch-paddle { + background: #2199e8; } + input:checked ~ .switch-paddle::after { + left: 2.25rem; } + [data-whatinput='mouse'] input:focus ~ .switch-paddle { + outline: 0; } + +.switch-active, .switch-inactive { + position: absolute; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); } + +.switch-active { + left: 8%; + display: none; } + input:checked + label > .switch-active { + display: block; } + +.switch-inactive { + right: 15%; } + input:checked + label > .switch-inactive { + display: none; } + +.switch.tiny .switch-paddle { + width: 3rem; + height: 1.5rem; + font-size: 0.625rem; } + +.switch.tiny .switch-paddle::after { + width: 1rem; + height: 1rem; } + +.switch.tiny input:checked ~ .switch-paddle::after { + left: 1.75rem; } + +.switch.small .switch-paddle { + width: 3.5rem; + height: 1.75rem; + font-size: 0.75rem; } + +.switch.small .switch-paddle::after { + width: 1.25rem; + height: 1.25rem; } + +.switch.small input:checked ~ .switch-paddle::after { + left: 2rem; } + +.switch.large .switch-paddle { + width: 5rem; + height: 2.5rem; + font-size: 1rem; } + +.switch.large .switch-paddle::after { + width: 2rem; + height: 2rem; } + +.switch.large input:checked ~ .switch-paddle::after { + left: 2.75rem; } + +table { + width: 100%; + margin-bottom: 1rem; + border-radius: 0; } + table thead, + table tbody, + table tfoot { + border: 1px solid #f1f1f1; + background-color: #fefefe; } + table caption { + font-weight: bold; + padding: 0.5rem 0.625rem 0.625rem; } + table thead, + table tfoot { + background: #f8f8f8; + color: #0a0a0a; } + table thead tr, + table tfoot tr { + background: transparent; } + table thead th, + table thead td, + table tfoot th, + table tfoot td { + padding: 0.5rem 0.625rem 0.625rem; + font-weight: bold; + text-align: left; } + table tbody tr:nth-child(even) { + background-color: #f1f1f1; } + table tbody th, + table tbody td { + padding: 0.5rem 0.625rem 0.625rem; } + +@media screen and (max-width: 63.9375em) { + table.stack thead { + display: none; } + table.stack tfoot { + display: none; } + table.stack tr, + table.stack th, + table.stack td { + display: block; } + table.stack td { + border-top: 0; } } + +table.scroll { + display: block; + width: 100%; + overflow-x: auto; } + +table.hover tr:hover { + background-color: #f9f9f9; } + +table.hover tr:nth-of-type(even):hover { + background-color: #ececec; } + +.table-scroll { + overflow-x: auto; } + .table-scroll table { + width: auto; } + +.tabs { + margin: 0; + list-style-type: none; + background: #fefefe; + border: 1px solid #e6e6e6; } + .tabs::before, .tabs::after { + content: ' '; + display: table; } + .tabs::after { + clear: both; } + +.tabs.vertical > li { + width: auto; + float: none; + display: block; } + +.tabs.simple > li > a { + padding: 0; } + .tabs.simple > li > a:hover { + background: transparent; } + +.tabs.primary { + background: #2199e8; } + .tabs.primary > li > a { + color: #fefefe; } + .tabs.primary > li > a:hover, .tabs.primary > li > a:focus { + background: #1893e4; } + +.tabs-title { + float: left; } + .tabs-title > a { + display: block; + padding: 1.25rem 1.5rem; + line-height: 1; + font-size: 0.75rem; } + .tabs-title > a:hover { + background: #fefefe; } + .tabs-title > a:focus, .tabs-title > a[aria-selected='true'] { + background: #e6e6e6; } + +.tabs-content { + background: #fefefe; + transition: all 0.5s ease; + border: 1px solid #e6e6e6; + border-top: 0; } + +.tabs-content.vertical { + border: 1px solid #e6e6e6; + border-left: 0; } + +.tabs-panel { + display: none; + padding: 1rem; } + .tabs-panel.is-active { + display: block; } + +.thumbnail { + border: solid 4px #fefefe; + box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.2); + display: inline-block; + line-height: 0; + max-width: 100%; + transition: box-shadow 200ms ease-out; + border-radius: 0; + margin-bottom: 1rem; } + .thumbnail:hover, .thumbnail:focus { + box-shadow: 0 0 6px 1px rgba(33, 153, 232, 0.5); } + +.title-bar { + background: #0a0a0a; + color: #fefefe; + padding: 0.5rem; } + .title-bar::before, .title-bar::after { + content: ' '; + display: table; } + .title-bar::after { + clear: both; } + .title-bar .menu-icon { + margin-left: 0.25rem; + margin-right: 0.25rem; } + +.title-bar-left { + float: left; } + +.title-bar-right { + float: right; + text-align: right; } + +.title-bar-title { + font-weight: bold; + vertical-align: middle; + display: inline-block; } + +.menu-icon.dark { + position: relative; + display: inline-block; + vertical-align: middle; + cursor: pointer; + width: 20px; + height: 16px; } + .menu-icon.dark::after { + content: ''; + position: absolute; + display: block; + width: 100%; + height: 2px; + background: #0a0a0a; + top: 0; + left: 0; + box-shadow: 0 7px 0 #0a0a0a, 0 14px 0 #0a0a0a; } + .menu-icon.dark:hover::after { + background: #8a8a8a; + box-shadow: 0 7px 0 #8a8a8a, 0 14px 0 #8a8a8a; } + +.has-tip { + border-bottom: dotted 1px #8a8a8a; + font-weight: bold; + position: relative; + display: inline-block; + cursor: help; } + +.tooltip { + background-color: #0a0a0a; + color: #fefefe; + font-size: 80%; + padding: 0.75rem; + position: absolute; + z-index: 10; + top: calc(100% + 0.6495rem); + max-width: 10rem !important; + border-radius: 0; } + .tooltip::before { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + border-color: transparent transparent #0a0a0a; + border-bottom-style: solid; + border-top-width: 0; + bottom: 100%; + position: absolute; + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); } + .tooltip.top::before { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + border-color: #0a0a0a transparent transparent; + border-top-style: solid; + border-bottom-width: 0; + top: 100%; + bottom: auto; } + .tooltip.left::before { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + border-color: transparent transparent transparent #0a0a0a; + border-left-style: solid; + border-right-width: 0; + bottom: auto; + left: 100%; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); } + .tooltip.right::before { + content: ''; + display: block; + width: 0; + height: 0; + border: inset 0.75rem; + border-color: transparent #0a0a0a transparent transparent; + border-right-style: solid; + border-left-width: 0; + bottom: auto; + left: auto; + right: 100%; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); } + +.top-bar { + padding: 0.5rem; } + .top-bar::before, .top-bar::after { + content: ' '; + display: table; } + .top-bar::after { + clear: both; } + .top-bar, + .top-bar ul { + background-color: #e6e6e6; } + .top-bar input { + max-width: 200px; + margin-right: 1rem; } + .top-bar .input-group-field { + width: 100%; + margin-right: 0; } + .top-bar input.button { + width: auto; } + .top-bar .top-bar-left, + .top-bar .top-bar-right { + width: 100%; } + @media screen and (min-width: 40em) { + .top-bar .top-bar-left, + .top-bar .top-bar-right { + width: auto; } } + @media screen and (max-width: 63.9375em) { + .top-bar.stacked-for-medium .top-bar-left, + .top-bar.stacked-for-medium .top-bar-right { + width: 100%; } } + @media screen and (max-width: 74.9375em) { + .top-bar.stacked-for-large .top-bar-left, + .top-bar.stacked-for-large .top-bar-right { + width: 100%; } } + +.top-bar-title { + float: left; + margin-right: 1rem; } + +.top-bar-left { + float: left; } + +.top-bar-right { + float: right; } + +.hide { + display: none !important; } + +.invisible { + visibility: hidden; } + +@media screen and (max-width: 39.9375em) { + .hide-for-small-only { + display: none !important; } } + +@media screen and (max-width: 0em), screen and (min-width: 40em) { + .show-for-small-only { + display: none !important; } } + +@media screen and (min-width: 40em) { + .hide-for-medium { + display: none !important; } } + +@media screen and (max-width: 39.9375em) { + .show-for-medium { + display: none !important; } } + +@media screen and (min-width: 40em) and (max-width: 63.9375em) { + .hide-for-medium-only { + display: none !important; } } + +@media screen and (max-width: 39.9375em), screen and (min-width: 64em) { + .show-for-medium-only { + display: none !important; } } + +@media screen and (min-width: 64em) { + .hide-for-large { + display: none !important; } } + +@media screen and (max-width: 63.9375em) { + .show-for-large { + display: none !important; } } + +@media screen and (min-width: 64em) and (max-width: 74.9375em) { + .hide-for-large-only { + display: none !important; } } + +@media screen and (max-width: 63.9375em), screen and (min-width: 75em) { + .show-for-large-only { + display: none !important; } } + +.show-for-sr, +.show-on-focus { + position: absolute !important; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); } + +.show-on-focus:active, .show-on-focus:focus { + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; } + +.show-for-landscape, +.hide-for-portrait { + display: block !important; } + @media screen and (orientation: landscape) { + .show-for-landscape, + .hide-for-portrait { + display: block !important; } } + @media screen and (orientation: portrait) { + .show-for-landscape, + .hide-for-portrait { + display: none !important; } } + +.hide-for-landscape, +.show-for-portrait { + display: none !important; } + @media screen and (orientation: landscape) { + .hide-for-landscape, + .show-for-portrait { + display: none !important; } } + @media screen and (orientation: portrait) { + .hide-for-landscape, + .show-for-portrait { + display: block !important; } } + +.float-left { + float: left !important; } + +.float-right { + float: right !important; } + +.float-center { + display: block; + margin-left: auto; + margin-right: auto; } + +.clearfix::before, .clearfix::after { + content: ' '; + display: table; } + +.clearfix::after { + clear: both; } + +.slide-in-down.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateY(-100%); + -ms-transform: translateY(-100%); + transform: translateY(-100%); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-down.mui-enter.mui-enter-active { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); } + +.slide-in-left.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-left.mui-enter.mui-enter-active { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); } + +.slide-in-up.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateY(100%); + -ms-transform: translateY(100%); + transform: translateY(100%); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-up.mui-enter.mui-enter-active { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); } + +.slide-in-right.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateX(100%); + -ms-transform: translateX(100%); + transform: translateX(100%); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-in-right.mui-enter.mui-enter-active { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); } + +.slide-out-down.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-down.mui-leave.mui-leave-active { + -webkit-transform: translateY(100%); + -ms-transform: translateY(100%); + transform: translateY(100%); } + +.slide-out-right.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-right.mui-leave.mui-leave-active { + -webkit-transform: translateX(100%); + -ms-transform: translateX(100%); + transform: translateX(100%); } + +.slide-out-up.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-up.mui-leave.mui-leave-active { + -webkit-transform: translateY(-100%); + -ms-transform: translateY(-100%); + transform: translateY(-100%); } + +.slide-out-left.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; } + +.slide-out-left.mui-leave.mui-leave-active { + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); } + +.fade-in.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + opacity: 0; + transition-property: opacity; } + +.fade-in.mui-enter.mui-enter-active { + opacity: 1; } + +.fade-out.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + opacity: 1; + transition-property: opacity; } + +.fade-out.mui-leave.mui-leave-active { + opacity: 0; } + +.hinge-in-from-top.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotateX(-90deg); + transform: perspective(2000px) rotateX(-90deg); + -webkit-transform-origin: top; + -ms-transform-origin: top; + transform-origin: top; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-top.mui-enter.mui-enter-active { + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-right.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotateY(-90deg); + transform: perspective(2000px) rotateY(-90deg); + -webkit-transform-origin: right; + -ms-transform-origin: right; + transform-origin: right; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-right.mui-enter.mui-enter-active { + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-bottom.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotateX(90deg); + transform: perspective(2000px) rotateX(90deg); + -webkit-transform-origin: bottom; + -ms-transform-origin: bottom; + transform-origin: bottom; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-bottom.mui-enter.mui-enter-active { + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-left.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotateY(90deg); + transform: perspective(2000px) rotateY(90deg); + -webkit-transform-origin: left; + -ms-transform-origin: left; + transform-origin: left; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-left.mui-enter.mui-enter-active { + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-middle-x.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotateX(-90deg); + transform: perspective(2000px) rotateX(-90deg); + -webkit-transform-origin: center; + -ms-transform-origin: center; + transform-origin: center; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-middle-x.mui-enter.mui-enter-active { + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-in-from-middle-y.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotateY(-90deg); + transform: perspective(2000px) rotateY(-90deg); + -webkit-transform-origin: center; + -ms-transform-origin: center; + transform-origin: center; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.hinge-in-from-middle-y.mui-enter.mui-enter-active { + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + opacity: 1; } + +.hinge-out-from-top.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + -webkit-transform-origin: top; + -ms-transform-origin: top; + transform-origin: top; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-top.mui-leave.mui-leave-active { + -webkit-transform: perspective(2000px) rotateX(-90deg); + transform: perspective(2000px) rotateX(-90deg); + opacity: 0; } + +.hinge-out-from-right.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + -webkit-transform-origin: right; + -ms-transform-origin: right; + transform-origin: right; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-right.mui-leave.mui-leave-active { + -webkit-transform: perspective(2000px) rotateY(-90deg); + transform: perspective(2000px) rotateY(-90deg); + opacity: 0; } + +.hinge-out-from-bottom.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + -webkit-transform-origin: bottom; + -ms-transform-origin: bottom; + transform-origin: bottom; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-bottom.mui-leave.mui-leave-active { + -webkit-transform: perspective(2000px) rotateX(90deg); + transform: perspective(2000px) rotateX(90deg); + opacity: 0; } + +.hinge-out-from-left.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + -webkit-transform-origin: left; + -ms-transform-origin: left; + transform-origin: left; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-left.mui-leave.mui-leave-active { + -webkit-transform: perspective(2000px) rotateY(90deg); + transform: perspective(2000px) rotateY(90deg); + opacity: 0; } + +.hinge-out-from-middle-x.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + -webkit-transform-origin: center; + -ms-transform-origin: center; + transform-origin: center; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-middle-x.mui-leave.mui-leave-active { + -webkit-transform: perspective(2000px) rotateX(-90deg); + transform: perspective(2000px) rotateX(-90deg); + opacity: 0; } + +.hinge-out-from-middle-y.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: perspective(2000px) rotate(0deg); + transform: perspective(2000px) rotate(0deg); + -webkit-transform-origin: center; + -ms-transform-origin: center; + transform-origin: center; + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.hinge-out-from-middle-y.mui-leave.mui-leave-active { + -webkit-transform: perspective(2000px) rotateY(-90deg); + transform: perspective(2000px) rotateY(-90deg); + opacity: 0; } + +.scale-in-up.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.scale-in-up.mui-enter.mui-enter-active { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + opacity: 1; } + +.scale-in-down.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: scale(1.5); + -ms-transform: scale(1.5); + transform: scale(1.5); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.scale-in-down.mui-enter.mui-enter-active { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + opacity: 1; } + +.scale-out-up.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.scale-out-up.mui-leave.mui-leave-active { + -webkit-transform: scale(1.5); + -ms-transform: scale(1.5); + transform: scale(1.5); + opacity: 0; } + +.scale-out-down.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.scale-out-down.mui-leave.mui-leave-active { + -webkit-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; } + +.spin-in.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: rotate(-0.75turn); + -ms-transform: rotate(-0.75turn); + transform: rotate(-0.75turn); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.spin-in.mui-enter.mui-enter-active { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; } + +.spin-out.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.spin-out.mui-leave.mui-leave-active { + -webkit-transform: rotate(0.75turn); + -ms-transform: rotate(0.75turn); + transform: rotate(0.75turn); + opacity: 0; } + +.spin-in-ccw.mui-enter { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: rotate(0.75turn); + -ms-transform: rotate(0.75turn); + transform: rotate(0.75turn); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 0; } + +.spin-in-ccw.mui-enter.mui-enter-active { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; } + +.spin-out-ccw.mui-leave { + transition-duration: 500ms; + transition-timing-function: linear; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + transition-property: -webkit-transform, opacity; + transition-property: transform, opacity; + opacity: 1; } + +.spin-out-ccw.mui-leave.mui-leave-active { + -webkit-transform: rotate(-0.75turn); + -ms-transform: rotate(-0.75turn); + transform: rotate(-0.75turn); + opacity: 0; } + +.slow { + transition-duration: 750ms !important; } + +.fast { + transition-duration: 250ms !important; } + +.linear { + transition-timing-function: linear !important; } + +.ease { + transition-timing-function: ease !important; } + +.ease-in { + transition-timing-function: ease-in !important; } + +.ease-out { + transition-timing-function: ease-out !important; } + +.ease-in-out { + transition-timing-function: ease-in-out !important; } + +.bounce-in { + transition-timing-function: cubic-bezier(0.485, 0.155, 0.24, 1.245) !important; } + +.bounce-out { + transition-timing-function: cubic-bezier(0.485, 0.155, 0.515, 0.845) !important; } + +.bounce-in-out { + transition-timing-function: cubic-bezier(0.76, -0.245, 0.24, 1.245) !important; } + +.short-delay { + transition-delay: 300ms !important; } + +.long-delay { + transition-delay: 700ms !important; } + +.shake { + -webkit-animation-name: shake-7; + animation-name: shake-7; } + +@-webkit-keyframes shake-7 { + 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% { + -webkit-transform: translateX(7%); + transform: translateX(7%); } + 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { + -webkit-transform: translateX(-7%); + transform: translateX(-7%); } } + +@keyframes shake-7 { + 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% { + -webkit-transform: translateX(7%); + transform: translateX(7%); } + 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { + -webkit-transform: translateX(-7%); + transform: translateX(-7%); } } + +.spin-cw { + -webkit-animation-name: spin-cw-1turn; + animation-name: spin-cw-1turn; } + +@-webkit-keyframes spin-cw-1turn { + 0% { + -webkit-transform: rotate(-1turn); + transform: rotate(-1turn); } + 100% { + -webkit-transform: rotate(0); + transform: rotate(0); } } + +@keyframes spin-cw-1turn { + 0% { + -webkit-transform: rotate(-1turn); + transform: rotate(-1turn); } + 100% { + -webkit-transform: rotate(0); + transform: rotate(0); } } + +.spin-ccw { + -webkit-animation-name: spin-cw-1turn; + animation-name: spin-cw-1turn; } + +@keyframes spin-cw-1turn { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); } + 100% { + -webkit-transform: rotate(1turn); + transform: rotate(1turn); } } + +.wiggle { + -webkit-animation-name: wiggle-7deg; + animation-name: wiggle-7deg; } + +@-webkit-keyframes wiggle-7deg { + 40%, 50%, 60% { + -webkit-transform: rotate(7deg); + transform: rotate(7deg); } + 35%, 45%, 55%, 65% { + -webkit-transform: rotate(-7deg); + transform: rotate(-7deg); } + 0%, 30%, 70%, 100% { + -webkit-transform: rotate(0); + transform: rotate(0); } } + +@keyframes wiggle-7deg { + 40%, 50%, 60% { + -webkit-transform: rotate(7deg); + transform: rotate(7deg); } + 35%, 45%, 55%, 65% { + -webkit-transform: rotate(-7deg); + transform: rotate(-7deg); } + 0%, 30%, 70%, 100% { + -webkit-transform: rotate(0); + transform: rotate(0); } } + +.shake, +.spin-cw, +.spin-ccw, +.wiggle { + -webkit-animation-duration: 500ms; + animation-duration: 500ms; } + +.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; } + +.slow { + -webkit-animation-duration: 750ms !important; + animation-duration: 750ms !important; } + +.fast { + -webkit-animation-duration: 250ms !important; + animation-duration: 250ms !important; } + +.linear { + -webkit-animation-timing-function: linear !important; + animation-timing-function: linear !important; } + +.ease { + -webkit-animation-timing-function: ease !important; + animation-timing-function: ease !important; } + +.ease-in { + -webkit-animation-timing-function: ease-in !important; + animation-timing-function: ease-in !important; } + +.ease-out { + -webkit-animation-timing-function: ease-out !important; + animation-timing-function: ease-out !important; } + +.ease-in-out { + -webkit-animation-timing-function: ease-in-out !important; + animation-timing-function: ease-in-out !important; } + +.bounce-in { + -webkit-animation-timing-function: cubic-bezier(0.485, 0.155, 0.24, 1.245) !important; + animation-timing-function: cubic-bezier(0.485, 0.155, 0.24, 1.245) !important; } + +.bounce-out { + -webkit-animation-timing-function: cubic-bezier(0.485, 0.155, 0.515, 0.845) !important; + animation-timing-function: cubic-bezier(0.485, 0.155, 0.515, 0.845) !important; } + +.bounce-in-out { + -webkit-animation-timing-function: cubic-bezier(0.76, -0.245, 0.24, 1.245) !important; + animation-timing-function: cubic-bezier(0.76, -0.245, 0.24, 1.245) !important; } + +.short-delay { + -webkit-animation-delay: 300ms !important; + animation-delay: 300ms !important; } + +.long-delay { + -webkit-animation-delay: 700ms !important; + animation-delay: 700ms !important; } diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss new file mode 100644 index 0000000000..234147a31f --- /dev/null +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -0,0 +1,52 @@ +@charset 'utf-8'; + +@import 'settings'; +@import 'foundation'; + +// If you'd like to include motion-ui the foundation-rails gem comes prepackaged with it, uncomment the 3 @imports, if you are not using the gem you need to install the motion-ui sass package. +// + @import 'motion-ui/motion-ui'; + +// We include everything by default. To slim your CSS, remove components you don't use. + +@include foundation-global-styles; +@include foundation-grid; +@include foundation-typography; +@include foundation-button; +@include foundation-forms; +@include foundation-visibility-classes; +@include foundation-float-classes; +@include foundation-accordion; +@include foundation-accordion-menu; +@include foundation-badge; +@include foundation-breadcrumbs; +@include foundation-button-group; +@include foundation-callout; +@include foundation-close-button; +@include foundation-drilldown-menu; +@include foundation-dropdown; +@include foundation-dropdown-menu; +@include foundation-flex-video; +@include foundation-label; +@include foundation-media-object; +@include foundation-menu; +@include foundation-menu-icon; +@include foundation-off-canvas; +@include foundation-orbit; +@include foundation-pagination; +@include foundation-progress-bar; +@include foundation-slider; +@include foundation-sticky; +@include foundation-reveal; +@include foundation-switch; +@include foundation-table; +@include foundation-tabs; +@include foundation-thumbnail; +@include foundation-title-bar; +@include foundation-tooltip; +@include foundation-top-bar; + +// If you'd like to include motion-ui the foundation-rails gem comes prepackaged with it, uncomment the 3 @imports, if you are not using the gem you need to install the motion-ui sass package. +// +@include motion-ui-transitions; +@include motion-ui-animations; diff --git a/app/assets/stylesheets/guests.scss b/app/assets/stylesheets/guests.scss new file mode 100644 index 0000000000..646b204ef1 --- /dev/null +++ b/app/assets/stylesheets/guests.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the guests controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/landing.scss new file mode 100644 index 0000000000..d1bea31a98 --- /dev/null +++ b/app/assets/stylesheets/landing.scss @@ -0,0 +1,7 @@ +// Place all the styles related to the landing controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ + +.orbit-slide div h3 a { + font-family: 'Kaushan Script', cursive; +} diff --git a/app/assets/stylesheets/merchants.scss b/app/assets/stylesheets/merchants.scss new file mode 100644 index 0000000000..2327c00afe --- /dev/null +++ b/app/assets/stylesheets/merchants.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the merchants controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/orders.scss b/app/assets/stylesheets/orders.scss new file mode 100644 index 0000000000..3b0428a94e --- /dev/null +++ b/app/assets/stylesheets/orders.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the orders controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/products.scss b/app/assets/stylesheets/products.scss new file mode 100644 index 0000000000..20454aacf3 --- /dev/null +++ b/app/assets/stylesheets/products.scss @@ -0,0 +1,9 @@ +// Place all the styles related to the products controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ + + + +p { + text-align: center; +} diff --git a/app/assets/stylesheets/reviews.scss b/app/assets/stylesheets/reviews.scss new file mode 100644 index 0000000000..6ea2454d26 --- /dev/null +++ b/app/assets/stylesheets/reviews.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the reviews controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/sessions.scss b/app/assets/stylesheets/sessions.scss new file mode 100644 index 0000000000..7bef9cf826 --- /dev/null +++ b/app/assets/stylesheets/sessions.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the sessions controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d83690e1b9..201d31482c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,4 +2,49 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + + before_action do define_category_variables(8) end + helper_method :current_merchant, :current_guest, :current_cart + + def current_merchant + @current_merchant ||= Merchant.find_by(id: session[:merchant_id].to_i) + end + + def current_guest + return @current_guest if @current_guest.present? + @current_guest = Guest.find_or_create_by(id: session[:user_id]) + session[:user_id] = @current_guest.id + return @current_guest + end + + def define_category_variables(limit) + ordered_categories = Category.order("lower(name) ASC") + @top_catgories = ordered_categories.limit(limit) + @all_categories = Category.all + @lesser_categories = find_lesser_categories(ordered_categories, limit) + end + + def find_lesser_categories(ordered_categories, limit) + lesser_categories = ordered_categories[limit..-1] + return lesser_categories + end + + def current_cart + #if we are logged in as merchant + if current_merchant.present? + #get cart from current merchant + return current_merchant.cart + end + #if we are not a merchant + if current_guest.present? + #get cart from current guest cart + return current_guest.cart + + end + end + + + # @current_guest ||= Guest.find_by(id: session[:user_id].to_i) + + end diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb new file mode 100644 index 0000000000..bd6d133460 --- /dev/null +++ b/app/controllers/categories_controller.rb @@ -0,0 +1,49 @@ +class CategoriesController < ApplicationController + def index + # @category = Category.all + @category = Category.order("lower(name) ASC").all + @new_category = Category.new + + + end + + def show + @category = Category.find(params[:id].to_i) + @products_in_category = @category.products + end + + def new + @category = Category.new + end + + def create + @category = Category.new(category_params) + if @category.save + redirect_to categories_path + else + flash[:notice] = "Did not save successfully. Please check that this category does not already exist and try again." + redirect_to categories_path + end + end + + + + def edit + end + + def update + end + + def destroy + @category = Category.find(params[:id].to_i) + @category.destroy + + redirect_to categories_path + end + + private + def category_params + params.require(:category).permit(:name) + end + +end diff --git a/app/controllers/guests_controller.rb b/app/controllers/guests_controller.rb new file mode 100644 index 0000000000..6d4f734a17 --- /dev/null +++ b/app/controllers/guests_controller.rb @@ -0,0 +1,32 @@ +class GuestsController < ApplicationController + + before_action :find_guest, only: [:show] + def index + @guests = Guest.all + end + + def show; end + + def new + @guest = Guest.new + end + + def create + end + + def edit + end + + def update + end + + def destroy + end + + private + + def find_guest + @guest = Guest.find(params[:id]) + end + +end diff --git a/app/controllers/landing_controller.rb b/app/controllers/landing_controller.rb new file mode 100644 index 0000000000..9a76682a2f --- /dev/null +++ b/app/controllers/landing_controller.rb @@ -0,0 +1,5 @@ +class LandingController < ApplicationController + def index + @featured_products = Product.order('id ASC').limit(5) + end +end diff --git a/app/controllers/merchants_controller.rb b/app/controllers/merchants_controller.rb new file mode 100644 index 0000000000..650ec3bb83 --- /dev/null +++ b/app/controllers/merchants_controller.rb @@ -0,0 +1,43 @@ +class MerchantsController < ApplicationController + #before_action :find_merchant only: [:show, :edit, :update] + + def index + find_merchant + end + + def show + find_merchant + end + + def new + @merchant = Merchant.new + @path = merchants_path + end + + def create + end + + def edit + end + + def update + end + + def destroy + end + + def show_merchant_products + find_merchant + @products = Product.find_by(merchant_id: @merchant.id) + end + + private + + def merchant_params + params.require(:merchant).permit(:name, :email, :password) + end + + def find_merchant + @merchant = Merchant.find_by(id: session[:merchant_id].to_i) + end +end diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb new file mode 100644 index 0000000000..7d2960cd73 --- /dev/null +++ b/app/controllers/orders_controller.rb @@ -0,0 +1,81 @@ +class OrdersController < ApplicationController + def index + @orders = Order.all + end + + def show + + #get list of items for this guest or merchant_id + @order_items = LineItem.where(order_id: current_cart.id) + + end + + def new + end + + def create + end + + + + + + + def edit + end + + def update + cart = current_cart + cart.card_name = params[:card_name] + cart.card_exp = params[:card_exp] + cart.shipping_street = params[:shipping_street] + cart.shipping_city = params[:shipping_city] + cart.shipping_state = params[:shipping_state] + cart.card_number = params[:card_number].chars.last(4).join + cart.card_cvv = params[:card_cvv] + cart.billing_zip = params[:billing_zip] + cart.shipping_zip = params[:shipping_zip] + cart.order_status = "Paid" + cart.total_amount = current_cart.total_amount + cart.save + end + + def destroy + @order_items = LineItem.destroy(params[:id]) + redirect_to action:"show" + end + + def find_product + #cusomer product page and clicks add product_id + Product.find_by(id: params[:product_id] || params[:id]) + #need to take the id use it to find product + end + + def add_to_cart + product = find_product + cart = current_cart + cart.add_product(product, params[:qty]) + # current_cart.add_product(find_product) + redirect_to root_path + end + + + + # def remove_from_cart + # @line = @order.line_items.find(params[:id]) + # @line.id.destroy(params[:id].to_i) + # end + + def update_qty + line_item = LineItem.find(params[:line_item_id]) + line_item.update(qty: params[:qty]) + redirect_to order_path(current_cart.id) + end + + + def checkout + end + + + +end#end of class diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb new file mode 100644 index 0000000000..b2af5b9b7a --- /dev/null +++ b/app/controllers/products_controller.rb @@ -0,0 +1,90 @@ +class ProductsController < ApplicationController + before_action :find_product, only: [:show, :edit, :update] + before_action :find_merchant, except: [:all_products] + + def all_products + @products = Product.all + end + + def index + @products = Product.where(merchant_id: @merchant.id) + end + + def show + puts "Products is NIL" if @product == nil + @reviews = @product.reviews.order('stars desc, id').limit(3) + @line_item = LineItem.new ### OR Line.new + end + + def new + @product = Product.new + @post_path = merchant_products_path(@merchant.id) + @post_method = :post + @category = Category.order("lower(name) ASC").all + end + + def create + @product = Product.new(product_params) + @product.price = (product_params[:price].to_f * 100).to_i + # @product.merchant_id = @merchant.id + @product.rating = nil + @product.merchant_id = @merchant.id + if @product.save + redirect_to merchant_product_path(@merchant.id, @product.id) + else + @error = "Did not save successfully. Please try again." + @post_path = merchant_products_path + @post_method = :post + render :new + end + end + + def edit + @post_path = merchant_product_path(@merchant.id, @product.id) + @post_method = :put + end + + def update + if @product.update(product_params) + @product.price = (product_params[:price].to_f * 100).to_i + @product.rating + redirect_to merchant_product_path(@merchant.id, @product.id) + else + @error = "Did not save successfully. Please try again." + @post_path = merchant_product_path(@merchant.id, @product.id) + @post_method = :put + render :edit + end + end + + def destroy + @product = find_product + if @product.class == Product + @product.destroy + redirect_to merchant_products_path(@merchant.id) + end + end + + private + + def find_product + if Product.exists?(params[:id].to_i) == true + return @product = Product.find_by(id: params[:id].to_i) + else + render :status => 404 + end + end + + def find_merchant + if Merchant.exists?(params[:merchant_id].to_i) == true + return @merchant = Merchant.find(params[:merchant_id].to_i) + else + render :status => 404 + end + end + + def product_params + params.require(:product).permit(:name, :description, :price, :image, :inventory, :rating, category_ids: []) + end + +end diff --git a/app/controllers/reviews_controller.rb b/app/controllers/reviews_controller.rb new file mode 100644 index 0000000000..c9525c0d53 --- /dev/null +++ b/app/controllers/reviews_controller.rb @@ -0,0 +1,101 @@ +class ReviewsController < ApplicationController + before_action :find_merchant + before_action :find_product + before_action :find_review, only: [:show, :edit, :update, :destroy] + + + def index + @reviews = Review.where(product_id: @product.id) + end + # + # def show + # end + + def new + if current_merchant != nil && @merchant.name == current_merchant.name + flash[:notice] = "Cannot Review Your Own Product" + redirect_to merchant_product_path(@merchant.id, @product.id) + return + else + @review = Review.new + @post_path = merchant_product_reviews_path + @post_method = :post + end + end + + def create + @review = Review.new(review_params) + @review.product_id = @product.id + + if @review.save + redirect_to merchant_product_path(@merchant.id, @product.id) + else + @error = "Did not save successfully. Please try again." + @post_path = merchant_product_reviews_path + @post_method = :post + render :new + end + end + + def edit + if @merchant.id = @product.merchant_id + flash[:notice] = "Cannot Review Your Own Product" + redirect_to merchant_product_path(@merchant.id, @product.id) + end + end + + def update + end + + def destroy + @review = find_review + if current_merchant != nil && current_merchant.id == @product.merchant_id + flash[:notice] = "Cannot Delete Your Own Product's Reviews" + redirect_to merchant_product_path(@merchant.id, @product.id) + return + else + if @review.class == Review + @review.destroy + redirect_to merchant_product_path(@merchant.id, @product.id) + return + end + end + end + + private + + def find_product + if Product.exists?(params[:product_id].to_i) == true + return @product = Product.find(params[:product_id].to_i) + else + redirect_to merchant_path(@merchant.id) + flash[:notice] = "Product Not Found" + return + end + end + + def find_merchant + find_product + if Merchant.exists?(@product.merchant_id) == true + return @merchant = Merchant.find(@product.merchant_id) + else + redirect_to categories_path + flash[:notice] = "Merchant Not Found" + return + end + end + + def find_review + if Review.exists?(params[:id].to_i) == true + return @review = Review.find(params[:id].to_i) + else + redirect_to merchant_product_path(@merchant.id, @product.id) + flash[:notice] = "Review Not Found" + return + end + end + + def review_params + params.require(:review).permit(:stars, :description, :author) + end +end diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb new file mode 100644 index 0000000000..f0ef17a7a2 --- /dev/null +++ b/app/controllers/sessions_controller.rb @@ -0,0 +1,38 @@ +class SessionsController < ApplicationController + def create + auth_hash = request.env['omniauth.auth'] + + return redirect to root_path unless auth_hash['uid'] + + @merchant = Merchant.find_by(uid: auth_hash[:uid]) + if @merchant.nil? + @merchant = Merchant.build_from_github(auth_hash) + flash[:notice] = "Unable to save the Merchant" + return redirect_to root_path unless @merchant.save + end + + #Save the merchant ID in the session + session[:merchant_id] = @merchant.id.to_i + # binding.pry + redirect_to merchant_path(@merchant.id) + end + + def create_merchant + end + + # def login + # session[:merchant_id] = 1 + # redirect_to '/products/index' + # end + # + # def logout + # session[:merchant_id] = nil + # redirect_to root_path + # end + + + def destroy + session[:merchant_id] = nil + redirect_to root_path + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be7945c..03d98f1404 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,22 @@ module ApplicationHelper + + + def star_string(rating) + printed_stars = "" + if rating == nil + printed_stars = "Not Yet Reviewed" + else + rating.times {|x| printed_stars << "★"} + (5-rating).times {|x| printed_stars << "☆"} + end + printed_stars.html_safe + end + + def greeting + if current_merchant.nil? + "Welcome, Guest" + else + "Welcome, #{current_merchant.name}" + end + end end diff --git a/app/helpers/categories_helper.rb b/app/helpers/categories_helper.rb new file mode 100644 index 0000000000..e06f31554c --- /dev/null +++ b/app/helpers/categories_helper.rb @@ -0,0 +1,2 @@ +module CategoriesHelper +end diff --git a/app/helpers/guests_helper.rb b/app/helpers/guests_helper.rb new file mode 100644 index 0000000000..00317bf2cf --- /dev/null +++ b/app/helpers/guests_helper.rb @@ -0,0 +1,2 @@ +module GuestsHelper +end diff --git a/app/helpers/landing_helper.rb b/app/helpers/landing_helper.rb new file mode 100644 index 0000000000..6aa3ee9247 --- /dev/null +++ b/app/helpers/landing_helper.rb @@ -0,0 +1,2 @@ +module LandingHelper +end diff --git a/app/helpers/merchants_helper.rb b/app/helpers/merchants_helper.rb new file mode 100644 index 0000000000..5337747b0f --- /dev/null +++ b/app/helpers/merchants_helper.rb @@ -0,0 +1,2 @@ +module MerchantsHelper +end diff --git a/app/helpers/orders_helper.rb b/app/helpers/orders_helper.rb new file mode 100644 index 0000000000..a957dd7ca8 --- /dev/null +++ b/app/helpers/orders_helper.rb @@ -0,0 +1,59 @@ +module OrdersHelper + +def us_states + [ + ['Alabama', 'AL'], + ['Alaska', 'AK'], + ['Arizona', 'AZ'], + ['Arkansas', 'AR'], + ['California', 'CA'], + ['Colorado', 'CO'], + ['Connecticut', 'CT'], + ['Delaware', 'DE'], + ['District of Columbia', 'DC'], + ['Florida', 'FL'], + ['Georgia', 'GA'], + ['Hawaii', 'HI'], + ['Idaho', 'ID'], + ['Illinois', 'IL'], + ['Indiana', 'IN'], + ['Iowa', 'IA'], + ['Kansas', 'KS'], + ['Kentucky', 'KY'], + ['Louisiana', 'LA'], + ['Maine', 'ME'], + ['Maryland', 'MD'], + ['Massachusetts', 'MA'], + ['Michigan', 'MI'], + ['Minnesota', 'MN'], + ['Mississippi', 'MS'], + ['Missouri', 'MO'], + ['Montana', 'MT'], + ['Nebraska', 'NE'], + ['Nevada', 'NV'], + ['New Hampshire', 'NH'], + ['New Jersey', 'NJ'], + ['New Mexico', 'NM'], + ['New York', 'NY'], + ['North Carolina', 'NC'], + ['North Dakota', 'ND'], + ['Ohio', 'OH'], + ['Oklahoma', 'OK'], + ['Oregon', 'OR'], + ['Pennsylvania', 'PA'], + ['Puerto Rico', 'PR'], + ['Rhode Island', 'RI'], + ['South Carolina', 'SC'], + ['South Dakota', 'SD'], + ['Tennessee', 'TN'], + ['Texas', 'TX'], + ['Utah', 'UT'], + ['Vermont', 'VT'], + ['Virginia', 'VA'], + ['Washington', 'WA'], + ['West Virginia', 'WV'], + ['Wisconsin', 'WI'], + ['Wyoming', 'WY'] + ] +end +end diff --git a/app/helpers/products_helper.rb b/app/helpers/products_helper.rb new file mode 100644 index 0000000000..ab5c42b325 --- /dev/null +++ b/app/helpers/products_helper.rb @@ -0,0 +1,2 @@ +module ProductsHelper +end diff --git a/app/helpers/reviews_helper.rb b/app/helpers/reviews_helper.rb new file mode 100644 index 0000000000..682b7b1abc --- /dev/null +++ b/app/helpers/reviews_helper.rb @@ -0,0 +1,2 @@ +module ReviewsHelper +end diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb new file mode 100644 index 0000000000..309f8b2eb3 --- /dev/null +++ b/app/helpers/sessions_helper.rb @@ -0,0 +1,2 @@ +module SessionsHelper +end diff --git a/app/models/category.rb b/app/models/category.rb new file mode 100644 index 0000000000..2e6709a98d --- /dev/null +++ b/app/models/category.rb @@ -0,0 +1,5 @@ +class Category < ActiveRecord::Base + has_many :product_categories + has_many :products, :through => :product_categories + validates :name, presence: true, uniqueness: true +end diff --git a/app/models/guest.rb b/app/models/guest.rb new file mode 100644 index 0000000000..d381f50820 --- /dev/null +++ b/app/models/guest.rb @@ -0,0 +1,18 @@ +class Guest < ActiveRecord::Base + has_many :orders + has_many :line_items + + def cart + #find cart from guest orders + self.orders.find_or_create_by(:order_status => "pending") + #if not found we create it + #guest has one cart + #the cart is an orders + #the guest has_many orders + #has to be pending orders + #return the cart + end + + + +end diff --git a/app/models/line_item.rb b/app/models/line_item.rb new file mode 100644 index 0000000000..557be70214 --- /dev/null +++ b/app/models/line_item.rb @@ -0,0 +1,10 @@ +class LineItem < ActiveRecord::Base + belongs_to :product + belongs_to :order + + def subtotal + self.product.price * self.qty + end + + +end diff --git a/app/models/merchant.rb b/app/models/merchant.rb new file mode 100644 index 0000000000..bc181dd368 --- /dev/null +++ b/app/models/merchant.rb @@ -0,0 +1,134 @@ +# Merchant Model +class Merchant < ActiveRecord::Base + has_many :products + has_many :placed_orders, :class_name => "Order" + has_many :orders, :through => :products + alias_attribute(:customer_orders, :orders) + + validates :name, :email, presence: true + validates :email, uniqueness: true + + def self.build_from_github(auth_hash) + merchant = Merchant.new + merchant.uid = auth_hash[:uid] + merchant.provider = 'github' + merchant.name = auth_hash['info']['name'] + merchant.email = auth_hash['info']['email'] + # user.avatar = auth_hash['extra']['raw_info']['avatar_url'] + # user.followercount = auth_hash['extra']['raw_info']['followers'].to_i + + return merchant + end + + def revenue_paid_orders + revenue_total = 0.0 + placed_orders.each do |order| + if order.order_status == "Paid" + revenue_total += order.total_amount + end + end + return revenue_total + end + + def revenue_pending_orders + revenue_total = 0.0 + placed_orders.each do |order| + if order.order_status == "Pending" + revenue_total += order.total_amount + end + end + return revenue_total + end + + def revenue_cancelled_orders + revenue_total = 0.0 + placed_orders.each do |order| + if order.order_status == "Cancelled" + revenue_total += order.total_amount + end + end + return revenue_total + end + + def revenue_completed_orders + revenue_total = 0.0 + placed_orders.each do |order| + if order.order_status == "Complete" + revenue_total += order.total_amount + end + end + return revenue_total + end + + def total_revenue + revenue_total = 0.0 + placed_orders.each do |order| + if order.order_status == "Cancelled" + else + revenue_total += order.total_amount + end + end + return revenue_total + end + + def pending_orders + pending = 0 + placed_orders.each do |order| + if order.order_status == "Pending" + pending += 1 + end + end + return pending + end + + def cancelled_orders + cancelled = 0 + placed_orders.each do |order| + if order.order_status == "Cancelled" + cancelled += 1 + end + end + return cancelled + end + + def paid_orders + paid = 0 + placed_orders.each do |order| + if order.order_status == "Paid" + paid += 1 + end + end + return paid + end + + def completed_orders + completed = 0 + placed_orders.each do |order| + if order.order_status == "Complete" + completed += 1 + end + end + return completed + end + + def total_orders + total = 0 + placed_orders.each do |order| + if order.order_status == "Cancelled" + else + total += 1 + end + end + return total + end + + def cart + #find cart from merchant orders + self.placed_orders.find_or_create_by(:order_status => "Pending") + end + + # def orders_count + # total_orders = 0 + # orders. + # end +end diff --git a/app/models/order.rb b/app/models/order.rb new file mode 100644 index 0000000000..e0bf221995 --- /dev/null +++ b/app/models/order.rb @@ -0,0 +1,29 @@ +class Order < ActiveRecord::Base + has_many :line_items + # has_many :product_orders + has_many :products, :through => :line_items + belongs_to :merchant + belongs_to :guest + + def add_product(product, qty) +#if there is a guest and a cart + #add a row to the LineItem table + #once the line is added return the user back to the product page + line = LineItem.new + line.product = product + line.merchant_id = product.merchant_id + line.qty = qty + line.price = product.price + line_items << line + end + + def total_amount + total = 0 + self.line_items.each do |line| + line.subtotal + total += line.subtotal + end + return total + end + +end diff --git a/app/models/product.rb b/app/models/product.rb new file mode 100644 index 0000000000..3aef55144f --- /dev/null +++ b/app/models/product.rb @@ -0,0 +1,48 @@ +class Product < ActiveRecord::Base + has_many :line_items + has_many :orders, :through => :line_items + + has_many :product_categories + has_many :categories, :through => :product_categories + + belongs_to :merchant + has_many :reviews + + ############### + ### Methods ### + ############### + + def rating + total_rating = 0 + if reviews.length != 0 + reviews.each do |review| + total_rating += review.stars + end + return total_rating/reviews.length + # Do we want the average to round up or down? Should I add one?? + else + total_rating = nil + end + end + + + ################### + ### Validations ### + ################### + + validates :name, presence: true + validates :description, presence: true + validates :price, presence: true + validates :inventory, presence: true + validates :image, presence: true + validates :rating, numericality: {greater_than_or_equal_to: 0, less_than_or_equal_to: 5, allow_nil: true } + + # validate :limits_on_stars + # + # # A rating must be between 0 and 5 + # def limits_on_stars + # unless (rating <= 5) && (rating >= 0) + # errors.add(:rating, "A rating must be between 0 and 5") + # end + # end +end diff --git a/app/models/product_category.rb b/app/models/product_category.rb new file mode 100644 index 0000000000..9f66674499 --- /dev/null +++ b/app/models/product_category.rb @@ -0,0 +1,4 @@ +class ProductCategory < ActiveRecord::Base + belongs_to :product + belongs_to :category +end diff --git a/app/models/product_order.rb b/app/models/product_order.rb new file mode 100644 index 0000000000..c740857e2c --- /dev/null +++ b/app/models/product_order.rb @@ -0,0 +1,4 @@ +class ProductOrder < ActiveRecord::Base + belongs_to :product + belongs_to :order +end diff --git a/app/models/review.rb b/app/models/review.rb new file mode 100644 index 0000000000..4500f1b6e3 --- /dev/null +++ b/app/models/review.rb @@ -0,0 +1,14 @@ +class Review < ActiveRecord::Base + belongs_to :product + + + + + ################### + ### Validations ### + ################### + + validates :stars, presence: true, numericality: {greater_than_or_equal_to: 0, less_than_or_equal_to: 5, allow_nil: true } + validates :description, presence: true + +end diff --git a/app/views/categories/create.html.erb b/app/views/categories/create.html.erb new file mode 100644 index 0000000000..63069b0005 --- /dev/null +++ b/app/views/categories/create.html.erb @@ -0,0 +1,2 @@ +

Categories#create

+

Find me in app/views/categories/create.html.erb

diff --git a/app/views/categories/destroy.html.erb b/app/views/categories/destroy.html.erb new file mode 100644 index 0000000000..a6ac971f4c --- /dev/null +++ b/app/views/categories/destroy.html.erb @@ -0,0 +1,2 @@ +

Categories#destroy

+

Find me in app/views/categories/destroy.html.erb

diff --git a/app/views/categories/edit.html.erb b/app/views/categories/edit.html.erb new file mode 100644 index 0000000000..3b8dca3af4 --- /dev/null +++ b/app/views/categories/edit.html.erb @@ -0,0 +1,2 @@ +

Categories#edit

+

Find me in app/views/categories/edit.html.erb

diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb new file mode 100644 index 0000000000..80718da017 --- /dev/null +++ b/app/views/categories/index.html.erb @@ -0,0 +1,32 @@ +
<%= @error if @error %>
+ +

Not Yesty Categories

+ +
+ <% @category.each do |category| %> +
"> +
+
+

<%= link_to(category.name, category_path(category.id)) %>

+
+ <%= image_tag((category.products.first == nil ? "NoProductImage.png" : "#{category.products.first.image}"), size: "200x300", alt: "Link of #{category.name}.", class: "product-photo") %> +
+
+ <% end %> +
+ + + + +<% if current_merchant != nil %> + +

<%= 'Add a New Category' %>

+ <%= form_for @new_category, url: categories_path do |f| %> + + <%= f.label :name %> + <%= f.text_field :name %> + +

<%= f.submit class:"button" %>

+ + <% end %> +<% end %> diff --git a/app/views/categories/new.html.erb b/app/views/categories/new.html.erb new file mode 100644 index 0000000000..fd0bfedc6e --- /dev/null +++ b/app/views/categories/new.html.erb @@ -0,0 +1,9 @@ + +<%= form_for @category, url: categories_path do |f| %> + + <%= f.label :name %> + <%= f.text_field :name %> + + <%= f.submit class:"button" %> + +<% end %> diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb new file mode 100644 index 0000000000..dc88e5c58b --- /dev/null +++ b/app/views/categories/show.html.erb @@ -0,0 +1,15 @@ +

Products For <%= @category.name %>

+ +
+<% @products_in_category.each do |p| %> +
+
+
+

<%= link_to(p.name, merchant_product_path(p.merchant_id,p.id)) %>

+
+ <%= link_to image_tag(p.image, alt: 'product photo', size: '200x200', class: "product-photo"), merchant_product_path(p.merchant_id,p.id) %> +
+
+<% end %> + +<%= link_to("View all Categories", categories_path) %> diff --git a/app/views/categories/update.html.erb b/app/views/categories/update.html.erb new file mode 100644 index 0000000000..13b85657ff --- /dev/null +++ b/app/views/categories/update.html.erb @@ -0,0 +1,2 @@ +

Categories#update

+

Find me in app/views/categories/update.html.erb

diff --git a/app/views/guests/create.html.erb b/app/views/guests/create.html.erb new file mode 100644 index 0000000000..a9738a6655 --- /dev/null +++ b/app/views/guests/create.html.erb @@ -0,0 +1,2 @@ +

Guests#create

+

Find me in app/views/guests/create.html.erb

diff --git a/app/views/guests/destroy.html.erb b/app/views/guests/destroy.html.erb new file mode 100644 index 0000000000..7da417e5ba --- /dev/null +++ b/app/views/guests/destroy.html.erb @@ -0,0 +1,2 @@ +

Guests#destroy

+

Find me in app/views/guests/destroy.html.erb

diff --git a/app/views/guests/edit.html.erb b/app/views/guests/edit.html.erb new file mode 100644 index 0000000000..1e16d53b01 --- /dev/null +++ b/app/views/guests/edit.html.erb @@ -0,0 +1,2 @@ +

Guests#edit

+

Find me in app/views/guests/edit.html.erb

diff --git a/app/views/guests/index.html.erb b/app/views/guests/index.html.erb new file mode 100644 index 0000000000..e54983b4ca --- /dev/null +++ b/app/views/guests/index.html.erb @@ -0,0 +1,2 @@ +

Guests#index

+

Find me in app/views/guests/index.html.erb

diff --git a/app/views/guests/new.html.erb b/app/views/guests/new.html.erb new file mode 100644 index 0000000000..ebe92378c8 --- /dev/null +++ b/app/views/guests/new.html.erb @@ -0,0 +1,2 @@ +

Guests#new

+

Find me in app/views/guests/new.html.erb

diff --git a/app/views/guests/show.html.erb b/app/views/guests/show.html.erb new file mode 100644 index 0000000000..a01c0fb8c7 --- /dev/null +++ b/app/views/guests/show.html.erb @@ -0,0 +1,2 @@ +

Guests#show

+

Find me in app/views/guests/show.html.erb

diff --git a/app/views/guests/update.html.erb b/app/views/guests/update.html.erb new file mode 100644 index 0000000000..c95ad0ad75 --- /dev/null +++ b/app/views/guests/update.html.erb @@ -0,0 +1,2 @@ +

Guests#update

+

Find me in app/views/guests/update.html.erb

diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb new file mode 100644 index 0000000000..4c99c30af0 --- /dev/null +++ b/app/views/landing/index.html.erb @@ -0,0 +1,27 @@ +

Featured Products

+ +
+
    + + + <% @featured_products.each do |product| %> +
  • +
    +

    <%= link_to(product.name, merchant_product_path(product.merchant.id, product.id)) %>

    +
    <%= link_to(image_tag(product.image, size: "200x275", alt: "Photo of #{product.name}"), merchant_product_path(product.merchant.id, product.id)) %>
    +

    Price: $<%= '%.2f' % (product.price/100.00) %>

    +

    Inventory: <%= product.inventory %>

    +

    <%= product.rating == nil ? "Not Yet Rated!" : star_string(product.rating) %>

    +
    +
  • + <% end %> +
+ +
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9b70e01c2e..c46ae6aae5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,14 +1,95 @@ - - - Betsy - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - + + + + + + <%= content_for?(:title) ? yield(:title) : "Not Yetsy" %> + + <%= stylesheet_link_tag "application" %> + <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> + <%= csrf_meta_tags %> + + + +
+ +
+

Not Yetsy The Procrastinators Paradise

+ <%= link_to(image_tag("NotYetsyLogo.png", alt: "Not Yetsy Logo", class: "not-yetsy-main-logo columns small-12 medium-4 large-3"), index_path, method: :get) %> + + +
+ + + + + + <% if flash[:notice] %> +

<%= flash[:notice] %>

+ <% end %> +
+
+

<%= greeting %>

+ + <%= yield %> +
+
+

+ © - Olivia Legge, Miriam Cortes, Nina Mutty, and Sabrina Wilbert - 2016 +

+
+ + diff --git a/app/views/merchants/_merchant_partial.html.erb b/app/views/merchants/_merchant_partial.html.erb new file mode 100644 index 0000000000..f197f74226 --- /dev/null +++ b/app/views/merchants/_merchant_partial.html.erb @@ -0,0 +1,14 @@ +<%= form_for @merchant, url: @path do |f| %> + + <%= f.label :name %> + <%= f.text_field :name %> + + <%= f.label :email %> + <%= f.text_field :email %> + + <%= f.label :password %> + <%= f.text_field :password %> + + <%= f.submit %> + +<% end %> diff --git a/app/views/merchants/create.html.erb b/app/views/merchants/create.html.erb new file mode 100644 index 0000000000..1762feece0 --- /dev/null +++ b/app/views/merchants/create.html.erb @@ -0,0 +1,2 @@ +

Merchants#create

+

Find me in app/views/merchants/create.html.erb

diff --git a/app/views/merchants/destroy.html.erb b/app/views/merchants/destroy.html.erb new file mode 100644 index 0000000000..7378a23230 --- /dev/null +++ b/app/views/merchants/destroy.html.erb @@ -0,0 +1,2 @@ +

Merchants#destroy

+

Find me in app/views/merchants/destroy.html.erb

diff --git a/app/views/merchants/edit.html.erb b/app/views/merchants/edit.html.erb new file mode 100644 index 0000000000..48d1fbdd45 --- /dev/null +++ b/app/views/merchants/edit.html.erb @@ -0,0 +1,2 @@ +

Edit your info

+<%= render partial: "merchant_partial", locals: {action_name: "update", params: { id: @merchant.id }} %> diff --git a/app/views/merchants/index.html.erb b/app/views/merchants/index.html.erb new file mode 100644 index 0000000000..0ad7977813 --- /dev/null +++ b/app/views/merchants/index.html.erb @@ -0,0 +1,2 @@ +

Merchants#index

+

Find me in app/views/merchants/index.html.erb

diff --git a/app/views/merchants/new.html.erb b/app/views/merchants/new.html.erb new file mode 100644 index 0000000000..06a42ad5fa --- /dev/null +++ b/app/views/merchants/new.html.erb @@ -0,0 +1,3 @@ +

Become a merchant.

+ +<%= render partial: "merchant_partial", locals: {action_name: "create"} %> diff --git a/app/views/merchants/show.html.erb b/app/views/merchants/show.html.erb new file mode 100644 index 0000000000..060aca364a --- /dev/null +++ b/app/views/merchants/show.html.erb @@ -0,0 +1,61 @@ +
+
    +
  • <%= button_to 'Add a Product', new_merchant_product_path(@merchant.id, params[:product_id]), class: "button", method: :get %>
  • +
  • <%= button_to 'View Products', merchant_products_path(@merchant.id), class: "button", method: :get %>
  • +
  • <%= button_to 'Add a Category', new_category_path(params[:id]), class: "button", method: :get %>
  • +
  • +
+
+ +
+ + + + + + + + + <% @merchant.customer_orders.each do |order| %> + <% order.products.each do |product| %> + + + + + + <% end %> + <% end %> + +
Order NumberItemsOrder Status
<%= order.id %><%= link_to(product.name, merchant_product_path(@merchant.id, product.id)) %><%= order.order_status %>
+
+ + +

Summary

+
+

Revenue

+

Total Revenue for Pending Orders:

+

<%= number_to_currency(@merchant.revenue_pending_orders/100.0) %>

+

Total Revenue for Paid Orders:

+

<%= number_to_currency(@merchant.revenue_paid_orders/100.0) %>

+

Total Revenue for Cancelled Orders:

+

<%= number_to_currency(@merchant.revenue_cancelled_orders/100.0) %>

+

Total Revenue for Completed Orders:

+

<%= number_to_currency(@merchant.revenue_completed_orders/100.0) %>

+

Total Net Revenue:

+

<%= number_to_currency(@merchant.total_revenue/100.0) %>

+
+ +
+

Orders

+

Total Pending Orders:

+

<%= @merchant.pending_orders %>

+

Total Cancelled Orders:

+

<%= @merchant.cancelled_orders %>

+

Total Paid Orders:

+

<%= @merchant.paid_orders %>

+

Total Completed Orders:

+

<%= @merchant.completed_orders %>

+

Total Orders:

+

<%= @merchant.total_orders %>

+
+
diff --git a/app/views/merchants/show_merchant_products.html.erb b/app/views/merchants/show_merchant_products.html.erb new file mode 100644 index 0000000000..503d9c07bd --- /dev/null +++ b/app/views/merchants/show_merchant_products.html.erb @@ -0,0 +1,2 @@ +

<%= @merchant[:name] %>

+

diff --git a/app/views/merchants/update.html.erb b/app/views/merchants/update.html.erb new file mode 100644 index 0000000000..48e3f8aed5 --- /dev/null +++ b/app/views/merchants/update.html.erb @@ -0,0 +1,2 @@ +

Merchants#update

+

Find me in app/views/merchants/update.html.erb

diff --git a/app/views/orders/cart.html.erb b/app/views/orders/cart.html.erb new file mode 100644 index 0000000000..c295e57feb --- /dev/null +++ b/app/views/orders/cart.html.erb @@ -0,0 +1,20 @@ + +
+
+
+<%= form_for @line_items do |f| %> +

<%= f.label :product.name %>

+ <%= f.text_field :product_id %> +
+ <%= f.number_field :quantity, order_item.quantity.to_i, class: "form-control", min: 1 %> + <%= f.hidden_field :product_id, product.id %> +
+ + <%= f.label :description %> + <%= f.text_field :description %> + + <%= f.submit %> + <% end %> +
+
+
diff --git a/app/views/orders/checkout.html.erb b/app/views/orders/checkout.html.erb new file mode 100644 index 0000000000..b970868285 --- /dev/null +++ b/app/views/orders/checkout.html.erb @@ -0,0 +1,40 @@ +
+
+ +
+
+

Total: <%= number_to_currency(current_cart.total_amount/100.0) %>

+

Shipping Information

+<%= form_tag order_path(current_cart.id), method: :patch do %> +

Name

+<%= text_field_tag :card_name %> +

Street Address

+<%= text_field_tag :shipping_street %> +

City

+<%= text_field_tag :shipping_city %> +

State

+<%= select_tag :state, options_for_select(us_states) %> +

Zip Code

+<%= text_field_tag :shipping_zip, nil, maxlength: 5 %> + +

Billing Information

+

Card Number

+<%= text_field_tag :card_number, nil, maxlength: 16 %> +

Card Expiration Date

+<%= text_field_tag :card_exp, nil, maxlength: 5 %> +

Card CVV

+<%= text_field_tag :card_cvv, nil, maxlength: 4%> +

Zip Code

+ +<%= text_field_tag :billing_zip, nil, maxlength: 5 %> +<%= submit_tag "Submit Order", class: "btn btn-default button" %> + +<%end%> +
+
+
+
diff --git a/app/views/orders/create.html.erb b/app/views/orders/create.html.erb new file mode 100644 index 0000000000..295bd84094 --- /dev/null +++ b/app/views/orders/create.html.erb @@ -0,0 +1,2 @@ +

Orders#create

+

Find me in app/views/orders/create.html.erb

diff --git a/app/views/orders/destroy.html.erb b/app/views/orders/destroy.html.erb new file mode 100644 index 0000000000..d14d0a3508 --- /dev/null +++ b/app/views/orders/destroy.html.erb @@ -0,0 +1,2 @@ +

Orders#destroy

+

Find me in app/views/orders/destroy.html.erb

diff --git a/app/views/orders/edit.html.erb b/app/views/orders/edit.html.erb new file mode 100644 index 0000000000..7de9049bee --- /dev/null +++ b/app/views/orders/edit.html.erb @@ -0,0 +1,2 @@ +

Orders#edit

+

Find me in app/views/orders/edit.html.erb

diff --git a/app/views/orders/index.html.erb b/app/views/orders/index.html.erb new file mode 100644 index 0000000000..d63a69fb54 --- /dev/null +++ b/app/views/orders/index.html.erb @@ -0,0 +1,2 @@ +

Orders#index

+

Find me in app/views/orders/index.html.erb

diff --git a/app/views/orders/new.html.erb b/app/views/orders/new.html.erb new file mode 100644 index 0000000000..1bc27609ce --- /dev/null +++ b/app/views/orders/new.html.erb @@ -0,0 +1,2 @@ +

Orders#new

+

Find me in app/views/orders/new.html.erb

diff --git a/app/views/orders/show.html.erb b/app/views/orders/show.html.erb new file mode 100644 index 0000000000..a5fdbc0201 --- /dev/null +++ b/app/views/orders/show.html.erb @@ -0,0 +1,44 @@ +

<%= @order_items.count %> <%= @order_items.count == 1 ? "Item" : "Items" %> in Your Cart

+ +<% if @order_items.count == 0 %> +

+ There are no items in your shopping cart. Please <%= link_to "go back", root_path %> and add some items to your cart. +

+<% else %> + + + + + + + + + + + + <% @order_items.each do |item| %> + + + + + + <%= form_tag order_update_qty_path(current_cart.id), method: :post do %> + + <%= hidden_field_tag :line_item_id, item.id %> + + + + + <% end %> + + + + + + + + + +<% end %> diff --git a/app/views/orders/update.html.erb b/app/views/orders/update.html.erb new file mode 100644 index 0000000000..248f5bf339 --- /dev/null +++ b/app/views/orders/update.html.erb @@ -0,0 +1,2 @@ +

Thank You <%= params[:card_name]%>

+

Your Order #<%=params[:id] %> has been submitted

diff --git a/app/views/products/_productform.html.erb b/app/views/products/_productform.html.erb new file mode 100644 index 0000000000..7e81e2a91d --- /dev/null +++ b/app/views/products/_productform.html.erb @@ -0,0 +1,33 @@ +
<%= @error if @error %>
+<%= form_for @product, + method: @post_method, + url: @post_path do |f| %> +
+ <%= f.label :name %> + <%= f.text_field :name %> +
+
+ <%= f.label :description %> + <%= f.text_area :description %> +
+
+ <%= f.label :price %> + <%= f.text_field :price %> +
+
+ <%= f.label :inventory %> + <%= f.number_field :inventory %> +
+
+ <%= f.label :image %> + <%= f.text_field :image %> +
+
+ <%= f.label :categories %> + <%= f.collection_check_boxes(:category_ids, Category.all, :id, :name) %> +
+
+ <%= f.submit class:"button" %> +
+ +<% end %> diff --git a/app/views/products/all_products.html.erb b/app/views/products/all_products.html.erb new file mode 100644 index 0000000000..55568e13dd --- /dev/null +++ b/app/views/products/all_products.html.erb @@ -0,0 +1,14 @@ +

See All Not Yetsy Products

+ +
+ <% @products.each do |product| %> +
"> +
+
+

<%= link_to product.name, merchant_product_path(product.merchant_id, product.id) %>

+
+ <%= image_tag(product.image, size: "200x300", alt: "Photo of #{product.name}.", class: "product-photo") %> +
+
+ <% end %> +
diff --git a/app/views/products/create.html.erb b/app/views/products/create.html.erb new file mode 100644 index 0000000000..d546021001 --- /dev/null +++ b/app/views/products/create.html.erb @@ -0,0 +1,2 @@ +

Products#create

+

Find me in app/views/products/create.html.erb

diff --git a/app/views/products/destroy.html.erb b/app/views/products/destroy.html.erb new file mode 100644 index 0000000000..d5c678b499 --- /dev/null +++ b/app/views/products/destroy.html.erb @@ -0,0 +1,2 @@ +

Products#destroy

+

Find me in app/views/products/destroy.html.erb

diff --git a/app/views/products/edit.html.erb b/app/views/products/edit.html.erb new file mode 100644 index 0000000000..fdd768f718 --- /dev/null +++ b/app/views/products/edit.html.erb @@ -0,0 +1,2 @@ +

Edit Product: <%= @product.name %>

+<%= render partial: 'productform' %> diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb new file mode 100644 index 0000000000..ca7c199460 --- /dev/null +++ b/app/views/products/index.html.erb @@ -0,0 +1,19 @@ +

Products for <%= @merchant.name %>

+ +
+<% @products.each do |product| %> +
"> +
+
+

<%= link_to product.name, merchant_product_path(@merchant.id, product.id) %>

+
+ <%= image_tag(product.image, size: "200x300", alt: "Photo of #{product.name}.", class: "product-photo") %> +
+
+<% end %> +
+ + +<% if current_merchant != nil %> +

<%= link_to "Add New Product", new_merchant_product_path(@merchant.id) %>

+<% end %> diff --git a/app/views/products/new.html.erb b/app/views/products/new.html.erb new file mode 100644 index 0000000000..847be15e73 --- /dev/null +++ b/app/views/products/new.html.erb @@ -0,0 +1,2 @@ +

Create a New Product

+<%= render partial: 'productform' %> diff --git a/app/views/products/show.html.erb b/app/views/products/show.html.erb new file mode 100644 index 0000000000..fe90d3c32a --- /dev/null +++ b/app/views/products/show.html.erb @@ -0,0 +1,71 @@ + + +

<%= @product.name %>

+ +
+

<%= image_tag(@product.image, size: "200x275", alt: "Photo of #{@product.name}.") %>

+ +
+

Description: <%= @product.description %>

+
+

Price: $<%= '%.2f' % (@product.price/100.00) %>

+

Inventory: <%= @product.inventory %>

+
+ +

Rating: <%= @product.rating == nil ? "Not Yet Rated!" : star_string(@product.rating) %>

+ + <% if @product.merchant == current_merchant %> +
+

<%= button_to "Edit Product", {controller: 'products', action: 'edit'}, path: 'edit_merchant_product', class:"button", method: :get %>

+

<%= button_to "Delete Product", {controller: 'products', action: 'destroy'}, path: 'merchant_product', class:"button", method: :delete, data: {confirm: "Are you sure?"}%>

+
+ <% end %> + +
+ <%= form_tag(controller: "orders", action: "add_to_cart", class: "button", method: "post") do |f| %> + +
+ <%= number_field_tag :qty, 1, class: "form-control", min: 1 %> +
+
+ <%= hidden_field_tag :product_id, @product.id %> + <%= hidden_field_tag :merchant_id, @product.merchant_id %> + <%= submit_tag "Add to Cart", class: "btn btn-primary button" %> +
+ <% end %> +
+
+
+ +
+ <% if @reviews != nil %> +

Reviews:

+

<%= link_to 'See All Product Reviews', merchant_product_reviews_path(@merchant.id, @product.id) %>

+ + <% unless @product.merchant == current_merchant %> +

<%= link_to 'Add A Review', new_merchant_product_review_path(@merchant.id, @product.id) %>

+ <% end %> + <% end %> +

<%= link_to 'See All Products', all_products_path %>

+
+ + +
+ <% if @reviews != nil %> + <% @reviews.each do |review| %> +
+
+
+

<%= star_string(review.stars) %>

+

<%= "By: #{review.author}" if review.author != '' %>

+
+

<%= review.description %>

+

<%# link_to "Delete Review", merchant_product_review_path(@merchant.id, @product.id, review.id), class: "button", method: :delete, data: {confirm: "Are you sure?"}%>

+
+
+ <% end %> + <% end %> +
+ + +<%# Add editing stuff buttons if the merchant is logged in %> diff --git a/app/views/products/update.html.erb b/app/views/products/update.html.erb new file mode 100644 index 0000000000..039889ac02 --- /dev/null +++ b/app/views/products/update.html.erb @@ -0,0 +1,2 @@ +

Products#update

+

Find me in app/views/products/update.html.erb

diff --git a/app/views/reviews/_reviewform.html.erb b/app/views/reviews/_reviewform.html.erb new file mode 100644 index 0000000000..e4765bc12c --- /dev/null +++ b/app/views/reviews/_reviewform.html.erb @@ -0,0 +1,20 @@ +
<%= @error if @error %>
+<%= form_for @review, + method: @post_method, + url: @post_path do |f| %> +
+ <%= f.label :stars %> + <%= f.select(:stars, (0..5).map{|index| [star_string(index), index]}, {include_blank: true}) %> +
+
+ <%= f.label :description %> + <%= f.text_area :description %> +
+
+ <%= f.label :author %> + <%= f.text_field :author %> +
+
+ <%= f.submit class:"button" %> +
+<% end %> diff --git a/app/views/reviews/create.html.erb b/app/views/reviews/create.html.erb new file mode 100644 index 0000000000..44bf11c2ed --- /dev/null +++ b/app/views/reviews/create.html.erb @@ -0,0 +1,2 @@ +

Reviews#create

+

Find me in app/views/reviews/create.html.erb

diff --git a/app/views/reviews/destroy.html.erb b/app/views/reviews/destroy.html.erb new file mode 100644 index 0000000000..df58c59d5c --- /dev/null +++ b/app/views/reviews/destroy.html.erb @@ -0,0 +1,2 @@ +

Reviews#destroy

+

Find me in app/views/reviews/destroy.html.erb

diff --git a/app/views/reviews/edit.html.erb b/app/views/reviews/edit.html.erb new file mode 100644 index 0000000000..28034f5e02 --- /dev/null +++ b/app/views/reviews/edit.html.erb @@ -0,0 +1,2 @@ +

Reviews#edit

+

Find me in app/views/reviews/edit.html.erb

diff --git a/app/views/reviews/index.html.erb b/app/views/reviews/index.html.erb new file mode 100644 index 0000000000..52d1af14fc --- /dev/null +++ b/app/views/reviews/index.html.erb @@ -0,0 +1,32 @@ +

All Reviews for <%= @product.name %>

+ +
+ <% if @reviews != nil %> +

Average: <%= star_string(@product.rating) %>

+ <% unless @product.merchant == current_merchant %> +

<%= link_to 'Add A Review!', new_merchant_product_review_path(@merchant.id, @product.id) %>

+ <% end %> +

<%= link_to "Back to Product", merchant_product_path(@merchant.id, @product.id) %>

+ <% else %> +

This Product has no reviews!

+

<%= link_to "Back to Product", merchant_product_path(@merchant.id, @product.id) %>

+ <% end %> +
+ + + +
+ <% if @reviews != nil %> + <% @reviews.each do |review| %> +
+
+
+

<%= star_string(review.stars) %>

+

<%= "By: #{review.author}" if review.author != '' %>

+
+

<%= review.description %>

+
+
+ <% end %> + <% end %> +
diff --git a/app/views/reviews/new.html.erb b/app/views/reviews/new.html.erb new file mode 100644 index 0000000000..b83f02a9ff --- /dev/null +++ b/app/views/reviews/new.html.erb @@ -0,0 +1,2 @@ +

Add Review for <%= @product.name %>

+<%= render partial: 'reviewform' %> diff --git a/app/views/reviews/show.html.erb b/app/views/reviews/show.html.erb new file mode 100644 index 0000000000..68d8d94c3b --- /dev/null +++ b/app/views/reviews/show.html.erb @@ -0,0 +1,2 @@ +

Reviews#show

+

Find me in app/views/reviews/show.html.erb

diff --git a/app/views/reviews/update.html.erb b/app/views/reviews/update.html.erb new file mode 100644 index 0000000000..7d46cbed5c --- /dev/null +++ b/app/views/reviews/update.html.erb @@ -0,0 +1,2 @@ +

Reviews#update

+

Find me in app/views/reviews/update.html.erb

diff --git a/app/views/sessions/create.html.erb b/app/views/sessions/create.html.erb new file mode 100644 index 0000000000..c251174fea --- /dev/null +++ b/app/views/sessions/create.html.erb @@ -0,0 +1,2 @@ +

Sessions#create

+

Find me in app/views/sessions/create.html.erb

diff --git a/app/views/sessions/destroy.html.erb b/app/views/sessions/destroy.html.erb new file mode 100644 index 0000000000..d75237d982 --- /dev/null +++ b/app/views/sessions/destroy.html.erb @@ -0,0 +1,2 @@ +

Sessions#destroy

+

Find me in app/views/sessions/destroy.html.erb

diff --git a/bin/spring b/bin/spring index 7fe232c3aa..9bc076b9ea 100755 --- a/bin/spring +++ b/bin/spring @@ -7,9 +7,10 @@ unless defined?(Spring) require 'rubygems' require 'bundler' - if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) - Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) } - gem 'spring', match[1] + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + if spring = lockfile.specs.detect { |spec| spec.name == "spring" } + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version require 'spring/binstub' end end diff --git a/config/database.yml b/config/database.yml index 04f24be2ba..1c1a37ca8d 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,85 +1,25 @@ -# PostgreSQL. Versions 8.2 and up are supported. +# SQLite version 3.x +# gem install sqlite3 # -# Install the pg driver: -# gem install pg -# On OS X with Homebrew: -# gem install pg -- --with-pg-config=/usr/local/bin/pg_config -# On OS X with MacPorts: -# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config -# On Windows: -# gem install pg -# Choose the win32 build. -# Install PostgreSQL and put its /bin directory on your path. -# -# Configure Using Gemfile -# gem 'pg' +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' # default: &default - adapter: postgresql - encoding: unicode - # For details on connection pooling, see rails configuration guide - # http://guides.rubyonrails.org/configuring.html#database-pooling + adapter: sqlite3 pool: 5 + timeout: 5000 development: <<: *default - database: betsy_development - - # The specified database role being used to connect to postgres. - # To create additional roles in postgres see `$ createuser --help`. - # When left blank, postgres will use the default role. This is - # the same name as the operating system user that initialized the database. - #username: betsy - - # The password associated with the postgres role (username). - #password: - - # Connect on a TCP socket. Omitted by default since the client uses a - # domain socket that doesn't need configuration. Windows does not have - # domain sockets, so uncomment these lines. - #host: localhost - - # The TCP port the server listens on. Defaults to 5432. - # If your server runs on a different port number, change accordingly. - #port: 5432 - - # Schema search path. The server defaults to $user,public - #schema_search_path: myapp,sharedapp,public - - # Minimum log levels, in increasing order: - # debug5, debug4, debug3, debug2, debug1, - # log, notice, warning, error, fatal, and panic - # Defaults to warning. - #min_messages: notice + database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default - database: betsy_test + database: db/test.sqlite3 -# As with config/secrets.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password as a unix environment variable when you boot -# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full rundown on how to provide these environment variables in a -# production deployment. -# -# On Heroku and other platform providers, you may have a full connection URL -# available as an environment variable. For example: -# -# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" -# -# You can use this database configuration with: -# -# production: -# url: <%= ENV['DATABASE_URL'] %> -# production: <<: *default - database: betsy_production - username: betsy - password: <%= ENV['BETSY_DATABASE_PASSWORD'] %> + database: db/production.sqlite3 diff --git a/config/environments/production.rb b/config/environments/production.rb index 5c1b32e486..10a93ddf6a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -29,7 +29,7 @@ # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false + config.assets.compile = true # Asset digests allow you to set far-future HTTP expiration dates on all assets, # yet still be able to expire them through the digest params. diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb new file mode 100644 index 0000000000..fd4416122a --- /dev/null +++ b/config/initializers/omniauth.rb @@ -0,0 +1,3 @@ +Rails.application.config.middleware.use OmniAuth::Builder do + provider :github, ENV["GITHUB_CLIENT_ID"], ENV["GITHUB_CLIENT_SECRET"], scope: "user:email" +end diff --git a/config/routes.rb b/config/routes.rb index 3f66539d54..10884a5d00 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,56 +1,40 @@ Rails.application.routes.draw do + root to: 'landing#index' + + get 'landing/index' => 'landing#index', as: 'index' + + get "/auth/:provider/callback" => "sessions#create" + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" # root 'welcome#index' - # Example of regular route: - # get 'products/:id' => 'catalog#view' - - # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase - - # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end - - # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable - - # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end + + resources :merchants do + resources :products do + resources :reviews + end + end + delete 'merchants/sessions/destroy' => 'sessions#destroy' + resources :categories + resources :guests + #resources :merchants + resources :orders do + post 'update_qty' + get 'checkout' + end + + get 'sessions/create' + + delete 'sessions/destroy' => 'sessions#destroy' + + get 'products/all_products' => 'products#all_products', as: 'all_products' + post 'orders/add_to_cart' => 'orders#add_to_cart', as: 'add_to_cart' + # get 'orders/view_cart' => 'orders#view_cart', as: view_cart + + # get 'merchants/:id/products' => 'merchants#show_merchant_products', as: 'merchant_products' + + end diff --git a/config/secrets.yml b/config/secrets.yml index 6442868fc1..2123fe4437 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -11,10 +11,10 @@ # if you're sharing your code publicly. development: - secret_key_base: eaebee6b0ce07b1e5b22743dacf6e6aaec01bf01c88370f9f86c3ae0d8592b4313c5e9da09754cd613eda8d206168bd74d5ed9910230b3957725352c70e2cf80 + secret_key_base: f7c47456a69cb28cb0b87f8ae0d544dc6d2f549bb24a30e1cb444786fc3daa25bef7f2206d378d3565363842186ae574cb86ec2e062e95f511a19c5d837f3aad test: - secret_key_base: f9c5bd6c383573755e5f8cf214402a51eb5ce8c7d0df9860dbf980f03fbd6c508e97412644b6a80d7034774602b05e05988bf7ab8ff594912950fdb590589a4d + secret_key_base: 836172d2e7760c87cdc215bb88e54d22100caabe180115828f4d3a78ac73161cac88e56425363b5a635f21f520502936f38061c9a252592061b598e2f276a88e # Do not keep production secrets in the repository, # instead read values from the environment. diff --git a/db/migrate/20161018211906_create_categories.rb b/db/migrate/20161018211906_create_categories.rb new file mode 100644 index 0000000000..b574669a21 --- /dev/null +++ b/db/migrate/20161018211906_create_categories.rb @@ -0,0 +1,9 @@ +class CreateCategories < ActiveRecord::Migration + def change + create_table :categories do |t| + t.string :name + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018211943_create_merchants.rb b/db/migrate/20161018211943_create_merchants.rb new file mode 100644 index 0000000000..03e9214aeb --- /dev/null +++ b/db/migrate/20161018211943_create_merchants.rb @@ -0,0 +1,11 @@ +class CreateMerchants < ActiveRecord::Migration + def change + create_table :merchants do |t| + t.string :name + t.string :email + t.string :password + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018212045_create_products.rb b/db/migrate/20161018212045_create_products.rb new file mode 100644 index 0000000000..53b69f1ecf --- /dev/null +++ b/db/migrate/20161018212045_create_products.rb @@ -0,0 +1,15 @@ +class CreateProducts < ActiveRecord::Migration + def change + create_table :products do |t| + t.string :name + t.text :description + t.integer :price + t.string :image + t.integer :merchant_id + t.integer :inventory + t.float :rating + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018212101_create_guests.rb b/db/migrate/20161018212101_create_guests.rb new file mode 100644 index 0000000000..16981041e4 --- /dev/null +++ b/db/migrate/20161018212101_create_guests.rb @@ -0,0 +1,10 @@ +class CreateGuests < ActiveRecord::Migration + def change + create_table :guests do |t| + t.string :name + t.string :email + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018212119_create_reviews.rb b/db/migrate/20161018212119_create_reviews.rb new file mode 100644 index 0000000000..df019d196d --- /dev/null +++ b/db/migrate/20161018212119_create_reviews.rb @@ -0,0 +1,12 @@ +class CreateReviews < ActiveRecord::Migration + def change + create_table :reviews do |t| + t.text :description + t.integer :stars + t.string :author + t.integer :product_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018212351_create_orders.rb b/db/migrate/20161018212351_create_orders.rb new file mode 100644 index 0000000000..31c523149b --- /dev/null +++ b/db/migrate/20161018212351_create_orders.rb @@ -0,0 +1,20 @@ +class CreateOrders < ActiveRecord::Migration + def change + create_table :orders do |t| + t.integer :total_amount + t.integer :guest_id + t.integer :merchant_id + t.string :card_name + t.integer :card_number + t.string :card_exp + t.integer :card_cvv + t.integer :billing_zip + t.string :shipping_street + t.string :shipping_city + t.string :shipping_state + t.integer :shipping_zip + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018213324_create_product_orders.rb b/db/migrate/20161018213324_create_product_orders.rb new file mode 100644 index 0000000000..d5ef81e254 --- /dev/null +++ b/db/migrate/20161018213324_create_product_orders.rb @@ -0,0 +1,10 @@ +class CreateProductOrders < ActiveRecord::Migration + def change + create_table :product_orders do |t| + t.references :product, index: true, foreign_key: true + t.references :order, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018213348_create_product_categories.rb b/db/migrate/20161018213348_create_product_categories.rb new file mode 100644 index 0000000000..7d47a00c43 --- /dev/null +++ b/db/migrate/20161018213348_create_product_categories.rb @@ -0,0 +1,10 @@ +class CreateProductCategories < ActiveRecord::Migration + def change + create_table :product_categories do |t| + t.references :product, index: true, foreign_key: true + t.references :category, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161018224431_make_long_integers_strings.rb b/db/migrate/20161018224431_make_long_integers_strings.rb new file mode 100644 index 0000000000..13b367f8de --- /dev/null +++ b/db/migrate/20161018224431_make_long_integers_strings.rb @@ -0,0 +1,15 @@ +class MakeLongIntegersStrings < ActiveRecord::Migration + def change + remove_column :orders, :card_number, :integer + add_column :orders, :card_number, :string + + remove_column :orders, :card_cvv, :integer + add_column :orders, :card_cvv, :string + + remove_column :orders, :billing_zip, :integer + add_column :orders, :billing_zip, :string + + remove_column :orders, :shipping_zip, :integer + add_column :orders, :shipping_zip, :string + end +end diff --git a/db/migrate/20161019000145_add_foreign_keys.rb b/db/migrate/20161019000145_add_foreign_keys.rb new file mode 100644 index 0000000000..3f23f6de57 --- /dev/null +++ b/db/migrate/20161019000145_add_foreign_keys.rb @@ -0,0 +1,15 @@ +class AddForeignKeys < ActiveRecord::Migration + def change + remove_column :orders, :guest_id, :integer + remove_column :orders, :merchant_id, :integer + + add_reference :orders, :guest, index: true, foreign_key: true + add_reference :orders, :merchant, index: true, foreign_key: true + + remove_column :products, :merchant_id, :integer + add_reference :products, :merchant, index: true, foreign_key: true + + remove_column :reviews, :product_id, :integer + add_reference :reviews, :product, index: true, foreign_key: true + end +end diff --git a/db/migrate/20161019224122_create_line_items.rb b/db/migrate/20161019224122_create_line_items.rb new file mode 100644 index 0000000000..1119414b66 --- /dev/null +++ b/db/migrate/20161019224122_create_line_items.rb @@ -0,0 +1,13 @@ +class CreateLineItems < ActiveRecord::Migration + def change + create_table :line_items do |t| + t.integer :qty + t.integer :price + t.references :order + t.references :product + t.references :merchant + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20161019225037_add_order_status_to_order.rb b/db/migrate/20161019225037_add_order_status_to_order.rb new file mode 100644 index 0000000000..ee918c795f --- /dev/null +++ b/db/migrate/20161019225037_add_order_status_to_order.rb @@ -0,0 +1,5 @@ +class AddOrderStatusToOrder < ActiveRecord::Migration + def change + add_column(:orders, :order_status, :string) + end +end diff --git a/db/migrate/20161020232838_add_uid_and_provider_to_merchant.rb b/db/migrate/20161020232838_add_uid_and_provider_to_merchant.rb new file mode 100644 index 0000000000..315ccf7adc --- /dev/null +++ b/db/migrate/20161020232838_add_uid_and_provider_to_merchant.rb @@ -0,0 +1,6 @@ +class AddUidAndProviderToMerchant < ActiveRecord::Migration + def change + add_column(:merchants, :uid, :string) + add_column(:merchants, :provider, :string) + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000000..9809e7d64e --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,115 @@ +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20161020232838) do + + create_table "categories", force: :cascade do |t| + t.string "name" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "guests", force: :cascade do |t| + t.string "name" + t.string "email" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "line_items", force: :cascade do |t| + t.integer "qty" + t.integer "price" + t.integer "order_id" + t.integer "product_id" + t.integer "merchant_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "merchants", force: :cascade do |t| + t.string "name" + t.string "email" + t.string "password" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "uid" + t.string "provider" + end + + create_table "orders", force: :cascade do |t| + t.integer "total_amount" + t.string "card_name" + t.string "card_exp" + t.string "shipping_street" + t.string "shipping_city" + t.string "shipping_state" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "card_number" + t.string "card_cvv" + t.string "billing_zip" + t.string "shipping_zip" + t.integer "guest_id" + t.integer "merchant_id" + t.string "order_status" + end + + add_index "orders", ["guest_id"], name: "index_orders_on_guest_id" + add_index "orders", ["merchant_id"], name: "index_orders_on_merchant_id" + + create_table "product_categories", force: :cascade do |t| + t.integer "product_id" + t.integer "category_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "product_categories", ["category_id"], name: "index_product_categories_on_category_id" + add_index "product_categories", ["product_id"], name: "index_product_categories_on_product_id" + + create_table "product_orders", force: :cascade do |t| + t.integer "product_id" + t.integer "order_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "product_orders", ["order_id"], name: "index_product_orders_on_order_id" + add_index "product_orders", ["product_id"], name: "index_product_orders_on_product_id" + + create_table "products", force: :cascade do |t| + t.string "name" + t.text "description" + t.integer "price" + t.string "image" + t.integer "inventory" + t.float "rating" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "merchant_id" + end + + add_index "products", ["merchant_id"], name: "index_products_on_merchant_id" + + create_table "reviews", force: :cascade do |t| + t.text "description" + t.integer "stars" + t.string "author" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "product_id" + end + + add_index "reviews", ["product_id"], name: "index_reviews_on_product_id" + +end diff --git a/db/seeds.rb b/db/seeds.rb index 4edb1e857e..4344d04f9f 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,47 @@ # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) + +require 'csv' + +CSV.foreach('seeds_csvs/category.csv') do |csv_obj| + Category.create(name: csv_obj[1]) + end + +CSV.foreach('seeds_csvs/guests.csv') do |csv_obj| + Guest.create(name: csv_obj[1], email: csv_obj[2]) +end + +CSV.foreach('seeds_csvs/merchant.csv') do |csv_obj| + Merchant.create(name: csv_obj[1], email: csv_obj[2], password: csv_obj[3]) +end + +CSV.foreach('seeds_csvs/orders.csv') do |csv_obj| + Order.create(guest_id: csv_obj[1].to_i, total_amount: csv_obj[2].to_f/100, merchant_id: csv_obj[3].to_i, card_name: csv_obj[4], card_number: csv_obj[5], card_exp: csv_obj[6], card_cvv: csv_obj[7], billing_zip: csv_obj[8], shipping_street: csv_obj[9], shipping_city: csv_obj[10], shipping_state: csv_obj[11], shipping_zip: csv_obj[12],order_status: csv_obj[13]) +end + +CSV.foreach('seeds_csvs/product_categories.csv') do |csv_obj| + ProductCategory.create(category_id: csv_obj[1].to_i, product_id: csv_obj[2]) +end + +CSV.foreach('seeds_csvs/products_orders.csv') do |csv_obj| + ProductOrder.create(product_id: csv_obj[1].to_i, order_id: csv_obj[2].to_i) +end + +CSV.foreach('seeds_csvs/products.csv') do |csv_obj| + Product.create(name: csv_obj[1], description: csv_obj[2], price: csv_obj[3].to_i, image: csv_obj[4], inventory: csv_obj[5].to_i, merchant_id: csv_obj[6].to_i ) +end + +CSV.foreach('seeds_csvs/reviews.csv') do |csv_obj| + Review.create(product_id: csv_obj[1].to_i, description: csv_obj[2], author: csv_obj[3], stars: csv_obj[4].to_i) +end + +# +# begin +# require "pg" +# array = [Merchant, Product, ProductOrder, Category, Review, Guest, Order, ProductCategory] +# array.each do |model| +# ActiveRecord::Base.connection.execute("SELECT setval('#{model.table_name}_id_seq'::regclass,?)", model.count) +# end +# rescue LoadError +# end diff --git a/seeds_csvs/category.csv b/seeds_csvs/category.csv new file mode 100644 index 0000000000..1d365f7266 --- /dev/null +++ b/seeds_csvs/category.csv @@ -0,0 +1,10 @@ +1,Rainbows +2,Games and Toys +3,Moustache +4,Disguises +5,Miscellaneous +6,Naps +7,Wearables +8,Decor +9,Animals +10,Beauty diff --git a/seeds_csvs/guests.csv b/seeds_csvs/guests.csv new file mode 100644 index 0000000000..b0a5348817 --- /dev/null +++ b/seeds_csvs/guests.csv @@ -0,0 +1,10 @@ +1,Carlos Howard,choward0@oracle.com +2,Rose Reid,rreid1@usda.gov +3,Michael Brown,mbrown2@networksolutions.com +4,Stephanie Bennett,sbennett3@foxnews.com +5,Terry Allen,tallen4@nasa.gov +6,Michelle Phillips,mphillips5@naver.com +7,Martin Robertson,mrobertson6@spotify.com +8,Randy Weaver,rweaver7@lulu.com +9,Annie Harrison,aharrison8@51.la +10,Sarah King,sking9@spiegel.de diff --git a/seeds_csvs/merchant.csv b/seeds_csvs/merchant.csv new file mode 100644 index 0000000000..3492f7430c --- /dev/null +++ b/seeds_csvs/merchant.csv @@ -0,0 +1,10 @@ +1,merchant 1,rgeorge0@adobe.com,A1s5KLpTiyu +2,merchant 2,dwilson1@gizmodo.com,2kIBWgyznWY +3,merchant 3,dcastillo2@nsw.gov.au,RYshSYKG +4,merchant 4,jwatkins3@mediafire.com,f3cQChXEIi +5,merchant 5,rlane4@examiner.com,gDGVvnjMkix +6,merchant 6,htorres5@admin.ch,0IMBHc +7,merchant 7,ascott6@rambler.ru,M1HJAWy +8,merchant 8,krodriguez7@bluehost.com,HRPnISN +9,merchant 9,choward8@cpanel.net,gEvbQpHX +10,merchant 10,smorgan9@google.com.br,Wxbop5c1dNd diff --git a/seeds_csvs/orders.csv b/seeds_csvs/orders.csv new file mode 100644 index 0000000000..338b49b849 --- /dev/null +++ b/seeds_csvs/orders.csv @@ -0,0 +1,10 @@ +1,Heather Martin,700,3,jcb,3544153313003422,06/16,121,12345,8 Blaine Trail,Milwaukee,Wisconsin,12345,Paid +2,Ryan King,600,10,jcb,3535790488366570,02/16,221,12345,3421 Atwood Street,Milwaukee,Wisconsin,12345,Pending +3,Scott Freeman,800,2,visa-electron,4844470197867465,03/16,321,12345,12980 Hudson Hill,Colorado Springs,Colorado,12345,Cancelled +4,Matthew Mason,400,8,visa-electron,4913634062130046,07/16,212,12345,24351 1st Point,Denver,Colorado,12345,Completed +5,Lisa Oliver,400,10,jcb,3561305235966635,08/16,211,12345,2063 Pine View Road,Salt Lake City,Utah,12345,Completed +6,Sarah Cox,500,6,jcb,3541499214835088,10/15,213,12345,56903 American Lane,Beaumont,Texas,12345,Cancelled +7,Nicole Adams,600,9,diners-club-enroute,201516174929028,06/16,213,12345,5 Dixon Parkway,Charleston,West Virginia,12345,Pending +8,Amanda West,500,4,visa,4041595386325825,11/15,213,12345,2 Menomonie Terrace,Dallas,Texas,12345,Paid +9,Douglas Sanchez,500,2,mastercard,5100176740926148,12/15,212,12345,96916 Loomis Crossing,Florence,South Carolina,12345,Pending +10,James Mendoza,100,7,jcb,3528298798434178,9/16,211,12345,0662 Duke Court,El Paso,Texas,12345,Paid diff --git a/seeds_csvs/product_categories.csv b/seeds_csvs/product_categories.csv new file mode 100644 index 0000000000..6e970fbe73 --- /dev/null +++ b/seeds_csvs/product_categories.csv @@ -0,0 +1,100 @@ +1,10,1 +2,5,1 +3,5,2 +4,2,2 +5,7,3 +6,9,3 +7,5,3 +8,2,4 +9,5,4 +10,5,5 +11,9,5 +13,8,5 +15,5,6 +16,10,6 +17,7,6 +18,4,6 +19,5,7 +20,8,7 +21,3,8 +22,4,8 +23,5,8 +24,7,8 +25,10,8 +26,9,9 +27,8,9 +28,5,9 +29,5,10 +30,9,11 +31,7,11 +32,5,11 +33,4,11 +34,2,11 +35,1,12 +36,5,12 +37,6,12 +38,5,13 +39,5,14 +40,8,14 +41,9,14 +42,2,15 +43,5,15 +44,1,16 +45,5,16 +46,4,17 +47,5,17 +48,7,17 +49,2,18 +50,5,18 +51,3,19 +52,5,19 +53,5,20 +54,8,20 +55,1,21 +56,5,21 +57,1,22 +58,5,22 +59,5,23 +60,5,24 +61,9,24 +62,2,25 +63,5,25 +64,1,26 +65,5,26 +66,8,26 +67,5,27 +68,2,28 +69,5,28 +70,5,29 +71,9,29 +72,2,30 +73,5,30 +74,6,30 +75,1,31 +76,5,31 +77,1,32 +78,2,32 +79,5,32 +80,9,32 +81,2,33 +82,5,33 +83,5,34 +84,1,35 +85,5,35 +86,7,35 +87,10,35 +88,1,36 +89,4,36 +90,5,36 +91,5,37 +92,9,37 +93,2,37 +94,9,38 +95,2,38 +96,5,38 +97,5,39 +98,9,39 +99,5,40 +100,8,40 +101,5,41 +102,8,41 diff --git a/seeds_csvs/products.csv b/seeds_csvs/products.csv new file mode 100644 index 0000000000..534b63766f --- /dev/null +++ b/seeds_csvs/products.csv @@ -0,0 +1,41 @@ +1,Bath Bomb,"Literally a bomb for your bath. Desperate times call for desperate measures. The best way to get out of doing your work is to cause an 'accidental' small explosion at your house. Pro Tip: A bath bomb is also a great way to avoid cleaning your shower.",3704,bath_bomb.jpg,10,9 +2,Cards Against Humanity,"Cards Against Humanity is a party game for horrible people. Unlike most of the party games you've played before, Cards Against Humanity is as despicable and awkward as you and your friends.",8838,card_humanity.jpg,13,3 +3,Cat Watch,"As you suspected, this watch doesn't actually tell time. A stylish procrastinator like you needs a sleek and clever looking feline to adorn your wrist, but not actually tell you how much time you've wasted. It's also a great conversation starter if you're trying to charm a hipster. #winning",1171,cat_watch.jpg,5,10 +4,Drunk Stoned or Stupid,"DRUNK STONED OR STUPID is a party game for you and your stupid friends. Each round a card is drawn and the group decides who in the group would be most likely to do really stupid things.",7305,drunk_stoned_or_stupid.jpg,7,1 +5,Baby Elephant Drinking Wine,"You asked and we delivered. Yes, this porcelain baby elephant is LITERALLY drinking wine. You'll find yourself mesmerized by it's lush cuteness.",4857,elephant_wine.jpg,3,1 +6,Eyelash Goggles,"Go scuba diving with style. These sassy lashy goggles take waterproof falsies to a whole new level. Wear them while you're swimming for a wet and sexy look, or wear them when you're not swimming to attract unwanted attention.",739,eyelash_goggles.jpg,2,9 +7,Singing Cardboard Face,"Always wanted a cardboard face? We know. And guess what? This one sings! Our Intelligent Bionic Cardboard Technology will have you guessing whether this is really a piece of art made from recycled boxes or a real human face while it serenades you with 90's boyband songs.",1900,face.jpg,15,8 +8,Fingerstache,"Charm your lover with these sexy fingerstaches. This pack of far too many temporary tattoos will keep you talking in bad accents all night long.",1689,finger_stash.jpg,43,4 +9,Flamingo Lights,"Have your friends screaming 'this pad is lit!' every time they visit with this set of LED flamingo lights. Pro Tip: Cool your Yule and avian your Advent by using these feisty flamingo lights on your Christmas Tree.",5913,flamingo_lights.jpg,9,9 +10,Universe Lollipops,"How many licks does it take to get to the center of the Universe? Help humankind find the answer to this and other rhetorical questions by taking a lick at these yummy universe pops.",4605,galaxy_lollipops.jpg,10,9 +11,Gorgeous Giraffe Mask,"Gee! Golly! A Giraffe! Spend hours frolicking through your local urban jungle wearing this gorgeous giraffe mask. ",1005,giraffe.jpg,10,9 +12,Rainbow Hammock,"Find your pot of gold at the end of your rainbow hammock nap. Don't worry, this hammock doesn't only come out when the sun is shining through the rain.",1575,hamock.jpg,10,9 +13,Hey Girl Tea,"You'll want to take a sick day every day with this tantalizing tea infused with Mucinex and honey.",1334,hey_girl.jpg,10,9 +14,Horse Lamp,"Tired of being Head of the Household? Hand of your responsibilities to this Horse of the Household. She'll lead you and your roommates on the path toward en'light'enment.",10099,horse_lamp.jpg,10,9 +15,Little Wiener Man,"Waste away your day fiddling with this limited edition Little Wiener Man. Collect this and the other Tiny Meat Men: Frank Furt, Brad Wurst, and Kevin Bacon",1643,hotdog_lego.jpg,10,9 +16,Rainbow Knives,"Look like you're doing something productive while you're actually doing nothing at all. These nifty knives are so dull that they'll cut nothing at all. You'll look like you're always chopping vegetables, but with these, we promise it will never get done.",2167,knives.jpg,10,9 +17,Squid Mask,"Haters gonna hate, and you'll make them hate you even more when you wear this knit squid mask. Made with 100% alpaca wool. Hand crafted.",1962,mask.jpg,10,9 +18,Creepy Mermaid Lego,"We just know you'll want to play with this miserable mermaid just as much as we do. She's made of plastic, it's fantastic.",654,mermaid_lego.jpg,10,9 +19,Moustache Clips,"Stache away your favorite passages with these Moustache Clip Page Markers. They come in a variety of lifelike shapes and colors to help you stay organized. These wiry staches are both magnetic and lady magnets.",894,mustache_clips.jpg,10,9 +20,Moustache Outlet Covers,"You've always thought the holes in your outlet looked like a face. Well, why not make that boring outlet face look like your dad's face? These classy mustache stickers will have you and your friends gawking at the resemblance.",458,outlet_stash.jpg,10,9 +21,Tiny Plungers,"These tiny plungers can tackle the tiniest of clogs in the tiniest of toilets. Some assembly required.",1243,party_plungers.jpg,10,9 +22,Procrastinator's Pen Set,"Take forever deciding which color pen you want to use. With more than ten shades of blue to chose from you'll never decide on the perfect one.",2100,pens.jpg,10,9 +23,Frappe Fake Phone Case,"This fancy Frappe Fake Phone Case doesn't fit a single phone in existence. Really. Not one. Just try making your phone fit. We dare you.",654,phone_case.jpg,10,9 +24,Pegg,"Meet Pegg. She's a pig who pukes eggs. Well, egg yolks to be specific. She's the cutest but least efficient way you'll ever find to separate the egg yolks from the whites.",1824,pig_egg.jpg,10,9 +25,Pizza Floatation Device,"Ever wish you could hit the water on your favorite wedge of pizza. This is your chance. Drowning Hazard Warning: Wait twenty minutes after using Pizza Flotation Device before swimming.",2777,pizza_raft.jpg,10,9 +26,Roy G. Biv Rainbow Maker,"Enjoy the entire visible light spectrum from the comfort of your living room. This rainbow maker is the first and only of its kind and is guaranteed to bring you happiness. Warning: Shining a rainbow directly into your eyes could cause vision loss.",8721,rainbow_maker.jpg,10,9 +27,Toast-Its,"You'll love leaving yourself little reminders on paper that looks and smells so much like real toast that you might catch yourself buttering it. Don't worry, we've done it too.",133,sticky_notes.jpg,10,9 +28,Voo-doo Squeez-a-Face,"Seeking revenge on someone who has done you wrong? Look no further. Squeeze this head into whatever ugly expression you desire and your nemesis's face will be permanently stuck that way.",733,stress_balls.jpg,10,9 +29,Tea-Rex,"Still drinking New Age Tea? Pssshh. Time to turn your tea Prehistoric with this Tea-Rex. Also available in Paleozoic Purple and Cambrian Cranberry.",664,tea_infuser.jpg,10,9 +30,Tire Swing,"This tried and true tire swing will keep you twirling your time away day after day.",10123,tire_swing.jpg,10,9 +31,Rainbow Parasol,"Did you know harmful UVRainbows can cause premature aging? Protect your skin from the visible light spectrum with this rainbow parasol. Keep it on hand for those disheartening days when the sun is shining through the rain. ",4233,umbrella.jpg,10,9 +32,Uni the Unicorn,"What's white, gold, and rainbow all over? Uni the Unicorn! You'll love snuggling her plushy bod. Kiss her on the muzzle and you might even catch her smiling at you.",791,unicorn_animal.jpg,10,9 +33,View Master,"The original virtual reality device is back and ready for you to explore distant lands and funny memes with the pull of a trigger. Choose from a variety of film discs including bald cats, tiny apartments, and accidental photos of the floor.",1594,view_master.jpg,10,9 +34,Boxed Water,"Boxed water is better. Don't believe us? Try it for yourself. Drinking water out of cardboard carton will leave you feeling refreshed and oddly nostalgic for your elementary school cafeteria. It's an emotion fusion we guarantee you'll love. Please don't operate heavy machinery after drinking boxed water.",299,water.jpg,10,9 +35,Engagement Ring,"Have your S.O. saying 'Oh Yes' with this 'hue'-tiful rainbow engagement ring. You'll love watching her friends smile and nod politely when they ask to see her ring.",9999,wedding_ring.jpg,10,9 +36,Rainbow Hair,"Win friends and influence people with this psychedelic rainbow wig made from real human hair.",4799,wig.jpg,10,9 +37,Mum Fish and Bone Baby,"You'll love helping this Mum Fish give birth to her smiling Bone Baby. Make Bone Baby swim around or put him back in the birthing canal for more laborious fun.",1799,bone_fish.jpg,10,9 +38,Techie Plush-a-nana,"Get caught in an infinite loop peeling and un-peeling this soft plush banana. You'll find yourself iterating over plush banana mechanics all day long. ",1299,fake_banana.jpg,10,9 +39,Prehistoric Paper Weight,"Keep your documents from blowing away so your job doesn't go extinct. Paleo down your important papers with this Dino-mite glass paper weight. Plus, it'll look 'ptero-rrific' in your cubicle.",2999,glass_dino.jpg,10,9 +40,Take My Hand Statue,"This lifelike hand is always handy when you need a hand, but only when you need a fake hand. We know it's a rare occasion, but it's here. You know, just in case. ",4799,hand.jpg,10,9 +41,Monkey Pizza Cutter,"Pretend you're at the circus at dinner time. This pizza cutter that closely resembles a monkey riding a unicycle will slice your pizza in one fell swoop.",2799,monkey_pizza_cutter.jpg,10,9 diff --git a/seeds_csvs/products_orders.csv b/seeds_csvs/products_orders.csv new file mode 100644 index 0000000000..e7384e9f6c --- /dev/null +++ b/seeds_csvs/products_orders.csv @@ -0,0 +1,10 @@ +1,2,5 +2,5,7 +3,1,4 +4,5,7 +5,2,6 +6,1,4 +7,6,10 +8,3,6 +9,6,9 +10,7,10 diff --git a/seeds_csvs/reviews.csv b/seeds_csvs/reviews.csv new file mode 100644 index 0000000000..bf2b81bfc4 --- /dev/null +++ b/seeds_csvs/reviews.csv @@ -0,0 +1,10 @@ +1,3,This cat watch is kinda crappy! It tells the time so you'd think that's great. But the cat glasses broke off in the first month. Still pretty cute tho.,Louise Andrews,2 +2,3,OHEMGEE! I LOVE this thing!!!!,Kimberly Stone,5 +3,1,Dare I say it? This is the BOMB.com!! #productpuns,Mark Myers,5 +4,7,This is garbage! It didn't even survive outside during the first rainstorm of the season.,Mark Price,2 +5,9,Perfect ambiance for when I bring my dates back to my place. They even forget that we're in my mom's basement!,3 +6,1,I take nightly baths and this is BY FAR the best bath bomb I'v used! It not only smells amazing but also leave my skin silky smooth. I only give it a three because that's my favorite number,Justin Murphy,3 +7,2,THIS IS SO FUN! I brought it into my 1st grade class room and loved it! One thumb up! (I lost my other in a tire swing accident a few years back),Janice Foster,5 +8,9,Super fun a festive! Great for a back-yard BBQ,Sarah Matthews,5 +9,5,I LOVE the elephant, however be warned, it only holds a normal bottle of wine - not a double - need a grown up elephant for that!,Ann Stanley,3 +10,7,I thought about getting a cardboard moose for my wall but the face is so much more relatable,Gary Ramirez,5 diff --git a/test/controllers/categories_controller_test.rb b/test/controllers/categories_controller_test.rb new file mode 100644 index 0000000000..6e2267313e --- /dev/null +++ b/test/controllers/categories_controller_test.rb @@ -0,0 +1,44 @@ +require 'test_helper' + +class CategoriesControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + assert_template :index + end + + test "should get show" do + get :show, {id: categories(:one).id} + assert_response :success + assert_template :show + end + + test "should get new" do + get :new + assert_response :success + end + + test "should be able to create a new category" do + post_params = {category: {name: "Harry Potter Things"}} + post :create, post_params + assert_response :redirect + end + + test "creating a category changes the number of categories" do + + assert_difference('Category.count', 1) do + post_params = {category: {name: "A Category"}} + post :create, post_params + end + assert_response :redirect + end + + + test "should get destroy" do + + delete :destroy, {id: categories(:one).id} + assert_response :redirect + end + + +end diff --git a/test/controllers/guests_controller_test.rb b/test/controllers/guests_controller_test.rb new file mode 100644 index 0000000000..8cf2becd09 --- /dev/null +++ b/test/controllers/guests_controller_test.rb @@ -0,0 +1,39 @@ +require 'test_helper' + +class GuestsControllerTest < ActionController::TestCase + # test "should get index" do + # get :index + # assert_response :success + # end + # + # test "should get show" do + # get :show + # assert_response :success + # end + # + # test "should get new" do + # get :new + # assert_response :success + # end + # + # test "should get create" do + # get :create + # assert_response :success + # end + # + # test "should get edit" do + # get :edit + # assert_response :success + # end + # + # test "should get update" do + # get :update + # assert_response :success + # end + # + # test "should get destroy" do + # get :destroy + # assert_response :success + # end + +end diff --git a/test/controllers/landing_controller_test.rb b/test/controllers/landing_controller_test.rb new file mode 100644 index 0000000000..b814ae4ebc --- /dev/null +++ b/test/controllers/landing_controller_test.rb @@ -0,0 +1,9 @@ +require 'test_helper' + +class LandingControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + end + +end diff --git a/test/controllers/merchants_controller_test.rb b/test/controllers/merchants_controller_test.rb new file mode 100644 index 0000000000..60518e0c28 --- /dev/null +++ b/test/controllers/merchants_controller_test.rb @@ -0,0 +1,10 @@ +require 'test_helper' + +class MerchantsControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + assert_template :index + end + +end diff --git a/test/controllers/orders_controller_test.rb b/test/controllers/orders_controller_test.rb new file mode 100644 index 0000000000..f00d72f4ff --- /dev/null +++ b/test/controllers/orders_controller_test.rb @@ -0,0 +1,39 @@ +require 'test_helper' + +class OrdersControllerTest < ActionController::TestCase + # test "should get index" do + # get :index + # assert_response :success + # end + # + # test "should get show" do + # get :show + # assert_response :success + # end + # + # test "should get new" do + # get :new + # assert_response :success + # end + # + # test "should get create" do + # get :create + # assert_response :success + # end + # + # test "should get edit" do + # get :edit + # assert_response :success + # end + # + # test "should get update" do + # get :update + # assert_response :success + # end + # + # test "should get destroy" do + # get :destroy + # assert_response :success + # end + +end diff --git a/test/controllers/products_controller_test.rb b/test/controllers/products_controller_test.rb new file mode 100644 index 0000000000..686705b0f4 --- /dev/null +++ b/test/controllers/products_controller_test.rb @@ -0,0 +1,59 @@ +require 'test_helper' + +class ProductsControllerTest < ActionController::TestCase + test "should get index" do + get :index, {merchant_id: (products(:glitter).merchant).id} + assert_response :success + assert_template :index + end + + test "should get show" do + merchant = products(:glitter).merchant + + get :show, {id: products(:glitter).id, merchant_id: merchant.id } + #get merchant_product_path(merchant.id, products(:glitter).id) + assert_response :success + end + + test "should get new" do + get :new, {merchant_id: (products(:glitter).merchant).id} + assert_response :success + assert_template :new + end + + test "should be able to create a new product" do + post_params = {name: "Glitter Wand", description: "a glittery wand", price: "15.00", image: 'http://placekitten.com/200/300', merchant_id: 2, inventory: 7, rating: 5} + + post :create, {merchant_id: (products(:glitter).merchant).id, product: post_params} + assert_response :redirect + end + + test "creating a product changes the number of products" do + assert_difference("Product.count",1) do + post :create, {merchant_id: (products(:glitter).merchant).id, "product" => {name: "Glitter Wand", description: "a glittery wand", price: "15.00", image: 'http://placekitten.com/200/300', inventory: 7, rating: 5}} + end + end + + test "should get edit -----!!!!" do + product = products(:glitter) + get :edit, {id: product.id, merchant_id: products(:glitter).merchant.id } + assert_response :success + end + + test "should be able to update a product" do + put :update, {merchant_id: (products(:glitter).merchant).id, id: products(:glitter).id, product: {name: "Glitter Wand", description: "a glittery wand", price: "15.00", image: 'http://placekitten.com/200/300', merchant_id: 2, inventory: 7, rating: 5}} + assert_redirected_to controller: "products", action: "show" + end + + test "deleting a product changes the number of products" do + assert_difference("Product.count", -1) do + delete :destroy, {merchant_id: (products(:glitter).merchant).id, id: products(:glitter).id } + end + end + + test "responds with error if file isn't found" do + delete :destroy, {merchant_id: (products(:glitter).merchant).id, id: 943} + assert_response :missing + end + +end diff --git a/test/controllers/reviews_controller_test.rb b/test/controllers/reviews_controller_test.rb new file mode 100644 index 0000000000..0e8a781f61 --- /dev/null +++ b/test/controllers/reviews_controller_test.rb @@ -0,0 +1,44 @@ +require 'test_helper' + +class ReviewsControllerTest < ActionController::TestCase + test "should get index" do + get :index, {merchant_id: (products(:glitter).merchant).id, product_id: products(:glitter).id} + assert_response :success + assert_template :index + end + + test "should get show" do + get :show, {id: reviews(:glitter_review), product_id: products(:glitter).id, merchant_id: (products(:glitter).merchant).id} + assert_response :success + end + + test "should get new" do + get :new, {merchant_id: (products(:glitter).merchant).id, product_id: products(:glitter).id} + assert_response :success + assert_template :new + end + + test "should be able to create a new product" do + post :create, {merchant_id: (products(:glitter).merchant).id, product_id: products(:glitter).id, review: {description: "njefknlsnf", stars: 2, author: "nfs"}} + assert_response :redirect + # This action will need to change to merchant's create_new_product path + end + + test "creating a product changes the number of products" do + assert_difference("Review.count",1) do + post :create, {merchant_id: (products(:glitter).merchant).id, product_id: products(:glitter).id, review: {description: "njefknlsnf", stars: 2, author: "nfs"}} + end + end + + + test "deleting a review changes the number of reviews" do + assert_difference("Review.count", -1) do + delete :destroy, {merchant_id: (products(:glitter).merchant).id, product_id: products(:glitter).id, id: reviews(:glitter_review).id } + end + end + + test "redirects and gives flash notice if file isn't found" do + delete :destroy, {merchant_id: (products(:glitter).merchant).id, product_id: products(:glitter).id, id: 943} + assert_redirected_to merchant_product_path((products(:glitter).merchant).id, products(:glitter).id) + end +end diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb new file mode 100644 index 0000000000..9c49242143 --- /dev/null +++ b/test/controllers/sessions_controller_test.rb @@ -0,0 +1,41 @@ +require 'test_helper' + +class SessionsControllerTest < ActionController::TestCase + # test "should get create" do + # get :create + # assert_response :success + # end + # + # test "should get destroy" do + # get :destroy + # assert_response :success + # end + + # setup do + # request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] + # end + + def login_a_merchant + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] + get :create, {uid: '12345'} + end + + test "Can Create a merchant" do + assert_difference('Merchant.count', 1) do + login_a_merchant + assert_response :redirect + assert_redirected_to merchant_path(Merchant.last.id) + end + end + + test "If a merchant logs in twice it doesn't create a 2nd merchant" do + assert_difference('Merchant.count', 1) do + login_a_merchant + end + assert_no_difference('Merchant.count') do + login_a_merchant + assert_response :redirect + assert_redirected_to merchant_path(Merchant.last.id) + end + end +end diff --git a/test/fixtures/categories.yml b/test/fixtures/categories.yml new file mode 100644 index 0000000000..56066c68af --- /dev/null +++ b/test/fixtures/categories.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + +two: + name: MyString diff --git a/test/fixtures/guests.yml b/test/fixtures/guests.yml new file mode 100644 index 0000000000..5dc4ddf033 --- /dev/null +++ b/test/fixtures/guests.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + email: MyString + +two: + name: MyString + email: MyString diff --git a/test/fixtures/line_items.yml b/test/fixtures/line_items.yml new file mode 100644 index 0000000000..6403f294ab --- /dev/null +++ b/test/fixtures/line_items.yml @@ -0,0 +1,36 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html +one: + qty: 1 + price: 300 + order: orderone + product: poop + +two: + qty: 1 + price: 200 + order: two + product: poop + +three: + qty: 1 + price: 300 + order: three + product: poop + +four: + qty: 1 + price: 300 + order: four + product: poop + +five: + qty: 1 + price: 300 + order: five + product: poop + +six: + qty: 1 + price: 300 + order: six + product: poop diff --git a/test/fixtures/merchants.yml b/test/fixtures/merchants.yml new file mode 100644 index 0000000000..ac7eafe484 --- /dev/null +++ b/test/fixtures/merchants.yml @@ -0,0 +1,22 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: merchant1 + email: email_merchant1@email.com + password: password1234 + +two: + name: merchant2 + email: email_merchant2@email.com + password: password4321 + + +three: + name: merchant1 + email: email_merchant1@email.com + password: password1234 + +four: + name: merchant2 + email: email_merchant2@email.com + password: password4321 diff --git a/test/fixtures/orders.yml b/test/fixtures/orders.yml new file mode 100644 index 0000000000..8a5e5ad4c6 --- /dev/null +++ b/test/fixtures/orders.yml @@ -0,0 +1,91 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +orderone: + total_amount: 300 + guest_id: 1 + merchant: one + card_name: visa + card_number: 123456789012 + card_exp: 02/16 + card_cvv: 123 + billing_zip: 12345 + shipping_street: "1234 street" + shipping_city: City + shipping_state: State + shipping_zip: 12345 + order_status: paid + +two: + total_amount: 200 + guest_id: 1 + merchant: one + card_name: MyString + card_number: 1 + card_exp: MyString + card_cvv: 1 + billing_zip: 1 + shipping_street: MyString + shipping_city: MyString + shipping_state: MyString + shipping_zip: 1 + order_status: paid + +three: + total_amount: 300 + guest_id: 1 + merchant: one + card_name: MyString + card_number: 1 + card_exp: MyString + card_cvv: 1 + billing_zip: 1 + shipping_street: MyString + shipping_city: MyString + shipping_state: MyString + shipping_zip: 1 + order_status: pending + +four: + total_amount: 300 + guest_id: 1 + merchant: one + card_name: MyString + card_number: 1 + card_exp: MyString + card_cvv: 1 + billing_zip: 1 + shipping_street: MyString + shipping_city: MyString + shipping_state: MyString + shipping_zip: 1 + order_status: pending + +five: + total_amount: 300 + guest_id: 1 + merchant: one + card_name: MyString + card_number: 1 + card_exp: MyString + card_cvv: 1 + billing_zip: 1 + shipping_street: MyString + shipping_city: MyString + shipping_state: MyString + shipping_zip: 1 + order_status: completed + +six: + total_amount: 300 + guest_id: 1 + merchant: one + card_name: MyString + card_number: 1 + card_exp: MyString + card_cvv: 1 + billing_zip: 1 + shipping_street: MyString + shipping_city: MyString + shipping_state: MyString + shipping_zip: 1 + order_status: cancelled diff --git a/test/fixtures/product_categories.yml b/test/fixtures/product_categories.yml new file mode 100644 index 0000000000..558460cad7 --- /dev/null +++ b/test/fixtures/product_categories.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + product_id: + category_id: + +two: + product_id: + category_id: diff --git a/test/fixtures/product_orders.yml b/test/fixtures/product_orders.yml new file mode 100644 index 0000000000..25ec8737fc --- /dev/null +++ b/test/fixtures/product_orders.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + product_id: :poop + order_id: :orderone + +two: + product_id: :poop + order_id: :two diff --git a/test/fixtures/products.yml b/test/fixtures/products.yml new file mode 100644 index 0000000000..b26c6657b7 --- /dev/null +++ b/test/fixtures/products.yml @@ -0,0 +1,36 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +new_shoe: + name: "A Shoe!" + description: "A beautiful shoe!" + price: 300 + image: 'http://placekitten.com/200/300' + merchant: three + inventory: 4 + rating: 3 + +glitter: + name: "Glitter Wand" + description: "a glittery wand" + price: 1500 + image: 'http://placekitten.com/200/300' + merchant: three + inventory: 7 + rating: 5 + +no_rating: + name: "Glitter Wand" + description: "a glittery wand" + price: 1500 + image: 'http://placekitten.com/200/300' + merchant: four + inventory: 7 + +poop: + name: "A poop!" + description: "on your beautiful shoe!" + price: 300 + image: 'http://placekitten.com/200/300' + merchant: one + inventory: 4 + rating: 3 diff --git a/test/fixtures/reviews.yml b/test/fixtures/reviews.yml new file mode 100644 index 0000000000..8165e61b53 --- /dev/null +++ b/test/fixtures/reviews.yml @@ -0,0 +1,25 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +glitter_review: + description: "nfjd" + stars: 3 + author: "fndjk" + product: glitter + +shoe_review: + description: "mkd" + stars: 1 + author: "fncdk" + product: new_shoe + +rating_review_one: + description: "nfjds" + stars: 5 + author: "jf" + product: no_rating + +rating_review_two: + description: "mkvd" + stars: 3 + author: "fdjk" + product: no_rating diff --git a/test/models/category_test.rb b/test/models/category_test.rb new file mode 100644 index 0000000000..acbe3bc842 --- /dev/null +++ b/test/models/category_test.rb @@ -0,0 +1,13 @@ +require 'test_helper' + +class CategoryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end + +test "should have the necessary required validators" do + category = Category.new + assert_not category.valid? + assert_equal [:name], category.errors.keys +end +end diff --git a/test/models/guest_test.rb b/test/models/guest_test.rb new file mode 100644 index 0000000000..848ce58750 --- /dev/null +++ b/test/models/guest_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GuestTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/line_item_test.rb b/test/models/line_item_test.rb new file mode 100644 index 0000000000..f3a35e6b40 --- /dev/null +++ b/test/models/line_item_test.rb @@ -0,0 +1,11 @@ +require 'test_helper' + +class LineItemTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end + test "subtotal returns what's expected" do + assert_equal 300, line_items(:one).subtotal + end + +end diff --git a/test/models/merchant_test.rb b/test/models/merchant_test.rb new file mode 100644 index 0000000000..c425aad66d --- /dev/null +++ b/test/models/merchant_test.rb @@ -0,0 +1,48 @@ +require 'test_helper' + +class MerchantTest < ActiveSupport::TestCase + test "the truth" do + assert true + end + + test "paid orders calculate as paid" do + assert_equal 500, merchants(:one).revenue_paid_orders + end + + test "pending orders calculate correctly" do + assert_equal 600, merchants(:one).revenue_pending_orders + end + + test "completed orders calculate correctly" do + assert_equal 300, merchants(:one).revenue_completed_orders + end + + test "cancelled orders calculate correctly" do + assert_equal 300, merchants(:one).revenue_cancelled_orders + end + + test "total orders calculate correctly" do + assert_equal 1400, merchants(:one).total_revenue + end + + test "correct number of pending orders" do + assert_equal 2, merchants(:one).pending_orders + end + + test "correct number of cancelled orders" do + assert_equal 1, merchants(:one).cancelled_orders + end + + test "correct number of paid orders" do + assert_equal 2, merchants(:one).paid_orders + end + + test "correct number of completed orders" do + assert_equal 1, merchants(:one).completed_orders + end + + test "correct number of orders" do + assert_equal 5, merchants(:one).total_orders + end + +end diff --git a/test/models/order_test.rb b/test/models/order_test.rb new file mode 100644 index 0000000000..215378c38c --- /dev/null +++ b/test/models/order_test.rb @@ -0,0 +1,12 @@ +require 'test_helper' + +class OrderTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end + # test "total_amount returns the total of line items" do + # line_items = [{quantity: 3, price: 500}] + # + # assert_equal 1500, orders(:orderone).total_amount + # end +end diff --git a/test/models/product_category_test.rb b/test/models/product_category_test.rb new file mode 100644 index 0000000000..6f788ebac5 --- /dev/null +++ b/test/models/product_category_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ProductCategoryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/product_order_test.rb b/test/models/product_order_test.rb new file mode 100644 index 0000000000..6de041e1b8 --- /dev/null +++ b/test/models/product_order_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ProductOrderTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/product_test.rb b/test/models/product_test.rb new file mode 100644 index 0000000000..25f9139d15 --- /dev/null +++ b/test/models/product_test.rb @@ -0,0 +1,39 @@ +require 'test_helper' + +class ProductTest < ActiveSupport::TestCase + test "the truth" do + assert true + end + test "Product must have a name, description, price, inventory and image" do + + assert products(:glitter).valid? "Glitter should be valid" ### WHY IS THIS FAILING??? + + products(:glitter).name = nil ## This name removal is local to the test data - it doesn't change the fixture + assert_not products(:glitter).valid? "Glitter should no longer be valid" + + products(:new_shoe).price = nil + assert_not products(:new_shoe).valid? "New Shoe should no longer be valid" + end + + test "Products cannot have a rating less than 0 or greater than 5" do + assert products(:glitter).rating = 6 + assert_not products(:glitter).valid? "Glitter should no longer be valid" + + assert products(:new_shoe).rating = -1 + assert_not products(:new_shoe).valid? "New Shoe should no longer be valid" + end + + + test "The amount of an product's reviews" do + assert_equal products(:glitter).reviews.length, 1 + assert_equal products(:new_shoe).reviews.length, 1 + assert_equal products(:no_rating).reviews.length, 2 + + end + + test "No_Rating has the correct reviews" do + assert_includes products(:no_rating).reviews, reviews(:rating_review_one) + assert_includes products(:no_rating).reviews, reviews(:rating_review_two) + end + +end diff --git a/test/models/review_test.rb b/test/models/review_test.rb new file mode 100644 index 0000000000..42fbc4bc0c --- /dev/null +++ b/test/models/review_test.rb @@ -0,0 +1,36 @@ +require 'test_helper' + +class ReviewTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end + + test "Reviews must have a star rating and a description" do + assert reviews(:glitter_review).valid? "Glitter Review should be valid" ### WHY IS THIS FAILING??? + + reviews(:glitter_review).stars = nil ## This name removal is local to the test data - it doesn't change the fixture + assert_not reviews(:glitter_review).valid? "Glitter Review should no longer be valid" + + reviews(:shoe_review).description = nil + assert_not reviews(:shoe_review).valid? "Shoe Review should no longer be valid" + end + + + test "Reviews cannot have a rating less than 0 or greater than 5" do + assert reviews(:glitter_review).stars = 6 + assert_not reviews(:glitter_review).valid? "Glitter Review should no longer be valid" + + assert reviews(:shoe_review).stars = -1 + assert_not reviews(:shoe_review).valid? "New Shoe Review should no longer be valid" + end + + + test "Each Review has the correct rating" do + assert_equal reviews(:glitter_review).product, products(:glitter) + assert_equal reviews(:shoe_review).product, products(:new_shoe) + assert_equal reviews(:rating_review_one).product, products(:no_rating) + assert_equal reviews(:rating_review_two).product, products(:no_rating) + end + + +end diff --git a/test/test_helper.rb b/test/test_helper.rb index 92e39b2d78..b69d44c0ff 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,10 +1,27 @@ ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' +require "minitest/reporters" +require "simplecov" +SimpleCov.start class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all + Minitest::Reporters.use! # Add more helper methods to be used by all tests here... + # /test/test_helper.rb + def setup + # Once you have enabled test mode, all requests + # to OmniAuth will be short circuited to use the mock authentication hash. + # A request to /auth/provider will redirect immediately to /auth/provider/callback. + OmniAuth.config.test_mode = true + + # The mock_auth configuration allows you to set per-provider (or default) authentication + # hashes to return during testing. + OmniAuth.config.mock_auth[:github] = OmniAuth::AuthHash.new({ + provider: 'github', uid: '123545', info: { email: "a@b.com", name: "Ada" } + }) + end end
NamePriceQuantityTotal
<%= image_tag(item.product.image, class: "cart-thumbnail") %><%= link_to "#{item.product.name}", merchant_product_path(merchant_id: item.product.merchant_id, id: item.product.id) %><%= number_to_currency(item.product.price/100.0) %><%= number_field_tag :qty, item.qty.to_i, class: "form_control", min: 1 %><%= submit_tag "Update Quantity", class: "btn btn-default button" %><%= number_to_currency(item.subtotal/100.0) %> + <%end%> + <%= button_to 'Remove from Cart', {action: "destroy", id: item.id}, class: "button", method: :delete, data: {confirm: "Are you sure?"} %>
<%= button_to "Checkout", order_checkout_path(current_cart.id), class: "button", method: :get %>Order Total<%= number_to_currency(current_cart.total_amount/100.0) %>