- Create repo on GitHub where you'll put your files.
- Use jsDeliver or statically to get your assets.
Here is repo I'm using:
https://github.com/jcubic/static
And links to files look like this:
Here is repo I'm using:
https://github.com/jcubic/static
And links to files look like this:
| // Codi-net.com | |
| if (window.location.href.indexOf('checkout') > -1) { | |
| window.onload = function() { | |
| var script = document.createElement('script'); | |
| script.type = 'text/javascript'; | |
| script.src = "https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"; | |
| script.async = "true"; | |
| script.defer = "defer"; | |
| document.body.appendChild(script); |
| <h1 class="shimmer">Some Shimmer Text</h1> | |
| <style> | |
| @import url('http://fonts.googleapis.com/css?family=Alegreya+Sans:300'); | |
| body{ | |
| background: #000; | |
| } | |
| .shimmer{ | |
| /* styling stuff */ | |
| font-family:"Alegreya Sans"; |
| {% layout none %}{% comment %} | |
| /* | |
| * Simple blog feed | |
| * | |
| * Copyright (c) 2015 Jason Bowman ([email protected]) | |
| * Licensed under the MIT license: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * | |
| */ | |
| {% endcomment %}<?xml version="1.0" encoding="UTF-8"?> |
| var autoElm = document.getElementById('elm-name'); | |
| autocomplete = new google.maps.places.Autocomplete(autoElm); | |
| google.maps.event.addListener(autocomplete, 'place_changed', function () { | |
| var place = autocomplete.getPlace(); | |
| if (!place.geometry) { | |
| return; | |
| } | |
| instance.setCenter(place.geometry.location); | |
| instance.setZoom(19); |
| /** | |
| * <div class="text">Some text with <b>html</b>... Any length.</div> | |
| * | |
| */ | |
| $('.text').each(function(){ | |
| var length = 5; | |
| var details = $(this); | |
| var original_html = details.html(); | |
| var original_text = details.text(); | |
| var truncated_text = $.trim(original_text).substring(0, length).split(" ").slice(0, -1).join(" ") + " "; |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> | |
| <title>Select/Change option</title> | |
| <style type="text/css"> | |
| .red {color: red;} | |
| .black {color: black;} |
| <!-- add the vendor as product tag to product then use this code in collection.liquid --> | |
| <!-- if we are on a collection page that is either custom or smart --> | |
| {% if collection.url != blank %} | |
| <h4>Shop by vendor:</h4> | |
| <ul> | |
| {% for product_vendor in collection.all_vendors %} | |
| <li> | |
| {% if current_tags contains product_vendor %} | |
| <a class="active" href="{{ collection.url }}">{{ product_vendor }}</a> | |
| {% else %} |
| var hostarray = new Array(); | |
| hostarray["subdomain.somewhere.com"] = "subdomain.somewhere.com/application/home.html"; | |
| function redirect() | |
| { | |
| //Obtain the host name in lowercase format | |
| var lhost = new String(location.host); | |
| lhost = lhost.toLowerCase(); |