-<h1>Listing panels</h1>
-
-<table>
- <tr>
- <th>id</th>
- <th>Comic</th>
- <th>bg</th>
- <th>Width</th>
- <th>Height</th>
- <th>Border</th>
- <th>x</th>
- <th>y</th>
- <th>z</th>
- <th>t</th>
- <th>author_id</th>
- <th>updated_at</th>
- <th></th>
- <th></th>
- </tr>
-
+<h1>Listing panels 最近の投稿</h1>
<% @panels.each do |panel| %>
- <tr>
- <td><%= panel.id %></td>
- <td><%= panel.comic_id %></td>
- <td><%= panel.resource_picture_id %></td>
- <td><%= panel.width %></td>
- <td><%= panel.height %></td>
- <td><%= panel.border %></td>
- <td><%= panel.x %></td>
- <td><%= panel.y %></td>
- <td><%= panel.z %></td>
- <td><%= panel.t %></td>
- <td><%= panel.author_id %></td>
- <td><%= panel.updated_at %></td>
- <td><%= link_to 'Show', panel %></td>
- <td>
- <% if author_signed_in? -%>
- <% if panel.own? current_author -%>
- <%= link_to 'Destroy', panel, confirm: 'Are you sure?', method: :delete %>
- <% end -%>
- <% end -%>
- </td>
- </tr>
+ <div>
+ <%= link_to h(panel.comic.title), panel.comic %>t:<%= panel.t %>
+<div class="panel" style="width:<%= panel.width %>px;height:<%= panel.height %>px;overflow:hidden; border:solid black <%= panel.border %>px; background:white;">
+ <% panel.panel_pictures.each do |panel_picture| %>
+ <div id="vPicture<%= panel_picture.id -%>" class="panel_picture" style="position:relative; top:<%= panel_picture.y -%>px; left:<%= panel_picture.x -%>px; z-index:<%= panel_picture.z -%>; ">
+ <img style=" position:absolute; width:<%= panel_picture.width -%>px; height:<%= panel_picture.height -%>px; " src="<%= panel_picture.url -%>">
+ </div>
+ <% end %>
+ <% panel.balloons.each do |balloon| %>
+ <div id="vballoon<%= balloon.id -%>" class="balloon" style="position:relative; top:<%= balloon.y -%>px; left:<%= balloon.x -%>px; z-index:<%= balloon.z -%>; ">
+ <img style=" position:absolute; width:<%= balloon.width -%>px; height:<%= balloon.height -%>px; " src="<%= balloon.system_picture.url -%>">
+ <% balloon.speaches.each do |speach| %>
+ <div style="position:relative; top:<%= speach.y -%>px; left:<%= speach.x -%>px;width:<%= speach.width -%>px; height:<%= speach.height -%>px; top:1px; left:1px; z-index:1; ">
+ <%= h speach.content -%>
+ </div>
+ <% end %>
+ </div>
+ <% end %>
+</div>
+ <%= h panel.author.name %> <%= panel.updated_at %>
+ </div>
<% end %>
-</table>