get( 'Version' ), false); wp_enqueue_style('akaka-style', get_stylesheet_uri(),array('theta-style'), $theme_info->get( 'Version' ) ); wp_enqueue_style( 'akaka-custom-style', get_template_directory_uri() . '/css/custom_script.css' ); $custom_css = ''; $color = '#F55145'; //header css if ( get_theme_mod( 'theme_color','#F55145') ){ $color = esc_attr(get_theme_mod( 'theme_color','#F55145')) ; } $color_hover = theta_change_color($color,0.8); $color_rbg = theta_hex2rgb( $color ); $header_color_rbg = theta_hex2rgb( '#ffffff' ); if( is_front_page() ){ $custom_css .= ' #theta-top-search span.theta-close-search-field{ color:'.$color.';}#theta-top-search .theta-search-form input{ color:#EFEFEF;} header.fixed{background-color:transparent;} header.changeh{background-color:rgba(0,0,0,0.5) ; } #footer { position: absolute; } '; } // get sction live css $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout', akaka_section_default_order() ) ); if ( ! empty( $sortable_value ) ) : foreach ( $sortable_value as $checked_value ) : $custom_css .= akaka_section_live_css($checked_value); endforeach; endif; wp_add_inline_style( 'akaka-custom-style', $custom_css ); wp_enqueue_script('waypoints', get_stylesheet_directory_uri().'/custom/js/jquery.waypoints.min.js', array( 'jquery' ), '4.0.0', true ); wp_enqueue_script('fullPage', get_stylesheet_directory_uri().'/custom/js/jquery.fullPage.js', array( 'jquery' ), '2.5.4', true ); wp_enqueue_script('theta-main', get_template_directory_uri().'/js/main.js', array( 'jquery' ),$theme_info->get( 'Version' ), true ); wp_enqueue_script('akaka-main', get_stylesheet_directory_uri().'/custom/js/main.js', array( 'jquery' ),$theme_info->get( 'Version' ), true ); wp_add_inline_script( 'akaka-main', akaka_script_method() ); } add_action( 'wp_enqueue_scripts', 'akaka_custom_scripts' ); function akaka_script_method() { $custom_js = 'jQuery(document).ready(function($){'; //front-page $custom_js .= 'var height = jQuery(window).height(); var width = jQuery(window).width();'; require_once(get_template_directory().'/inc/Mobile_Detect.php'); $detect = new Mobile_Detect; if (!$detect->isMobile() && is_front_page() && !is_home() ) { $custom_js .= "jQuery('#theta-section-warp').fullpage({ 'sectionSelector': '.ct_section', 'scrollBar': true, 'scrollingSpeed': 500, 'loopBottom':false , 'easing': 'linear', anchors: [".akaka_js_menu()."], menu: '.menu' }); "; }else{ $custom_js .= 'jQuery(".fullpage-nav").css("display","none");'; } if(is_front_page() ){ // get sction live js $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout', akaka_section_default_order() ) ); if ( ! empty( $sortable_value ) ) : foreach ( $sortable_value as $checked_value ) : $custom_js .= akaka_section_live_js($checked_value); endforeach; endif; } $custom_js .= '});'; return $custom_js; } if ( ! function_exists( 'akaka_get_section_menu' ) ) { function akaka_get_section_menu(){ $section_menu = ''; $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout',akaka_section_default_order() ) ); if ( ! empty( $sortable_value ) ) : foreach ( $sortable_value as $checked_value ) : $section_menu .= '