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
<!-- | |
Clean, efficient, complex content elements. | |
--> |
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
/** | |
* Cross-browser opacity. | |
* | |
* 1. Even IE8 | |
* | |
* Usage: | |
* | |
@include opacity(0.8); | |
* | |
*/ |
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 | |
function _s_theme_options_init() { | |
register_setting( | |
'_s_options', // Options group, see settings_fields() call in _s_theme_options_render_page() | |
'_s_theme_options', // Database option, see _s_get_theme_options() | |
'_s_theme_options_validate' // The sanitization callback, see _s_theme_options_validate() | |
); | |
// Register our settings field group | |
add_settings_section( |
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 | |
/** | |
* Return the number of Likes, Shares, or Comments of a given Fan Page. | |
*/ | |
function facebook_numbers( $url ) { | |
$fql = 'SELECT url, normalized_url, share_count, like_count, comment_count, '; | |
$fql .= 'total_count, commentsbox_count, comments_fbid, click_count FROM '; | |
$fql .= 'link_stat WHERE url = "' . $url . '"'; |
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
/** | |
* Cross-browser image desaturation filter | |
* | |
* 1. Chrome 19+, Safari 6+, Safari 6+ iOS | |
* 2. Firefox 10+, Firefox on Android | |
* 3. IE6-9 | |
*/ | |
%greyscale { | |
-webkit-filter: grayscale(100%); /* [1] */ | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* [2] */ |
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
/** | |
* Change class when element is in view | |
*/ | |
var elementTop = $(".container").offset().top; | |
$(window).on("scroll", function updateClassWhenInView() { | |
if ($(window).scrollTop() > elementTop - window.innerHeight * 0.9) { | |
$(window).off("scroll", updateClassWhenInView); | |
$(".element").removeClass("is-hidden").addClass("is-visible"); | |
} |
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
/** | |
* Vertically center an element's children. | |
*/ | |
%vertical-center { | |
display: table; | |
> * { | |
display: table-cell; | |
vertical-align: middle; | |
} |
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
/** | |
* | |
* | |
* @link http://demosthenes.info/blog/832/Easy-Parallax-Effects-With-Em | |
*/ | |
div#parallax { | |
background-image: url(blurred-background-small.jpg); | |
background-size: cover; padding-top: 62.5%; | |
overflow: hidden; position: relative; | |
font-size: .1em; } |
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
/** | |
* Quick & dirty browser sniff to detect mobile devices. | |
*/ | |
var isMobile = false; | |
if( navigator.userAgent.match(/Android/i) || | |
navigator.userAgent.match(/webOS/i) || | |
navigator.userAgent.match(/iPhone/i) || | |
navigator.userAgent.match(/iPod/i) || | |
navigator.userAgent.match(/iPad/i) || |
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
/** | |
* @link http://webdesign.tutsplus.com/articles/simple-visual-enhancements-for-better-coding-in-sublime-text--webdesign-18052 | |
* @link http://daleanthony.com/sublime-for-designers/ | |
*/ | |
"font_face": "Inconsolata"; | |
"font_size": 18; | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
// highlight_line |