You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

% layout 'default';
% title 'Imgbin -- View';
% stash 'styles' => 'zerobin';
<h1><%= l('View image') %></h1>
<div>
<div>
<%= link_to l('Upload') => "/imgbin", class => 'zerobin upload' %>&nbsp;
10 years ago
% if (config->{imgbin}->{show_latest}) {
<%= link_to l('Latest images') => "/imgbin/latest", class => 'zerobin latest' %>&nbsp;
10 years ago
% }
</div>
<hr/>
<div>
% my $image = (stash 'image') || {};
% my $style = sprintf "max-width: %dpx;", $config->{imgbin}->{css_maxwidth};
<%= link_to $image->{path} => begin %>
<%= image $image->{path}, style => $style; %>
<% end %>
</div>
<hr/>
<table>
<tr><td><%= l('Dimensions') %></td><td>:</td><td><%= "$image->{width}x$image->{height}" %></td></tr>
<tr><td><%= l('Size') %></td><td>:</td><td><%= sprintf("%.1f kb", $image->{size} / 1024) %></td></tr>
<tr><td><%= l('Name') %></td><td>:</td><td><%= $image->{name} // '-' %></td></tr>
<tr><td><%= l('Comment') %></td><td>:</td><td><%= $image->{comment} // '-' %></td></tr>
</table>
</div>