<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Head -->

<head>

    <?php
    $this->load->view('front/layouts/partials/common');
    ?>

    <?php
    if ($required_css == true) {

        echo '<link href="' . base_url() . $css_file . '" rel="stylesheet"/>';
    }
    ?>

    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>

<body>
   <!-- Load Facebook SDK for JavaScript -->
      <div id="fb-root"></div>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            xfbml            : true,
            version          : 'v11.0'
          });
        };

        (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = 'https://connect.facebook.net/zh_HK/sdk/xfbml.customerchat.js';
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));</script>

      <!-- Your Chat Plugin code -->
      <div class="fb-customerchat"
        attribution="setup_tool"
        page_id="112169241111653">
      </div>
      
    <?php include(__DIR__ . '/partials/navbar.php') ?>

    <?php
    if ($use_banner == true && $main['url']==base_url("about_us")) {
        echo '<section>
        <img class="banner_image" src="' . base_url() . 'public/images/static_banner.png" alt="banner">
        <img class="SD_banner_image" src="' . base_url() . 'public/images/SD_static_banner.png" alt="banner">
    </section>';
    }else{
        echo "<section></section>";
    }
    ?>

    <?php if ($use_breadcrumb == true) {
        if(!isset($sub['name'])){
        echo
            '<div class="container">' .
            '<div class="breadcrumb">' .
            '<i class="fas fa-home breadcrumb_noncurrent"></i>&nbsp;/&nbsp;<span class="breadcrumb_current">'.$main['name'].'</span>'.
            '</div>' .
            '</div>';
        }
        else{
            echo
            '<div class="container">' .
            '<div class="breadcrumb">' .
            '<i class="fas fa-home breadcrumb_noncurrent"></i>&nbsp;/&nbsp;<span class="breadcrumb_noncurrent">'.$main['name'].'</span>';
             
            
         echo
          
            '&nbsp;/&nbsp;<span class="breadcrumb_current">'.$sub['name'].'</span>'.
            '</div>'.
            '</div>';

        }

        
    } ?>


    <?php
    if (isset($_view) && $_view)
        $this->load->view($_view);
    ?>

    <?php $this->load->view('front/layouts/partials/footer.php') ?>
    <!--
    <div class="chatbot">
        <img id="chatbot_open" src="<?= base_url() ?>public/images/chatbot_icon.png" alt="">
    </div>

    <div class="chatbot_expand">
        <img src="<?= base_url() ?>public/images/wechat_icon.png" alt=""><br>
        <img src="<?= base_url() ?>public/images/whatsapp_icon.png" alt=""><br>
        <a href="https://m.me/username"><img src="<?= base_url() ?>public/images/messager_icon.png" alt=""></a><br>
        <img id="chatbot_close" src="<?= base_url() ?>public/images/cancel_icon.png" alt=""> -->
    </div>
    <script>
        $('#chatbot_open').on('click', function() {
            $('.chatbot').hide();
            $('.chatbot_expand').show();
        });
        $('#chatbot_close').on('click', function() {
            $('.chatbot').show();
            $('.chatbot_expand').hide();
        });
    </script>
</body>

</html>