[MVC] Полная миграция на MVC архитектуру
- Создано ядро MVC: App, Router, Controller, Model, View, Database - Созданы модели: User, Product, Category, Cart, Order - Созданы контроллеры: Home, Auth, Product, Cart, Order, Page, Admin - Созданы layouts и partials для представлений - Добавлены все views для страниц - Настроена маршрутизация с чистыми URL - Обновлена конфигурация Docker и Apache для mod_rewrite - Добавлена единая точка входа public/index.php
This commit is contained in:
33
public/.htaccess
Normal file
33
public/.htaccess
Normal file
@@ -0,0 +1,33 @@
|
||||
# AETERNA MVC - Apache URL Rewrite Rules
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# Базовый путь приложения
|
||||
RewriteBase /cite_practica/
|
||||
|
||||
# Если запрос к существующему файлу или директории - пропускаем
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
|
||||
# Все остальные запросы направляем на index.php
|
||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
</IfModule>
|
||||
|
||||
# Отключаем просмотр директорий
|
||||
Options -Indexes
|
||||
|
||||
# Защита файлов конфигурации
|
||||
<FilesMatch "\.(env|json|lock|md)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Кодировка по умолчанию
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
# Типы файлов
|
||||
AddType text/css .css
|
||||
AddType text/javascript .js
|
||||
AddType image/svg+xml .svg
|
||||
|
||||
18
public/index.php
Normal file
18
public/index.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AETERNA - Единая точка входа MVC приложения
|
||||
*
|
||||
* Все запросы перенаправляются сюда через .htaccess
|
||||
*/
|
||||
|
||||
// Определяем константу корневой директории
|
||||
define('ROOT_PATH', dirname(__DIR__));
|
||||
|
||||
// Автозагрузка классов
|
||||
require_once ROOT_PATH . '/app/Core/App.php';
|
||||
|
||||
// Создаем и запускаем приложение
|
||||
$app = new \App\Core\App();
|
||||
$app->init()->run();
|
||||
|
||||
85
public/mixins.less
Normal file
85
public/mixins.less
Normal file
@@ -0,0 +1,85 @@
|
||||
// ===================================
|
||||
// === ПЕРЕМЕННЫЕ И МИКСИНЫ AETERNA ===
|
||||
// ===================================
|
||||
@color-primary: #617365;
|
||||
@color-secondary: #D1D1D1;
|
||||
@color-accent: #453227;
|
||||
@color-text-dark: #333;
|
||||
@color-text-light: #fff;
|
||||
@color-button: @color-accent;
|
||||
@color-beige: #A2A09A;
|
||||
|
||||
@font-logo: 'Anek Kannada', sans-serif;
|
||||
@font-main: 'Anonymous Pro', monospace;
|
||||
@font-heading: 'Playfair Display', serif;
|
||||
|
||||
@shadow-light: 0 5px 15px rgba(0, 0, 0, 0.2);
|
||||
@shadow-dark: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
||||
|
||||
.flex-center(@gap: 0) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: @gap;
|
||||
}
|
||||
|
||||
.flex-between() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.flex-column() {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.icon-base(@size: 18px, @hover-scale: 1.1) {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: @size;
|
||||
&:hover {
|
||||
transform: scale(@hover-scale);
|
||||
}
|
||||
}
|
||||
|
||||
.image-overlay() {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
.flex-center(15px);
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
padding: 20px;
|
||||
color: @color-text-light;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.menu-base() {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 250px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
padding: 15px;
|
||||
z-index: 1000;
|
||||
margin-top: 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-base() {
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
font-family: @font-main;
|
||||
font-size: 14px;
|
||||
outline: none;
|
||||
transition: border-color 0.3s ease;
|
||||
&:focus {
|
||||
border-color: @color-primary;
|
||||
}
|
||||
}
|
||||
3178
public/style_for_cite.less
Normal file
3178
public/style_for_cite.less
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user