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 01:52:13 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-11-23 02:31:04 +0300
commit34234ee41b47cba8189f7eaec0f6997bf42fc893 (patch)
treeab0b0745796937137e4f3fe4668e7eaf8aecef43 /lib
parent0917668eccd55fa3f90f6e9c993e72e678172eca (diff)
Add links to all images.
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 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'>&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