% layout 'default'; % title 'Zerobin -- View'; % stash 'styles' => 'hljs'; % stash 'scripts' => 'highlight'; % my $paste = (stash 'paste') || {};

<%= l('View paste') %>

<%= link_to l('Create new') => "/zerobin2", class => 'zerobin create' %> <%= link_to l('Download') => "/zerobin/$paste->{time}.txt", class => 'zerobin download' %>

% 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}; %>
% }