mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
code to count down date of end of campaign
This commit is contained in:
parent
1ae265d184
commit
da4c51e1ef
4 changed files with 16 additions and 3 deletions
|
@ -311,3 +311,6 @@ DEPENDENCIES
|
|||
timecop
|
||||
webmock
|
||||
zipruby
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.2
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
def kickstarter_days_remaining
|
||||
ending = Time.parse('Sat, Jul 25 2015 3:05 PM PDT')
|
||||
today = Time.now
|
||||
|
||||
remaining = ending - today
|
||||
return 0 if remaining < 0
|
||||
|
||||
((ending - today) / 86400).to_i
|
||||
end
|
||||
|
||||
def dashboard_if_signed_in
|
||||
redirect '/dashboard' if signed_in?
|
||||
end
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
<div class="col col-66">
|
||||
<div class="welcome kickstarter">
|
||||
<h4><a href="https://www.kickstarter.com/projects/1262953102/neocities-30-an-interactive-html-css-course-for-ev">The Neocities Kickstarter: An HTML/CSS course for everyone</a></h4>
|
||||
<p><strong>26 days left</strong> to get Neocities rewards and support our education goals! <a href="https://www.kickstarter.com/projects/1262953102/neocities-30-an-interactive-html-css-course-for-ev">Learn More >></a></p>
|
||||
<p><strong><%= kickstarter_days_remaining %> days left</strong> to get Neocities rewards and support our education goals! <a href="https://www.kickstarter.com/projects/1262953102/neocities-30-an-interactive-html-css-course-for-ev">Learn More >></a></p>
|
||||
</div>
|
||||
|
||||
|
||||
<% if site.site_changed == false || site.changed_count == 0 %>
|
||||
<div class="welcome">
|
||||
<h4>Thanks for joining the Neocities community!</h4>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<a href="https://www.kickstarter.com/projects/1262953102/neocities-30-an-interactive-html-css-course-for-ev">
|
||||
SUPPORT OUR
|
||||
<img src="/img/kickstarterlogo.png" style="width: 280px; display:block; margin: 11px 0px;">
|
||||
28 DAYS LEFT
|
||||
<%= kickstarter_days_remaining %> DAYS LEFT
|
||||
</a>
|
||||
</div>
|
||||
<p>We need your help to build an amazing HTML/CSS course into Neocities! <a href="https://www.kickstarter.com/projects/1262953102/neocities-30-an-interactive-html-css-course-for-ev">Learn More >></a></p>
|
||||
|
|
Loading…
Add table
Reference in a new issue