Remove screenshot display from table, add links
This commit is contained in:
parent
7348c7bec8
commit
9ce4f4c5c8
File diff suppressed because one or more lines are too long
|
@ -27,14 +27,10 @@
|
|||
height: 32px;
|
||||
}
|
||||
|
||||
.screenshot.small {
|
||||
width: 64px;
|
||||
height: 128px;
|
||||
}
|
||||
.screenshot.large {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
margin-left: 5px;
|
||||
a.screenshot {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -27,14 +27,10 @@
|
|||
height: 32px;
|
||||
}
|
||||
|
||||
.screenshot.small {
|
||||
width: 64px;
|
||||
height: 128px;
|
||||
}
|
||||
.screenshot.large {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
margin-left: 5px;
|
||||
a.screenshot {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
"lodash": "^4.17.5",
|
||||
"npm": "^5.8.0",
|
||||
"popper.js": "^1.14.3",
|
||||
"punycode": "^2.1.0",
|
||||
"vanilla-lazyload": "^8.7.1"
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@ import LazyLoad from 'vanilla-lazyload';
|
|||
|
||||
$(function(){
|
||||
|
||||
var lazyload = new LazyLoad({
|
||||
elements_selector: "img.screenshot"
|
||||
});
|
||||
|
||||
var table = null;
|
||||
|
||||
$.getJSON('data/screenshots.json', function(screenshots){
|
||||
|
@ -70,8 +66,8 @@ $(function(){
|
|||
if (typeof screenshots[item.canonical_urls[0]] !== 'undefined') {
|
||||
var surl = 'http://green-spider-screenshots.sendung.de/320x640/'+screenshots[item.canonical_urls[0]];
|
||||
var lurl = 'http://green-spider-screenshots.sendung.de/1500x1500/'+screenshots[item.canonical_urls[0]];
|
||||
screenshot = '<a href="'+ surl +'" target="_blank"><img class="screenshot small" alt="Mobile Screenshot" data-src="'+ surl +'" width="32" height="64"></a>';
|
||||
screenshot += '<a href="'+ lurl +'" target="_blank"><img class="screenshot large" alt="Desktop Screenshot" data-src="'+ lurl +'" width="64" height="64"></a>';
|
||||
screenshot = '<a class="screenshot" href="'+ surl +'" target="_blank" title="Mobile">M</a>';
|
||||
screenshot += '<a class="screenshot" href="'+ lurl +'" target="_blank" title="Desktop">D</a>';
|
||||
}
|
||||
}
|
||||
row.append('<td class="'+ (screenshot ? 'good' : 'bad') +' text-center">' + (screenshot ? screenshot : '❌') + '</td>');
|
||||
|
@ -89,14 +85,6 @@ $(function(){
|
|||
}
|
||||
});
|
||||
|
||||
// after a table search/sort, force lazyload update
|
||||
table.on('draw', function(){
|
||||
lazyload.update();
|
||||
});
|
||||
|
||||
// activate lazy image loading
|
||||
lazyload.update();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue