Created
May 5, 2015 19:40
-
-
Save jefffis/3509a6a9c0011309be52 to your computer and use it in GitHub Desktop.
Listrak Modal Markup
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> | |
#listrak-modal-wrap { | |
display: table; | |
position: fixed; | |
top: 0; | |
left: 0; | |
z-index: 1000; | |
background: rgba(0,0,0,0.5); | |
height: 100%; | |
width: 100%; | |
} | |
#listrak-modal-wrap > div { | |
display: table-cell; | |
height: 100%; | |
padding: 1.5rem; | |
text-align: center; | |
vertical-align: middle; | |
} | |
#listrak-modal-wrap form, #listrak-modal-wrap .form { | |
position: relative; | |
background: white; | |
max-width: 40rem; | |
margin: auto; | |
padding: 1.5rem; | |
} | |
#listrak-modal-wrap .form { | |
padding-top: 3rem; | |
} | |
#listrak-modal-wrap hr { | |
background: #111; | |
max-width: 5rem; | |
height: 1px; | |
margin: .5rem auto; | |
border: 0; | |
} | |
#listrak-modal-wrap .n { | |
background: white; | |
margin: 1rem auto; | |
} | |
#listrak-modal-wrap span { | |
display: block; | |
max-width: 300px; | |
margin: auto auto 2rem; | |
padding: .5rem; | |
border: 1px solid #333; | |
} | |
#listrak-modal-wrap strong { | |
border-bottom: 2px solid #ddd; | |
} | |
#listrak-modal-wrap img { | |
width: 100%; | |
} | |
#listrak-modal-wrap img:first-child, #listrak-modal-wrap label { | |
max-width: 300px; | |
margin: auto; | |
} | |
#listrak-modal-wrap img:nth-child(3) { | |
max-width: 350px; | |
margin: 5px 0 0; | |
} | |
#listrak-modal-wrap input { | |
-webkit-transition: 0s; | |
-moz-transition: 0s; | |
-ms-transition: 0s; | |
-o-transition: 0s; | |
transition: 0s; | |
} | |
#listrak-modal-wrap button { | |
background: #2a2a2a; | |
border: 0; | |
margin: 1rem 0 .5rem; | |
-webkit-transition: 0s; | |
-moz-transition: 0s; | |
-ms-transition: 0s; | |
-o-transition: 0s; | |
transition: 0s; | |
} | |
#listrak-modal-wrap button:hover { | |
border: 0; | |
} | |
#listrak-modal-wrap button:active { | |
background: #111; | |
} | |
#listrak-modal-wrap small { | |
display: block; | |
width: 100%; | |
float: none; | |
} | |
#listrak-modal-wrap em:before { | |
display: block; | |
position: absolute; | |
top: .5rem; | |
right: .5rem; | |
color: #999; | |
cursor: pointer; | |
font-size: 28px; | |
line-height: 1; | |
content: "\2715"; | |
} | |
#listrak-modal-wrap em:hover:before { | |
color: #111; | |
} | |
#listrak-modal-wrap em:active:before { | |
color: #ccc; | |
} | |
</style> | |
<div id="listrak-modal-wrap"> | |
<div> | |
<form> | |
<label for="ltkmodal-email"> | |
<img src="https://images.tradesy.com/images/listrak/modals/hold-up.jpg" alt="Hold up"> | |
<hr> | |
<img src="https://images.tradesy.com/images/listrak/modals/be-a-member.jpg" alt="Be a member."> | |
<p> | |
and <strong>get $25</strong> off your first order* | |
</p> | |
<input type="email" name="email" id="ltkmodal-email" placeholder="Enter your email"> | |
<input type="hidden" class="text" name="Source.Modal" size="40" maxlength="100" value="On"> | |
</label> | |
<button class="ltkmodal-subscribe"> | |
Join & Get $25 | |
</button> | |
<small> | |
* offer applies to purchases of $199+ | |
</small> | |
<em id="close-modal-wrap" class="ltkmodal-close"></em> | |
</form> | |
</div> | |
</div> | |
<script> | |
var close = document.getElementById('close-modal-wrap'), | |
modal = document.getElementById('listrak-modal-wrap'); | |
close.onclick = function() { | |
setTimeout(function() { | |
modal.remove() | |
}, 250) | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment