Last active
December 1, 2015 13:54
-
-
Save erezLieberman/b02bd92a5c4e273a35b2 to your computer and use it in GitHub Desktop.
child theme - starting point
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
(function($) { | |
$(document).ready(function(){ | |
alert("wow it's work!!!"); | |
// view the entire object of PHP variables | |
console.dir(ourPhpVariables); | |
// retrieve the site name from the object | |
var siteName = ourPhpVariables.siteName; | |
//end of document.ready function | |
}); | |
$( window ).load( function(){ | |
//end of window.load function | |
}); | |
$( window ).resize(function() { | |
//end of document.ready function | |
}); | |
$( document ).ajaxComplete(function() { | |
//end of ajaxComplete function | |
}); | |
})(jQuery); |
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 theme_styles_child_theme(){ | |
wp_enqueue_style( 'main_css' , get_stylesheet_directory_uri() . '/style.css'); | |
} | |
add_action( 'wp_enqueue_scripts' , 'theme_styles_child_theme' ); | |
function theme_js_child_theme(){ | |
wp_register_script( 'child-theme_js', get_stylesheet_directory_uri() . '/js/child-theme.js', array('jquery'), true ); | |
wp_enqueue_script( 'child-theme_js' ); | |
// use wp_localize_script to pass PHP variables into javascript | |
$site_name = get_bloginfo( 'name' ); | |
wp_localize_script( 'child-theme_js', 'ourPhpVariables', array( siteName => $site_name ) ); | |
} | |
add_action( 'wp_enqueue_scripts' , 'theme_js_child_theme'); | |
?> |
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
/* | |
Theme Name: Theme-Name | |
Template: sh-theme | |
*/ | |
@import url("../sh_theme/style.css"); | |
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
/* | |
Theme Name: Theme-Name | |
Template: sh_theme | |
*/ | |
@import "compass"; | |
@import url("../sh_theme/style.css"); | |
@mixin vertical-align { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} | |
@mixin Absolute-Center{ | |
margin: auto; | |
position: absolute; | |
top: 0; left: 0; bottom: 0; right: 0; | |
display: table; | |
height: auto; | |
} | |
@mixin trans{ | |
-webkit-transition: all 0.2s ease-in-out; | |
-moz-transition: all 0.2s ease-in-out; | |
-o-transition: all 0.2s ease-in-out; | |
-ms-transition: all 0.2s ease-in-out; | |
transition: all 0.2s ease-in-out; | |
/*-webkit-transform: translateZ(0);*/ | |
} | |
@mixin clickbleElement{ | |
cursor: pointer; | |
@include opacity(1); | |
@extend %trans; | |
&:hover{ | |
@include opacity(0.75); | |
} | |
} | |
@mixin hover_effect{ | |
@include opacity(1); | |
@extend %trans; | |
&:hover{ | |
@include opacity(0.75); | |
} | |
} | |
@mixin flex_align{ | |
display:flex; | |
justify-content:center; | |
align-items:center; | |
} | |
//------------------------------- placeholders ------------------------------ | |
%trans{ | |
-webkit-transition: all 0.2s ease-in-out; | |
-moz-transition: all 0.2s ease-in-out; | |
-o-transition: all 0.2s ease-in-out; | |
-ms-transition: all 0.2s ease-in-out; | |
transition: all 0.2s ease-in-out; | |
/*-webkit-transform: translateZ(0);*/ | |
} | |
%vertical-align { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} | |
%clickbleElement{ | |
cursor: pointer; | |
@include opacity(1); | |
@extend %trans; | |
&:hover{ | |
@include opacity(0.75); | |
} | |
} | |
%hover_effect{ | |
@include opacity(1); | |
@extend %trans; | |
&:hover{ | |
@include opacity(0.75); | |
} | |
} | |
%Absolute-Center{ | |
margin: auto; | |
position: absolute; | |
top: 0; left: 0; bottom: 0; right: 0; | |
display: table; | |
height: auto; | |
} | |
%flex_align{ | |
display:flex; | |
justify-content:center; | |
align-items:center; | |
} | |
/*z-index stufs*/ | |
$elements: elementOne; | |
/* | |
exmple: | |
z-index: index($elements, project-covers); | |
*/ | |
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"],input[type="tel"],input[type="number"],select,option,textarea{ | |
@include border-radius(0); | |
@include input-placeholder { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment