Skip to content

Instantly share code, notes, and snippets.

View RomanoCodes's full-sized avatar
👋
👌

RomanoCodes

👋
👌
View GitHub Profile
/*
Theme Name: Windley
Description: Custom Windley Theme 2014.
Version: 1.0
Author: Andrew Macklin
*/
/*-------------RESETS----------*/
html, body{
_.templateSettings = {
evaluate : /\{\[([\s\S]+?)\]\}/g,
interpolate : /\{\{([\s\S]+?)\}\}/g
};
function string_to_slug(str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}