Skip to content

Instantly share code, notes, and snippets.

@asimoesmcartor
Created November 6, 2017 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asimoesmcartor/3aecb7ea234184754cfc4ecc4fa8da9a to your computer and use it in GitHub Desktop.
Save asimoesmcartor/3aecb7ea234184754cfc4ecc4fa8da9a to your computer and use it in GitHub Desktop.
Donation progress bar
{% 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