From 3167a53da8b838c4e6d6d532a0ecce4d50ce6bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasia=20Jarmo=C5=82kowicz?= Date: Wed, 30 May 2018 17:35:37 +0200 Subject: [PATCH] Style banner uploading, show banner for all campaings --- .../common/image_uploader.css.scss | 10 ++++ app/views/campaigns/_settings_modal.html.erb | 47 ++++++++++--------- .../components/_upload_banner_image.html.erb | 4 +- 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/app/assets/stylesheets/common/image_uploader.css.scss b/app/assets/stylesheets/common/image_uploader.css.scss index 7956c881..be673d96 100644 --- a/app/assets/stylesheets/common/image_uploader.css.scss +++ b/app/assets/stylesheets/common/image_uploader.css.scss @@ -19,6 +19,11 @@ width: 192px; } +.image-upload--banner { + width: 100%; + height: auto; +} + .image-upload span { margin-top: 30px; padding: 5px; @@ -28,6 +33,11 @@ @include basicShadow; } +.image-upload--banner span { + margin-top: 30px; + margin-bottom: 30px; +} + .image-upload--large span { margin-top: 60px; } diff --git a/app/views/campaigns/_settings_modal.html.erb b/app/views/campaigns/_settings_modal.html.erb index 00a6a8be..a8a80de0 100644 --- a/app/views/campaigns/_settings_modal.html.erb +++ b/app/views/campaigns/_settings_modal.html.erb @@ -93,32 +93,35 @@
-
- <% if @nonprofit.custom_layout %> -
- -

Custom image at the very top of the campaign page

- <% if @campaign.banner_image_url.present? %> -
- - Edit -
- <% else %> - - - Add Image - - <% end %> -
- <% end %> - +
- -

Use it to suggest a good, pre-filled reason for campaigners

- + +

Custom image at the very top of the campaign page

+ <% if @campaign.banner_image_url.present? %> +
+ + Edit +
+ <% else %> + + + Add Image + + <% end %>
+ <% if @campaign.parent_campaign.blank? %> +
+
+
+ +

Use it to suggest a good, pre-filled reason for campaigners

+ +
+
+ <% end %> +
diff --git a/app/views/components/_upload_banner_image.html.erb b/app/views/components/_upload_banner_image.html.erb index 39eeec10..b21bb7d2 100644 --- a/app/views/components/_upload_banner_image.html.erb +++ b/app/views/components/_upload_banner_image.html.erb @@ -7,7 +7,7 @@

Select and upload a banner image for this page.

For best results, the image should be 1000px by 120px in size.

-
)'> +
)'> Select
@@ -15,7 +15,7 @@

-
+