diff --git a/CUSTOMIZE_EN.md b/CUSTOMIZE_EN.md index 2e6c52aa0..542d11ee7 100644 --- a/CUSTOMIZE_EN.md +++ b/CUSTOMIZE_EN.md @@ -53,7 +53,8 @@ If you want to overwrite any image, firstly you need to findout the filename, an * logo_email.png * logo_header.png * map.jpg -* social-media-icon.png +* social_media_icon.png +* social_media_icon_twitter.png ### Views (HTML) diff --git a/CUSTOMIZE_ES.md b/CUSTOMIZE_ES.md index 3e9fd188d..e5bea19ad 100644 --- a/CUSTOMIZE_ES.md +++ b/CUSTOMIZE_ES.md @@ -53,7 +53,8 @@ Si quieres sobreescribir alguna imagen debes primero fijarte el nombre que tiene * logo_email.png * logo_header.png * map.jpg -* social-media-icon.png +* social_media_icon.png +* social_media_icon_twitter.png ### Vistas (HTML) diff --git a/app/models/site_customization/image.rb b/app/models/site_customization/image.rb index 5e7f38e4d..e336f6f9a 100644 --- a/app/models/site_customization/image.rb +++ b/app/models/site_customization/image.rb @@ -2,7 +2,8 @@ class SiteCustomization::Image < ActiveRecord::Base VALID_IMAGES = { "icon_home" => [330, 240], "logo_header" => [80, 80], - "social-media-icon" => [200, 200], + "social_media_icon" => [470, 246], + "social_media_icon_twitter" => [246, 246], "apple-touch-icon-200" => [200, 200] } diff --git a/app/views/shared/_social_media_meta_tags.html.erb b/app/views/shared/_social_media_meta_tags.html.erb index c0e6a5e8a..8c1196c96 100644 --- a/app/views/shared/_social_media_meta_tags.html.erb +++ b/app/views/shared/_social_media_meta_tags.html.erb @@ -3,7 +3,7 @@ - + <% if setting['url'] %> @@ -14,7 +14,7 @@ <% end %> - + diff --git a/public/social-media-icon.png b/public/social-media-icon.png deleted file mode 100644 index 512569d48..000000000 Binary files a/public/social-media-icon.png and /dev/null differ diff --git a/public/social_media_icon.png b/public/social_media_icon.png new file mode 100644 index 000000000..8a5503078 Binary files /dev/null and b/public/social_media_icon.png differ diff --git a/public/social_media_icon_twitter.png b/public/social_media_icon_twitter.png new file mode 100644 index 000000000..02c934e95 Binary files /dev/null and b/public/social_media_icon_twitter.png differ diff --git a/spec/features/admin/site_customization/images_spec.rb b/spec/features/admin/site_customization/images_spec.rb index 094ac19bf..6d180fe8e 100644 --- a/spec/features/admin/site_customization/images_spec.rb +++ b/spec/features/admin/site_customization/images_spec.rb @@ -46,17 +46,17 @@ feature "Admin custom images" do click_link "Custom Images" end - within("tr.social-media-icon") do - attach_file "site_customization_image_image", "spec/fixtures/files/social-media-icon.png" + within("tr.social_media_icon") do + attach_file "site_customization_image_image", "spec/fixtures/files/social_media_icon.png" click_button "Update" end - expect(page).to have_css("img[src*='social-media-icon.png']") + expect(page).to have_css("img[src*='social_media_icon.png']") - within("tr.social-media-icon") do + within("tr.social_media_icon") do click_link "Delete" end - expect(page).to_not have_css("img[src*='social-media-icon.png']") + expect(page).to_not have_css("img[src*='social_media_icon.png']") end end diff --git a/spec/fixtures/files/logo_header.png b/spec/fixtures/files/logo_header.png index 5f5355574..ef5c4f6ff 100644 Binary files a/spec/fixtures/files/logo_header.png and b/spec/fixtures/files/logo_header.png differ diff --git a/spec/fixtures/files/social-media-icon.png b/spec/fixtures/files/social-media-icon.png deleted file mode 100644 index fcd00e212..000000000 Binary files a/spec/fixtures/files/social-media-icon.png and /dev/null differ diff --git a/spec/fixtures/files/social_media_icon.png b/spec/fixtures/files/social_media_icon.png new file mode 100644 index 000000000..8a5503078 Binary files /dev/null and b/spec/fixtures/files/social_media_icon.png differ