Skip to content
Snippets Groups Projects
Commit 1807ef3d authored by Alexa Valentová's avatar Alexa Valentová
Browse files

fix person page profile images

parent 9c27209b
No related branches found
No related tags found
2 merge requests!1011fix person page profile images,!1010fix person page profile images
Pipeline #18661 passed
......@@ -8,9 +8,4 @@ register = template.Library()
@register.filter
def markdown(value):
"""Prekonvertuje vstupni text na markdown, necekane"""
return mark_safe(md.markdown(value))
@register.filter
def dictionary(value):
return value.__dict__
return mark_safe(md.markdown(value))
\ No newline at end of file
......@@ -51,7 +51,7 @@ def make_promote_panels(
panels.append(HelpPanel(help_content))
panels.append(CommentPanel())
return [MultiFieldPanel(panels, gettext_lazy("Common page configuration"))]
return [MultiFieldPanel(panels, gettext_lazy("Metadata stránky"))]
def subscribe_to_newsletter(email, list_id):
......
......@@ -3,8 +3,8 @@
<div class="badge badge--condensed">
<a href="{{ person_page.url }}" class="avatar badge__avatar avatar--sm">
{% if person_page.profile_photo %}
{% image person_page.profile_photo fill-80x80 as profile_img %}
{% image person_page.profile_photo fill-160x160 as profile_img_2x %}
{% image person_page.profile_photo fill-80x80 as profile_img %}
{% image person_page.profile_photo fill-160x160 as profile_img_2x %}
<img src="{{ profile_img.url }}" srcset="{{ profile_img.url }}, {{ profile_img_2x.url }} 2x" alt="{{ person_page.title }}"/>
{% else %}
<img src="{% static "shared/img/unknown_pirate_160x160.jpg" %}" alt="{{ person_page.title }}"/>
......
......@@ -47,11 +47,12 @@ def make_promote_panels(
if search_description:
panels.append(FieldPanel("search_description"))
if search_image:
panels.append(FieldPanel("search_image"))
# TODO
panels.append(FieldPanel("search_image")) #, label="Obrázek pro embed"))
panels.append(HelpPanel(help_content))
panels.append(CommentPanel())
return [MultiFieldPanel(panels, gettext_lazy("Common page configuration"))]
return [MultiFieldPanel(panels, gettext_lazy("Metadata stránky"))]
def subscribe_to_newsletter(email, list_id):
......
{% load shared_filters %}
<section>
<h2 class="head-heavy-base mb-4">
{{ self.group_title }}
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{% for person_details in self.person_list %}
{% with person_details.person as person_page %}
{% with person_details.person.specific as person_page %}
{% if person_details.position %}
{% include "shared/person_badge_snippet.html" with title=person_details.position %}
{% include "shared/person_badge_snippet.html" with title=person_details.position person_page=person_page %}
{% else %}
{% include "shared/person_badge_snippet.html" with title=person_page.job %}
{% include "shared/person_badge_snippet.html" with title=person_page.job person_page=person_page %}
{% endif %}
{% endwith %}
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment