main.php
3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?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">
</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() ?>