user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] wwwstream: prioritize search in top title bar
@ 2016-08-02  7:49  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2016-08-02  7:49 UTC (permalink / raw)
  To: meta

search is probably more useful so users should be able to select
it sooner.  Put it on its own line so it won't get scrolled off
the edge for non-CSS users.

Fix a minor spacing bug in the input tag while we're at it, too
---
 lib/PublicInbox/WwwStream.pm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index ec9ae0c..29395f4 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -33,11 +33,12 @@ sub _html_top ($) {
 	my $upfx = $ctx->{-upfx} || '';
 	my $atom = $ctx->{-atom} || $upfx.'new.atom';
 	my $tip = $ctx->{-html_tip} || '';
-	my $top = "<b>$desc</b> (<a\nhref=\"$atom\">Atom feed</a>)";
+	my $top = "<b>$desc</b>";
+	my $links = "<a\nhref=\"$atom\">Atom feed</a>";
 	if ($obj->search) {
 		my $q_val = $ctx->{-q_value_html};
 		if (defined $q_val && $q_val ne '') {
-			$q_val = qq(\nvalue="$q_val" );
+			$q_val = qq(\nvalue="$q_val");
 		} else {
 			$q_val = '';
 		}
@@ -45,12 +46,13 @@ sub _html_top ($) {
 		my $extra = $ctx->{-extra_form_html} || '';
 		my $action = $upfx eq '' ? './' : $upfx;
 		$top = qq{<form\naction="$action"><pre>$top} .
-			  qq{ <input\nname=q\ntype=text$q_val/>} .
+			  qq{\n<input\nname=q\ntype=text$q_val />} .
 			  $extra .
 			  qq{<input\ntype=submit\nvalue=search />} .
+			  ' ' . $links .
 			  q{</pre></form>}
 	} else {
-		$top = '<pre>' . $top . '</pre>';
+		$top = '<pre>' . $top . "\n" . $links . '</pre>';
 	}
 	"<html><head><title>$title</title>" .
 		"<link\nrel=alternate\ntitle=\"Atom feed\"\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 --
2016-08-02  7:49  7% [PATCH] wwwstream: prioritize search in top title bar 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).