Add search
This commit is contained in:
parent
b57a26953f
commit
92f6fe06a4
4 changed files with 20 additions and 14 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Reference in a new issue