From 803914775816f7de5485fa397bad64e1bd404381 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 21 Jul 2016 01:23:02 +0000 Subject: www: label sections and hopefully improve navigation Clearly label "Thread overview" and "Reply instructions" so users can quickly skip stuff they're not interested in. Additionally, note the fact the thread view allows quick navigation within the thread to avoid extra network requests and improve the display for single-message threads. Finally, use
to better-delineate sections of each page. --- lib/PublicInbox/View.pm | 19 ++++++++++++------- lib/PublicInbox/WwwStream.pm | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 49068641..5f99644f 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -61,10 +61,12 @@ sub msg_reply { push @$arg, '/path/to/YOUR_REPLY'; $arg = join(" \\\n ", '', @$arg); <You may reply publically to this message via -plain-text email using any one of the following methods: +
Reply instructions:
+
+You may reply publically to this message via plain-text email
+using any one of the following methods:
 
 * Save the following mbox file, import it into your mail client,
   and reply-to-all from there: index";
-	$skel .= "\n$nr+ messages in thread: (download: ";
-	$skel .= "mbox.gz";
+	$skel .= ", back to index\n\n";
+	$skel .= "Thread overview: ";
+	$skel .= $nr == 1 ? '(only message)' : "$nr+ messages";
+	$skel .= " (download: mbox.gz";
 	$skel .= " / follow: Atom feed)\n";
+	$skel .= "-- links below jump to the message on this page --\n";
 	$ctx->{-upfx} = '../../';
 	$ctx->{cur_level} = 0;
 	$ctx->{dst} = \$skel;
@@ -523,6 +527,7 @@ sub thread_skel {
 			qq(/ Atom feed);
 
 	my $parent = in_reply_to($hdr);
+	$$dst .= "\nThread overview: ";
 	if ($nr <= 1) {
 		if (defined $parent) {
 			$$dst .= "($expand)\n ";
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index bce384b7..bdc8048d 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -80,7 +80,7 @@ sub _html_end {
 			join("\n", map { "\tgit clone --mirror $_" } @urls);
 	}
 	my $url = PublicInbox::Hval::prurl($ctx->{env}, PI_URL);
-	'
'.join("\n",
+	'
'.join("\n",
 		'- ' . $desc,
 		$urls,
 		'Served with public-inbox: '.
-- 
cgit v1.2.3-24-ge0c7