Skip to content

Instantly share code, notes, and snippets.

View seafarer's full-sized avatar
☎️
DM me, maybe

Colin OBrien seafarer

☎️
DM me, maybe
View GitHub Profile
<form id="contact" name="contact" method="post">
<fieldset>
<label for="name" id="name">Name<span class="required">*</span></label>
<input type="text" name="name" id="name" size="30" value="" required/>
<label for="email" id="email">Email<span class="required">*</span></label>
<input type="text" name="email" id="email" size="30" value="" required/>
<label for="phone" id="phone">Phone</label>
<input type="text" name="phone" id="phone" size="30" value="" />
@seafarer
seafarer / icon-font.scss
Created March 18, 2014 20:33
Font face icons in scss
// Start with a mixin
@mixin iconfont {
font-family: "foundation-icons"; // whatever your icon fonts name is
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
display: inline-block;
@seafarer
seafarer / current-template.php
Created April 23, 2014 21:56
What template is in use on wp page?
<?php
add_filter( 'template_include', 'var_template_include', 1000 );
function var_template_include( $t ){
$GLOBALS['current_theme_template'] = basename($t);
return $t;
}
function get_current_template( $echo = false ) {
if( !isset( $GLOBALS['current_theme_template'] ) )
@seafarer
seafarer / respond-to-with-fallback.scss
Created April 28, 2014 20:16
Simple mixin for throwing a fallback class on min width media query for IE. Via http://www.alwaystwisted.com/post.php?s=2012-08-06-a-sass-mixin-for-media-queries-and-ie
@mixin respond-to($media) {
@media #{$media} {
@content
}
}
@mixin respond-to-fallback($media, $wrapper-class) {
.#{$wrapper-class} & {
@content;
}
@seafarer
seafarer / SassMeister-input-HTML.html
Created July 9, 2014 02:11
Generated by SassMeister.com.
<button class="image-stack"></button>
<button class="home"></button>
<button class="select-image"></button>
<button class="launch-camera"></button>
<button class="my-location"></button>
# Requre a specific version in this file:
# gem 'zurb-foundation', '=4.3.1'
require 'zurb-foundation'
# Require any additional compass plugins here.
class Splitter
MAX_SELECTORS_DEFAULT = 4095
@seafarer
seafarer / Gulpfile.js
Created March 19, 2015 02:45
Basic gulpfile to compile sass with libsass and autoprefixer and reload the browser. Also has a function for a custom icon font.
/**
* Front end tasks.
*/
var gulp = require('gulp');
var gutil = require('gulp-util');
var plumber = require('gulp-plumber');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
@seafarer
seafarer / package.json
Created March 19, 2015 02:46
a package json to go with my gulpfile
{
"name": "vrweb",
"version": "0.0.1",
"description": "Front end tasks for rezFusion",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/bluetent/vrweb-D7"
@seafarer
seafarer / respond-to.scss
Last active August 29, 2015 14:20
respond to mixin
$small-screen: 480px;
$medium-screen: 768px;
$large-screen: 960px;
$huge-screen: 1232px;
$breakpoints: (
'small': ( max-width: $small-screen ),
'small-up': ( min-width: $small-screen ),
'medium': ( max-width: $medium-screen ),
'medium-up': ( min-width: $medium-screen ),
add_action( 'wp_dashboard_setup', 'register_my_dashboard_widget' );
function register_my_dashboard_widget() {
wp_add_dashboard_widget(
'my_dashboard_widget',
'My Dashboard Widget',