Навёл порядок в лейаутах - теперб в них есть пояснения и они все лежат в папке layouts

This commit is contained in:
Krivchikov Dmitry 2015-10-03 11:08:54 +03:00
parent 9266dd4365
commit e1cce75c1d
11 changed files with 24 additions and 17 deletions

View File

@ -3,7 +3,7 @@
abstract class Controller abstract class Controller
{ {
static $layout = 'layout.php'; static $layout = 'layouts/default.php';
static private $styles = array(); static private $styles = array();
static private $scripts = array(); static private $scripts = array();
static private $og = array(); static private $og = array();

View File

@ -4,7 +4,7 @@ class ArticleController extends Controller
{ {
static function actionIndex() static function actionIndex()
{ {
self::$layout = 'layoutPage.php'; self::$layout = 'layouts/page.php';
$articleId = (int) App::getParam('id'); $articleId = (int) App::getParam('id');
if ($articleId) { if ($articleId) {
@ -72,7 +72,7 @@ class ArticleController extends Controller
} }
$articleId = (int) App::getParam('id'); $articleId = (int) App::getParam('id');
self::$layout = 'layoutClear.php'; self::$layout = 'layouts/clear.php';
self::addScript('/js/jquery-2.1.0.min.js'); self::addScript('/js/jquery-2.1.0.min.js');
self::addScript('/js/jquery-ui-1.10.4.custom.min.js'); self::addScript('/js/jquery-ui-1.10.4.custom.min.js');
self::addScript('/js/bootstrap.min.js'); self::addScript('/js/bootstrap.min.js');

View File

@ -9,7 +9,7 @@ class ArticlesController extends Controller
static function actionIndex() static function actionIndex()
{ {
self::$layout = 'layoutPage.php'; self::$layout = 'layouts/page.php';
self::addStyle('/css/style.css?ver=' . App::getConfig('version')); self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version')); self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version'));
self::addScript('/js/jquery-2.1.0.min.js'); self::addScript('/js/jquery-2.1.0.min.js');

View File

@ -178,7 +178,7 @@ class IndexController extends Controller
static function actionRoute() static function actionRoute()
{ {
self::$layout = 'layoutPrint.php'; self::$layout = 'layouts/print.php';
self::addStyle('/css/print.css?ver=' . App::getConfig('version')); self::addStyle('/css/print.css?ver=' . App::getConfig('version'));
if (!isset($_GET['route']) || !$_GET['route']) { if (!isset($_GET['route']) || !$_GET['route']) {

View File

@ -5,7 +5,7 @@ class PageController extends Controller
static function actionPoints() static function actionPoints()
{ {
self::$layout = 'layoutPage.php'; self::$layout = 'layouts/page.php';
self::addStyle('/css/style.css?ver=' . App::getConfig('version')); self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version')); self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version'));
self::addScript('/js/jquery-2.1.0.min.js'); self::addScript('/js/jquery-2.1.0.min.js');
@ -137,7 +137,7 @@ class PageController extends Controller
static function action404($message) static function action404($message)
{ {
self::$layout = 'layoutPage.php'; self::$layout = 'layouts/page.php';
self::addStyle('/css/style.css?ver=' . App::getConfig('version')); self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version')); self::addStyle('/css/pageStyle.css?ver=' . App::getConfig('version'));
self::addStyle('/css/bootstrap.min.css'); self::addStyle('/css/bootstrap.min.css');

View File

@ -4,7 +4,7 @@ class PointController extends Controller
{ {
static function actionIndex() static function actionIndex()
{ {
self::$layout = 'layoutPage.php'; self::$layout = 'layouts/page.php';
$pointId = (int) App::getParam('id'); $pointId = (int) App::getParam('id');
if ($pointId) { if ($pointId) {

View File

@ -19,7 +19,7 @@ class UserController extends Controller
App::error404(); App::error404();
} }
self::$layout = 'layoutPage.php'; self::$layout = 'layouts/page.php';
self::addScript('/js/jquery-2.1.0.min.js'); self::addScript('/js/jquery-2.1.0.min.js');
self::addScript('/js/jquery-ui-1.10.4.custom.min.js'); self::addScript('/js/jquery-ui-1.10.4.custom.min.js');
self::addScript('/js/bootstrap.min.js'); self::addScript('/js/bootstrap.min.js');

View File

@ -1,4 +1,8 @@
<!DOCTYPE html> <?php
/**
* Чистый лейаут - тут нет даже логотипа. Всё прижато к краям без значительных паддингов.
*/
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <html xmlns="http://www.w3.org/1999/xhtml"
lang="ru" lang="ru"
prefix="og: http://ogp.me/ns#" prefix="og: http://ogp.me/ns#"
@ -36,12 +40,7 @@
<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png" /> <link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png" />
</head> </head>
<body> <body>
<!--div class="header">
<a href="/"><img src="/img/logo.png" title="WIKIPOINTS.RU" /></a>
</div-->
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?> <?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
</body> </body>
<?php if ($scripts): ?> <?php if ($scripts): ?>

View File

@ -1,4 +1,8 @@
<!DOCTYPE html> <?php
/**
* Базовый лейаут. Используется на главной странице - на карте.
*/
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <html xmlns="http://www.w3.org/1999/xhtml"
lang="ru" lang="ru"
prefix="og: http://ogp.me/ns#" prefix="og: http://ogp.me/ns#"

View File

@ -1,4 +1,8 @@
<!DOCTYPE html> <?php
/**
* Немного странный и нуждающийся в переделке лейаут для печати.
*/
?><!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= App::getConfig('title') ?></title> <title><?= App::getConfig('title') ?></title>