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