Skip to content

Instantly share code, notes, and snippets.

View ahaywood's full-sized avatar

Amy Haywood Dutton ahaywood

View GitHub Profile
@ahaywood
ahaywood / SCSS: Default CSS Document
Last active December 17, 2015 16:18
SCSS: Default CSS Document
/* CSS DOCUMENT */
@import "base";
// @import "compass/css3/";
// SPRITES
// $my-icons-spacing: 5px;
// @import "../images/my-icons/*.png";
// $icons: sprite-map("my-icons/*.png");
/* ------------------ REDEFINE STYLES ----------------------- */
@ahaywood
ahaywood / HTML: Zurb - Making site responsive on mobile devices
Last active December 17, 2015 11:59
HTML: Zurb - Making site responsive on mobile devices
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ahaywood
ahaywood / PHP: CI - Documenting Functions
Last active December 16, 2015 18:59
PHP: CI - Documenting Functions
/**
* Function Name / Description
*
* @access public
* @param
* @return
*/
@ahaywood
ahaywood / PHP: WP - Featured Image
Last active December 16, 2015 04:39
PHP: WP - Featured Image
@ahaywood
ahaywood / PHP: WP - Custom Post Type
Last active December 16, 2015 04:19
PHP: WP - Custom Post Type
// REGISTER HOMEPAGE CUSTOM TYPE
add_action('init', 'work_register');
function work_register() {
$labels = array(
'name' => _x('Work', 'post type general name'),
'singular_name' => _x('Work', 'post type singular name'),
'add_new' => _x('Add New', 'feature'),
'add_new_item' => __('Add New Work'),
'edit_item' => __('Edit Work'),
@ahaywood
ahaywood / JS: Smooth Scrolling
Last active December 16, 2015 03:18
JS: Smooth Scrolling
$('nav a').click(function(e){
e.preventDefault();
var goto = $(this).parent().attr('class');
var contentPosTop = $('section#' + goto).position().top - 50;
$('html, body').stop().animate({
scrollTop: contentPosTop
}, 1500);
});
@ahaywood
ahaywood / JS: Toggle Animate and Slide
Last active December 14, 2015 21:28
JS: Toggle Animate and Slide
.animate({ height: 'toggle', opacity: 'toggle'}, 'medium');
@ahaywood
ahaywood / CSS: All Media Queries
Last active December 12, 2015 10:19
CSS: All Media Queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - iPhone 4
Last active December 12, 2015 10:19
CSS: Media Query - iPhone 4
/* iPhone 4 ----------- */
@media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}
@ahaywood
ahaywood / CSS: Media Query - Large Screens (1824px)
Last active December 12, 2015 10:19
CSS: Media Query - Large Screens (1824px)
/* Large screens ----------- */
@media only screen and (min-width : 1824px) {
/* Styles */
}