diff options
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index ea7aaad0..f6c50496 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -10,7 +10,6 @@ package PublicInbox::WwwStream; use strict; use warnings; use PublicInbox::Hval qw(ascii_html); -use URI; our $TOR_URL = 'https://www.torproject.org/'; our $CODE_URL = 'https://public-inbox.org/'; our $PROJECT = 'public-inbox'; @@ -70,6 +69,12 @@ sub _html_top ($) { "</head><body>". $top . $tip; } +sub code_footer ($) { + my ($env) = @_; + my $u = PublicInbox::Hval::prurl($env, $CODE_URL); + qq(AGPL code for this site: git clone <a\nhref="$u">$u</a> $PROJECT) +} + sub _html_end { my ($self) = @_; my $urls = 'Archives are clonable:'; @@ -134,12 +139,10 @@ EOF $urls .= "\n note: .onion URLs require Tor: "; $urls .= qq[<a\nhref="$TOR_URL">$TOR_URL</a>]; } - my $url = PublicInbox::Hval::prurl($ctx->{env}, $CODE_URL); '<hr><pre>'.join("\n\n", $desc, $urls, - 'AGPL code for this site: '. - qq(git clone <a\nhref="$url">$url</a> $PROJECT) + code_footer($ctx->{env}) ).'</pre></body></html>'; } |