Skip to content

Instantly share code, notes, and snippets.

@netdoctor
netdoctor / countries-select
Created January 19, 2020 10:40
Select list of Countries compressed
<select> <option value="AF">Afghanistan</option> <option value="AL">Albania</option> <option value="DZ">Algeria</option> <option value="AS">American Samoa</option> <option value="AD">Andorra</option> <option value="AO">Angola</option> <option value="AI">Anguilla</option> <option value="AQ">Antarctica</option> <option value="AG">Antigua and Barbuda</option> <option value="AR">Argentina</option> <option value="AM">Armenia</option> <option value="AW">Aruba</option> <option value="AU">Australia</option> <option value="AT">Austria</option> <option value="AZ">Azerbaijan</option> <option value="BS">Bahamas</option> <option value="BH">Bahrain</option> <option value="BD">Bangladesh</option> <option value="BB">Barbados</option> <option value="BY">Belarus</option> <option value="BE">Belgium</option> <option value="BZ">Belize</option> <option value="BJ">Benin</option> <option value="BM">Bermuda</option> <option value="BT">Bhutan</option> <option value="BO">Bolivia</option> <option value="BA">Bosnia and Herzegowina</optio
<!-- Basin's site key ***don't change*** -->
<div class="g-recaptcha" data-sitekey="6Lew3SMUAAAAAJ82QoS7gqOTkRI_dhYrFy1f7Sqy"></div>
<!-- Google reCaptcha script -->
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<!-- replace email-form with your form's ID. Add one if needed in designer -->
<script>
function onSubmit(token) {
document.getElementById("email-form").submit();
}
</script>
<!-- hide reCaptcha badge to make it invisible.
---- You could remove this style to make the badge visible
@netdoctor
netdoctor / ipad-collapse-menu.html
Last active June 9, 2019 13:52
Collapse webflow menu at 1024px with custom css
<style>
@media screen and (max-width: 1024px) {
.w-nav[data-collapse="medium"] .w-nav-menu {
display: none;
}
.w-nav[data-collapse="medium"] .w-nav-button {
display: block;
}
}
@netdoctor
netdoctor / gist:281ac0fd50b4b33d50ea2c43297ae5a7
Last active October 25, 2022 11:13
Add styling to a webflow CMS Collection list item based on the value of a field in the CMS collection.
<script>
$(function () {
/**
* What it does:
* Style or Manipulate CMS Items returned from a collection list
* that includes info to use as the logic for each item.
*
* Assumptions
* You created a cms optionfield in your cms collection
@netdoctor
netdoctor / wlsizesnsend.html
Created April 26, 2019 16:34
Webflow lazysizes (no script) embed code end
</noscript>
</div>
@netdoctor
netdoctor / gist:60197cfe60254f8dd178dc6895aa8d0f
Created April 26, 2019 16:18
Webflow lazysizes noscript embed code start
<div class="lazyload" data-noscript="">
<noscript>
@netdoctor
netdoctor / processwire-bs-portfolio.php
Created February 3, 2013 20:21
Example of a portfolio listing using bootstap 2.2x and ProcessWire
/**
* (c) Author - Jeff Selser
*
* Example of a portfolio listing using bootstap 2.2x and Processwire
* as the CMF/CMS. Add this chunk of code
* to a Processwire template where you want to render children using
* boostrap's thumbnails (with content).
*
* I set the li to span 6 since they are in a span8 parent row (nested)
* and I wanted 2 thumbs per row.
@netdoctor
netdoctor / renderResponsiveNavbar.php
Last active December 12, 2015 02:28
function to render a topbar menu in Processwire using the bootstrap framework. Assumes you have a text field called "navbar_separator" which can be used to create a bootstrap separator element above the $page and textfield called "menu_title" which we use to create an override of the $page->title to customize the menu.
<?php
/**
* renderResponsiveNavbar function for Processwire CMS.
*
* Author - Jeff Selser
* 01/20/2013
* @access public
* @param mixed $page
* @param string $brand (default: SProject Name')
* @param int $maxChilden (default: 15) sets limit on number of children in a dropdown