diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-11-23 01:52:13 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-11-23 02:31:04 +0300 |
commit | 34234ee41b47cba8189f7eaec0f6997bf42fc893 (patch) | |
tree | ab0b0745796937137e4f3fe4668e7eaf8aecef43 /lib | |
parent | 0917668eccd55fa3f90f6e9c993e72e678172eca (diff) |
Add links to all images.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helpers_.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/helpers_.rb b/lib/helpers_.rb index 7fa9d11f..bf4c615d 100644 --- a/lib/helpers_.rb +++ b/lib/helpers_.rb @@ -15,4 +15,8 @@ class HTML < Redcarpet::Render::HTML "<h#{header_level} id='#{anchor}'>#{text} <a class='anchor' href='##{anchor}' title='Permalink'>¶</a></h#{header_level}>" end + + def image(link, title, alt_text) + %(<a target="_blank" href="#{link}"><img src="#{link}" title="#{title}" alt="#{alt_text}"/></a>) + end end |