Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows for multiple instantiations and cleans up CSS/JS #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 18 additions & 32 deletions assets/touchTouch/touchTouch.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* The gallery overlay */

#galleryOverlay{
.touchtouch-galleryOverlay{
width:100%;
height:100%;
position:fixed;
Expand All @@ -12,19 +12,17 @@
background-color:rgba(0,0,0,0.8);
overflow:hidden;
display:none;

-moz-transition:opacity 1s ease;
-webkit-transition:opacity 1s ease;
transition:opacity 1s ease;
}

/* This class will trigger the animation */

#galleryOverlay.visible{
.touchtouch-galleryOverlay.visible{
opacity:1;
}

#gallerySlider{
.touchtouch-gallerySlider{
height:100%;

left:0;
Expand All @@ -33,13 +31,11 @@
width:100%;
white-space: nowrap;
position:absolute;

-moz-transition:left 0.4s ease;
-webkit-transition:left 0.4s ease;
transition:left 0.4s ease;
}

#gallerySlider .placeholder{
.touchtouch-gallerySlider .touchtouch-placeholder{
background: url("preloader.gif") no-repeat center center;
height: 100%;
line-height: 1px;
Expand All @@ -51,62 +47,54 @@
/* The before element moves the
* image halfway from the top */

#gallerySlider .placeholder:before{
.touchtouch-gallerySlider .touchtouch-placeholder:before{
content: "";
display: inline-block;
height: 50%;
width: 1px;
margin-right:-1px;
}

#gallerySlider .placeholder img{
.touchtouch-gallerySlider .touchtouch-placeholder img{
display: inline-block;
max-height: 100%;
max-width: 100%;
vertical-align: middle;
}

#gallerySlider.rightSpring{
-moz-animation: rightSpring 0.3s;
.touchtouch-gallerySlider.rightSpring{
-webkit-animation: rightSpring 0.3s;
animation: rightSpring 0.3s;
}

#gallerySlider.leftSpring{
-moz-animation: leftSpring 0.3s;
.touchtouch-gallerySlider.leftSpring{
-webkit-animation: leftSpring 0.3s;
animation: leftSpring 0.3s;
}

/* Firefox Keyframe Animations */
/* Safari and Chrome Keyframe Animations */

@-moz-keyframes rightSpring{
@-webkit-keyframes rightSpring{
0%{ margin-left:0px;}
50%{ margin-left:-30px;}
100%{ margin-left:0px;}
}

@-moz-keyframes leftSpring{
@-webkit-keyframes leftSpring{
0%{ margin-left:0px;}
50%{ margin-left:30px;}
100%{ margin-left:0px;}
}

/* Safari and Chrome Keyframe Animations */

@-webkit-keyframes rightSpring{
0%{ margin-left:0px;}
50%{ margin-left:-30px;}
100%{ margin-left:0px;}
}

@-webkit-keyframes leftSpring{
@keyframes leftSpring{
0%{ margin-left:0px;}
50%{ margin-left:30px;}
100%{ margin-left:0px;}
}

/* Arrows */

#prevArrow,#nextArrow{
.touchtouch-prevArrow,.touchtouch-nextArrow{
border:none;
text-decoration:none;
background:url('arrows.png') no-repeat;
Expand All @@ -118,22 +106,20 @@

top:50%;
margin-top:-29px;

-moz-transition:opacity 0.2s ease;
-webkit-transition:opacity 0.2s ease;
transition:opacity 0.2s ease;
}

#prevArrow:hover, #nextArrow:hover{
.touchtouch-prevArrow:hover, .touchtouch-nextArrow:hover{
opacity:1;
}

#prevArrow{
.touchtouch-prevArrow{
background-position:left top;
left:40px;
}

#nextArrow{
.touchtouch-nextArrow{
background-position:right top;
right:40px;
}
Loading