Slide Show

Single Mother, Pioneering Photographer: The Remarkable Life of Bayard Wootten

Credit Bayard Wootten/North Carolina Collection, UNC Chapel Hill Libraries

'); } else { var adElement = document.createElement('div'); adElement.className = 'module ad'; adElement.id = 'MiddleRight'; var article = document.querySelector('.lede-content.with-ad'); if (article != null) { var articleParent = article.parentNode; articleParent.insertBefore(adElement, article); } } adLoaded = true; } var getHeight = function(element, include) { if (!include) { include = { padding: false, border: false, margin: false }; } var height = masthead.clientHeight; if (!include.padding) { height -= parseInt(window.getComputedStyle(element, null) .getPropertyValue('padding-top')) + parseInt(window.getComputedStyle(element, null) .getPropertyValue('padding-bottom')); } if (include.border) { height += parseInt(window.getComputedStyle(element, null) .getPropertyValue('border-top-width')) + parseInt(window.getComputedStyle(element, null) .getPropertyValue('border-bottom-width')); } if (include.margin) { height += parseInt(window.getComputedStyle(element, null) .getPropertyValue('margin-top')) + parseInt(window.getComputedStyle(element, null) .getPropertyValue('margin-bottom')); } return height; }; var setHomePromoLayout = function() { var promoImg = document.querySelector('.lens-masthead-and-lede .promo img'), lensMastheadAndLede = document.querySelector('.lens-masthead-and-lede'), promoImgMetaHeight = document.querySelector('.lede-content [itemprop="height"]'), promoImgMetaWidth = document.querySelector('.lede-content [itemprop="width"]'), potentialHeight = 0, imageAspectRatio = 0; if (!promoImg) { document.querySelector('.lens-masthead-and-lede .lede-content').style.display = 'none'; document.querySelector('.after-masthead-and-lede > .lede-content').style.display = 'none'; return; // If the proportions are in meta fields, use that to calculate aspect ratio. } else if (promoImgMetaHeight && promoImgMetaWidth) { var height = promoImgMetaHeight.getAttribute('content'), width = promoImgMetaWidth.getAttribute('content'); imageAspectRatio = width / height; // Otherwise, load the image and get the actual dimensions. } else { imageAspectRatio = promoImg.width / promoImg.height; if (!imageAspectRatio) { tempImage = new Image(); tempImage.src = promoImg.getAttribute('src'); tempImage.addEventListener('load', function() { tempImage.parentNode.removeChild(tempImage); setHomePromoLayout(); }); document.body.appendChild(tempImage); return; } } var idealLayout = lensMastheadAndLede.getAttribute('data-layout'); if (mastheadEl = document.querySelector('.masthead')) { potentialHeight += getHeight(mastheadEl, { padding: true, border: true, margin: true }); } if (idealLayout == 'no-crop') { potentialHeight += getHeight(document.querySelector('.lens-masthead-container'), { padding: true, border: true, margin: true }) + document.querySelector('.lens-masthead-container').offsetWidth / imageAspectRatio; // Switch to media left, content right if (window.innerHeight - potentialHeight < 100) { document.body.className = document.body.className.replace('theme-lede-promo-no-crop', ''); document.body.className = document.body.className.replace('theme-lede-promo-media-left-content-right', ''); document.body.className = document.body.className + ' theme-lede-promo-media-left-content-right'; if (hasAd) { loadAd('a-column'); } if (document.querySelector('.after-masthead-and-lede > .lede-content')) { document.querySelector('.after-masthead-and-lede > .lede-content').style.display = 'none'; } if (document.querySelector('.a-column .lede-content')) { document.querySelector('.a-column .lede-content').style.display = 'none'; } } else { document.body.className = document.body.className.replace('theme-lede-promo-no-crop', ''); document.body.className = document.body.className.replace('theme-lede-promo-media-left-content-right', ''); document.body.className = document.body.className + ' theme-lede-promo-no-crop'; // Show the lede content above A+C columns if (hasAd) { loadAd(); document.querySelector('.a-column .lede-content').style.display = 'none'; document.querySelector('.after-masthead-and-lede > .lede-content').style.display = 'block'; // Show the lede content in the A column } else { document.querySelector('.a-column .lede-content').style.display = 'block'; document.querySelector('.after-masthead-and-lede > .lede-content').style.display = 'none'; } } // The promo image should attempt to be rendered in full bleed layout. } else if (idealLayout == 'full-bleed') { var intendedAspectRatio = 0; if (window.innerWidth >= 1125) { intendedAspectRatio = 16 / 9; } else if (window.innerWidth >= 1125) { intendedAspectRatio = 1.7243; } else if (window.innerWidth >= 1024) { intendedAspectRatio = 1.6704; } else if (window.innerWidth >= 975) { intendedAspectRatio = 1.6469; } else if (window.innerWidth >= 768) { intendedAspectRatio = 1.6587; } potentialHeight += document.querySelector('.main').offsetWidth / intendedAspectRatio; // Switch to media left, content right if (window.innerHeight - potentialHeight < 100) { loadAd('a-column'); document.body.className = document.body.className.replace('theme-lede-promo-full-bleed', ''); document.body.className = document.body.className.replace('theme-lede-promo-media-left-content-right', ''); document.body.className = document.body.className + ' theme-lede-promo-media-left-content-right'; document.querySelector('.lede-content .image').style.height = 'auto'; document.querySelector('.after-masthead-and-lede > .lede-content, .a-column .lede-content').style.display = 'none'; // Switch to full bleed } else { document.body.className = document.body.className.replace('theme-lede-promo-full-bleed', ''); document.body.className = document.body.className.replace('theme-lede-promo-media-left-content-right', ''); document.body.className = document.body.className + ' theme-lede-promo-full-bleed'; document.querySelector('.lede-content .image').style.height = document.querySelector('.main').offsetWidth / intendedAspectRatio + 'px'; // Show the lede content above A+C columns if (hasAd) { loadAd(); document.querySelector('.a-column .lede-content').style.display = 'none'; document.querySelector('.after-masthead-and-lede > .lede-content').style.display = 'block'; // Show the lede content in the A column } else { document.querySelector('.a-column .lede-content').style.display = 'block'; document.querySelector('.after-masthead-and-lede > .lede-content').style.display = 'none'; } } // The promo image doesn't meet the aspect ratio required and should be forced into the media-left-content-right layout. } else if (idealLayout == 'media-left-content-right') { document.body.className = document.body.className.replace(/(?:^|\s)theme-lede-promo-media-left-content-right(?!\S)/g, ''); document.body.className = document.body.className + ' theme-lede-promo-media-left-content-right'; loadAd('a-column'); potentialHeight += getHeight(document.querySelector('.lens-masthead-container'), { padding: true, border: true, margin: true }) + document.querySelector('.lens-masthead-and-lede .media').offsetWidth / imageAspectRatio; if (window.innerHeight - potentialHeight > 0) { document.body.className = document.body.className.replace(/(?:^|\s)small-lede(?!\S)/g, ''); } else { document.body.className = document.body.className.replace(/(?:^|\s)small-lede(?!\S)/g, ''); document.body.className = document.body.className + ' small-lede'; } } }; if (document.body.className.indexOf('home') != -1) { window.addEventListener('resize', setHomePromoLayout); setHomePromoLayout(); } })();

Recent Posts