feat: Реализован полный CRUD для админ-панели и улучшена функциональность
- Portfolio CRUD: добавление, редактирование, удаление, переключение публикации - Services CRUD: полное управление услугами с возможностью активации/деактивации - Banner system: новая модель Banner с CRUD операциями и аналитикой кликов - Telegram integration: расширенные настройки бота, обнаружение чатов, отправка сообщений - Media management: улучшенная загрузка файлов с оптимизацией изображений и превью - UI improvements: обновлённые админ-панели с rich-text редактором и drag&drop загрузкой - Database: добавлена таблица banners с полями для баннеров и аналитики
This commit is contained in:
104
views/admin/layout.ejs
Normal file
104
views/admin/layout.ejs
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= currentLanguage %>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><%= title %> - SmartSolTech Admin</title>
|
||||
|
||||
<!-- Tailwind CSS -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
<link rel="stylesheet" href="/css/fixes.css">
|
||||
|
||||
<style>
|
||||
.admin-sidebar {
|
||||
min-height: calc(100vh - 64px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-gray-100">
|
||||
<!-- Admin Header -->
|
||||
<header class="bg-white shadow-sm border-b">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex items-center">
|
||||
<h1 class="text-xl font-semibold text-gray-900">
|
||||
<i class="fas fa-cogs mr-2"></i>
|
||||
SmartSolTech Admin
|
||||
</h1>
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<span class="text-sm text-gray-600">
|
||||
Добро пожаловать, <%= user ? user.name : 'Admin' %>!
|
||||
</span>
|
||||
<a href="/" class="text-gray-500 hover:text-gray-700">
|
||||
<i class="fas fa-external-link-alt mr-1"></i>
|
||||
Посмотреть сайт
|
||||
</a>
|
||||
<form action="/admin/logout" method="post" class="inline">
|
||||
<button type="submit" class="text-red-600 hover:text-red-800">
|
||||
<i class="fas fa-sign-out-alt mr-1"></i>
|
||||
Выход
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="flex">
|
||||
<!-- Admin Sidebar -->
|
||||
<aside class="w-64 bg-white shadow-sm admin-sidebar">
|
||||
<nav class="mt-5 px-2">
|
||||
<div class="space-y-1">
|
||||
<a href="/admin/dashboard" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-tachometer-alt mr-3"></i>
|
||||
Панель управления
|
||||
</a>
|
||||
<a href="/admin/portfolio" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-briefcase mr-3"></i>
|
||||
Портфолио
|
||||
</a>
|
||||
<a href="/admin/services" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-cog mr-3"></i>
|
||||
Услуги
|
||||
</a>
|
||||
<a href="/admin/contacts" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-envelope mr-3"></i>
|
||||
Сообщения
|
||||
</a>
|
||||
<a href="/admin/media" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-images mr-3"></i>
|
||||
Медиа
|
||||
</a>
|
||||
<a href="/admin/settings" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-cogs mr-3"></i>
|
||||
Настройки
|
||||
</a>
|
||||
<a href="/admin/telegram" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fab fa-telegram mr-3"></i>
|
||||
Telegram Bot
|
||||
</a>
|
||||
<a href="/admin/banner-editor" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:bg-gray-50 hover:text-gray-900">
|
||||
<i class="fas fa-paint-brush mr-3"></i>
|
||||
Редактор баннеров
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="flex-1 p-8">
|
||||
<%- body %>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- JavaScript -->
|
||||
<script src="/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user