first commit
This commit is contained in:
@@ -0,0 +1,226 @@
|
||||
.cn-slideshow{
|
||||
width: 770px;
|
||||
height: 415px;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.cn-loading{
|
||||
position: absolute;
|
||||
z-index:999;
|
||||
text-indent: -9000px;
|
||||
opacity:0.6;
|
||||
top:50%;
|
||||
left:50%;
|
||||
margin:-25px 0 0 -25px;
|
||||
width:50px;
|
||||
height:50px;
|
||||
background: url(loading.gif) no-repeat center center;
|
||||
}
|
||||
|
||||
.cn-images{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cn-images img{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
-webkit-border-radius: 0 0 7px 7px;
|
||||
-moz-border-radius: 0 0 7px 7px;
|
||||
border-radius: 0 0 7px 7px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cn-bar {
|
||||
height: 80px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
color: #f8f8f8;
|
||||
-webkit-border-radius: 0 0 7px 7px;
|
||||
-moz-border-radius: 0 0 7px 7px;
|
||||
border-radius: 0 0 7px 7px;
|
||||
background-color: rgba(0,0,0,.9);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.ie7 .cn-bar,
|
||||
.ie8 .cn-bar {
|
||||
background: url(../../images/mask.png) repeat;
|
||||
}
|
||||
|
||||
.cn-nav {
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.cn-nav-content{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
z-index: 999;
|
||||
height: 100%;
|
||||
right: 70px;
|
||||
left: 70px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cn-nav-content div{
|
||||
float: left;
|
||||
width: 130px;
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
.cn-nav-content span{
|
||||
color:#777;
|
||||
}
|
||||
|
||||
.cn-nav-content div.cn-nav-content-current{
|
||||
text-align: center;
|
||||
width: 280px;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:50%;
|
||||
margin-left:-140px;
|
||||
}
|
||||
|
||||
.cn-nav-content h2{
|
||||
margin-top: .7em;
|
||||
font-size: 1.25em;
|
||||
color:#719806;
|
||||
}
|
||||
|
||||
.cn-nav-content-current span{
|
||||
color:#d0ab47;
|
||||
}
|
||||
|
||||
.cn-nav-content div.cn-nav-content-prev{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.cn-nav-content div.cn-nav-content-next{
|
||||
text-align: right;
|
||||
margin-right: 20px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.cn-nav-content div span{
|
||||
display: block;
|
||||
color:#fff;
|
||||
font-size: 1.833em;
|
||||
padding-top: 20px;
|
||||
font-weight: 100;
|
||||
font-family: 'PT Sans Narrow', sans-serif;
|
||||
}
|
||||
|
||||
.cn-nav-content div strong {
|
||||
display: block;
|
||||
color:#fff;
|
||||
padding-top: 18px;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
.cn-nav > a{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
height: 80px;
|
||||
width: 56px;
|
||||
-webkit-border-radius: 1px 9px 0 5px;
|
||||
-moz-border-radius: 1px 9px 0 5px;
|
||||
border-radius: 1px 9px 0 5px;
|
||||
background: rgb(243,243,243); /* Old browsers */
|
||||
background: -moz-linear-gradient(top, rgba(243,243,243,1) 0%, rgba(232,232,232,1) 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(243,243,243,1)), color-stop(100%,rgba(232,232,232,1))); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, rgba(243,243,243,1) 0%,rgba(232,232,232,1) 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, rgba(243,243,243,1) 0%,rgba(232,232,232,1) 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, rgba(243,243,243,1) 0%,rgba(232,232,232,1) 100%); /* IE10+ */
|
||||
background: linear-gradient(top, rgba(243,243,243,1) 0%,rgba(232,232,232,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#e8e8e8',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
|
||||
.cn-nav > a.cn-nav-next {
|
||||
-webkit-border-radius: 9px 1px 5px 0;
|
||||
-moz-border-radius: 9px 1px 5px 0;
|
||||
border-radius: 9px 1px 5px 0;
|
||||
}
|
||||
|
||||
a.cn-nav-prev{
|
||||
left: 0;
|
||||
}
|
||||
|
||||
a.cn-nav-next{
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.cn-nav a span{
|
||||
width: 22px;
|
||||
height: 36px;
|
||||
display: block;
|
||||
text-indent: -9000px;
|
||||
cursor: pointer;
|
||||
opacity: 0.9;
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
-webkit-transition: all 0.4s ease;
|
||||
-moz-transition: all 0.4s ease;
|
||||
-o-transition: all 0.4s ease;
|
||||
-ms-transition: all 0.4s ease;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.cn-nav a.cn-nav-prev span {
|
||||
left: 14px;
|
||||
background: url(prev.png) no-repeat center center;
|
||||
}
|
||||
|
||||
.cn-nav a.cn-nav-next span {
|
||||
right: 14px;
|
||||
background: url(next.png) no-repeat center center;
|
||||
|
||||
}
|
||||
|
||||
.cn-nav-prev div {
|
||||
top: 13px;
|
||||
left: 63px;
|
||||
}
|
||||
|
||||
.cn-nav-next div {
|
||||
top: 13px;
|
||||
right: 63px;
|
||||
}
|
||||
|
||||
.cn-nav a div{
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
background-size: 100% 100%;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
margin: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
-ms-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
behavior: url(js/PIE.htc);
|
||||
}
|
||||
|
||||
.cn-nav a:hover span{
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.cn-nav a:hover div{
|
||||
width: 99px;
|
||||
height: 53px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
(function(a,b,c){b.Slideshow=function(a,c){this.$el=b(c);this.$preloader=b('<div class="cn-loading">Loading...</div>');this.$images=this.$el.find("div.cn-images > img").hide();this.imgCount=this.$images.length;this.isAnimating=false;this._init(a)};b.Slideshow.defaults={current:0};b.Slideshow.prototype={_init:function(a){this.options=b.extend(true,{},b.Slideshow.defaults,a);this._validate();this.current=this.options.current;this.$preloader.appendTo(this.$el);var c=this;this._preloadImages(function(){c.$preloader.hide();c.$images.eq(c.current).show();c.bar=new b.NavigationBar(c.imgCount,c._getStatus());c.bar.getElement().appendTo(c.$el);c._initEvents()})},_preloadImages:function(a){var c=0,d=this;this.$images.each(function(e){var f=b(this);b("<img/>").load(function(){++c;if(c===d.imgCount*2)a.call()}).attr("src",f.attr("src"));b("<img/>").load(function(){++c;if(c===d.imgCount*2)a.call()}).attr("src",f.data("thumb"))})},_validate:function(){if(this.options.current<0||this.options.current>=this.imgCount)this.options.current=0},_getStatus:function(){var a=this.$images.eq(this.current),b,c;this.current===0?c=this.$images.eq(this.imgCount-1):c=a.prev();this.current===this.imgCount-1?b=this.$images.eq(0):b=a.next();return{prevSource:c.data("thumb"),nextSource:b.data("thumb"),prevTitle:c.attr("title"),currentTitle:a.attr("title"),nextTitle:b.attr("title")}},_initEvents:function(){var a=this;this.bar.$navPrev.bind("click.slideshow",function(b){a._navigate("prev");return false});this.bar.$navNext.bind("click.slideshow",function(b){a._navigate("next");return false})},_navigate:function(a){if(this.isAnimating)return false;this.isAnimating=true;var c=this.$images.eq(this.current).css("z-index",998),d=this;a==="prev"?this.current===0?this.current=this.imgCount-1:--this.current:this.current===this.imgCount-1?this.current=0:++this.current;this.$images.eq(this.current).show();c.fadeOut(400,function(){b(this).css("z-index",1);d.isAnimating=false});this.bar.set(this._getStatus())}};b.NavigationBar=function(a,b){this._init(a,b)};b.NavigationBar.prototype={_init:function(a,c){this.$el=b("#barTmpl").tmpl(c);this.$navPrev=this.$el.find("a.cn-nav-prev");this.$thumbPrev=this.$navPrev.children("div");this.$navNext=this.$el.find("a.cn-nav-next");this.$thumbNext=this.$navNext.children("div");this.$statusPrev=this.$el.find("div.cn-nav-content-prev > h3");this.$statusCurrent=this.$el.find("div.cn-nav-content-current > h2");this.$statusNext=this.$el.find("div.cn-nav-content-next > h3");if(a<=1){this.$navPrev.hide();this.$navNext.hide();this.$statusPrev.parent().hide();this.$statusNext.parent().hide()}},getElement:function(){return this.$el},set:function(a){this.$thumbPrev.css("background-image","url("+a.prevSource+")");this.$thumbNext.css("background-image","url("+a.nextSource+")");this.$statusPrev.text(a.prevTitle);this.$statusCurrent.text(a.currentTitle);this.$statusNext.text(a.nextTitle)}};var d=function(a){if(this.console){console.error(a)}};b.fn.slideshow=function(a){if(typeof a==="string"){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var e=b.data(this,"slideshow");if(!e){d("cannot call methods on slideshow prior to initialization; "+"attempted to call method '"+a+"'");return}if(!b.isFunction(e[a])||a.charAt(0)==="_"){d("no such method '"+a+"' for slideshow instance");return}e[a].apply(e,c)})}else{this.each(function(){var c=b.data(this,"slideshow");if(!c){b.data(this,"slideshow",new b.Slideshow(a,this))}})}return this}})(window,jQuery)
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 741 B |
Binary file not shown.
|
After Width: | Height: | Size: 734 B |
Reference in New Issue
Block a user