From be343a1ab9f4770a54ba68532ad317603933c478 Mon Sep 17 00:00:00 2001 From: Raghu Nayyar Date: Thu, 29 Oct 2015 21:58:38 +0530 Subject: [PATCH] Adds flickr style gradient. --- css/styles.css | 9 ++++++++- js/galleryimage.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/css/styles.css b/css/styles.css index ead70464af..644350299a 100644 --- a/css/styles.css +++ b/css/styles.css @@ -130,7 +130,12 @@ div.crumb.last a { #gallery .item-container .album-label, #gallery .item-container .image-label { - background: rgba(0, 0, 0, 0.4); + position: absolute; + width: 100%; + height: 100%; + transition: opacity 200ms linear; + opacity: 1; + background-image: linear-gradient(rgba(0,0,0,0) 65%,rgba(0,0,0,0.35)); } #gallery .item-container .image-label .title { @@ -143,6 +148,8 @@ div.crumb.last a { overflow-x: hidden; white-space: nowrap; text-overflow: ellipsis; + bottom: 10px; + position: absolute; } #gallery .item-container .image-label .title:hover { diff --git a/js/galleryimage.js b/js/galleryimage.js index 5883cc898b..30ed2bc4c7 100644 --- a/js/galleryimage.js +++ b/js/galleryimage.js @@ -120,7 +120,7 @@ * @private */ _addLabel: function (container) { - var imageLabel = $('') + var imageLabel = $('
') .addClass('image-label'); var imageTitle = $('') .addClass('title').text(