/* /////////////////////////////////////////////////////////////////////////////// */
/* 1. REQUIRED: Do you want a video opener? */
/* Set to ‘true’ if utilizing video for the opener, in the event you’re simply utilizing a static picture, set to ‘false’ */
var hasVideo = true;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 2. REQUIRED: Whether or not a static picture or video hero, you will want add your hero photographs right here. For video, this picture is used as loading/low battery picture */
/* Desktop & Pill Hero picture must be 2000px huge, optimized through https://squoosh.app utilizing mozJPG at 70% compression, add to DASH Media Library, seize url of picture and paste right here. */
var desktopHeroImage = “https://www.refinery29.com/photographs/11505796.jpg”;
/* Cell Hero picture must be 1280px huge, optimized through https://squoosh.app utilizing mozJPG at 70% compression, add to DASH Media Library, seize url of picture and paste right here. */
var mobileHeroImage = “https://www.refinery29.com/photographs/11505795.jpg”;
/* /// Tip: If creating a primary body picture for a video opener, make a display screen cap of the ultimate uploaded JWPlayer video as JW will do it is personal compression on you video and thus the colour possibly completely different. */
/* /////////////////////////////////////////////////////////////////////////////// */
/* 3. REQUIRED: Whether or not video or picture solely, please add accessible alt textual content, if there’s textual content baked into the picture, it’s best to add it right here. */
var desktopHeroAltText = “29 Acts of Self Love”;
var mobileHeroAltText = “29 Acts of Self Love”;
/* /// Tip: If quote marks are wanted in textual content, use ” in the event you want an emdash use — */
/* /////////////////////////////////////////////////////////////////////////////// */
/* 4. REQUIRED FOR VIDEO: Desktop & Pill Large, video URL from JWPlayer, use 1920px 8:3 huge asset, mp4 is finest, no audio, 6-10 second loop, don’t repeat the loop within the file */
var desktopVideo = “https://content material.jwplatform.com/movies/NFleWxa8-r0yi2e87.mp4”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 5. REQUIRED FOR VIDEO: Moble video URL from JWPlayer use 720px 8:3 sq. to tall asset, typical ratios 1:1,5:6,4:3, no audio, 6-10 second loop, don’t repeat the loop within the file */
var mobileVideo = “https://content material.jwplatform.com/movies/qNUvKsmJ-b8WZHQfV.mp4”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 6. INTRO / BOILERPLATE: Do you want an intro blurb underneath the hero? */
/* If sure, set to ‘true’. if no, set to ‘false’ */
var hasIntro = true;
/* Add your intro textual content right here */
var introText = “Practising self-love must be a every day behavior, whether or not you’re celebrating a serious milestone, like touchdown your dream job or shifting into your first solo residence, or just simply because. That’s why we partnered with Shane Co., purveyors of timeless positive jewellery, to discover the numerous methods we are able to present ourselves a little bit gratitude every day. From gifting your self one thing that sparkles to indulging in a day of pampering, click on the tiles under for 29 distinctive “deal with your self” concepts.”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 7. SPONSOR / BRAND BANNER: Do you want a sponsor or model banner? */
/* If sure, set to ‘true’. if no, set to ‘false’ */
var hasBanner = true;
/* Banner picture, clear PNG, 600×80 for Sponsored, 600×200 for Model, make sure to use https://squoosh.app optimize with oxiPNG utilizing Diminished Palette */
var bannerImage = “https://www.refinery29.com/photographs/11503583.png”;
/* REQUIRED: Add your banner’s alt textual content right here. */
var bannerImageAltText = “Created in partnership with Shane Co.”;
/* Want a url for click on tracker and so forth.? Add right here. Depart clean if not. */
var bannerURL = “https://www.shaneco.com/?utm_source=r29&utm_medium=referral&utm_campaign=madetoshine_29reasonsfeature”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 8. CHECK: Is there a double advert exhibiting up underneath the hero? */
/* Set to ‘true’ to take away additional advert, set to ‘false’ if all appears okay */
var removeExtraAd = false;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 9. EDIT: Rollover picture clear png. Sq. min 2000px x 2000px. Squooshed. */
const cardHoverImage = “https://www.refinery29.com/photographs/11503513.png”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* DO NOT ALTER */
let cell = false;
/* What gadget is that this? */
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
cell = true;
}
// Popups
let prevPop = null;
operate posArrow(id) {
if (window.innerWidth < 1024.98) {
const a = doc.getElementById('tmp-arrows');
const b = doc.querySelectorAll('.tmp-popup-image');
const rect = b[id].getBoundingClientRect().prime;
let y;
if (window.innerWidth 1024) {
y = (rect) + (456/2);
} else {
y = ((rect) + (456/2)) – 30;
}
}
a.model.prime = y + “px”;
}
}
operate setupContent() {
let a = doc.querySelectorAll(“.tmp-card”);
let b = doc.querySelectorAll(“.tmp-card-rollover”);
let c = doc.querySelectorAll(“.tmp-popup”);
for (let e = 0; e < a.size; e++) {
// Setup playing cards
a[e].setAttribute("id","tmp-" + e);
a[e].setAttribute("onclick","openPop(" + e + ")");
// Setup Card Hovers
b[e].innerHTML = "“;
// Setup popups
c[e].setAttribute(“id”,”tmp-popup-” + e);
}
}
operate hideNav() {
const a = doc.querySelectorAll(“.global-header”);
a[0].model.show = “none”;
}
operate showNav() {
const a = doc.querySelectorAll(“.global-header”);
a[0].model.show = “block”;
}
operate openPop(id) {
if (prevPop != null) {
// Clear up any earlier pop
let ff = [“tmp-popup-” + prevPop];
let bb = doc.getElementById(ff);
bb.model.show = “none”;
bb.model.opacity = “0.0”;
}
// Present new pop
let e = [“tmp-popup-” + id];
let a = doc.getElementById(e);
a.model.show = “block”;
a.model.opacity = “1.0”;
const pop = doc.getElementById(“tmp-pop”);
pop.model.show = “block”;
var waitForFadein = setTimeout(operate(){
clearTimeout(waitForFadein);
pop.model.opacity = “1.0”;
pop.model.transition = “0.3s”;
pop.model.WebkitTransition = “0.3s”;
// Clear up
a = undefined;
e = undefined;
// Disguise nav
if(cell) {
hideNav();
}
}, 50);
prevPop = id;
posArrow(id);
}
operate closePop() {
if (prevPop != null) {
let f = [“tmp-popup-” + prevPop];
let b = doc.getElementById(f);
const pop = doc.getElementById(“tmp-pop”);
pop.model.opacity = “0.0”;
pop.model.transition = “0.3s”;
pop.model.WebkitTransition = “0.3s”;
var waitForFadeout = setTimeout(operate(){
clearTimeout(waitForFadeout);
b.model.show = “none”;
pop.model.show = “none”;
// Clear up
b = undefined;
f = undefined;
// Present nav
if(cell) {
showNav();
}
}, 200);
}
}
// Subsequent and former
let nextID;
let prevID;
operate nextPopup() {
// Present one
let h = [“tmp-popup-” + prevPop];
let d = doc.getElementById(h);
// Subsequent one
if (prevPop 0) {
prevID = prevPop – 1;
} else {
prevID = 28;
}
let q = [“tmp-popup-” + prevID];
let r = doc.getElementById(q);
// Fade out present one
m.model.opacity = “0.0”;
// Fade in subsequent one
r.model.show = “block”;
r.model.opacity = “1.0”;
// Disguise present one
m.model.show = “none”;
// Clear up
n = undefined;
m = undefined;
q = undefined;
r = undefined;
// Retailer it
prevPop = prevID;
}
operate setupGridTitle() {
if (cell == true) {
let o = doc.getElementsByClassName(“tmp-layer-title”);
for (e = 0; e < o.size; e++) {
o[e].model.opacity = "1.0";
o[e].model.backside = "5px";
}
}
}
// Instruments
const toolsOn = false;
operate tempNumbers() {
let e,
t = doc.querySelectorAll(".tmp-card .tmp-card-rollover");
for (e = 0; e < t.size; e++) {
if ((t[e].setAttribute("id", ["image" + e]), 1 == toolsOn)) {
let n = doc.createElement("DIV");
t[e].appendChild(n), (n.innerHTML = "
“);
}
}
}
operate setupMobileClicks() {
if (cell == true) {
let o = doc.getElementsByClassName(“tmp-card”);
for (let e = 0; e < a.size; e++) {
//a[e].model.
}
}
}
operate initOther() {
setupGridTitle();
setupContent();
setupMobileClicks();
}
operate showHero(){let t=doc.getElementById("tmp"), s=doc.getElementById("tmp-extra"), a=doc.getElementById("tmp-loading"); t.model.opacity="0.0";t.model.show="block"; s.model.show="block"; const e=setTimeout(operate (){clearTimeout(e), (t.model.opacity="1.0"), (t.model.transition="all 0.5s"), (t.model.WebkitTransition="all 0.5s"), (s.model.opacity="1.0"), (s.model.transition="all 0.5s"), (s.model.WebkitTransition="all 0.5s"), (a.model.show="none");}, 500);}operate setupBanner(){let e;""!=bannerURL?(e='‘,urlend=”“):(e=””,urlend=””);let n=e+’‘+urlend,t=doc.getElementById(“tmp-blurb”);t.innerHTML=”
“+introText+”
“,1==hasIntro?t.model.show=”block”:t.model.show=”none”;let l=doc.getElementById(“tmp-banner”);l.innerHTML=n,1==hasBanner?l.model.show=”block”:l.model.show=”none”}operate loadVideo(){var e=doc.getElementById(“tmp-video-hero-desktop”), t=doc.getElementById(“tmp-video-hero-mobile”); window.innerWidth > 960 && ((e.src=desktopVideo), e.load()), window.innerWidth > 767 && window.innerWidth < 961 && ((e.src=desktopVideo), e.load()), window.innerWidth < 768 && ((t.src=mobileVideo), t.load());}operate setupVideo(){(doc.getElementById("tmp-content").innerHTML='‘), loadVideo();}operate setupStatic(){doc.getElementById(“tmp-content”).innerHTML=’‘;}operate setup(e){1==e ? setupVideo() : setupStatic(); showHero();}operate manageAds(e){if (1==e){let e=doc.getElementsByClassName(“row-ad”); (e[0].model.show=”none”), (e=void 0), delete e;}}operate prepared(e){(doc.attachEvent ? “full”===doc.readyState : “loading” !==doc.readyState) ? e() : doc.addEventListener(“DOMContentLoaded”, e);}(doc.onmouseleave=operate (){window.isReady=!1;}), window.addEventListener(“resize”, operate (){window.isReady=!1;}), (window.isReady=void 0 !==window.isReady && window.isReady), prepared(operate (){var e=setInterval(operate (){window.imagesLoaded && (imagesLoaded(“#tmp-load”,{background: !0}, operate (){(window.isReady=!1), clearInterval(e);}), clearInterval(e));}, 100); if (!1 !==window.isReady) return; window.isReady=!0; const t=setTimeout(operate (){clearTimeout(t), setup(hasVideo), setupBanner(), initOther(), manageAds(removeExtraAd);}, 500);});
Like what you see? How about some extra R29 goodness, proper right here?
Thank you for being a valued member of the Nirantara family! We appreciate your continued support and trust in our apps.
- Nirantara Social - Stay connected with friends and loved ones. Download now: Nirantara Social
- Nirantara News - Get the latest news and updates on the go. Install the Nirantara News app: Nirantara News
- Nirantara Fashion - Discover the latest fashion trends and styles. Get the Nirantara Fashion app: Nirantara Fashion
- Nirantara TechBuzz - Stay up-to-date with the latest technology trends and news. Install the Nirantara TechBuzz app: Nirantara Fashion
- InfiniteTravelDeals24 - Find incredible travel deals and discounts. Install the InfiniteTravelDeals24 app: InfiniteTravelDeals24
If you haven't already, we encourage you to download and experience these fantastic apps. Stay connected, informed, stylish, and explore amazing travel offers with the Nirantara family!
Source link