about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-12-25 11:48:27 +0000
committerEric Wong <e@80x24.org>2015-12-25 12:05:50 +0000
commit398e29344ecc43548a7d3998bb5d2fcee62d66cd (patch)
treefbeac65ecb0d542ed8341d442e85b0933a4ecf4a /lib/PublicInbox/Feed.pm
parenta5409589fe53734ed073dddb15f0a8033052986b (diff)
downloadpublic-inbox-398e29344ecc43548a7d3998bb5d2fcee62d66cd.tar.gz
view: favor whitespace wrap in <head>
If we bite the bullet and rely on inline CSS, we might as well
only specify it once per page instead of inline in every <pre>
tag which may handle UGC.  So this actually saves us a small
amount of bandwith on most pages which have multiple <pre>
start tags.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r--lib/PublicInbox/Feed.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 150bea03..7ebc0505 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -128,18 +128,18 @@ sub emit_html_index {
         my $top = "<b>$title</b> (<a\nhref=\"$atom_url\">Atom feed</a>)";
 
         if ($srch) {
-                $top = qq{<form\naction=""><tt>$top} .
+                $top = qq{<form\naction=""><pre>$top} .
                           qq{ <input\nname=q\ntype=text />} .
                           qq{<input\ntype=submit\nvalue=search />} .
-                          qq{</tt></form>} .
-                          PublicInbox::Hval::PRE;
+                          q{</pre></form><pre>}
         } else {
-                $top = PublicInbox::Hval::PRE . $top . "\n";
+                $top = '<pre>' . $top . "\n";
         }
 
         $fh->write("<html><head><title>$title</title>" .
                    "<link\nrel=alternate\ntitle=\"Atom feed\"\n".
                    "href=\"$atom_url\"\ntype=\"application/atom+xml\"/>" .
+                   PublicInbox::Hval::STYLE .
                    "</head><body>$top");
 
         # if the 'r' query parameter is given, it is a legacy permalink