Skip to content

Commit 8b073d5

Browse files
committed
Fix logo!
1 parent 466f13f commit 8b073d5

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

app/assets/stylesheets/admin.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,9 @@ video {
769769

770770
.dropdown {
771771
position: absolute;
772-
top: 32px;
772+
top: 33px;
773773
padding-top: 4px;
774+
margin-left: -12px;
774775
}
775776

776777
summary:hover + detail,
@@ -838,6 +839,7 @@ video {
838839
padding: 4px 12px;
839840
display: flex;
840841
align-items: center;
842+
justify-content: center;
841843
gap: 4px;
842844
}
843845

app/views/layouts/admin.html.erb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,30 @@
1818
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-<%= Rails.env %>-16x16.png">
1919
<%= yield(:head) if content_for?(:head) %>
2020
</head>
21-
<body>
21+
<body class="bg-snow">
2222
<a class="skip-to-main" href="#main">Skip to main content</a>
2323

2424
<% title = yield(:title) if content_for?(:title) %>
2525

2626
<% nav = Admin::Nav.new(page_title: title) %>
2727

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>
3834

3935
<% if title %>
36+
<% if nav.active_section&.name%>
4037
<span>
41-
<%= nav.active_section&.name || "Admin" %>
38+
<%= nav.active_section&.name %>
4239
</span>
4340
<span style="color: var(--hcb-link-2); font-weight: 200;">/</span>
44-
<b style="font-weight: 600;">
41+
<% end %>
42+
<span>
4543
<%= title %>
46-
</b>
44+
</span>
4745
<% else %>
4846
<b>
4947
<%= current_user.access_level.capitalize %>
@@ -60,9 +58,9 @@
6058
</div>
6159
</div>
6260

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">
6462
<% nav.sections.each do |section| %>
65-
<details open class="admin-nav-item pb0">
63+
<details open class="admin-nav-item pb-0 flex-1">
6664
<summary class="nav-item" style="<%= section.active? ? "color: var(--hcb-accent)" : "color: var(--hcb-tx-1)" %>">
6765
<%= section.name %>
6866
<span class="badge <%= section.task_sum > 0 ? "bg-success" : "bg-muted" %> h-fit-content">

0 commit comments

Comments
 (0)