Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Valery Kamensky
committed
Feb 26, 2013
1 parent
9f0138c
commit 65a85b9
Showing
9 changed files
with
2,251 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Demo</title> | ||
<script src="../vendor/require.js"></script> | ||
<link rel="stylesheet" type="text/css" href="../css/lenta.css" /> | ||
<style type="text/css"> | ||
|
||
html, body {height: 100%} | ||
body {margin: 0; padding: 0;} | ||
|
||
|
||
.lenta-scrollbar-handler { | ||
height: 10px; | ||
width: 10px; | ||
position: absolute; | ||
bottom: 0px; | ||
background: #666; | ||
-webkit-border-radius: 5px; | ||
border-radius: 5px; | ||
} | ||
|
||
.lenta-scrollbar { | ||
height: 10px; | ||
width: 100%; | ||
position: absolute; | ||
bottom: 0px; | ||
background: #ddd; | ||
z-index: 9999; | ||
} | ||
|
||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<div class="lenta loading" | ||
data-lenta-height="600"> | ||
|
||
<a class="lenta-next lenta-btn" href="#next">next</a> | ||
<a class="lenta-prev lenta-btn" href="#prev">prev</a> | ||
|
||
<div class="lenta-viewport"> | ||
<ul> | ||
<li class="loading" data-lenta-width="612" data-lenta-height="612"> | ||
<img data-src="images/1.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="1024" data-lenta-height="681"> | ||
<img data-src="images/2.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="424" data-lenta-height="684"> | ||
<img data-src="images/3.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="940" data-lenta-height="660"> | ||
<img data-src="images/4.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="424" data-lenta-height="684"> | ||
<img data-src="images/5.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="987" data-lenta-height="684"> | ||
<img data-src="images/6.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="940" data-lenta-height="668"> | ||
<img data-src="images/7.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="612" data-lenta-height="612"> | ||
<img data-src="images/8.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="940" data-lenta-height="656"> | ||
<img data-src="images/9.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="1024" data-lenta-height="666"> | ||
<img data-src="images/10.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="457" data-lenta-height="684"> | ||
<img data-src="images/11.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
<li class="loading" data-lenta-width="710" data-lenta-height="300"> | ||
<img data-src="images/12.jpg" src="data:image/gif," alt=""/> | ||
</li> | ||
</ul> | ||
<div class="lenta-scrollbar"><div class="lenta-scrollbar-handler"></div></div> | ||
</div> | ||
|
||
</div> | ||
|
||
<script> | ||
|
||
requirejs.config({ | ||
baseUrl: '../' + (document.location.hash == '#dist'? 'dist': 'src'), | ||
paths: { | ||
'backbone': '../vendor/backbone-min', | ||
'underscore': '../vendor/underscore-min', | ||
'jquery': '../vendor/jquery-1.9.0.min', | ||
'loading-queue': '../vendor/jquery.loading-queue.min', | ||
'draggable': '../vendor/jquery-ui-1.10.1.draggable' | ||
}, | ||
shim: { | ||
'draggable': { | ||
deps: ['jquery'], | ||
exports: '$' | ||
}, | ||
'loading-queue': { | ||
deps: ['jquery'], | ||
exports: '$' | ||
}, | ||
'backbone': { | ||
deps: ['jquery', 'underscore'], | ||
exports: 'Backbone' | ||
} | ||
} | ||
}); | ||
|
||
require(['lenta', 'loading-queue'],function(Lenta){ | ||
|
||
var lenta = new Lenta({ | ||
el: $('.lenta') | ||
}); | ||
|
||
lenta.render(); | ||
|
||
$('img').each(function() { | ||
$(this).loadingQueue().then(function(img) { | ||
$(img).parent('li').removeClass('loading'); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.