• File: dynamic.php
  • Full Path: /home/chassiw/www/buildbench/core/enqueues/frontend/dynamic.php
  • File size: 6.88 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php if (!defined('ABSPATH')) die('Direct access forbidden.');
/**
 * dynamic css, generated by customizer options
 */

if ( defined( 'FW' ) ) {
    
    $body_bg_url = '';
    $general_box_bg_image_url = '';
    $page_box_bg_image_url = '';
    $typography = buildbench_option( 'typography' );
    $body_bg = buildbench_option( 'style_body_bg', '#fff' );
    $style_primary = buildbench_option( 'style_primary', '#ffb923');
    $title_color = buildbench_option( 'title_color', '#1c1c24');
    $style_primary_dark = buildbench_option( 'style_primary_dark','#333');
    $secondary_color = buildbench_option( 'secondary_color','#ffb923');
    $general_body_box_layout = buildbench_option("general_body_box_layout");
    $page_body_box_layout = buildbench_meta_option(get_the_ID(),"page_body_box_layout");

    $page_override_header_item     = buildbench_meta_option(get_the_ID(),'page_header_override');
    $page_header_layout_style_item = buildbench_meta_option(get_the_ID(),'page_header_layout_style');
   
    // if($page_override_header_item=='yes'):
    //  // var_dump($page_body_box_layout);
    // endif; 

    if(isset($general_body_box_layout["yes"])) {
       $box_bg_image = $general_body_box_layout["yes"];
       if(isset($box_bg_image["general_body_box_bg_image"])){
          
           if(is_array($box_bg_image["general_body_box_bg_image"])){
              
             $general_box_bg_image_url = $box_bg_image["general_body_box_bg_image"]["url"];
            
           }
        
       }
    }

    

  
    $global_body_font = buildbench_option( 'body_font' );
    
    Buildbench_Unyson_Google_Fonts::add_typography_v2( $global_body_font );
    $body_font = buildbench_advanced_font_styles( $global_body_font );

    $heading_font_one = buildbench_option( 'heading_font_one' );
    Buildbench_Unyson_Google_Fonts::add_typography_v2( $heading_font_one );
    $heading_font_one = buildbench_advanced_font_styles( $heading_font_one );
   
    $heading_font_two = buildbench_option( 'heading_font_two' );
    Buildbench_Unyson_Google_Fonts::add_typography_v2( $heading_font_two );
    $heading_font_two = buildbench_advanced_font_styles( $heading_font_two );

    $heading_font_three = buildbench_option( 'heading_font_three' );
    Buildbench_Unyson_Google_Fonts::add_typography_v2( $heading_font_three );
    $heading_font_three = buildbench_advanced_font_styles( $heading_font_three );

    // init custom css
    $custom_css	 = buildbench_option( 'custom_css' );
    $output = $custom_css;

    // global style
    $output	.= "
        body{ $body_font }

        h1,h2{
            $heading_font_one
        }
        h3{ 
            $heading_font_two 
        }

        h4{ 
            $heading_font_three
        }

        a, .post-meta span i, .entry-header .entry-title a:hover, .sidebar ul li a:hover{
            color: $style_primary;
            transition: all ease 500ms;
        }

         .entry-header .entry-title a,
         h1,h2,h3,h4,h5,h6{
            color: $title_color;
            
        }
        .navbar-container .navbar-light .navbar-nav > li.active > a, .navbar-container .navbar-light .navbar-nav > li:hover > a,
        .slider-item .slider-content .slider-sub-title,
        ul.navbar-nav li .dropdown-menu li a:hover,
        .ts-service .ts-service-box .ts-service-box-info .ts-title a:hover,
        .recent-folio-menu ul li.active,
        .ts-footer .footer-left-widget ul li span,
        .ts-footer .footer-widget ul li a:hover,
        .copyright span a,
        .ts-latest-news .single-latest-news .single-news-content .ts-post-title a:hover,
        .ts-top-bar .top-bar .header-nav-right-info li i.fa,
        .ts-nav-classic .header-nav-right-info li i,
        .sidebar .widget .media-body .entry-title a:hover,
        .readmore-btn-area a{
           color: $style_primary;
        }

      
        .btn-primary,
        .recent-folio-menu ul li.active,
        .copyright .footer-social ul li a:hover,
        .testimonial-footer:after,
        .btn-border-dark:hover, 
        .ts-working-box:hover .working-icon-wrapper{
           border-color: $style_primary;;
        }
        .recent-folio-menu ul li.active:after,
        .ts-latest-news .single-latest-news{
           border-bottom-color: $style_primary;;
        }
        .nav-classic .main-logo a:after{
           border-top-color: $style_primary;;
        }
        .btn-primary:hover{
         background: $secondary_color;
         border-color: $secondary_color;;
        }

        
         .single-intro-text .count-number, .sticky.post .meta-featured-post,
        .sidebar .widget .widget-title:before, .pagination li.active a, .pagination li:hover a,
        .pagination li.active a:hover, .pagination li:hover a:hover,
        .sidebar .widget.widget_search .input-group-btn, .tag-lists a:hover, .tagcloud a:hover,
        .BackTo, .ticket-btn.btn:hover,
        .navbar-container .navbar-light .navbar-nav > li > a:before,
        .nav-button,
        .btn-primary,
        .single-recent-work .link-more,
        .ts-team-slider .owl-nav .owl-prev:hover i, .ts-team-slider .owl-nav .owl-next:hover i,
      
        .ts-footer-info-box,
        .working-process-number,
        .copyright .footer-social ul li a:hover,
        .btn-border-dark:hover,
        .nav-classic .main-logo a:before,
        .main-logo{
            background: $style_primary;
        }
        
        ";

    // footer style
        
      $footer_bg_color = buildbench_option( 'footer_bg_color', '#1a1831' );
      $footer_padding_top = buildbench_option( 'footer_padding_top', '250px' );
      $footer_copyright_color = buildbench_option('footer_copyright_color', '#fff');
      $footer_bg              = buildbench_option("footer_bg_color");
      $footer_bg_img = buildbench_option('footer_bg_img');
      $footer_bg_url = 'background-image:url('.BUILDBENCH_IMG.'/footer_img.jpg'.');';
       if(is_array($footer_bg_img)):
           $footer_bg_url = $footer_bg_img['url'];  
           $footer_bg_url = 'background-image:url('.$footer_bg_url.');';
       endif; 
        $body_bg_url = 'background-image:url('. $general_box_bg_image_url .');'; 
      $output	.= "
      body{
         background-color: $body_bg;
         
        background-repeat: no-repeat;
        background-size: contain;
        background-attachment: inherit;
        background-position: center top;
     }
     .body-innner-content.box-layout {
        background: #fff;
        max-width: 1330px;
        margin: auto;
    }
    .body-box-layout{
        background-color: #f0f2f3;
        $body_bg_url;
    }
      .ts-footer{
          background-color: $footer_bg_color;
          padding-top:$footer_padding_top;
          background-repeat:no-repeat;
          background-size: cover;
          $footer_bg_url
      }
      .copyright {
         background: $footer_bg;
      }
      .copyright span{
         color: $footer_copyright_color;
      }
      ";

    wp_add_inline_style( 'buildbench-master', $output );


}