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.
|
|
|
% layout 'default';
|
|
|
|
% title 'Zerobin -- View';
|
|
|
|
% stash 'styles' => 'hljs';
|
|
|
|
% stash 'scripts' => 'highlight';
|
|
|
|
% my $paste = (stash 'paste') || {};
|
|
|
|
<h1><%= l('View paste') %></h1>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<%= link_to l('Create new') => "/zerobin2", class => 'zerobin create' %>
|
|
|
|
<%= link_to l('Download') => "/zerobin/$paste->{time}.txt", class => 'zerobin download' %>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="paste">
|
|
|
|
% if (not $paste->{syntax} or $paste->{syntax} eq 'plaintext') {
|
|
|
|
%= b(plaintext($paste->{data}));
|
|
|
|
% } elsif ($paste->{syntax} eq 'markdown') {
|
|
|
|
%= b(markdown($paste->{data}));
|
|
|
|
% } else {
|
|
|
|
<pre><%= tag 'code' => (class => $paste->{syntax}) => $paste->{data}; %></pre>
|
|
|
|
% }
|
|
|
|
</div>
|
|
|
|
</div>
|