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

Commit

Permalink
sync Lychee-front
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Nov 21, 2018
1 parent c8c72c5 commit 917083d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lychee-front
2 changes: 1 addition & 1 deletion dist/main.css

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1262,14 +1262,21 @@ build.multiselect = function (top, left) {

build.getThumbnailHtml = function (thumb, retinaThumbUrl, type) {
var medium = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
var small = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';

var isVideo = type && type.indexOf('video') > -1;
if (thumb === 'uploads/thumb/' && isVideo) {
return "<span class=\"thumbimg\"><img src='play-icon.png' alt='Photo thumbnail' data-overlay='false' draggable='false'></span>";
}
// we use small if available
if (lychee.justified && small !== '') {
return "<span class=\"thumbimg\"><img src='" + small + "' alt='Photo thumbnail' data-overlay='false' draggable='false'></span>";
}
// we use medium if small is not available
if (lychee.justified && medium !== '') {
return "<span class=\"thumbimg\"><img src='" + medium + "' alt='Photo thumbnail' data-overlay='false' draggable='false'></span>";
}
// we use crappy thumb image otherwise :]
return "<span class=\"thumbimg" + (isVideo ? ' video' : '') + "\"><img src='" + thumb + "' srcset='" + retinaThumbUrl + " 1.5x' alt='Photo thumbnail' data-overlay='false' draggable='false'></span>";
};

Expand Down Expand Up @@ -1320,15 +1327,15 @@ build.photo = function (data) {
var _lychee$retinize2 = lychee.retinize(data.thumbUrl),
retinaThumbUrl = _lychee$retinize2.path;

html += lychee.html(_templateObject15, data.album, data.id, build.getThumbnailHtml(data.thumbUrl, retinaThumbUrl, data.type, data.medium), data.title, data.title);
html += lychee.html(_templateObject15, data.album, data.id, build.getThumbnailHtml(data.thumbUrl, retinaThumbUrl, data.type, data.medium, data.small), data.title, data.title);

if (data.cameraDate === '1') html += lychee.html(_templateObject16, build.iconic('camera-slr'), data.sysdate);else html += lychee.html(_templateObject17, data.sysdate);

html += "</div>";

if (lychee.publicMode === false) {

html += lychee.html(_templateObject18, data.star === '1' ? 'badge--visible' : '', build.iconic('star'), data.public === '1' && album.json.public !== '1' ? 'badge--visible' : '', build.iconic('eye'));
html += lychee.html(_templateObject18, data.star === '1' ? 'badge--star' : '', build.iconic('star'), data.public === '1' && album.json.public !== '1' ? 'badge--visible' : '', build.iconic('eye'));
}

html += "</div>";
Expand Down
2 changes: 1 addition & 1 deletion dist/view.js

Large diffs are not rendered by default.

0 comments on commit 917083d

Please sign in to comment.