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
# 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

View file

@ -26,6 +26,8 @@
<link rel="preconnect" href="https://cdn.jsdelivr.net/">
<link rel="stylesheet"
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' %}">
{% block extra_css %}{# Override this in templates to add extra stylesheets #}{% endblock %}
</head>

View file

@ -1,19 +1,21 @@
{% load wagtailcore_tags navigation_tags %}
{% get_site_root as site_root %}
<nav>
<ul>
<li>
<a href="{% pageurl site_root %}">
<strong>Lycée du Pays de Soule</strong>
</a>
<a href="{% pageurl site_root %}">
<strong>Lycée du Pays de Soule</strong>
</a>
</li>
</ul>
<ul>
{% for menuitem in site_root.get_children.live.in_menu %}
{% for menuitem in site_root.get_children.live.in_menu %}
<li>
<a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
</li>
{% endfor %}
<li>
<a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>
<a href="/search/"><i class="ri-search-line" title="Recherche"></i></a>
</li>
{% endfor %}
</ul>
</nav>

View file

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