From 19f197e780eccd70877c5417f69453b48bbf9f2a Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 2 Feb 2018 13:43:20 +0800 Subject: [PATCH] Add page description setting --- .../discourse/templates/donate.hbs | 7 +++++-- assets/stylesheets/discourse-donations.css | 20 ++++++++++++++----- config/locales/client.en.yml | 2 ++ config/settings.yml | 3 +++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/assets/javascripts/discourse/templates/donate.hbs b/assets/javascripts/discourse/templates/donate.hbs index 3533098..0dccb22 100644 --- a/assets/javascripts/discourse/templates/donate.hbs +++ b/assets/javascripts/discourse/templates/donate.hbs @@ -1,4 +1,7 @@ -

{{i18n 'discourse_donations.title'}}

-
+

{{i18n 'discourse_donations.title' site_name=siteSettings.title}}

+
+ {{cook-text siteSettings.discourse_donations_page_description}} +
+
{{stripe-card}}
diff --git a/assets/stylesheets/discourse-donations.css b/assets/stylesheets/discourse-donations.css index f121d33..cba7fdb 100644 --- a/assets/stylesheets/discourse-donations.css +++ b/assets/stylesheets/discourse-donations.css @@ -1,7 +1,17 @@ div.stripe-errors { - border: 1px solid #c33; - border-radius: 5px; - color: #600; - background-color: #fdd; - padding: 5px 10px; + border: 1px solid #c33; + border-radius: 5px; + color: #600; + background-color: #fdd; + padding: 5px 10px; +} + +.donations-page-description { + max-width: 700px; + font-size: 1.1em; + line-height: 24px; +} + +.donations-page-payment { + padding-top: 60px; } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 2dfa97c..ecebbc2 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -11,6 +11,8 @@ en: discourse_donations_billing_address: "Collect billing address" discourse_donations_reward_badge_name: "Grant this badge to user when a payment is successful" discourse_donations_reward_group_name: "Add the user to this group when a payment is successful" + discourse_donations_page_description: "Text to be added to /donate page. Markdown is supported." + js: discourse_donations: title: Donate diff --git a/config/settings.yml b/config/settings.yml index bc21ebd..ff65a05 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -32,3 +32,6 @@ plugins: discourse_donations_reward_group_name: client: false default: 'Donation' + discourse_donations_page_description: + client: true + default: ''