|
@@ -4,9 +4,7 @@
|
|
|
<meta charset="UTF-8">
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<title>My Simple Blog</title>
|
|
<title>My Simple Blog</title>
|
|
|
- <!-- Подключаем Tailwind CSS -->
|
|
|
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
- <!-- Шрифт Inter для красоты -->
|
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
|
|
|
<style>
|
|
<style>
|
|
|
body { font-family: 'Inter', sans-serif; }
|
|
body { font-family: 'Inter', sans-serif; }
|
|
@@ -14,7 +12,6 @@
|
|
|
</head>
|
|
</head>
|
|
|
<body class="bg-gray-50 text-gray-800 flex flex-col min-h-screen">
|
|
<body class="bg-gray-50 text-gray-800 flex flex-col min-h-screen">
|
|
|
|
|
|
|
|
- <!-- Навигация -->
|
|
|
|
|
<nav class="bg-white shadow-sm border-b border-gray-100">
|
|
<nav class="bg-white shadow-sm border-b border-gray-100">
|
|
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
<div class="flex justify-between h-16">
|
|
<div class="flex justify-between h-16">
|
|
@@ -23,28 +20,38 @@
|
|
|
BlogApp
|
|
BlogApp
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="flex items-center space-x-4">
|
|
|
|
|
- <!-- Просто ссылка на админку. Если нажать - браузер попросит пароль -->
|
|
|
|
|
- <a href="{{ route('admin.posts.index') }}" class="text-sm text-indigo-600 hover:text-indigo-800 font-bold">
|
|
|
|
|
- Панель администратора
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex items-center space-x-6">
|
|
|
|
|
+ <a href="{{ route('admin.posts.index') }}" class="text-sm text-gray-600 hover:text-indigo-600 font-medium transition">
|
|
|
|
|
+ Управление статьями
|
|
|
|
|
+ </a>
|
|
|
|
|
+
|
|
|
|
|
+ <a href="{{ route('admin.comments.index') }}" class="text-sm text-gray-600 hover:text-indigo-600 font-medium transition flex items-center">
|
|
|
|
|
+ Модерация
|
|
|
|
|
+ @php
|
|
|
|
|
+ $pendingCount = \App\Models\Comment::where('is_approved', false)->count();
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @if($pendingCount > 0)
|
|
|
|
|
+ <span class="ml-2 bg-red-100 text-red-600 text-xs font-bold px-2 py-0.5 rounded-full border border-red-200">
|
|
|
|
|
+ {{ $pendingCount }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ @endif
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</nav>
|
|
</nav>
|
|
|
|
|
|
|
|
- <!-- Основной контент -->
|
|
|
|
|
<main class="flex-grow">
|
|
<main class="flex-grow">
|
|
|
<div class="max-w-4xl mx-auto py-10 px-4 sm:px-6 lg:px-8">
|
|
<div class="max-w-4xl mx-auto py-10 px-4 sm:px-6 lg:px-8">
|
|
|
- <!-- Сообщения об успехе -->
|
|
|
|
|
@if(session('success'))
|
|
@if(session('success'))
|
|
|
- <div class="mb-6 bg-green-50 border-l-4 border-green-400 p-4">
|
|
|
|
|
|
|
+ <div class="mb-6 bg-green-50 border-l-4 border-green-400 p-4 rounded-md shadow-sm">
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<div class="flex-shrink-0">
|
|
<div class="flex-shrink-0">
|
|
|
<svg class="h-5 w-5 text-green-400" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>
|
|
<svg class="h-5 w-5 text-green-400" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="ml-3">
|
|
<div class="ml-3">
|
|
|
- <p class="text-sm text-green-700">{{ session('success') }}</p>
|
|
|
|
|
|
|
+ <p class="text-sm text-green-700 font-medium">{{ session('success') }}</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -54,7 +61,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</main>
|
|
</main>
|
|
|
|
|
|
|
|
- <!-- Футер -->
|
|
|
|
|
<footer class="bg-white border-t border-gray-200 mt-12">
|
|
<footer class="bg-white border-t border-gray-200 mt-12">
|
|
|
<div class="max-w-4xl mx-auto py-6 px-4 overflow-hidden sm:px-6 lg:px-8">
|
|
<div class="max-w-4xl mx-auto py-6 px-4 overflow-hidden sm:px-6 lg:px-8">
|
|
|
<p class="text-center text-base text-gray-400">
|
|
<p class="text-center text-base text-gray-400">
|