Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-11-23 02:43:33 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-11-23 02:43:33 +0300
commit72df50d34a8d17e0ca66883ffcb36887852dfaa1 (patch)
tree94eeeffde6e707a6428a46340d4ca3b84e892296 /lib
parent8c590df5e77f9fc657137ad7b2f5b3c233f56d73 (diff)
parent34234ee41b47cba8189f7eaec0f6997bf42fc893 (diff)
Merge branch 'image-links' into 'master'
Add links to all images. Fixes #42. See merge request !29
Diffstat (limited to 'lib')
-rw-r--r--lib/helpers_.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/helpers_.rb b/lib/helpers_.rb
index b9a560f0..a136ea99 100644
--- a/lib/helpers_.rb
+++ b/lib/helpers_.rb
@@ -16,4 +16,8 @@ class HTML < Redcarpet::Render::HTML
"<h#{header_level} id='#{anchor}'>#{text} <a class='anchor' href='##{anchor}' title='Permalink'>&para;</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