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.

22 lines
791 B

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