From 69ed3f6087171f460e7aa4398b1eaac690a53033 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Aug 2015 02:43:20 +0000 Subject: index: layout fix + title and Atom feed links at top Add some spacing between topics to improve readability when scanning or in case a subject gets too long. The title and Atom feed may not be highly-visible otherwise. While we're at it, use the proper "Atom feed" terminology since some folks may not understand just what "atom" means. --- lib/PublicInbox/Feed.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 40dfb451..2e352cba 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -64,7 +64,8 @@ sub generate_html_index { my $html = "$title" . "" . - '' . PublicInbox::View::PRE_WRAP; + '' . PublicInbox::View::PRE_WRAP . + "$title (Atom feed)\n"; my $state; my $git = PublicInbox::GitCatFile->new($ctx->{git_dir}); @@ -329,14 +330,14 @@ sub add_topic { sub dump_topics { my ($dst, $topics) = @_; my ($order, $subjs) = @$topics; - $$dst .= '[No recent topics]' unless (scalar @$order); + $$dst .= "\n[No recent topics]" unless (scalar @$order); while (defined(my $info = shift @$order)) { my ($mid, $ts, $u, $subj) = @$info; my $n = delete $subjs->{$subj}; $mid = PublicInbox::Hval->new($mid)->as_href; $subj = PublicInbox::Hval->new($subj)->as_html; $u = PublicInbox::Hval->new($u)->as_html; - $$dst .= "$subj\n- "; + $$dst .= "\n$subj\n- "; $ts = POSIX::strftime('%Y-%m-%d %H:%M', gmtime($ts)); if ($n == 1) { $$dst .= "created by $u @ $ts UTC\n" -- cgit v1.2.3-24-ge0c7