Sha256: 9ae8272911b1a4f84c0ad06591b7c8ca49338be5feb83b9679fb91152b74b308

Contents?: true

Size: 1.66 KB

Versions: 4

Compression:

Stored size: 1.66 KB

Contents

<html>
  <head>
    <style type="text/css">
      * {
        font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 
        font-weight: 300;
      }
      .language {
        
      }
      .deviceName {
        padding-top: 20px;
        font-size: 30px;
      }
      .screenshot {
        cursor: pointer;
        border: 1px #EEE solid;
      }
      td {
        text-align: center;
      }
    </style>
  </head>
  <body>
    <% divide_size_by = 5.0 %>
    <% max_width = 180 %>


    <% @data.each do |language, content| %>
      <h1 class="language"><%= language %></h1>
      <hr />
      <table>
        <% content.each do |device_name, screens| %>
          <th colspan="<%= screens.count %>">
            <h2 class="deviceName">
              <%= device_name %>
            </h2>
          </th>
          <tr>
            <% screens.each do |screen_path| %>
              <% next if screen_path.include?"_framed.png" %>
              <td>
                <% screen_size = FastImage.size(File.join(SnapshotConfig.shared_instance.screenshots_path, screen_path)) %>
                <% width = ((screen_size[0] / divide_size_by).round rescue 0) %>
                <% width = [width, max_width].min %>
                <% style = (width > 0 ? "width: #{width}px;" : '') %>
                <a href="<%= screen_path %>" target="_blank">
                  <img class="screenshot" 
                         src="<%= screen_path %>",
                       style="<%= style %>" />
                </a>
              </td>
            <% end %>
          </tr>
        <% end %>
      </table>
    <% end %>
  </body>
</head>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
snapshot-0.4.12 lib/snapshot/page.html.erb
snapshot-0.4.11 lib/snapshot/page.html.erb
snapshot-0.4.10 lib/snapshot/page.html.erb
snapshot-0.4.9 lib/snapshot/page.html.erb