Commit abc7c923 authored by Tobias Reich's avatar Tobias Reich
Browse files

Only first item of album preview should be a retina image

parent 5d78479d
......@@ -31,21 +31,20 @@ build = {
var album = "",
longTitle = "",
title = albumJSON.title;
title = albumJSON.title,
typeThumb = "";
if (title.length>18) {
title = albumJSON.title.substr(0, 18) + "...";
longTitle = albumJSON.title;
}
typeThumb0 = albumJSON.thumb0.split('.').pop();
typeThumb1 = albumJSON.thumb1.split('.').pop();
typeThumb2 = albumJSON.thumb2.split('.').pop();
if (albumJSON.thumb0.split('.').pop()==="svg") typeThumb = "nonretina";
album += "<div class='album' data-id='" + albumJSON.id + "' data-password='" + albumJSON.password + "'>";
album += "<img src='" + albumJSON.thumb2 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb2 + "'>";
album += "<img src='" + albumJSON.thumb1 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb1 + "'>";
album += "<img src='" + albumJSON.thumb0 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb0 + "'>";
album += "<img src='" + albumJSON.thumb2 + "' width='200' height='200' alt='thumb' data-type='nonretina'>";
album += "<img src='" + albumJSON.thumb1 + "' width='200' height='200' alt='thumb' data-type='nonretina'>";
album += "<img src='" + albumJSON.thumb0 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb + "'>";
album += "<div class='overlay'>";
if (albumJSON.password&&!lychee.publicMode) album += "<h1><span class='icon-lock'></span> " + title + "</h1>";
......
......@@ -147,7 +147,7 @@ view = {
if (smartData===""&&albumsData==="") $("body").append(build.no_content("picture"));
else lychee.content.html(smartData + albumsData);
$("img[data-type!='svg']").retina();
$("img[data-type!='nonretina']").retina();
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment