summaryrefslogtreecommitdiff
path: root/build.rb
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-06-08 17:17:06 +0200
committerJulian T <julian@jtle.dk>2020-06-08 17:17:06 +0200
commit27ac4613168f13742fad5c6c62473f25539fceab (patch)
treee3e8489b5828e5b00b8507be627728799979f9db /build.rb
parent1ab44cebeb4a5b978d497fe44e64322093bfe715 (diff)
Added gitingore and changes imginfo scheme
Diffstat (limited to 'build.rb')
-rwxr-xr-xbuild.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/build.rb b/build.rb
index 608c6aa..a617fc0 100755
--- a/build.rb
+++ b/build.rb
@@ -79,7 +79,7 @@ files = {}
puts defs
-defs["groups"].each do |key, value|
+defs["groups"].each do |value|
# For each image inside group
forImgs(value["imgs"]) do |img|
@@ -99,8 +99,11 @@ File.open(File.join(options[:path], "index.html"), "w") do |file|
# Print preample
file.write(template[0])
- defs["groups"].each do |key, value|
- file.puts "<h2>#{key}</h2>"
+ defs["groups"].each do |value|
+ file.puts "<div class=\"group\">"
+ if value[:title]
+ file.puts "<h2>#{value[:title]}</h2>"
+ end
forImgs(value["imgs"]) do |img|
href = options[:base]
# If href is given add a filename at the end
@@ -114,7 +117,7 @@ File.open(File.join(options[:path], "index.html"), "w") do |file|
if value["what"]
file.puts "<p>#{value["what"]}"
end
-
+ file.puts "</div>"
end
if options[:commit]