Add custom thumbnailer

This commit is contained in:
Raphael Michel
2018-03-20 09:33:15 +01:00
parent 840cee206a
commit e7458f3032
16 changed files with 158 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
{% extends "pretixpresale/base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load thumbnail %}
{% load thumb %}
{% load eventurl %}
{% load safelink %}
{% block thetitle %}
@@ -27,7 +27,7 @@
{% if event_logo %}
<a href="{% eventurl event "presale:event.index" cart_namespace=cart_namespace|default_if_none:"" %}"
title="{{ event.name }}">
<img src="{{ event_logo|thumbnail_url:'logo' }}" alt="{{ event.name }}" class="event-logo" />
<img src="{{ event_logo|thumb:'5000x120' }}" alt="{{ event.name }}" class="event-logo" />
</a>
{% else %}
<h1>

View File

@@ -3,7 +3,7 @@
{% load l10n %}
{% load eventurl %}
{% load money %}
{% load thumbnail %}
{% load thumb %}
{% load eventsignal %}
{% load rich_text %}
{% block title %}{% trans "Presale" %}{% endblock %}
@@ -225,7 +225,7 @@
data-title="{{ item.name|force_escape|force_escape }}"
{# Yes, double-escape to prevent XSS in lightbox #}
data-lightbox="{{ item.id }}">
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
<img src="{{ item.picture.name|thumb:'60x60^' }}"
alt="{{ item.name }}"/>
</a>
{% endif %}
@@ -348,7 +348,7 @@
data-title="{{ item.name|force_escape|force_escape }}"
{# Yes, double-escape to prevent XSS in lightbox #}
data-lightbox="{{ item.id }}">
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
<img src="{{ item.picture.name|thumb:'60x60^' }}"
alt="{{ item.name }}"/>
</a>
{% endif %}

View File

@@ -4,7 +4,7 @@
{% load money %}
{% load eventurl %}
{% load eventsignal %}
{% load thumbnail %}
{% load thumb %}
{% load rich_text %}
{% block title %}{% trans "Voucher redemption" %}{% endblock %}
@@ -42,7 +42,7 @@
data-title="{{ item.name|force_escape|force_escape }}"
{# Yes, double-escape to prevent XSS in lightbox #}
data-lightbox="{{ item.id }}">
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
<img src="{{ item.picture|thumb:'60x60^' }}"
alt="{{ item.name }}"/>
</a>
{% endif %}
@@ -139,7 +139,7 @@
data-title="{{ item.name|force_escape|force_escape }}"
{# Yes, double-escape to prevent XSS in lightbox #}
data-lightbox="{{ item.id }}">
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
<img src="{{ item.picture|thumb:'60x60^' }}"
alt="{{ item.name }}"/>
</a>
{% endif %}

View File

@@ -1,5 +1,5 @@
{% extends "pretixpresale/event/base.html" %}
{% load i18n eventurl thumbnail bootstrap3 %}
{% load i18n eventurl bootstrap3 %}
{% block title %}{% trans "Waiting list" %}{% endblock %}
{% block content %}
<h2>{% trans "Add me to the waiting list" %}</h2>

View File

@@ -1,7 +1,7 @@
{% extends "pretixpresale/base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load thumbnail %}
{% load thumb %}
{% load eventurl %}
{% block thetitle %}
{% block title %}{% endblock %}{% if url_name != "organizer.index" %} :: {% endif %}{{ organizer.name }}
@@ -11,7 +11,8 @@
<div class="pull-left">
{% if organizer_logo %}
<a href="{% eventurl organizer "presale:organizer.index" %}" title="{{ organizer.name }}">
<img src="{{ organizer_logo|thumbnail_url:'logo' }}" alt="{{ organizer.name }}" class="organizer-logo" />
<img src="{{ organizer_logo|thumb:'5000x120' }}" alt="{{ organizer.name }}"
class="organizer-logo" />
</a>
{% else %}
<h1><a href="{% eventurl organizer "presale:organizer.index" %}">{{ organizer.name }}</a></h1>