Skip to content

Commit

Permalink
Add a banner to the top of the home screen for 2024 Hardrock lottery
Browse files Browse the repository at this point in the history
  • Loading branch information
moveson committed Dec 2, 2023
1 parent 48f731e commit 1389b91
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
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

0 comments on commit 1389b91

Please sign in to comment.