OSDN Git Service

0b622fa1569815dab604322adb7e9ace1108d13e
[pettanr/pettanr.git] / app / views / panels / _body.html.erb
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 Balloon %>
7       <div id="vballoon<%= elm.id -%>" class="pettanr-comic-balloon" style="width:<%= elm.width -%>px; height:<%= elm.height -%>px; top:<%= elm.y -%>px; left:<%= elm.x -%>px; z-index:<%= elm.z -%>; ">
8         <img src="<%= elm.system_picture.url -%>">
9         <% elm.speeches.each do |speech| %>
10           <p style="top:<%= speech.y -%>px; left:<%= speech.x -%>px;width:<%= speech.width -%>px; height:<%= speech.height -%>px;">
11             <span><%= h speech.content -%></span>
12           </p>
13         <% end %>
14       </div>
15     <% end ; p elm.class %>
16   <% end %>
17 </div>