mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 02:42:10 +00:00
done demo checklist
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 101 KiB |
@@ -6,4 +6,8 @@ class ApplicationController < ActionController::Base
|
||||
def after_sign_in_path_for(resource)
|
||||
contacts_path
|
||||
end
|
||||
|
||||
def default_url_options
|
||||
{ host: ENV["HOST"] || "localhost:3000" }
|
||||
end
|
||||
end
|
||||
|
||||
15
app/helpers/meta_tags_helper.rb
Normal file
15
app/helpers/meta_tags_helper.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module MetaTagsHelper
|
||||
def meta_title
|
||||
content_for?(:meta_title) ? content_for(:meta_title) : DEFAULT_META["meta_title"]
|
||||
end
|
||||
|
||||
def meta_description
|
||||
content_for?(:meta_description) ? content_for(:meta_description) : DEFAULT_META["meta_description"]
|
||||
end
|
||||
|
||||
def meta_image
|
||||
meta_image = (content_for?(:meta_image) ? content_for(:meta_image) : DEFAULT_META["meta_image"])
|
||||
# little twist to make it work equally with an asset or a url
|
||||
meta_image.starts_with?("http") ? meta_image : image_url(meta_image)
|
||||
end
|
||||
end
|
||||
@@ -3,12 +3,18 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<%= favicon_link_tag 'favicon.ico' %> <!-- Need a favicon to change picture in title bar -->
|
||||
<title>Polyglot</title>
|
||||
<%= favicon_link_tag 'favicon.ico' %> <!-- Need a favicon to change picture in title bar -->
|
||||
<title>Polyglot - Live Translation</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= action_cable_meta_tag %>
|
||||
<%= stylesheet_link_tag 'application', media: 'all' %>
|
||||
<%#= stylesheet_pack_tag 'application', media: 'all' %> <!-- Uncomment if you import CSS in app/javascript/packs/application.js -->
|
||||
<meta property="og:title" content="<%= meta_title %>" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= request.original_url %>" />
|
||||
<meta property="og:image" content="<%= meta_image %>" />
|
||||
<meta property="og:description" content="<%= meta_description %>" />
|
||||
<meta property="og:site_name" content="<%= meta_title %>" />
|
||||
</head>
|
||||
<body>
|
||||
<%= render 'shared/navbar' unless params["action"] == "home" || params["action"] == "new" || params["action"] == "call" %>
|
||||
|
||||
Reference in New Issue
Block a user