diff --git a/index.haml b/index.haml
@@ -8,7 +8,7 @@
%main
%h1 TikZ Gallery
- %p This is a gallery with all of the TikZ drawings I've ever used on lectures of mine. I tried to minimize the amount of dependencies of each drawing, but there are still a feel of them:
+ %p This is a gallery with all of the TikZ drawings I've ever used on lectures of mine. I tried to minimize the amount of dependencies of each drawing, but there are still a feel of them:
.titled-block
%h1 Packages required
@@ -40,14 +40,25 @@
%p Feel free to modify any of the files in here and redistribute them however you like (under the terms of the GPLv3 license) 😎️
#gallery(role="feed")
- - for file in Dir["images/*.tikz"].sort
+ - for file in Dir["images/*.tikz", "images/*.eps", "images/*.jpeg", "images/*.jpg", "images/*.png"].sort
- filename = file.gsub "images/", ""
- - filepath = file.gsub "images/", "/tikz/"
- - svg_src = "/" + file.gsub(".tikz", ".svg")
+ - case file
+ - when /\.eps$/
+ - filepath = file.gsub "images/", "/eps/"
+ - img_scr = "/" + file.gsub(".eps", ".svg")
+ - when /\.tikz$/
+ - filepath = file.gsub "images/", "/tikz/"
+ - img_scr = "/" + file.gsub(".tikz", ".svg")
+ - when /\.jpg$/, /\.jpeg$/
+ - filepath = file.gsub "images/", "/jpg/"
+ - img_scr = "/" + file.gsub(".jpeg", ".jpg")
+ - when /\.png$/
+ - filepath = file.gsub "images/", "/png/"
+ - img_scr = "/" + file.gsub(".png", ".jpg")
.tikz(role="article")
.img-container{:"aria-label" => filename}
- %img{:src => svg_src, :alt => filename}
+ %img{:src => img_scr, :alt => filename}
%a{:href => filepath}&=filename
= File.read "_includes/footer.html"