spree_slider 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/.gitignore +2 -1
  2. data/Gemfile +13 -6
  3. data/Versionfile +1 -9
  4. data/app/models/spree/slide.rb +1 -1
  5. data/app/overrides/spree/admin/configurations/index/add_slides_to_admin_configurations_menu.html.erb.deface +5 -0
  6. data/app/overrides/spree/admin/shared/_configuration_menu/add_slides_to_admin_configurations_sidebar_menu.html.erb.deface +2 -0
  7. data/app/overrides/spree/home/index/add_slider.html.erb.deface +4 -0
  8. data/app/overrides/spree/layouts/spree_application/add_slider.html.erb.deface +2 -0
  9. data/app/views/spree/admin/slides/_form.html.erb +4 -1
  10. data/app/views/spree/admin/slides/index.html.erb +2 -0
  11. data/app/views/spree/admin/slides/show.html.erb +6 -0
  12. data/config/locales/de.yml +3 -0
  13. data/config/locales/en.yml +2 -4
  14. data/config/locales/es.yml +3 -0
  15. data/config/locales/nl-NL.yml +3 -0
  16. data/config/locales/nl.yml +3 -0
  17. data/db/migrate/20120816192758_add_position_to_slides.rb +5 -0
  18. data/lib/generators/spree_slider/install_simple_carousel_generator.rb +30 -0
  19. data/lib/generators/spree_slider/templates/anything_slider.html.erb +1 -1
  20. data/lib/generators/spree_slider/templates/nivo_slider.html.erb +2 -2
  21. data/lib/generators/spree_slider/templates/simple_carousel_slider.html.erb +15 -0
  22. data/lib/spree_slider/engine.rb +2 -3
  23. data/spec/spec_helper.rb +12 -23
  24. data/spree_slider.gemspec +2 -8
  25. data/vendor/assets/simple-carousel/readme.txt +6 -0
  26. data/vendor/assets/simple-carousel/simple.carousel.js +144 -0
  27. data/vendor/assets/simple-carousel/simple.carousel.slider.js +14 -0
  28. metadata +18 -88
  29. data/Gemfile.lock +0 -175
  30. data/app/overrides/add_slider_to_layout.rb +0 -8
  31. data/app/overrides/add_slides_to_admin_configurations_menu.rb +0 -9
  32. data/app/overrides/add_slides_to_admin_configurations_sidebar_menu.rb +0 -7
  33. data/app/views/spree/home/index.html.erb +0 -14
  34. data/vendor/assets/anything-slider/demos.html +0 -740
  35. data/vendor/assets/anything-slider/demos/colorbox/border.png +0 -0
  36. data/vendor/assets/anything-slider/demos/colorbox/colorbox.css +0 -62
  37. data/vendor/assets/anything-slider/demos/colorbox/controls.png +0 -0
  38. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomCenter.png +0 -0
  39. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomLeft.png +0 -0
  40. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomRight.png +0 -0
  41. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderMiddleLeft.png +0 -0
  42. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderMiddleRight.png +0 -0
  43. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopCenter.png +0 -0
  44. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopLeft.png +0 -0
  45. data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopRight.png +0 -0
  46. data/vendor/assets/anything-slider/demos/colorbox/jquery.colorbox-min.js +0 -4
  47. data/vendor/assets/anything-slider/demos/colorbox/jquery.colorbox.js +0 -769
  48. data/vendor/assets/anything-slider/demos/colorbox/loading.gif +0 -0
  49. data/vendor/assets/anything-slider/demos/colorbox/loading_background.png +0 -0
  50. data/vendor/assets/anything-slider/demos/colorbox/overlay.png +0 -0
  51. data/vendor/assets/anything-slider/demos/css/page.css +0 -148
  52. data/vendor/assets/anything-slider/demos/images/251356.jpg +0 -0
  53. data/vendor/assets/anything-slider/demos/images/apple-touch-icon.png +0 -0
  54. data/vendor/assets/anything-slider/demos/images/favicon.ico +0 -0
  55. data/vendor/assets/anything-slider/demos/images/slide-civil-1.jpg +0 -0
  56. data/vendor/assets/anything-slider/demos/images/slide-civil-2.jpg +0 -0
  57. data/vendor/assets/anything-slider/demos/images/slide-env-1.jpg +0 -0
  58. data/vendor/assets/anything-slider/demos/images/slide-env-2.jpg +0 -0
  59. data/vendor/assets/anything-slider/demos/images/slide-tele-1.jpg +0 -0
  60. data/vendor/assets/anything-slider/demos/images/slide-tele-2.jpg +0 -0
  61. data/vendor/assets/anything-slider/demos/images/th-slide-civil-1.jpg +0 -0
  62. data/vendor/assets/anything-slider/demos/images/th-slide-civil-2.jpg +0 -0
  63. data/vendor/assets/anything-slider/demos/images/th-slide-env-1.jpg +0 -0
  64. data/vendor/assets/anything-slider/demos/images/th-slide-env-2.jpg +0 -0
  65. data/vendor/assets/anything-slider/demos/js/demo.js +0 -132
  66. data/vendor/assets/anything-slider/demos/video/movie.mp4 +0 -0
  67. data/vendor/assets/anything-slider/demos/video/movie.ogg +0 -0
  68. data/vendor/assets/anything-slider/demos/video/movie.webm +0 -0
  69. data/vendor/assets/anything-slider/expand.html +0 -97
  70. data/vendor/assets/anything-slider/index.html +0 -470
  71. data/vendor/assets/anything-slider/simple.html +0 -79
  72. data/vendor/assets/anything-slider/video.html +0 -341
  73. data/vendor/assets/nivo-slider/demo/demo.html +0 -39
  74. data/vendor/assets/nivo-slider/demo/images/dev7logo.png +0 -0
  75. data/vendor/assets/nivo-slider/demo/images/nemo.jpg +0 -0
  76. data/vendor/assets/nivo-slider/demo/images/toystory.jpg +0 -0
  77. data/vendor/assets/nivo-slider/demo/images/up.jpg +0 -0
  78. data/vendor/assets/nivo-slider/demo/images/walle.jpg +0 -0
  79. data/vendor/assets/nivo-slider/demo/scripts/jquery-1.6.1.min.js +0 -18
  80. data/vendor/assets/nivo-slider/demo/style.css +0 -100
@@ -0,0 +1,14 @@
1
+ /* Slideshow Control */
2
+ $(document).ready(function() {
3
+ $(".slider.regular").simplecarousel({
4
+ width: 705,
5
+ height: 390,
6
+ visible: 1,
7
+ auto: 8000,
8
+ next: $('.slider-next'),
9
+ prev: $('.slider-prev'),
10
+ pagination: false,
11
+ layout: "regular",
12
+ fade: true
13
+ });
14
+ });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_slider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,56 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-14 00:00:00.000000000 Z
12
+ date: 2012-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: 1.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 1.1.0
30
- - !ruby/object:Gem::Dependency
31
- name: ffaker
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
- prerelease: false
40
24
  version_requirements: !ruby/object:Gem::Requirement
41
25
  none: false
42
26
  requirements:
43
27
  - - ! '>='
44
28
  - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: sqlite3
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
29
+ version: 1.1.0
62
30
  description: Adds a slider to the homepage
63
31
  email: priviterag@gmail.com
64
32
  executables: []
@@ -68,29 +36,35 @@ files:
68
36
  - .gitignore
69
37
  - .rspec
70
38
  - Gemfile
71
- - Gemfile.lock
72
39
  - LICENSE
73
40
  - README.textile
74
41
  - Rakefile
75
42
  - Versionfile
76
43
  - app/controllers/spree/admin/slides_controller.rb
77
44
  - app/models/spree/slide.rb
