link.click(function() {
scrim(1, function() {
$('#subcontent .container').empty();
- $('#subcontent').fadeIn(100);
+ var offset = 150;
+ $('#subcontent').css({
+ width : window.innerWidth - offset + "px",
+ height : window.innerHeight - offset + "px",
+ top : offset / 2,
+ left : offset / 2
+ })
+ .fadeIn(100);
- //console.log(thumbs_url);
+ $('#subcontent .container').text("loading...");
$.getJSON('/thumbs/?url=' + thumbs_url, function(data) {
- var destElem = '#subcontent .container';
+ $('#subcontent .container').empty();
- console.log(data);
- var items = [];
+ var destElem = '#subcontent .container';
$('<div/>', {
'class' : 'desc',
- html : '<a target="_blank" href="' + data.url + '"> ' + data.url + ' </a>'
+ html : '<p><a target="_blank" href="' + data.url + '"> ' + data.url + ' </a></p>'
}).appendTo(destElem);
$('<ul/>', {
$.each(data.links, function(key, thumb) {
$('<li><a target="_blank" href="'+thumb.url+'"><img src="' + thumb.img + '"></a></li>')
- .appendTo('#subcontent .container ul.thumbs')
+ .appendTo(destElem + ' ul.thumbs')
});
});
width:160px;
height:110px;
}
-
#scrim {
- background:rgba(0,0,0,0.5);
+ background:rgba(0,0,0,0.8);
width:100%;
height:100%;
position:fixed;
z-index: 100;
display: none;
}
-
#subcontent {
+ overflow: auto;
position:fixed;
z-index:200;
display:none;
- left: 50%;
- top:20px;
- width:75%;
+ background:#333;
}
#subcontent .container {
- position: relative;
- left: -50%;
- background:#444;
- width:100%;
text-align:center;
}
+#subcontent .container ul {
+ padding:20px;
+}
#subcontent .container li {
display:inline-block;
margin:5px;