how to make an input field on a capsule page ?
Omar Polo
op at omarpolo.com
Tue Aug 24 13:02:33 BST 2021
bussiere bussiere <bussiere at gmail.com> writes:
> Hello,
>
> I'am looking to make an input field on a gemini capsule page like the gemini search engine,
>
> but i've read the gemtext doc and i cannot find how to do that ...
>
> can you point me to some doc on how to do this ?
>
> regards
text/gemini doesn't have anything like a text input. Instead, you put a
link to a page that replies with the 10 or 11 status code and that will
make the browser showing a text field and send what the user typed as
query part of the url.
Using geminispace.info as example, they provide a link "search" that
looks like this:
=> /search Search
When the server receives a request for ``/search'' it replies with 10:
% printf "gemini://geminispace.info/search\r\n" | \
nc -c -Tnoverify geminispace.info 1965
10 Search query
%
usually browser will pop up a text field in this case, and then visit
the page
/search?<user query here>
So, if you search for "kittens" the browser will visit the page
gemini://geminispace.info/search?kittens
HTH
Omar Polo
More information about the Gemini
mailing list