Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="description" content="Shopify application challenge">
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>Shopify's challenge</title>
- <link href="css.css" rel="stylesheet">
- <script src="js.js"></script>
- <style id="jsbin-css">
- * {
- background-color: #000639;
- font-family: Helvetica, Arial, sans-serif;
- }
- body {}
- p {
- color: #FFFFFF;
- text-align: left;
- }
- .topmsg {
- font-size: 24px;
- margin-bottom: 0;
- }
- .underline {
- color: #7AB55C;
- margin: 0 0 50px 0;
- }
- .container_topmsg_underline_sub {
- width: 500px;
- padding: 1.0625em 1em;
- margin: 1% auto auto auto;
- }
- .container_email_dropdown {
- width: 500px;
- display: inline-flex;
- position: relative;
- margin: 0 0 5px 0;
- }
- #emailAddress {
- height: 22px;
- width: 65%;
- margin: 0 20px 0 0;
- padding: 1.0625em 1em;
- color: #7B7B7B;
- font-size: 16px;
- box-shadow: 0 0 0 1px #7B7B7B;
- border: 0;
- border-radius: 7px;
- background-color: #ffffff;
- }
- #dropdown {
- margin: 0 5px 0 0;
- height: 56px;
- width: 35%;
- padding: 1.0625em 1em;
- color: #7B7B7B;
- font-size: 16px;
- box-shadow: 0 0 0 1px #7B7B7B;
- border: 0;
- border-radius: 7px;
- background-color: #ffffff;
- }
- .signUpBtn {
- display: block;
- height: 56px;
- width: 500px;
- margin: 15px 0 0 0;
- padding: 1.0625em 1em;
- color: #FFFFFF;
- font-size: 16px;
- border: 0;
- border-radius: 5px;
- background-color: #5c6ac4;
- }
- #unsubsribe {
- position: fixed;
- width: 100%;
- bottom: 0;
- text-align: center;
- text-decoration: underline;
- color: #FFFFFF;
- }
- #invalid_Email {
- display: flex;
- color: #000639;
- font-size: 16px;
- margin: 0 auto;
- width: 500px;
- font-family: Helvetica;
- }
- select {
- background-color: #FFFFFF;
- }
- </style>
- </head>
- <body>
- <div class="body">
- <div class="container_top">
- <div class="container_topmsg_underline_sub">
- <p class="topmsg"> Stay up to date with the ecommerce trends with Shopify's newsletter</p>
- <p class="underline">___</p>
- <p>Subscribe for free marketing tips</p>
- </div>
- </div>
- <form class="container_middle" method="POST" name="form">
- <center>
- <div class="container_email_dropdown">
- <input type="email" id="emailAddress" name="emailAddress" placeholder="Email Address" required>
- <select name="interest" id="dropdown">
- <option id="dropdown" value="Interested in...">Interested in...</option>
- <option id="dropdown" value="1">1</option>
- <option id="dropdown" value="2">2</option>
- <option id="dropdown" value="3">3</option>
- <option id="dropdown" value="4">4</option>
- </select>
- </div>
- <p id="invalid_Email">Please enter a valid email address</p>
- </center>
- <div class="signUpNow">
- <center>
- <input class="signUpBtn" type="button" onClick="verifyEmail();" value="Sign up now">
- </center>
- </div>
- </form>
- <p id="unsubsribe">Unsubcribe</p>
- </div>
- <script id="jsbin-javascript">
- function verifyEmail() {
- var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
- if (document.form.emailAddress.value.search(emailRegEx) == -1) {
- document.getElementById("invalid_Email").style.color = '#C23628';
- } else {
- document.getElementById("invalid_Email").style.color = '#000639';
- insertValues();
- }
- }
- function insertValues() {
- var email = document.form.emailAddress.value;
- var interest = document.form.interest.value;
- console.log(email + " is interested in: " + interest);
- }
- </script>
- <script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
- <html>
- <head>
- <meta name="description" content="Shopify application challenge">
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>Shopify's challenge</title>
- <link href="css.css" rel="stylesheet">
- <script src="js.js"><\/script>
- </head>
- <body>
- <div class="body">
- <div class="container_top">
- <div class="container_topmsg_underline_sub">
- <p class="topmsg"> Stay up to date with the ecommerce trends with Shopify's newsletter</p>
- <p class="underline">___</p>
- <p>Subscribe for free marketing tips</p>
- </div>
- </div>
- <form class="container_middle" method="POST" name="form">
- <center>
- <div class="container_email_dropdown">
- <input type="email" id="emailAddress" name="emailAddress" placeholder="Email Address" required>
- <select name="interest" id="dropdown">
- <option id="dropdown" value="Interested in...">Interested in...</option>
- <option id="dropdown" value="1">1</option>
- <option id="dropdown" value="2">2</option>
- <option id="dropdown" value="3">3</option>
- <option id="dropdown" value="4">4</option>
- </select>
- </div>
- <p id="invalid_Email">Please enter a valid email address</p>
- </center>
- <div class="signUpNow">
- <center>
- <input class="signUpBtn" type="button" onClick="verifyEmail();" value="Sign up now">
- </center>
- </div>
- </form>
- <p id="unsubsribe">Unsubcribe</p>
- </div>
- </body>
- </html>
- </script>
- <script id="jsbin-source-css" type="text/css">* {
- background-color: #000639;
- font-family: Helvetica, Arial, sans-serif;
- }
- body {}
- p {
- color: #FFFFFF;
- text-align: left;
- }
- .topmsg {
- font-size: 24px;
- margin-bottom: 0;
- }
- .underline {
- color: #7AB55C;
- margin: 0 0 50px 0;
- }
- .container_topmsg_underline_sub {
- width: 500px;
- padding: 1.0625em 1em;
- margin: 1% auto auto auto;
- }
- .container_email_dropdown {
- width: 500px;
- display: inline-flex;
- position: relative;
- margin: 0 0 5px 0;
- }
- #emailAddress {
- height: 22px;
- width: 65%;
- margin: 0 20px 0 0;
- padding: 1.0625em 1em;
- color: #7B7B7B;
- font-size: 16px;
- box-shadow: 0 0 0 1px #7B7B7B;
- border: 0;
- border-radius: 7px;
- background-color: #ffffff;
- }
- #dropdown {
- margin: 0 5px 0 0;
- height: 56px;
- width: 35%;
- padding: 1.0625em 1em;
- color: #7B7B7B;
- font-size: 16px;
- box-shadow: 0 0 0 1px #7B7B7B;
- border: 0;
- border-radius: 7px;
- background-color: #ffffff;
- }
- .signUpBtn {
- display: block;
- height: 56px;
- width: 500px;
- margin: 15px 0 0 0;
- padding: 1.0625em 1em;
- color: #FFFFFF;
- font-size: 16px;
- border: 0;
- border-radius: 5px;
- background-color: #5c6ac4;
- }
- #unsubsribe {
- position: fixed;
- width: 100%;
- bottom: 0;
- text-align: center;
- text-decoration: underline;
- color: #FFFFFF;
- }
- #invalid_Email {
- display: flex;
- color: #000639;
- font-size: 16px;
- margin: 0 auto;
- width: 500px;
- font-family: Helvetica;
- }
- select {
- background-color: #FFFFFF;
- }
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">function verifyEmail() {
- var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
- if (document.form.emailAddress.value.search(emailRegEx) == -1) {
- document.getElementById("invalid_Email").style.color = '#C23628';
- } else {
- document.getElementById("invalid_Email").style.color = '#000639';
- insertValues();
- }
- }
- function insertValues() {
- var email = document.form.emailAddress.value;
- var interest = document.form.interest.value;
- console.log(email + " is interested in: " + interest);
- }
- </script></body>
- </html>
Add Comment
Please, Sign In to add comment