Skip to content

Instantly share code, notes, and snippets.

View paceaux's full-sized avatar
🌐
Obsessing with languagey things

Paceaux paceaux

🌐
Obsessing with languagey things
View GitHub Profile
@paceaux
paceaux / vars
Created November 24, 2014 17:39
Stylus Variables bootstrap
$fontBody : "Roboto Condensed";
$fontHeaders : "din-condensed-web", sans-serif;
$fontCallout: "proxima-nova", sans-serif;
$colorNeutralWhitest : #ffffff;
$colorNeutralLightest : #ebebeb;
$colorNeutralDarkest : #646464;
$colorCoolDesat1: #323f50;
$colorCoolDesat2: #b8d098;
@paceaux
paceaux / BEMStylusGrid
Last active August 29, 2015 14:10
BEM + Grid + Stylus
colWidth = 5em
numCols = 12
thirdCol = ((numCols / 3) * colWidth)
fourthCol = ((numCols / 4) * colWidth)
eightCol = fourthCol /2
halfCol = ((numCols / 2) * colWidth)
[class*="--col"]
height: 100%;
@paceaux
paceaux / Golden
Created July 14, 2014 21:14
Golden Ratio Stylus Mixin
//======Golden Ratio Mixin
golden()
if @width
height: @width * .618
else
if @height
width: @height * .618
@paceaux
paceaux / BEMify
Created July 14, 2014 20:41
Stylus BEM mixin
e(name)
&__{name}
{block}
m(name)
&--{name}
{block}
.header
color: red
+e(element)
@paceaux
paceaux / mm.client.css
Created June 16, 2014 19:13
Media Manager Layout Tweak
/*this assumes the parent container of the video is one with the id of video__player*/
/* Media Manager tweak*/
#video__player [id*="sdlmm_"] {
width: 100% !important;
height: 310px !important;
}
#video__player .pptooltip,
#video__player .ppbackslide,
#video__player .projekktor[style*="fixed"] .pptooltip[class],
#video__player .projekktor[style*="fixed"] .ppbackslide[class]{
@paceaux
paceaux / vanilla-js-module
Created June 3, 2014 22:24
Vanilla JS module
var moduleName;
moduleName = {
init: function () {
var _this = moduleName;
_this.bindUiEvents();
},
data: {
els: {
}
},
@paceaux
paceaux / needy.js
Last active August 29, 2015 13:57
Page Visibility + speech
var tabAway;
tabAway = {
init: function () {
var _this = tabAway;
_this.bindEvents();
},
data: {
tabAwayMsg: "Don't go, I need you!",
tabBackMsg: "I knew you'd never leave me",
},
@paceaux
paceaux / mm.js
Created January 30, 2014 23:21
Media manager Module
var mediaManager = {};
mediaManager: {
init: function () {
var _this = this;
//MMPLAYERREADY is the event that fires when the media manager event loads
_this.functions.setMetadata($('.js-active'));
_this.bindUIEvents();
$(document).bind("MMPLAYERREADY", function (e){
_this.functions.adjustDimensions();
_this.functions.modifyProjekktor();
@paceaux
paceaux / speaker.js
Last active August 29, 2015 13:55
Speech Synthesis JS API
speech = function (msg, options, onend) {
this.text = msg;
this._defaults = {
voiceURI: 'native',
volume: 3,
rate: 2,
pitch: 1.5,
lang: 'en-US'
};
this.defaults = options !== undefined ? options : this._defaults;
@paceaux
paceaux / cssom.js
Last active December 26, 2015 13:29
Stylesheet toggler. Uses the CSSOM (Cascading StyleSheet Object Model). Drop this somewhere on your page and it'll find your stylesheets and let you turn them on and off.
window.cssom = {
init: function () {
var _this = window.cssom;
_this.functions.bootstrapTable();
},
data: {
table: {},
rootClass: "CSSOM",
tableClass: "table",
rowButton: {