Open image link in new tab

The screenshot has "play button" which tricks people to start playback.
In most cases they don't want to leave the current page, so opening
asciicast link in a new tab seems like the best solution.
This commit is contained in:
Marcin Kulik 2015-03-31 15:39:34 +00:00
parent 875112caac
commit 4747091764

View File

@ -62,7 +62,7 @@ class AsciicastPagePresenter
img_src = routes.asciicast_url(asciicast, format: :png)
url = routes.asciicast_url(asciicast)
width = %{width="#{asciicast.image_width}"} if asciicast.image_width
%(<a href="#{url}"><img src="#{img_src}" #{width}/></a>)
%(<a href="#{url}" target="_blank"><img src="#{img_src}" #{width}/></a>)
end
def embed_markdown_link