improved tile display

This commit is contained in:
Luke Pulverenti 2013-04-28 13:39:16 -04:00
parent c513738514
commit 400ef92e17
3 changed files with 17 additions and 11 deletions

View File

@ -5,7 +5,7 @@
display: inline-block;
font-size: 14px;
position: relative;
color: #fff;
color: #fff!important;
text-decoration: none;
text-align: left;
overflow: hidden;
@ -20,7 +20,12 @@
.posterItemImage {
background-size: contain;
background-repeat: no-repeat;
background-position: left bottom;
background-position: center bottom;
background-color: #000;
}
.transparentPosterItem .posterItemImage {
background-color: transparent;
}
.defaultPosterItemImage {

View File

@ -469,26 +469,28 @@
var item = items[i];
html += '<div class="posterViewItem posterViewItemWithDualText">';
html += '<a href="#" onclick="ItemDetailPage.playById(\'' + item.Id + '\');">';
html += '<a class="posterItem backdropPosterItem" href="#" onclick="ItemDetailPage.playById(\'' + item.Id + '\');">';
var imageTags = item.ImageTags || {};
var imgUrl;
if (imageTags.Primary) {
var imgUrl = ApiClient.getImageUrl(item.Id, {
imgUrl = ApiClient.getImageUrl(item.Id, {
maxwidth: 500,
tag: imageTags.Primary,
type: "primary"
});
html += '<img src="' + imgUrl + '" />';
} else {
html += '<img src="css/images/items/detail/video.png"/>';
imgUrl = "css/images/items/detail/video.png";
}
html += '<div class="posterViewItemText posterViewItemPrimaryText">' + item.Name + '</div>';
html += '<div class="posterViewItemText">';
html += '<div class="posterItemImage" style="background-image:url(\'' + imgUrl + '\');"></div>';
html += '<div class="posterItemText">' + item.Name + '</div>';
html += '<div class="posterItemText">';
if (item.RunTimeTicks != "") {
html += ticks_to_human(item.RunTimeTicks);
@ -500,7 +502,6 @@
html += '</a>';
html += '</div>';
}
return html;

View File

@ -37,7 +37,7 @@
var html = '';
var plugin = availablePlugins[i];
html += "<a class='posterItem backdropPosterItem' href='addPlugin.html?name=" + encodeURIComponent(plugin.name) + "'>";
html += "<a class='posterItem backdropPosterItem transparentPosterItem' href='addPlugin.html?name=" + encodeURIComponent(plugin.name) + "'>";
if (plugin.thumbImage) {
html += '<div class="posterItemImage" style="background-image:url(\'' + plugin.thumbImage + '\');"></div>';