diff options
author | Eric Wong <e@80x24.org> | 2014-05-06 19:44:43 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-05-07 01:35:30 +0000 |
commit | 98c3b0f53ffbdbf61cc25f6c3678090eaa54a799 (patch) | |
tree | d4876fea05c62a7de98478f5e0a58e40bd816006 /lib/PublicInbox/Feed.pm | |
parent | fa243b4ed7c56b9e4ac5ef6745caf4d35e9b5b28 (diff) | |
download | public-inbox-98c3b0f53ffbdbf61cc25f6c3678090eaa54a799.tar.gz |
consistently whitespace wrap on <pre> sections
Horizontal scrolling is a usability problem for GUI browsers, so help them avoid it. I love GUI users, really! :)
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r-- | lib/PublicInbox/Feed.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index e9989e41..0104a6ba 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -11,6 +11,7 @@ use PublicInbox::GitCatFile; use constant { DATEFMT => '%Y-%m-%dT%H:%M:%SZ', # atom standard MAX_PER_PAGE => 25, # this needs to be tunable + PRE_WRAP => '<pre style="white-space:pre-wrap">', }; # main function @@ -75,7 +76,7 @@ sub generate_html_index { my $html = "<html><head><title>$title</title>" . '<link rel="alternate" title="Atom feed" href="' . $feed_opts->{atomurl} . '" type="application/atom+xml"/>' . - '</head><body><pre>'; + '</head><body>' . PRE_WRAP; # sort by date, most recent at top $th->order(sub { @@ -91,7 +92,7 @@ sub generate_html_index { my $footer = nav_footer($args->{cgi}, $last, $feed_opts); my $list_footer = $args->{footer}; $footer .= "\n" . $list_footer if ($footer && $list_footer); - $footer = "<hr /><pre>$footer</pre>" if $footer; + $footer = "<hr />" . PRE_WRAP . "$footer</pre>" if $footer; $html . "</pre>$footer</html>"; } |