This contract for general design sevices is a hybrid of this one on Docracy and the AIGA one also found on Docracy. I wanted something that was simple yet covered the important bits such as payment schedule, kill fee, liability, rights etc. Change the parts in square brackets to suit. I've had this checked by a lawyer but I recommend if you decide to use it you also get it looked at by a lawyer too. Never do work without a contract in place. The majority of clients are good, decent and want to create great work with you — having a solid contract in place will strengthen that relationship and provide you with protection should things go awry.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
class HTMLElementPlus extends HTMLElement { | |
static defaultAttributeValue() { | |
/* the name of the attribute is parsed in as a parameter */ | |
return; | |
} | |
static parseAttributeValue(name, value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (document.body.animate && typeof Animation === 'undefined') { | |
window.Animation = document.body.animate({}).constructor; | |
} | |
if (typeof Animation !== 'undefined' && Animation.prototype.finished === undefined) { | |
Object.defineProperty(Animation.prototype, 'finished', {get: function () { | |
if (this.__finishPromise) return this.__finishPromise; | |
if (this.playState === 'finished') { | |
this.__finishPromise = Promise.resolve(); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_registry = {}; | |
importPolyfill = path => { | |
if(!(path in _registry)) { | |
const entry = _registry[path] = {}; | |
entry.promise = new Promise(resolve => entry.resolve = resolve); | |
document.head.appendChild(Object.assign( | |
document.createElement('script'), | |
{ | |
type: 'module', | |
innerText: `import * as X from '${path}'; _registry['${path}'].resolve(X);`, |
I tried to make a gallery, but the images keep shattering when I click on them... I'll need to use more sturdy materials next time.
(Delaunay triangulation part 2)
A Pen by Szenia Zadvornykh on CodePen.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
}; | |
NodeList.prototype.__proto__ = Array.prototype; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
@class BroadcastChannel | |
A simple BroadcastChannel polyfill that works with all major browsers. | |
Please refer to the official MDN documentation of the Broadcast Channel API. | |
@see <a href="https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API">Broadcast Channel API on MDN</a> | |
@author Alessandro Piana | |
@version 0.0.6 | |
*/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selector = 'img' // Replace this with the selector for the element you want to make transformable | |
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() { | |
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() { | |
(function() { | |
var $, applyTransform, getTransform, makeTransformable; | |
$ = jQuery; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<!-- load combined svg file (with symbols) into body--> | |
<script> | |
(function (doc) { | |
var scripts = doc.getElementsByTagName('script') | |
var script = scripts[scripts.length - 1] | |
var xhr = new XMLHttpRequest() | |
xhr.onload = function () { |
NewerOlder