]> www.fi.muni.cz Git - paste.git/blobdiff - paste.pl
CSS in case Javascript is disabled
[paste.git] / paste.pl
index 8103a94b435860acdd76c9239608dfec7999a978..285c34940b700ec8da83311e73197d6a05f3fcdb 100755 (executable)
--- a/paste.pl
+++ b/paste.pl
@@ -58,7 +58,9 @@ get '/<filename>.<ext>'
 
        $c->stash(mtime => POSIX::strftime('%Y-%m-%d %H:%M:%S',
                localtime($stat->mtime)));
-       $c->stash(file_content => $file->slurp);
+       my $content = $file->slurp;
+       $content = Encode::decode('utf-8', $content);
+       $c->stash(file_content => $content);
        my $lang = $c->param('ext');
 
        $c->stash(language => "language-$lang");
@@ -164,9 +166,11 @@ __DATA__
         border-radius: .4rem;
       }
       pre code {
-        padding: 0;
+        padding: 1em;
         margin-left: 0;
         margin-right: 0;
+        background: black;
+        color: #aaa;
       }
       div.footer {
         color: #999;