13 if ! Dir.exist?(outputDir)
17 open(outputDir + '/index.html', 'w') do |fd|
20 fd.puts ' <meta charset="utf-8"/>'
21 fd.puts ' <title>Books</title>'
24 fd.puts ' display: inline-block;'
25 fd.puts ' width: 400px;'
26 fd.puts ' margin: 10px;'
27 fd.puts ' border 3px solid #73ad21;'
29 fd.puts 'span.popup { }'
30 fd.puts 'span.popup:hover {text-decoration: none; background: #cfffff; z-index: 6; }'
31 fd.puts 'span.popup span {display: none; position: absolute; '
32 fd.puts ' margin: 4px 0 0 0px; padding: 3px 3px 3px 3px;'
33 fd.puts ' border-style:solid; border-color:black; border-width:1px;}'
34 fd.puts 'span.popup:hover span {display: block; margin: 20px 0 0 0px; background: #ffffaf; z-index:6;}'
43 (path, mimeType) = book.cover.writeImage(outputDir, 'image' + imageCount.to_s)
44 image = '<img height="200px" src="' + path + '"/>'
46 image = '(No cover image)'
49 fd.puts ' <div><table>'
50 fd.puts ' <tr><td><a href="' + book.path + '">' + image + '</a></td>'
52 heading = book.heading()
53 description = book.description()
55 fd.puts ' <td><span class="popup">' + heading + '<span><p>' + heading + '</p><p>' + description + '</p></span></span></td></tr>'
57 fd.puts ' <td>' + heading + '</td></tr>'
60 fd.puts ' </table></div>'