% layout 'default';
% title 'Zerobin -- View';
% my $paste = stash('paste') || {};
% my $fname = sprintf '%d.txt', $paste->{created};
<%= link_to l('Create new') => "/zerobin", class => 'zerobin create' %>
<%= link_to l('Download') => "/zerobin/$fname", class => 'zerobin download', download => $fname %>
% if (not $paste->{syntax} or $paste->{syntax} eq 'plaintext') {
%= b(plaintext($paste->{data}));
% } elsif ($paste->{syntax} eq 'markdown') {
%= b(markdown($paste->{data}));
% } else {
<%= tag 'code' => (class => $paste->{syntax}) => $paste->{data}; %>
% }