Skip to content

Instantly share code, notes, and snippets.

@alexadark
alexadark / SassMeister-input-HTML.html
Created January 16, 2015 21:04
Generated by SassMeister.com.
<div class="container">
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
@alexadark
alexadark / 0_reuse_code.js
Created August 18, 2014 09:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/**
* Filter the genesis_seo_site_title function to use an image for the logo instead of a background image
*
* The genesis_seo_site_title function is located in genesis/lib/structure/header.php
* @link http://blackhillswebworks.com/?p=4144
*
*/
add_filter( 'genesis_seo_title', 'bhww_filter_genesis_seo_site_title', 10, 2 );
@alexadark
alexadark / include page
Created May 23, 2014 10:51
include page
function include_page($path) {
$post = get_page_by_path($path);
$content = apply_filters('the_content', $post->post_content);
echo $content;
}
@alexadark
alexadark / simple social icons turning
Created March 24, 2014 21:28
css: simple social icons
.simple-social-icons li a {
-webkit-transition: -webkit-transform 0.4s ease-out;
-moz-transition: -moz-transform 0.4s ease-out;
transition: transform 0.4s ease-out;
}
.simple-social-icons li a:hover {
-webkit-transform: rotateZ(360deg);
-moz-transform: rotateZ(360deg);
transform: rotateZ(360deg);
@alexadark
alexadark / ribbon
Created March 22, 2014 17:17
CSS: ribbon bg
.sidebar .widget-title:before {
border-bottom: 15px solid #005D87;
border-left: 20px solid rgba(0, 0, 0, 0);
content: "";
display: block;
height: 0;
left: 0;
position: absolute;
top: -15px;
width: 0;
@alexadark
alexadark / gist:9482072
Created March 11, 2014 09:07
css animation: morp
.morph1 {
background: url(/wp-content/uploads/2014/01/but-webdesign-01.png);
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.morph1:hover {
@alexadark
alexadark / gist:9448416
Created March 9, 2014 14:17
genesis DWB: enqueue scripts
add_action( 'wp_enqueue_scripts', 'enqueue_dev_style' );
/**
* Enqueue development css file which will be in uploads > themes > dynamik/gen root folder.
*/
function enqueue_dev_style()
{
wp_enqueue_script( 'dev', dynamik_get_stylesheet_location( 'url' ) . 'dev.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
wp_enqueue_style( 'dev', dynamik_get_stylesheet_location( 'url' ) . 'dev.css', CHILD_THEME_VERSION, true );
}
@alexadark
alexadark / gist:9446082
Created March 9, 2014 11:00
genesis center logo
//* Remove the header right widget area in functions.php
unregister_sidebar( 'header-right' );
css:
.header-image .title-area, .header-image .site-title, .header-image .site-title a, .header-image .site-header .wrap .title-area {
float:none;
margin: 0 auto;
}
@alexadark
alexadark / jquery
Created February 20, 2014 16:57
jquery:sticky footer2
function jqUpdateSize(){
// Get the dimensions of the viewport
var width = jQuery(window).width();
var height = jQuery(window).height();
// jQuery('#jqWidth').html(width); // Display the width
jQuery('.bodywrapper').css('height',height-45); // Set the height
};
jQuery(document).ready(jqUpdateSize); // When the page first loads
jQuery(window).resize(jqUpdateSize); // When the browser changes size