Skip to content

Instantly share code, notes, and snippets.

View archondigital's full-sized avatar
💭
Ground control to Major Tsong...

Jon Cuevas archondigital

💭
Ground control to Major Tsong...
View GitHub Profile
@archondigital
archondigital / sticky-top-bar.html
Last active November 7, 2016 10:15
Sticky top bar on Foundation 6
<div id="siteContainer">
<div id="siteNavStickyContainer" data-sticky-container>
<div id="siteNavStickyWrap" class="sticky" data-sticky data-sticky-on="small" data-anchor="siteContainer" data-margin-top="0">
<div id="siteNavToggler" class="title-bar" data-responsive-toggle="siteNav" data-hide-for="medium">
<!-- // your title-bar / toggler code -->
</div>
<div id="siteNav" class="top-bar">
<!-- // your top-bar code -->
</div>
</div>
@archondigital
archondigital / custom-rules.json
Last active November 3, 2016 16:19
Custom transformer rules for FB Instant Articles plugin on WordPress
{ "rules" :
[
{ "class": "PassThroughRule", "selector" : "ins.adsbygoogle" },
{ "class": "PassThroughRule", "selector" : "div.alignright" },
{ "class": "PassThroughRule", "selector" : "div.alignleft" },
{ "class": "PassThroughRule", "selector" : "div.callout" },
{ "class": "PassThroughRule", "selector" : "div.row" },
{ "class": "PassThroughRule", "selector" : "div.columns" },
@archondigital
archondigital / clearing-lightbox-hash.html
Created October 19, 2015 17:13
Load Clearing Lightbox using URI hash on Foundation 5
<div id="loadGallery"></div>
<script>
// load clearing lightbox with URI hash , requires Foundation 5
$(function(){
if (window.location.hash){
var hash = window.location.hash.substring(1);
if (hash == "loadGallery"){
$('ul[data-clearing] li a').first().click();
}
@archondigital
archondigital / adsense-conditional.html
Last active October 18, 2015 05:00
Conditional for disabling Adsense code when running Jekyll on localhost
{% if site.enable_adsense == true %}
<!-- Adsense Code here -->
{% else %}
<!-- Placeholder Ad here -->
{% endif %}
@archondigital
archondigital / disqus-conditional.html
Last active October 18, 2015 04:54
Conditional for loading test Disqus account when running Jekyll on localhost
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{% if site.enable_disqus == true %}username{% else %}testing{% endif %}'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
@archondigital
archondigital / custom-taxonomy-loop
Created July 27, 2014 07:51
WordPress custom taxonomy query and loop
<!-- banner full width home -->
<div id="banner" class="banner-main">
<ul data-orbit data-options="animation:slide;timer_speed:6000;animation_speed:400;stack_on_small:false;navigation_arrows:true;slide_number:false;pause_on_hover:true;resume_on_mouseout:false;bullets:false;timer:true;variable_height:false;">
<?php $args = array( 'banner-location' => 'banner-main-home', 'post_type' => 'govph_banners', 'posts_per_page' => 4, 'orderby' => 'date', 'order' => 'DESC' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li>