From 82ab998e95e89c13bdcf128e24deef7ca395ad7f Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Tue, 19 Jun 2018 00:43:53 +1000 Subject: [PATCH] * tune view on zerobin --- public/theme/css/default.css | 8 ++++++-- templates/zerobin/view.html.ep | 9 +++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/public/theme/css/default.css b/public/theme/css/default.css index 116756f..4a6a426 100644 --- a/public/theme/css/default.css +++ b/public/theme/css/default.css @@ -139,9 +139,13 @@ textarea#paste { height: 450px; } -div.paste { - padding: 5px; +div.zerobin .paste.plaintext, +div.zerobin .paste.markdown { + border: 1px dashed #EAEAEA; + background-color: #F0F0F0; text-align: justify; + margin: 5px; + padding: 5px; } /* filebin */ diff --git a/templates/zerobin/view.html.ep b/templates/zerobin/view.html.ep index c31b950..78f534d 100644 --- a/templates/zerobin/view.html.ep +++ b/templates/zerobin/view.html.ep @@ -3,18 +3,19 @@ % my $paste = stash('paste') || {}; % my $fname = sprintf '%d.txt', $paste->{created};

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

-
+
<%= link_to l('Create new') => "/zerobin", class => 'btn create' %> <%= link_to l('Download') => "/zerobin/$fname", class => 'btn download', download => $fname %>
-
% if (not $paste->{syntax} or $paste->{syntax} eq 'plaintext') { -%= b(plaintext($paste->{data})); +
<%= b(plaintext($paste->{data})) %>
% } elsif ($paste->{syntax} eq 'markdown') { -%= b(markdown($paste->{data})); +
<%= b(markdown($paste->{data})) %>
% } else { +
<%= tag 'code' => (class => $paste->{syntax}) => $paste->{data}; %>
+
% }