mediawiki-skins-Citizen/templates/Search.mustache
alistair3149 86150d492d
refactor(core): clean up checkboxHack implementation
Mostly based on Vector 2022. Now we target checkbox hacks by the HTML classes
.mw-checkbox-hack-TYPE instead of defining each individually, which would
make it more scalable.
2022-05-12 22:37:28 -04:00

31 lines
1.1 KiB
Plaintext

{{!
string form-action action attribute of the search form
string page-title page title of the search page
string msg-search search text label
string html-input raw HTML containing the input box of the search box
string html-random-href URL of Special:Random
string msg-random tooltip message for random page button
}}
<div class="citizen-search citizen-header__item mw-checkbox-hack-container">
<input
type="checkbox"
id="citizen-search__checkbox"
class="mw-checkbox-hack-checkbox"
role="button"
aria-labelledby="citizen-search__buttonCheckbox"
aria-haspopup="true">
<form action="{{form-action}}" role="search" id="searchform" class="citizen-search__card mw-checkbox-hack-target" autocomplete="off">
<input type="hidden" name="title" value="{{page-title}}">
<label class="screen-reader-text" for="searchInput">{{msg-search}}</label>
<div class="citizen-search__icon"></div>
{{{html-input}}}
<a
class="citizen-search__random"
href="{{html-random-href}}"
title="{{msg-random}}">
<span class="screen-reader-text">{{msg-random}}</span>
</a>
</form>
{{>Search__button}}
</div>