aboutsummaryrefslogtreecommitdiff
path: root/cgi/whisky-shelf.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/whisky-shelf.cgi')
-rw-r--r--cgi/whisky-shelf.cgi7
1 files changed, 3 insertions, 4 deletions
diff --git a/cgi/whisky-shelf.cgi b/cgi/whisky-shelf.cgi
index bae8acf..149dd70 100644
--- a/cgi/whisky-shelf.cgi
+++ b/cgi/whisky-shelf.cgi
@@ -2,10 +2,9 @@ require "json"
def shelf_contents(data)
data.map { |bottle|
- $cgi.div(class: "bottle") {
+ $cgi.div {
$cgi.h3 { bottle["name"] } +
- $cgi.img(width: "300px",
- height: "500px",
+ $cgi.img(class: "bottle",
src: "shelf/#{bottle["image"]}")
}
}.join
@@ -16,7 +15,7 @@ data = JSON.parse(File.read("../inc/shelf.json"))
$page =
$cgi.div {
$cgi.h2 { "What's on my shelf?" } +
- $cgi.div { shelf_contents(data) }
+ $cgi.div(class: "shelf") { shelf_contents(data) }
}
# vim: set filetype=ruby: