Skip to content

Commit

Permalink
Merge pull request #1188 from SplitTime/oveson/hardrock-lottery-2024
Browse files Browse the repository at this point in the history
Add a banner to the top of the home screen for 2024 Hardrock lottery
  • Loading branch information
moveson authored Dec 2, 2023
2 parents 48f731e + 1389b91 commit df2e3ef
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 df2e3ef

Please sign in to comment.