Skip to content

Instantly share code, notes, and snippets.

@dominicwhittle
dominicwhittle / social.jade
Created May 5, 2016 13:24
Social Sharing Javascript Popups
mixin shareBtns()
aside.shareBtns
a.shareBtns__btn.shareBtns__btn--facebook(
data-social="facebook"
href="http://www.facebook.com/sharer.php?u={{ post.permalink|url_encode }}&t={{ (post.title)|url_encode }}"
target="_blank"
)
span.shareBtns__icon
include:svg('shareBtns__svg') /design-assets/raw-svg/facebook.svg
span.shareBtns__label Share on Facebook
@dominicwhittle
dominicwhittle / trello.js
Last active August 29, 2015 14:14
Trello
// ==UserScript==
// @name Trello Board Level Colours
// @namespace http://your.homepage/
// @version 0.2
// @description Styl'n
// @author Dominic Whittle
// @match https://trello.com/b/*
// @grant none
// ==/UserScript==
@dominicwhittle
dominicwhittle / gist:8d1ad507ac2d5b55119e
Created February 5, 2015 08:24
Slack sidebar theme: Midnight
#16161A,#000000,#2E2E2E,#FFFFFF,#FFFFFF,#E8E8E8,#00C4FF,#FC5B5B
@dominicwhittle
dominicwhittle / select.jade
Last active August 29, 2015 14:10
<select> styled with CSS only.
span.select
select.select__control
option(val="") Select an option...
option(val="1") Option 1
option(val="2") Option 2
/* ---------------------------------------------------------------------------
Debounce
--------------------------------------------------------------------------- */
var debounce = function(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
@dominicwhittle
dominicwhittle / srcset.js
Last active August 29, 2015 14:10
srcset
/* ---------------------------------------------------------------------------
NOTE:
- forceRebuild doesn't do anything yet (I don't think). I'm planning to have
a param for autoload:false (so it could be used with a lazyloader or
scroll events) but I haven't done that yet.
- requires jQuery
srcset.js
@dominicwhittle
dominicwhittle / rem.less
Last active May 23, 2023 06:12
rem() mixin for Less CSS
/* ---------------------------------------------------------------------------
Toolkit: Rem
============
.rem() takes a @property, and @list of values (in px or unitless) and
converts to rem.
e.g.,
.selector {