Skip to content

Instantly share code, notes, and snippets.

@msmithstubbs
Last active October 11, 2015 17:58
Show Gist options
  • Save msmithstubbs/3897852 to your computer and use it in GitHub Desktop.
Save msmithstubbs/3897852 to your computer and use it in GitHub Desktop.
Back In Stock registration form template
<!doctype html>
<!--[if lt IE 7]> <html class="ie6"> <![endif]-->
<!--[if IE 7]> <html class="ie7"> <![endif]-->
<!--[if IE 8]> <html class="ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta name="viewport" content="width=device-width">
<style>
/*
* simple reset
* http://www.maxdesign.com.au/articles/css-reset/
*
*/
html, body, ul, ol, li, form, fieldset, legend {
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6, p { margin-top: 0; }
fieldset,img { border: 0; }
legend { color: #000; }
li { list-style: none; }
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
table {
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
text-align: left;
vertical-align: top;
font-weight: normal;
}
input, textarea, select {
font-size: 110%;
line-height: 1.1;
}
abbr, acronym {
border-bottom: .1em dotted;
cursor: help;
}
/* Widget styles */
body {
font-family: Arial, sans-serif;
font-size: 62.5%;
}
.frame {
width: 480px;
padding: 35px 35px 15px 35px;
background: #4a4a4a;
background: rgba(74, 74, 74, 0.93);
margin: auto;
color: white;
border: 1px solid #888282;
overflow: hidden;
position: relative;
-o-box-shadow: 0 0 2px #B8B2B2 inset;
-webkit-box-shadow: 0 0 2px #B8B2B2 inset;
-moz-box-shadow: 0 0 2px #B8B2B2 inset;
box-shadow: 0 0 2px #B8B2B2 inset;
-moz-border-radius: 6px;
-o-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
}
h1 {
font-size: 2.4em;
font-weight: normal;
text-align: center;
}
p {
font-size: 1.4em;
}
form {
overflow: hidden;
}
.close {
font-size: 14px;
color: #eee;
font-size: 16px;
position: absolute;
right: 12px;
top: 8px;
text-decoration: none;
padding: 2px 5px;
line-height: 1;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-o-border-radius: 8px;
border-radius: 5px;
box-shadow: 0 0 1px #333 inset;
}
.close:hover {
color: white;
background: #4a4a4a;
}
.product {
margin-top: 8px;
overflow: hidden;
}
.product .product_image {
float: left;
margin-right: 18px;
display: block;
height: 100px;
width: 138px;
text-align: center;
}
.product h2 {
font-size: 2.4em;
font-weight: normal;
margin-top: 0;
}
.product select {
min-width: 260px;
max-width: 320px;
font-size: 16px;
}
.ie7 .product select {
width: 320px;
}
.customer {
margin-top: 12px;
}
.customer label {
text-align: right;
margin-right: 18px;
font-size: 1.3em;
width: 138px;
display: inline-block;
vertical-align: text-bottom;
}
.customer input {
border: none;
-o-border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
font-size: 1.4em;
width: 300px;
padding: 5px 5px;
overflow: hidden;
-moz-border-radius: 3px;
-o-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-o-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3) inset;
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3) inset;
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3) inset;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3) inset;
}
.ie7 .customer input {
padding-left: 0;
padding-right: 0;
}
.quantity input {
width: 90px;
}
.submit {
overflow: hidden;
}
button {
clear: right;
float: right;
font-size: 1.4em;
background: orange;
border: none;
color: #fafafa;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
padding: 7px 10px;
margin-right: 12px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-o-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
button:hover {
cursor: pointer;
}
.submit .error {
font-size: 1.3em;
background: #7a7a42;
margin: 0 10px 10px 10px;
font-size: 1.2em;
color: #efefef;
padding: 5px 10px;
-o-border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-o-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
.footer {
margin-top: 12px;
margin-bottom: 0;
}
.footer p {
font-size: 1.2em;
margin-bottom: 0;
text-align: center;
}
.completed_message {
display: none;
background: #447244;
padding: 3px 10px;
margin: 12px;
line-height: 3em;
overflow: hidden;
-o-border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-o-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
.completed_message p {
font-size: 16px;
}
.completed_message a {
color: white;
}
/* Completed state */
.complete .customer,
.complete .submit {
display: none;
}
.complete .completed_message {
display: block;
}
/* For mobile */
@media only screen and (max-width: 480px) {
.frame {
box-sizing: border-box;
width: 100%;
padding: 25px 15px 15px 15px;
}
.customer {
margin-left: 6px;
margin-right: 6px;
}
.product .product_image {
display: none;
}
.customer label {
text-align: left;
}
.customer input {
width: 100%;
box-sizing: border-box;
}
}
/* Custom styles begin here */
{{{styles}}}
</style>
</head>
<body>
<div id="container" class="frame">
<h1>{{headline}}</h1>
<a class="close action-close" href="#close" title="{{close_label}}">&times;</a>
<div class="intro">
<p>{{body_copy}}</p>
</div>
<form>
<div class="product">
<span class="product_image">
{{#product.featured_image}}
<img src="{{#smallProductImage}}{{product.featured_image}}{{/smallProductImage}}">
{{/product.featured_image}}
</span>
<h2>{{product.title}}</h2>
<select id="variants">
{{#product.variants}}
<option value="{{id}}">{{title}}</option>
{{/product.variants}}
</select>
</div>
<div class="customer">
<p>
<label for="email_address">{{email_address_label}}</label>
<input id="email_address" autofocus type="email"></input>
</p>
</div>
{{#quantity_field_enabled}}
<div class="customer quantity">
<p>
<label for="quantity_required">{{quantity_required_label}}</label>
<input value="1" id="quantity_required" type="number"></input>
</p>
</div>
{{/quantity_field_enabled}}
<div class="submit">
<div id="message_holder">
</div>
<button type="submit">{{button_label}}</button>
</div>
</form>
<div class="completed_message">
<p>{{registration_complete}} <a href="#" class="action-close">{{ close_label }}</a>
</p>
</div>
<div class="footer">
<p>{{footer_copy}}</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment