Created
January 24, 2019 21:27
-
-
Save yongzhihuang/8710139b32c6e5d73d787cf4a590bf18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
@font-face { | |
font-family: "Adobe Caslon"; | |
font-style: normal; | |
font-weight: normal; | |
src: url('/fonts/AdobeCaslonPro-Regular.woff2') format('woff2'), url('/fonts/AdobeCaslonPro-Regular.woff') format('woff'); | |
} | |
@font-face { | |
font-family: "Graphik Web"; | |
font-stretch: normal; | |
font-style: normal; | |
font-weight: 500; | |
src: url('/fonts/Graphik-Medium.eot'); | |
src: url('/fonts/Graphik-Medium.eot?#iefix') format('embedded-opentype'), url('/fonts/Graphik-Medium.woff2') format('woff2'), url('/fonts/Graphik-Medium.woff') format('woff'); | |
} | |
html, | |
body { | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
background: #26baef; | |
text-align: center; | |
font-family: "Adobe Caslon", Georgia, "Times New Roman", Times, serif; | |
overflow: hidden; | |
} | |
h1, h2, h3, h4, h5, h6, time, div, p, span, a { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
text-rendering: geometricPrecision; | |
} | |
h1, | |
h2 { | |
font-weight: normal; | |
} | |
img { | |
margin-bottom: 20px; | |
} | |
.wrapper { | |
width: 100%; | |
height: 100%; | |
padding: 20px; | |
box-sizing: border-box; | |
display: -webkit-box; | |
display: -ms-flexbox; | |
display: flex; | |
-webkit-box-orient: vertical; | |
-webkit-box-direction: normal; | |
-ms-flex-direction: column; | |
flex-direction: column; | |
-webkit-box-align: center; | |
-ms-flex-align: center; | |
align-items: center; | |
-webkit-box-pack: center; | |
-ms-flex-pack: center; | |
justify-content: top; | |
} | |
.header { | |
font-size: 48px; | |
line-height: 36px; | |
padding-top: 5px; | |
margin-top: 10px; | |
margin-bottom: 0; | |
} | |
.subheader { | |
font-size: 24px; | |
line-height: 25px; | |
margin: 6px; | |
} | |
.white { | |
color: #fff; | |
} | |
.body, .sign-up { | |
font-size: 14px; | |
margin-bottom: 10px; | |
margin-top: 0; | |
line-height: 12px; | |
} | |
.body, | |
.button, | |
.sign-up { | |
font-family: "Graphik Web", "Helvetica Neue", Helvetica, Arial, sans-serif; | |
font-weight: 500; | |
} | |
.top { | |
width: 100%; | |
margin-top: 15px; | |
} | |
.bottom { | |
margin-bottom: 0; | |
position: relative; | |
left: 0; | |
width: 100%; | |
} | |
.button { | |
width: 80%; | |
border-radius: 2px; | |
background-color: #000; | |
display: inline-block; | |
color: #fff; | |
text-decoration: none; | |
padding: 14px 0; | |
margin-top: 14px; | |
font-size: 14px; | |
} | |
.sign-up { | |
padding-top: 20px; | |
} | |
.sign-up a { | |
color: #121212; | |
} | |
#paywall { | |
display: none; | |
} | |
</style> | |
<div id="paywall"> | |
<div class="Paywall__barrier Paywall__show"> | |
<div class="Paywall__wall"> | |
<div class="Paywall__container"> | |
<div class="wrapper"> | |
<div class="top"> | |
<h1 class="header white">You’ve run out.</h1> | |
<h2 class="subheader">You have read all your <br> complimentary <br> articles for this month.</h2> | |
</div> | |
<img src="%%FILE:PNG1%%" srcset="%%FILE:PNG1%% 1x, %%FILE:PNG2%% 2x" alt="Print + Digital – 12 weeks for $12."> | |
<div class="bottom"> | |
<p class="body">Print + Digital—12 weeks for $12.</p> | |
<p class="body">Plus, get a free tote bag.</p> | |
<a class="button" href="%%CLICK_URL_UNESC%%%%DEST_URL%%" target="_blank">Subscribe</a> | |
<p class="sign-up">Already have a login? <a id="signUp" href="#">Sign in</a></p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script> | |
(function init(window, document) { | |
window.onload = function () { | |
window.frameElement.style.cssText += 'height:100vw;width:100vw;min-height:200%'; | |
window.frameElement.parentNode.style.minWidth = ''; | |
window.frameElement.parentNode.parentNode.style.cssText += 'position:fixed;top:0;left:0;widht:100%;'; | |
window.frameElement.parentNode.parentNode.parentNode.style.overflow = 'visible'; | |
paywall.style.display = 'block'; | |
} | |
try { | |
window.top._satellite.track('barrierfull'); | |
window.top.dataLayer.push({'event': 'barrier-full'}); | |
window.top.digitalData.articleNumSession = 4; | |
} catch (e) { | |
console.error('Error in barrier ad tracking calls', e); | |
} | |
// redirect the user to accounts passing the current url | |
signUp.addEventListener('click', function (e) { | |
window.top.location.href = `https://account.newyorker.com/?retURL=${window.top.location.href}?reload=true`; | |
}); | |
})(window, document); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment