allow for a starting date and hidden hunt if it hasnt started
Build Images and Deploy / Update-PROD-Stack (push) Successful in 31s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 31s
This commit is contained in:
@@ -14,12 +14,17 @@
|
||||
<h3><%= hunt.name %></h3>
|
||||
<span class="meta"><%= hunt.short_name %> · <%= hunt.package_count %> packages · by <%= hunt.creator_name %>
|
||||
<% if (hunt.expiry_date) { %>
|
||||
· Expires: <%= new Date(hunt.expiry_date).toLocaleDateString() %>
|
||||
· Expires <time datetime="<%= hunt.expiry_date %>"><%= new Date(hunt.expiry_date).toLocaleDateString() %></time>
|
||||
<% } %>
|
||||
<% if (hunt.start_date && new Date(hunt.start_date + 'Z') > new Date()) { %>
|
||||
· Starts <time datetime="<%= hunt.start_date %>"><%= new Date(hunt.start_date).toLocaleDateString() %></time>
|
||||
<% } %>
|
||||
</span>
|
||||
</div>
|
||||
<% if (hunt.expiry_date && new Date(hunt.expiry_date) < new Date()) { %>
|
||||
<% if (hunt.expiry_date && new Date(hunt.expiry_date + 'Z') < new Date()) { %>
|
||||
<span class="badge expired">Expired</span>
|
||||
<% } else if (hunt.start_date && new Date(hunt.start_date + 'Z') > new Date()) { %>
|
||||
<span class="badge">Upcoming</span>
|
||||
<% } else { %>
|
||||
<span class="badge"><%= hunt.package_count %> packages</span>
|
||||
<% } %>
|
||||
|
||||
Reference in New Issue
Block a user