Created
November 6, 2017 21:06
-
-
Save asimoesmcartor/3aecb7ea234184754cfc4ecc4fa8da9a to your computer and use it in GitHub Desktop.
Donation progress bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% capture first_donate_total %}{% subpage "slug_1" with "total_amount_donated" %}{% endcapture %} | |
{% capture second_donate_total %}{% subpage "slug_2" with "total_amount_donated" %}{% endcapture %} | |
{% capture grand_total %}{{ first_donate_total | plus: second_donate_total}}{% endcapture %} | |
{% capture sitewide_goal %}{{ grand_total | divided_by: 3000 }}{% endcapture %} | |
{% assign thermo_width = 100 %} | |
<div class="clearfix"> | |
<div class="progress" style="width: {{ thermo_width }}%;"> | |
<div class="bar bar-success" style="width: {{ sitewide_goal | times:100 }}%;"> | |
<div class="bar-text">{{ grand_total }} raised</div> | |
</div> | |
</div> | |
<div class="bar-goal">GOAL: $3,000</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment