]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Impossible_to_resize_text_input_in_search_results.mdwn
Merge remote-tracking branch 'spalax/paternal/libdirs'
[ikiwiki.git] / doc / bugs / Impossible_to_resize_text_input_in_search_results.mdwn
1 While working on the [Tails website](https://tails.boum.org/), I didn't
2 managed to resize the text input on top of the search results.
3
4 This is problematic with our layout and it might be the same for others.
5 For example, reducing a bit the width of the browser on [this
6 page](https://tails.boum.org/ikiwiki.cgi?P=testing) makes the search
7 results jump at the bottom of the page since the text input is wider
8 (size=65 by default) than the body of the page when side by side with
9 the sidebar.
10
11 Having CSS selectors to style the elements of this form would solve our
12 problem.
13
14 [[!tag patch]]
15
16 Here is a patch:
17
18     From c4c6c9bf3b296c2db10d6fb9e6421d82f341b1cf Mon Sep 17 00:00:00 2001
19     From: sajolida <sajolida@pimienta.org>
20     Date: Sun, 9 Nov 2014 16:48:33 +0100
21     Subject: [PATCH] Add classes to form in search results
22     
23     This is needed to style it, for example to reduce the width of the text
24     input and prevent layout issues.
25     ---
26      templates/searchquery.tmpl | 4 ++--
27      1 file changed, 2 insertions(+), 2 deletions(-)
28     
29     diff --git a/templates/searchquery.tmpl b/templates/searchquery.tmpl
30     index 15bc78e..6277266 100644
31     --- a/templates/searchquery.tmpl
32     +++ b/templates/searchquery.tmpl
33     @@ -33,8 +33,8 @@ $def{NEXT,$if{$ne{$last,$msize},<INPUT TYPE=submit NAME="&gt;" VALUE="Next">}}
34      
35      <FORM NAME=P METHOD=GET
36      ACTION="$html{$env{CGIURL}}" TARGET="_top">
37     -<div style="text-align:center">
38     -<INPUT NAME=P VALUE="$html{$query}" SIZE=65>
39     +<div class="searchquery" style="text-align:center">
40     +<INPUT class="searchbox" NAME=P VALUE="$html{$query}" SIZE=65>
41      <INPUT TYPE=SUBMIT VALUE="Search">
42      $env{HELPLINK}
43      <hr>
44     --
45     2.1.1
46
47 > [[Applied|done]], thanks --[[smcv]]