Skip to content

Instantly share code, notes, and snippets.

/*
* Scaffolding
* Basic and global styles for generating a grid system, structural layout, and page templates
* ------------------------------------------------------------------------------------------- */
.container
Sets a width of 940px which also centres the content (clears floated elements before/after)
.container-fluid
Sets a minimum width of 940px (clears floated elements before/after)
@wjramos
wjramos / gist:1dcd9576fe553c382d7b
Created May 20, 2014 23:05
Collapsing content widget
<div id="east-oakland-expand" class="collapseomatic subpage-expander">See More</div>
<div class="subpage">
<?php
$page = get_page_by_title( 'Why East Oakland?' );
$content = apply_filters('the_content', $page->post_content);
$excerpt = substr($content, 0, strpos($content, '<p>', 1000));
?>
<div class="subpage-visible collapseomatic_content">
<?php
echo $excerpt;
@wjramos
wjramos / gist:6eb88e6395005d3a80e6
Created May 20, 2014 23:06
Collapsing post feed widget
<div id="our-team-expand" class="collapseomatic subpage-expander">Read More</div>
<div class="subpage">
<ul class="our-team">
<?php $myposts=get_posts( 'numberposts=3'); foreach($myposts as $post) :?>
<li>
{THUMBNAIL} {TITLE} {EXCERPT}
</li>
<?php endforeach; ?>
<div id="target-our-team-expand" class="collapseomatic_content">
<?php $myposts=get_posts( 'numberposts=10'); foreach($myposts as $post) : ?>
@wjramos
wjramos / gist:fe5691574e17062aeaa7
Created May 21, 2014 18:05
Leaflet map external info pane
// Bind a popup to each icon based on the same properties
marker.bindPopup('<strong>' + marker.toGeoJSON().properties.title + '</strong>' + '</br>' + marker.toGeoJSON().properties.Description);
//Info Pane Content
marker.on('click', function(e) {
// Force the popup closed.
// e.layer.closePopup();
infopane.className = 'fill-lighten3 offcanvas-right animate pin-right keyline-left active';
// var feature = e.layer.feature;
var info = '<h2 class="center">' + marker.toGeoJSON().properties.title + '</h2>' + '</br>' + '<h3>' + marker.toGeoJSON().properties.Estate + '</h3>' + '<h4>Industry: ' + marker.toGeoJSON().properties.Industry + '</h4>' + '</br>' + '<strong>Latitude: </strong>' + e.latlng.lat + '</br>' + '<strong>Longitude: </strong>' + e.latlng.lng + '</br><p>' + marker.toGeoJSON().properties.Description + '</p>';
//feature.getLatLng()
@wjramos
wjramos / 0_reuse_code.js
Created June 1, 2014 06:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wjramos
wjramos / javascript_resources.md
Created June 1, 2014 06:19 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@wjramos
wjramos / css_resources.md
Created June 1, 2014 06:19 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@wjramos
wjramos / CuoDG.markdown
Created June 11, 2014 21:17
A Pen by Jordan.
@wjramos
wjramos / CuoDG.markdown
Created June 11, 2014 21:17
A Pen by Jordan.