lazy loading finished

This commit is contained in:
Tom Canac 2014-01-30 18:08:57 +01:00
parent 2f1b77af2e
commit a508ee9079
44 changed files with 369 additions and 329 deletions

0
.gitattributes vendored Normal file → Executable file
View file

0
.gitignore vendored Normal file → Executable file
View file

0
.htaccess Normal file → Executable file
View file

0
README.md Normal file → Executable file
View file

0
config.php Normal file → Executable file
View file

0
createthumb.php Normal file → Executable file
View file

0
css/mediaboxAdvBlack21.css Normal file → Executable file
View file

0
css/mediaboxAdvWhite.css Normal file → Executable file
View file

0
humans.txt Normal file → Executable file
View file

0
images/50.gif Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 77 B

0
images/80.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

0
images/cannotopen.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
images/close.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 417 B

0
images/filetype_DOCX.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

0
images/filetype_GZ.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
images/filetype_PDF.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
images/filetype_PPTX.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 9 KiB

After

Width:  |  Height:  |  Size: 9 KiB

0
images/filetype_RAR.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
images/filetype_TAR.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
images/filetype_XLXS.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

0
images/filetype_ZIP.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
images/folder_black.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
images/folder_blue.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

0
images/folder_green.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

0
images/folder_grey.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

0
images/folder_purple.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
images/folder_vista.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
images/loader.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

0
images/questionmark.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

4
index.php Normal file → Executable file
View file

@ -236,13 +236,13 @@ if (file_exists($currentdir ."/captions.txt"))
"name" => $file,
"date" => filemtime($currentdir . "/" . $file),
"size" => filesize($currentdir . "/" . $file),
"html" => "<li><a href='" . $currentdir . "/" . $file . "' rel='lightbox[billeder]' title=\"".htmlentities($img_captions[$file])."\"><span></span><img class=\"b-lazy\" src=data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== data-src='" . GALLERY_ROOT . "createthumb.php?filename=" . $thumbdir . "/" . $file . "&amp;size=$thumb_size' alt='$label_loading' /></a></li>");
"html" => "<li><a href='" . $currentdir . "/" . $file . "' rel='lightbox[billeder]' title=\"".htmlentities($img_captions[$file])."\"><img class=\"b-lazy\" src=data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== data-src='" . GALLERY_ROOT . "createthumb.php?filename=" . $thumbdir . "/" . $file . "&amp;size=$thumb_size' alt='$label_loading' /></a></li>");
} else {
$files[] = array (
"name" => $file,
"date" => filemtime($currentdir . "/" . $file),
"size" => filesize($currentdir . "/" . $file),
"html" => "<li><a href='" . $currentdir . "/" . $file . "' rel='lightbox[billeder]' title=\"".htmlentities($img_captions[$file])."\"><span></span><img src='" . GALLERY_ROOT . "createthumb.php?filename=" . $thumbdir . "/" . $file . "&amp;size=$thumb_size' alt='$label_loading' /></a></li>");
"html" => "<li><a href='" . $currentdir . "/" . $file . "' rel='lightbox[billeder]' title=\"".htmlentities($img_captions[$file])."\"><img src='" . GALLERY_ROOT . "createthumb.php?filename=" . $thumbdir . "/" . $file . "&amp;size=$thumb_size' alt='$label_loading' /></a></li>");
}
}
// Other filetypes

0
integrate.php Normal file → Executable file
View file

0
js/lazy.js Normal file → Executable file
View file

0
js/mediaboxAdv-1.3.4b.js Normal file → Executable file
View file

0
js/mootools.js Normal file → Executable file
View file

0
system_check.php Normal file → Executable file
View file

1
templates/board.html Normal file → Executable file
View file

@ -13,7 +13,6 @@
var bLazy = new Blazy;
}, false);
</script>
<script src="<% gallery_root %>js/mootools.js"></script>
<script src="<% gallery_root %>js/mediaboxAdv-1.3.4b.js"></script>
<link rel="stylesheet" href="<% gallery_root %>css/mediaboxAdvWhite.css" type="text/css" media="screen" />

0
templates/darkgold2.html Normal file → Executable file
View file

0
templates/exhibition.html Normal file → Executable file
View file

27
templates/rounded.html Normal file → Executable file
View file

@ -7,10 +7,15 @@
<title><% title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="alternate" type="application/rss+xml" title="<% title %>" href="rss/" /><link>
<script src="<% gallery_root %>js/lazy.js"></script>
<script>
window.addEventListener('load', function(){
var bLazy = new Blazy;
}, false);
</script>
<script src="<% gallery_root %>js/mootools.js"></script>
<script src="<% gallery_root %>js/mediaboxAdv-1.3.4b.js"></script>
<link rel="stylesheet" href="<% gallery_root %>css/mediaboxAdvWhite.css" type="text/css" media="screen" />
<style type="text/css">
html {
font-size:62.5%;
@ -134,6 +139,20 @@
text-decoration:none;
color:#666;
}
/*----lazyloading---*/
.loader{
background: url('images/loader.gif') center center no-repeat;
}
.b-lazy {
-webkit-transition: opacity 100ms ease-in-out 10ms;
-moz-transition: opacity 100ms ease-in-out 10ms;
-o-transition: opacity 100ms ease-in-out 10ms;
transition: opacity 100ms ease-in-out 10ms;
opacity: 0;
}
.b-lazy.b-loaded {
opacity: 1;
}
/*----responsive----*/
#gallery li {
width:24%;
@ -159,9 +178,9 @@
}
}
</style>
</head>
</head>
<body>
<body>
<header role="banner">
<div id="innerheader">
<h1><a href="<% gallery_root %>"><% title %></a></h1>
@ -192,5 +211,5 @@
RSS
<a>
</footer>
</body>
</body>
</html>

30
templates/squares.html Normal file → Executable file
View file

@ -7,10 +7,15 @@
<title><% title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="alternate" type="application/rss+xml" title="<% title %>" href="rss/" /><link>
<script src="<% gallery_root %>js/lazy.js"></script>
<script>
window.addEventListener('load', function(){
var bLazy = new Blazy;
}, false);
</script>
<script src="<% gallery_root %>js/mootools.js"></script>
<script src="<% gallery_root %>js/mediaboxAdv-1.3.4b.js"></script>
<link rel="stylesheet" href="<% gallery_root %>css/mediaboxAdvWhite.css" type="text/css" media="screen" />
<style type="text/css">
html {
font-size:62.5%;
@ -18,6 +23,9 @@
.clear {
clear:both;
}
.loader{
background: url('<% gallery_root %>/img/loader.gif') center center no-repeat
}
body {
width:100%;
margin:0;
@ -105,6 +113,20 @@
margin:25px 0;
text-align:center;
}
/*----lazyloading---*/
.loader{
background: url('images/loader.gif') center center no-repeat;
}
.b-lazy {
-webkit-transition: opacity 100ms ease-in-out 10ms;
-moz-transition: opacity 100ms ease-in-out 10ms;
-o-transition: opacity 100ms ease-in-out 10ms;
transition: opacity 100ms ease-in-out 10ms;
opacity: 0;
}
.b-lazy.b-loaded {
opacity: 1;
}
/*----responsive----*/
#gallery li {
width:25%;
@ -130,9 +152,9 @@
}
}
</style>
</head>
</head>
<body>
<body>
<header role="banner">
<div id="innerheader">
<h1><a href="<% gallery_root %>"><% title %></a></h1>
@ -163,5 +185,5 @@
RSS
<a>
</footer>
</body>
</body>
</html>