From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH 2/2] wwwstream: prioritize search in top title bar
Date: Tue, 2 Aug 2016 01:47:55 +0000 [thread overview]
Message-ID: <20160802014755.24520-2-e@80x24.org> (raw)
In-Reply-To: <20160802014755.24520-1-e@80x24.org>
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
prev parent reply other threads:[~2016-08-02 1:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 1:47 [PATCH 1/2] daemon: do not chdir unless daemonizing Eric Wong
2016-08-02 1:47 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160802014755.24520-2-e@80x24.org \
--to=e@80x24.org \
--cc=spew@80x24.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).