main.php 3.28 KB
<?php
    
    use frontend\themes\defaults\assets\BotAsset;
    use yii\helpers\Html;

use thread\modules\seo\modules\info\widgets\RenderLdJsonInfo\RenderLdJsonInfo;
//
use frontend\themes\defaults\assets\AppAsset;
use frontend\modules\user\widgets\{
    Login, Register, RequestPasswordReset
};

/**
 * @var \yii\web\View $this
 * @author Alla Kuzmenko
 * @copyright (c), Thread
 */
$asset = AppAsset::register($this);
BotAsset::register($this);
$this->beginPage();
?>
    <!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>" class="ie9"> <![endif]-->
<html lang="<?= Yii::$app->language ?>" class="ie"> <![endif]-->
<html dir="ltr" lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <base href="<?= Yii::$app->getUrlManager()->getBaseUrl() ?>">
    <link rel="shortcut icon" href="/favicon.ico">
    <title><?= $this->title ?></title>
    <script>
        var jst_base_url = '<?= Yii::$app->getUrlManager()->getHostInfo() . Yii::$app->getUrlManager()->getBaseUrl() ?>/';
        var jst_csrf = '<?= Yii::$app->getRequest()->getCsrfToken()?>';
    </script>
    <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <?php $this->head(); ?>

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-111495929-1"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'UA-111495929-1');
    </script>

</head>
<body>
<?php
$this->beginBody();
echo $content;

if (Yii::$app->getSession()->hasFlash('login')) {
    $overlay = true;
    echo $this->render('parts/registration_done_popup');
}
if (Yii::$app->getSession()->hasFlash('info-popup')) {
    $overlay = true;
    $message = Yii::$app->getSession()->getFlash('info-popup');
    $message = $message[0];
    echo $this->render('parts/info_popup', ['title' => $message['title'], 'text' => $message['text']]);
}
echo Html::tag('div', '', [
    'class' => 'overlay',
    'id' => 'overlay',
    'style' => (isset($overlay)) ? 'display: block;' : ' '
]);
?>
<div class="popup aboutproject-popup" id="aboutprojectPopup"
     style="background-image: url(<?= $asset->baseUrl ?>/img/ua_map_main_about_<?= Yii::$app->language ?>.jpg)">
    <div class="popup-container">
        <button class="close-popup"></button>
        <div class="form-tittle">
            &nbsp;
        </div>
        <div style="margin-top: 65px; margin-left: 53px;">
            <?= \frontend\modules\page\models\StaticTextBlock::give_me('about_us') ?>
        </div>
    </div>
</div>
  <?php
      if(\Yii::$app->language == 'en-EN'){
        echo $this->render('chat_en');
      }else{
          $this->render('chat_ua');
      }
      ?>
<?php
if (Yii::$app->getUser()->isGuest):
    echo Login::widget(['view' => 'authorization-popup'])
        . Register::widget(['view' => 'registration-popup'])
        . RequestPasswordReset::widget(['view' => 'forgot-password-popup']);
endif;
$this->endBody();
echo RenderLdJsonInfo::widget();
?>
</body>
</html>
<?php $this->endPage() ?>