Skip to content

Instantly share code, notes, and snippets.

View patrickmooney's full-sized avatar

Patrick Mooney patrickmooney

View GitHub Profile
@charset 'UTF-8';
/*
* Author: Name @Bolt Brasil
* Project: Project Name
* Date: Date of Project
*/
/* ==========>> Summary
=Imports
@patrickmooney
patrickmooney / overlay.html
Created April 26, 2013 13:48
Full screen alpha black out - handy for layering. The overlay div will be 100% width and height, fixed to the top left. It uses a height of 2000px due to the screen not know where to draw the div when touch scrolling on mobile devices. Tested on iOS and Android.
<!doctype html>
<html>
<head>
<title>Overlay Test</title>
<style>
div.overlay{
position:fixed;
top:0;
left:0;
width:100%;
@patrickmooney
patrickmooney / sample.html
Created December 30, 2013 18:04
Non wrapping content block with left aligned image
<html>
<head>
<style>
body {
margin:auto;
width:600px;
}
@patrickmooney
patrickmooney / realtime-form-validation-css-javascript.html
Last active August 29, 2015 14:02
Realtime form validation using pseudo classes
<!DOCTYPE html>
<html>
<head>
<style>
body{
margin: 0px auto;
text-align: left;
width: 600px;
}
function timeSince(timeStamp) {
var now = new Date(),
secondsPast = (now.getTime() - timeStamp.getTime()) / 1000;
if(secondsPast < 60){
return parseInt(secondsPast) + 's';
}
if(secondsPast < 3600){
return parseInt(secondsPast/60) + 'm';
}
if(secondsPast <= 86400){