29 Methods To Apply Self-Love
13 min read
/* /////////////////////////////////////////////////////////////////////////////// */
/* 1. REQUIRED: Do you want a video opener? */
/* Set to ‘true’ if utilizing video for the opener, when 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 may want add your hero photographs right here. For video, this picture is used as loading/low battery picture */
/* Desktop & Pill Hero picture needs to be 2000px vast, 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 needs to be 1280px vast, 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 may be textual content baked into the picture, you must 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 ” when you want an emdash use — */
/* /////////////////////////////////////////////////////////////////////////////// */
/* 4. REQUIRED FOR VIDEO: Desktop & Pill Large, video URL from JWPlayer, use 1920px 8:3 vast asset, mp4 is greatest, 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 beneath 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 needs to be a each day behavior, whether or not you’re celebrating a serious milestone, like touchdown your dream job or transferring into your first solo condo, or just simply because. That’s why we partnered with Shane Co., purveyors of timeless advantageous jewellery, to discover the numerous methods we will present ourselves a bit of 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, be sure you use https://squoosh.app optimize with oxiPNG utilizing Lowered 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 on.? 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 beneath the hero? */
/* Set to ‘true’ to take away further advert, set to ‘false’ if all seems 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 cellular = false;
/* What machine is that this? */
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i))
cellular = true;
// Popups
let prevPop = null;
perform 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”;
}
perform 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);
perform hideNav()
const a = doc.querySelectorAll(“.global-header”);
a[0].model.show = “none”;
perform showNav()
const a = doc.querySelectorAll(“.global-header”);
a[0].model.show = “block”;
perform 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(perform()
clearTimeout(waitForFadein);
pop.model.opacity = “1.0”;
pop.model.transition = “0.3s”;
pop.model.WebkitTransition = “0.3s”;
// Clear up
a = undefined;
e = undefined;
// Conceal nav
if(cellular)
hideNav();
, 50);
prevPop = id;
posArrow(id);
perform 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(perform()
clearTimeout(waitForFadeout);
b.model.show = “none”;
pop.model.show = “none”;
// Clear up
b = undefined;
f = undefined;
// Present nav
if(cellular)
showNav();
, 200);
// Subsequent and former
let nextID;
let prevID;
perform 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”;
// Conceal present one
m.model.show = “none”;
// Clear up
n = undefined;
m = undefined;
q = undefined;
r = undefined;
// Retailer it
prevPop = prevID;
perform setupGridTitle()
if (cellular == 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;
perform 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 = "
“);
perform setupMobileClicks()
if (cellular == true)
let o = doc.getElementsByClassName(“tmp-card”);
for (let e = 0; e < a.size; e++)
//a[e].model.
perform initOther()
setupGridTitle();
setupContent();
setupMobileClicks();
perform 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(perform ()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);perform 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”perform 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());perform setupVideo()(doc.getElementById("tmp-content").innerHTML='‘), loadVideo();perform setupStatic()doc.getElementById(“tmp-content”).innerHTML=’‘;perform setup(e)1==e ? setupVideo() : setupStatic(); showHero();perform manageAds(e)if (1==e)let e=doc.getElementsByClassName(“row-ad”); (e[0].model.show=”none”), (e=void 0), delete e;perform prepared(e)(doc.attachEvent ? “full”===doc.readyState : “loading” !==doc.readyState) ? e() : doc.addEventListener(“DOMContentLoaded”, e);(doc.onmouseleave=perform ()window.isReady=!1;), window.addEventListener(“resize”, perform ()window.isReady=!1;), (window.isReady=void 0 !==window.isReady && window.isReady), prepared(perform ()var e=setInterval(perform ()window.imagesLoaded && (imagesLoaded(“#tmp-load”,background: !0, perform ()(window.isReady=!1), clearInterval(e);), clearInterval(e));, 100); if (!1 !==window.isReady) return; window.isReady=!0; const t=setTimeout(perform ()clearTimeout(t), setup(hasVideo), setupBanner(), initOther(), manageAds(removeExtraAd);, 500););
Like what you see? How about some extra R29 goodness, proper right here?