Archived
1
Fork 0

Add search

This commit is contained in:
Edgar P. Burkhart 2024-06-12 18:07:51 +02:00
parent b57a26953f
commit 92f6fe06a4
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
4 changed files with 20 additions and 14 deletions

View file

@ -117,9 +117,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/ # https://docs.djangoproject.com/en/5.0/topics/i18n/
LANGUAGE_CODE = "en-us" LANGUAGE_CODE = "fr-fr"
TIME_ZONE = "UTC" TIME_ZONE = "Europe/Paris"
USE_I18N = True USE_I18N = True

View file

@ -26,6 +26,8 @@
<link rel="preconnect" href="https://cdn.jsdelivr.net/"> <link rel="preconnect" href="https://cdn.jsdelivr.net/">
<link rel="stylesheet" <link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css" /> href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css" />
<link href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css"
rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="{% static 'css/lps.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'css/lps.css' %}">
{% block extra_css %}{# Override this in templates to add extra stylesheets #}{% endblock %} {% block extra_css %}{# Override this in templates to add extra stylesheets #}{% endblock %}
</head> </head>

View file

@ -1,5 +1,4 @@
{% load wagtailcore_tags navigation_tags %} {% load wagtailcore_tags navigation_tags %}
{% get_site_root as site_root %} {% get_site_root as site_root %}
<nav> <nav>
<ul> <ul>
@ -15,5 +14,8 @@
<a href="{% pageurl menuitem %}">{{ menuitem.title }}</a> <a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
</li> </li>
{% endfor %} {% endfor %}
<li>
<a href="/search/"><i class="ri-search-line" title="Recherche"></i></a>
</li>
</ul> </ul>
</nav> </nav>

View file

@ -3,12 +3,14 @@
{% block body_class %}template-searchresults{% endblock %} {% block body_class %}template-searchresults{% endblock %}
{% block title %}Search{% endblock %} {% block title %}Search{% endblock %}
{% block content %} {% block content %}
<h1>Search</h1> <h1>Recherche</h1>
<form action="{% url 'search' %}" method="get"> <form action="{% url 'search' %}" method="get">
<fieldset role="group">
<input type="text" <input type="text"
name="query" name="query"
{% if search_query %}value="{{ search_query }}"{% endif %}> {% if search_query %}value="{{ search_query }}"{% endif %}>
<input type="submit" value="Search" class="button"> <input type="submit" value="Rechercher" class="button">
</fieldset>
</form> </form>
{% if search_results %} {% if search_results %}
<ul> <ul>