/* /////////////////////////////////////////////////////////////////////////////// */
/* 1. REQUIRED: Do you need a video opener? */
/* Set to ‘true’ if using video for the opener, if you’re just using a static image, set to ‘false’ */
var hasVideo = true;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 2. REQUIRED: Whether a static image or video hero, you’ll need add your hero images here. For video, this image is used as loading/low battery image */
/* Desktop & Tablet Hero image should be 2000px wide, optimized via https://squoosh.app using mozJPG at 70% compression, upload to DASH Media Library, grab url of image and paste here. */
var desktopHeroImage = “https://www.refinery29.com/images/11505796.jpg”;
/* Mobile Hero image should be 1280px wide, optimized via https://squoosh.app using mozJPG at 70% compression, upload to DASH Media Library, grab url of image and paste here. */
var mobileHeroImage = “https://www.refinery29.com/images/11505795.jpg”;
/* /// Tip: If creating a first frame image for a video opener, make a screen cap of the final uploaded JWPlayer video as JW will do it’s own compression on you video and thus the color maybe different. */
/* /////////////////////////////////////////////////////////////////////////////// */
/* 3. REQUIRED: Whether video or image only, please add accessible alt text, if there is text baked into the image, you should add it here. */
var desktopHeroAltText = “29 Acts of Self Love”;
var mobileHeroAltText = “29 Acts of Self Love”;
/* /// Tip: If quote marks are needed in text, use ” if you need an emdash use — */
/* /////////////////////////////////////////////////////////////////////////////// */
/* 4. REQUIRED FOR VIDEO: Desktop & Tablet Wide, video URL from JWPlayer, use 1920px 8:3 wide asset, mp4 is best, no audio, 6-10 second loop, do not repeat the loop in the file */
var desktopVideo = “https://content.jwplatform.com/videos/NFleWxa8-r0yi2e87.mp4”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 5. REQUIRED FOR VIDEO: Moble video URL from JWPlayer use 720px 8:3 square to tall asset, typical ratios 1:1,5:6,4:3, no audio, 6-10 second loop, do not repeat the loop in the file */
var mobileVideo = “https://content.jwplatform.com/videos/qNUvKsmJ-b8WZHQfV.mp4”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 6. INTRO / BOILERPLATE: Do you need an intro blurb under the hero? */
/* If yes, set to ‘true’. if no, set to ‘false’ */
var hasIntro = true;
/* Add your intro text here */
var introText = “Practicing self-love should be a daily habit, whether you’re celebrating a major milestone, like landing your dream job or moving into your first solo apartment, or simply just because. That’s why we partnered with Shane Co., purveyors of timeless handcrafted fine jewelry, to explore the countless ways we can show ourselves a little gratitude each day. From gifting yourself something that sparkles to indulging in a day of pampering, click the tiles below for 29 unique “treat yourself” ideas.”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 7. SPONSOR / BRAND BANNER: Do you need a sponsor or brand banner? */
/* If yes, set to ‘true’. if no, set to ‘false’ */
var hasBanner = true;
/* Banner image, transparent PNG, 600×80 for Sponsored, 600×200 for Brand, be sure to use https://squoosh.app optimize with oxiPNG using Reduced Palette */
var bannerImage = “https://www.refinery29.com/images/11503583.png”;
/* REQUIRED: Add your banner’s alt text here. */
var bannerImageAltText = “Created in partnership with Shane Co.”;
/* Need a url for click tracker etc.? Add here. Leave blank if not. */
var bannerURL = “https://www.shaneco.com/?utm_source=r29&utm_medium=referral&utm_campaign=madetoshine_29reasonsfeature”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 8. CHECK: Is there a double ad showing up under the hero? */
/* Set to ‘true’ to remove extra ad, set to ‘false’ if all looks ok */
var removeExtraAd = false;
/* /////////////////////////////////////////////////////////////////////////////// */
/* 9. EDIT: Rollover image transparent png. Square min 2000px x 2000px. Squooshed. */
const cardHoverImage = “https://www.refinery29.com/images/11503513.png”;
/* /////////////////////////////////////////////////////////////////////////////// */
/* DO NOT ALTER */
let mobile = false;
/* What device is this? */
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
mobile = true;
}
// Popups
let prevPop = null;
function posArrow(id) {
if (window.innerWidth < 1024.98) {
const a = document.getElementById('tmp-arrows');
const b = document.querySelectorAll('.tmp-popup-image');
const rect = b[id].getBoundingClientRect().top;
let y;
if (window.innerWidth 1024) {
y = (rect) + (456/2);
} else {
y = ((rect) + (456/2)) - 30;
}
}
a.style.top = y + "px";
}
}
function setupContent() {
let a = document.querySelectorAll(".tmp-card");
let b = document.querySelectorAll(".tmp-card-rollover");
let c = document.querySelectorAll(".tmp-popup");
for (let e = 0; e < a.length; e++) {
// Setup 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);
}
}
function hideNav() {
const a = document.querySelectorAll(“.global-header”);
a[0].style.display = “none”;
}
function showNav() {
const a = document.querySelectorAll(“.global-header”);
a[0].style.display = “block”;
}
function openPop(id) {
if (prevPop != null) {
// Clean up any previous pop
let ff = [“tmp-popup-” + prevPop];
let bb = document.getElementById(ff);
bb.style.display = “none”;
bb.style.opacity = “0.0”;
}
// Show new pop
let e = [“tmp-popup-” + id];
let a = document.getElementById(e);
a.style.display = “block”;
a.style.opacity = “1.0”;
const pop = document.getElementById(“tmp-pop”);
pop.style.display = “block”;
var waitForFadein = setTimeout(function(){
clearTimeout(waitForFadein);
pop.style.opacity = “1.0”;
pop.style.transition = “0.3s”;
pop.style.WebkitTransition = “0.3s”;
// Clean up
a = undefined;
e = undefined;
// Hide nav
if(mobile) {
hideNav();
}
}, 50);
prevPop = id;
posArrow(id);
}
function closePop() {
if (prevPop != null) {
let f = [“tmp-popup-” + prevPop];
let b = document.getElementById(f);
const pop = document.getElementById(“tmp-pop”);
pop.style.opacity = “0.0”;
pop.style.transition = “0.3s”;
pop.style.WebkitTransition = “0.3s”;
var waitForFadeout = setTimeout(function(){
clearTimeout(waitForFadeout);
b.style.display = “none”;
pop.style.display = “none”;
// Clean up
b = undefined;
f = undefined;
// Show nav
if(mobile) {
showNav();
}
}, 200);
}
}
// Next and previous
let nextID;
let prevID;
function nextPopup() {
// Current one
let h = [“tmp-popup-” + prevPop];
let d = document.getElementById(h);
// Next one
if (prevPop 0) {
prevID = prevPop – 1;
} else {
prevID = 28;
}
let q = [“tmp-popup-” + prevID];
let r = document.getElementById(q);
// Fade out current one
m.style.opacity = “0.0”;
// Fade in next one
r.style.display = “block”;
r.style.opacity = “1.0”;
// Hide current one
m.style.display = “none”;
// Clean up
n = undefined;
m = undefined;
q = undefined;
r = undefined;
// Store it
prevPop = prevID;
}
function setupGridTitle() {
if (mobile == true) {
let o = document.getElementsByClassName(“tmp-layer-title”);
for (e = 0; e < o.length; e++) {
o[e].style.opacity = "1.0";
o[e].style.bottom = "5px";
}
}
}
// Tools
const toolsOn = false;
function tempNumbers() {
let e,
t = document.querySelectorAll(".tmp-card .tmp-card-rollover");
for (e = 0; e < t.length; e++) {
if ((t[e].setAttribute("id", ["image" + e]), 1 == toolsOn)) {
let n = document.createElement("DIV");
t[e].appendChild(n), (n.innerHTML = "
“);
}
}
}
function setupMobileClicks() {
if (mobile == true) {
let o = document.getElementsByClassName(“tmp-card”);
for (let e = 0; e < a.length; e++) {
//a[e].style.
}
}
}
function initOther() {
setupGridTitle();
setupContent();
setupMobileClicks();
}
function showHero(){let t=document.getElementById("tmp"), s=document.getElementById("tmp-extra"), a=document.getElementById("tmp-loading"); t.style.opacity="0.0";t.style.display="block"; s.style.display="block"; const e=setTimeout(function (){clearTimeout(e), (t.style.opacity="1.0"), (t.style.transition="all 0.5s"), (t.style.WebkitTransition="all 0.5s"), (s.style.opacity="1.0"), (s.style.transition="all 0.5s"), (s.style.WebkitTransition="all 0.5s"), (a.style.display="none");}, 500);}function setupBanner(){let e;""!=bannerURL?(e='‘,urlend=”“):(e=””,urlend=””);let n=e+’
“+introText+”
“,1==hasIntro?t.style.display=”block”:t.style.display=”none”;let l=document.getElementById(“tmp-banner”);l.innerHTML=n,1==hasBanner?l.style.display=”block”:l.style.display=”none”}function loadVideo(){var e=document.getElementById(“tmp-video-hero-desktop”), t=document.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());}function setupVideo(){(document.getElementById("tmp-content").innerHTML='‘), loadVideo();}function setupStatic(){document.getElementById(“tmp-content”).innerHTML=’
Like what you see? How about some more R29 goodness, right here?
The Waffle Chic, a culinary enterprise founded by Karen Davis in 2017, will be on…
.disclaimer{width:90%;margin-bottom:1rem}.disclaimer__lines{width:100%;margin:0 auto;border-bottom:1px solid #999;padding:0;max-width:150px}.disclaimer__copy{width:100%;max-width:355px;font-family:Brown Regular,sans-serif;font-size:.9rem;font-weight:300;line-height:1.3em;color:#333;padding:0 0 .4rem;margin:1rem auto;text-align:center} All linked products are independently selected by…
let prvc = 1000; let curr = 1000; function closeCard() { if (prvc != 1000)…
.disclaimer{width:90%;margin-bottom:1rem}.disclaimer__lines{width:100%;margin:0 auto;border-bottom:1px solid #999;padding:0;max-width:150px}.disclaimer__copy{width:100%;max-width:355px;font-family:Brown Regular,sans-serif;font-size:.9rem;font-weight:300;line-height:1.3em;color:#333;padding:0 0 .4rem;margin:1rem auto;text-align:center} All linked products are independently selected by…
If you thought Madewell’s new arrivals were already a denim and suede dreamscape, you’ll fall…
Welcome to Refinery29 Loves, the monthly news bulletin where you’ll find the best things to…