about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwListing.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-18 11:41:02 +0000
committerEric Wong <e@80x24.org>2021-08-26 12:26:53 +0000
commit26c635060dcae35feae836b02a18a6a11e408312 (patch)
tree8677abea13ea58af2d811f8c4e43e39f4bc950f4 /lib/PublicInbox/WwwListing.pm
parent21af30073e105a118d058add76e42e2819213858 (diff)
downloadpublic-inbox-26c635060dcae35feae836b02a18a6a11e408312.tar.gz
Since CSS can be overridden by a static webserver on a per-inbox
basis, we need a similar pattern to deal with the instance-wide
WwwListing HTML.  "/+/" probably won't conflict with any current
nor future public inbox names.

I don't think it'll cause problems with common linkifiers or URL
extractors, either (and it's unlikely anybody would want to
share URLs of just the CSS in a plain text(-like) format).
Diffstat (limited to 'lib/PublicInbox/WwwListing.pm')
-rw-r--r--lib/PublicInbox/WwwListing.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm
index 98a69986..a31aa4ca 100644
--- a/lib/PublicInbox/WwwListing.pm
+++ b/lib/PublicInbox/WwwListing.pm
@@ -190,9 +190,9 @@ sub psgi_triple {
         my $h = [ 'Content-Type', 'text/html; charset=UTF-8',
                         'Content-Length', undef ];
         my $gzf = gzf_maybe($h, $ctx->{env});
-        $gzf->zmore('<html><head><title>' .
-                                'public-inbox listing</title>' .
-                                '</head><body>');
+        $gzf->zmore('<html><head><title>public-inbox listing</title>' .
+                        $ctx->{www}->style('+/') .
+                        '</head><body>');
         my $code = 404;
         if (my $list = delete $ctx->{-list}) {
                 my $mset = delete $ctx->{-mset};