adds consistency on social media filenames
@@ -53,7 +53,8 @@ If you want to overwrite any image, firstly you need to findout the filename, an
|
|||||||
* logo_email.png
|
* logo_email.png
|
||||||
* logo_header.png
|
* logo_header.png
|
||||||
* map.jpg
|
* map.jpg
|
||||||
* social-media-icon.png
|
* social_media_icon.png
|
||||||
|
* social_media_icon_twitter.png
|
||||||
|
|
||||||
### Views (HTML)
|
### Views (HTML)
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ Si quieres sobreescribir alguna imagen debes primero fijarte el nombre que tiene
|
|||||||
* logo_email.png
|
* logo_email.png
|
||||||
* logo_header.png
|
* logo_header.png
|
||||||
* map.jpg
|
* map.jpg
|
||||||
* social-media-icon.png
|
* social_media_icon.png
|
||||||
|
* social_media_icon_twitter.png
|
||||||
|
|
||||||
### Vistas (HTML)
|
### Vistas (HTML)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ class SiteCustomization::Image < ActiveRecord::Base
|
|||||||
VALID_IMAGES = {
|
VALID_IMAGES = {
|
||||||
"icon_home" => [330, 240],
|
"icon_home" => [330, 240],
|
||||||
"logo_header" => [80, 80],
|
"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]
|
"apple-touch-icon-200" => [200, 200]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<meta name="twitter:site" content="@consul_dev" />
|
<meta name="twitter:site" content="@consul_dev" />
|
||||||
<meta name="twitter:title" content="<%= social_title %>" />
|
<meta name="twitter:title" content="<%= social_title %>" />
|
||||||
<meta name="twitter:description" content="<%= social_description %>" />
|
<meta name="twitter:description" content="<%= social_description %>" />
|
||||||
<meta name="twitter:image" content="<%= image_url local_assigns[:twitter_image_url] || image_path_for('social-media-icon.png') %>" />
|
<meta name="twitter:image" content="<%= image_url local_assigns[:twitter_image_url] || image_path_for('social_media_icon_twitter.png') %>" />
|
||||||
<!-- Facebook OG -->
|
<!-- Facebook OG -->
|
||||||
<meta id="ogtitle" property="og:title" content="<%= social_title %>"/>
|
<meta id="ogtitle" property="og:title" content="<%= social_title %>"/>
|
||||||
<% if setting['url'] %>
|
<% if setting['url'] %>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<meta property="og:type" content="article"/>
|
<meta property="og:type" content="article"/>
|
||||||
<meta id="ogurl" property="og:url" content="<%= social_url %>"/>
|
<meta id="ogurl" property="og:url" content="<%= social_url %>"/>
|
||||||
<meta id="ogimage" property="og:image" content="<%= image_url local_assigns[:og_image_url] || image_path_for('social-media-icon.png') %>"/>
|
<meta id="ogimage" property="og:image" content="<%= image_url local_assigns[:og_image_url] || image_path_for('social_media_icon.png') %>"/>
|
||||||
<meta property="og:site_name" content="<%= setting['org_name'] %>"/>
|
<meta property="og:site_name" content="<%= setting['org_name'] %>"/>
|
||||||
<meta id="ogdescription" property="og:description" content="<%= social_description %>"/>
|
<meta id="ogdescription" property="og:description" content="<%= social_description %>"/>
|
||||||
<meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_key %>"/>
|
<meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_key %>"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.4 KiB |
BIN
public/social_media_icon.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/social_media_icon_twitter.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
@@ -47,16 +47,16 @@ feature "Admin custom images" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
within("tr.social-media-icon") do
|
within("tr.social-media-icon") do
|
||||||
attach_file "site_customization_image_image", "spec/fixtures/files/social-media-icon.png"
|
attach_file "site_customization_image_image", "spec/fixtures/files/social_media_icon.png"
|
||||||
click_button "Update"
|
click_button "Update"
|
||||||
end
|
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"
|
click_link "Delete"
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
BIN
spec/fixtures/files/logo_header.png
vendored
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 1.6 KiB |
BIN
spec/fixtures/files/social-media-icon.png
vendored
|
Before Width: | Height: | Size: 3.3 KiB |
BIN
spec/fixtures/files/social_media_icon.png
vendored
Normal file
|
After Width: | Height: | Size: 3.9 KiB |