function indonez_custom_css() { global $idz_opt, $post; $id = isset($post->ID) ? get_the_ID() : ""; $prefix = '_indonez_'; $darkPercent = -10; $lightPercent = 10; $boxed_layout = !$idz_opt['boxed_layout'] ? $idz_opt['boxed_layout'] : 1; $background_pattern = !empty($idz_opt['background_pattern']) ? $idz_opt['background_pattern'] : ""; $get_pattern_name = explode('/', $background_pattern); $pattern_name = $get_pattern_name[count($get_pattern_name) - 1]; $body_color = !empty($idz_opt['body_color']) ? $idz_opt['body_color'] : ""; $background_custom_image = !empty($idz_opt['background_custom']['background-image']) ? $idz_opt['background_custom']['background-image'] : ""; $background_custom_repeat = !empty($idz_opt['background_custom']['background-repeat']) ? $idz_opt['background_custom']['background-repeat'] : ""; $background_custom_position = !empty($idz_opt['background_custom']['background-position']) ? $idz_opt['background_custom']['background-position'] : ""; $background_custom_size = !empty($idz_opt['background_custom']['background-size']) ? $idz_opt['background_custom']['background-size'] : ""; $background_custom_attachment = !empty($idz_opt['background_custom']['background-attachment']) ? $idz_opt['background_custom']['background-attachment'] : ""; $generalcolor = isset($idz_opt['color_scheme']) ? $idz_opt['color_scheme'] : ""; if ($generalcolor != "") { $generalcolorlight = IdzcolourCreator($generalcolor, $lightPercent); $generalcolordark = IdzcolourCreator($generalcolor, $darkPercent); $rgb = IdztoRGB($generalcolor); } else { $generalcolorlight = $generalcolor; $generalcolordark = $generalcolor; $rgb = $generalcolor; } //font $body_font_google = !empty($idz_opt['body_font']['google']) ? $idz_opt['body_font']['google'] : ""; $body_font_family = !empty($idz_opt['body_font']['font-family']) ? $idz_opt['body_font']['font-family'] : ""; $body_font_color = !empty($idz_opt['body_font']['color']) ? $idz_opt['body_font']['color'] : ""; $body_font_style = !empty($idz_opt['body_font']['font-style']) ? $idz_opt['body_font']['font-style'] : ""; $body_font_size = !empty($idz_opt['body_font']['font-size']) ? $idz_opt['body_font']['font-size'] : ""; $body_font_lineheight = !empty($idz_opt['body_font']['line-height']) ? $idz_opt['body_font']['line-height'] : ""; $menu_font_google = !empty($idz_opt['menu_font']['google']) ? $idz_opt['menu_font']['google'] : ""; $menu_font_family = !empty($idz_opt['menu_font']['font-family']) ? $idz_opt['menu_font']['font-family'] : ""; $menu_font_color = !empty($idz_opt['menu_font']['color']) ? $idz_opt['menu_font']['color'] : ""; $menu_font_style = !empty($idz_opt['menu_font']['font-style']) ? $idz_opt['menu_font']['font-style'] : ""; $menu_font_size = !empty($idz_opt['menu_font']['font-size']) ? $idz_opt['menu_font']['font-size'] : ""; $menu_font_lineheight = !empty($idz_opt['menu_font']['line-height']) ? $idz_opt['menu_font']['line-height'] : ""; $TagTypes = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'); $i = 1; foreach ($TagTypes as $type) { $heading_font_google[] = !empty($idz_opt['heading_' . $i . '_font']['google']) ? $idz_opt['heading_' . $i . '_font']['google'] : ""; $heading_font_famaily[] = !empty($idz_opt['heading_' . $i . '_font']['font-family']) ? $idz_opt['heading_' . $i . '_font']['font-family'] : ""; $heading_font_color[] = !empty($idz_opt['heading_' . $i . '_font']['color']) ? $idz_opt['heading_' . $i . '_font']['color'] : ""; $heading_font_style[] = !empty($idz_opt['heading_' . $i . '_font']['font-style']) ? $idz_opt['heading_' . $i . '_font']['font-style'] : ""; $heading_font_size[] = !empty($idz_opt['heading_' . $i . '_font']['font-size']) ? $idz_opt['heading_' . $i . '_font']['font-size'] : ""; $heading_font_lineheight[] = !empty($idz_opt['heading_' . $i . '_font']['line-height']) ? $idz_opt['heading_' . $i . '_font']['line-height'] : ""; $i++; } $custom_css = ''; //body background pattern if ($boxed_layout == 1) { if ($background_pattern != "") { if ($pattern_name != "no-pattern.png") { $custom_css .= 'body { background-image: url(' . $background_pattern . '); background-repeat: repeat; }' . "\n"; } else { $custom_css .= 'body { background-image: none; }' . "\n"; } } //body background color & background image if ($body_color != "") { $custom_css .= 'body { background-color: ' . $body_color . '; }' . "\n"; } //body background color & background image if (!empty($background_custom_image) || $background_custom_image != "") { $custom_css .= 'body { background-image: url(' . $background_custom_image . '); background-repeat: ' . ${$background_custom_repeat} . '; background-position: ' . $background_custom_position . '; background-size: ' . $background_custom_size . '; background-attachment : ' . $background_custom_attachment . '; }' . "\n"; } else { } } //Fonts $custom_css .= 'body {color:' . $body_font_color . ' ; font: ' . $body_font_size . ' ' . $body_font_family . '; font-weight: ' . $body_font_style . '; line-height: ' . $body_font_lineheight . ';}'; $custom_css .= 'p.lead, .icon-shape span, .text-shape span,#comment-form #submit, .idz-breadcrumb > li {font-family: ' . $body_font_family . '; }'; $custom_css .= '.idz-menu a { color: ' . $menu_font_color . '; font-size: ' . $menu_font_size . '; line-height: ' . $menu_font_lineheight . '; font-family: ' . $menu_font_family . ';}'; $custom_css .= '.button, .chart-container p, .portfolio-filter .button, .idz-image span, .widget-popular a, .contact-header strong, .slideshow .slider-title, .slideshow .slider-caption, .slideshow .slider-button, .slideshow .slider-list, .blog-link a, .date-blog-information span,.post-information, .post-information, .box-counter span, .contact-form legend, .footer-menu { font-family: ' . $menu_font_family . ';}'; //heading $custom_css .= 'h1 {color:' . $heading_font_color[0] . ' ; font: ' . $heading_font_size[0] . ' ' . $heading_font_famaily[0] . '; font-weight: ' . $heading_font_size[0] . '; line-height: ' . $heading_font_lineheight[0] . ';}'; $custom_css .= 'h2 {color:' . $heading_font_color[1] . ' ; font: ' . $heading_font_size[1] . ' ' . $heading_font_famaily[1] . '; font-weight: ' . $heading_font_size[1] . '; line-height: ' . $heading_font_lineheight[1] . ';}'; $custom_css .= 'h3 {color:' . $heading_font_color[2] . ' ; font: ' . $heading_font_size[2] . ' ' . $heading_font_famaily[2] . '; font-weight: ' . $heading_font_size[2] . '; line-height: ' . $heading_font_lineheight[2] . ';}'; $custom_css .= 'h4 {color:' . $heading_font_color[3] . ' ; font: ' . $heading_font_size[3] . ' ' . $heading_font_famaily[3] . '; font-weight: ' . $heading_font_size[3] . '; line-height: ' . $heading_font_lineheight[3] . ';}'; $custom_css .= 'h5 {color:' . $heading_font_color[4] . ' ; font: ' . $heading_font_size[4] . ' ' . $heading_font_famaily[4] . '; font-weight: ' . $heading_font_size[4] . '; line-height: ' . $heading_font_lineheight[4] . ';}'; $custom_css .= 'h6 {color:' . $heading_font_color[5] . ' ; font: ' . $heading_font_size[5] . ' ' . $heading_font_famaily[5] . '; font-weight: ' . $heading_font_size[5] . '; line-height: ' . $heading_font_lineheight[5] . ';}'; //content if ($generalcolor != "") { $custom_css .= '::selection { background-color: ' . $generalcolor . '; }'; $custom_css .= '::-moz-selection { background-color: ' . $generalcolor . '; } '; $custom_css .= '#scrollUp, .navigation-container, .icon-shape.circle, .icon-shape.square, .icon-shape.radius, .text-shape.circle, .text-shape.square, .text-shape.radius, .idz-button, blockquote cite span, .box-counter hr, .slideshow .slider-separator:before, .slideshow .slider-button, .slideshow .slider-list, .idz-pricing .pricing-title, .idz-pricing .pricing-price, .pin-team, .pin-team span, .information-box, .testimonial-description span, .idz-team span, .idz-team .social-icon a, .date-blog-information span, .badge, .sharing-box .social-list a, .comment-text .reply, .idz-panel.fold, .image-content .img-overlay, .idz-image .image-caption:after, .portfolio-filter .idz-button.selected, .mejs-controls .mejs-time-rail .mejs-time-current, .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current, .pagination li.active a, .circle-icon-list i, .contact-form label.focus, .dropcap.circle, .dropcap.square, .highlight, .promo-box:before, .progress-bar .progress-content, .comment-reply-link, .wp-pagenavi a:hover, .wp-pagenavi .current, #comment-form #submit, #idz-header.header-version2 #menu li.current-menu-ancestor > a:before { background-color: ' . $generalcolor . '; }'; $custom_css .= '#scrollUp:hover, .idz-button:hover, .idz-button:focus, .idz-idz-button.button-border:hover, .slideshow .slider-button:hover, .idz-pricing .pricing-price, .portfolio-filter .button:hover, .pagination li a:hover, .pagination li.active a:hover, .idz-button.button-icon-right:hover .button-icon, .idz-button.button-icon-left:hover .button-icon, .comment-reply-link:hover, #comment-form #submit:hover, .wp-pagenavi a:hover { background-color: ' . $generalcolorlight . '; }'; $custom_css .= '.comment-reply-link:hover { color: #ffffff;} .wp-pagenavi a:hover, .wp-pagenavi .current { color:#fff !important; border: 2px solid ' . $generalcolor . ' !important; }'; $custom_css .= '.wp-pagenavi a:hover { border: 2px solid ' . $generalcolorlight . ' !important; }'; $custom_css .= '#comment-form #submit:hover { border-color:' . $generalcolorlight . '; }'; $custom_css .= 'a, .text-color, .idz-button.button-border, .idz-button.button-link, .box-counter2 span, .box-counter i, .page-title, .idz-breadcrumb > .current_item, .services-list i, .widget-popular a, .blog-author .author-link, .widget-twitter .twitter-text a, .widget-twitter .twitter-text .at, .icon-shape i, .icon-shape span, .text-shape i, .text-shape span, h4.resp-accordion:hover, h4.resp-accordion:focus, .resp-tabs-list li:hover, .resp-tabs-list li:focus, .circle-icon-list, #toggle-switcher i {color: ' . $generalcolor . '; }'; $custom_css .= 'a:hover, .action-header a:hover, .idz-menu ul a.active, .idz-menu ul a:hover, .idz-menu ul a:focus, .idz-menu ul a.highlighted, .idz-menu a:hover span.sub-arrow:after, .idz-menu a:focus span.sub-arrow:after, .idz-menu a:active span.sub-arrow:after, .idz-menu a.highlighted span.sub-arrow:after, .form-search-trigger.active, .form-search-trigger:hover, .idz-button.button-link:hover, #me-footer a:hover, #slideshow-container .tp-rightarrow.default:hover:before, #slideshow-container .tp-leftarrow.default:hover:before, .testimonial-carousel-nav .left-nav:hover i, .testimonial-carousel-nav .right-nav:hover i, .idz-breadcrumb a:hover, .post-title:hover, .post-information a:hover, .blog-author .author-link:hover, .blog-link a:hover, .widget-category a:hover, .widget-archive a:hover, .widget-popular a:hover, .widget-twitter .twitter-text a:hover, .widget-twitter .twitter-text a:focus, .widget-twitter .twitter-text .at:hover, .widget-twitter .twitter-text .at:focus, .idz-list a:hover, #toggle-switcher:hover i, .search-trigger, .menu-trigger, .search-trigger.active, .search-trigger:hover, .menu-trigger.active, .menu-trigger:hover {color: ' . $generalcolorlight . '; }'; $custom_css .= '.idz-toggle .idz-toggle-title:hover, .idz-accordion .idz-accordion-title:hover, .idz-toggle .ui-accordion-header-active, .idz-accordion .ui-accordion-header-active { background: ' . $generalcolor . '; border: 1px solid ' . $generalcolor . '; color: #ffffff; }'; $custom_css .= '.slideshow .tp-bannertimer { background: rgba(' . $rgb['R'] . ', ' . $rgb['G'] . ', ' . $rgb['B'] . ', 0.5); }'; $custom_css .= '.navigation-container { border-top: 5px solid ' . $generalcolordark . '; }'; $custom_css .= '.idz-menu a.active, .idz-menu a:hover, .idz-menu a:focus, .idz-menu a.highlighted { background: ' . $generalcolordark . '; } #idz-header #menu .idz-menu li.current_page_parent > a, #idz-header #menu .idz-menu li.current-menu-parent > a, #idz-header #menu .idz-menu li.current-menu-ancestor > a, #idz-header #menu li.current-menu-ancestor > a { background: ' . $generalcolordark . '; }'; $custom_css .= '#idz-header.header-version2 .idz-menu a.active, #idz-header.header-version2 .idz-menu a:hover, #idz-header.header-version2 .idz-menu a:focus, #idz-header.header-version2 .idz-menu a.highlighted, #idz-header.header-version3 .idz-menu a.active, #idz-header.header-version3 .idz-menu a:hover, #idz-header.header-version3 .idz-menu a:focus, #idz-header.header-version3 .idz-menu a.highlighted { color: ' . $generalcolor . '; }'; $custom_css .= '#idz-header.header-version2 .idz-menu a.active:before, #idz-header.header-version2 .idz-menu a:hover:before, #idz-header.header-version2 .idz-menu a:focus:before, #idz-header.header-version2 .idz-menu a.highlighted:before, #idz-header.header-version3 .idz-menu a.active:before, #idz-header.header-version3 .idz-menu a:hover:before, #idz-header.header-version3 .idz-menu a:focus:before, #idz-header.header-version3 .idz-menu a.highlighted:before, #idz-header.header-version2 #menu li.current-menu-ancestor > a:before { background: ' . $generalcolor . '; }'; $custom_css .= '#idz-header.header-version2 .idz-menu ul a.active, #idz-header.header-version2 .idz-menu ul a:hover, #idz-header.header-version2 .idz-menu ul a:focus, #idz-header.header-version2 .idz-menu ul a.highlighted, #idz-header.header-version3 .idz-menu ul a.active, #idz-header.header-version3 .idz-menu ul a:hover, #idz-header.header-version3 .idz-menu ul a:focus, #idz-header.header-version3 .idz-menu ul a.highlighted, #idz-header.header-version2 #menu li.current_page_parent > a, #idz-header.header-version2 #menu li.current-menu-parent > a, #idz-header.header-version2 #menu li.current-menu-parent > a.highlighted, #idz-header.header-version2 #menu li.current-menu-ancestor > a, #idz-header.header-version3 #menu li.current-menu-ancestor > a{ color: ' . $generalcolor . '; }'; $custom_css .= '#idz-header.header-version2 .form-search-trigger.active, #idz-header.header-version2 .form-search-trigger:hover, #idz-header.header-version3 .form-search-trigger.active, #idz-header.header-version3 .form-search-trigger:hover { color: ' . $generalcolor . '; }'; $custom_css .= '#idz-header.header-version2 .form-search .input-group-icon, #idz-header.header-version3 .form-search .input-group-icon {background: ' . $generalcolor . '; }'; $custom_css .= '.form-search .form-control { background: ' . $generalcolordark . '; color: ' . $generalcolorlight . '; }'; $custom_css .= '.form-search .input-group-icon { color: ' . $generalcolorlight . '; }'; $custom_css .= '.form-search .form-control::-moz-placeholder { color: ' . $generalcolorlight . '; }'; $custom_css .= '.form-search .form-control:-ms-input-placeholder { color: ' . $generalcolorlight . '; }'; $custom_css .= '.form-search .form-control::-webkit-input-placeholder { color: ' . $generalcolorlight . '; }'; $custom_css .= '.icon-shape.stroke, .text-shape.stroke { border-color: ' . $generalcolor . ';background: transparent; }'; $custom_css .= '.icon-shape.stroke span, .icon-shape.stroke i,.text-shape.stroke span, .text-shape.stroke i { color: ' . $generalcolor . '; }'; $custom_css .= '.idz-button.button-border { border-color: ' . $generalcolor . '; }'; $custom_css .= '.idz-button.button-border:hover { border-color: ' . $generalcolorlight . '; }'; $custom_css .= '.pin-team span:before { border-color: ' . $generalcolor . ' transparent; }'; $custom_css .= '.blog-carousel-nav .left-nav:hover, .blog-carousel-nav .right-nav:hover { background: rgba(' . $rgb['R'] . ', ' . $rgb['G'] . ', ' . $rgb['B'] . ', 0.5); }'; $custom_css .= '.idz-panel.fold:before { border-color: #fff #fff ' . $generalcolordark . ' ' . $generalcolordark . '; }'; $custom_css .= '.form-control:focus { border-color: ' . $generalcolor . '; }'; $custom_css .= '.widget-tag .tag-cloud a:hover {color: ' . $generalcolor . '; border-color: ' . $generalcolor . '; }'; $custom_css .= 'h4.resp-accordion.resp-tab-active, h4.resp-accordion.resp-tab-active:hover, h4.resp-accordion.resp-tab-active:active, .resp-tabs-list li.resp-tab-active, .resp-tabs-list li.resp-tab-active:hover, .resp-tabs-list li.resp-tab-active:active { background: ' . $generalcolor . '; border: 1px solid ' . $generalcolor . '; }'; $custom_css .= '.pagination li a:hover, .pagination li.active a:hover { border-color: ' . $generalcolorlight . '; }'; $custom_css .= '.pagination li.active a { border-color: ' . $generalcolor . '; }'; $custom_css .= '.idz-button.button-icon-right .button-icon, .idz-button.button-icon-left .button-icon { background: ' . $generalcolordark . '; }'; $custom_css .= '.search-trigger, .menu-trigger { background: ' . $generalcolordark . '; }'; $custom_css .= '@media screen and (max-width: 700px) { .idz-menu a.active, .idz-menu a:hover, .idz-menu a:focus, .idz-menu a.highlighted { color: ' . $generalcolorlight . '; } }'; $custom_css .= '@media only screen and (min-width: 480px) and (max-width: 767px) { .search-trigger.active, .search-trigger:hover, .menu-trigger.active, .menu-trigger:hover { color: #fff !important; background: ' . $generalcolorlight . ' !important; } }'; } //custom css if (!empty($idz_opt['idz_custom_css'])) { $custom_css .= $idz_opt['idz_custom_css']; } return $custom_css; }
function indonez_wrapbox($atts, $content = null) { extract(shortcode_atts(array('bg_color' => '', 'bg_image' => '', 'border_color' => '', 'bg_opacity' => '', 'opacity' => '0.5', 'parallax' => 'no', 'top_gap' => '', 'bottom_gap' => '', 'class' => ''), $atts)); //enqueue script wp_enqueue_script('jquery.parallax'); wp_enqueue_script('idz.parallax'); $RGB = IdztoRGB($bg_opacity); $class_gap = ''; if ($top_gap != "" || $bottom_gap != "") { $class_gap = "gap"; } $gap_class = ''; if ($top_gap != "") { $gap_class .= 'data-gap-top="' . $top_gap . '"'; } if ($bottom_gap != "") { $gap_class .= 'data-gap-bottom="' . $bottom_gap . '"'; } $css_class = ''; $parallax_class = ''; if ($bg_color != "") { $css_class .= 'background-color: ' . esc_attr($bg_color) . ';'; } if ($bg_opacity != "") { $bgopacity_class = 'background-color: rgba(' . $RGB['R'] . ', ' . $RGB['G'] . ', ' . $RGB['B'] . ', ' . $opacity . ');'; } if ($bg_image != "") { $css_class .= 'background-image: url(' . esc_url($bg_image) . ');'; } if ($border_color != "") { $css_class .= 'border-top: 1px solid ' . esc_attr($border_color) . ';border-bottom: 1px solid ' . esc_attr($border_color) . ';'; } if ($parallax == "yes") { $parallax_class = 'parallax'; } $out = ''; if ($bg_opacity != "") { $out .= '<div class="idz-wrapbox ' . esc_attr($class) . ' ' . $parallax_class . ' ' . $class_gap . '" ' . $gap_class . ' style="' . $css_class . '"><div class="parallax-overlay" style="' . $bgopacity_class . '"></div>' . do_shortcode($content) . '<div class="clear"></div></div>'; } else { $out .= '<div class="idz-wrapbox ' . esc_attr($class) . ' ' . $parallax_class . ' ' . $class_gap . '" ' . $gap_class . ' style="' . $css_class . '">' . do_shortcode($content) . '<div class="clear"></div></div>'; } return $out; }