Add meta tags for hiding referrer on private asciicast pages

private-asciicasts
Marcin Kulik 10 years ago
parent c45ee93370
commit ae95697a9a

@ -4,4 +4,9 @@ class AsciicastSerializer < ActiveModel::Serializer
attributes :id, :duration, :stdout_frames_url, :snapshot
attribute :terminal_columns, key: :width
attribute :terminal_lines, key: :height
def private?
object.private?
end
end

@ -1,3 +1,10 @@
<% if asciicast.private? %>
<% content_for(:head) do %>
<meta name="robots" content="noindex, nofollow">
<meta name="referrer" content="none">
<% end %>
<% end %>
<div class="player"></div>
<p class="processing-info" style="display: none">

@ -6,5 +6,6 @@ html[lang="en"]
title = page_title
= stylesheet_link_tag 'embed', :media => 'all'
= javascript_include_tag 'embed'
= content_for(:head)
body.iframe
= yield

@ -4,5 +4,6 @@ html[lang="en"]
meta[charset="utf-8"]
= screenshot_javascript_tag
= screenshot_stylesheet_tag
= content_for(:head)
body.screenshot
= yield

Loading…
Cancel
Save