diff --git a/public/css/zerobin.css b/public/css/zerobin.css index 12de338..c950707 100644 --- a/public/css/zerobin.css +++ b/public/css/zerobin.css @@ -15,6 +15,11 @@ pre code { background-color: #777777; } +div.paste { + padding: 20px; + border: 1px dotted #777777; +} + /* imgbin */ div.img-preview { margin: 5px; diff --git a/templates/zerobin/view.html.ep b/templates/zerobin/view.html.ep index 44b1073..50e383d 100644 --- a/templates/zerobin/view.html.ep +++ b/templates/zerobin/view.html.ep @@ -10,10 +10,14 @@
+
% my $paste = (stash 'paste') || {}; -% my $syntax = $paste->{syntax}; -% my @opts = ($syntax and $syntax ne 'auto') ? (class => $syntax) : (); -
-
<%= tag 'code' => (@opts) => $paste->{data}; %>
+% 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}; %>
+% }