flipclockjs-rails 0.4.0b

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ /*! FlipClock 2014-01-20 */
2
+ var Base=function(){};Base.extend=function(a,b){"use strict";var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a<arguments.length;a++)"function"==typeof arguments[a]?arguments[a](this.prototype):this.prototype.extend(arguments[a]);return this},toString:function(){return String(this.valueOf())}});var FlipClock;!function(a){"use strict";FlipClock=function(a,b,c){return new FlipClock.Factory(a,b,c)},FlipClock.Lang={},FlipClock.Base=Base.extend({buildDate:"2013-11-07",version:"0.3.1",constructor:function(b,c){"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={}),this.setOptions(a.extend(!0,{},b,c))},callback:function(a){if("function"==typeof a){for(var b=[],c=1;c<=arguments.length;c++)arguments[c]&&b.push(arguments[c]);a.apply(this,b)}},log:function(a){window.console&&console.log&&console.log(a)},getOption:function(a){return this[a]?this[a]:!1},getOptions:function(){return this},setOption:function(a,b){this[a]=b},setOptions:function(a){for(var b in a)"undefined"!=typeof a[b]&&this.setOption(b,a[b])}}),FlipClock.Factory=FlipClock.Base.extend({autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",defaultClockFace:"HourlyCounter",defaultLanguage:"english",language:"english",lang:!1,face:!0,running:!1,time:!1,timer:!1,lists:[],$wrapper:!1,constructor:function(b,c,d){this.lists=[],this.running=!1,this.base(d),this.$wrapper=a(b).addClass(this.classes.wrapper),this.time=new FlipClock.Time(this,c?Math.round(c):0),this.timer=new FlipClock.Timer(this,d),this.lang=this.loadLanguage(this.language),this.face=this.loadClockFace(this.clockFace,d),this.autoStart&&this.start()},loadClockFace:function(a,b){var c,d="Face";return a=a.ucfirst()+d,c=FlipClock[a]?new FlipClock[a](this,b):new FlipClock[this.defaultClockFace+d](this,b),c.build(),c},loadLanguage:function(a){var b;return b=FlipClock.Lang[a.ucfirst()]?FlipClock.Lang[a.ucfirst()]:FlipClock.Lang[a]?FlipClock.Lang[a]:FlipClock.Lang[this.defaultLanguage]},localize:function(a,b){var c=this.lang;if(!a)return null;var d=a.toLowerCase();return"object"==typeof b&&(c=b),c&&c[d]?c[d]:a},start:function(a){var b=this;b.running||b.countdown&&!(b.countdown&&b.time.time>0)?b.log("Trying to start timer when countdown already at 0"):(b.face.start(b.time),b.timer.start(function(){b.flip(),"function"==typeof a&&a()}))},stop:function(a){this.face.stop(),this.timer.stop(a);for(var b in this.lists)this.lists[b].stop()},reset:function(a){this.timer.reset(a),this.face.reset()},setTime:function(a){this.time.time=a,this.face.setTime(a)},getTime:function(){return this.time},setCountdown:function(a){var b=this.running;this.countdown=a?!0:!1,b&&(this.stop(),this.start())},flip:function(){this.face.flip()}}),FlipClock.Face=FlipClock.Base.extend({dividers:[],factory:!1,lists:[],constructor:function(a,b){this.base(b),this.factory=a,this.dividers=[]},build:function(){},createDivider:function(b,c,d){"boolean"!=typeof c&&c||(d=c,c=b);var e=['<span class="'+this.factory.classes.dot+' top"></span>','<span class="'+this.factory.classes.dot+' bottom"></span>'].join("");d&&(e=""),b=this.factory.localize(b);var f=['<span class="'+this.factory.classes.divider+" "+(c?c:"").toLowerCase()+'">','<span class="'+this.factory.classes.label+'">'+(b?b:"")+"</span>",e,"</span>"];return a(f.join(""))},createList:function(a,b){"object"==typeof a&&(b=a,a=0);var c=new FlipClock.List(this.factory,a,b);return c},reset:function(){},setTime:function(a){this.flip(a)},addDigit:function(a){var b=this.createList(a,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});b.$obj.insertBefore(this.factory.lists[0].$obj),this.factory.lists.unshift(b)},start:function(){},stop:function(){},flip:function(b,c){var d=this;c||(d.factory.countdown?(d.factory.time.time<=0&&d.factory.stop(),d.factory.time.time--):d.factory.time.time++);var e=d.factory.lists.length-b.length;0>e&&(e=0);var f=!1;a.each(b,function(a,b){a+=e;var g=d.factory.lists[a];if(g){var h=g.digit;g.select(b),b==h||c||g.play()}else d.addDigit(b),f=!0});for(var g=0;g<b.length;g++)g>=e&&d.factory.lists[g].digit!=b[g]&&d.factory.lists[g].select(b[g])}}),FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$obj:!1,items:[],constructor:function(a,b){this.factory=a,this.digit=b,this.$obj=this.createList(),b>0&&this.select(b),this.factory.$wrapper.append(this.$obj)},select:function(a){"undefined"==typeof a?a=this.digit:this.digit=a;{var b=this.$obj.find('[data-digit="'+a+'"]');this.$obj.find("."+this.classes.active).removeClass(this.classes.active),this.$obj.find("."+this.classes.before).removeClass(this.classes.before)}this.factory.countdown?b.is(":last-child")?this.$obj.find(":first-child").addClass(this.classes.before):b.next().addClass(this.classes.before):b.is(":first-child")?this.$obj.find(":last-child").addClass(this.classes.before):b.prev().addClass(this.classes.before),b.addClass(this.classes.active)},play:function(){this.$obj.addClass(this.factory.classes.play)},stop:function(){var a=this;setTimeout(function(){a.$obj.removeClass(a.factory.classes.play)},this.factory.timer.interval)},createList:function(){for(var b=a('<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'" />'),c=0;10>c;c++){var d=a(['<li data-digit="'+c+'">','<a href="#">','<div class="up">','<div class="shadow"></div>','<div class="inn">'+c+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn">'+c+"</div>","</div>","</a>","</li>"].join(""));this.items.push(d),b.append(d)}return b}}),FlipClock.Time=FlipClock.Base.extend({minimumDigits:0,time:0,factory:!1,constructor:function(a,b,c){this.base(c),this.factory=a,b&&(this.time=b)},convertDigitsToArray:function(a){var b=[];a=a.toString();for(var c=0;c<a.length;c++)a[c].match(/^\d*$/g)&&b.push(a[c]);return b},digit:function(a){var b=this.toString(),c=b.length;return b[c-a]?b[c-a]:!1},digitize:function(b){var c=[];return a.each(b,function(a,b){b=b.toString(),1==b.length&&(b="0"+b);for(var d=0;d<b.length;d++)c.push(b[d])}),c.length>this.minimumDigits&&(this.minimumDigits=c.length),this.minimumDigits>c.length&&c.unshift("0"),c},getDayCounter:function(a){var b=[this.getDays(),this.getHours(!0),this.getMinutes(!0)];return a&&b.push(this.getSeconds(!0)),this.digitize(b)},getDays:function(a){var b=this.time/60/60/24;return a&&(b%=7),Math.floor(b)},getHourCounter:function(){var a=this.digitize([this.getHours(),this.getMinutes(!0),this.getSeconds(!0)]);return a},getHourly:function(){return this.getHourCounter()},getHours:function(a){var b=this.time/60/60;return a&&(b%=24),Math.floor(b)},getMilitaryTime:function(){var a=new Date,b=this.digitize([a.getHours(),a.getMinutes(),a.getSeconds()]);return b},getMinutes:function(a){var b=this.time/60;return a&&(b%=60),Math.floor(b)},getMinuteCounter:function(){var a=this.digitize([this.getMinutes(),this.getSeconds(!0)]);return a},getSeconds:function(a){var b=this.time;return a&&(60==b?b=0:b%=60),Math.ceil(b)},getTime:function(){var a=new Date,b=a.getHours(),c=this.digitize([b>12?b-12:0===b?12:b,a.getMinutes(),a.getSeconds()]);return c},getWeeks:function(){var a=this.time/60/60/24/7;return mod&&(a%=52),Math.floor(a)},removeLeadingZeros:function(b,c){var d=0,e=[];return a.each(c,function(a){b>a?d+=parseInt(c[a],10):e.push(c[a])}),0===d?e:c},toString:function(){return this.time.toString()}}),FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,constructor:function(a,b){this.base(b),this.factory=a,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(a){clearInterval(this.timer),this.count=0,this._setInterval(a),this.callback(this.callbacks.reset)},start:function(a){this.factory.running=!0,this._createTimer(a),this.callback(this.callbacks.start)},stop:function(a){this.factory.running=!1,this._clearInterval(a),this.callback(this.callbacks.stop),this.callback(a)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(a){this._setInterval(a)},_destroyTimer:function(a){this._clearInterval(),this.timer=!1,this.callback(a),this.callback(this.callbacks.destroy)},_interval:function(a){this.callback(this.callbacks.interval),this.callback(a),this.count++},_setInterval:function(a){var b=this;b.timer=setInterval(function(){b._interval(a)},this.interval)}}),String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},a.fn.FlipClock=function(b,c){return"object"==typeof b&&(c=b,b=0),new FlipClock(a(this),b,c)},a.fn.flipClock=function(b,c){return a.fn.FlipClock(b,c)}}(jQuery),function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(a,b){a.countdown=!1,this.base(a,b)},build:function(b){var c=this,d=this.factory.$wrapper.find("ul");b=b?b:this.factory.time.time||this.factory.time.getMilitaryTime(),b.length>d.length&&a.each(b,function(a,b){c.factory.lists.push(c.createList(b))}),this.dividers.push(this.createDivider()),this.dividers.push(this.createDivider()),a(this.dividers[0]).insertBefore(this.factory.lists[this.factory.lists.length-2].$obj),a(this.dividers[1]).insertBefore(this.factory.lists[this.factory.lists.length-4].$obj),this._clearExcessDigits(),this.autoStart&&this.start()},flip:function(a){a=a?a:this.factory.time.getMilitaryTime(),this.base(a)},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(a){FlipClock.CounterFace=FlipClock.Face.extend({autoStart:!1,constructor:function(a,b){a.timer.interval=0,a.autoStart=!1,a.running=!0,a.increment=function(){a.countdown=!1,a.setTime(a.getTime().time+1)},a.decrement=function(){a.countdown=!0,a.setTime(a.getTime().time-1)},a.setValue=function(b){a.setTime(b)},a.setCounter=function(b){a.setTime(b)},this.base(a,b)},build:function(){var b=this,c=this.factory.$wrapper.find("ul"),d=[],e=this.factory.getTime().digitize([this.factory.getTime().time]);e.length>c.length&&a.each(e,function(a,c){var e=b.createList(c);e.select(c),d.push(e)}),a.each(d,function(a,b){b.play()}),this.factory.lists=d},flip:function(a){var b=this.factory.getTime().digitize([this.factory.getTime().time]);this.base(b,a)}})}(jQuery),function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$wrapper.find("ul"),f=[],g=0;c=c?c:this.factory.time.getDayCounter(this.showSeconds),c.length>e.length&&a.each(c,function(a,b){f.push(d.createList(b))}),this.factory.lists=f,this.showSeconds?a(this.createDivider("Seconds")).insertBefore(this.factory.lists[this.factory.lists.length-2].$obj):g=2,a(this.createDivider("Minutes")).insertBefore(this.factory.lists[this.factory.lists.length-4+g].$obj),a(this.createDivider("Hours")).insertBefore(this.factory.lists[this.factory.lists.length-6+g].$obj),a(this.createDivider("Days",!0)).insertBefore(this.factory.lists[0].$obj),this._clearExcessDigits(),this.autoStart&&this.start()},flip:function(a,b){b||(b=this.factory.time.getDayCounter(this.showSeconds)),this.base(b,a)},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({clearExcessDigits:!0,constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$wrapper.find("ul"),f=[];c=c?c:this.factory.time.getHourCounter(),c.length>e.length&&a.each(c,function(a,b){f.push(d.createList(b))}),this.factory.lists=f,a(this.createDivider("Seconds")).insertBefore(this.factory.lists[this.factory.lists.length-2].$obj),a(this.createDivider("Minutes")).insertBefore(this.factory.lists[this.factory.lists.length-4].$obj),b||a(this.createDivider("Hours",!0)).insertBefore(this.factory.lists[0].$obj),this.clearExcessDigits&&this._clearExcessDigits(),this.autoStart&&this.start()},flip:function(a,b){b||(b=this.factory.time.getHourCounter()),this.base(b,a)},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(a,b){this.base(a,b)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(a){this.base(a,this.factory.time.getMinuteCounter())}})}(jQuery),function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(b){b=b?b:this.factory.time.time?this.factory.time.time:this.factory.time.getTime(),this.base(b),this.meridiumText=this._isPM()?"PM":"AM",this.meridium=a(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join("")),this.meridium.insertAfter(this.factory.lists[this.factory.lists.length-1].$obj)},flip:function(){this.meridiumText!=this._getMeridium()&&(this.meridiumText=this._getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime())},_getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},_isPM:function(){return"PM"==this._getMeridium()?!0:!1},_clearExcessDigits:function(){for(var a=this.factory.lists[this.factory.lists.length-2],b=this.factory.lists[this.factory.lists.length-4],c=6;10>c;c++)a.$obj.find("li:last-child").remove(),b.$obj.find("li:last-child").remove()}})}(jQuery),function(){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German}(jQuery),function(){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English}(jQuery),function(){FlipClock.Lang.Spanish={years:"A&#241;os",months:"Meses",days:"D&#205;as",hours:"Horas",minutes:"Minutos",seconds:"Segundo"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery),function(){FlipClock.Lang.French={years:"ans",months:"mois",days:"jours",hours:"heures",minutes:"minutes",seconds:"secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French}(jQuery);
@@ -0,0 +1,427 @@
1
+ /* Get the bourbon mixin from http://bourbon.io */
2
+ /* Reset */
3
+ .flip-clock-wrapper * {
4
+ -webkit-box-sizing: border-box;
5
+ -moz-box-sizing: border-box;
6
+ -ms-box-sizing: border-box;
7
+ -o-box-sizing: border-box;
8
+ box-sizing: border-box;
9
+ -webkit-backface-visibility: hidden;
10
+ -moz-backface-visibility: hidden;
11
+ -ms-backface-visibility: hidden;
12
+ -o-backface-visibility: hidden;
13
+ backface-visibility: hidden;
14
+ }
15
+
16
+ .flip-clock-wrapper a {
17
+ cursor: pointer;
18
+ text-decoration: none;
19
+ color: #ccc; }
20
+
21
+ .flip-clock-wrapper a:hover {
22
+ color: #fff; }
23
+
24
+ .flip-clock-wrapper ul {
25
+ list-style: none; }
26
+
27
+ .flip-clock-wrapper.clearfix:before,
28
+ .flip-clock-wrapper.clearfix:after {
29
+ content: " ";
30
+ display: table; }
31
+
32
+ .flip-clock-wrapper.clearfix:after {
33
+ clear: both; }
34
+
35
+ .flip-clock-wrapper.clearfix {
36
+ *zoom: 1; }
37
+
38
+ /* Main */
39
+ .flip-clock-wrapper {
40
+ font: normal 11px "Helvetica Neue", Helvetica, sans-serif;
41
+ -webkit-user-select: none; }
42
+
43
+ .flip-clock-meridium {
44
+ background: none !important;
45
+ box-shadow: 0 0 0 !important;
46
+ font-size: 36px !important; }
47
+
48
+ .flip-clock-meridium a { color: #313333; }
49
+
50
+ .flip-clock-wrapper {
51
+ text-align: center;
52
+ position: relative;
53
+ width: 100%;
54
+ margin: 1em;
55
+ }
56
+
57
+ .flip-clock-wrapper:before,
58
+ .flip-clock-wrapper:after {
59
+ content: " "; /* 1 */
60
+ display: table; /* 2 */
61
+ }
62
+ .flip-clock-wrapper:after {
63
+ clear: both;
64
+ }
65
+
66
+ /* Skeleton */
67
+ .flip-clock-wrapper ul {
68
+ position: relative;
69
+ float: left;
70
+ margin: 5px;
71
+ width: 60px;
72
+ height: 90px;
73
+ font-size: 80px;
74
+ font-weight: bold;
75
+ line-height: 87px;
76
+ border-radius: 6px;
77
+ background: #000;
78
+ }
79
+
80
+ .flip-clock-wrapper ul li {
81
+ z-index: 1;
82
+ position: absolute;
83
+ left: 0;
84
+ top: 0;
85
+ width: 100%;
86
+ height: 100%;
87
+ text-decoration: none !important;
88
+ }
89
+
90
+ .flip-clock-wrapper ul li:first-child {
91
+ z-index: 2; }
92
+
93
+ .flip-clock-wrapper ul li a {
94
+ display: block;
95
+ height: 100%;
96
+ -webkit-perspective: 200px;
97
+ -moz-perspective: 200px;
98
+ perspective: 200px;
99
+ margin: 0 !important;
100
+ overflow: visible !important;
101
+ cursor: default !important; }
102
+
103
+ .flip-clock-wrapper ul li a div {
104
+ z-index: 1;
105
+ position: absolute;
106
+ left: 0;
107
+ width: 100%;
108
+ height: 50%;
109
+ font-size: 80px;
110
+ outline: 1px solid transparent;
111
+ overflow: hidden; }
112
+
113
+ .flip-clock-wrapper ul li a div .shadow {
114
+ position: absolute;
115
+ width: 100%;
116
+ height: 100%;
117
+ z-index: 2; }
118
+
119
+ .flip-clock-wrapper ul li a div.up {
120
+ -webkit-transform-origin: 50% 100%;
121
+ -moz-transform-origin: 50% 100%;
122
+ -ms-transform-origin: 50% 100%;
123
+ -o-transform-origin: 50% 100%;
124
+ transform-origin: 50% 100%;
125
+ top: 0; }
126
+
127
+ .flip-clock-wrapper ul li a div.up:after {
128
+ content: "";
129
+ position: absolute;
130
+ top: 44px;
131
+ left: 0;
132
+ z-index: 5;
133
+ width: 100%;
134
+ height: 3px;
135
+ background-color: #000;
136
+ background-color: rgba(0, 0, 0, 0.4); }
137
+
138
+ .flip-clock-wrapper ul li a div.down {
139
+ -webkit-transform-origin: 50% 0;
140
+ -moz-transform-origin: 50% 0;
141
+ -ms-transform-origin: 50% 0;
142
+ -o-transform-origin: 50% 0;
143
+ transform-origin: 50% 0;
144
+ bottom: 0; }
145
+
146
+ .flip-clock-wrapper ul li a div div.inn {
147
+ position: absolute;
148
+ left: 0;
149
+ z-index: 1;
150
+ width: 100%;
151
+ height: 200%;
152
+ color: #ccc;
153
+ text-shadow: 0 1px 2px #000;
154
+ text-align: center;
155
+ background-color: #333;
156
+ border-radius: 6px;
157
+ font-size: 70px; }
158
+
159
+ .flip-clock-wrapper ul li a div.up div.inn {
160
+ top: 0; }
161
+
162
+ .flip-clock-wrapper ul li a div.down div.inn {
163
+ bottom: 0; }
164
+
165
+ /* PLAY */
166
+ .flip-clock-wrapper ul.play li.flip-clock-before {
167
+ z-index: 3; }
168
+
169
+ .flip-clock-wrapper .flip { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7); }
170
+
171
+ .flip-clock-wrapper ul.play li.flip-clock-active {
172
+ -webkit-animation: asd 0.5s 0.5s linear both;
173
+ -moz-animation: asd 0.5s 0.5s linear both;
174
+ animation: asd 0.5s 0.5s linear both;
175
+ z-index: 5; }
176
+
177
+ .flip-clock-divider {
178
+ float: left;
179
+ display: inline-block;
180
+ position: relative;
181
+ width: 20px;
182
+ height: 100px; }
183
+
184
+ .flip-clock-divider:first-child {
185
+ width: 0; }
186
+
187
+ .flip-clock-dot {
188
+ display: block;
189
+ background: #323434;
190
+ width: 10px;
191
+ height: 10px;
192
+ position: absolute;
193
+ border-radius: 50%;
194
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
195
+ left: 5px; }
196
+
197
+ .flip-clock-divider .flip-clock-label {
198
+ position: absolute;
199
+ top: -1.5em;
200
+ right: -86px;
201
+ color: black;
202
+ text-shadow: none; }
203
+
204
+ .flip-clock-divider.minutes .flip-clock-label {
205
+ right: -88px; }
206
+
207
+ .flip-clock-divider.seconds .flip-clock-label {
208
+ right: -91px; }
209
+
210
+ .flip-clock-dot.top {
211
+ top: 30px; }
212
+
213
+ .flip-clock-dot.bottom {
214
+ bottom: 30px; }
215
+
216
+ @-webkit-keyframes asd {
217
+ 0% {
218
+ z-index: 2; }
219
+
220
+ 20% {
221
+ z-index: 4; }
222
+
223
+ 100% {
224
+ z-index: 4; } }
225
+
226
+ @-moz-keyframes asd {
227
+ 0% {
228
+ z-index: 2; }
229
+
230
+ 20% {
231
+ z-index: 4; }
232
+
233
+ 100% {
234
+ z-index: 4; } }
235
+
236
+ @-o-keyframes asd {
237
+ 0% {
238
+ z-index: 2; }
239
+
240
+ 20% {
241
+ z-index: 4; }
242
+
243
+ 100% {
244
+ z-index: 4; } }
245
+
246
+ @keyframes asd {
247
+ 0% {
248
+ z-index: 2; }
249
+
250
+ 20% {
251
+ z-index: 4; }
252
+
253
+ 100% {
254
+ z-index: 4; } }
255
+
256
+ .flip-clock-wrapper ul.play li.flip-clock-active .down {
257
+ z-index: 2;
258
+ -webkit-animation: turn 0.5s 0.5s linear both;
259
+ -moz-animation: turn 0.5s 0.5s linear both;
260
+ animation: turn 0.5s 0.5s linear both; }
261
+
262
+ @-webkit-keyframes turn {
263
+ 0% {
264
+ -webkit-transform: rotateX(90deg); }
265
+
266
+ 100% {
267
+ -webkit-transform: rotateX(0deg); } }
268
+
269
+ @-moz-keyframes turn {
270
+ 0% {
271
+ -moz-transform: rotateX(90deg); }
272
+
273
+ 100% {
274
+ -moz-transform: rotateX(0deg); } }
275
+
276
+ @-o-keyframes turn {
277
+ 0% {
278
+ -o-transform: rotateX(90deg); }
279
+
280
+ 100% {
281
+ -o-transform: rotateX(0deg); } }
282
+
283
+ @keyframes turn {
284
+ 0% {
285
+ transform: rotateX(90deg); }
286
+
287
+ 100% {
288
+ transform: rotateX(0deg); } }
289
+
290
+ .flip-clock-wrapper ul.play li.flip-clock-before .up {
291
+ z-index: 2;
292
+ -webkit-animation: turn2 0.5s linear both;
293
+ -moz-animation: turn2 0.5s linear both;
294
+ animation: turn2 0.5s linear both; }
295
+
296
+ @-webkit-keyframes turn2 {
297
+ 0% {
298
+ -webkit-transform: rotateX(0deg); }
299
+
300
+ 100% {
301
+ -webkit-transform: rotateX(-90deg); } }
302
+
303
+ @-moz-keyframes turn2 {
304
+ 0% {
305
+ -moz-transform: rotateX(0deg); }
306
+
307
+ 100% {
308
+ -moz-transform: rotateX(-90deg); } }
309
+
310
+ @-o-keyframes turn2 {
311
+ 0% {
312
+ -o-transform: rotateX(0deg); }
313
+
314
+ 100% {
315
+ -o-transform: rotateX(-90deg); } }
316
+
317
+ @keyframes turn2 {
318
+ 0% {
319
+ transform: rotateX(0deg); }
320
+
321
+ 100% {
322
+ transform: rotateX(-90deg); } }
323
+
324
+ .flip-clock-wrapper ul li.flip-clock-active {
325
+ z-index: 3; }
326
+
327
+ /* SHADOW */
328
+ .flip-clock-wrapper ul.play li.flip-clock-before .up .shadow {
329
+ background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%);
330
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black));
331
+ background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%;
332
+ background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%);
333
+ background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%);
334
+ background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%;
335
+ -webkit-animation: show 0.5s linear both;
336
+ -moz-animation: show 0.5s linear both;
337
+ animation: show 0.5s linear both; }
338
+
339
+ .flip-clock-wrapper ul.play li.flip-clock-active .up .shadow {
340
+ background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%);
341
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black));
342
+ background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%;
343
+ background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%);
344
+ background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%);
345
+ background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%;
346
+ -webkit-animation: hide 0.5s 0.3s linear both;
347
+ -moz-animation: hide 0.5s 0.3s linear both;
348
+ animation: hide 0.5s 0.3s linear both; }
349
+
350
+ /*DOWN*/
351
+ .flip-clock-wrapper ul.play li.flip-clock-before .down .shadow {
352
+ background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%);
353
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1)));
354
+ background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%;
355
+ background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%);
356
+ background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%);
357
+ background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%;
358
+ -webkit-animation: show 0.5s linear both;
359
+ -moz-animation: show 0.5s linear both;
360
+ animation: show 0.5s linear both; }
361
+
362
+ .flip-clock-wrapper ul.play li.flip-clock-active .down .shadow {
363
+ background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%);
364
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1)));
365
+ background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%;
366
+ background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%);
367
+ background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%);
368
+ background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%;
369
+ -webkit-animation: hide 0.5s 0.3s linear both;
370
+ -moz-animation: hide 0.5s 0.3s linear both;
371
+ animation: hide 0.5s 0.2s linear both; }
372
+
373
+ @-webkit-keyframes show {
374
+ 0% {
375
+ opacity: 0; }
376
+
377
+ 100% {
378
+ opacity: 1; } }
379
+
380
+ @-moz-keyframes show {
381
+ 0% {
382
+ opacity: 0; }
383
+
384
+ 100% {
385
+ opacity: 1; } }
386
+
387
+ @-o-keyframes show {
388
+ 0% {
389
+ opacity: 0; }
390
+
391
+ 100% {
392
+ opacity: 1; } }
393
+
394
+ @keyframes show {
395
+ 0% {
396
+ opacity: 0; }
397
+
398
+ 100% {
399
+ opacity: 1; } }
400
+
401
+ @-webkit-keyframes hide {
402
+ 0% {
403
+ opacity: 1; }
404
+
405
+ 100% {
406
+ opacity: 0; } }
407
+
408
+ @-moz-keyframes hide {
409
+ 0% {
410
+ opacity: 1; }
411
+
412
+ 100% {
413
+ opacity: 0; } }
414
+
415
+ @-o-keyframes hide {
416
+ 0% {
417
+ opacity: 1; }
418
+
419
+ 100% {
420
+ opacity: 0; } }
421
+
422
+ @keyframes hide {
423
+ 0% {
424
+ opacity: 1; }
425
+
426
+ 100% {
427
+ opacity: 0; } }
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flipclockjs-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0b
5
+ prerelease: 5
6
+ platform: ruby
7
+ authors:
8
+ - Trevor Strieber
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-02-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.5'
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: '1.5'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
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
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: jquery-rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.17
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.17
62
+ description: This gem packages FlipClock.js (JS & CSS) for the Rails 3.1+ asset pipeline.
63
+ email:
64
+ - trevor@strieber.org
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - lib/flipclockjs-rails/version.rb
70
+ - lib/flipclockjs-rails.rb
71
+ - vendor/assets/javascripts/flipclock.js
72
+ - vendor/assets/javascripts/flipclock.min.js
73
+ - vendor/assets/stylesheets/flipclock.css
74
+ - LICENSE.txt
75
+ - README.md
76
+ homepage: https://github.com/TrevorS/flipclockjs-rails
77
+ licenses:
78
+ - MIT
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>'
93
+ - !ruby/object:Gem::Version
94
+ version: 1.3.1
95
+ requirements: []
96
+ rubyforge_project:
97
+ rubygems_version: 1.8.23
98
+ signing_key:
99
+ specification_version: 3
100
+ summary: FlipClock.js's JS & CSS for the Rails 3.1+ asset pipeline.
101
+ test_files: []