Merge pull request #83 from JonnyWong16/dev

Fixed recently added and recently watched posters.
This commit is contained in:
drzoidberg33 2015-08-17 22:38:31 +02:00
commit c0214f1489
3 changed files with 63 additions and 64 deletions

View file

@ -407,39 +407,31 @@ input[type="color"],
} }
.poster { .poster {
float: left; float: left;
min-height: 232px; min-height: 225px;
min-width: 155px; min-width: 150px;
margin-bottom: 8px;
position: relative; position: relative;
} }
.poster-face img { .poster-face {
bottom: 0; background-position: center;
overflow: hidden; background-size: cover;
height: 225px; height: 225px;
width: 153px; width: 150px;
position: relative;
webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
-moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
}
.cover-face {
background-position: center;
background-size: cover;
height: 150px;
width: 150px;
position: absolute; position: absolute;
bottom: 5px;
left: 0;
border: 1px solid rgba(128, 128, 128, 0.3);
}
.poster-face img:hover {
webkit-box-shadow: 0 0 0 2px #e9a049;
-moz-box-shadow: 0 0 0 2px #e9a049;
box-shadow: 0 0 0 2px #e9a049;
}
.cover-face img {
bottom: 0; bottom: 0;
overflow: hidden; webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
height: 153px; -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
width: 153px; box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
border: 1px solid rgba(128, 128, 128, 0.3);
position: absolute;
bottom: 5px;
left: 0;
}
.cover-face img:hover {
webkit-box-shadow: 0 0 0 2px #e9a049;
-moz-box-shadow: 0 0 0 2px #e9a049;
box-shadow: 0 0 0 2px #e9a049;
} }
.users-poster-face img { .users-poster-face img {
bottom: 0; bottom: 0;
@ -630,6 +622,11 @@ input[type="color"],
} }
.dashboard-recent-media-instance { .dashboard-recent-media-instance {
} }
.dashboard-recent-media-instance a:hover .poster-face {
webkit-box-shadow: inset 0 0 0 2px #e9a049;
-moz-box-shadow: inset 0 0 0 2px #e9a049;
box-shadow: inset 0 0 0 2px #e9a049;
}
.dashboard-recent-media li { .dashboard-recent-media li {
margin-right: 27px; margin-right: 27px;
position: relative; position: relative;

View file

@ -29,29 +29,31 @@ DOCUMENTATION :: END
% for item in data: % for item in data:
<div class="dashboard-recent-media-instance"> <div class="dashboard-recent-media-instance">
<li> <li>
<div class="poster"> % if item['type'] == 'season' or item['type'] == 'movie':
% if item['type'] == 'season' or item['type'] == 'movie': <a href="info?item_id=${item['rating_key']}">
<div class="poster-face"> <div class="poster">
<a href="info?item_id=${item['rating_key']}"> <div class="poster-face" style="background-image: url(pms_image_proxy?img=${item['thumb']}&width=300&height=450&fallback=poster);"></div>
<img src="pms_image_proxy?img=${item['thumb']}&width=300&height=450&fallback=poster" class="poster-face">
</a>
</div> </div>
% elif item['type'] == 'album': <div class="dashboard-recent-media-metacontainer">
<div class="cover-face"> % if item['type'] == 'season':
<img src="pms_image_proxy?img=${item['thumb']}&width=300&height=300&fallback=cover" class="cover-face"> <h3>${item['parent_title']}</h3>
</div> <h3>(${item['title']})</h3>
% endif % elif item['type'] == 'movie':
</div> <h3>${item['title']}</h3>
<div class="dashboard-recent-media-metacontainer"> <h3>(${item['year']})</h3>
% if item['type'] == 'season': % endif
<h3>${item['parent_title']} - ${item['title']}</h3> <div class="text-muted" id="added_at-${item['rating_key']}">${item['added_at']}</div>
% elif item['type'] == 'album': </div>
<h3>${item['title']}</h3> </a>
% elif item['type'] == 'movie': % elif item['type'] == 'album':
<h3>${item['title']} (${item['year']})</h3> <div class="poster">
% endif <div class="cover-face" style="background-image: url(pms_image_proxy?img=${item['thumb']}&width=300&height=300&fallback=cover);"></div>
<div class="text-muted" id="added_at-${item['rating_key']}">${item['added_at']}</div> </div>
</div> <div class="dashboard-recent-media-metacontainer">
<h3>${item['title']}</h3>
<div class="text-muted" id="added_at-${item['rating_key']}">${item['added_at']}</div>
</div>
% endif
</li> </li>
</div> </div>
<script> <script>

View file

@ -33,21 +33,21 @@ DOCUMENTATION :: END
% for item in data: % for item in data:
<div class="dashboard-recent-media-instance"> <div class="dashboard-recent-media-instance">
<li> <li>
<div class="poster"> <a href="info?source=history&item_id=${item['row_id']}">
<div class="poster-face"> <div class="poster">
<a href="info?source=history&item_id=${item['row_id']}"> <div class="poster-face" style="background-image: url(pms_image_proxy?img=${item['thumb']}&width=300&height=450&fallback=poster);"></div>
<img src="pms_image_proxy?img=${item['thumb']}&width=300&height=450&fallback=poster" class="poster-face">
</a>
</div> </div>
</div> <div class="dashboard-recent-media-metacontainer">
<div class="dashboard-recent-media-metacontainer"> % if item['type'] == 'episode':
% if item['type'] == 'episode': <h3>${item['title']}</h3>
<h3>Season ${item['parentIndex']}, Episode ${item['index']}</h3> <h3>(Season ${item['parentIndex']}, Episode ${item['index']})</h3>
% elif item['type'] == 'movie': % elif item['type'] == 'movie':
<h3>${item['title']} (${item['year']})</h3> <h3>${item['title']}</h3>
% endif <h3>(${item['year']})</h3>
<div class="text-muted" id="time-${item['time']}">${item['time']}</div> % endif
</div> <div class="text-muted" id="time-${item['time']}">${item['time']}</div>
</div>
</a>
</li> </li>
</div> </div>
<script> <script>