nivo-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in nivo-rails.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Robin Dupret
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # Nivo::Rails
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'nivo-rails'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install nivo-rails
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,15 @@
1
+ module NivoHelper
2
+ def nivo_slider(hash = {}, &block)
3
+ options = { :theme => :default, :id => "" }
4
+ options.merge!(hash)
5
+ klass = "slide-wrapper theme-#{options[:theme]}"
6
+ id = options[:id]
7
+
8
+ content_tag(:div, :class => klass) do
9
+ content_tag(:div, :id => id, :class => "nivoSlider #{options[:class]}") do
10
+ yield
11
+ end
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,8 @@
1
+ require "nivo/version"
2
+ require "nivo/rails/engine"
3
+
4
+ module Nivo
5
+ module Rails
6
+ # Your code goes here...
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Nivo
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Nivo
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'nivo/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "nivo-rails"
8
+ gem.version = Nivo::Rails::VERSION
9
+ gem.authors = ["Robin Dupret"]
10
+ gem.email = ["robin.dupret@gmail.com"]
11
+ gem.description = %q{Nivo slider with Ruby on Rails}
12
+ gem.summary = %q{This gem allows you to use Nivo slider with Ruby on Rails}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency("rake")
21
+ end
@@ -0,0 +1,10 @@
1
+ /*
2
+ * jQuery Nivo Slider v3.2
3
+ * http://nivo.dev7studios.com
4
+ *
5
+ * Copyright 2012, Dev7studios
6
+ * Free to use and abuse under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ */
9
+
10
+ (function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("<img/>").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('<div class="nivo-caption"></div>'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+r.prevText+'</a><a class="nivo-nextNav">'+r.nextText+"</a></div>");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('<div class="nivo-controlNav"></div>');s.after(i.controlNavEl);for(var l=0;l<o.length;l++){if(r.controlNavThumbs){i.controlNavEl.addClass("nivo-thumbs-enabled");var c=o.eq(l);if(!c.is("img")){c=c.find("img:first")}if(c.attr("data-thumb"))i.controlNavEl.append('<a class="nivo-control" rel="'+l+'"><img src="'+c.attr("data-thumb")+'" alt="" /></a>')}else{i.controlNavEl.append('<a class="nivo-control" rel="'+l+'">'+(l+1)+"</a>")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s<n.slices;s++){var o=Math.round(t.width()/n.slices);if(s===n.slices-1){t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o<n.boxRows;o++){for(var a=0;a<n.boxCols;a++){if(a===n.boxCols-1){t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x<r.boxCols*2;x++){var T=x;for(var N=0;N<r.boxRows;N++){if(T>=0&&T<r.boxCols){(function(n,i,s,u,a){var f=e(S[n][i]);var l=f.width();var c=f.height();if(o==="boxRainGrow"||o==="boxRainGrowReverse"){f.width(0).height(0)}if(u===a-1){setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3,"",function(){t.trigger("nivo:animFinished")})},100+s)}else{setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3)},100+s)}})(N,T,l,c,g);c++}T--}l+=100}}};var v=function(e){for(var t,n,r=e.length;r;t=parseInt(Math.random()*r,10),n=e[--r],e[r]=e[t],e[t]=n);return e};var m=function(e){if(this.console&&typeof console.log!=="undefined"){console.log(e)}};this.stop=function(){if(!e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=true;m("Stop Slider")}};this.start=function(){if(e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=false;m("Start Slider")}};r.afterLoad.call(this);return this};e.fn.nivoSlider=function(n){return this.each(function(r,i){var s=e(this);if(s.data("nivoslider")){return s.data("nivoslider")}var o=new t(this,n);s.data("nivoslider",o)})};e.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,controlNav:true,controlNavThumbs:false,pauseOnHover:true,manualAdvance:false,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};e.fn._reverse=[].reverse})(jQuery)
@@ -0,0 +1,508 @@
1
+ /*
2
+ * jQuery Nivo Slider v3.2
3
+ * http://nivo.dev7studios.com
4
+ *
5
+ * Copyright 2012, Dev7studios
6
+ * Free to use and abuse under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ */
9
+
10
+ /* The Nivo Slider styles */
11
+ .nivoSlider {
12
+ position:relative;
13
+ width:100%;
14
+ height:auto;
15
+ overflow: hidden;
16
+ }
17
+ .nivoSlider img {
18
+ position:absolute;
19
+ top:0px;
20
+ left:0px;
21
+ max-width: none;
22
+ }
23
+ .nivo-main-image {
24
+ display: block !important;
25
+ position: relative !important;
26
+ width: 100% !important;
27
+ }
28
+
29
+ /* If an image is wrapped in a link */
30
+ .nivoSlider a.nivo-imageLink {
31
+ position:absolute;
32
+ top:0px;
33
+ left:0px;
34
+ width:100%;
35
+ height:100%;
36
+ border:0;
37
+ padding:0;
38
+ margin:0;
39
+ z-index:6;
40
+ display:none;
41
+ background:white;
42
+ filter:alpha(opacity=0);
43
+ opacity:0;
44
+ }
45
+ /* The slices and boxes in the Slider */
46
+ .nivo-slice {
47
+ display:block;
48
+ position:absolute;
49
+ z-index:5;
50
+ height:100%;
51
+ top:0;
52
+ }
53
+ .nivo-box {
54
+ display:block;
55
+ position:absolute;
56
+ z-index:5;
57
+ overflow:hidden;
58
+ }
59
+ .nivo-box img { display:block; }
60
+
61
+ /* Caption styles */
62
+ .nivo-caption {
63
+ position:absolute;
64
+ left:0px;
65
+ bottom:0px;
66
+ background:#000;
67
+ color:#fff;
68
+ width:100%;
69
+ z-index:8;
70
+ padding: 5px 10px;
71
+ opacity: 0.8;
72
+ overflow: hidden;
73
+ display: none;
74
+ -moz-opacity: 0.8;
75
+ filter:alpha(opacity=8);
76
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
77
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
78
+ box-sizing: border-box; /* Opera/IE 8+ */
79
+ }
80
+ .nivo-caption p {
81
+ padding:5px;
82
+ margin:0;
83
+ }
84
+ .nivo-caption a {
85
+ display:inline !important;
86
+ }
87
+ .nivo-html-caption {
88
+ display:none;
89
+ }
90
+ /* Direction nav styles (e.g. Next & Prev) */
91
+ .nivo-directionNav a {
92
+ position:absolute;
93
+ top:45%;
94
+ z-index:9;
95
+ cursor:pointer;
96
+ }
97
+ .nivo-prevNav {
98
+ left:0px;
99
+ }
100
+ .nivo-nextNav {
101
+ right:0px;
102
+ }
103
+ /* Control nav styles (e.g. 1,2,3...) */
104
+ .nivo-controlNav {
105
+ text-align:center;
106
+ padding: 15px 0;
107
+ }
108
+ .nivo-controlNav a {
109
+ cursor:pointer;
110
+ }
111
+ .nivo-controlNav a.active {
112
+ font-weight:bold;
113
+ }
114
+
115
+ /* Themes */
116
+
117
+ .theme-light.slider-wrapper {
118
+ background: #fff;
119
+ padding: 10px;
120
+ }
121
+ .theme-light .nivoSlider {
122
+ position:relative;
123
+ background:#fff url(light/loading.gif) no-repeat 50% 50%;
124
+ margin-bottom:10px;
125
+ overflow: visible;
126
+ }
127
+ .theme-light .nivoSlider img {
128
+ position:absolute;
129
+ top:0px;
130
+ left:0px;
131
+ display:none;
132
+ }
133
+ .theme-light .nivoSlider a {
134
+ border:0;
135
+ display:block;
136
+ }
137
+
138
+ .theme-light .nivo-controlNav {
139
+ text-align: left;
140
+ padding: 0;
141
+ position: relative;
142
+ z-index: 10;
143
+ }
144
+ .theme-light .nivo-controlNav a {
145
+ display:inline-block;
146
+ width:10px;
147
+ height:10px;
148
+ background:url(light/bullets.png) no-repeat;
149
+ text-indent:-9999px;
150
+ border:0;
151
+ margin: 0 2px;
152
+ }
153
+ .theme-light .nivo-controlNav a.active {
154
+ background-position:0 100%;
155
+ }
156
+
157
+ .theme-light .nivo-directionNav a {
158
+ display:block;
159
+ width:30px;
160
+ height:30px;
161
+ background: url(light/arrows.png) no-repeat;
162
+ text-indent:-9999px;
163
+ border:0;
164
+ top: auto;
165
+ bottom: -36px;
166
+ z-index: 11;
167
+ }
168
+ .theme-light .nivo-directionNav a:hover {
169
+ background-color: #eee;
170
+ -webkit-border-radius: 2px;
171
+ -moz-border-radius: 2px;
172
+ border-radius: 2px;
173
+ }
174
+ .theme-light a.nivo-nextNav {
175
+ background-position:160% 50%;
176
+ right:0px;
177
+ }
178
+ .theme-light a.nivo-prevNav {
179
+ background-position:-60% 50%;
180
+ left: auto;
181
+ right: 35px;
182
+ }
183
+
184
+ .theme-light .nivo-caption {
185
+ font-family: Helvetica, Arial, sans-serif;
186
+ }
187
+ .theme-light .nivo-caption a {
188
+ color:#fff;
189
+ border-bottom:1px dotted #fff;
190
+ }
191
+ .theme-light .nivo-caption a:hover {
192
+ color:#fff;
193
+ }
194
+
195
+ .theme-light .nivo-controlNav.nivo-thumbs-enabled {
196
+ width: 80%;
197
+ }
198
+ .theme-light .nivo-controlNav.nivo-thumbs-enabled a {
199
+ width: auto;
200
+ height: auto;
201
+ background: none;
202
+ margin-bottom: 5px;
203
+ }
204
+ .theme-light .nivo-controlNav.nivo-thumbs-enabled img {
205
+ display: block;
206
+ width: 120px;
207
+ height: auto;
208
+ }
209
+
210
+ .theme-default .nivoSlider {
211
+ position:relative;
212
+ background:#fff url(default/loading.gif) no-repeat 50% 50%;
213
+ margin-bottom:10px;
214
+ -webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
215
+ -moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
216
+ box-shadow: 0px 1px 5px 0px #4a4a4a;
217
+ }
218
+ .theme-default .nivoSlider img {
219
+ position:absolute;
220
+ top:0px;
221
+ left:0px;
222
+ display:none;
223
+ }
224
+ .theme-default .nivoSlider a {
225
+ border:0;
226
+ display:block;
227
+ }
228
+
229
+ .theme-default .nivo-controlNav {
230
+ text-align: center;
231
+ padding: 20px 0;
232
+ }
233
+ .theme-default .nivo-controlNav a {
234
+ display:inline-block;
235
+ width:22px;
236
+ height:22px;
237
+ background:url(default/bullets.png) no-repeat;
238
+ text-indent:-9999px;
239
+ border:0;
240
+ margin: 0 2px;
241
+ }
242
+ .theme-default .nivo-controlNav a.active {
243
+ background-position:0 -22px;
244
+ }
245
+
246
+ .theme-default .nivo-directionNav a {
247
+ display:block;
248
+ width:30px;
249
+ height:30px;
250
+ background:url(default/arrows.png) no-repeat;
251
+ text-indent:-9999px;
252
+ border:0;
253
+ opacity: 0;
254
+ -webkit-transition: all 200ms ease-in-out;
255
+ -moz-transition: all 200ms ease-in-out;
256
+ -o-transition: all 200ms ease-in-out;
257
+ transition: all 200ms ease-in-out;
258
+ }
259
+ .theme-default:hover .nivo-directionNav a { opacity: 1; }
260
+ .theme-default a.nivo-nextNav {
261
+ background-position:-30px 0;
262
+ right:15px;
263
+ }
264
+ .theme-default a.nivo-prevNav {
265
+ left:15px;
266
+ }
267
+
268
+ .theme-default .nivo-caption {
269
+ font-family: Helvetica, Arial, sans-serif;
270
+ }
271
+ .theme-default .nivo-caption a {
272
+ color:#fff;
273
+ border-bottom:1px dotted #fff;
274
+ }
275
+ .theme-default .nivo-caption a:hover {
276
+ color:#fff;
277
+ }
278
+
279
+ .theme-default .nivo-controlNav.nivo-thumbs-enabled {
280
+ width: 100%;
281
+ }
282
+ .theme-default .nivo-controlNav.nivo-thumbs-enabled a {
283
+ width: auto;
284
+ height: auto;
285
+ background: none;
286
+ margin-bottom: 5px;
287
+ }
288
+ .theme-default .nivo-controlNav.nivo-thumbs-enabled img {
289
+ display: block;
290
+ width: 120px;
291
+ height: auto;
292
+ }
293
+
294
+ .theme-dark.slider-wrapper {
295
+ background: #222;
296
+ padding: 10px;
297
+ }
298
+ .theme-dark .nivoSlider {
299
+ position:relative;
300
+ background:#fff url(dark/loading.gif) no-repeat 50% 50%;
301
+ margin-bottom:10px;
302
+ overflow: visible;
303
+ }
304
+ .theme-dark .nivoSlider img {
305
+ position:absolute;
306
+ top:0px;
307
+ left:0px;
308
+ display:none;
309
+ }
310
+ .theme-dark .nivoSlider a {
311
+ border:0;
312
+ display:block;
313
+ }
314
+
315
+ .theme-dark .nivo-controlNav {
316
+ text-align: left;
317
+ padding: 0;
318
+ position: relative;
319
+ z-index: 10;
320
+ }
321
+ .theme-dark .nivo-controlNav a {
322
+ display:inline-block;
323
+ width:10px;
324
+ height:10px;
325
+ background:url(dark/bullets.png) no-repeat 0 2px;
326
+ text-indent:-9999px;
327
+ border:0;
328
+ margin: 0 2px;
329
+ }
330
+ .theme-dark .nivo-controlNav a.active {
331
+ background-position:0 100%;
332
+ }
333
+
334
+ .theme-dark .nivo-directionNav a {
335
+ display:block;
336
+ width:30px;
337
+ height:30px;
338
+ background: url(dark/arrows.png) no-repeat;
339
+ text-indent:-9999px;
340
+ border:0;
341
+ top: auto;
342
+ bottom: -36px;
343
+ z-index: 11;
344
+ }
345
+ .theme-dark .nivo-directionNav a:hover {
346
+ background-color: #333;
347
+ -webkit-border-radius: 2px;
348
+ -moz-border-radius: 2px;
349
+ border-radius: 2px;
350
+ }
351
+ .theme-dark a.nivo-nextNav {
352
+ background-position:-16px 50%;
353
+ right:0px;
354
+ }
355
+ .theme-dark a.nivo-prevNav {
356
+ background-position:11px 50%;
357
+ left: auto;
358
+ right: 35px;
359
+ }
360
+
361
+ .theme-dark .nivo-caption {
362
+ font-family: Helvetica, Arial, sans-serif;
363
+ }
364
+ .theme-dark .nivo-caption a {
365
+ color:#fff;
366
+ border-bottom:1px dotted #fff;
367
+ }
368
+ .theme-dark .nivo-caption a:hover {
369
+ color:#fff;
370
+ }
371
+
372
+ .theme-dark .nivo-controlNav.nivo-thumbs-enabled {
373
+ width: 80%;
374
+ }
375
+ .theme-dark .nivo-controlNav.nivo-thumbs-enabled a {
376
+ width: auto;
377
+ height: auto;
378
+ background: none;
379
+ margin-bottom: 5px;
380
+ }
381
+ .theme-dark .nivo-controlNav.nivo-thumbs-enabled img {
382
+ display: block;
383
+ width: 120px;
384
+ height: auto;
385
+ }
386
+
387
+ .theme-bar.slider-wrapper {
388
+ position: relative;
389
+ border: 1px solid #333;
390
+ overflow: hidden;
391
+ }
392
+ .theme-bar .nivoSlider {
393
+ position:relative;
394
+ background:#fff url(bar/loading.gif) no-repeat 50% 50%;
395
+ }
396
+ .theme-bar .nivoSlider img {
397
+ position:absolute;
398
+ top:0px;
399
+ left:0px;
400
+ display:none;
401
+ }
402
+ .theme-bar .nivoSlider a {
403
+ border:0;
404
+ display:block;
405
+ }
406
+
407
+ .theme-bar .nivo-controlNav {
408
+ position: absolute;
409
+ left: 0;
410
+ bottom: -41px;
411
+ z-index: 10;
412
+ width: 100%;
413
+ height: 30px;
414
+ text-align: center;
415
+ padding: 5px 0;
416
+ border-top: 1px solid #333;
417
+ background: #333;
418
+ background: -moz-linear-gradient(top, #565656 0%, #333333 100%); /* FF3.6+ */
419
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565656), color-stop(100%,#333333)); /* Chrome,Safari4+ */
420
+ background: -webkit-linear-gradient(top, #565656 0%,#333333 100%); /* Chrome10+,Safari5.1+ */
421
+ background: -o-linear-gradient(top, #565656 0%,#333333 100%); /* Opera 11.10+ */
422
+ background: -ms-linear-gradient(top, #565656 0%,#333333 100%); /* IE10+ */
423
+ background: linear-gradient(to bottom, #565656 0%,#333333 100%); /* W3C */
424
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#565656', endColorstr='#333333',GradientType=0 ); /* IE6-9 */
425
+ opacity: 0.5;
426
+ -webkit-transition: all 200ms ease-in-out;
427
+ -moz-transition: all 200ms ease-in-out;
428
+ -o-transition: all 200ms ease-in-out;
429
+ transition: all 200ms ease-in-out;
430
+ }
431
+ .theme-bar:hover .nivo-controlNav {
432
+ bottom: 0;
433
+ opacity: 1;
434
+ }
435
+ .theme-bar .nivo-controlNav a {
436
+ display:inline-block;
437
+ width:22px;
438
+ height:22px;
439
+ background: url(bar/bullets.png) no-repeat;
440
+ text-indent:-9999px;
441
+ border:0;
442
+ margin: 5px 2px 0 2px;
443
+ }
444
+ .theme-bar .nivo-controlNav a.active {
445
+ background-position:0 -22px;
446
+ }
447
+
448
+ .theme-bar .nivo-directionNav a {
449
+ display:block;
450
+ border:0;
451
+ color: #fff;
452
+ text-transform: uppercase;
453
+ top: auto;
454
+ bottom: 10px;
455
+ z-index: 11;
456
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
457
+ font-size: 13px;
458
+ line-height: 20px;
459
+ opacity: 0.5;
460
+ -webkit-transition: all 200ms ease-in-out;
461
+ -moz-transition: all 200ms ease-in-out;
462
+ -o-transition: all 200ms ease-in-out;
463
+ transition: all 200ms ease-in-out;
464
+ }
465
+ .theme-bar a.nivo-nextNav { right: -50px; }
466
+ .theme-bar a.nivo-prevNav { left: -50px; }
467
+ .theme-bar:hover a.nivo-nextNav {
468
+ right: 15px;
469
+ opacity: 1;
470
+ }
471
+ .theme-bar:hover a.nivo-prevNav {
472
+ left: 15px;
473
+ opacity: 1;
474
+ }
475
+ .theme-bar .nivo-directionNav a:hover { color: #ddd; }
476
+
477
+ .theme-bar .nivo-caption {
478
+ font-family: Helvetica, Arial, sans-serif;
479
+ -webkit-transition: all 200ms ease-in-out;
480
+ -moz-transition: all 200ms ease-in-out;
481
+ -o-transition: all 200ms ease-in-out;
482
+ transition: all 200ms ease-in-out;
483
+ }
484
+ .theme-bar:hover .nivo-caption {
485
+ bottom: 41px;
486
+ }
487
+ .theme-bar .nivo-caption a {
488
+ color:#fff;
489
+ border-bottom:1px dotted #fff;
490
+ }
491
+ .theme-bar .nivo-caption a:hover {
492
+ color:#fff;
493
+ }
494
+
495
+ .theme-bar .nivo-controlNav.nivo-thumbs-enabled {
496
+ width: 100%;
497
+ }
498
+ .theme-bar .nivo-controlNav.nivo-thumbs-enabled a {
499
+ width: auto;
500
+ height: auto;
501
+ background: none;
502
+ margin-bottom: 5px;
503
+ }
504
+ .theme-bar .nivo-controlNav.nivo-thumbs-enabled img {
505
+ display: block;
506
+ width: 120px;
507
+ height: auto;
508
+ }
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nivo-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Robin Dupret
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Nivo slider with Ruby on Rails
31
+ email:
32
+ - robin.dupret@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - Gemfile
39
+ - LICENSE
40
+ - README.md
41
+ - Rakefile
42
+ - app/helpers/nivo_helper.rb
43
+ - lib/nivo-rails.rb
44
+ - lib/nivo/rails/engine.rb
45
+ - lib/nivo/version.rb
46
+ - nivo-rails.gemspec
47
+ - vendor/assets/images/bar/arrows.png
48
+ - vendor/assets/images/bar/bullets.png
49
+ - vendor/assets/images/bar/loading.gif
50
+ - vendor/assets/images/dark/.DS_Store
51
+ - vendor/assets/images/dark/arrows.png
52
+ - vendor/assets/images/dark/bullets.png
53
+ - vendor/assets/images/dark/loading.gif
54
+ - vendor/assets/images/default/arrows.png
55
+ - vendor/assets/images/default/bullets.png
56
+ - vendor/assets/images/default/loading.gif
57
+ - vendor/assets/images/light/arrows.png
58
+ - vendor/assets/images/light/bullets.png
59
+ - vendor/assets/images/light/loading.gif
60
+ - vendor/assets/javascripts/nivo.js
61
+ - vendor/assets/stylesheets/nivo.css
62
+ homepage: ''
63
+ licenses: []
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ segments:
75
+ - 0
76
+ hash: -2464822413493816712
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ segments:
84
+ - 0
85
+ hash: -2464822413493816712
86
+ requirements: []
87
+ rubyforge_project:
88
+ rubygems_version: 1.8.24
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: This gem allows you to use Nivo slider with Ruby on Rails
92
+ test_files: []