Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Ads - Setting viewport margin for specific pagetype/screensizes
Browse files Browse the repository at this point in the history
 🐿 v2.5.16
  • Loading branch information
andrewgeorgiou1981 committed Sep 27, 2017
1 parent 5de8dad commit 2d9e186
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions components/n-ui/ads/js/oAdsConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,14 @@ module.exports = function (flags, appName, adOptions) {
let viewportMargin = '0%';
let pt = appName;
let scrnSize = utils.getScreenSize();
pt = pt.toLowerCase().substr(0, 3);
if (scrnSize < 980 && pt !=='art' ) {
if (pt === 'fro') {
if (scrnSize < 980 && pt !=='article' ) {
if (pt === 'front') {
if (scrnSize < 760) {viewportMargin = '15%';}
else {
if (pt === 'fro' && scrnSize < 980) {viewportMargin ='5%';}
}
else {viewportMargin ='5%';}
}
if (pt === 'str'){
if (pt === 'stream'){
if (scrnSize < 760) {viewportMargin ='5%';}
else if (scrnSize < 980) {viewportMargin = '15%';}
}
else {viewportMargin = '15%';}
}
return viewportMargin;
}
Expand Down

0 comments on commit 2d9e186

Please sign in to comment.