Added a search bar to homepage

This commit is contained in:
Jan Böhmer 2024-02-29 22:46:19 +01:00
parent e00988047c
commit 1815162907
4 changed files with 52 additions and 18 deletions

View file

@ -1,19 +1,19 @@
{% extends "base.html.twig" %}
{% import "components/new_version.macro.html.twig" as nv %}
{% import "components/search.macro.html.twig" as search %}
{% block content %}
<div id="tessdgjds" {{ stimulus_controller('elements/part_livesearch') }} class="mb-2"
data-autocomplete="{{ path('typeahead_parts', {'query': '__QUERY__'}) }}" data-detail-url="{{ path('part_info', {'id': '__ID__'}) }}">
</div>
{% if is_granted('@system.show_updates') %}
{{ nv.new_version_alert(new_version_available, new_version, new_version_url) }}
{% endif %}
{% if is_granted('@parts.read') %}
{{ search.search_form("standalone") }}
{% endif %}
<div class="rounded p-4 bg-body-secondary">
<h1 class="display-3">{{ partdb_title }}</h1>
<h4>