Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a banner to the top of the home screen for 2024 Hardrock lottery #1188

Merged
merged 1 commit into from
Dec 2, 2023
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
14 changes: 14 additions & 0 deletions app/views/visitors/_hardrock_lottery_link.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<% hardrock = Organization.find_by(slug: "hardrock") %>
<% lottery = hardrock.present? ? hardrock.lotteries.find_by(scheduled_start_date: "2023-12-02") : nil %>

<% if hardrock.present? && lottery.present? && Date.today == lottery.scheduled_start_date %>
<aside class="navbar bg-warning">
<div class="container-fluid">
<div class="row">
<div class="col">
<%= link_to "Live Hardrock 2024 Lottery", organization_lottery_path(hardrock, lottery), class: "btn btn-outline-secondary" %>
</div>
</div>
</div>
</aside>
<% end %>
3 changes: 3 additions & 0 deletions app/views/visitors/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<% end %>
<% content_for(:container_type) do %>skip
<% end %>

<%= render partial: "hardrock_lottery_link" %>

<div class="homepage">
<div class="row first position-relative">
<div class="over-text">
Expand Down
Loading