|
18 | 18 | <link rel="icon" type="image/png" sizes="16x16" href="/favicon-<%= Rails.env %>-16x16.png"> |
19 | 19 | <%= yield(:head) if content_for?(:head) %> |
20 | 20 | </head> |
21 | | - <body> |
| 21 | + <body class="bg-snow"> |
22 | 22 | <a class="skip-to-main" href="#main">Skip to main content</a> |
23 | 23 |
|
24 | 24 | <% title = yield(:title) if content_for?(:title) %> |
25 | 25 |
|
26 | 26 | <% nav = Admin::Nav.new(page_title: title) %> |
27 | 27 |
|
28 | | - <nav style="display: flex; flex-direction: column; background: var(--hcb-bg-2-5); gap: 0px"> |
29 | | - <div style="width: 100%; display: flex; gap: 8px; align-items: center; font-size: 22px; padding: 8px; border-bottom: 1px solid var(--hcb-bg-2);"> |
30 | | - <%= link_to root_path, class: "text-decoration-none", style: "height: 36px; margin-right: 8px;" do %> |
31 | | - <% logo_env = Rails.env.local? ? "development" : Rails.env %> |
32 | | - <%= image_tag user_birthday? ? "logo-party.gif" : by_season("logo-#{logo_env}.png", fall: "https://cloud-qmskqc293-hack-club-bot.vercel.app/0bank-pumpkin.png"), |
33 | | - name: "header-logo", |
34 | | - class: "logo", |
35 | | - height: @home_size || 36, |
36 | | - alt: "HCB logo" %> |
37 | | - <% end %> |
| 28 | + <nav class="flex flex-col shadow-lg sticky top-0 backdrop-blur-lg z-10 bg-white/80 dark:bg-[rgba(0,0,0,.7)]"> |
| 29 | + <div class="p-6 pl-5 pb-2 flex items-center w-full gap-2"> |
| 30 | + <%= render "application/logo" %> |
| 31 | + |
| 32 | + <span class="text-xl font-bold ml-1">HCB Admin</span> |
| 33 | + <span style="color: var(--hcb-link-2); font-weight: 200;">/</span> |
38 | 34 |
|
39 | 35 | <% if title %> |
| 36 | + <% if nav.active_section&.name%> |
40 | 37 | <span> |
41 | | - <%= nav.active_section&.name || "Admin" %> |
| 38 | + <%= nav.active_section&.name %> |
42 | 39 | </span> |
43 | 40 | <span style="color: var(--hcb-link-2); font-weight: 200;">/</span> |
44 | | - <b style="font-weight: 600;"> |
| 41 | + <% end %> |
| 42 | + <span> |
45 | 43 | <%= title %> |
46 | | - </b> |
| 44 | + </span> |
47 | 45 | <% else %> |
48 | 46 | <b> |
49 | 47 | <%= current_user.access_level.capitalize %> |
|
60 | 58 | </div> |
61 | 59 | </div> |
62 | 60 |
|
63 | | - <div class="nav-row" style="width: 100%; display: flex; padding: 8px 0px;"> |
| 61 | + <div class="nav-row px-3 !border-gray-200 dark:!border-gray-700 py-2" style="width: 100%; display: flex;border-top:1px solid"> |
64 | 62 | <% nav.sections.each do |section| %> |
65 | | - <details open class="admin-nav-item pb0"> |
| 63 | + <details open class="admin-nav-item pb-0 flex-1"> |
66 | 64 | <summary class="nav-item" style="<%= section.active? ? "color: var(--hcb-accent)" : "color: var(--hcb-tx-1)" %>"> |
67 | 65 | <%= section.name %> |
68 | 66 | <span class="badge <%= section.task_sum > 0 ? "bg-success" : "bg-muted" %> h-fit-content"> |
|
0 commit comments