78
- - app/overrides/add_slider_to_layout.rb
79
- - app/overrides/add_slides_to_admin_configurations_menu.rb
80
- - app/overrides/add_slides_to_admin_configurations_sidebar_menu.rb
45
+ - app/overrides/spree/admin/configurations/index/add_slides_to_admin_configurations_menu.html.erb.deface
46
+ - app/overrides/spree/admin/shared/_configuration_menu/add_slides_to_admin_configurations_sidebar_menu.html.erb.deface
47
+ - app/overrides/spree/home/index/add_slider.html.erb.deface
48
+ - app/overrides/spree/layouts/spree_application/add_slider.html.erb.deface
81
49
  - app/views/spree/admin/slides/_form.html.erb
82
50
  - app/views/spree/admin/slides/edit.html.erb
83
51
  - app/views/spree/admin/slides/index.html.erb
84
52
  - app/views/spree/admin/slides/new.html.erb
85
53
  - app/views/spree/admin/slides/show.html.erb
86
- - app/views/spree/home/index.html.erb
54
+ - config/locales/de.yml
87
55
  - config/locales/en.yml
56
+ - config/locales/es.yml
57
+ - config/locales/nl-NL.yml
58
+ - config/locales/nl.yml
88
59
  - config/routes.rb
89
60
  - db/migrate/20120222184238_create_slides.rb
61
+ - db/migrate/20120816192758_add_position_to_slides.rb
90
62
  - lib/generators/spree_slider/install_anything_generator.rb
91
63
  - lib/generators/spree_slider/install_nivo_generator.rb
64
+ - lib/generators/spree_slider/install_simple_carousel_generator.rb
92
65
  - lib/generators/spree_slider/templates/anything_slider.html.erb
93
66
  - lib/generators/spree_slider/templates/nivo_slider.html.erb
67
+ - lib/generators/spree_slider/templates/simple_carousel_slider.html.erb
94
68
  - lib/spree_slider.rb
95
69
  - lib/spree_slider/engine.rb
96
70
  - script/rails
@@ -104,48 +78,11 @@ files:
104
78
  - vendor/assets/anything-slider/css/theme-metallic.css
105
79
  - vendor/assets/anything-slider/css/theme-minimalist-round.css
106
80
  - vendor/assets/anything-slider/css/theme-minimalist-square.css
107
- - vendor/assets/anything-slider/demos.html
108
- - vendor/assets/anything-slider/demos/colorbox/border.png
109
- - vendor/assets/anything-slider/demos/colorbox/colorbox.css
110
- - vendor/assets/anything-slider/demos/colorbox/controls.png
111
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomCenter.png
112
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomLeft.png
113
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomRight.png
114
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderMiddleLeft.png
115
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderMiddleRight.png
116
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopCenter.png
117
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopLeft.png
118
- - vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopRight.png
119
- - vendor/assets/anything-slider/demos/colorbox/jquery.colorbox-min.js
120
- - vendor/assets/anything-slider/demos/colorbox/jquery.colorbox.js
121
- - vendor/assets/anything-slider/demos/colorbox/loading.gif
122
- - vendor/assets/anything-slider/demos/colorbox/loading_background.png
123
- - vendor/assets/anything-slider/demos/colorbox/overlay.png
124
- - vendor/assets/anything-slider/demos/css/page.css
125
- - vendor/assets/anything-slider/demos/images/251356.jpg
126
- - vendor/assets/anything-slider/demos/images/apple-touch-icon.png
127
- - vendor/assets/anything-slider/demos/images/favicon.ico
128
- - vendor/assets/anything-slider/demos/images/slide-civil-1.jpg
129
- - vendor/assets/anything-slider/demos/images/slide-civil-2.jpg
130
- - vendor/assets/anything-slider/demos/images/slide-env-1.jpg
131
- - vendor/assets/anything-slider/demos/images/slide-env-2.jpg
132
- - vendor/assets/anything-slider/demos/images/slide-tele-1.jpg
133
- - vendor/assets/anything-slider/demos/images/slide-tele-2.jpg
134
- - vendor/assets/anything-slider/demos/images/th-slide-civil-1.jpg
135
- - vendor/assets/anything-slider/demos/images/th-slide-civil-2.jpg
136
- - vendor/assets/anything-slider/demos/images/th-slide-env-1.jpg
137
- - vendor/assets/anything-slider/demos/images/th-slide-env-2.jpg
138
- - vendor/assets/anything-slider/demos/js/demo.js
139
- - vendor/assets/anything-slider/demos/video/movie.mp4
140
- - vendor/assets/anything-slider/demos/video/movie.ogg
141
- - vendor/assets/anything-slider/demos/video/movie.webm
142
- - vendor/assets/anything-slider/expand.html
143
81
  - vendor/assets/anything-slider/images/arrows-metallic.png
144
82
  - vendor/assets/anything-slider/images/arrows-minimalist.png
145
83
  - vendor/assets/anything-slider/images/construction.gif
146
84
  - vendor/assets/anything-slider/images/cs-portfolio.png
147
85
  - vendor/assets/anything-slider/images/default.png
148
- - vendor/assets/anything-slider/index.html
149
86
  - vendor/assets/anything-slider/js/jquery.anythingslider.fx.js
150
87
  - vendor/assets/anything-slider/js/jquery.anythingslider.fx.min.js
151
88
  - vendor/assets/anything-slider/js/jquery.anythingslider.js
@@ -156,17 +93,7 @@ files:
156
93
  - vendor/assets/anything-slider/js/jquery.min.js
157
94
  - vendor/assets/anything-slider/js/swfobject.js
158
95
  - vendor/assets/anything-slider/license.txt
159
- - vendor/assets/anything-slider/simple.html
160
- - vendor/assets/anything-slider/video.html
161
96
  - vendor/assets/nivo-slider/README
162
- - vendor/assets/nivo-slider/demo/demo.html
163
- - vendor/assets/nivo-slider/demo/images/dev7logo.png
164
- - vendor/assets/nivo-slider/demo/images/nemo.jpg
165
- - vendor/assets/nivo-slider/demo/images/toystory.jpg
166
- - vendor/assets/nivo-slider/demo/images/up.jpg
167
- - vendor/assets/nivo-slider/demo/images/walle.jpg
168
- - vendor/assets/nivo-slider/demo/scripts/jquery-1.6.1.min.js
169
- - vendor/assets/nivo-slider/demo/style.css
170
97
  - vendor/assets/nivo-slider/jquery.nivo.slider.js
171
98
  - vendor/assets/nivo-slider/jquery.nivo.slider.pack.js
172
99
  - vendor/assets/nivo-slider/license.txt
@@ -190,6 +117,9 @@ files:
190
117
  - vendor/assets/nivo-slider/themes/pascal/readme.txt
191
118
  - vendor/assets/nivo-slider/themes/pascal/ribbon.png
192
119
  - vendor/assets/nivo-slider/themes/pascal/slider.png
120
+ - vendor/assets/simple-carousel/readme.txt
121
+ - vendor/assets/simple-carousel/simple.carousel.js
122
+ - vendor/assets/simple-carousel/simple.carousel.slider.js
193
123
  homepage: https://github.com/priviterag/spree_slider
194
124
  licenses: []
195
125
  post_install_message:
@@ -1,175 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- spree_slider (1.0.1)
5
- spree_core (~> 1.1.0.rc1)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (3.2.3)
11
- actionpack (= 3.2.3)
12
- mail (~> 2.4.4)
13
- actionpack (3.2.3)
14
- activemodel (= 3.2.3)
15
- activesupport (= 3.2.3)
16
- builder (~> 3.0.0)
17
- erubis (~> 2.7.0)
18
- journey (~> 1.0.1)
19
- rack (~> 1.4.0)
20
- rack-cache (~> 1.2)
21
- rack-test (~> 0.6.1)
22
- sprockets (~> 2.1.2)
23
- active_utils (1.0.3)
24
- activesupport (>= 2.3.11)
25
- i18n
26
- activemerchant (1.20.4)
27
- active_utils (>= 1.0.2)
28
- activesupport (>= 2.3.11)
29
- braintree (>= 2.0.0)
30
- builder (>= 2.0.0)
31
- i18n
32
- json (>= 1.5.1)
33
- money (<= 3.7.1)
34
- activemodel (3.2.3)
35
- activesupport (= 3.2.3)
36
- builder (~> 3.0.0)
37
- activerecord (3.2.3)
38
- activemodel (= 3.2.3)
39
- activesupport (= 3.2.3)
40
- arel (~> 3.0.2)
41
- tzinfo (~> 0.3.29)
42
- activeresource (3.2.3)
43
- activemodel (= 3.2.3)
44
- activesupport (= 3.2.3)
45
- activesupport (3.2.3)
46
- i18n (~> 0.6)
47
- multi_json (~> 1.0)
48
- acts_as_list (0.1.4)
49
- arel (3.0.2)
50
- aws-sdk (1.3.9)
51
- httparty (~> 0.7)
52
- json (~> 1.4)
53
- nokogiri (>= 1.4.4)
54
- uuidtools (~> 2.1)
55
- braintree (2.16.0)
56
- builder (>= 2.0.0)
57
- builder (3.0.0)
58
- cocaine (0.2.1)
59
- columnize (0.3.6)
60
- deface (0.8.0)
61
- nokogiri (~> 1.5.0)
62
- rails (>= 3.0.9)
63
- erubis (2.7.0)
64
- ffaker (1.12.1)
65
- highline (1.6.11)
66
- hike (1.2.1)
67
- httparty (0.8.2)
68
- multi_json
69
- multi_xml
70
- i18n (0.6.0)
71
- journey (1.0.3)
72
- jquery-rails (2.0.2)
73
- railties (>= 3.2.0, < 5.0)
74
- thor (~> 0.14)
75
- json (1.6.6)
76
- kaminari (0.13.0)
77
- actionpack (>= 3.0.0)
78
- activesupport (>= 3.0.0)
79
- railties (>= 3.0.0)
80
- linecache (0.46)
81
- rbx-require-relative (> 0.0.4)
82
- mail (2.4.4)
83
- i18n (>= 0.4.0)
84
- mime-types (~> 1.16)
85
- treetop (~> 1.4.8)
86
- mime-types (1.18)
87
- money (3.7.1)
88
- i18n (~> 0.4)
89
- multi_json (1.3.2)
90
- multi_xml (0.4.4)
91
- nested_set (1.7.0)
92
- activerecord (>= 3.0.0)
93
- railties (>= 3.0.0)
94
- nokogiri (1.5.2)
95
- paperclip (2.7.0)
96
- activerecord (>= 2.3.0)
97
- activesupport (>= 2.3.2)
98
- cocaine (>= 0.0.2)
99
- mime-types
100
- polyamorous (0.5.0)
101
- activerecord (~> 3.0)
102
- polyglot (0.3.3)
103
- rack (1.4.1)
104
- rack-cache (1.2)
105
- rack (>= 0.4)
106
- rack-ssl (1.3.2)
107
- rack
108
- rack-test (0.6.1)
109
- rack (>= 1.0)
110
- rails (3.2.3)
111
- actionmailer (= 3.2.3)
112
- actionpack (= 3.2.3)
113
- activerecord (= 3.2.3)
114
- activeresource (= 3.2.3)
115
- activesupport (= 3.2.3)
116
- bundler (~> 1.0)
117
- railties (= 3.2.3)
118
- railties (3.2.3)
119
- actionpack (= 3.2.3)
120
- activesupport (= 3.2.3)
121
- rack-ssl (~> 1.3.2)
122
- rake (>= 0.8.7)
123
- rdoc (~> 3.4)
124
- thor (~> 0.14.6)
125
- rake (0.9.2.2)
126
- ransack (0.6.0)
127
- actionpack (~> 3.0)
128
- activerecord (~> 3.0)
129
- polyamorous (~> 0.5.0)
130
- rbx-require-relative (0.0.9)
131
- rdoc (3.12)
132
- json (~> 1.4)
133
- ruby-debug (0.10.4)
134
- columnize (>= 0.1)
135
- ruby-debug-base (~> 0.10.4.0)
136
- ruby-debug-base (0.10.4)
137
- linecache (>= 0.3)
138
- spree_core (1.1.0.rc2)
139
- activemerchant (= 1.20.4)
140
- acts_as_list (= 0.1.4)
141
- aws-sdk (~> 1.3.4)
142
- deface (>= 0.8.0)
143
- ffaker (~> 1.12.0)
144
- highline (= 1.6.11)
145
- jquery-rails (~> 2.0.0)
146
- kaminari (>= 0.13.0)
147
- nested_set (= 1.7.0)
148
- paperclip (~> 2.7)
149
- rails (>= 3.2.2, <= 3.2.3)
150
- ransack (~> 0.6.0)
151
- state_machine (= 1.1.2)
152
- stringex (~> 1.3.2)
153
- sprockets (2.1.2)
154
- hike (~> 1.2)
155
- rack (~> 1.0)
156
- tilt (~> 1.1, != 1.3.0)
157
- sqlite3 (1.3.5)
158
- state_machine (1.1.2)
159
- stringex (1.3.2)
160
- thor (0.14.6)
161
- tilt (1.3.3)
162
- treetop (1.4.10)
163
- polyglot
164
- polyglot (>= 0.3.1)
165
- tzinfo (0.3.33)
166
- uuidtools (2.1.2)
167
-
168
- PLATFORMS
169
- ruby
170
-
171
- DEPENDENCIES
172
- ffaker
173
- ruby-debug
174
- spree_slider!
175
- sqlite3
@@ -1,8 +0,0 @@
1
- Deface::Override.new(:virtual_path => 'spree/layouts/spree_application',
2
- :name => 'add_slider',
3
- :insert_after => %q{#header[data-hook]},
4
- :text => %q{
5
- <div id='spree-slider' data-hook>
6
- <%= yield :spree_slider %>
7
- </div>
8
- })
@@ -1,9 +0,0 @@
1
- Deface::Override.new(:virtual_path => 'spree/admin/configurations/index',
2
- :name => 'add_slides_to_admin_configurations_menu',
3
- :insert_bottom => "[data-hook='admin_configurations_menu']",
4
- :text => %q{
5
- <tr>
6
- <td><%= link_to 'Spree Slider', admin_slides_path %></td>
7
- <td>Manage Spree Slider contents</td>
8
- </tr> })
9
-
@@ -1,7 +0,0 @@
1
- Deface::Override.new(:virtual_path => 'spree/admin/shared/_configuration_menu',
2
- :name => 'add_slides_to_admin_configurations_sidebar_menu',
3
- :insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
4
- :text => %q{
5
- <%= configurations_sidebar_menu_item 'Spree Slider', admin_slides_path %>
6
- })
7
-
@@ -1,14 +0,0 @@
1
- <% content_for :spree_slider do %>
2
- <%= render 'spree/shared/slider' %>
3
- <% end %>
4
-
5
- <% content_for :sidebar do %>
6
- <div data-hook="homepage_sidebar_navigation">
7
- <%= render :partial => 'spree/shared/taxonomies' %>
8
- </div>
9
- <% end %>
10
-
11
- <div data-hook="homepage_products">
12
- <%= render :partial => 'spree/shared/products', :locals => { :products => @products } %>
13
- </div>
14
-
@@ -1,740 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
- <meta charset="utf-8">
6
-
7
- <title>AnythingSlider FX Demos</title>
8
- <link rel="shortcut icon" href="demos/images/favicon.ico">
9
- <link rel="apple-touch-icon" href="demos/images/apple-touch-icon.png">
10
-
11
- <!-- jQuery (required) & jQuery UI (for this demo only) -->
12
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css">
13
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
14
- <script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>
15
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
16
-
17
- <!-- Anything Slider optional plugins -->
18
- <script src="js/jquery.easing.1.2.js"></script>
19
-
20
- <!-- Anything Slider -->
21
- <link rel="stylesheet" href="css/anythingslider.css">
22
- <script src="js/jquery.anythingslider.js"></script>
23
-
24
- <!-- Ideally, add the stylesheet(s) you are going to use here,
25
- otherwise they are loaded and appended to the <head> automatically and will over-ride the IE stylesheet below -->
26
- <link rel="stylesheet" href="css/theme-metallic.css" media="screen">
27
-
28
- <!-- Older IE stylesheet, to reposition navigation arrows, added AFTER the theme stylesheet above -->
29
- <!--[if lte IE 7]>
30
- <link rel="stylesheet" href="css/anythingslider-ie.css" type="text/css" media="screen" />
31
- <![endif]-->
32
-
33
- <!-- AnythingSlider optional FX extension -->
34
- <script src="js/jquery.anythingslider.fx.js"></script>
35
-
36
- <!-- Demos page only -->
37
- <link rel="stylesheet" href="demos/css/page.css">
38
- <link rel="stylesheet" href="demos/colorbox/colorbox.css">
39
- <script src="demos/js/demo.js"></script>
40
- <script src="demos/colorbox/jquery.colorbox-min.js"></script>
41
-
42
- </head>
43
-
44
- <body>
45
-
46
- <div id="demo2">
47
-
48
- <div id="nav">
49
- <a href="index.html">Main Demo</a>
50
- <a href="simple.html">Simple Demo</a>
51
- <a href="expand.html">Expand Demo</a>
52
- <a href="video.html">Video Demo</a>
53
- <a class="current" href="demos.html">FX Demos</a>
54
- <a class="play" href="http://jsfiddle.net/Mottie/VM8XG/">Playground</a>
55
- <a class="git" href="https://github.com/ProLoser/AnythingSlider/wiki">Documentation</a>
56
- <a class="git" href="http://github.com/ProLoser/AnythingSlider/downloads">Download</a>
57
- <a class="issue" href="https://github.com/ProLoser/AnythingSlider/issues">Issues</a>
58
- </div>
59
-
60
- <h1>AnythingSlider FX Demos</h1>
61
-
62
- <h2 class="title">Demo 1: Thumbnails &amp; A Lightbox</h2>
63
-
64
- <!-- AnythingSlider #1 -->
65
- <ul id="slider1">
66
- <li><img src="demos/images/slide-civil-1.jpg" alt="" title="In Soviet Russia, concrete pours you!"></li>
67
- <li><img src="demos/images/slide-env-1.jpg" alt="" title="How many supervisors are there? Wrong! 5, who is taking the picture?"></li>
68
- <li><img src="demos/images/slide-civil-2.jpg" alt="" title="Alas, the pylon would never make it to the hydrant, her true love."></li>
69
- <li><img src="demos/images/slide-env-2.jpg" alt="" title="Take a left at the traffic circle."></li>
70
- </ul>
71
- <!-- END AnythingSlider #1 -->
72
- <br />
73
-
74
- <div class="accordion">
75
- <h3><a href="#">Demo 1 Notes</a></h3>
76
- <div>
77
- <ul>
78
- <li>Hover over the demo 1 slider to reveal the thumbnail navigation links - This sliding feature is part of the core AnythingSlider plugin (<code>toggleControls</code> is set to true).</li>
79
- <li>Thumbnail images<br /><br />
80
- <ul>
81
- <li>For this demo, the thumbnail images are premade; but with some server side scripting and modification to the <code>navigationFormatter</code> code, you should be able to create and link to your own thumbnail images.</li>
82
- <li>CSS is required to override the metallic theme CSS for thumbnail images to be visible (resize and remove negative text indentation), or you can make a new theme.</li>
83
- <li>Add images using the <code>navigationFormatter</code> option as follows:<br /><br />
84
- <pre><code> navigationFormatter : function(i, panel){
85
- return '&lt;img src="demos/images/th-slide-' + ['civil-1', 'env-1', 'civil-2', 'env-2'][i-1] + '.jpg"&gt;';
86
- }</code></pre>
87
- </li>
88
- </ul>
89
- </li>
90
- <li>Lightbox Popup (<a href="http://colorpowered.com/colorbox/">Colorbox</a> plugin)<br /><br />
91
- <ul>
92
- <li>Click on the current slider image to open a light box. Press escape or click on the (X) in the lower right corner to close it.</li>
93
- <li>Additional CSS is required to modify the Colorbox plugin. The CSS expands the image to completely fill the inside the colorbox popup. Adjust as desired to keep the image proportional.</li>
94
- <li>The script attaches a colorbox popup to all images inside the slider. Add a class to the images to modify this behaviour.</li>
95
- <li>The colorbox popup will contain all the current slider images. In the script the name "group" is added to all images in the "rel" attribute. This can be done in the HTML to target only the images to be shown in the colorbox - then remove the <code>.attr('rel','group')</code> in the script.</li>
96
- </ul>
97
- </li>
98
- <li>The AnythingSlider FX extension is not required to add any of the above functionality.</li>
99
- </ul>
100
- </div>
101
-
102
- <h3><a href="#">Header</a></h3>
103
- <div>
104
- <pre><code> &lt;!-- jQuery --&gt;
105
- &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js&quot;&gt;&lt;/script&gt;
106
-
107
- &lt;!-- Anything Slider optional plugins --&gt;
108
- &lt;script src=&quot;js/jquery.easing.1.2.js&quot;&gt;&lt;/script&gt;
109
-
110
- &lt;!-- Anything Slider --&gt;
111
- &lt;link href=&quot;css/anythingslider.css&quot; rel=&quot;stylesheet&quot;&gt;
112
- &lt;script src=&quot;js/jquery.anythingslider.min.js&quot;&gt;&lt;/script&gt;
113
-
114
- &lt;!-- ColorBox --&gt;
115
- &lt;link href=&quot;demos/colorbox/colorbox.css&quot; rel=&quot;stylesheet&quot;&gt;
116
- &lt;script src=&quot;demos/colorbox/jquery.colorbox-min.js&quot;&gt;&lt;/script&gt;</code></pre>
117
- </div>
118
-
119
- <h3><a href="#">CSS &amp; HTML</a></h3>
120
- <div>
121
- <pre><code>/* New in version 1.7+ */
122
- #slider1 {
123
- width: 400px;
124
- height: 300px;
125
- list-style: none;
126
- }
127
- /* CSS to expand the image to fit inside colorbox */
128
- #cboxPhoto { width: 100%; height: 100%; margin: 0 !important; }
129
- /* Change metallic theme defaults to show thumbnails -
130
- using #demo2 (page wrapper) to increase this CSS priority */
131
- #demo2 div.anythingSlider-metallic .thumbNav a {
132
- background-image: url();
133
- height: 30px;
134
- width: 30px;
135
- border: #000 1px solid;
136
- border-radius: 2px;
137
- -moz-border-radius: 2px;
138
- -webkit-border-radius: 2px;
139
- text-indent: 0;
140
- }
141
- /* border around link (image) to show current panel */
142
- #demo2 div.anythingSlider-metallic .thumbNav a:hover,
143
- #demo2 div.anythingSlider-metallic .thumbNav a.cur {
144
- border-color: #fff;
145
- }
146
- /* reposition the start/stop button */
147
- #demo2 div.anythingSlider-metallic .start-stop {
148
- margin-top: 15px;
149
- }</code></pre>
150
- <br>
151
- <pre><code>&lt;ul id=&quot;slider1&quot;&gt;
152
- &lt;li&gt;&lt;img src=&quot;demos/images/slide-civil-1.jpg&quot;&gt;&lt;/li&gt;
153
- &lt;li&gt;&lt;img src=&quot;demos/images/slide-env-1.jpg&quot;&gt;&lt;/li&gt;
154
- &lt;li&gt;&lt;img src=&quot;demos/images/slide-civil-2.jpg&quot;&gt;&lt;/li&gt;
155
- &lt;li&gt;&lt;img src=&quot;demos/images/slide-env-2.jpg&quot;&gt;&lt;/li&gt;
156
- &lt;/ul&gt;</code></pre>
157
- </div>
158
-
159
- <h3><a href="#">Script</a></h3>
160
- <div><pre><code>$(function(){
161
- $('#slider1')
162
- .anythingSlider({
163
- toggleControls : true,
164
- theme : 'metallic',
165
- navigationFormatter : function(i, panel){ // add thumbnails as navigation links
166
- return '&lt;img src="demos/images/th-slide-' + ['civil-1', 'env-1', 'civil-2', 'env-2'][i - 1] + '.jpg"&gt;';
167
- }
168
- })
169
- // target all images inside the current slider
170
- // replace with 'img.someclass' to target specific images
171
- .find('.panel:not(.cloned) img') // ignore the cloned panels
172
- .attr('rel','group') // add all slider images to a colorbox group
173
- .colorbox({
174
- width: '90%',
175
- height: '90%',
176
- href: function(){ return $(this).attr('src'); },
177
- // use $(this).attr('title') for specific image captions
178
- title: 'Press escape to close',
179
- rel: 'group'
180
- });
181
- });</code></pre>
182
- </div>
183
- </div>
184
-
185
- <br><br>
186
-
187
- <h2 class="title">Demo 2: FX Extension Panel Effects</h2>
188
-
189
- <!-- AnythingSlider #2 -->
190
- <ul id="slider2">
191
- <li class="panel1">
192
- <div>
193
- <div class="textSlide">
194
- <img src="demos/images/251356.jpg" alt="tomato sandwich" style="float: right; margin: 0 0 2px 10px;" />
195
- <h3>Queenie's Killer Tomato Bagel Sandwich</h3>
196
- <h4>Ingredients</h4>
197
- <ul>
198
- <li>1 bagel, split and toasted</li>
199
- <li>2 tablespoons cream cheese</li>
200
- <li>1 roma (plum) tomatoes, thinly sliced</li>
201
- <li>salt and pepper to taste</li>
202
- <li>4 leaves fresh basil</li>
203
- </ul>
204
- </div>
205
- </div>
206
- </li>
207
- <li class="panel2">
208
- <div class="quoteSlide">
209
- <blockquote>In awe I watched the waxing moon ride across the zenith of the heavens like an ambered chariot towards the ebon void of infinite space wherein the tethered belts of Jupiter and Mars hang forever festooned in their orbital majesty. And as I looked at all this I thought... I must put a roof on this lavatory.<p>~ Les Dawson</p></blockquote>
210
- </div>
211
- </li>
212
- <li class="panel3">
213
- <img class="expand" src="demos/images/slide-tele-1.jpg" alt="" />
214
- </li>
215
- <li class="panel4" id="quote2">
216
- <div class="quoteSlide">
217
- <blockquote>Life is conversational. Web design should be the same way. On the web, you&#8217;re talking to someone you&#8217;ve probably never met – so it&#8217;s important to be clear and precise. Thus, well structured navigation and content organization goes hand in hand with having a good conversation.</blockquote>
218
- <p> - <a id='perma' href='http://quotesondesign.com/chikezie-ejiasi/'>Chikezie Ejiasi</a></p>
219
- </div>
220
- </li>
221
- <li class="panel5">
222
- <img class="fade" src="demos/images/slide-tele-2.jpg" alt="" />
223
- </li>
224
- </ul>
225
- <!-- END AnythingSlider #2 -->
226
-
227
- <br>
228
-
229
- <div class="accordion">
230
-
231
- <h3><a href="#">Demo 2 Notes</a></h3>
232
- <div>
233
- <ul>
234
- <li>The AnythingSlider FX extension is required to add this functionality.</li>
235
- <li>No additional CSS is required, unless it is used for a specific element (see the captions section).</li>
236
- <li>Effects Methods:<br><br>
237
- <ul>
238
- <li>The effects are set up so that the slider element on each panel is in its default (final) position in the "inFx" definition (element positions to zero, opacity to 1, etc) and the "outFX" definitions are set the other position the element is in to achieve the animation.</li>
239
- <li>The script binds to the "slide_init" (for "outFx" animation) and "slide_complete" (for "inFx" animation) anythingSlider events.</li>
240
- <li>The base effects are predefined shortcut methods. I have included the custom effect equivalents to these base effects in the script examples.</li>
241
- </ul>
242
- </li>
243
- <li>Base effects:<br><br>
244
- <ul>
245
- <li>Base effects are standard effects: <code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code>, <code>fade</code>, <code>expand</code>, <code>listLR</code>, <code>listRL</code>, <code>caption-Top</code>, <code>caption-Right</code>, <code>caption-Bottom</code>, <code>caption-Left</code>.</li>
246
- <li>Use the base effects as follows:<br><br>
247
- <pre><code> $('#slider2').anythingSliderFx({
248
- '.selector1' : [ 'effect(s)', 'size', 'time', 'easing' ],
249
- '.selector2' : [ 'effect(s)', 'size', 'time', 'easing' ]
250
- });</code></pre>
251
- 'size', 'time' and 'easing' are optional, but they must remain in that order. So if you want to add an effect time, you must also set a size - <code>[ 'effect(s)', 'size', 'time' ]</code>. To add an easing, all parameters must be included.</li>
252
- <li>Defaults: If 'size', 'time' or 'easing' is not defined, it will be set to its default value:<br><br>
253
- <ul>
254
- <li>size : based on initial slider height and width</li>
255
- <li>'inFx' time : 400 (ms)</li>
256
- <li>'outFx' time : 350 (ms)</li>
257
- <li>easing : 'swing'</li>
258
- </ul>
259
- </li>
260
- <li>How base effects are setup:<br><br>
261
- <ul>
262
- <li><code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code>: Default 'inFx' position is zero, 'outFx' position is based on the initial slider height and width.</li>
263
- <li><code>fade</code>: Default 'inFx' has an opacity set to one, 'outFx' opacity is zero.</li>
264
- <li><code>expand</code>: Default 'inFx' sets the width to 100%, left and right positions to 0%; the 'outFx' width is set to 10%, left and right set to 50% to somewhat center the image. When changing this size option, use percentage values, but anything more than 20% the image position will noticeably be not centered.</li>
265
- <li><code>listLR</code>: Default 'inFx' left position is zero; 'outFx' position will make ':odd' elements move (L)eft and ':even' elements move (R)ight the width of the slider.</li>
266
- <li><code>listRL</code>: Default 'inFx' left position is zero; 'outFx' position will make ':odd' elements move (R)ight and ':even' elements move (L)eft the width of the slider.</li>
267
- <li><code>caption-{direction}</code>: This effect is opposite of the others. The default 'inFx' positions the element so it is in view while the 'outFx' positions the element out of view. See demo 3 for more details.</li>
268
- </ul>
269
- </li>
270
- <li>Combine any of these standard effects as desired (e.g. "top fade"); but of course, using 'top bottom' will not work as you expect (unless you wanted to blow up your computer ;) LOL).</li>
271
- </ul>
272
- </li>
273
- <li>Custom effects:<br><br>
274
- <ul>
275
- <li>Custom effects allow you to use any of the standard jQuery animation parameters (e.g. top, left, margin, padding, width, height, etc). See the examples below.</li>
276
- <li>Custom effects can be mixed in with base effects as desired.</li>
277
- <li>When using custom effects it is important that each element with an 'inFx' method has a matching 'outFx' method, or those elements will be abnormally positioned and/or disappear from view.</li>
278
- <li>Standard setup for custom effects is as follows (there is no specific order required):<br><br>
279
- <pre><code> $('#slider1').anythingSliderFx({
280
- inFx : {
281
- '.selector1' : { top : 0, duration: 400, easing : 'easeOutBounce' },
282
- '.selector2' : { left: 0, duration: 400 }
283
- },
284
- // out = the animation that occurs when you slide "out" of a panel
285
- // (it also occurs before the "in" animation)
286
- outFx : {
287
- '.selector1' : { top : '-100px', duration: 350 },
288
- '.selector2' : { left : '-200px' }
289
- }</code></pre></li>
290
- <li>Defaults: if 'time' or 'easing' is not defined in the custom effects code, it will be set to its default value:<br><br>
291
- <ul>
292
- <li>'inFx' time : 400 (ms)</li>
293
- <li>'outFx' time : 350 (ms)</li>
294
- <li>easing : 'swing'</li>
295
- </ul>
296
- </li>
297
- </ul>
298
- </li>
299
- </ul>
300
- </div>
301
-
302
- <h3><a href="#">Header</a></h3>
303
- <div>
304
- <pre><code> &lt;!-- jQuery --&gt;
305
- &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js&quot;&gt;&lt;/script&gt;
306
-
307
- &lt;!-- Anything Slider optional plugins --&gt;
308
- &lt;script src=&quot;js/jquery.easing.1.2.js&quot;&gt;&lt;/script&gt;
309
-
310
- &lt;!-- Anything Slider --&gt;
311
- &lt;link href=&quot;css/anythingslider.css&quot; rel=&quot;stylesheet&quot;&gt;
312
- &lt;script src=&quot;js/jquery.anythingslider.min.js&quot;&gt;&lt;/script&gt;
313
-
314
- &lt;!-- Anything Slider optional FX extension --&gt;
315
- &lt;script src=&quot;js/jquery.anythingslider.fx.min.js&quot;&gt;&lt;/script&gt;</code></pre>
316
- </div>
317
-
318
- <h3><a href="#">CSS &amp; HTML</a></h3>
319
- <div><pre><code>/* New in version 1.7+ */
320
- #slider2 {
321
- width: 600px;
322
- height: 350px;
323
- list-style: none;
324
- }</code></pre>
325
- There is no change from the standard HTML setup, unless you want to add more specific classes so you can target them with effects.<br><br>
326
- <pre><code> &lt;ul id=&quot;slider2&quot;&gt;
327
- &lt;li class=&quot;panel1&quot;&gt;
328
- &lt;div class=&quot;textSlide&quot;&gt;
329
- &lt;img src=&quot;demos/images/251356.jpg&quot; alt=&quot;tomato sandwich&quot; style=&quot;float: right;
330
- margin: 0 0 2px 10px;&quot;&gt;
331
- &lt;h3&gt;Queenie's Killer Tomato Bagel Sandwich&lt;/h3&gt;
332
- &lt;h4&gt;Ingredients&lt;/h4&gt;
333
- &lt;ul&gt;
334
- &lt;li&gt;1 bagel, split and toasted&lt;/li&gt;
335
- &lt;li&gt;2 tablespoons cream cheese&lt;/li&gt;
336
- &lt;li&gt;1 roma (plum) tomatoes, thinly sliced&lt;/li&gt;
337
- &lt;li&gt;salt and pepper to taste&lt;/li&gt;
338
- &lt;li&gt;4 leaves fresh basil&lt;/li&gt;
339
- &lt;/ul&gt;
340
- &lt;/div&gt;
341
- &lt;/li&gt;
342
- &lt;li class=&quot;panel2&quot;&gt;
343
- &lt;div class=&quot;quoteSlide&quot;&gt;
344
- &lt;blockquote&gt;In awe I watched the waxing moon ride across the zenith of
345
- the heavens like an ambered chariot towards the ebon void of infinite space
346
- wherein the tethered belts of Jupiter and Mars hang forever festooned in
347
- their orbital majesty. And as I looked at all this I thought... I must put
348
- a roof on this lavatory.&lt;br&gt;-- Les Dawson&lt;/blockquote&gt;
349
- &lt;/div&gt;
350
- &lt;/li&gt;
351
- &lt;li class=&quot;panel3&quot;&gt;
352
- &lt;img class=&quot;expand&quot; src=&quot;demos/images/slide-tele-1.jpg&quot; alt=&quot;&quot;&gt;
353
- &lt;/li&gt;
354
- &lt;li class=&quot;panel4&quot;&gt;
355
- &lt;div class=&quot;quoteSlide&quot;&gt;
356
- &lt;blockquote&gt;Life is conversational. Web design should be the same way.
357
- On the web, you&amp;#8217;re talking to someone you&amp;#8217;ve probably
358
- never met &#x2013; so it&amp;#8217;s important to be clear and precise.
359
- Thus, well structured navigation and content organization goes hand in hand
360
- with having a good conversation.&lt;/blockquote&gt;
361
- &lt;p&gt;
362
- - &lt;a href='http://quotesondesign.com/chikezie-ejiasi/'&gt;Chikezie Ejiasi&lt;/a&gt;
363
- &lt;/p&gt;
364
- &lt;/div&gt;
365
- &lt;/li&gt;
366
- &lt;li class=&quot;panel5&quot;&gt;
367
- &lt;img class=&quot;fade&quot; src=&quot;demos/images/slide-tele-2.jpg&quot; alt=&quot;&quot;&gt;
368
- &lt;/li&gt;
369
- &lt;/ul&gt;</code></pre>
370
- </div>
371
-
372
- <h3><a href="#">Script - FX addon, using base FX</a></h3>
373
- <div><pre><code>$(function(){
374
- $('#slider2') // Demo 2 code, using FX base effects
375
- .anythingSlider({
376
- resizeContents : false,
377
- navigationFormatter : function(i, panel){
378
- return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2', 'Test'][i - 1];
379
- }
380
- })
381
- .anythingSliderFx({
382
- // base FX definitions
383
- // '.selector' : [ 'effect(s)', 'size', 'time', 'easing' ]
384
- // 'size', 'time' and 'easing' are optional parameters, but must be kept in order if added
385
- '.quoteSlide:first *' : [ 'grow', '24px', '400', 'easeInOutCirc' ],
386
- '.quoteSlide:last' : [ 'top', '500px', '400', 'easeOutElastic' ],
387
- '.expand' : [ 'expand', '10%', '400', 'easeOutBounce' ],
388
- '.textSlide h3' : [ 'top fade', '200px', '500', 'easeOutBounce' ],
389
- '.textSlide img,.fade': [ 'fade' ],
390
- '.textSlide li' : [ 'listLR' ]
391
- });
392
- });</code></pre>
393
- * Note: Each definition should end with a comma except for the last - see examples above.
394
- </div>
395
-
396
- <h3><a href="#">Script - FX addon, using custom FX</a></h3>
397
- <div><pre><code>$(function(){
398
- $('#slider2') // Demo 2 code, using FX full control
399
- .anythingSlider({
400
- resizeContents : false,
401
- navigationFormatter : function(i, panel){
402
- return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2', 'Test'][i - 1];
403
- }
404
- })
405
- .anythingSliderFx({
406
- // base FX definitions can be mixed and matched in here too.
407
- '.fade' : [ 'fade' ],
408
-
409
- // for more precise control, use the "inFx" and "outFx" definitions
410
- // inFx = the animation that occurs when you slide "in" to a panel
411
- inFx : {
412
- '.textSlide h3' : { opacity: 1, top : 0, duration: 400, easing : 'easeOutBounce' },
413
- '.textSlide li' : { opacity: 1, left : 0, duration: 400 },
414
- '.textSlide img' : { opacity: 1, duration: 400 },
415
- '.quoteSlide' : { top : 0, duration: 400, easing : 'easeOutElastic' },
416
- '.expand' : { width: '100%', top: '0%', left: '0%', duration: 400, easing : 'easeOutBounce' }
417
- },
418
- // out = the animation that occurs when you slide "out" of a panel
419
- // (it also occurs before the "in" animation)
420
- outFx : {
421
- '.textSlide h3' : { opacity: 0, top : '-100px', duration: 350 },
422
- '.textSlide li:odd' : { opacity: 0, left : '-200px', duration: 350 },
423
- '.textSlide li:even' : { opacity: 0, left : '200px', duration: 350 },
424
- '.textSlide img' : { opacity: 0, duration: 350 },
425
- '.quoteSlide:first' : { top : '-500px', duration: 350 },
426
- '.quoteSlide:last' : { top : '500px', duration: 350 },
427
- '.expand' : { width: '10%', top: '50%', left: '50%', duration: 350 }
428
- }
429
- });
430
- });</code></pre>
431
- * Note: Each definition should end with a comma except for the last - see examples above.
432
- </div>
433
- </div>
434
-
435
- <br><br>
436
- <h2 class="title">Demo 3: Sliding Captions</h2>
437
-
438
- <!-- AnythingSlider #3 -->
439
- <ul id="slider3">
440
- <li class="panel1">
441
- <!-- Note this caption is before the image, all others it is after -->
442
- <div class="caption-top">In Soviet Russia, concrete pours you!</div>
443
- <img src="demos/images/slide-civil-1.jpg" alt="" />
444
- </li>
445
- <li class="panel2">
446
- <img src="demos/images/slide-env-1.jpg" alt="" />
447
- <div class="caption-right">How many supervisors are there? Wrong! 5, who is taking the picture?</div>
448
- </li>
449
- <li class="panel3">
450
- <img src="demos/images/slide-civil-2.jpg" alt="" />
451
- <div class="caption-bottom">Alas, the pylon would never make it to the hydrant, her true love.</div>
452
- </li>
453
- <li class="panel4">
454
- <img src="demos/images/slide-env-2.jpg" alt="" />
455
- <div class="caption-left">Take a left at the traffic circle.</div>
456
- </li>
457
- </ul>
458
- <!-- END AnythingSlider #3 -->
459
-
460
- <br>
461
-
462
- <div class="accordion">
463
-
464
- <h3><a href="#">Demo 3 Notes</a></h3>
465
- <div>
466
- <ul>
467
- <li>CSS<br><br>
468
- <ul>
469
- <li>The image needs to be set to 100% height and width because AnythingSlider will only automatically expand solitary objects; but here we have a caption!</li>
470
- <li>Note the caption widths &amp; heights include the padding, so for example the top &amp; bottom caption height is set to 30px instead of 50px to include the 10px padding... same goes for the height of all the captions.</li>
471
- <li>If you are using the close button script, make sure you use the full width and/or height (include padding) as well.</li>
472
- </ul>
473
- </li>
474
- <li>In the HTML, note that the top caption comes before the image; whereas the bottom, left and right caption HTML comes after.</li>
475
- <li>Script<br><br>
476
- <ul>
477
- <li>Hover to show caption<br><br>
478
- <ul>
479
- <li>This code will reveal a caption when hovering over a slider panel, and hide on mouse out.</li>
480
- <li>There is a lot of extra code, for captions in multiple positions, so ideally remove the unused portions to maximize the efficiency of the code.</li>
481
- <li>This script does not need the AnythingSlider FX extension.</li>
482
- </ul>
483
- </li>
484
- <li>Slide in caption on new panel<br><br>
485
- <ul>
486
- <li>This code reveals a caption when a new panel comes into view.</li>
487
- <li>Code examples are included below to show and reveal captions using base and custom FX. These code examples reveal the caption when the panel comes into view and hide it as it scrolls out of view.</li>
488
- <li>A short additional script adds a close button (x) to each caption to allow closing the caption while on a specific panel. CSS to position the button is needed and included.</li>
489
- </ul>
490
- </li>
491
- <li>The script needs to hide the caption when out of view (especially for right and left captions) otherwise they interfere with other panels of the slider.</li>
492
- </ul>
493
- </li>
494
- </ul>
495
- </div>
496
-
497
- <h3><a href="#">Header</a></h3>
498
- <div>
499
- <pre><code> &lt;!-- jQuery --&gt;
500
- &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js&quot;&gt;&lt;/script&gt;
501
-
502
- &lt;!-- Anything Slider optional plugins --&gt;
503
- &lt;script src=&quot;js/jquery.easing.1.2.js&quot;&gt;&lt;/script&gt;
504
-
505
- &lt;!-- Anything Slider --&gt;
506
- &lt;link href=&quot;css/anythingslider.css&quot; rel=&quot;stylesheet&quot;&gt;
507
- &lt;script src=&quot;js/jquery.anythingslider.min.js&quot;&gt;&lt;/script&gt;
508
-
509
- &lt;!-- Anything Slider optional FX extension --&gt;
510
- &lt;script src=&quot;js/jquery.anythingslider.fx.min.js&quot;&gt;&lt;/script&gt;</code></pre>
511
- </div>
512
-
513
- <h3><a href="#">CSS</a></h3>
514
- <div><pre><code>/* New in version 1.7+ */
515
- #slider3 {
516
- width: 500px;
517
- height: 400px;
518
- list-style: none;
519
- }
520
- /* images with caption */
521
- #slider3 img {
522
- width: 100%;
523
- height: 100%;
524
- }
525
- /* position the panels so the captions appear correctly */
526
- #slider3 .panel { position: relative; }
527
- /* captions */
528
- #slider3 .caption-top, #slider3 .caption-right,
529
- #slider3 .caption-bottom, #slider3 .caption-left {
530
- background: #000;
531
- color: #fff;
532
- padding: 10px;
533
- margin: 0;
534
- position: relative;
535
- z-index: 10;
536
- opacity: .8;
537
- filter: alpha(opacity=80);
538
- }
539
- /* Top caption - padding is included in the width (480px here, 500px in the script), same for height */
540
- #slider3 .caption-top {
541
- left: 0;
542
- top: 0;
543
- width: 480px;
544
- height: 30px;
545
- }
546
- /* Right caption - padding is included in the width (130px here, 150px in the script), same for height */
547
- #slider3 .caption-right {
548
- right: 0;
549
- bottom: 0;
550
- width: 130px;
551
- height: 180px;
552
- }
553
- /* Bottom caption - padding is included in the width (480px here, 500px in the script), same for height */
554
- #slider3 .caption-bottom {
555
- left: 0;
556
- bottom: 0;
557
- width: 480px;
558
- height: 30px;
559
- }
560
- /* Left caption - padding is included in the width (130px here, 150px in the script), same for height */
561
- #slider3 .caption-left {
562
- left: 0;
563
- bottom: 0;
564
- width: 130px;
565
- height: 180px;
566
- }
567
- /* Caption close button */
568
- .caption-top .close, .caption-right .close,
569
- .caption-bottom .close, .caption-left .close {
570
- font-size: 80%;
571
- cursor: pointer;
572
- float: right;
573
- display: inline-block;
574
- }</code></pre>
575
- </div>
576
-
577
- <h3><a href="#">HTML</a></h3>
578
- <div><pre><code> &lt;ul id=&quot;slider3&quot;&gt;
579
- &lt;li&gt;
580
- &lt;!-- Note this caption is before the image, all others it is after --&gt;
581
- &lt;div class=&quot;caption-top&quot;&gt;
582
- In Soviet Russia, concrete pours you!
583
- &lt;/div&gt;
584
- &lt;img src=&quot;demos/images/slide-civil-1.jpg&quot; alt=&quot;&quot;&gt;
585
- &lt;/li&gt;
586
- &lt;li&gt;
587
- &lt;img src=&quot;demos/images/slide-env-1.jpg&quot; alt=&quot;&quot;&gt;
588
- &lt;div class=&quot;caption-right&quot;&gt;
589
- How many supervisors are there? Wrong! 5, who is taking the picture?
590
- &lt;/div&gt;
591
- &lt;/li&gt;
592
- &lt;li&gt;
593
- &lt;img src=&quot;demos/images/slide-civil-2.jpg&quot; alt=&quot;&quot;&gt;
594
- &lt;div class=&quot;caption-bottom&quot;&gt;
595
- Alas, the pylon would never make it to the hydrant, her true love.
596
- &lt;/div&gt;
597
- &lt;/li&gt;
598
- &lt;li&gt;
599
- &lt;img src=&quot;demos/images/slide-env-2.jpg&quot; alt=&quot;&quot;&gt;
600
- &lt;div class=&quot;caption-left&quot;&gt;
601
- Take a left at the traffic circle.
602
- &lt;/div&gt;
603
- &lt;/li&gt;
604
- &lt;/ul&gt;</code></pre>
605
- </div>
606
-
607
- <h3><a href="#">Script - Caption appears on hover (FX extension not required)</a></h3>
608
- <div><pre><code>$(function(){
609
- $('#slider3')
610
- .anythingSlider()
611
- /* this code will make the caption appear when you hover over the panel
612
- remove the extra statements if you don't have captions in that location */
613
- .find('.panel')
614
- .find('div[class*=caption]').css({ position: 'absolute' }).end()
615
- .hover(function(){ showCaptions( $(this) ) }, function(){ hideCaptions( $(this) ); });
616
-
617
- showCaptions = function(el){
618
- var $this = el;
619
- if ($this.find('.caption-top').length) {
620
- $this.find('.caption-top')
621
- .show()
622
- .animate({ top: 0, opacity: 1 }, 400);
623
- }
624
- if ($this.find('.caption-right').length) {
625
- $this.find('.caption-right')
626
- .show()
627
- .animate({ right: 0, opacity: 1 }, 400);
628
- }
629
- if ($this.find('.caption-bottom').length) {
630
- $this.find('.caption-bottom')
631
- .show()
632
- .animate({ bottom: 0, opacity: 1 }, 400);
633
- }
634
- if ($this.find('.caption-left').length) {
635
- $this.find('.caption-left')
636
- .show()
637
- .animate({ left: 0, opacity: 1 }, 400);
638
- }
639
- };
640
- hideCaptions = function(el){
641
- var $this = el;
642
- if ($this.find('.caption-top').length) {
643
- $this.find('.caption-top')
644
- .stop()
645
- .animate({ top: -50, opacity: 0 }, 350, function(){
646
- $this.find('.caption-top').hide(); });
647
- }
648
- if ($this.find('.caption-right').length) {
649
- $this.find('.caption-right')
650
- .stop()
651
- .animate({ right: -150, opacity: 0 }, 350, function(){
652
- $this.find('.caption-right').hide(); });
653
- }
654
- if ($this.find('.caption-bottom').length) {
655
- $this.find('.caption-bottom')
656
- .stop()
657
- .animate({ bottom: -50, opacity: 0 }, 350, function(){
658
- $this.find('.caption-bottom').hide(); });
659
- }
660
- if ($this.find('.caption-left').length) {
661
- $this.find('.caption-left')
662
- .stop()
663
- .animate({ left: -150, opacity: 0 }, 350, function(){
664
- $this.find('.caption-left').hide(); });
665
- }
666
- };
667
-
668
- // hide all captions initially
669
- hideCaptions( $('#slider3 .panel') );
670
- });</code></pre>
671
- </div>
672
-
673
- <h3><a href="#">Script - FX addon, using base FX</a></h3>
674
- <div><pre><code>$(function(){
675
- $('#slider3')
676
- .anythingSlider()
677
- .anythingSliderFx({
678
- // '.selector' : [ 'caption', 'distance/size', 'time', 'easing' ]
679
- // 'distance/size', 'time' and 'easing' are optional parameters
680
- '.caption-top' : [ 'caption-Top', '50px' ],
681
- '.caption-right' : [ 'caption-Right', '130px', '1000', 'easeOutBounce' ],
682
- '.caption-bottom' : [ 'caption-Bottom', '50px' ],
683
- '.caption-left' : [ 'caption-Left', '130px', '1000', 'easeOutBounce' ]
684
- })
685
- /* add a close button (x) to the caption */
686
- .find('div[class*=caption]')
687
- .css({ position: 'absolute' })
688
- .prepend('&lt;span class="close"&gt;x&lt;/span&gt;')
689
- .find('.close').click(function(){
690
- var cap = $(this).parent(),
691
- ani = { bottom : -50 }; // bottom
692
- if (cap.is('.caption-top')) { ani = { top: -50 }; }
693
- if (cap.is('.caption-left')) { ani = { left: -150 }; }
694
- if (cap.is('.caption-right')) { ani = { right: -150 }; }
695
- cap.animate(ani, 400, function(){ cap.hide(); } );
696
- });
697
- });</code></pre>
698
- </div>
699
-
700
- <h3><a href="#">Script - FX addon, using custom FX</a></h3>
701
- <div><pre><code>$(function(){
702
- $('#slider3')
703
- .anythingSlider()
704
- /* this "custom" code is the equivalent of the base caption functions */
705
- .anythingSliderFx({
706
- inFx: {
707
- '.caption-top' : { top: 0, opacity: 0.8, duration: 400 },
708
- '.caption-right' : { right: 0, opacity: 0.8, duration: 400 },
709
- '.caption-bottom' : { bottom: 0, opacity: 0.8, duration: 400 },
710
- '.caption-left' : { left: 0, opacity: 0.8, duration: 400 }
711
- },
712
- outFx: {
713
- '.caption-top' : { top: -50, opacity: 0, duration: 350 },
714
- '.caption-right' : { right: -150, opacity: 0, duration: 350 },
715
- '.caption-bottom' : { bottom: -50, opacity: 0, duration: 350 },
716
- '.caption-left' : { left: -150, opacity: 0, duration: 350 }
717
- }
718
- })
719
- /* add a close button (x) to the caption */
720
- .find('div[class*=caption]')
721
- .css({ position: 'absolute' })
722
- .prepend('&lt;span class="close"&gt;x&lt;/span&gt;')
723
- .find('.close').click(function(){
724
- var cap = $(this).parent(),
725
- ani = { bottom : -50 }; // bottom
726
- if (cap.is('.caption-top')) { ani = { top: -50 }; }
727
- if (cap.is('.caption-left')) { ani = { left: -150 }; }
728
- if (cap.is('.caption-right')) { ani = { right: -150 }; }
729
- cap.animate(ani, 400, function(){ cap.hide(); } );
730
- });
731
- });</code></pre>
732
- </div>
733
-
734
- </div>
735
-
736
- </div>
737
-
738
- </body>
739
-
740
- </html>