create pledge calculation logic

This commit is contained in:
Quincy Larson
2016-02-22 22:15:14 -08:00
committed by Berkeley Martinez
parent 96df9bfcd7
commit 2fb922be0f
2 changed files with 13 additions and 1 deletions

View File

@ -25,7 +25,15 @@ export default function about(app) {
About our Open Source Community, our social media presence, About our Open Source Community, our social media presence,
and how to contact us`.split('\n').join(' '), and how to contact us`.split('\n').join(' '),
globalCompletedCount: numberWithCommas( globalCompletedCount: numberWithCommas(
5612952 + (Math.floor((Date.now() - 1446268581061) / 1800)) 5612952 + (Math.floor((Date.now() - 1446268581061) / 1800)
),
globalPledgedAmount: numberWithCommas(
28000.00 +
(Math.floor(
(Date.now() - 1456207176902) /
(2629746 / 2000)
) * 8.30)
)
) )
}); });
}) })

View File

@ -21,6 +21,10 @@ block content
span.tag Donated:	 span.tag Donated:	
span.text-primary $850,000 span.text-primary $850,000
| in pro-bono code | in pro-bono code
li.nowrap
span.tag Pledged:	
span.text-primary #{globalPledgedAmount}
| to nonprofits
.spacer .spacer
.row .row
.col-xs-12.col-sm-10.col-sm-offset-1.col-md-6.col-md-offset-3 .col-xs-12.col-sm-10.col-sm-offset-1.col-md-6.col-md-offset-3