1 <div class="pettanr-comic-panel" style="width:<%= panel.width %>px;height:<%= panel.height %>px;border-style: solid;border-width: <%= panel.border %>px;border-color:black; background-color:white;">
2 <% panel.panel_elements.each do |elm| %>
3 <% case elm.class.to_s %>
4 <% when 'PanelPicture' %>
5 <%= tag(:img, elm.opt_img_tag) %>
6 <% when 'SpeechBalloon' %>
7 <% balloon = elm.balloons.first %>
8 <div id="vballoon<%= elm.id -%>" class="pettanr-comic-balloon" style="width:<%= balloon.width -%>px; height:<%= balloon.height -%>px; top:<%= balloon.y -%>px; left:<%= balloon.x -%>px; z-index:<%= elm.z -%>; ">
9 <img src="<%= balloon.system_picture.url -%>" alt="<%= balloon.caption -%>">
10 <% elm.speeches.each do |speech| %>
11 <p style="top:<%= speech.y -%>px; left:<%= speech.x -%>px;width:<%= speech.width -%>px; height:<%= speech.height -%>px;">
12 <span><%= h speech.content -%></span>
16 <% when 'GroundColor' %>
17 <div id="ground-color<%= elm.id -%>" class="pettanr-comic-ground-color" style="width:<%= panel.width -%>px; height:<%= panel.height -%>px; z-index:<%= elm.z -%>; background-color:<%= elm.color.name -%>;">
20 <% when 'PanelColor' %>
21 <div id="panel-color<%= elm.id -%>" class="pettanr-comic-panel-color" style="width:<%= panel.width -%>px; height:<%= panel.height -%>px; z-index:<%= elm.z -%>; background-color:#<%= format("%x", elm.code) -%>;">
24 <% when 'GroundPicture' %>
25 <div id="ground-picture<%= elm.id -%>" class="pettanr-comic-ground-picture" style="width:<%= panel.width -%>px; height:<%= panel.height -%>px; z-index:<%= elm.z -%>; background-image: url(<%= full_url elm.picture.url -%>); ">