8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/asciidoctor_diagram_layout/renderer/html_renderer.rb', line 8
def render(root, options = RenderOptions.new)
sb = +""
height_style = options.height ? " min-height:#{options.height};" : ""
wrapper_style = "display:flex; width:#{options.width};#{height_style}" \
" box-sizing:border-box; font-family:sans-serif; overflow:hidden;"
sb << "<div style=\"#{wrapper_style}\">\n"
render_node(root, sb, 1, options)
sb << "</div>\n"
if options.title && !options.title.empty?
"<div class=\"imageblock\">\n<div class=\"content\">\n#{sb}</div>\n" \
"<div class=\"title\">#{options.title}</div>\n</div>"
else
sb
end
end
|