Skip to content

Instantly share code, notes, and snippets.

// ---
// Sass (v3.2.9)
// ---
// Styling elements based on sibling count
// http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/
@mixin adjust-form-siblings-count($max: 10, $property: width) {
$i: 0;
@while ($i < $max) {
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
module Jekyll
class Excerpt < Liquid::Block
def render(context)
# Get the current post's post object
id = context["page"]["id"]
posts = context.registers[:site].posts
post = posts [posts.index {|post| post.id == id}]
# Put the block contents into the post's excerpt field,
module Jekyll
class MarkdownTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text.strip
end
require "kramdown"
def render(context)
"#{Kramdown::Document.new(File.read(File.join(Dir.pwd, '_includes', @text))).to_html}"
end
<ul class="ch-grid">
<li>
<div class="ch-item">
<div class="ribbon-wrapper">
<div class="ribbon-front">
<!-- ribbon text goes here -->
<span id="how-to-open"><i class="icomoon-icon-fork"></i>click the + to open</span><span id="how-to-close"><i class="icomoon-icon-fork"></i>click the X to close</span>
<a id="expand-sales"><i id="flipper-switch" class="icomoon-icon-plus"></i></a>
</div>
<div class="ribbon-edge-topleft"></div>
<ul class="ch-grid">
<li>
<div class="ch-item">
<div class="ribbon-wrapper">
<div class="ribbon-front">
<!-- ribbon text goes here -->
<span id="how-to-open"><i class="icomoon-icon-fork"></i>click the + to open</span><span id="how-to-close"><i class="icomoon-icon-fork"></i>click the X to close</span>
<a id="expand-sales"><i id="flipper-switch" class="icomoon-icon-plus"></i></a>
</div>
<div class="ribbon-edge-topleft"></div>
# Compass configuration file.
require 'bootstrap-sass'
project_type = :stand_alone
# Important! change the paths below to match your project setup
sass_dir = "_sass"
css_dir = "_site/assets/stylesheets" # update to the path of your css files.
images_dir = "assets/images" # update to the path of your image files.
javascripts_dir = "assets/javascripts" # update to the path of your script files.
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function(grunt) {
grunt.initConfig({
@jwebcat
jwebcat / index.html
Created March 21, 2013 01:55
A CodePen by Jupiter St John. Lightweight Responsive Menu with raw JS and CSS - This is an experiment of a responsive navigation menu, made with Javascript and CSS. It uses CSS media queries and raw lightweight Javascript. No full blown jQuery. Works with lists tooo!! (ul ol) Simple to implement in your projects. Please just credit me (christian…
<nav role="navigation" class="nav cf">
<span id="mobmenu"></span>
<ul>
<li class="has-sub"><a href="#" class="item">haz the sub<i class="icon-arrow-down"></i></a>
<ul class="sub">
<li><a href="" class="sub-item">sub menu 1</a></li>
<li class="has-sub2"><a href="" class="sub-item">has sub 2<i class="icon-arrow-down"></i></a>
<ul class="sub2">
<li><a href="" class="sub-item2">sub sub 1</a></li>
<li><a href="" class="sub-item2">sub sub 2</a></li>
@jwebcat
jwebcat / gist:5169383
Created March 15, 2013 11:54
git patch from changes
$ git diff --binary HEAD > tempPatch.diff
# this next bit only if you want to reset the changes in the working tree
$ git reset --hard