Create and activate a virtualenv:
virtualenv env
source env/bin/activateInstall dependencies:
| /* | |
| * Subtler, clearer colors and edges | |
| * Emphsasize first two lists | |
| * -- can be modified in CSS to include fewer or more lists | |
| */ | |
| * { | |
| border-radius: 0 !important; | |
| } |
| /** | |
| * Works everywere ( IE7+, FF, Chrome, Safari, Opera ) | |
| * Example: http://jsbin.com/afAQAWA/2/ | |
| */ | |
| .rotated-text { | |
| display: inline-block; | |
| overflow: hidden; | |
| width: 1.5em; | |
| } | |
| .rotated-text__inner { |
| javascript:(function(e,t){window.open(%22https://delicious.com/save?url=%22+encodeURIComponent(e.location.href)+%22&title=%22+encodeURIComponent(e.document.title)+%22¬e=%22+encodeURIComponent(%22%22+e.getSelection()?e.getSelection():e.document.getSelection?e.document.getSelection():e.document.createRange().text)+%22&v=1.1%22,%22_blank%22);})(window) |
| # Copied mostly from the framer source which at this time is here https://github.com/koenbok/Framer/blob/master/framer/VideoLayer.coffee | |
| class AudioLayer extends Layer | |
| constructor: (options={}) -> | |
| super options | |
| @player = document.createElement("audio") | |
| @player.setAttribute("preload", "auto") |
| # Add the following line to your project in Framer Studio. | |
| # `frameless = require "frameless"` | |
| frameless = {} | |
| # Directly opens the prototype in Frameless | |
| frameless.open = -> | |
| intent = "frameless://" | |
| url = intent + window.location.host + window.location.pathname + "/" | |
| window.location.replace url |
| {% comment %} | |
| * | |
| * This loop loops through a collection called `collection_name` | |
| * and sorts it by the front matter variable `date` and than filters | |
| * the collection with `reverse` in reverse order | |
| * | |
| * To make it work you first have to assign the data to a new string | |
| * called `sorted`. | |
| * | |
| {% endcomment %} |
| <!--create a semi-random number using the last second of the send date--> | |
| {% capture time_seed %} | |
| {{ 'now' | date: "%s" }} | |
| {% endcapture %} | |
| <!--manupulate using lots of maths--> | |
| {% assign random = time_seed | times: 1103515245 | plus: 12345 | divided_by: 65536 | modulo: 32768 | modulo: 10 %} | |
| <!--return number--> | |
| {{ random }} |
| function slugify(string) { | |
| const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;' | |
| const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------' | |
| const p = new RegExp(a.split('').join('|'), 'g') | |
| return string.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters | |
| .replace(/&/g, '-and-') // Replace & with 'and' | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word characters |