digitalglarus: iframe and counter

This commit is contained in:
rascencio 2015-09-22 04:14:31 -06:00
parent f6fadaaf62
commit 8a4b1a0c92
3 changed files with 25 additions and 3 deletions

View File

@ -0,0 +1,21 @@
function day_diff(d1, d2) {
var one_day=1000*60*60*24;
var date1_ms = d1.getTime();
var date2_ms = d2.getTime();
var difference_ms = date2_ms - date1_ms;
return Math.round(difference_ms/one_day);
}
$(function(){
// $progressbar = $("#progressbar"),
// $progressbarLabel = $("progressbar-label"),
// $progrssbarLabelDays = $("progrssbar-label-days"),
var date_start = new Date(2015, 8, 22),
date_end = new Date(2015, 11, 31),
current_date = new Date(),
total_days = 100,
days_pass = day_diff(date_start, current_date),
$date = $("#date-quantity"),
days_to_go = total_days - days_pass;
$date.html(days_to_go.toString());
});

View File

@ -105,6 +105,7 @@
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'digitalglarus/js/bootstrap.min.js' %}"></script>
<script src="{% static 'digitalglarus/js/digital.glarus.js' %}"></script>
<!-- Script to Activate the Carousel -->
<script>

View File

@ -6,15 +6,15 @@
<div class="row">
<div class="box">
<div class="col-lg-12 text-center">
<h1>Our crowdfunding campaign launches on the 22nd of September 2015!</h1>
<h1> <span id="date-quantity">99</span> days to go! </h1>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
<div class="row">
<div class="box">
<div class="col-lg-12">
<iframe width="980" height="400" src="//www.100-days.net/en/projekt-iframe/start-digital-glarus" class="center-block" frameborder="0" scrolling="auto"></iframe>
<iframe width="980" height="600" src="//www.100-days.net/de/projekt-iframe/start-digital-glarus" frameborder="0" scrolling="auto" class="center-block"></iframe>
</div>
</div>
</div>