81 lines
3.4 KiB
Plaintext
81 lines
3.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Admin - StocksInTheFuture</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<%= csrf_meta_tags %>
|
|
<%= csp_meta_tag %>
|
|
<%= stylesheet_link_tag :app, 'data-turbo-track': "reload" %>
|
|
<%= stylesheet_link_tag "actiontext", 'data-turbo-track': "reload" %>
|
|
<%= javascript_importmap_tags %>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
</head>
|
|
<body class="min-h-screen bg-gray-50" data-controller="admin-sidebar">
|
|
<!-- Admin Header -->
|
|
<div class="fixed top-0 left-0 w-full z-50 bg-white border-b border-gray-200">
|
|
<div class="flex items-center justify-between py-3 px-6 h-16">
|
|
<div class="flex items-center gap-4">
|
|
<button
|
|
type="button"
|
|
data-action="click->admin-sidebar#toggle"
|
|
class="lg:hidden inline-flex items-center justify-center w-10 h-10 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
|
aria-label="Toggle menu">
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
|
</svg>
|
|
</button>
|
|
<h1 class="text-xl font-semibold text-gray-900">
|
|
<%= link_to admin_root_path do %>
|
|
<i class="fas fa-tools text-blue-600 mr-2"></i>
|
|
Admin Dashboard
|
|
<% end %>
|
|
</h1>
|
|
</div>
|
|
<div class="flex items-center gap-4">
|
|
<span class="hidden sm:inline text-sm text-gray-600">
|
|
<%= current_user.email %>
|
|
</span>
|
|
<%= link_to "View Site", root_path, class: "text-sm text-blue-600 hover:text-blue-800" %>
|
|
<%= link_to "Sign Out", destroy_user_session_path, data: { turbo_method: :delete }, class: "text-sm text-red-600 hover:text-red-800" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Admin Sidebar Navigation -->
|
|
<div class="fixed top-16 left-0 h-[calc(100vh-4rem)] w-64 bg-white border-r border-gray-200 overflow-y-auto lg:block hidden" id="admin-sidebar">
|
|
<nav class="p-4">
|
|
<%= render "admin/shared/navigation" %>
|
|
</nav>
|
|
</div>
|
|
|
|
<!-- Mobile Sidebar Overlay -->
|
|
<div class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden"
|
|
data-admin-sidebar-target="overlay"
|
|
data-action="click->admin-sidebar#toggle"
|
|
style="display: none;"></div>
|
|
|
|
<!-- Mobile Sidebar -->
|
|
<div class="fixed top-16 left-0 h-[calc(100vh-4rem)] w-64 bg-white border-r border-gray-200 overflow-y-auto z-50 transform -translate-x-full transition-transform duration-300 lg:hidden"
|
|
data-admin-sidebar-target="mobileSidebar">
|
|
<nav class="p-4">
|
|
<%= render "admin/shared/navigation" %>
|
|
</nav>
|
|
</div>
|
|
|
|
<!-- Main Content -->
|
|
<main class="pt-16 lg:pl-64 min-h-screen">
|
|
<div class="p-6">
|
|
<!-- Flash Messages -->
|
|
<% if notice.present? %>
|
|
<p class="mb-4 p-4 bg-green-50 border border-green-200 text-green-800 rounded-lg" id="notice"><%= notice %></p>
|
|
<% end %>
|
|
<% if alert.present? %>
|
|
<p class="mb-4 p-4 bg-red-50 border border-red-200 text-red-800 rounded-lg" id="alert"><%= alert %></p>
|
|
<% end %>
|
|
|
|
<%= yield %>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|