| 1 | <% |
| 2 | nav_items = [ |
| 3 | { label: "Dashboard", path: admin_dashboard_path, active: controller_name == "dashboard" }, |
| 4 | { label: "Users", path: admin_users_path, active: controller_name == "users" }, |
| 5 | { label: "Repositories", path: admin_repositories_path, active: controller_name == "repositories" }, |
| 6 | { label: "Subscriptions", path: admin_subscriptions_path, active: controller_name == "subscriptions" } |
| 7 | ] |
| 8 | %> |
| 9 | <aside class="md:w-56 shrink-0 border-b md:border-b-0 md:border-r border-surface-600 bg-surface-800"> |
| 10 | <div class="px-4 sm:px-5 h-14 flex items-center gap-2 border-b border-surface-600"> |
| 11 | <img src="/icon.png" alt="siGit" class="h-6 w-auto"> |
| 12 | <span class="font-semibold tracking-tight text-gray-100">siGit <span class="text-brand-500">Admin</span></span> |
| 13 | </div> |
| 14 | <nav class="p-3 flex md:flex-col gap-1 overflow-x-auto"> |
| 15 | <% nav_items.each do |item| %> |
| 16 | <%= link_to item[:path], |
| 17 | class: "px-3 py-2 rounded text-sm whitespace-nowrap transition-colors #{item[:active] ? 'bg-brand-500/15 text-brand-300 font-medium' : 'text-gray-400 hover:bg-surface-600 hover:text-gray-200'}" do %> |
| 18 | <%= item[:label] %> |
| 19 | <% end %> |
| 20 | <% end %> |
| 21 | </nav> |
| 22 | </aside> |