1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-30 11:24:21 +01:00
fab-manager/app/views/social_bot/project.html.erb

26 lines
1.1 KiB
Plaintext

<% image = @project.project_image.attachment.medium %>
<% width, height = image.dimensions %>
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
<meta charset="utf-8">
<!-- Facebook Open Graph -->
<meta property="og:title" content="<%= @project.name %>"/>
<meta property="og:description" content="<%= strip_tags(@project.description) %>"/>
<meta property="og:image" content="<%= root_url+image.url %>"/>
<meta property="og:image:width" content="<%= width%>" />
<meta property="og:image:height" content="<%=height%>" />
<meta property="fb:app_id" content="<%= Rails.application.secrets.facebook_app_id%>" />
<meta property="og:url" content="<%= root_url+'#!/projects/'+@project.slug %>" />
<!-- Twitter Cards-->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="<%= ENV['TWITTER_NAME'] %>">
<meta name="twitter:title" content="<%= @project.name %>">
<meta name="twitter:description" content="<%= strip_tags(@project.description) %>">
<meta name="twitter:image" content="<%= root_url+image.url %>">
</head>
</html>