From 3ae9dff8f27994dcc41f9fb54b2431718acae064 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Tue, 23 Jun 2015 17:07:39 +0200 Subject: [PATCH] initial --- .DS_Store | Bin 0 -> 10244 bytes .gitignore | 16 + Capfile | 4 + Gemfile | 46 + Gemfile.lock | 165 ++ README.rdoc | 28 + Rakefile | 6 + app/.DS_Store | Bin 0 -> 6148 bytes app/assets/.DS_Store | Bin 0 -> 6148 bytes app/assets/images/.DS_Store | Bin 0 -> 6148 bytes app/assets/images/.keep | 0 app/assets/images/images/bx_loader.gif | Bin 0 -> 8581 bytes app/assets/images/images/controls.png | Bin 0 -> 16091 bytes app/assets/javascripts/application.coffee | 26 + app/assets/javascripts/application.coffee.old | 347 ++++ .../jquery.animate-enhanced.min.js | 22 + app/assets/javascripts/jquery.bxslider.min.js | 10 + app/assets/javascripts/jquery.easing.1.3.js | 205 ++ app/assets/javascripts/jquery.lightSlider.js | 528 +++++ app/assets/javascripts/jquery.superslides.js | 656 ++++++ app/assets/javascripts/jquery.tagcanvas.js | 1822 +++++++++++++++++ app/assets/javascripts/lightbox.js | 411 ++++ app/assets/javascripts/welcome.js.coffee | 3 + app/assets/stylesheets/application.scss | 137 ++ app/assets/stylesheets/jquery.bxslider.css | 205 ++ app/assets/stylesheets/lightSlider.css | 154 ++ app/assets/stylesheets/lightbox.css | 210 ++ app/assets/stylesheets/superslides.css | 65 + app/assets/stylesheets/welcome.css.scss | 3 + app/controllers/application_controller.rb | 5 + app/controllers/concerns/.keep | 0 app/controllers/welcome_controller.rb | 11 + app/helpers/application_helper.rb | 2 + app/helpers/welcome_helper.rb | 2 + app/mailers/.keep | 0 app/models/.keep | 0 app/models/concerns/.keep | 0 app/views/.DS_Store | Bin 0 -> 6148 bytes app/views/layouts/application.html.haml | 25 + app/views/shared/_menu.haml | 17 + app/views/welcome/.DS_Store | Bin 0 -> 6148 bytes app/views/welcome/index.html.haml | 4 + bin/bundle | 3 + bin/rails | 8 + bin/rake | 8 + bin/spring | 18 + config.ru | 4 + config/application.rb | 23 + config/boot.rb | 4 + config/database.yml | 25 + config/deploy.rb | 138 ++ config/environment.rb | 5 + config/environments/development.rb | 37 + config/environments/production.rb | 82 + config/environments/test.rb | 39 + config/initializers/assets.rb | 8 + config/initializers/backtrace_silencers.rb | 7 + config/initializers/cookies_serializer.rb | 3 + .../initializers/filter_parameter_logging.rb | 4 + config/initializers/inflections.rb | 16 + config/initializers/mime_types.rb | 4 + config/initializers/session_store.rb | 3 + config/initializers/wrap_parameters.rb | 14 + config/locales/en.yml | 23 + config/nginx.conf | 28 + config/routes.rb | 58 + config/secrets.yml | 22 + config/unicorn.rb | 10 + config/unicorn_init_d | 64 + cristal-protect.png | Bin 0 -> 76424 bytes db/seeds.rb | 7 + lib/assets/.keep | 0 lib/tasks/.keep | 0 log/.keep | 0 public/.DS_Store | Bin 0 -> 8196 bytes public/404.html | 67 + public/422.html | 67 + public/500.html | 66 + public/Sans titre - 2.png | Bin 0 -> 27299 bytes public/ardoise.jpg | Bin 0 -> 338772 bytes public/arrow-next.png | Bin 0 -> 3234 bytes public/arrow-prev.png | Bin 0 -> 3212 bytes public/baseline.png | Bin 0 -> 34197 bytes public/controls.png | Bin 0 -> 2195 bytes public/cristal-protect.png | Bin 0 -> 65467 bytes public/favicon.ico | 0 public/ff+uv.png | Bin 0 -> 26201 bytes public/fond.jpg | Bin 0 -> 2340862 bytes public/fonts/.DS_Store | Bin 0 -> 6148 bytes public/fonts/FontAwesome.otf | Bin 0 -> 85908 bytes public/fonts/Stylograph/styl-webfont.eot | Bin 0 -> 32630 bytes public/fonts/Stylograph/styl-webfont.ttf | Bin 0 -> 62404 bytes public/fonts/Stylograph/styl-webfont.woff | Bin 0 -> 35612 bytes public/fonts/Stylograph/stylesheet.css | 14 + public/fonts/fontawesome-webfont.eot | Bin 0 -> 56006 bytes public/fonts/fontawesome-webfont.svg | 520 +++++ public/fonts/fontawesome-webfont.ttf | Bin 0 -> 112160 bytes public/fonts/fontawesome-webfont.woff | Bin 0 -> 65452 bytes public/logo-couleurs.png | Bin 0 -> 39945 bytes public/logo-min..png | Bin 0 -> 9828 bytes public/logo-min.png | Bin 0 -> 33317 bytes public/logo.png | Bin 0 -> 28869 bytes public/more.png | Bin 0 -> 8174 bytes public/more2.png | Bin 0 -> 3695 bytes public/my-strat.png | Bin 0 -> 65381 bytes public/nb.png | Bin 0 -> 18879 bytes public/robots.txt | 2 + public/secteur1.jpg | Bin 0 -> 897311 bytes public/secteur3.jpg | Bin 0 -> 117239 bytes public/secteur4.jpg | Bin 0 -> 162393 bytes public/sign - blanc.jpg | Bin 0 -> 74891 bytes public/sign - copie.png | Bin 0 -> 116515 bytes public/sign.jpg | Bin 0 -> 74816 bytes public/sign.png | Bin 0 -> 116515 bytes public/sign2.png | Bin 0 -> 109057 bytes public/sign3.png | Bin 0 -> 110462 bytes test/controllers/.keep | 0 test/controllers/welcome_controller_test.rb | 9 + test/fixtures/.keep | 0 test/helpers/.keep | 0 test/helpers/welcome_helper_test.rb | 4 + test/integration/.keep | 0 test/mailers/.keep | 0 test/models/.keep | 0 test/test_helper.rb | 10 + vendor/assets/javascripts/.keep | 0 vendor/assets/stylesheets/.keep | 0 127 files changed, 6559 insertions(+) create mode 100644 .DS_Store create mode 100644 .gitignore create mode 100644 Capfile create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 README.rdoc create mode 100644 Rakefile create mode 100644 app/.DS_Store create mode 100644 app/assets/.DS_Store create mode 100644 app/assets/images/.DS_Store create mode 100644 app/assets/images/.keep create mode 100644 app/assets/images/images/bx_loader.gif create mode 100644 app/assets/images/images/controls.png create mode 100644 app/assets/javascripts/application.coffee create mode 100644 app/assets/javascripts/application.coffee.old create mode 100755 app/assets/javascripts/jquery.animate-enhanced.min.js create mode 100644 app/assets/javascripts/jquery.bxslider.min.js create mode 100755 app/assets/javascripts/jquery.easing.1.3.js create mode 100755 app/assets/javascripts/jquery.lightSlider.js create mode 100755 app/assets/javascripts/jquery.superslides.js create mode 100644 app/assets/javascripts/jquery.tagcanvas.js create mode 100644 app/assets/javascripts/lightbox.js create mode 100644 app/assets/javascripts/welcome.js.coffee create mode 100644 app/assets/stylesheets/application.scss create mode 100644 app/assets/stylesheets/jquery.bxslider.css create mode 100755 app/assets/stylesheets/lightSlider.css create mode 100644 app/assets/stylesheets/lightbox.css create mode 100755 app/assets/stylesheets/superslides.css create mode 100644 app/assets/stylesheets/welcome.css.scss create mode 100644 app/controllers/application_controller.rb create mode 100644 app/controllers/concerns/.keep create mode 100644 app/controllers/welcome_controller.rb create mode 100644 app/helpers/application_helper.rb create mode 100644 app/helpers/welcome_helper.rb create mode 100644 app/mailers/.keep create mode 100644 app/models/.keep create mode 100644 app/models/concerns/.keep create mode 100644 app/views/.DS_Store create mode 100644 app/views/layouts/application.html.haml create mode 100644 app/views/shared/_menu.haml create mode 100644 app/views/welcome/.DS_Store create mode 100644 app/views/welcome/index.html.haml create mode 100755 bin/bundle create mode 100755 bin/rails create mode 100755 bin/rake create mode 100755 bin/spring create mode 100644 config.ru create mode 100644 config/application.rb create mode 100644 config/boot.rb create mode 100644 config/database.yml create mode 100644 config/deploy.rb create mode 100644 config/environment.rb create mode 100644 config/environments/development.rb create mode 100644 config/environments/production.rb create mode 100644 config/environments/test.rb create mode 100644 config/initializers/assets.rb create mode 100644 config/initializers/backtrace_silencers.rb create mode 100644 config/initializers/cookies_serializer.rb create mode 100644 config/initializers/filter_parameter_logging.rb create mode 100644 config/initializers/inflections.rb create mode 100644 config/initializers/mime_types.rb create mode 100644 config/initializers/session_store.rb create mode 100644 config/initializers/wrap_parameters.rb create mode 100644 config/locales/en.yml create mode 100644 config/nginx.conf create mode 100644 config/routes.rb create mode 100644 config/secrets.yml create mode 100644 config/unicorn.rb create mode 100755 config/unicorn_init_d create mode 100644 cristal-protect.png create mode 100644 db/seeds.rb create mode 100644 lib/assets/.keep create mode 100644 lib/tasks/.keep create mode 100644 log/.keep create mode 100644 public/.DS_Store create mode 100644 public/404.html create mode 100644 public/422.html create mode 100644 public/500.html create mode 100644 public/Sans titre - 2.png create mode 100644 public/ardoise.jpg create mode 100755 public/arrow-next.png create mode 100755 public/arrow-prev.png create mode 100644 public/baseline.png create mode 100755 public/controls.png create mode 100644 public/cristal-protect.png create mode 100644 public/favicon.ico create mode 100644 public/ff+uv.png create mode 100644 public/fond.jpg create mode 100644 public/fonts/.DS_Store create mode 100644 public/fonts/FontAwesome.otf create mode 100755 public/fonts/Stylograph/styl-webfont.eot create mode 100755 public/fonts/Stylograph/styl-webfont.ttf create mode 100755 public/fonts/Stylograph/styl-webfont.woff create mode 100755 public/fonts/Stylograph/stylesheet.css create mode 100644 public/fonts/fontawesome-webfont.eot create mode 100644 public/fonts/fontawesome-webfont.svg create mode 100644 public/fonts/fontawesome-webfont.ttf create mode 100644 public/fonts/fontawesome-webfont.woff create mode 100644 public/logo-couleurs.png create mode 100644 public/logo-min..png create mode 100644 public/logo-min.png create mode 100644 public/logo.png create mode 100644 public/more.png create mode 100644 public/more2.png create mode 100644 public/my-strat.png create mode 100644 public/nb.png create mode 100644 public/robots.txt create mode 100644 public/secteur1.jpg create mode 100644 public/secteur3.jpg create mode 100644 public/secteur4.jpg create mode 100644 public/sign - blanc.jpg create mode 100644 public/sign - copie.png create mode 100644 public/sign.jpg create mode 100644 public/sign.png create mode 100644 public/sign2.png create mode 100644 public/sign3.png create mode 100644 test/controllers/.keep create mode 100644 test/controllers/welcome_controller_test.rb create mode 100644 test/fixtures/.keep create mode 100644 test/helpers/.keep create mode 100644 test/helpers/welcome_helper_test.rb create mode 100644 test/integration/.keep create mode 100644 test/mailers/.keep create mode 100644 test/models/.keep create mode 100644 test/test_helper.rb create mode 100644 vendor/assets/javascripts/.keep create mode 100644 vendor/assets/stylesheets/.keep diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..89308e010f41bc16382952ab370dc25680fe47d7 GIT binary patch literal 10244 zcmeHNTWl0n82pE9yAzdCUgFC z{>wRMzVprB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=e4A|Fw7QMz{#L2>fRdz`Vw2V}zzV-LFgbuH8@9F1pyk{6@L7L#UYWA%Gg} ry`sHwB%8CZw&TL2XYr$4+Tql;!%6;29|PR|zq|iu|ETsq-v9pv>kn*B literal 0 HcmV?d00001 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a502e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal + +# Ignore all logfiles and tempfiles. +/log/*.log +/tmp diff --git a/Capfile b/Capfile new file mode 100644 index 0000000..d04de11 --- /dev/null +++ b/Capfile @@ -0,0 +1,4 @@ +load 'deploy' if respond_to?(:namespace) # cap2 differentiator +Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } + +load 'config/deploy' # remove this line to skip loading any of the default tasks \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..59b0683 --- /dev/null +++ b/Gemfile @@ -0,0 +1,46 @@ +source 'https://rubygems.org' + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '4.1.4' +# Use sqlite3 as the database for Active Record +gem 'sqlite3' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 4.0.3' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .js.coffee assets and views +gem 'coffee-rails', '~> 4.0.0' +# See https://github.com/sstephenson/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks +gem 'turbolinks' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.0' +# bundle exec rake doc:rails generates the API under doc/api. +gem 'sdoc', '~> 0.4.0', group: :doc + +# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring +gem 'spring', group: :development + +gem 'haml-rails' + +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use unicorn as the app server + gem 'unicorn' + +# Use Capistrano for deployment + +gem "capistrano", '2.15.5', group: :development +gem "rvm-capistrano",'1.4.1', group: :development +gem 'net-ssh', '~>2.7.0' + +gem "therubyracer" +# Use debugger +# gem 'debugger', group: [:development, :test] + diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..23978ed --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,165 @@ +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.1.4) + actionpack (= 4.1.4) + actionview (= 4.1.4) + mail (~> 2.5.4) + actionpack (4.1.4) + actionview (= 4.1.4) + activesupport (= 4.1.4) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + actionview (4.1.4) + activesupport (= 4.1.4) + builder (~> 3.1) + erubis (~> 2.7.0) + activemodel (4.1.4) + activesupport (= 4.1.4) + builder (~> 3.1) + activerecord (4.1.4) + activemodel (= 4.1.4) + activesupport (= 4.1.4) + arel (~> 5.0.0) + activesupport (4.1.4) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.1) + tzinfo (~> 1.1) + arel (5.0.1.20140414130214) + builder (3.2.2) + capistrano (2.15.5) + highline + net-scp (>= 1.0.0) + net-sftp (>= 2.0.0) + net-ssh (>= 2.0.14) + net-ssh-gateway (>= 1.1.0) + coffee-rails (4.0.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.3.0) + coffee-script-source + execjs + coffee-script-source (1.7.1) + erubis (2.7.0) + execjs (2.2.1) + haml (4.0.5) + tilt + haml-rails (0.5.3) + actionpack (>= 4.0.1) + activesupport (>= 4.0.1) + haml (>= 3.1, < 5.0) + railties (>= 4.0.1) + highline (1.6.21) + hike (1.2.3) + i18n (0.6.11) + jbuilder (2.1.3) + activesupport (>= 3.0.0, < 5) + multi_json (~> 1.2) + jquery-rails (3.1.1) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + json (1.8.1) + kgio (2.9.2) + libv8 (3.16.14.3) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.25.1) + minitest (5.4.0) + multi_json (1.10.1) + net-scp (1.2.1) + net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (2.7.0) + net-ssh-gateway (1.2.0) + net-ssh (>= 2.6.5) + polyglot (0.3.5) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rails (4.1.4) + actionmailer (= 4.1.4) + actionpack (= 4.1.4) + actionview (= 4.1.4) + activemodel (= 4.1.4) + activerecord (= 4.1.4) + activesupport (= 4.1.4) + bundler (>= 1.3.0, < 2.0) + railties (= 4.1.4) + sprockets-rails (~> 2.0) + railties (4.1.4) + actionpack (= 4.1.4) + activesupport (= 4.1.4) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + raindrops (0.13.0) + rake (10.3.2) + rdoc (4.1.1) + json (~> 1.4) + ref (1.0.5) + rvm-capistrano (1.4.1) + capistrano (>= 2.0.0) + sass (3.2.19) + sass-rails (4.0.3) + railties (>= 4.0.0, < 5.0) + sass (~> 3.2.0) + sprockets (~> 2.8, <= 2.11.0) + sprockets-rails (~> 2.0) + sdoc (0.4.1) + json (~> 1.7, >= 1.7.7) + rdoc (~> 4.0) + spring (1.1.3) + sprockets (2.11.0) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.1.3) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + sqlite3 (1.3.9) + therubyracer (0.12.1) + libv8 (~> 3.16.14.0) + ref + thor (0.19.1) + thread_safe (0.3.4) + tilt (1.4.1) + treetop (1.4.15) + polyglot + polyglot (>= 0.3.1) + turbolinks (2.2.2) + coffee-rails + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (2.5.3) + execjs (>= 0.3.0) + json (>= 1.8.0) + unicorn (4.8.3) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + +PLATFORMS + ruby + +DEPENDENCIES + capistrano (= 2.15.5) + coffee-rails (~> 4.0.0) + haml-rails + jbuilder (~> 2.0) + jquery-rails + net-ssh (~> 2.7.0) + rails (= 4.1.4) + rvm-capistrano (= 1.4.1) + sass-rails (~> 4.0.3) + sdoc (~> 0.4.0) + spring + sqlite3 + therubyracer + turbolinks + uglifier (>= 1.3.0) + unicorn diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..dd4e97e --- /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/Rakefile b/Rakefile new file mode 100644 index 0000000..ba6b733 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require File.expand_path('../config/application', __FILE__) + +Rails.application.load_tasks diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1ef056ff6477f6269eb5bf8e76a2ef79ddbfb35c GIT binary patch literal 6148 zcmeHK%}T>S5T5OyiGoH@&|7X^dWiVbqoLN57olPgR%&7j4V0!dsX5d_j{ZJ|=ri~v z`Zmt&F2z#4cn~Qw%j`EhJG0Av8+Nk*AgaS)8^8hp1C=mmV)czsKk1C*w1-g0F%pP_ z_^RtiQFkVq9siL5+Pe~X5Myb>m;J*Hg(6%-i0%|(KaKl-H}cW@;rF{?oH)+A$mI*g z(t=?wVp(1>FY28rttVbGjH}+@oLVPd(($!@il4>A_WZN3owlsC!>E^dVXr-q$zjmO zkY*$71yNd!hP@ze)|Imn21!Q_svV|*rDd&;Mo!t@bH-(RRH>l3yYGz0)|+W;ZtWZ# z`_awq-TlMk)ANhk06|M5SyeEpUndqD%m6dM49qtJ`W!Tt=6jjEI%a?w_yq%WKG>*) zuEtEEJUXzV-$&{%5R#xxZwW$MqpLAfh&?Dmr6Q_Sp`RE+rK8{0ajwQpp-KlKXU1{# z%tF6Vgq$7ywhRa1D&(3OU&)Wl vuC-AwQAsE+Q#eUMLte!gOIPs*suc9wWFWd4Gll3u;U57>16RzzpEB?XrMFo# literal 0 HcmV?d00001 diff --git a/app/assets/.DS_Store b/app/assets/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9c14e06fa04f78dce719e6607229b62cfdda617e GIT binary patch literal 6148 zcmeHKy-ve05VlK!1SAL&18m+{I+WjviKvu`1u2LQfFL0ijTB*C(it~Ofo-88ZDI^g$)Qfsz*sEJ5||E!t}_~ z&UzGPO*N=-*cMzT&O*1lvR)~P<@L>8Npvffa!IUhlzTnr)wULwR=0Kod3|$xcmMGC z^sLF|@LejIGuVe0FoxD0re|>g^Tvdsjw`Q~#4kxYR*7e=06hgo!MI%GAO#F{6hkZ?#S5THz%S4MbPeVj!2?1+0*VG| Jh=Ctv-~&>0U+4e; literal 0 HcmV?d00001 diff --git a/app/assets/images/.DS_Store b/app/assets/images/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b12e8ca86ece010a029b3a49734124f66a1b1871 GIT binary patch literal 6148 zcmeHK%}T>S5Zl3;ehE8S#u%@6!wO>#W6T0YEZER|BRGyaCI#a`VD@Gdxw773XFXuWqWA*!Ew~g&Yk658K-^}H#;gh3Y!qpIEms=W_8((!=&M9 z=SdW%Ej6ie*cLqJ&PuPhUagfxrMlfOi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_^!J9HJJRig><3fPoO&J%S58{<^Awck^j0?{P@yfUmAb3;8 zh3A8KWn2glyeZ?t^Fh2aE(8ePlyTwtAYK_40t9c$xbS=suZ#-;f;VMccs__%#)SaE zn^;`Q(U)d9H+)mJ0lpI3@%zTJ@O4@RlV4&7plJ#KEsFrSb01#61E5|Fz?Dh>sJ8(~ z5mwIc$^#(rhXPx6ng7()ud|$Mxp4hW+;`hgn8Irx^SXmX@TIV~*?;}cyt9{jzs&47y`#Nd`9{&4d)+VZ+O_NZea{lhFP>@5y7Y{t z>tfToug{(9pi@qsxzN47)AZu3+bP$^esHw()Z+T&%CTAJ@BT4iZdXq0(Nu8#{DLpa zyr2CzvAJr)Nbs-9$*(>=y(e#5%Eu>0R8B9f9Qxeqgxg7r#&;dpCtfZ*v%mV&3jR_< zO10*f2Wyf%<{jSQt9PC|cVTehUk065EUbEe%Hx-3?q0iZR#M9u|6|uT+D|q<^pbxI z3r?4GWVN3Ag<;sI>(?wDW}c;N*(#PF`P-A%PFy=tK64JETQ$71{7UM+qwbfMO?PTYCJ zUa;iG!NW;=&fdEC!-aPyPVLDC_X@x59=guO-<*H+^^>2x{l)j=f49DLdeftG=KQ?( z$@?7HOf-&LklFZhkLqXletme)3UkZKgwEXFHK&dnoFf`;aQ`^jegE?KdHZWur!;4+ z`)lvEO;bU0+vhdY>PPCYnD)Gty6o?#KJcdY7hO=>wbgdP0QotD>u za`K8XGrmb86JL9AMjrUp=tCnEw-P2K*er@PDQHkQXhJy15e|9>25o4u8gC^8{(-bd z@3bW5jgcgz%powLJqfBh02G@pbu_8-%4Vgc4n?oRhND|1ENw3O>Nm}U!S1~W*G%RfG$myd1 literal 0 HcmV?d00001 diff --git a/app/assets/javascripts/application.coffee b/app/assets/javascripts/application.coffee new file mode 100644 index 0000000..972a1b3 --- /dev/null +++ b/app/assets/javascripts/application.coffee @@ -0,0 +1,26 @@ + +#= require jquery +#= require jquery_ujs + +#= require jquery.easing.1.3 + + + +#= require jquery.bxslider.min + + +resize = -> + size = (($(window).height()-$("#logo").height())/ 2 - 20) + $("#logo").css + 'margin-top' : size+"px" + + + +$ -> + resize() + $(window).bind "resize", -> + resize() + + + + diff --git a/app/assets/javascripts/application.coffee.old b/app/assets/javascripts/application.coffee.old new file mode 100644 index 0000000..836f33a --- /dev/null +++ b/app/assets/javascripts/application.coffee.old @@ -0,0 +1,347 @@ + +#= require jquery +#= require jquery_ujs + +#= require jquery.easing.1.3 + + + +#= require jquery.bxslider.min + + +@scrollToAnchor = (aid) -> + aTag = $("#" + aid ) + $("html,body").animate({scrollTop: aTag.offset().top}, 1000) + return + + + + +bottom = 0 +prev_link = "" +$("document").ready -> + position_img_now = -> + + + + + + imgheight = $("#large .large-img").outerHeight() + $("#large h3").outerHeight() + + + + margintop = (( $(window).height() - imgheight) / 2 ) + + $("#large .large-img").css + "margin-top" :(margintop+"px") + #"width" : "100px" + + + + position_img = -> + $("#large .large-img").one "load", -> + + position_img_now() + + + + $("#rea-gal a").click -> + maxwidth = 1000 + maxheight = 900 + + + + + prev_link = $(this) + $("body").append "
" + title = false + + + $("#large").append "" + $("#large").append "" + $("#large").append "
" + $(".img_container.first").append "" + + if $(this).attr "title" + title = $(this).attr "title" + $(".img_container.first").append "

"+title+"

" + + $("#large .large-img").one "load", -> + $("#large").fadeIn(500) + position_img(); + if $(window).height() > (maxheight+100) + $("#large .large-img").css + "max-height" : maxheight + else + $("#large .large-img").css + "max-height" : "85%" + + if $(window).width() > (maxwidth+100) + $("#large .large-img").css + "max-width" : maxwidth + else + $("#large .large-img").css + "max-width" : "85%" + + position_img(); + + + false + + + + $("body").on "click", "#large", -> + $(this).fadeOut 300, -> + $(this).remove() + + + $("body").on "click" ,"#large .prev",-> + + if prev_link.prev("a").length > 0 + link = prev_link.closest("a").prev("a") + + + + else + link = prev_link.closest("div").children("a:last") + + + #titre = photo.find("h3") + $(".img_container.first").fadeOut 300, -> + $("#large h3").remove() + if link.attr "title" + title = link.attr "title" + $(".img_container.first").append "

"+title+"

" + + + $('#large .large-img').attr("src", link.attr("href")) + $("#large .large-img").one "load", -> + $(".img_container.first").fadeIn() + position_img(); + prev_link = link + + false + + + $("body").on "click" ,"#large .next",-> + + if prev_link.next("a").length > 0 + link = prev_link.closest("a").next("a") + + + + else + link = prev_link.closest("div").children("a:first") + + + #titre = photo.find("h3") + + $(".img_container.first").fadeOut 300, -> + $("#large h3").remove() + if link.attr "title" + title = link.attr "title" + $(".img_container.first").append "

"+title+"

" + + $('#large .large-img').attr("src", link.attr("href")) + $("#large .large-img").one "load", -> + $(".img_container.first").fadeIn() + position_img(); + prev_link = link + + false + + + $('.gal').bxSlider + adaptiveHeight: true, + auto: true, + speed:1000, + pause:5000, + + + + + + # $(".infos").hide(); + $(".infos-button").click -> + $(this).next(".infos").slideToggle() + $("html,body").animate({scrollTop: ($(this).offset().top-60)}, 500) + + left =0 + + top = 0 + offset= 0 + height = 0 + resize = -> + + $("#slider_content").each -> + + + height = ($(window).height()) + optimal_height = Math.round($(this).find(".bxslider").width()/ $(this).find(".bxslider").data("ratio")) + + if optimal_height < height + height = optimal_height + + $(this).find("li").css({"max-height": height+"px","height": height+"px"}) + img_height = Math.round($(this).find(".bxslider").width() / 1.5) + img_margin = Math.round((height - img_height)/ 2) + $(this).find("li img").css("margin-top", img_margin+"px") + + + + $(".slider").css({"height": (height)+"px","width": $(window).width()+"px" }) + $("#main").css("top",(height)) + $("#menu-container").css("top",(height-50)+"px") + $("#logo").one("load", -> + + + left = ($(window).width() - $("#logo").width()) / 2 + bottom = (height - $("#logo").height() - $("#baseline").height() - 40)/ 1.10 + $("#logo").css({"top": bottom+"px","left": left+"px"}) + + $("#baseline").css({"top": (bottom+$("#logo").height())+"px","left": left+"px"}) + + ).each -> + $(this).load() if @complete + return + + + $("#rea-gal img").css "width", ($(window).width() - 6 * 5 )/ 5 + +# $("#brainstorming").css({"min-height": ($(window).height())+"px","width": $(window).width()+"px" }) + + $("#myCanvas").attr({height: ($(window).height()-160),"width": ($(window).width()-2)+"px" }) + + + + + + + position_img_now(); + + + + + + + $("#brainstorming ul li").css("opacity", 0) + $("#realisations #rea-gal img").css("opacity", 0) + gal_imgs_show= [] + + $("#realisations #rea-gal img").each -> + gal_imgs_show.push $(this) + + + + + test = [] + $("#brainstorming ul li").each -> + test.push $(this) + test = test.sort -> + return .5 - Math.random() + + animate_brain = -> + animate_li_i = 0 + if !$("#brainstorming").hasClass "showing" + animate_li = -> + + + test[animate_li_i].animate({left:0,opacity : 1}, 800) + $("#brainstorming").addClass "showing" + if animate_li_i < (test.length-1) + animate_li_i = animate_li_i+1 + setTimeout(animate_li, 100) + + animate_li() + + un_animate_brain = -> + animate_li_i = 0 + if $("#brainstorming").hasClass "showing" + animate_li = -> + + + test[animate_li_i].animate({left:0,opacity : 0}, 700) + $("#brainstorming").removeClass "showing" + if animate_li_i < (test.length-1) + animate_li_i = animate_li_i+1 + setTimeout(animate_li, 100) + + animate_li() + + animate_realisation = -> + + if !$("#realisations #rea-gal").hasClass "showing" + $("#realisations #rea-gal").addClass "showing" + i_img = 0 + + + + animate_img = -> + + gal_imgs_show[i_img].animate({left:0,opacity : 1}, 400) + + if i_img < (gal_imgs_show.length-1) + i_img = i_img+1 + setTimeout(animate_img, 50) + + animate_img() + + $(window).on "scroll", -> + + top = $(window).scrollTop() + + #$(".wide-container").css("top", top-10) + + + if $(window).scrollTop() > (height-50) + $("#menu").css("position", "fixed") + else + $("#menu").css("position", "relative") + if $(window).scrollTop() > bottom-100 + $("#logo").fadeOut() + $("#baseline").fadeOut() + $("#logo-min").fadeIn() + + else if $(window).scrollTop() < bottom+100 + + $("#logo").fadeIn() + $("#baseline").fadeIn() + $("#logo-min").fadeOut() + + + if top > ($("#realisations").offset().top - $(window).height() / 2) + + + animate_realisation() + #$("#realisations #rea-gal").animate({left:0,opacity : 1}, 800, "swing") + + + + + + + if top > ($("#brainstorming").offset().top - $(window).height() / 2) + animate_brain() + + + + + if top < ($("#brainstorming").offset().top - $(window).height() / 2) + + un_animate_brain() + + resize() + + $('.bxslider').bxSlider + mode: 'fade' + captions: false + pager :false + auto: true + resize() + + $(window).on "resize", -> + resize() + + + + diff --git a/app/assets/javascripts/jquery.animate-enhanced.min.js b/app/assets/javascripts/jquery.animate-enhanced.min.js new file mode 100755 index 0000000..fac4379 --- /dev/null +++ b/app/assets/javascripts/jquery.animate-enhanced.min.js @@ -0,0 +1,22 @@ +/* +jquery.animate-enhanced plugin v1.02 +--- +http://github.com/benbarnett/jQuery-Animate-Enhanced +http://benbarnett.net +@benpbarnett +*/ +(function(d,J,K){function P(a,b,d,l,j,h,c,n,q){var t=!1;c=!0===c&&!0===n;b=b||{};b.original||(b.original={},t=!0);b.properties=b.properties||{};b.secondary=b.secondary||{};n=b.meta;for(var k=b.original,x=b.properties,Q=b.secondary,D=r.length-1;0<=D;D--){var F=r[D]+"transition-property",y=r[D]+"transition-duration",e=r[D]+"transition-timing-function";d=c?r[D]+"transform":d;t&&(k[F]=a.css(F)||"",k[y]=a.css(y)||"",k[e]=a.css(e)||"");Q[d]=c?!0===q||!0===G&&!1!==q&&L?"translate3d("+n.left+"px, "+n.top+ +"px, 0)":"translate("+n.left+"px,"+n.top+"px)":h;x[F]=(x[F]?x[F]+",":"")+d;x[y]=(x[y]?x[y]+",":"")+l+"ms";x[e]=(x[e]?x[e]+",":"")+j}return b}function B(a){for(var b in a)return!1;return!0}function R(a){a=a.toUpperCase();var b={LI:"list-item",TR:"table-row",TD:"table-cell",TH:"table-cell",CAPTION:"table-caption",COL:"table-column",COLGROUP:"table-column-group",TFOOT:"table-footer-group",THEAD:"table-header-group",TBODY:"table-row-group"};return"string"==typeof b[a]?b[a]:"block"}function H(a){return parseFloat(a.replace(a.match(/\D+$/), +""))}function M(a){var b=!0;a.each(function(a,d){return b=b&&d.ownerDocument});return b}var S="top right bottom left opacity height width".split(" "),I=["top","right","bottom","left"],r=["-webkit-","-moz-","-o-",""],T=["avoidTransforms","useTranslate3d","leaveTransforms"],U=/^([+-]=)?([\d+-.]+)(.*)$/,V=/([A-Z])/g,W={secondary:{},meta:{top:0,right:0,bottom:0,left:0}},N=null,C=!1,z=(document.body||document.documentElement).style,O=void 0!==z.WebkitTransition||void 0!==z.MozTransition||void 0!==z.OTransition|| +void 0!==z.transition,L="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix,G=L;d.expr&&d.expr.filters&&(N=d.expr.filters.animated,d.expr.filters.animated=function(a){return d(a).data("events")&&d(a).data("events")["webkitTransitionEnd oTransitionEnd transitionend"]?!0:N.call(this,a)});d.extend({toggle3DByDefault:function(){return G=!G},toggleDisabledByDefault:function(){return C=!C},setDisabledByDefault:function(a){return C=a}});d.fn.translation=function(){if(!this[0])return null;var a=window.getComputedStyle(this[0], +null),d={x:0,y:0};if(a)for(var p=r.length-1;0<=p;p--){var l=a.getPropertyValue(r[p]+"transform");if(l&&/matrix/i.test(l)){a=l.replace(/^matrix\(/i,"").split(/, |\)$/g);d={x:parseInt(a[4],10),y:parseInt(a[5],10)};break}}return d};d.fn.animate=function(a,b,p,l){a=a||{};var j=!("undefined"!==typeof a.bottom||"undefined"!==typeof a.right),h=d.speed(b,p,l),c=this,n=0,q=function(){n--;0===n&&"function"===typeof h.complete&&h.complete.apply(c,arguments)},t;if(!(t=!0===("undefined"!==typeof a.avoidCSSTransitions? +a.avoidCSSTransitions:C)))if(!(t=!O))if(!(t=B(a))){var k;a:{for(k in a)if(("width"==k||"height"==k)&&("show"==a[k]||"hide"==a[k]||"toggle"==a[k])){k=!0;break a}k=!1}t=k||0>=h.duration}return t?J.apply(this,arguments):this[!0===h.queue?"queue":"each"](function(){var b=d(this),c=d.extend({},h),l=function(c){var g=b.data("jQe")||{original:{}},f={};if(2==c.eventPhase){if(!0!==a.leaveTransforms){for(c=r.length-1;0<=c;c--)f[r[c]+"transform"]="";if(j&&"undefined"!==typeof g.meta){c=0;for(var e;e=I[c];++c)f[e]= +g.meta[e+"_o"]+"px",d(this).css(e,f[e])}}b.unbind("webkitTransitionEnd oTransitionEnd transitionend").css(g.original).css(f).data("jQe",null);"hide"===a.opacity&&b.css({display:"none",opacity:""});q.call(this)}},k={bounce:"cubic-bezier(0.0, 0.35, .5, 1.3)",linear:"linear",swing:"ease-in-out",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)", +easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)", +easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)", +easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)"},y={},k=k[c.easing||"swing"]?k[c.easing||"swing"]:c.easing||"swing",e;for(e in a)if(-1===d.inArray(e,T)){var p=-11)return this.each(function(){t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.length1||o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),r.data("origStyle",r.attr("style")),r.children(o.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),c()},c=function(){r.wrap('
'),o.viewport=r.parent(),o.loader=t('
'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?100*o.children.length+215+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),f(),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.viewport.parent().css({maxWidth:p()}),o.settings.pager||o.viewport.parent().css({margin:"0 auto 0px"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.css("width",u()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:o.settings.slideZIndex,display:"block"})),o.controls.el=t('
'),o.settings.captions&&P(),o.active.last=o.settings.startSlide==x()-1,o.settings.video&&r.fitVids();var e=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(e=o.children),o.settings.ticker?o.settings.pager=!1:(o.settings.pager&&T(),o.settings.controls&&C(),o.settings.auto&&o.settings.autoControls&&E(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),g(e,h)},g=function(e,i){var s=e.find("img, iframe").length;if(0==s)return i(),void 0;var n=0;e.find("img, iframe").each(function(){t(this).one("load",function(){++n==s&&i()}).each(function(){this.complete&&t(this).load()})})},h=function(){if(o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var e="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass("bx-clone"),s=o.children.slice(-e).clone().addClass("bx-clone");r.append(i).prepend(s)}o.loader.remove(),S(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(v()),r.redrawSlider(),o.settings.onSliderLoad(o.active.index),o.initialized=!0,o.settings.responsive&&t(window).bind("resize",Z),o.settings.auto&&o.settings.autoStart&&H(),o.settings.ticker&&L(),o.settings.pager&&q(o.settings.startSlide),o.settings.controls&&W(),o.settings.touchEnabled&&!o.settings.ticker&&O()},v=function(){var e=0,s=t();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var n=1==o.settings.moveSlides?o.active.index:o.active.index*m();for(s=o.children.eq(n),i=1;i<=o.settings.maxSlides-1;i++)s=n+i>=o.children.length?s.add(o.children.eq(i-1)):s.add(o.children.eq(n+i))}else s=o.children.eq(o.active.index);else s=o.children;return"vertical"==o.settings.mode?(s.each(function(){e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o.settings.minSlides-1))):e=Math.max.apply(Math,s.map(function(){return t(this).outerHeight(!1)}).get()),e},p=function(){var t="100%";return o.settings.slideWidth>0&&(t="horizontal"==o.settings.mode?o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin:o.settings.slideWidth),t},u=function(){var t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth||o.settings.slideWidth>e&&!o.carousel||"vertical"==o.settings.mode?t=e:o.settings.maxSlides>1&&"horizontal"==o.settings.mode&&(e>o.maxThreshold||e0)if(o.viewport.width()o.maxThreshold)t=o.settings.maxSlides;else{var e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.settings.mode&&(t=o.settings.minSlides);return t},x=function(){var t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/m();else for(var e=0,i=0;e0&&o.settings.moveSlides<=f()?o.settings.moveSlides:f()},S=function(){if(o.children.length>o.settings.maxSlides&&o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var t=o.children.last(),e=t.position();b(-(e.left-(o.viewport.width()-t.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();b(-e.top,"reset",0)}}else{var e=o.children.eq(o.active.index*m()).position();o.active.index==x()-1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?b(-e.left,"reset",0):"vertical"==o.settings.mode&&b(-e.top,"reset",0))}},b=function(t,e,i,s){if(o.usingCSS){var n="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?(r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),D()})):"reset"==e?r.css(o.animProp,n):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),b(s.resetValue,"reset",0),N()}))}else{var a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function(){D()}):"reset"==e?r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function(){b(s.resetValue,"reset",0),N()})}},w=function(){for(var e="",i=x(),s=0;i>s;s++){var n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(s),o.pagerEl.addClass("bx-custom-pager")):(n=s+1,o.pagerEl.addClass("bx-default-pager")),e+='"}o.pagerEl.html(e)},T=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('
'),o.settings.pagerSelector?t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),w()),o.pagerEl.on("click","a",I)},C=function(){o.controls.next=t(''+o.settings.nextText+""),o.controls.prev=t(''+o.settings.prevText+""),o.controls.next.bind("click",y),o.controls.prev.bind("click",z),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=t('
'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},E=function(){o.controls.start=t('"),o.controls.stop=t('"),o.controls.autoEl=t('
'),o.controls.autoEl.on("click",".bx-start",k),o.controls.autoEl.on("click",".bx-stop",M),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),A(o.settings.autoStart?"stop":"start")},P=function(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!=e&&(""+e).length&&t(this).append('
'+e+"
")})},y=function(t){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},z=function(t){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},k=function(t){r.startAuto(),t.preventDefault()},M=function(t){r.stopAuto(),t.preventDefault()},I=function(e){o.settings.auto&&r.stopAuto();var i=t(e.currentTarget),s=parseInt(i.attr("data-slide-index"));s!=o.active.index&&r.goToSlide(s),e.preventDefault()},q=function(e){var i=o.children.length;return"short"==o.settings.pagerType?(o.settings.maxSlides>1&&(i=Math.ceil(o.children.length/o.settings.maxSlides)),o.pagerEl.html(e+1+o.settings.pagerShortSeparator+i),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,s){t(s).find("a").eq(e).addClass("active")}),void 0)},D=function(){if(o.settings.infiniteLoop){var t="";0==o.active.index?t=o.children.eq(0).position():o.active.index==x()-1&&o.carousel?t=o.children.eq((x()-1)*m()).position():o.active.index==o.children.length-1&&(t=o.children.eq(o.children.length-1).position()),t&&("horizontal"==o.settings.mode?b(-t.left,"reset",0):"vertical"==o.settings.mode&&b(-t.top,"reset",0))}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},A=function(t){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[t]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},W=function(){1==x()?(o.controls.prev.addClass("disabled"),o.controls.next.addClass("disabled")):!o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==x()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))},H=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},L=function(){var e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-i.top}b(e,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)});var i=o.settings.speed/e,s="horizontal"==o.settings.mode?"left":"top",n=i*(e-Math.abs(parseInt(r.css(s))));N(n)}),N()},N=function(t){speed=t?t:o.settings.speed;var e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-clone").first().position():i=o.children.first().position();var s="horizontal"==o.settings.mode?-e.left:-e.top,n="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:n};b(s,"ticker",speed,a)},O=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",X)},X=function(t){if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.changedTouches[0].pageY,o.viewport.bind("touchmove",Y),o.viewport.bind("touchend",V)}},Y=function(t){var e=t.originalEvent,i=Math.abs(e.changedTouches[0].pageX-o.touch.start.x),s=Math.abs(e.changedTouches[0].pageY-o.touch.start.y);if(3*i>s&&o.settings.preventDefaultSwipeX?t.preventDefault():3*s>i&&o.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!=o.settings.mode&&o.settings.oneToOneTouch){var n=0;if("horizontal"==o.settings.mode){var r=e.changedTouches[0].pageX-o.touch.start.x;n=o.touch.originalPos.left+r}else{var r=e.changedTouches[0].pageY-o.touch.start.y;n=o.touch.originalPos.top+r}b(n,"reset",0)}},V=function(t){o.viewport.unbind("touchmove",Y);var e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.changedTouches[0].pageY,"fade"==o.settings.mode){var s=Math.abs(o.touch.start.x-o.touch.end.x);s>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var s=0;"horizontal"==o.settings.mode?(s=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(s=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&s>0||o.active.last&&0>s)?b(i,"reset",200):Math.abs(s)>=o.settings.swipeThreshold?(0>s?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):b(i,"reset",200)}o.viewport.unbind("touchend",V)},Z=function(){var e=t(window).width(),i=t(window).height();(a!=e||l!=i)&&(a=e,l=i,r.redrawSlider(),o.settings.onSliderResize.call(r,o.active.index))};return r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>e?x()-1:e>=x()?0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=x()-1,o.settings.pager&&q(o.active.index),o.settings.controls&&W(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",o.settings.slideZIndex+1).fadeIn(o.settings.speed,function(){t(this).css("zIndex",o.settings.slideZIndex),D()});else{o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed);var s=0,n={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);n=a.position(),s=o.viewport.width()-a.outerWidth()}else{var l=o.children.length-o.settings.minSlides;n=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-m():(x()-1)*m()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);n=a.position()}else if("next"==i&&0==o.active.index)n=r.find("> .bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var c=e*m();n=o.children.eq(c).position()}if("undefined"!=typeof n){var g="horizontal"==o.settings.mode?-(n.left-s):-n.top;b(g,"slide",o.settings.speed)}}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var t=parseInt(o.active.index)+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var t=parseInt(o.active.index)-1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=t&&A("stop"))},r.stopAuto=function(t){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=t&&A("start"))},r.getCurrentSlide=function(){return o.active.index},r.getCurrentSlideElement=function(){return o.children.eq(o.active.index)},r.getSlideCount=function(){return o.children.length},r.redrawSlider=function(){o.children.add(r.find(".bx-clone")).outerWidth(u()),o.viewport.css("height",v()),o.settings.ticker||S(),o.active.last&&(o.active.index=x()-1),o.active.index>=x()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(w(),q(o.active.index))},r.destroySlider=function(){o.initialized&&(o.initialized=!1,t(".bx-clone",this).remove(),o.children.each(function(){void 0!=t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!=t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.settings.controls&&o.pagerEl.remove(),t(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),o.settings.responsive&&t(window).unbind("resize",Z))},r.reloadSlider=function(t){void 0!=t&&(n=t),r.destroySlider(),d()},d(),this}}(jQuery); \ No newline at end of file diff --git a/app/assets/javascripts/jquery.easing.1.3.js b/app/assets/javascripts/jquery.easing.1.3.js new file mode 100755 index 0000000..ef74321 --- /dev/null +++ b/app/assets/javascripts/jquery.easing.1.3.js @@ -0,0 +1,205 @@ +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built in easing capabilities added In jQuery 1.1 + * to offer multiple easing options + * + * TERMS OF USE - jQuery Easing + * + * Open source under the BSD License. + * + * Copyright © 2008 George McGinley Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * +*/ + +// t: current time, b: begInnIng value, c: change In value, d: duration +jQuery.easing['jswing'] = jQuery.easing['swing']; + +jQuery.extend( jQuery.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert(jQuery.easing.default); + return jQuery.easing[jQuery.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); + +/* + * + * TERMS OF USE - EASING EQUATIONS + * + * Open source under the BSD License. + * + * Copyright © 2001 Robert Penner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ \ No newline at end of file diff --git a/app/assets/javascripts/jquery.lightSlider.js b/app/assets/javascripts/jquery.lightSlider.js new file mode 100755 index 0000000..aa38632 --- /dev/null +++ b/app/assets/javascripts/jquery.lightSlider.js @@ -0,0 +1,528 @@ +/** ========================================================== + +* jquery lightSlider.js v1.0.0 +* http://sachinchoolur.github.io/lightslider/ +* Released under the Apache License - http://opensource.org/licenses/Apache-2.0 + +=========================================================/**/ +; +(function ($, undefined) { + "use strict"; + var defaults = { + slideWidth: 270, + slideMargin: 0, + slideMove: 1, + minSlide: 1, + maxSlide: 8, + proportion:'', + mode: "slide", + useCSS: true, + speed: 1000, //ms' + easing: '', //'ex cubic-bezier(0.25, 0, 0.25, 1)',// + auto: false, + pause: 3000, + loop: true, + controls: true, + prevHtml: '', + nextHtml: '', + keyPress: true, + pager: true, + gallery: false, + thumbWidth: 50, + thumbMargin: 3, + currentPagerPosition: 'middle', + swipeThreshold: 40, + onBeforeStart: function () {}, + onSliderLoad: function () {}, + onBeforeSlide: function () {}, + onAfterSlide: function () {}, + onBeforeNextSlide: function () {}, + onBeforePrevSlide: function () {} + }; + $.fn.lightSlider = function (options) { + if(this.length > 1){ + this.each(function(){$(this).lightSlider(options)}); + return this; + } + var plugin = {}; + var settings = $.extend(true, {}, defaults, options); + var $el = this; + plugin.$el = this; + var $children = $el.children(), + length = 0, + w = 0, + on = false, + elWidth = 0, + $slide = '', + scene = 0, + pagerWidth = 0, + slideWidth = 0, + resize = false, + slideOn = false, + interval = '', + isTouch = ('ontouchstart' in document.documentElement); + var refresh = new Object(); + plugin = { + doCss: function () { + var support = function () { + var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; + var root = document.documentElement; + for (var i = 0; i < transition.length; i++) { + if (transition[i] in root.style) { + return true; + } + } + }; + if (settings.useCSS && support()) { + return true; + } + return false; + }, + keyPress: function () { + if (settings.keyPress === true) { + $(document).bind('keyup', function (e) { + if (e.keyCode === 37) { + $el.goToPrevSlide(); + clearInterval(interval); + } else if (e.keyCode === 39) { + $el.goToNextSlide(); + clearInterval(interval); + } + }); + } + }, + controls: function () { + if (settings.controls) { + $el.after(''); + var $prev = $slide.find('.csPrev'); + var $next = $slide.find('.csNext'); + $prev.bind('click', function () { + $el.goToPrevSlide(); + clearInterval(interval); + }); + $next.bind('click', function () { + $el.goToNextSlide(); + clearInterval(interval); + }); + if($children.length<=1){ + $('.csAction').hide(); + } + } + }, + initialStyle: function () { + $el.addClass('lightSlider').wrap("
"); + $slide = $el.parent('.csSlideWrapper'); + settings.onBeforeStart.call(this); + elWidth = $el.outerWidth(); + var min, max; + refresh.calSW = function () { + min = (elWidth - ((settings.minSlide * settings.slideMargin) - settings.slideMargin)) / settings.minSlide; + max = (elWidth - ((settings.maxSlide * settings.slideMargin) - settings.slideMargin)) / settings.maxSlide; + if (settings.slideWidth === '') { + slideWidth = min; + settings.slideMove = settings.minSlide; + } else if (min < settings.slideWidth) { + slideWidth = min; + settings.slideMove = settings.minSlide; + } else if (max > settings.slideWidth) { + slideWidth = max; + } else { + slideWidth = settings.slideWidth; + } + }; + refresh.sSW = function () { + length = $children.length; + w = length * (slideWidth + settings.slideMargin); + if (w % 1) { + w = w + 1; + } + $el.css('width', w + 'px'); + $children.css('width', slideWidth + 'px'); + $children.css({ + 'float': 'left', + 'margin-right': settings.slideMargin + 'px' + }); + }; + refresh.calL = function () { + $children = $el.children(); + length = $children.length; + }; + if (this.doCss()) { + $slide.addClass('usingCss'); + } + refresh.calL(); + $children.first().addClass('active'); + if (settings.mode === "slide") { + refresh.calSW(); + refresh.sSW(); + } else { + if(settings.proportion !== ''){ + $el.css({'height':'0px','padding-bottom':settings.proportion}); + }else{ + var height = $children.height(); + var proportion = (height * 100)/elWidth; + $el.css({'height':'0px','padding-bottom':proportion+'%'}); + } + $el.addClass('csFade'); + if (!this.doCss()) { + $children.not(".active").css('display', 'none'); + } + } + $slide.css({ + 'max-width': '100%', + 'position': 'relative' + }); + }, + pager: function () { + var $this = this; + refresh.createPager = function () { + var maxSlide = ''; + if (settings.mode === 'slide') { + maxSlide = parseInt(length / settings.slideMove); + var mod = length % settings.slideMove; + if (mod) { + maxSlide = maxSlide + 1; + } + } else { + maxSlide = length; + } + var i = 0, + pagers = '', + v = 0; + for (i = 0; i < maxSlide; i++) { + if (settings.mode === 'slide') { + v = i * ((slideWidth + settings.slideMargin) * settings.slideMove); + } + var thumb = $children.eq(i * settings.slideMove).attr('data-thumb'); + if (settings.gallery === true) { + pagers += '
  • '; + } else { + pagers += '
  • ' + (i + 1) + '
  • '; + } + if (settings.mode === 'slide') { + if ((v) >= w - elWidth - settings.slideMargin) { + i = i + 1; + if(i<=1){ + pagers = null; + } + break; + } + } + } + if(maxSlide<=1){ + pagers = null; + } + var $cSouter = $slide.parent(); + $cSouter.find('.csPager').html(pagers); + if (settings.gallery === true) { + pagerWidth = i * (settings.thumbMargin + settings.thumbWidth); + $cSouter.find('.csPager').css({ + 'width': pagerWidth + 'px', + 'transform': 'translate3d(0px, 0px, 0px)', + 'transition': '1s all' + }); + } + var $pager = $cSouter.find('.csPager').find('li'); + $pager.first().addClass('active'); + $pager.on('click', function () { + scene = $pager.index(this); + $el.mode(); + if (settings.gallery === true) { + $this.slideThumb(); + } + clearInterval(interval); + }); + }; + if (settings.pager) { + var cl = ''; + if (settings.gallery) { + cl = 'cSGallery'; + } else { + cl = 'cSpg'; + } + $slide.after('
      '); + refresh.createPager(); + } + settings.onSliderLoad.call(this); + }, + active: function (ob, t) { + if (this.doCss() && settings.mode === "fade") { + if (!$slide.hasClass('on')) { + $slide.addClass('on'); + } + } + var sc = 0; + if (scene * settings.slideMove < length) { + ob.removeClass('active'); + if (!this.doCss() && settings.mode === "fade" && t === false) { + ob.fadeOut(settings.speed); + } + t === true ? sc = scene : sc = scene * settings.slideMove; + if (t === true) { + var l = ob.length; + var nl = l - 1; + if (sc + 1 >= l) { + sc = nl; + } + } + if (!this.doCss() && settings.mode === "fade" && t === false) { + ob.eq(sc).fadeIn(settings.speed); + } + ob.eq(sc).addClass('active'); + } else { + ob.removeClass('active'); + ob.eq(ob.length - 1).addClass('active'); + if (!this.doCss() && settings.mode === "fade" && t === false) { + ob.fadeOut(settings.speed); + ob.eq(sc).fadeIn(settings.speed); + } + } + }, + move: function (ob, v) { + if (this.doCss()) { + ob.css('transform', 'translate3d(-' + v + 'px, 0px, 0px)'); + } else { + ob.css('position', 'relative').animate({ + left: -v + 'px' + }, settings.speed, settings.easing); + } + var $thumb = $slide.parent().find('.csPager').find('li'); + this.active($thumb, true); + }, + fade: function () { + this.active($children, false); + var $thumb = $slide.parent().find('.csPager').find('li'); + this.active($thumb, true); + }, + slide: function () { + var $this = this; + refresh.calSlide = function () { + var slideValue = scene * ((slideWidth + settings.slideMargin) * settings.slideMove); + $this.active($children, false); + if ((slideValue) > w - elWidth - settings.slideMargin) { + slideValue = w - elWidth - settings.slideMargin; + } else if (slideValue < 0) { + slideValue = 0; + } + $this.move($el, slideValue); + }; + refresh.calSlide(); + slideOn = true; + }, + slideThumb: function () { + var position; + switch (settings.currentPagerPosition) { + case 'left': + position = 0; + break; + case 'middle': + position = (elWidth / 2) - (settings.thumbWidth / 2); + break; + case 'right': + position = elWidth - settings.thumbWidth; + } + var thumbSlide = scene * ((settings.thumbWidth + settings.thumbMargin)) - (position); + if ((thumbSlide + elWidth) > pagerWidth) { + thumbSlide = pagerWidth - elWidth - settings.thumbMargin; + } + if (thumbSlide < 0) { + thumbSlide = 0; + } + var $pager = $slide.parent().find('.csPager'); + this.move($pager, thumbSlide); + }, + auto: function () { + if (settings.auto) { + interval = setInterval(function () { + $el.goToNextSlide(); + }, settings.pause); + } + }, + enableTouch: function () { + if (isTouch) { + var startCoords = {}, + endCoords = {}; + $slide.on('touchstart.lightSlider', function (e) { + endCoords = e.originalEvent.targetTouches[0]; + startCoords.pageX = e.originalEvent.targetTouches[0].pageX; + startCoords.pageY = e.originalEvent.targetTouches[0].pageY; + }); + $slide.on('touchmove.lightSlider', function (e) { + var orig = e.originalEvent; + endCoords = orig.targetTouches[0]; + var xMovement = Math.abs(endCoords.pageX - startCoords.pageX); + var yMovement = Math.abs(endCoords.pageY - startCoords.pageY); + if ((xMovement * 3) > yMovement) { + e.preventDefault(); + } + }); + $slide.on('touchend.lightSlider', function () { + var distance = endCoords.pageX - startCoords.pageX, + swipeThreshold = settings.swipeThreshold; + if (distance >= swipeThreshold) { + $el.goToPrevSlide(); + clearInterval(interval); + } else if (distance <= -swipeThreshold) { + $el.goToNextSlide(); + clearInterval(interval); + } + }); + } + }, + build: function () { + var $this = this; + $this.initialStyle(); + $this.auto(); + $this.enableTouch(); + $this.pager(); + $this.controls(); + $this.keyPress(); + } + }; + plugin.build(); + refresh.init = function () { + resize = true; + refresh.calL(); + if (settings.mode === "slide") { + $el.removeClass('csSlide'); + } + elWidth = $slide.outerWidth(); + if (settings.mode === "slide") { + refresh.calSW(); + refresh.sSW(); + } + setTimeout(function () { + if (resize === true) { + if (settings.mode === "slide") { + $el.addClass('csSlide'); + } + resize = false; + } + }, 1000); + if (settings.pager) { + refresh.createPager(); + } + if (settings.gallery === true) { + plugin.slideThumb(); + } + if (slideOn) { + refresh.calSlide(); + } + }; + $el.goToPrevSlide = function () { + if (scene > 0) { + settings.onBeforePrevSlide.call(this); + scene--; + $el.mode(); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } else { + if (settings.loop === true) { + settings.onBeforePrevSlide.call(this); + if(settings.mode==='slide'){ + var v = 0; + for (var i = 0; i < length; i++) { + v = i * ((slideWidth + settings.slideMargin) * settings.slideMove); + if ((v) >= w - elWidth - settings.slideMargin) { + break; + } + } + scene = i; + }else{ + var l = length; + l = l - 1; + scene = parseInt(l / settings.slideMove, 10); + } + $el.mode(); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } + } + }; + $el.goToNextSlide = function () { + var nextI = true; + if(settings.mode === 'slide'){ + var _slideValue = scene * ((slideWidth + settings.slideMargin) * settings.slideMove); + var nextI = _slideValue < w-elWidth-settings.slideMargin; + } + if (((scene * settings.slideMove) < length - settings.slideMove) && nextI) { + settings.onBeforeNextSlide.call(this); + scene++; + $el.mode(); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } else { + if (settings.loop === true) { + settings.onBeforeNextSlide.call(this); + scene = 0; + $el.mode(); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } + } + }; + $el.mode = function () { + if (on === false) { + if (settings.mode === "slide") { + if (plugin.doCss()) { + $el.addClass('csSlide'); + if (settings.speed !== '') { + $slide.css('transition-duration', settings.speed + 'ms'); + } + if (settings.easing !== '') { + $slide.css('transition-timing-function', settings.easing); + } + } + } else { + if (plugin.doCss()) { + if (settings.speed !== '') { + $el.css('transition-duration', settings.speed + 'ms'); + } + if (settings.easing !== '') { + $el.css('transition-timing-function', settings.easing); + } + } + } + } + settings.onBeforeSlide.call(this); + if (settings.mode === "slide") { + plugin.slide(); + } else { + plugin.fade(); + } + setTimeout(function () { + settings.onAfterSlide.call(this); + }, settings.speed); + on = true; + }; + $el.play = function () { + clearInterval(interval); + $el.goToNextSlide(); + interval = setInterval(function () { + $el.goToNextSlide(); + }, settings.pause); + }; + $el.pause = function(){ + clearInterval(interval); + }; + $el.refresh = function () { + refresh.init(); + }; + $el.getCurrentSlideCount = function () { + return scene + 1; + }; + $el.goToSlide = function (s) { + scene = s; + $el.mode(); + }; + $(window).on('resize', function (e) { + e.preventDefault(); + refresh.init(); + }); + return this; + }; +}(jQuery)); diff --git a/app/assets/javascripts/jquery.superslides.js b/app/assets/javascripts/jquery.superslides.js new file mode 100755 index 0000000..04d9eab --- /dev/null +++ b/app/assets/javascripts/jquery.superslides.js @@ -0,0 +1,656 @@ +/*! Superslides - v0.6.2 - 2013-07-10 +* https://github.com/nicinabox/superslides +* Copyright (c) 2013 Nic Aitch; Licensed MIT */ +(function(window, $) { + +var Superslides, plugin = 'superslides'; + +Superslides = function(el, options) { + this.options = $.extend({ + play: false, + animation_speed: 600, + animation_easing: 'swing', + animation: 'slide', + inherit_width_from: window, + inherit_height_from: window, + pagination: true, + hashchange: false, + scrollable: true, + elements: { + preserve: '.preserve', + nav: '.slides-navigation', + container: '.slides-container', + pagination: '.slides-pagination' + } + }, options); + + var that = this, + $control = $('
      ', { "class": 'slides-control' }), + multiplier = 1; + + this.$el = $(el); + this.$container = this.$el.find(this.options.elements.container); + + // Private Methods + var initialize = function() { + multiplier = that._findMultiplier(); + + that.$el.on('click', that.options.elements.nav + " a", function(e) { + e.preventDefault(); + + that.stop(); + if ($(this).hasClass('next')) { + that.animate('next', function() { + that.start(); + }); + } else { + that.animate('prev', function() { + that.start(); + }); + } + }); + + $(document).on('keyup', function(e) { + if (e.keyCode === 37) { + that.animate('prev'); + } + if (e.keyCode === 39) { + that.animate('next'); + } + }); + + $(window).on('resize', function() { + setTimeout(function() { + var $children = that.$container.children(); + + that.width = that._findWidth(); + that.height = that._findHeight(); + + $children.css({ + width: that.width, + left: that.width + }); + + that.css.containers(); + that.css.images(); + }, 10); + }); + + $(window).on('hashchange', function() { + var hash = that._parseHash(), index; + + if (hash && !isNaN(hash)) { + // Minus 1 here because we don't want the url + // to be zero-indexed + index = that._upcomingSlide(hash - 1); + + } else { + index = that._upcomingSlide(hash); + } + + if (index >= 0 && index !== that.current) { + that.animate(index); + } + }); + + that.pagination._events(); + + that.start(); + return that; + }; + +var css = { + containers: function() { + if (that.init) { + that.$el.css({ + height: that.height + }); + + that.$control.css({ + width: that.width * multiplier, + left: -that.width + }); + + that.$container.css({ + + }); + } else { + $('body').css({ + margin: 0 + }); + + that.$el.css({ + position: 'relative', + overflow: 'hidden', + width: '100%', + height: that.height + }); + + that.$control.css({ + position: 'relative', + transform: 'translate3d(0)', + height: '100%', + width: that.width * multiplier, + left: -that.width + }); + + that.$container.css({ + display: 'none', + margin: '0', + padding: '0', + listStyle: 'none', + position: 'relative', + height: '100%' + }); + } + + if (that.size() === 1) { + that.$el.find(that.options.elements.nav).hide(); + } + }, + images: function() { + var $images = that.$container.find('img') + .not(that.options.elements.preserve) + + $images.removeAttr('width').removeAttr('height') + .css({ + "-webkit-backface-visibility": 'hidden', + "-ms-interpolation-mode": 'bicubic', + "position": 'absolute', + "left": '0', + "top": '0', + "z-index": '-1', + "max-width": 'none' + }); + + $images.each(function() { + var image_aspect_ratio = that.image._aspectRatio(this), + image = this; + + if (!$.data(this, 'processed')) { + var img = new Image(); + img.onload = function() { + that.image._scale(image, image_aspect_ratio); + that.image._center(image, image_aspect_ratio); + $.data(image, 'processed', true); + }; + img.src = this.src; + + } else { + that.image._scale(image, image_aspect_ratio); + that.image._center(image, image_aspect_ratio); + } + }); + }, + children: function() { + var $children = that.$container.children(); + + if ($children.is('img')) { + $children.each(function() { + if ($(this).is('img')) { + $(this).wrap('
      '); + + // move id attribute + var id = $(this).attr('id'); + $(this).removeAttr('id'); + $(this).parent().attr('id', id); + } + }); + + $children = that.$container.children(); + } + + if (!that.init) { + $children.css({ + display: 'none', + left: that.width * 2 + }); + } + + $children.css({ + position: 'absolute', + overflow: 'hidden', + height: '100%', + width: that.width, + top: 0, + zIndex: 0 + }); + + } +} + +var fx = { + slide: function(orientation, complete) { + var $children = that.$container.children(), + $target = $children.eq(orientation.upcoming_slide); + + $target.css({ + left: orientation.upcoming_position, + display: 'block' + }); + + that.$control.animate({ + left: orientation.offset + }, + that.options.animation_speed, + that.options.animation_easing, + function() { + if (that.size() > 1) { + that.$control.css({ + left: -that.width + }); + + $children.eq(orientation.upcoming_slide).css({ + left: that.width, + zIndex: 2 + }); + + if (orientation.outgoing_slide >= 0) { + $children.eq(orientation.outgoing_slide).css({ + left: that.width, + display: 'none', + zIndex: 0 + }); + } + } + + complete(); + }); + }, + fade: function(orientation, complete) { + var that = this, + $children = that.$container.children(), + $outgoing = $children.eq(orientation.outgoing_slide), + $target = $children.eq(orientation.upcoming_slide); + + $target.css({ + left: this.width, + opacity: 1, + display: 'block' + }); + + if (orientation.outgoing_slide >= 0) { + $outgoing.animate({ + opacity: 0 + }, + that.options.animation_speed, + that.options.animation_easing, + function() { + if (that.size() > 1) { + $children.eq(orientation.upcoming_slide).css({ + zIndex: 2 + }); + + if (orientation.outgoing_slide >= 0) { + $children.eq(orientation.outgoing_slide).css({ + opacity: 1, + display: 'none', + zIndex: 0 + }); + } + } + + complete(); + }); + } else { + $target.css({ + zIndex: 2 + }); + complete(); + } + } +}; + +fx = $.extend(fx, $.fn.superslides.fx); + +var image = { + _centerY: function(image) { + var $img = $(image); + + $img.css({ + top: (that.height - $img.height()) / 2 + }); + }, + _centerX: function(image) { + var $img = $(image); + + $img.css({ + left: (that.width - $img.width()) / 2 + }); + }, + _center: function(image) { + that.image._centerX(image); + that.image._centerY(image); + }, + _aspectRatio: function(image) { + if (!image.naturalHeight && !image.naturalWidth) { + var img = new Image(); + img.src = image.src; + image.naturalHeight = img.height; + image.naturalWidth = img.width; + } + + return image.naturalHeight / image.naturalWidth; + }, + _scale: function(image, image_aspect_ratio) { + image_aspect_ratio = image_aspect_ratio || that.image._aspectRatio(image); + + var container_aspect_ratio = that.height / that.width, + $img = $(image); + + if (container_aspect_ratio > image_aspect_ratio) { + $img.css({ + height: that.height, + width: that.height / image_aspect_ratio + }); + + } else { + $img.css({ + height: that.width * image_aspect_ratio, + width: that.width + }); + } + } +}; + +var pagination = { + _setCurrent: function(i) { + if (!that.$pagination) { return; } + + var $pagination_children = that.$pagination.children(); + + $pagination_children.removeClass('current'); + $pagination_children.eq(i) + .addClass('current'); + }, + _addItem: function(i) { + var slide_number = i + 1, + href = slide_number, + $slide = that.$container.children().eq(i), + slide_id = $slide.attr('id'); + + if (slide_id) { + href = slide_id; + } + + var $item = $("", { + 'href': "#" + href, + 'text': href + }); + + $item.appendTo(that.$pagination); + }, + _setup: function() { + if (!that.options.pagination || that.size() === 1) { return; } + + var $pagination = $("