first commit

This commit is contained in:
2023-05-06 20:40:02 +03:00
commit fdf3e1e602
221 changed files with 12262 additions and 0 deletions

32
frontend/views/news/data.php Executable file
View File

@ -0,0 +1,32 @@
<?php
/** @var yii\web\View $this */
/** @var yii\bootstrap5\ActiveForm $form */
/** @var \frontend\models\DataForm $model */
use yii\bootstrap5\Html;
use yii\bootstrap5\ActiveForm;
use yii\captcha\Captcha;
?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
<?= $form->field($model, 'fio')->textInput(['autofocus' => true]) ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'phone')->widget(\yii\widgets\MaskedInput::class,
['mask' => '+7 (999) 999-99-99']
)->textInput(['placeholder' => '+7 (999) 999-99-99', 'class' => ''])->label('Ваш Телефон'); ?>
<div class="form-group">
<?= Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>

20
frontend/views/news/index.php Executable file
View File

@ -0,0 +1,20 @@
<?php
use common\models\News;
use yii\helpers\Url;
/** @var yii\web\View $this */
/** @var News $news */
?>
<h1>Новости</h1>
<?php if (!empty($news)):
foreach ($news as $new):
?>
<div>
<a href="<?= Url::base() . '/new/' . $new->slug ?>"><?= $new->title ?></a>
<p><?= $new->text ?></p>
</div>
<?php endforeach; else: ?>
<h2>Новостей нет</h2>
<?php endif; ?>

18
frontend/views/news/one.php Executable file
View File

@ -0,0 +1,18 @@
<?php
use common\models\News;
use yii\helpers\Url;
/** @var yii\web\View $this */
/** @var News $new */
?>
<?php if (!empty($new)):?>
<div>
<h1><?= $new->title ?></h1>
<a href="<?= Url::base() . '/news' ?>">Назад</a>
<p><?= $new->text ?></p>
</div>
<?php else: ?>
<h2>Новость удалена</h2>
<?php endif; ?>

View File

@ -0,0 +1,20 @@
<?php
use common\models\Text;
/** @var yii\web\View $this */
/** @var Text[] $texts */
?>
<h1>Тексты</h1>
<?php if (!empty($texts)):
foreach ($texts as $text):
?>
<div>
<h2><?= $text->title ?></h2>
<p><?= $text->text ?></p>
<img src="<?= '/uploads/' . $text->profile->image ?>"
</div>
<?php endforeach; else: ?>
<h2>текстов нет</h2>
<?php endif; ?>