* [PATCH 10/11] index: layout fix + title and Atom feed links at top
@ 2015-08-20 2:57 7% ` Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2015-08-20 2:57 UTC (permalink / raw)
To: meta
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 = "<html><head><title>$title</title>" .
"<link\nrel=alternate\ntitle=\"Atom feed\"\n".
"href=\"$atom_url\"\"\ntype=\"application/atom+xml\"/>" .
- '</head><body>' . PublicInbox::View::PRE_WRAP;
+ '</head><body>' . PublicInbox::View::PRE_WRAP .
+ "<b>$title</b> (<a\nhref=\"$atom_url\">Atom feed</a>)\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 .= "<a\nhref=\"t/$mid.html#u\"><b>$subj</b></a>\n- ";
+ $$dst .= "\n<a\nhref=\"t/$mid.html#u\"><b>$subj</b></a>\n- ";
$ts = POSIX::strftime('%Y-%m-%d %H:%M', gmtime($ts));
if ($n == 1) {
$$dst .= "created by $u @ $ts UTC\n"
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-08-20 2:57 [PATCH 01/11] feed: remove threading from index Eric Wong
2015-08-20 2:57 7% ` [PATCH 10/11] index: layout fix + title and Atom feed links at top Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).