mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-12 23:09:03 +01:00
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
<%
|
|
if @event.event_image
|
|
image = @event.event_image.attachment.medium
|
|
width, height = image.dimensions
|
|
end
|
|
%>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="<%= I18n.locale %>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<!-- Facebook Open Graph -->
|
|
<meta property="og:title" content="<%= @event.title %>"/>
|
|
<meta property="og:description" content="<%= @event.description %>"/>
|
|
<% if @event.event_image %>
|
|
<meta property="og:image" content="<%= root_url+image.url %>"/>
|
|
<meta property="og:image:width" content="<%= width%>" />
|
|
<meta property="og:image:height" content="<%=height%>" />
|
|
<% end %>
|
|
<meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_app_id%>" />
|
|
<meta property="og:url" content="<%= root_url+'#!/events/'+@event.id.to_s %>" />
|
|
|
|
<!-- Twitter Cards-->
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:site" content="<%= ENV['TWITTER_NAME'] %>">
|
|
<meta name="twitter:title" content="<%= @event.title %>">
|
|
<meta name="twitter:description" content="<%= @event.description %>">
|
|
<% if @event.event_image %>
|
|
<meta name="twitter:image" content="<%= root_url+image.url %>">
|
|
<% end %>
|
|
|
|
</head>
|
|
</html> |