* [PATCH] searchview: add "rel=next" and "rel=prev" here, too
@ 2016-04-25 1:11 6% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-04-25 1:11 UTC (permalink / raw)
To: meta
ref: https://www.w3.org/TR/html/links.html#sequential-link-types
Followup-to: c4183f56aab6 ("www: add rel=next and rel=prev navigation hints")
---
lib/PublicInbox/SearchView.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index e94a1df..41d3200 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -126,13 +126,13 @@ sub search_nav_bot {
if ($n < $total) {
my $qs = $q->qs_html(o => $n);
- $rv .= qq{, <a\nhref="?$qs">next</a>}
+ $rv .= qq{, <a\nhref="?$qs"\nrel=next>next</a>}
}
if ($o > 0) {
$rv .= $n < $total ? '/' : ', ';
my $p = $o - $LIM;
my $qs = $q->qs_html(o => ($p > 0 ? $p : 0));
- $rv .= qq{<a\nhref="?$qs">prev</a>};
+ $rv .= qq{<a\nhref="?$qs"\nrel=prev>prev</a>};
}
$rv;
}
--
EW
^ permalink raw reply related [relevance 6%]
* [PATCH] www: add rel=next and rel=prev navigation hints
@ 2016-04-25 1:03 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-04-25 1:03 UTC (permalink / raw)
To: meta
This can makes navigation easier with some browsers or
or browser extensions.
ref: https://www.w3.org/TR/html/links.html#sequential-link-types
---
lib/PublicInbox/Feed.pm | 2 +-
lib/PublicInbox/View.pm | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 096bff9..d433726 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -185,7 +185,7 @@ sub nav_footer {
my $anchor = $state->{anchor_idx};
if ($last) {
- $next = qq!<a\nhref="?$param=$last">next</a>!;
+ $next = qq!<a\nhref="?$param=$last"\nrel=next>next</a>!;
}
if ($old_r) {
$head = $cgi->path_info;
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 177a1a6..63810dc 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -513,12 +513,12 @@ sub html_footer {
if ($p) {
$p = PublicInbox::Hval->new_msgid($p);
$p = $p->as_href;
- $irt = "<a\nhref=\"$upfx$p/\">parent</a> ";
+ $irt = "<a\nhref=\"$upfx$p/\"rel=prev>parent</a> ";
} else {
$irt = ' ' x length('parent ');
}
if ($next) {
- $irt .= "<a\nhref=\"$upfx$next/\">next</a> ";
+ $irt .= "<a\nhref=\"$upfx$next/\"\nrel=next>next</a> ";
} else {
$irt .= ' ' x length('next ');
}
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-04-25 1:03 7% [PATCH] www: add rel=next and rel=prev navigation hints Eric Wong
2016-04-25 1:11 6% [PATCH] searchview: add "rel=next" and "rel=prev" here, too 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).