<form action="." method="get" class="group relative block bg-sky-700 rounded-full shadow-inner dark:bg-violet-800">
    <input type="text" value="{{ search }}" name="search" placeholder="{{ translate('search') }}..."
        class="bg-transparent placeholder-slate-900/75 text-white w-full px-10 py-2 focus:outline-none"
        @keyup.?.prevent.window="$el.focus()" @focus="$event.target.select()"
    >

    <div class="flex items-center absolute left-0 inset-y-0 ml-2 pointer-events-none">
        <div class="flex justify-center items-center text-slate-900/50 w-6 h-6">
            <i class="fas fa-search fa-fw"></i>
        </div>
    </div>

    {% if search %}
        <div class="flex items-center absolute right-0 inset-y-0 mr-2">
            <a href="." class="flex justify-center items-center rounded-full text-slate-900/50 w-6 h-6 hover:bg-red-700 hover:text-white hover:text-opacity-100 hover:shadow-sm">
                <i class="fas fa-times"></i>
            </a>
        </div>
    {% endif %}
</form>
