small fixes

This commit is contained in:
Angus McLeod 2018-09-30 11:23:05 +10:00
parent 02e3438a9c
commit a353eed1c3
3 changed files with 16 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{{#if siteSettings.discourse_donations_cause_category}}
<section class='field'>
<label>{{i18n 'discourse_donations.cause.amounts.setting_label'}}</label>
{{input type="checkbox" checked=category.custom_fields.donations_show_amounts}}
<span>{{i18n 'discourse_donations.cause.amounts.setting_label'}}</span>
</section>
<section class='field'>

View File

@ -31,7 +31,7 @@ createWidget('category-header-widget', {
let metadata = [];
if (category.donations_show_amounts) {
if (category.donations_total !== undefined) {
metadata.push(donationDisplay(category.donations_total || 0, 'total'));
if (Discourse.SiteSettings.discourse_donations_cause_month) {
@ -65,7 +65,9 @@ createWidget('category-header-widget', {
}
}))
);
}
if (metadata.length) {
contents.push(h('div.donations-category-metadata', metadata));
}

View File

@ -116,7 +116,7 @@ div.stripe-errors {
.donations-category-contents {
width: 500px;
margin: 0 auto;
padding: 40px 40px 10px;
padding: 30px 40px 10px;
text-align: center;
i {
@ -128,12 +128,21 @@ div.stripe-errors {
text-transform: capitalize;
display: inline;
}
.category-title-description {
font-size: 1.2rem;
padding: 10px 0;
p {
margin: 0;
}
}
}
.donations-category-metadata {
width: 500px;
margin: 0 auto;
padding-bottom: 30px;
padding-bottom: 20px;
display: flex;
justify-content: space-around;
font-size: 1.2rem;
@ -163,7 +172,7 @@ div.stripe-errors {
width: 500px;
margin: 0 auto;
font-size: 1.2rem;
padding-bottom: 40px;
padding-bottom: 30px;
display: flex;
align-items: center;