pub / serci

Search the web with !keywords
git clone https://https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit bbd51cb5a7f4c56c30c0717e701474f42eedb30f
parent 8f7fddae3c1d5bd75041d0b776b0858a3eeb4106
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat,  6 Jul 2024 16:32:37 +0200

feat: form submission button

Diffstat:
Mindex.php | 24+++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/index.php b/index.php @@ -67,8 +67,19 @@ if (strlen($query) > 0) { <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="traserĉi - search with !bangs"> <title>traserĉi - search with !bangs</title> <style> + #searchform { + width: 100%; + display: flex; + flex-direction: row; + } + @media only screen and (width <= 720px) { + #searchform { + flex-direction: column; + } + } #searchbar { width: 100%; + margin-right: 5px; } </style> </head> @@ -77,17 +88,23 @@ if (strlen($query) > 0) { <body> <!-- Search Bar --> - <h1>Search with !bangs</h1> - <form action="/" method="get"> + <h1>traserĉi - Search with !bangs</h1> + <form id="searchform" action="/" method="get"> <input id="searchbar" name="query" type="text" autofocus - placeholder="&#128270; Search the web" + placeholder="I am thinking about... !bang" alt="Search the web" onkeydown="if(event.keyCode===13)return this.form.submit(),!1" > + <input + id="searchbutton" + name="submit" + type="submit" + value="&#128270; Search" + > </form> <!-- FAQs --> @@ -116,6 +133,7 @@ if (strlen($query) > 0) { <tr> <?php + /* Print one table row for each configured search engine */ $engine_table = ""; foreach (array_keys($searches) as $key) {