Nat Banner Builder

Developer
Size
3,516 Kb
Views
12,144

How do I make an nat banner builder?

What is a nat banner builder? How do you make a nat banner builder? This script and codes were developed by Aaron Happe on 09 November 2022, Wednesday.

Nat Banner Builder Previews

Nat Banner Builder - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Nat Banner Builder</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script id="output-style" type="text/template">
<style type="text/css">#swBanner { position: relative; }
area {outline: none;}
body.oldCheckout .targettedCampaignBanner, body.shippinginfoPage .targettedCampaignBanner {display: none;} #swBanner .siteWidth {display: block; max-width:1300px; margin:0 auto; text-decoration: none; position: relative;} #swBanner .siteWidth img { max-width: 100%; display: block; } #swBanner a { text-decoration: none; } #swBanner a.detailsWindowLink {font-size: .8em; position: absolute; right: 3px; bottom: 12px; color: #fff; text-decoration: none;} #swBanner .detailsWindow {position: absolute; width: 400px; top: 38px; right: 0; background: #fff; padding: 20px; z-index: 25; display: none; border:1px solid #716d6a; } /*change color each banner*/ #swBanner .popHeader {color: #fff; width: 416px; margin: -20px 0 0 -20px; padding: 20px 12px; margin-bottom: 10px; font-size:16px; line-height:1.5em;letter-spacing: .02em; text-transform: uppercase;} #swBanner .detailsWindowLink.active .open, #swBanner .detailsWindowLink.inactive .close {display: none;} #swBanner .detailsWindow p {margin-bottom: 10px;} #swBanner .popup-text { line-height: 1.5em; white-space: pre-wrap;}
</style>
</script>
<script id="output-html" type="text/template">
<div id="swBanner">
<div class="siteWidth"><a href="{{href}}"><img src="{{image}}" /></a><a class="detailsWindowLink inactive" href="#" onclick="$(this).toggleClass('inactive active').siblings('.detailsWindow').first().slideToggle(); return false;"> <span class="open">{{label}}</span> <span class="close">&times; Close</span></a>
<div class="detailsWindow">
<p class="popHeader" style="background:{{pColor}};">{{pHeader}}</p>
<p class="popup-text">{{pText}}</p>
</div>
</div>
</div>
</script>
<body>
<div id="inputs"> <div> <input type="text" id="banner-image"> <label for="banner-image">Image Path:</label> </div> <div> <input type="text" id="banner-href"> <label for="banner-href">HREF:</label> </div> <div> <input type="text" id="details-label"> <label for="details-label">Details Label:</label> </div> <div> <input type="text" id="popup-header"> <label for="popup-header">Pop-up Header:</label> </div> <div> <input type="text" id="popup-color"> <label for="popup-color">Pop-up Color:</label> </div> <div> <textarea name="popup-text" id="popup-text" cols="30" rows="10"></textarea> <label for="popup-text">Pop-up Text:</label> </div> <button id="go">Go! :)</button>
</div>
<div id="code"><pre></pre></div>
<div id="banner-visual"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.0/mustache.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Nat Banner Builder - Script Codes CSS Codes

 /*banner styles*/ area {outline: none;} body.oldCheckout .targettedCampaignBanner, body.shippinginfoPage .targettedCampaignBanner {display: none;} #swBanner .siteWidth {display: block; max-width:1300px; margin:0 auto; text-decoration: none; position: relative;} #swBanner .siteWidth img { max-width: 100%; display: block; } #swBanner a { text-decoration: none; } #swBanner a.detailsWindowLink {font-size: .8em; position: absolute; right: 3px; bottom: 12px; color: #fff; text-decoration: none;} #swBanner .detailsWindow {position: absolute; width: 400px; top: 38px; right: 0; background: #fff; padding: 20px; z-index: 25; border:1px solid #716d6a; } #swBanner .close {display: none;} /*change color each banner*/ #swBanner .popHeader {color: #fff; width: 416px; margin: -20px 0 0 -20px; padding: 20px 12px; margin-bottom: 10px; font-size:16px; line-height:1.5em;letter-spacing: .02em; text-transform: uppercase;} #swBanner .detailsWindow p {margin-bottom: 10px;} #swBanner .popup-text { line-height: 1.5em; white-space: pre-wrap;} /*form styles*/ body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; width: 1300px; margin: 0 auto; background: #FEFEFE; } div#inputs { width: 30%; margin: 5% auto; background: #F8F8F8; padding: 5% 10%; } label { float: right; padding-right: 1em; } div#inputs > div { display: inline-block; width: 100%; padding-bottom: 1em; } div.div-popup-text { position: relative; } input { float: right; width: 20em; } textarea { float: right; width: 20em; } button#go { display: block; margin: 0 auto; padding:.5em 1.3em; border: 1px solid #b4b4b4; background: #ccc; cursor: pointer; } div#code pre { width: 60%; margin: 0 auto 5%; padding: 5%; background: #ccc; overflow: scroll; }

Nat Banner Builder - Script Codes JS Codes

var dataInputs = {	image : "", href : "", label : "", pHeader : "", pColor : "", pText : ""
}, docBody = $("body"),	targetContainer1 = $("#code pre"), targetContainer2 = $("#banner-visual");
$("button").click(function(){ console.log("asdf"); dataInputs.image = $("#banner-image").val(); dataInputs.href = $("#banner-href").val(); dataInputs.label = $("#details-label").val(); dataInputs.pHeader = $("#popup-header").val(); dataInputs.pColor = $("#popup-color").val(); dataInputs.pText = $("#popup-text").val(); var templateStyle = $("#output-style").html(), templateHTML = $("#output-html").html(), html1 = Mustache.to_html(templateStyle, dataInputs), html2 = Mustache.to_html(templateHTML, dataInputs); targetContainer1.text(html1 + html2); targetContainer2.html(html2);
});
Nat Banner Builder - Script Codes
Nat Banner Builder - Script Codes
Home Page Home
Developer Aaron Happe
Username aaronhappe
Uploaded November 09, 2022
Rating 3
Size 3,516 Kb
Views 12,144
Do you need developer help for Nat Banner Builder?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Aaron Happe (aaronhappe) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!