Оормил страницу 404
This commit is contained in:
parent
585312eb15
commit
75277da092
|
|
@ -135,8 +135,18 @@ class PageController extends Controller
|
||||||
|
|
||||||
static function action404($message)
|
static function action404($message)
|
||||||
{
|
{
|
||||||
self::renderPartial('error404.php', array(
|
http_response_code(404);
|
||||||
'point' => Point::model()->getRandom(),
|
|
||||||
|
self::$layout = 'layoutPage.php';
|
||||||
|
self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
|
||||||
|
self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version'));
|
||||||
|
self::addStyle('/css/bootstrap.min.css');
|
||||||
|
self::addScript('/js/jquery-2.1.0.min.js');
|
||||||
|
self::addScript('/js/bootstrap.min.js');
|
||||||
|
|
||||||
|
App::setConfig('title', App::$defaultTitle);
|
||||||
|
self::render('error404.php', array(
|
||||||
|
'randomPoint' => Point::model()->getRandom(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
<!DOCTYPE html>
|
<div id="pageSmoothBackground" style="background-image: url(<?= $randomPoint->getImg('middle') ?>);"></div>
|
||||||
<html>
|
<div class="container" style="background-color: rgba(255,255,255, 0.8);margin-top: -10px;padding-bottom: 30px; min-height: 100%;">
|
||||||
<head>
|
|
||||||
<title>Ошибка 404 - страница не найдена!</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Ошибка 404 - страница не найдена!</h1>
|
|
||||||
<hr/>
|
|
||||||
<br/>
|
|
||||||
<noindex>
|
<noindex>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<h2>Не беда! Возможно вас заинтересует точка «<?= $point->name ?>»?</h2>
|
<img src="/img/404.png" style="margin: 50px 0;"/>
|
||||||
<a href="/point/<?= $point->id ?>">
|
|
||||||
<img src="<?= $point->getImg() ?>" style="max-width: 400px; margin: 0 20px 10px 0;" />
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</noindex>
|
</noindex>
|
||||||
</body>
|
<div class="row">
|
||||||
</html>
|
<div class="col-md-12">
|
||||||
|
<a href="/point/<?= $randomPoint->id ?>" style="float: left; margin: 0 20px 0 0;"><img src="<?= $randomPoint->getImg() ?>" style="width: 200px;"/></a>
|
||||||
|
<h3 style="margin-top: 0;">Это интересно: <?= $randomPoint->name ?></h3>
|
||||||
|
<p>
|
||||||
|
<?= mb_substr($randomPoint->description, 0, 400, 'UTF-8') ?>…
|
||||||
|
<a class="" href="/point/<?= $randomPoint->id ?>" role="button"><nobr> читать далее »</nobr></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue