Skip to content

Commit

Permalink
Made the anchor tag the outside container.
Browse files Browse the repository at this point in the history
  • Loading branch information
setnes committed Jan 18, 2016
1 parent 4ccf515 commit e1705be
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ div.crumb.last a {
opacity: .5;
}

#gallery a.image > img {
#gallery .image-container .image > img {
max-height: 200px;
}

Expand Down
18 changes: 9 additions & 9 deletions js/galleryalbum.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"use strict";

var TEMPLATE =
'<div class="item-container album-container" ' +
'<a class="item-container album-container album" '+
'style="width: {{targetWidth}}px; height: {{targetHeight}}px;" ' +
'data-width="{{targetWidth}}" data-height="{{targetHeight}}">' +
' <a class="album" href="{{targetPath}}">' +
' <div class="album-label">' +
' <span class="title">{{label}}</span>' +
' </div>' +
' </a>' +
'data-width="{{targetWidth}}" data-height="{{targetHeight}}"' +
'href="{{targetPath}}">' +
' <span class="album-label">' +
' <span class="title">{{label}}</span>' +
' </span>' +
' <div class="album-loader loading"></div>' +
'</div>';
'</a>';


/**
* Creates a new album object to store information about an album
Expand Down Expand Up @@ -247,7 +247,7 @@
*/
_fillSubAlbum: function (targetHeight) {
var album = this;
var a = this.domDef.children('a.album');
var a = this.domDef;

if (this.images.length >= 1) {
this._getFourImages(this.images, targetHeight, a).fail(function (validImages) {
Expand Down
18 changes: 9 additions & 9 deletions js/galleryimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"use strict";

var TEMPLATE =
'<div class="item-container image-container" ' +
'<a class="item-container image-container" '+
'style="width: {{targetWidth}}px; height: {{targetHeight}}px;" ' +
'data-width="{{targetWidth}}" data-height="{{targetHeight}}">' +
' <a class="image" href="{{targetPath}}" data-path="{{path}}">' +
' <div class="image-label">' +
' <span class="title">{{label}}</span>' +
' </div>' +
' </a>' +
'</div>';
'data-width="{{targetWidth}}" data-height="{{targetHeight}}"' +
'href="{{targetPath}}">' +
' <span class="image-label">' +
' <span class="title">{{label}}</span>' +
' </span>' +
' <span class="image" data-path="{{path}}"></span>' +
'</a>';

/**
* Creates a new image object to store information about a media file
Expand Down Expand Up @@ -114,7 +114,7 @@
'height': targetHeight
});
img.alt = encodeURI(image.path);
image.domDef.find('a.image').append(img);
image.domDef.find('.image').append(img);

image.domDef.click(image._openImage.bind(image));

Expand Down

0 comments on commit e1705be

Please sign in to comment.