This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make links that are linking to the current page pulsate red | |
// so you can find and remove them. Really annoying but effective. | |
// I do all my development in webkit so this only works with that. | |
a[href="#"] { | |
background-color: red; | |
-webkit-animation: pulsate 1s ease-out; | |
-webkit-animation-iteration-count: infinite; | |
} | |
@-webkit-keyframes pulsate { | |
0% {background-color: #fff;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------------------*\ | |
//Curled Drop Shadow | |
\*------------------------------------*/ | |
//Usage: Requires parent element and then attach @mixin fancy-box-shadow($args); | |
//Descript: WARNING!!!!!!!!!!! If you use this attach z-index 0 to your body. For whatever reason if you don't attach a z-index to the body the shadow refuses to show up. | |
@mixin fancy-box-shadow($type, $params: 0px 10px 15px, $color: #000){ | |
@if $type == lifted { | |
padding:1em; | |
margin:2em 10px 4em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add a bar at the bottom of the page that shows the template being used. | |
*/ | |
function show_template() { | |
global $template; | |
$style = ' | |
background-color:rgba(0,0,0,1); | |
position:fixed; | |
bottom:0; | |
right:0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# eliminate font-related error messages | |
AddType application/vnd.ms-fontobject .eot | |
AddType font/ttf .ttf | |
AddType font/otf .otf | |
AddType application/x-font-woff .woff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var scrollToAnchor = function() { | |
//cache some variables | |
var scrollElement = 'html, body', | |
$window = $(window); | |
//grab all the anchor links | |
$("a[href^='#']").click(function(e) { | |
//stop immediate scroll | |
e.preventDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Use Parent Category | |
* Description: Causes subcategories to use their parent's template | |
*/ | |
function load_cat_parent_template(){ | |
global $wp_query; | |
if (!$wp_query->is_category) { | |
return true; // saves a bit of nesting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $wp_query; | |
$big = 999999999; | |
echo paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
'format' => '?paged=%#%', | |
'current' => max( 1, get_query_var('paged') ), | |
'total' => $wp_query->max_num_pages, | |
'prev_next' => false | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//hostname based google code, only run if on live site - Tom Horak | |
//placed right before closing body tag according to google best practice: http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55488 | |
//moved to right before closing head tag per SEOverflow 05/25/12 | |
$hostname = $_SERVER['HTTP_HOST']; //dev.zenman.com | localhost | Live server | etc.. | |
switch ($hostname) { | |
case 'localhost': //do nothing | |
//echo '<!-- no google analytics code -->'; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//hostname based google code, only run if on live site - By Tom Horak, modified by Tomas Mulder. | |
//placed right before closing head tag according to google best practice: https://support.google.com/analytics/answer/1008080?hl=en | |
$hostname = $_SERVER['HTTP_HOST']; //dev.zenman.com | localhost | Live server | etc.. | |
switch ($hostname) { | |
case 'localhost': //do nothing | |
//echo '<!-- no google analytics code -->'; | |
break; | |
case 'localhost:8888': //do nothing |