Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
Added CHANGELOG and bower.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbitron committed Sep 2, 2014
1 parent db938be commit 65c77ab
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ideal Image Slider Changelog

Version 1.0.0 - 2014.09.02
--------------------------
* Initial release
23 changes: 23 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "ideal-image-slider",
"main": "ideal-image-slider.js",
"version": "1.0.0",
"homepage": "https://github.com/gilbitron/Ideal-Image-Slider",
"authors": [
"Gilbert Pellegrom <[email protected]>"
],
"description": "Quite simply the ideal Image Slider in vanilla JS",
"keywords": [
"image",
"slider",
"javascript",
"vanilla"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"tests"
]
}
16 changes: 8 additions & 8 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@
<title>Ideal Image Slider Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="../ideal-image-slider.css">
<link rel="stylesheet" href="../themes/default/default.css">
<style media="screen">
.slider {
#slider {
max-width: 900px;
margin: 50px auto;
}
</style>
</head>
<body>

<div class="slider">
<img src="img/1.jpg" data-src-2x="img/[email protected]" alt="" />
<img data-src="img/2.jpg" data-src-2x="img/[email protected]" src="" alt="" />
<img data-src="img/3.jpg" data-src-2x="img/[email protected]" src="" alt="" />
<img data-src="img/4.jpg" data-src-2x="img/[email protected]" src="" alt="" />
<div id="slider">
<img src="img/1.jpg" data-src-2x="img/[email protected]" alt="Slide 1" />
<img data-src="img/2.jpg" data-src-2x="img/[email protected]" src="" alt="Slide 2" />
<img data-src="img/3.jpg" data-src-2x="img/[email protected]" src="" alt="Slide 3" />
<img data-src="img/4.jpg" data-src-2x="img/[email protected]" src="" alt="Slide 4" />
<img data-src="img/5.jpg" src="" alt="" />
</div>

<script src="../ideal-image-slider.js"></script>
<script>
var slider = new IdealImageSlider.Slider({
selector: '.slider'
selector: '#slider'
});
slider.start();
</script>
Expand Down
11 changes: 11 additions & 0 deletions example/css/style.css → ideal-image-slider.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Ideal Image Slider v1.0.0
*
* By Gilbert Pellegrom
* http://gilbert.pellegrom.me
*
* Free to use and abuse under the MIT license.
* https://raw.githubusercontent.com/gilbitron/Ideal-Image-Slider/master/LICENSE
*/

.ideal-image-slider {
position: relative;
overflow: hidden;
Expand All @@ -11,6 +21,7 @@
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: cover;
text-indent: -999%;
}

/* Slide effect */
Expand Down
11 changes: 11 additions & 0 deletions ideal-image-slider.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Ideal Image Slider v1.0.0
*
* By Gilbert Pellegrom
* http://gilbert.pellegrom.me
*
* Free to use and abuse under the MIT license.
* https://raw.githubusercontent.com/gilbitron/Ideal-Image-Slider/master/LICENSE
*/

var IdealImageSlider = (function() {
"use strict";

Expand Down Expand Up @@ -146,6 +156,7 @@ var IdealImageSlider = (function() {

if(slide.getAttribute('className')) _addClass(imgDiv, slide.getAttribute('className'));
if(slide.getAttribute('id')) imgDiv.setAttribute('id', slide.id);
if(slide.getAttribute('alt')) imgDiv.innerHTML = slide.getAttribute('alt');
imgDiv.setAttribute('role', 'option');

imgDiv.style.cssText += '-webkit-transition-duration:'+ this.settings.transitionDuration +'ms;-moz-transition-duration:'+ this.settings.transitionDuration +'ms;-o-transition-duration:'+ this.settings.transitionDuration +'ms;transition-duration:'+ this.settings.transitionDuration +'ms;';
Expand Down

0 comments on commit 65c77ab

Please sign in to comment.