Skip to content

Commit

Permalink
Add flickr style gradients.
Browse files Browse the repository at this point in the history
  • Loading branch information
raghunayyar committed Nov 6, 2015
1 parent 5628f45 commit b87aaf1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
16 changes: 13 additions & 3 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ 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 {
#gallery .item-container .image-label .title,
#gallery .item-container .album-label .title {
display: inline-block;
color: #fff;
text-align: center;
Expand All @@ -152,9 +158,13 @@ div.crumb.last a {
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
left: 0;
bottom: 10px;
position: absolute;
}

#gallery .item-container .image-label .title:hover {
#gallery .item-container .image-label .title:hover,
#gallery .item-container .album-label .title:hover {
overflow: visible;
white-space: normal;
}
Expand Down
10 changes: 5 additions & 5 deletions js/galleryalbum.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
'<div class="item-container album-container" ' +
'style="width: {{targetWidth}}px; height: {{targetHeight}}px;" ' +
'data-width="{{targetWidth}}" data-height="{{targetHeight}}">' +
' <div class="album-loader loading"></div>' +
' <span class="album-label">{{label}}</span>' +
' <a class="album" href="{{targetPath}}"></a>' +
'</div>';
'<div class="album-loader loading"></div>' +
'<a class="album" href="{{targetPath}}">' +
'<div class="album-label">' +
'<span class="title">{{label}}</span>' +
'</div></a></div>';

/**
* Creates a new album object to store information about an album
Expand Down Expand Up @@ -62,7 +63,6 @@
album.domDef.click(album._showLoader.bind(album));

album._fillSubAlbum(targetHeight);

return album.domDef;
});
},
Expand Down
11 changes: 6 additions & 5 deletions js/galleryimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
'<div class="item-container image-container" ' +
'style="width: {{targetWidth}}px; height: {{targetHeight}}px;" ' +
'data-width="{{targetWidth}}" data-height="{{targetHeight}}">' +
' <span class="image-label">' +
' <span class="title">{{label}}</span>' +
' </span>' +
' <a class="image" href="{{targetPath}}" data-path="{{path}}"></a>' +
'<a class="image" href="{{targetPath}}" data-path="{{path}}">'+
'<div class="image-label">' +
'<span class="title">{{label}}</span>' +
'</div>' +
'</a>' +
'</div>';

/**
Expand Down Expand Up @@ -127,7 +128,7 @@
* @private
*/
_addLabel: function () {
var imageLabel = this.domDef.children('.image-label');
var imageLabel = this.domDef.find('.image-label');
this.domDef.hover(function () {
imageLabel.slideToggle(OC.menuSpeed);
}, function () {
Expand Down

0 comments on commit b87aaf1

Please sign in to comment.