2016-10-03 21:56:08 +02:00
|
|
|
require 'uri'
|
|
|
|
module ProjectsHelper
|
|
|
|
def all_projects
|
|
|
|
@items.find_all('/projects/*')
|
|
|
|
end
|
2016-10-29 21:49:58 +02:00
|
|
|
# Inline a svg file.
|
|
|
|
def svg(name)
|
|
|
|
File.open("content/assets/images/#{name}.svg", "rb") do |file|
|
|
|
|
"<div>" + file.read + "</div>"
|
|
|
|
end
|
|
|
|
end
|
2016-10-03 21:56:08 +02:00
|
|
|
end
|