From 26c635060dcae35feae836b02a18a6a11e408312 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 18 Aug 2021 11:41:02 +0000 Subject: wwwlisting: support global CSS in HTML view 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). --- lib/PublicInbox/WwwListing.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/WwwListing.pm') 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('' . - 'public-inbox listing' . - ''); + $gzf->zmore('public-inbox listing' . + $ctx->{www}->style('+/') . + ''); my $code = 404; if (my $list = delete $ctx->{-list}) { my $mset = delete $ctx->{-mset}; -- cgit v1.2.3-24-ge0c7