Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12437 from Wikia/FAN-1665-resize-recirc-images
Browse files Browse the repository at this point in the history
FAN-1665 Resize Fandom images in recirculation modules
  • Loading branch information
vforge committed Feb 17, 2017
2 parents e433efa + bcfdba7 commit 4e765a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions extensions/wikia/Recirculation/js/helpers/LiftigniterHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ define('ext.wikia.recirculation.helpers.liftigniter', [
item.meta = options.widget;
item.index = index;

if (item.source === 'wiki') {
item.isWiki = true;
item.thumbnail = thumbnailer.getThumbURL(item.thumbnail, 'image', options.width, options.height);
}
if (item.source === 'wiki') {
item.isWiki = true;
}
if (thumbnailer.isThumbUrl(item.thumbnail)) {
item.thumbnail = thumbnailer.getThumbURL(item.thumbnail, 'image', options.width, options.height);
}

items.push(item);
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/wikia/Recirculation/styles/impact-footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $recirculation-impact-footer-color-feature-overlay: rgba(0, 0, 0, .75);
img {
background: $color-page;
display: block;
max-width: 100%;
width: 100%;
}

.items {
Expand Down
4 changes: 3 additions & 1 deletion resources/wikia/modules/thumbnailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
var extRegExp = /\.(jpg|jpeg|gif|bmp|png|svg)$/i,
imagePath = '/images/',
legacyThumbnailerPath = '/images/thumb/',
thumbnailerBaseURLRegex = /(.*\/revision\/\w+).*/;
// [0-9a-f-]{36} is to match UUIDs like in
// https://vignette.wikia.nocookie.net/ff8b7617-46fa-4efb-ac2f-ff98edf04bcf
thumbnailerBaseURLRegex = new RegExp('(.*/revision/\\w+|.*/[0-9a-f-]{36}).*');

/**
* Converts the URL of a full size image or of a thumbnail into one of a thumbnail of
Expand Down

0 comments on commit 4e765a8

Please sign in to comment.