spree_slider 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +210 -0
- data/LICENSE +26 -0
- data/README.textile +43 -0
- data/Rakefile +1 -0
- data/Versionfile +10 -0
- data/app/controllers/spree/admin/slides_controller.rb +8 -0
- data/app/models/spree/slide.rb +4 -0
- data/app/overrides/add_slider_to_layout.rb +8 -0
- data/app/overrides/add_slides_to_admin_configurations_menu.rb +9 -0
- data/app/overrides/add_slides_to_admin_configurations_sidebar_menu.rb +7 -0
- data/app/views/spree/admin/slides/_form.html.erb +21 -0
- data/app/views/spree/admin/slides/edit.html.erb +10 -0
- data/app/views/spree/admin/slides/index.html.erb +35 -0
- data/app/views/spree/admin/slides/new.html.erb +9 -0
- data/app/views/spree/admin/slides/show.html.erb +41 -0
- data/app/views/spree/home/index.html.erb +14 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +5 -0
- data/db/migrate/20120222184238_create_slides.rb +16 -0
- data/lib/generators/spree_slider/install_anything_generator.rb +30 -0
- data/lib/generators/spree_slider/install_nivo_generator.rb +34 -0
- data/lib/generators/spree_slider/templates/anything_slider.html.erb +26 -0
- data/lib/generators/spree_slider/templates/nivo_slider.html.erb +38 -0
- data/lib/spree_slider/engine.rb +23 -0
- data/lib/spree_slider.rb +2 -0
- data/script/rails +5 -0
- data/spec/spec_helper.rb +32 -0
- data/spree_slider.gemspec +26 -0
- data/vendor/assets/anything-slider/README.textile +13 -0
- data/vendor/assets/anything-slider/css/anythingslider-ie.css +45 -0
- data/vendor/assets/anything-slider/css/anythingslider.css +204 -0
- data/vendor/assets/anything-slider/css/theme-construction.css +142 -0
- data/vendor/assets/anything-slider/css/theme-cs-portfolio.css +148 -0
- data/vendor/assets/anything-slider/css/theme-metallic.css +146 -0
- data/vendor/assets/anything-slider/css/theme-minimalist-round.css +144 -0
- data/vendor/assets/anything-slider/css/theme-minimalist-square.css +144 -0
- data/vendor/assets/anything-slider/demos/colorbox/border.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/colorbox.css +62 -0
- data/vendor/assets/anything-slider/demos/colorbox/controls.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomCenter.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomLeft.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderBottomRight.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderMiddleLeft.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderMiddleRight.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopCenter.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopLeft.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/internet_explorer/borderTopRight.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/jquery.colorbox-min.js +4 -0
- data/vendor/assets/anything-slider/demos/colorbox/jquery.colorbox.js +769 -0
- data/vendor/assets/anything-slider/demos/colorbox/loading.gif +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/loading_background.png +0 -0
- data/vendor/assets/anything-slider/demos/colorbox/overlay.png +0 -0
- data/vendor/assets/anything-slider/demos/css/page.css +148 -0
- data/vendor/assets/anything-slider/demos/images/251356.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/apple-touch-icon.png +0 -0
- data/vendor/assets/anything-slider/demos/images/favicon.ico +0 -0
- data/vendor/assets/anything-slider/demos/images/slide-civil-1.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/slide-civil-2.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/slide-env-1.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/slide-env-2.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/slide-tele-1.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/slide-tele-2.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/th-slide-civil-1.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/th-slide-civil-2.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/th-slide-env-1.jpg +0 -0
- data/vendor/assets/anything-slider/demos/images/th-slide-env-2.jpg +0 -0
- data/vendor/assets/anything-slider/demos/js/demo.js +132 -0
- data/vendor/assets/anything-slider/demos/video/movie.mp4 +0 -0
- data/vendor/assets/anything-slider/demos/video/movie.ogg +0 -0
- data/vendor/assets/anything-slider/demos/video/movie.webm +0 -0
- data/vendor/assets/anything-slider/demos.html +740 -0
- data/vendor/assets/anything-slider/expand.html +97 -0
- data/vendor/assets/anything-slider/images/arrows-metallic.png +0 -0
- data/vendor/assets/anything-slider/images/arrows-minimalist.png +0 -0
- data/vendor/assets/anything-slider/images/construction.gif +0 -0
- data/vendor/assets/anything-slider/images/cs-portfolio.png +0 -0
- data/vendor/assets/anything-slider/images/default.png +0 -0
- data/vendor/assets/anything-slider/index.html +470 -0
- data/vendor/assets/anything-slider/js/jquery.anythingslider.fx.js +165 -0
- data/vendor/assets/anything-slider/js/jquery.anythingslider.fx.min.js +6 -0
- data/vendor/assets/anything-slider/js/jquery.anythingslider.js +791 -0
- data/vendor/assets/anything-slider/js/jquery.anythingslider.min.js +7 -0
- data/vendor/assets/anything-slider/js/jquery.anythingslider.video.js +367 -0
- data/vendor/assets/anything-slider/js/jquery.anythingslider.video.min.js +8 -0
- data/vendor/assets/anything-slider/js/jquery.easing.1.2.js +140 -0
- data/vendor/assets/anything-slider/js/jquery.min.js +18 -0
- data/vendor/assets/anything-slider/js/swfobject.js +4 -0
- data/vendor/assets/anything-slider/license.txt +165 -0
- data/vendor/assets/anything-slider/simple.html +79 -0
- data/vendor/assets/anything-slider/video.html +341 -0
- data/vendor/assets/nivo-slider/README +1 -0
- data/vendor/assets/nivo-slider/demo/demo.html +39 -0
- data/vendor/assets/nivo-slider/demo/images/dev7logo.png +0 -0
- data/vendor/assets/nivo-slider/demo/images/nemo.jpg +0 -0
- data/vendor/assets/nivo-slider/demo/images/toystory.jpg +0 -0
- data/vendor/assets/nivo-slider/demo/images/up.jpg +0 -0
- data/vendor/assets/nivo-slider/demo/images/walle.jpg +0 -0
- data/vendor/assets/nivo-slider/demo/scripts/jquery-1.6.1.min.js +18 -0
- data/vendor/assets/nivo-slider/demo/style.css +100 -0
- data/vendor/assets/nivo-slider/jquery.nivo.slider.js +685 -0
- data/vendor/assets/nivo-slider/jquery.nivo.slider.pack.js +67 -0
- data/vendor/assets/nivo-slider/license.txt +22 -0
- data/vendor/assets/nivo-slider/nivo-slider.css +89 -0
- data/vendor/assets/nivo-slider/themes/default/arrows.png +0 -0
- data/vendor/assets/nivo-slider/themes/default/bullets.png +0 -0
- data/vendor/assets/nivo-slider/themes/default/default.css +74 -0
- data/vendor/assets/nivo-slider/themes/default/loading.gif +0 -0
- data/vendor/assets/nivo-slider/themes/orman/arrows.png +0 -0
- data/vendor/assets/nivo-slider/themes/orman/bullets.png +0 -0
- data/vendor/assets/nivo-slider/themes/orman/loading.gif +0 -0
- data/vendor/assets/nivo-slider/themes/orman/orman.css +98 -0
- data/vendor/assets/nivo-slider/themes/orman/readme.txt +1 -0
- data/vendor/assets/nivo-slider/themes/orman/ribbon.png +0 -0
- data/vendor/assets/nivo-slider/themes/orman/slider.png +0 -0
- data/vendor/assets/nivo-slider/themes/pascal/bullets.png +0 -0
- data/vendor/assets/nivo-slider/themes/pascal/controlnav.png +0 -0
- data/vendor/assets/nivo-slider/themes/pascal/featured.png +0 -0
- data/vendor/assets/nivo-slider/themes/pascal/loading.gif +0 -0
- data/vendor/assets/nivo-slider/themes/pascal/pascal.css +102 -0
- data/vendor/assets/nivo-slider/themes/pascal/readme.txt +1 -0
- data/vendor/assets/nivo-slider/themes/pascal/ribbon.png +0 -0
- data/vendor/assets/nivo-slider/themes/pascal/slider.png +0 -0
- metadata +236 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/********************
|
|
2
|
+
Overall Demo pages
|
|
3
|
+
********************/
|
|
4
|
+
body { font: 12px Georgia, Serif; background: #fff; color: #000; }
|
|
5
|
+
a, a img { border: 0; text-decoration: none; }
|
|
6
|
+
|
|
7
|
+
#page-wrap, #demo2 { width: 90%; padding: 0 15px; margin: 0 auto 50px; position: relative; }
|
|
8
|
+
|
|
9
|
+
h1 { font: bold 60px Helvetica, Sans-Serif; letter-spacing: -2px; margin: 20px 0; text-align: center; }
|
|
10
|
+
h2 { font: bold 30px Helvetica, Sans-Serif; letter-spacing: -1px; margin: 0 0 10px 0; color: #002266; }
|
|
11
|
+
h2.title { text-align: center; }
|
|
12
|
+
h3 { font: bold 20px Georgia, Serif; margin: 0 0 10px 0; color: #003388; }
|
|
13
|
+
h5, .header { font: bold 15px Georgia, Serif; text-align: center; }
|
|
14
|
+
pre, code { font: 13px/1.8 Monaco, MonoSpace; margin: 0 0 15px 0; padding: 5px; background: #f5f5f5; block: inline; width: 100%; overflow-x: auto; }
|
|
15
|
+
blockquote { margin-left: 30px; }
|
|
16
|
+
|
|
17
|
+
ul { margin: 0; padding-left: 35px; }
|
|
18
|
+
ul li { font: 15px Georgia, Serif; margin: 0 0 8px 0; }
|
|
19
|
+
|
|
20
|
+
#nav { display: block; width: auto; margin: 10px auto; text-align: center; white-space: nowrap; line-height: 3em; }
|
|
21
|
+
#nav a { text-align: center; background: black; color: white; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; padding: 10px; }
|
|
22
|
+
#nav a.git { background: #006; }
|
|
23
|
+
#nav a.play { background: #060; }
|
|
24
|
+
#nav a.issue { background: #600; }
|
|
25
|
+
#nav a:hover, #nav a.current { background: #666; }
|
|
26
|
+
|
|
27
|
+
.themeselector { margin: 0 auto; text-align: center; }
|
|
28
|
+
|
|
29
|
+
#status { color: #00a; font-weight: bold; }
|
|
30
|
+
.alert { color: #f00; font-weight: bold; }
|
|
31
|
+
.alert a, .attention { color: #a00; }
|
|
32
|
+
.data { width: 100%; border: #555 1px solid; border-collapse: collapse; }
|
|
33
|
+
.data td, .data th { border: #555 1px solid; padding: 0 5px; }
|
|
34
|
+
.data th { background: #eee; }
|
|
35
|
+
.data .col { width: 200px; }
|
|
36
|
+
|
|
37
|
+
/*****************
|
|
38
|
+
Main demo page
|
|
39
|
+
*****************/
|
|
40
|
+
#main #slider1 { width: 800px; height: 390px; list-style: none; }
|
|
41
|
+
#main #slider2 { width: 800px; height: 390px; list-style: none; }
|
|
42
|
+
|
|
43
|
+
/* Set slider1 panel 5 stuff - adding padding directly to the panel will
|
|
44
|
+
shift panels after it, so we need a wrapper */
|
|
45
|
+
#main #slider1 .panel5 ul { width: 200px; margin: 0 5px; }
|
|
46
|
+
|
|
47
|
+
/* Set slider2 panel sizes, Main & FX demo pages */
|
|
48
|
+
#slider2 .panel1 { width: 500px; height: 350px; }
|
|
49
|
+
#slider2 .panel2 { width: 450px; height: 420px; }
|
|
50
|
+
#slider2 .panel3 { width: 680px; height: 317px; }
|
|
51
|
+
#slider2 .panel4 { width: 100%; } /* With no specific size, it defaults to wrapper size; except in IE7, it needs a width defined, so set to 100% */
|
|
52
|
+
#slider2 .panel5 { width: 680px; height: 317px; }
|
|
53
|
+
#slider2 .panel6 { width: 450px; height: 300px; }
|
|
54
|
+
|
|
55
|
+
/* For Specific Slides, these also apply to FX demo pages */
|
|
56
|
+
.textSlide { padding: 10px 30px; }
|
|
57
|
+
.textSlide h3 { font: 20px Georgia, Serif; }
|
|
58
|
+
.textSlide h4 { text-transform: uppercase; font: 15px Georgia, Serif; margin: 10px 0; }
|
|
59
|
+
.textSlide ul { list-style: disc; margin: 0; padding-left: 20px; }
|
|
60
|
+
.textSlide ul li { display: list-item; }
|
|
61
|
+
.rightside { float: right; margin: 0 0 2px 10px; }
|
|
62
|
+
|
|
63
|
+
.quoteSlide { padding: 20px; }
|
|
64
|
+
.quoteSlide blockquote { font: italic 24px/1.5 Georgia, Serif; text-align: center; color: #444; margin: 0 0 10px 0; }
|
|
65
|
+
.quoteSlide p { text-align: center; }
|
|
66
|
+
|
|
67
|
+
/***************************
|
|
68
|
+
FX Demo Page
|
|
69
|
+
***************************/
|
|
70
|
+
/* Demo page accordions */
|
|
71
|
+
.accordion { width: 70%; margin: 0 auto; }
|
|
72
|
+
.accordion .ui-widget-content a { color: #004499; }
|
|
73
|
+
|
|
74
|
+
/** Demo 1 **/
|
|
75
|
+
/* colorbox images to full size */
|
|
76
|
+
#demo2 #slider1 { width: 400px; height: 300px; list-style: none; }
|
|
77
|
+
#cboxPhoto { width: 100%; height: 100%; margin: 0 !important; }
|
|
78
|
+
#cboxTitle { color: #000 !important; }
|
|
79
|
+
|
|
80
|
+
/* Change metallic slider defaults to show thumbnails -
|
|
81
|
+
using #demo2 (page wrapper) to increase this CSS priority */
|
|
82
|
+
#demo2 div.anythingSlider-metallic .thumbNav a { background-image: url(); height: 30px; width: 30px; border: #000 1px solid; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; }
|
|
83
|
+
#demo2 div.anythingSlider-metallic .thumbNav a span { text-indent: 0; }
|
|
84
|
+
|
|
85
|
+
/* border around image to show current page */
|
|
86
|
+
#demo2 div.anythingSlider-metallic .thumbNav a:hover,
|
|
87
|
+
#demo2 div.anythingSlider-metallic .thumbNav a.cur { border-color: #fff; }
|
|
88
|
+
/* reposition the start/stop button */
|
|
89
|
+
#demo2 div.anythingSlider-metallic .start-stop { margin-top: 15px; }
|
|
90
|
+
|
|
91
|
+
/** Demo 2 **/
|
|
92
|
+
#demo2 #slider2 { width: 600px; height: 350px; list-style: none; }
|
|
93
|
+
|
|
94
|
+
/** Demo 3 **/
|
|
95
|
+
#demo2 #slider3 { width: 500px; height: 400px; list-style: none; }
|
|
96
|
+
|
|
97
|
+
/* expand image */
|
|
98
|
+
#slider3 img { width: 100%; height: 100%; position: relative; }
|
|
99
|
+
#slider3 .panel { position: relative; }
|
|
100
|
+
|
|
101
|
+
/* position caption close button */
|
|
102
|
+
.caption-top .close,
|
|
103
|
+
.caption-right .close,
|
|
104
|
+
.caption-bottom .close,
|
|
105
|
+
.caption-left .close { font-size: 80%; cursor: pointer; float: right; display: inline-block; }
|
|
106
|
+
|
|
107
|
+
/* captions */
|
|
108
|
+
/* set to position: relative here in case javascript is disabled, script sets captions to position: absolute */
|
|
109
|
+
#slider3 .caption-top,
|
|
110
|
+
#slider3 .caption-right,
|
|
111
|
+
#slider3 .caption-bottom,
|
|
112
|
+
#slider3 .caption-left { background: #000; color: #fff; padding: 10px; margin: 0; position: relative; z-index: 10; opacity: .8; filter: alpha(opacity=80); }
|
|
113
|
+
|
|
114
|
+
/* Top caption - padding is included in the width (480px here, 500px in the script), same for height */
|
|
115
|
+
#slider3 .caption-top { left: 0; top: 0; width: 480px; height: 30px; }
|
|
116
|
+
|
|
117
|
+
/* Right caption - padding is included in the width (130px here, 150px in the script), same for height */
|
|
118
|
+
#slider3 .caption-right { right: 0; bottom: 0; width: 130px; height: 180px; }
|
|
119
|
+
|
|
120
|
+
/* Bottom caption - padding is included in the width (480px here, 500px in the script), same for height */
|
|
121
|
+
#slider3 .caption-bottom { left: 0; bottom: 0; width: 480px; height: 30px; }
|
|
122
|
+
|
|
123
|
+
/* Left caption - padding is included in the width (130px here, 150px in the script), same for height */
|
|
124
|
+
#slider3 .caption-left { left: 0; bottom: 0; width: 130px; height: 180px; }
|
|
125
|
+
|
|
126
|
+
/******************
|
|
127
|
+
Expand demo page
|
|
128
|
+
******************/
|
|
129
|
+
#wrapper1 { width: 100%; height: 300px; margin: 0 auto; }
|
|
130
|
+
#wrapper2 { width: 50%; height: 300px; margin: 0 auto; }
|
|
131
|
+
#expand #slider1,
|
|
132
|
+
#expand #slider2 { width: 100%; height: 300px; list-style: none; }
|
|
133
|
+
body#expand h2,
|
|
134
|
+
body#expand h3 { text-align: center; }
|
|
135
|
+
|
|
136
|
+
/***************************
|
|
137
|
+
Video Compatibility table
|
|
138
|
+
***************************/
|
|
139
|
+
.video-info { width: 700px; margin: 0 auto; margin-top: 50px; font-size: 18px; }
|
|
140
|
+
.video-info h2 { text-align: center; }
|
|
141
|
+
.video-info ul,
|
|
142
|
+
.video-info li { margin: 0; }
|
|
143
|
+
.video-info sup { font-size: 12px; }
|
|
144
|
+
.video-info th.header { width: 25px; }
|
|
145
|
+
.good { background: #080; }
|
|
146
|
+
.bad { background: #800; }
|
|
147
|
+
.prob { background: #880; }
|
|
148
|
+
.group { border: #000 1px solid; }
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
$(function(){
|
|
2
|
+
|
|
3
|
+
$('.accordion').accordion({
|
|
4
|
+
autoHeight : false,
|
|
5
|
+
collapsible : true,
|
|
6
|
+
active : false // start compressed
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
$('#slider1')
|
|
10
|
+
.anythingSlider({
|
|
11
|
+
toggleControls : true,
|
|
12
|
+
theme : 'metallic',
|
|
13
|
+
navigationFormatter : function(i, panel){
|
|
14
|
+
return '<img src="demos/images/th-slide-' + ['civil-1', 'env-1', 'civil-2', 'env-2'][i-1] + '.jpg">';
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
.find('.panel:not(.cloned) img') // ignore the cloned panels
|
|
18
|
+
.attr('rel','group') // add all slider images to a colorbox group
|
|
19
|
+
.colorbox({
|
|
20
|
+
width : '90%',
|
|
21
|
+
height : '90%',
|
|
22
|
+
href : function(){ return $(this).attr('src'); },
|
|
23
|
+
title : function(){ return $(this).attr('title') },
|
|
24
|
+
rel : 'group'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
$('#slider2')
|
|
28
|
+
.anythingSlider({
|
|
29
|
+
resizeContents : false,
|
|
30
|
+
navigationFormatter : function(i, panel){
|
|
31
|
+
return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2', 'Test'][i - 1];
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
.anythingSliderFx({
|
|
35
|
+
// base FX definitions
|
|
36
|
+
// '.selector' : [ 'effect(s)', 'distance/size', 'time', 'easing' ] - 'time' and 'easing' are optional parameters
|
|
37
|
+
'.quoteSlide:first *' : [ 'grow', '24px', '400', 'easeInOutCirc' ],
|
|
38
|
+
'.quoteSlide:last' : [ 'top', '500px', '400', 'easeOutElastic' ],
|
|
39
|
+
'.expand' : [ 'expand', '10%', '400', 'easeOutBounce' ],
|
|
40
|
+
'.textSlide h3' : [ 'top left', '200px', '500', 'easeOutCirc' ],
|
|
41
|
+
'.textSlide img,.fade': [ 'fade' ],
|
|
42
|
+
'.textSlide li' : [ 'listLR' ]
|
|
43
|
+
/*
|
|
44
|
+
// for more precise control, use the "in" and "out" definitions
|
|
45
|
+
// in = the animation that occurs when you slide "in" to a panel
|
|
46
|
+
,inFx : {
|
|
47
|
+
'.textSlide h3' : { opacity: 1, top : 0, duration: 400, easing : 'easeOutBounce' },
|
|
48
|
+
'.textSlide li' : { opacity: 1, left : 0, duration: 400 },
|
|
49
|
+
'.textSlide img' : { opacity: 1, duration: 400 },
|
|
50
|
+
'.quoteSlide' : { top : 0, duration: 400, easing : 'easeOutElastic' },
|
|
51
|
+
'.expand' : { width: '100%', top: '0%', left: '0%', duration: 400, easing : 'easeOutBounce' }
|
|
52
|
+
},
|
|
53
|
+
// out = the animation that occurs when you slide "out" of a panel
|
|
54
|
+
// (it also occurs before the "in" animation) - outFx animation time is 1/2 of inFx time
|
|
55
|
+
outFx : {
|
|
56
|
+
'.textSlide h3' : { opacity: 0, top : '-100px', duration: 200 },
|
|
57
|
+
'.textSlide li:odd' : { opacity: 0, left : '-200px', duration: 200 },
|
|
58
|
+
'.textSlide li:even' : { opacity: 0, left : '200px', duration: 200 },
|
|
59
|
+
'.textSlide img' : { opacity: 0, duration: 200 },
|
|
60
|
+
'.quoteSlide:first' : { top : '-500px', duration: 200 },
|
|
61
|
+
'.quoteSlide:last' : { top : '500px', duration: 200 },
|
|
62
|
+
'.expand' : { width: '10%', top: '50%', left: '50%', duration: 200 },
|
|
63
|
+
}
|
|
64
|
+
*/
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
$('#slider3')
|
|
68
|
+
.anythingSlider({
|
|
69
|
+
navigationFormatter : function(i, panel){
|
|
70
|
+
return ['Top', 'Right', 'Bottom', 'Left'][i - 1];
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
.anythingSliderFx({
|
|
74
|
+
'.caption-top' : [ 'caption-Top', '50px' ],
|
|
75
|
+
'.caption-right' : [ 'caption-Right', '130px', '1000', 'easeOutBounce' ],
|
|
76
|
+
'.caption-bottom' : [ 'caption-Bottom', '50px' ],
|
|
77
|
+
'.caption-left' : [ 'caption-Left', '130px', '1000', 'easeOutBounce' ]
|
|
78
|
+
})
|
|
79
|
+
/* use this code to have the caption slide in and out from the bottom with each panel
|
|
80
|
+
.anythingSliderFx({
|
|
81
|
+
inFx: {
|
|
82
|
+
'.caption-top' : { top: 0, opacity: 0.8, duration: 400 },
|
|
83
|
+
'.caption-right' : { right: 0, opacity: 0.8, duration: 1000, easing: 'easeOutBounce' },
|
|
84
|
+
'.caption-bottom' : { bottom: 0, opacity: 0.8, duration: 400 },
|
|
85
|
+
'.caption-left' : { left: 0, opacity: 0.8, duration: 1000, easing: 'easeOutBounce' }
|
|
86
|
+
},
|
|
87
|
+
outFx: {
|
|
88
|
+
'.caption-top' : { top: -50, opacity: 0, duration: 200 },
|
|
89
|
+
'.caption-right' : { right: -150, opacity: 0, duration: 500, easing: 'easeOutBounce' },
|
|
90
|
+
'.caption-bottom' : { bottom: -50, opacity: 0, duration: 200 },
|
|
91
|
+
'.caption-left' : { left: -150, opacity: 0, duration: 500, easing: 'easeOutBounce' }
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
*/
|
|
95
|
+
// add a close button (x) to the caption
|
|
96
|
+
.find('div[class*=caption]')
|
|
97
|
+
.css({ position: 'absolute' })
|
|
98
|
+
.prepend('<span class="close">x</span>')
|
|
99
|
+
.find('.close').click(function(){
|
|
100
|
+
var cap = $(this).parent(),
|
|
101
|
+
ani = { bottom : -50 }; // bottom
|
|
102
|
+
if (cap.is('.caption-top')) { ani = { top: -50 }; }
|
|
103
|
+
if (cap.is('.caption-left')) { ani = { left: -150 }; }
|
|
104
|
+
if (cap.is('.caption-right')) { ani = { right: -150 }; }
|
|
105
|
+
cap.animate(ani, 400);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/* use this code if you only want the caption to appear when you hover over the panel
|
|
109
|
+
.find('.panel')
|
|
110
|
+
.find('div[class*=caption]').css({ position: 'absolute' }).end()
|
|
111
|
+
.hover(function(){ showCaptions( $(this) ) }, function(){ hideCaptions( $(this) ); });
|
|
112
|
+
|
|
113
|
+
showCaptions = function(el){
|
|
114
|
+
var $this = el;
|
|
115
|
+
if ($this.find('.caption-top').length) { $this.find('.caption-top').show().animate({ top: 0, opacity: 1 }, 400); }
|
|
116
|
+
if ($this.find('.caption-right').length) { $this.find('.caption-right').show().animate({ right: 0, opacity: 1 }, 400); }
|
|
117
|
+
if ($this.find('.caption-bottom').length) { $this.find('.caption-bottom').show().animate({ bottom: 0, opacity: 1 }, 400); }
|
|
118
|
+
if ($this.find('.caption-left').length) { $this.find('.caption-left').show().animate({ left: 0, opacity: 1 }, 400); }
|
|
119
|
+
};
|
|
120
|
+
hideCaptions = function(el){
|
|
121
|
+
var $this = el;
|
|
122
|
+
if ($this.find('.caption-top').length) { $this.find('.caption-top').stop().animate({ top: -50, opacity: 0 }, 400); }
|
|
123
|
+
if ($this.find('.caption-right').length) { $this.find('.caption-right').stop().animate({ right: -150, opacity: 0 }, 400); }
|
|
124
|
+
if ($this.find('.caption-bottom').length) { $this.find('.caption-bottom').stop().animate({ bottom: -50, opacity: 0 }, 400); }
|
|
125
|
+
if ($this.find('.caption-left').length) { $this.find('.caption-left').stop().animate({ left: -150, opacity: 0 }, 400); }
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// hide all captions initially
|
|
129
|
+
hideCaptions( $('#slider3 .panel') );
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|