Skip to content

Instantly share code, notes, and snippets.

View colourgarden's full-sized avatar

Tom Hare colourgarden

View GitHub Profile
@colourgarden
colourgarden / _page.html
Created October 11, 2011 16:00
Multiple markers on a Google map with Umbraco
<div id="map"></div>
<ul class="specialistsGrid">
<li>
<p class="sName"><a><strong>Specialist one</strong></a></p>
<p class="sAddress">Street address, Town, County, Postcode</p>
<p>T: 01234 567890<br />F: 01234 567890</p>
<p class="sCoords">51.50276580000001,-0.0749306999999817,2</p>
</li>
<li>
@colourgarden
colourgarden / dabblet.css
Created January 27, 2012 10:08
Spinning timer
/**
* Spinning timer
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@colourgarden
colourgarden / dabblet.css
Created January 27, 2012 10:31
Spinning timer
/**
* Spinning timer
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@colourgarden
colourgarden / dabblet.css
Created January 27, 2012 10:40
Spinning timer two
/**
* Spinning timer two
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@colourgarden
colourgarden / txtQry.css
Created January 27, 2012 16:03
txtQry - CSS snippet for highlighting and annotating text queries during the website development stage via tooltips.
/* == txtQry CSS
========================================================================================================= */
[data-txtQry]{position: relative; background: #f3961c; cursor: help; padding: 2px;}
[data-txtQry]:after, [data-txtQry]:before{display: none; position: absolute;}
[data-txtQry]:after{top: -31px; width: auto; height: 24px; line-height: 23px; content: attr(data-txtQry); padding: 0 10px; white-space: nowrap; word-wrap: normal; font-size: 0.85em; border-radius: 0.3em; background: #222; color: #fff;}
[data-txtQry]:before{top: -7px; left: 10px; content: ""; border-width: 7px 7px 0; border-style: solid; border-color: #222 transparent;}
[data-txtQry]:hover:before, [data-txtQry]:hover:after{display: block;}
@colourgarden
colourgarden / dabblet.css
Created February 3, 2012 15:58
Spinning timer two
/**
* Spinning timer two
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@colourgarden
colourgarden / dabblet.css
Created February 3, 2012 16:02
CSS3 width transition. Animated vertical navigation.
/**
* CSS3 width transition. Animated vertical navigation.
*/
body{background: #fff; min-height:100%; font-family: Helvetica, Arial, sans-serif;}
ul{width: 30%; list-style: none; margin: 0; padding: 0; background: #eee;}
a{display: inline-block; min-width: 1px; background: #000; color: #fff; text-transform: uppercase; font-size: 1.143em; margin: 0.2em 0; padding: 0.85em; transition: all 0.25s ease; text-decoration: none;}
a:hover{min-width: 80%;/*alter depending on container and padding*/}
@colourgarden
colourgarden / jquery.force-keypress-numeric.js
Created September 19, 2012 06:20
Ensure that the character entered is numeric. Useful for checkout quantity fields.
$('input').keydown(function(e){
// Make some allowances for: delete, backspace, tab and escape
if ( e.keyCode == 46 || e.keyCode == 8 || e.keyCode == 9 || e.keyCode == 27 ||
// Allow: Ctrl+A
( e.keyCode == 65 && e.ctrlKey === true ) ||
// Allow: home, end, left, right
( e.keyCode >= 35 && e.keyCode <= 39 )) {
// Let it happen, don't do anything
return;
}
@colourgarden
colourgarden / markup.html
Created October 1, 2012 03:33
Quick and dirty removal of browse button from file inputs
<div class="file-input">
<input type="file">
</div>
@colourgarden
colourgarden / gulpfile.js
Created April 24, 2017 19:33
Avalanche CSS: sample lint gulpfile
var gulp = require('gulp'),
stylelint = require('gulp-stylelint');
gulp.task('lint', function () {
return gulp
.src('*.scss')
.pipe(stylelint({
reporters: [
{ formatter: 'string', console: true }
]