"url build"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/iaian/pen/jGdoYY?depth=everything&order=popularity&page=15&q=Builder&show_forks=false" /> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css'> <style class="cp-pen-styles">body, html { background-color: #222; padding: 0; margin: 0; } .wrapper { background-color: #ddd; max-width: 700px; margin: 70px auto 25px; padding: 15px 15px 1px; border-radius: 5px; } .wrapper h1 { margin-top: 0; } .wrapper .base-url, .wrapper a { word-wrap: break-word; } </style></head><body> <div class="wrapper"> <h1>URL builder</h1> <div id="url-builder"> <h5>Current URL base: <br> <span class="base-url"> {{ baseUrl }} </span> </h5> <br> <form> <div class="form-group"> <label for="inputTags">URL Base</label> <input v-model="baseUrl" type="text" class="form-control" id="inputTags" aria-describedby="tagsHelp" placeholder="Enter base url"> <small id="tagsHelp" class="form-text text-muted">The base URL to add tags to</small> </div> <div class="form-group"> <label for="inputTags">Tag(s)</label> <input v-model="tags" type="text" class="form-control" id="inputTags" aria-describedby="tagsHelp" placeholder="Enter tag(s)"> <small id="tagsHelp" class="form-text text-muted">Accepts a comma seperated list of tag(s)</small> </div> </form> <div class="alert alert-primary tool-url"> <b>Your built url:</b><br> <b><a v-bind:href="builtUrl">{{ builtUrl }}</a></b> </div> </div> </div> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js'></script> <script >var app = new Vue({ el: "#url-builder", data: function() { return { baseUrl: "https://www.cisco.com/c/en/us/about/careers.html", tagSeparator: "|", tags: "", builtUrl: "" }; }, mounted: function() { this.builtUrl = this.baseUrl; }, methods: { buildUrl: function() { var tagListForURL = this.tags.length > 0 ? encodeURI(this.tags.split(",").map(function(item) { return item = item.trim() }).join(this.tagSeparator)) : ""; // Add tags to url if (this.baseUrl.indexOf('?') > -1) { this.builtUrl = tagListForURL.length > 0 ? this.baseUrl + "&tags=" + tagListForURL : this.baseUrl; } else { this.builtUrl = tagListForURL.length > 0 ? this.baseUrl + "?tags=" + tagListForURL : this.baseUrl; } } }, watch: { baseUrl: function() { this.buildUrl(); }, tags: function() { this.buildUrl(); } } }); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: