Poprawa wygladu all_events

This commit is contained in:
AgataKow 2022-02-10 17:30:17 +01:00
parent fbfd08c369
commit 70f3ff310d
3 changed files with 54 additions and 35 deletions

View File

@ -40,26 +40,28 @@
<form method="GET" action="{% url 'events:search' %}">
<div class="searching">
<input name="q" value="{{ request.GET.q }}" placeholder="Szukaj" type="text">
<input name="q" value="{{ request.GET.q }}" placeholder="Wpisz nazwę wydarzenia" type="text">
<button class='btn btn-list' type="submit">Wyszukaj</button>
</div>
</form>
<form method="GET" action="{% url 'events:search_by_date' %}">
<div class="searching">
<input name="q" value="{{ request.GET.q }}" placeholder="Szukaj" type="date">
<button class='btn btn-list' type="submit">Wyszukaj</button>
</div>
</form>
</form>
<p>{{ numofnews }} wydarzeń na stronie</p>
<h2>Kategorie</h2>
{% for i in categories %}
<a class="btn btn-list" href="../all_events/category/{{ i.id }}/">{{ i.name }}</a>
{% endfor %}
<h2>Wyszukaj w kalendarzu</h2>
<form method="GET" action="{% url 'events:search_by_date' %}">
<div class="searching">
<input name="q" value="{{ request.GET.q }}" placeholder="Szukaj w kalendarzu" type="date">
<button class='btn btn-list' type="submit">Wyszukaj</button>
</div>
</form>
</div>
@ -89,30 +91,31 @@
</div>
{% endblock %}
<div class="container2">
{% if users.has_other_pages %}
<ul>
{% if users.has_previous %}
<li><a href="?page={{ users.previous_page_number }}">&laquo;</a></li>
{% else %}
<li class="disabled"><span>&laquo;</span></li>
{% endif %}
{% for i in users.paginator.page_range %}
{% if users.number == i %}
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}
<li><a href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if users.has_next %}
<li><a href="?page={{ users.next_page_number }}">&raquo;</a></li>
{% else %}
<li class="disabled"><span>&raquo;</span></li>
{% endif %}
</ul>
{% endif %}
</div>
<nav aria-label="Page navigation">
{% if users.has_other_pages %}
<ul class="pagination">
{% if users.has_previous %}
<li><a href="?page={{ users.previous_page_number }}">&laquo;</a></li>
{% else %}
<li class="disabled"><span>&laquo;</span></li>
{% endif %}
{% for i in users.paginator.page_range %}
{% if users.number == i %}
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}
<li><a href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if users.has_next %}
<li><a href="?page={{ users.next_page_number }}">&raquo;</a></li>
{% else %}
<li class="disabled"><span>&raquo;</span></li>
{% endif %}
</ul>
{% endif %}
</nav>
<!--Powrot na strone glowna-->
<div class="return-panel">

View File

@ -71,6 +71,10 @@ img {
}
/* Showcase*/
.page ul {
background-color:pink;
}
.showcase {
background-color: var(--background-green);
@ -264,7 +268,6 @@ img {
height: 30px;
}
.flex {
display: flex;
justify-content: center;

View File

@ -84,6 +84,16 @@ img {
/* Showcase*/
.container2 ul {
display: flex;
flex-direction: row;
justify-content: center;
font-size: 36px;
text-align: center;
color:var(--background-green);
gap: 30px;
}
.showcase {
background-color: var(--background-green);
@ -209,15 +219,18 @@ img {
font-size: 16px;
}
.searching input[type='text'] {
.searching input[type='text'],
.searching input[type='date']
{
border: 0;
background-color: white;
border: 3px solid var(--background-dark-green);
border-radius: 5px;
width: 100%;
padding: 10px;
margin:15px 0;
margin: 15px 0;
font-size: 16px;
text-align:center;
}