Skip to content

Commit

Permalink
Show 20 items, styling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
anorthall committed Jun 19, 2023
1 parent 4187216 commit fb8ae54
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/logger/views/userprofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def post(self, request, *args, **kwargs):
| Q(clubs__unaccent__icontains=query)
| Q(expedition__unaccent__icontains=query)
)
).order_by("-start", "pk")[:10]
).order_by("-start", "pk")[:20]

friends = self.profile_user.friends.all()

Expand Down
4 changes: 4 additions & 0 deletions app/static/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,7 @@ body {
transition: unset !important;

}

.trip-search-result:hover {
background-color: var(--bs-secondary-bg) !important;
}
18 changes: 12 additions & 6 deletions app/templates/logger/_htmx_trip_list_search.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="tripListSearch"
class="{% if query %}border-primary border-bottom mb-3{% endif %}">
class="{% if query %}border-primary border-bottom mb-4{% endif %}">
{% if query %}
<div class="card text-bg-primary mb-4">
<div class="card-header">
Expand All @@ -8,11 +8,17 @@
<ul class="list-group list-group-flush">
{% if trips %}
{% for trip in trips %}
<li class="list-group-item" data-href="{{ trip.get_absolute_url }}">
<a class="link-primary fw-bold text-decoration-none"
href="{{ trip.get_absolute_url }}">{{ trip.cave_name }}</a>
<span class="text-muted">{{ trip.start|date }}</span>
{{ trip.cavers }}
<li class="list-group-item trip-search-result" data-href="{{ trip.get_absolute_url }}">
<div class="row d-flex align-items-center">
<small class="col col-auto text-muted font-monospace">
{{ trip.start|date:"Y-m-d" }}
</small>
<div class="col">
<a class="link-primary fw-bold text-decoration-none me-1"
href="{{ trip.get_absolute_url }}">{{ trip.cave_name }}</a>
{{ trip.cavers }}
</div>
</div>
</li>
{% endfor %}
{% else %}
Expand Down

0 comments on commit fb8ae54

Please sign in to comment.