Skip to content

Commit

Permalink
feat(votepeloclima): Added thumbnail on card profile template
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomario committed Sep 2, 2024
1 parent ef68013 commit 289d653
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "votepeloclima/base.html" %}
{% load static crispy_forms_filters compress %}
{% load static crispy_forms_filters compress thumbnail %}

{% block head_css %}
{{ block.super }}
Expand Down Expand Up @@ -43,7 +43,7 @@ <h6 class="text-uppercase fw-bold"><i class="ds-sidebar-bars"></i> Filtrar resul
{% for candidature in candidatures %}
<div class="g-col-12 g-col-md-6 g-col-lg-4">
<a class="card" href="{% url 'candidate_profile' candidature.slug %}">
<img src="{{ candidature.photo.url }}" class="card-img-top" alt="Foto de {{ candidature.legal_name }}">
<img src="{{ candidature.photo|thumbnail_url:'avatar' }}" class="card-img-top" alt="Foto de {{ candidature.legal_name }}">
<div class="card-body px-2 py-1">
<p class="state-city mb-1 text-black-50">{{ candidature.get_state_display }} - {{ candidature.get_city_display }}</p>
<div class="card-title">
Expand Down
6 changes: 6 additions & 0 deletions app/org_eleicoes/votepeloclima/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,9 @@
REDIRECT_MIDDLEWARE_ROOT_DOMAIN = env("REDIRECT_MIDDLEWARE_ROOT_DOMAIN", default="localhost")

REDIRECT_MIDDLEWARE_LIST_DOMAIN = env.list("REDIRECT_MIDDLEWARE_LIST_DOMAIN", default=["localhost.dev","localhost.devel"])

THUMBNAIL_ALIASES = {
'': {
'avatar': {'size': (500, 500), 'crop': True},
},
}

0 comments on commit 289d653

Please sign in to comment.