From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.4 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7615A1F8C2 for ; Thu, 20 Aug 2015 02:57:24 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 10/11] index: layout fix + title and Atom feed links at top Date: Thu, 20 Aug 2015 02:57:22 +0000 Message-Id: <1440039443-27052-10-git-send-email-e@80x24.org> In-Reply-To: <1440039443-27052-1-git-send-email-e@80x24.org> References: <1440039443-27052-1-git-send-email-e@80x24.org> List-Id: 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(-) diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 40dfb45..2e352cb 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" -- EW