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
@mixin alpha($val: 0) { | |
$ie-alpha: $val * 100; | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$ie-alpha})"; | |
filter: alpha(opacity=#{$ie-alpha}); | |
@include prefix(opacity, $val); | |
} | |
%alpha-0 { @include alpha(0); } | |
%alpha-50 { @include alpha(0.5); } |
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
// Mixin for vertical and horizontal centerin | |
// Requires a declared height + position: relative on parent | |
// usage: | |
// .box { | |
// height: 50%; | |
// @include vertical-center-1; | |
// } | |
@mixin vertical-center-1 { | |
@include position(absolute, 0, 0, 0, 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
// Mixin for creating arrows, basic usage @include arrow(top-left, #000, 15px); | |
// available directions: top, right, bottom, left, top-left, top-right, bottom-left, bottom-right | |
@mixin arrow( | |
$direction, | |
$color, | |
$size | |
) { | |
height: 0; | |
width: 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
// Mixin for keyframes | |
// basic usage: | |
// @include keyframes(name) { | |
// 0% { background: yellow; } | |
// 100% { background: blue; } | |
// } | |
@mixin keyframes($name) { | |
@-webkit-keyframes $name { @content; } | |
@-moz-keyframes $name { @content; } |
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
// mixin for prefixin' | |
// usage: @include prefix(attribute, argument); | |
@mixin prefix($attribute, $argument) { | |
-webkit-#{$attribute}: #{$argument}; | |
-moz-#{$attribute}: #{$argument}; | |
-ms-#{$attribute}: #{$argument}; | |
-o-#{$attribute}: #{$argument}; | |
#{$attribute}: #{$argument}; | |
} |
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 subPages = { | |
'index': { | |
'name': 'Whazzzzup', | |
'content': 'Welcome to MyTurrn', | |
}, | |
'about': { | |
'name': 'Who are we?', | |
'content': 'We got founded back in 2014', | |
}, | |
'contact': { |
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 compress_page($buffer) { | |
$search = array("/<!–\{(.*?)\}–>|<!–(.*?)–>|[\t\r\n]|<!–|–>|\/\/ <!–|\/\/ –>|<!\[CDATA\[|\/\/ \]\]>|\]\]>|\/\/\]\]>|\/\/<!\[CDATA\[/" => ""); | |
$buffer = preg_replace(array_keys($search), array_values($search), $buffer); | |
return $buffer; | |
} | |
ob_start('compress_page'); | |
// Page here | |
ob_end_flush(); |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
"use strict"; | |
(function() { | |
class ScriptAsync extends HTMLElement { |
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
<style type="text/css">.body-js { opacity: 0; height: 100%; }</style> | |
<script type="text/javascript"> | |
!function(a,b){a.async=b}(this,function(){function a(a,b){function c(){g.incr(b)}function d(){"complete"===f.readyState&&c()}function e(){console.warn("[async] occurred an error while fetching",a)}var f=document.createElement("script");f.type="text/javascript",f.onload=c,f.async=!0,f.onreadystatechange=d,f.onerror=e,f.src=a,document.head.appendChild(f)}function b(a){c.apply(this,a)}function c(){var c=Array.prototype.slice.call(arguments),d=c[0];"string"==typeof d&&(d=[d]),"[object Array]"===Object.prototype.toString.call(c[1])&&(c[1]=b.bind(this,c.slice(1,c.length)));for(var f=g.push(d.length,c[1]),h=0;h<d.length;h++){var i=d[h];a(e[i]||i,f)}}var d=Object.prototype.hasOwnProperty,e={},f={"extends":function(a,b,c){for(var e in b)d.call(b,e)&&("constructor"===e&&a===global||(void 0===b[e]?delete a[e]:c&&"undefined"!=typeof a[e]||(a[e]=b[e])));return a},merge:function(a,b){var c={};for(var d in a)c[d]=a |
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 price_shortcode($id) { | |
if($id != '') { | |
$post_id = $id[0]; | |
$html = ''; | |
global $wpdb; | |
$args = array( | |
'post_type' => 'price_list_init', | |
'name' => $id |