main
erb 49 lines 2.16 KB
Raw
1 <!DOCTYPE html>
2 <html lang="en" class="h-full">
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <meta name="color-scheme" content="dark">
7 <meta name="theme-color" content="#1a1d21">
8 <meta name="robots" content="noindex, nofollow">
9 <title><%= content_for?(:title) ? "#{yield(:title)} · siGit Admin" : "siGit Admin" %></title>
10 <link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg">
11 <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
12 <%= javascript_importmap_tags %>
13 <%= csrf_meta_tags %>
14 </head>
15
16 <body class="h-full bg-surface-900 text-gray-200">
17 <div class="min-h-full flex flex-col md:flex-row">
18 <%= render "admin/sidebar" %>
19
20 <div class="flex-1 min-w-0">
21 <header class="border-b border-surface-600 bg-surface-800 px-4 sm:px-8 h-14 flex items-center justify-between">
22 <div class="flex items-center gap-2 text-sm text-gray-400">
23 <span class="inline-flex items-center gap-1.5 rounded bg-brand-500/10 text-brand-400 px-2 py-0.5 text-xs font-semibold tracking-wide uppercase">
24 Admin
25 </span>
26 <span class="text-gray-600">/</span>
27 <span class="text-gray-300"><%= content_for?(:title) ? yield(:title) : "Console" %></span>
28 </div>
29 <div class="flex items-center gap-3 text-sm">
30 <%= link_to "↩ Back to site", root_path, class: "text-gray-400 hover:text-gray-200 transition-colors" %>
31 <span class="text-gray-600">·</span>
32 <span class="text-gray-400"><%= current_user.username %></span>
33 </div>
34 </header>
35
36 <% if notice.present? %>
37 <div class="bg-green-900/20 border-b border-green-800/40 px-4 sm:px-8 py-2.5 text-sm text-green-300" role="alert"><%= notice %></div>
38 <% end %>
39 <% if alert.present? %>
40 <div class="bg-amber-900/20 border-b border-amber-800/40 px-4 sm:px-8 py-2.5 text-sm text-amber-300" role="alert"><%= alert %></div>
41 <% end %>
42
43 <main class="px-4 sm:px-8 py-6 max-w-6xl">
44 <%= yield %>
45 </main>
46 </div>
47 </div>
48 </body>
49 </html>