X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStream.pm;h=29395f40909661ec2231304677a4d33a5dbbae35;hb=b7c4bca292fb1f7ac4d73ff96b2ce95185b4fc66;hp=bdc8048d5ef1cc6050d6a4903b0f3b308bfd7101;hpb=803914775816f7de5485fa397bad64e1bd404381;p=public-inbox.git diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index bdc8048d..29395f40 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -7,7 +7,9 @@ use strict; use warnings; use PublicInbox::Hval qw(ascii_html); use URI; -use constant PI_URL => 'https://public-inbox.org/'; +our $TOR_URL = 'https://www.torproject.org/'; +our $CODE_URL = 'https://public-inbox.org/'; +our $PROJECT = 'public-inbox'; sub close {} @@ -31,11 +33,12 @@ sub _html_top ($) { my $upfx = $ctx->{-upfx} || ''; my $atom = $ctx->{-atom} || $upfx.'new.atom'; my $tip = $ctx->{-html_tip} || ''; - my $top = "$desc (Atom feed)"; + my $top = "$desc"; + my $links = "Atom feed"; if ($obj->search) { my $q_val = $ctx->{-q_value_html}; if (defined $q_val && $q_val ne '') { - $q_val = qq(\nvalue="$q_val" ); + $q_val = qq(\nvalue="$q_val"); } else { $q_val = ''; } @@ -43,12 +46,13 @@ sub _html_top ($) { my $extra = $ctx->{-extra_form_html} || ''; my $action = $upfx eq '' ? './' : $upfx; $top = qq{
} } else { - $top = '' . $top . ''; + $top = '
' . $top . "\n" . $links . ''; } "
'.join("\n", - '- ' . $desc, + + if ($need_tor) { + $urls .= "\n note: .onion URLs require Tor: "; + $urls .= qq[$TOR_URL]; + } + my $url = PublicInbox::Hval::prurl($ctx->{env}, $CODE_URL); + ''.join("\n\n", + $desc, $urls, - 'Served with public-inbox: '. - qq(git clone $url public-inbox), + 'Code for this site: '. + qq(git clone $url $PROJECT) ).''; }