Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions app/assets/stylesheets/components/_buku_x3_status.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,6 @@
transform: translateY(-100%);
}

&__deadline {
// Mirror the label just below the rope.
position: absolute;
left: calc(var(--character-width) * 0.93);
right: calc(var(--character-width) * 0.93);
top: calc(var(--character-width) * 0.619 + var(--space-s));
z-index: 1;
margin: 0;
font-size: var(--font-size-s);
font-style: italic;
text-align: center;
}

&__tug {
--character-width: clamp(64px, 24cqi, 160px);

Expand Down
41 changes: 41 additions & 0 deletions app/assets/stylesheets/components/_top_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,47 @@
border-bottom: 2px solid #92400e;
}

.top-banner--announcement {
position: relative;
padding-inline: 2.5rem;
text-align: center;
background: var(--color-brand-yellow);
color: var(--color-set-1-bg);
text-shadow: none;

.top-banner__text {
margin: 0;
}
}

.top-banner__dismiss {
position: absolute;
top: 50%;
right: 0.5rem;
display: grid;
place-items: center;
width: 1.75rem;
height: 1.75rem;
padding: 0;
border: 0;
border-radius: 4px;
background: transparent;
color: inherit;
font-size: 1.25rem;
line-height: 1;
cursor: pointer;
transform: translateY(-50%);

&:hover {
background: rgba(0, 0, 0, 0.1);
}

&:focus-visible {
outline: 2px solid currentColor;
outline-offset: 1px;
}
}

.top-banner--impersonation {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
border-bottom: 3px solid #991b1b;
Expand Down
1 change: 0 additions & 1 deletion app/components/buku_x3_status_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<span>beans</span>
<small class="buku-x3-status__hours"><span data-buku-x3-status-target="beanHours"><%= display_hours(:bean) %></span> h shipped</small>
</div>
<p class="buku-x3-status__deadline">stardance ends october 31st!</p>
</div>
</div>
<% end %>
Expand Down
8 changes: 8 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@
</div>
<% end %>
<div class="top-banners">
<% unless cookies[:deadline_extension_dismissed] %>
<div class="top-banner top-banner--announcement" role="region" aria-label="announcement"
data-controller="dismissable" data-dismissable-cookie-value="deadline_extension_dismissed">
<p class="top-banner__text">stardance has been extended another month! the new deadline is october 31 :)</p>
<button type="button" class="top-banner__dismiss" aria-label="Dismiss announcement"
data-action="click->dismissable#dismiss">&times;</button>
</div>
<% end %>
<% if in_beta? %>
<div class="top-banner top-banner--beta">
<strong>Beta</strong> &mdash; This is a testing environment. Your data may be reset at any time.
Expand Down
Loading