This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Masonry */ | |
| .masonry {column-count:1; column-gap:1.5em; margin:1.5em auto;} | |
| .masonry .item {display:inline-block; margin:0 0 1em; width:100%;} | |
| .masonry .item iframe {max-width:100%;} | |
| /* Large (lg) and up */ | |
| @media (min-width:992px) { | |
| .masonry {column-count:2;} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .center-margin {margin:0 auto;} | |
| .center-flex {display:flex; align-items:center; justify-content:center;} | |
| .center-flex-hor {display:flex; justify-content:center;} | |
| .center-flex-vert {display:flex; align-items:center;} | |
| .center-transform {position:absolute; top:50%; left:50%; transform:translate(-50%, -50%);} | |
| .center-transform-hor {position:absolute; left:50%; transform:translateX(-50%);} | |
| .center-transform-vert {position:absolute; top:50%; transform:translateY(-50%);} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Smooth Scroll on Pageload | |
| * Smooth scrolling on page load if URL have a hash | |
| * Author: Franco Moya - @iamravenous | |
| */ | |
| if (window.location.hash) { | |
| var hash = window.location.hash; | |
| if ($(hash).length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I have put together a this gist with my example code of usage of Mustache, I found the examples online a bit simplistic (for example both template and data were passed to Mustache.render inline) so maybe somebody else will be able to reuse it. | |
| It also is the code for my article "2 things I did not understand about Mustache.js" http://morenafiore.com/2-things-i-did…about-mustache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // demo: http://jsfiddle.net/adamculpepper/mvcjbwbv | |
| $(window).scroll(makeSticky).trigger("scroll"); | |
| $(window).load(function () { | |
| $(".sticky-element").each(function () { | |
| var el = $(this); | |
| if (!el.attr("data-offset-top")) { | |
| el.attr("data-offset-top", el.offset().top); | |
| el.attr("data-offset-left", el.offset().left); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| usage: | |
| call function: centerThings(); | |
| add class: "center-vert" | |
| add offset (optional): data-center-offset="-3" | |
| example: <div class="center-vert" data-center-offset="-3">text</div> | |
| demo: http://jsfiddle.net/adamculpepper/kns0osky | |
| */ | |
| function centerThings() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Name Of The Plugin | |
| * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates | |
| * Description: A brief description of the Plugin. | |
| * Version: The Plugin's Version Number, e.g.: 1.0 | |
| * Author: Name Of The Plugin Author | |
| * Author URI: http://URI_Of_The_Plugin_Author | |
| * License: A "Slug" license name e.g. GPL2 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% assign array = 'c|c|b|b|a|a' | split: '|' %} | |
| {% assign tags = array[1] %} | |
| {% for item in array %} | |
| {% unless tags contains item %} | |
| {% capture tags %}{{ tags }}|{{ item }}{% endcapture %} | |
| {% endunless %} | |
| {% endfor %} | |
| {{ tags | split: '|' | sort | join: ', ' }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| 'use strict'; | |
| // deps... jquery | |
| var $fade_this_in = $('.something-with-opacity-0'); | |
| function laneAddClassDelay(jquerobj, theclass, theinterval) { | |
| setTimeout(function() { | |
| jquerobj.addClass(theclass); | |
| }, theinterval); | |
| } |
NewerOlder