Skip to content
Snippets Groups Projects
Commit 381a1eba authored by Chris Lawton's avatar Chris Lawton
Browse files

adding fund box styling

parent 66f2b274
No related branches found
No related tags found
No related merge requests found
{% load wagtailcore_tags %} {% load wagtailcore_tags %}
{% if page.total_funding %} {% if page.total_funding %}
<h2>Funding to date</h2> <div class="fund-box">
{% for funding in page.funding.all %} <h4>Funding to date</h4>
<table> {% for funding in page.funding.all %}
<tr> <div class="fund-box__row">
<td>{{ funding.year }}</td> <span>{{ funding.year }}</span>
<td>${{ funding.value }}</td> <span>${{ funding.value }}</span>
<td>{{ funding.duration }} months</td> <span>{{ funding.duration }} months</span>
<td><a href="{% pageurl funding.source %}">{{ funding.source }}</a></td> </div>
</tr>
</table> <h4 class="heading heading--top-space heading--total-funding">Total Funding: <span>${{ page.total_funding }}</span></h4>
{% endfor %} <a href="{% pageurl funding.source %}">{{ funding.source }}</a>
<p>Total Funding: {{ page.total_funding }}</p> {% endfor %}
</div>
{% endif %} {% endif %}
.fund-box {
padding: 20px 30px;
margin: 1rem 0;
border: 1px solid $color--mid-grey;
@include media-query(tablet-landscape) {
margin: 3rem 0;
}
&__row {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
padding: 0 20px;
margin-bottom: 5px;
background-color: $color--light-grey;
}
}
...@@ -32,4 +32,10 @@ ...@@ -32,4 +32,10 @@
&--top-space { &--top-space {
margin-top: 1rem; margin-top: 1rem;
} }
&--total-funding {
span {
color: $color--purple;
}
}
} }
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
@import 'components/call-to-action'; @import 'components/call-to-action';
@import 'components/form'; @import 'components/form';
@import 'components/heading'; @import 'components/heading';
@import 'components/fund-box';
@import 'components/grid'; @import 'components/grid';
@import 'components/icon'; @import 'components/icon';
@import 'components/input'; @import 'components/input';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment