add thumbnail feature

This commit is contained in:
doubaniux 2021-02-17 23:07:38 +01:00
parent 9a18371c9a
commit 51237366f8
33 changed files with 113 additions and 57 deletions

View file

@ -4,6 +4,8 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -29,7 +31,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'books:retrieve' book.id %}">
<img src="{{ book.cover.url }}" alt="" class="item-image float-left">
<img src="{{ book.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -4,6 +4,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -31,7 +32,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'books:retrieve' book.id %}">
<img src="{{ book.cover.url }}" alt="" class="item-image float-left">
<img src="{{ book.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -4,6 +4,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -42,7 +43,9 @@
<div class="main-section-wrapper">
<div class="entity-detail">
<img src="{{ book.cover.url }}" class="entity-detail__img" alt="{{ book.title }}">
<a href="{{ book.cover.url }}" class="entity-detail__img-origin" target="_blank" title="{% trans '查看原图' %}">
<img src="{{ book.cover|thumb:'normal' }}" class="entity-detail__img" alt="{{ book.title }}">
</a>
<div class="entity-detail__info">
<h5 class="entity-detail__title">

View file

@ -5,6 +5,7 @@
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -101,7 +102,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'books:retrieve' book.id %}"><img src="{{ book.cover.url }}" alt="" class="entity-card__img"></a>
<a href="{% url 'books:retrieve' book.id %}"><img src="{{ book.cover|thumb:'normal' }}" alt="" class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">
<h5 class="entity-card__title"><a href="{% url 'books:retrieve' book.id %}">{{ book.title }}</a>

View file

@ -4,6 +4,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -78,7 +79,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'books:retrieve' book.id %}"><img src="{{ book.cover.url }}" alt=""
<a href="{% url 'books:retrieve' book.id %}"><img src="{{ book.cover|thumb:'normal' }}" alt=""
class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -5,6 +5,7 @@
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -86,7 +87,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'books:retrieve' book.id %}"><img src="{{ book.cover.url }}" alt=""
<a href="{% url 'books:retrieve' book.id %}"><img src="{{ book.cover|thumb:'normal' }}" alt=""
class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -1345,14 +1345,19 @@ select::placeholder {
.entity-detail .entity-detail__img {
height: 210px;
float: left;
-o-object-fit: contain;
object-fit: contain;
float: left;
max-width: 150px;
-o-object-position: top;
object-position: top;
}
.entity-detail .entity-detail__img-origin {
cursor: -webkit-zoom-in;
cursor: zoom-in;
}
.entity-detail .entity-detail__info {
float: left;
margin-left: 20px;

File diff suppressed because one or more lines are too long

View file

@ -100,13 +100,16 @@ $sub-section-title-margin: 8px
// detail page
.entity-detail
& &__img
height: 210px
object-fit: contain
float: left
object-fit: contain
max-width: 150px
object-position: top
& &__img-origin
cursor: zoom-in
& &__info
float: left

View file

@ -4,6 +4,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -48,7 +49,7 @@
<li class="entity-sort__entity">
<a href="{% url 'books:retrieve' wish_book_mark.book.id %}">
<img src="{{ wish_book_mark.book.cover.url }}"
<img src="{{ wish_book_mark.book.cover|thumb:'normal' }}"
alt="{{wish_book_mark.book.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{ wish_book_mark.book.title }}">
{{ wish_book_mark.book.title }}</div>
@ -74,7 +75,7 @@
<li class="entity-sort__entity">
<a href="{% url 'books:retrieve' do_book_mark.book.id %}">
<img src="{{ do_book_mark.book.cover.url }}"
<img src="{{ do_book_mark.book.cover|thumb:'normal' }}"
alt="{{do_book_mark.book.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{do_book_mark.book.title}}">
{{ do_book_mark.book.title }}</div>
@ -100,7 +101,7 @@
<li class="entity-sort__entity">
<a href="{% url 'books:retrieve' collect_book_mark.book.id %}">
<img src="{{ collect_book_mark.book.cover.url }}"
<img src="{{ collect_book_mark.book.cover|thumb:'normal' }}"
alt="{{collect_book_mark.book.title}}" class="entity-sort__entity-img">
<span class="entity-sort__entity-name"
title="{{collect_book_mark.book.title}}">{{ collect_book_mark.book.title }}</span>
@ -126,7 +127,7 @@
<li class="entity-sort__entity">
<a href="{% url 'movies:retrieve' wish_movie_mark.movie.id %}">
<img src="{{ wish_movie_mark.movie.cover.url }}"
<img src="{{ wish_movie_mark.movie.cover|thumb:'normal' }}"
alt="{{wish_movie_mark.movie.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{wish_movie_mark.movie.title}}">
{{ wish_movie_mark.movie.title }}</div>
@ -152,7 +153,7 @@
<li class="entity-sort__entity">
<a href="{% url 'movies:retrieve' do_movie_mark.movie.id %}">
<img src="{{ do_movie_mark.movie.cover.url }}"
<img src="{{ do_movie_mark.movie.cover|thumb:'normal' }}"
alt="{{do_movie_mark.movie.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{do_movie_mark.movie.title}}">
{{ do_movie_mark.movie.title }}</div>
@ -178,7 +179,7 @@
<li class="entity-sort__entity">
<a href="{% url 'movies:retrieve' collect_movie_mark.movie.id %}">
<img src="{{ collect_movie_mark.movie.cover.url }}"
<img src="{{ collect_movie_mark.movie.cover|thumb:'normal' }}"
alt="{{collect_movie_mark.movie.title}}" class="entity-sort__entity-img">
<span class="entity-sort__entity-name"
title="{{collect_movie_mark.movie.title}}">{{ collect_movie_mark.movie.title }}</span>
@ -207,14 +208,14 @@
{% if wish_music_mark.type == 'album' %}
<a href="{% url 'music:retrieve_album' wish_music_mark.album.id %}">
<img src="{{ wish_music_mark.album.cover.url }}"
<img src="{{ wish_music_mark.album.cover|thumb:'normal' }}"
alt="{{wish_music_mark.album.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{wish_music_mark.album.title}}">
{{ wish_music_mark.album.title }}</div>
</a>
{% else %}
<a href="{% url 'music:retrieve_song' wish_music_mark.song.id %}">
<img src="{{ wish_music_mark.song.cover.url }}" alt="{{wish_music_mark.song.title}}"
<img src="{{ wish_music_mark.song.cover|thumb:'normal' }}" alt="{{wish_music_mark.song.title}}"
class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{wish_music_mark.song.title}}">
{{ wish_music_mark.song.title }}</div>
@ -243,14 +244,14 @@
<li class="entity-sort__entity">
{% if do_music_mark.type == 'album' %}
<a href="{% url 'music:retrieve_album' do_music_mark.album.id %}">
<img src="{{ do_music_mark.album.cover.url }}"
<img src="{{ do_music_mark.album.cover|thumb:'normal' }}"
alt="{{do_music_mark.album.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{do_music_mark.album.title}}">
{{ do_music_mark.album.title }}</div>
</a>
{% else %}
<a href="{% url 'music:retrieve_song' do_music_mark.song.id %}">
<img src="{{ do_music_mark.song.cover.url }}"
<img src="{{ do_music_mark.song.cover|thumb:'normal' }}"
alt="{{do_music_mark.song.title}}" class="entity-sort__entity-img">
<div class="entity-sort__entity-name" title="{{do_music_mark.song.title}}">
{{ do_music_mark.song.title }}</div>
@ -277,14 +278,14 @@
<li class="entity-sort__entity">
{% if collect_music_mark.type == 'album' %}
<a href="{% url 'music:retrieve_album' collect_music_mark.album.id %}">
<img src="{{ collect_music_mark.album.cover.url }}"
<img src="{{ collect_music_mark.album.cover|thumb:'normal' }}"
alt="{{collect_music_mark.album.title}}" class="entity-sort__entity-img">
<span class="entity-sort__entity-name"
title="{{collect_music_mark.album.title}}">{{ collect_music_mark.album.title }}</span>
</a>
{% else %}
<a href="{% url 'music:retrieve_song' collect_music_mark.song.id %}">
<img src="{{ collect_music_mark.song.cover.url }}"
<img src="{{ collect_music_mark.song.cover|thumb:'normal' }}"
alt="{{collect_music_mark.song.title}}" class="entity-sort__entity-img">
<span class="entity-sort__entity-name"
title="{{collect_music_mark.song.title}}">{{ collect_music_mark.song.title }}</span>

View file

@ -7,6 +7,7 @@
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -49,7 +50,7 @@
<li class="entity-list__entity">
<div class="entity-list__entity-img-wrapper">
<a href="{% url 'books:retrieve' book.id %}">
<img src="{{ book.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ book.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
</div>
<div class="entity-list__entity-text">
@ -131,7 +132,7 @@
<li class="entity-list__entity">
<div class="entity-list__entity-img-wrapper">
<a href="{% url 'movies:retrieve' movie.id %}">
<img src="{{ movie.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ movie.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
</div>
<div class="entity-list__entity-text">
@ -228,11 +229,11 @@
{% if item.category_name|lower == 'album' %}
<a href="{% url 'music:retrieve_album' music.id %}">
<img src="{{ music.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ music.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
{% elif item.category_name|lower == 'song' %}
<a href="{% url 'music:retrieve_song' music.id %}">
<img src="{{ music.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ music.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
{% endif %}

View file

@ -0,0 +1,15 @@
from django import template
from easy_thumbnails.templatetags.thumbnail import thumbnail_url
register = template.Library()
@register.filter
def thumb(source, alias):
"""
This filter modifies that from `easy_thumbnails` so that
it can neglect .svg file.
"""
if source.url.endswith('.svg'):
return source.url
else:
return thumbnail_url(source, alias)

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -31,7 +32,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'movies:retrieve' movie.id %}">
<img src="{{ movie.cover.url }}" alt="" class="item-image float-left">
<img src="{{ movie.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -33,7 +34,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'movies:retrieve' movie.id %}">
<img src="{{ movie.cover.url }}" alt="" class="item-image float-left">
<img src="{{ movie.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -7,6 +7,7 @@
{% load oauth_token %}
{% load truncate %}
{% load strip_scheme %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -54,7 +55,9 @@
<div class="main-section-wrapper">
<div class="entity-detail">
<img src="{{ movie.cover.url }}" class="entity-detail__img" alt="{{ movie.title }}">
<a href="{{ movie.cover.url }}" class="entity-detail__img-origin" target="_blank" title="{% trans '查看原图' %}">
<img src="{{ movie.cover|thumb:'normal' }}" class="entity-detail__img" alt="{{ movie.title }}">
</a>
<div class="entity-detail__info">
<h5 class="entity-detail__title">

View file

@ -7,6 +7,7 @@
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -102,7 +103,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'movies:retrieve' movie.id %}"><img src="{{ movie.cover.url }}" alt="" class="entity-card__img"></a>
<a href="{% url 'movies:retrieve' movie.id %}"><img src="{{ movie.cover|thumb:'normal' }}" alt="" class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">
<h5 class="entity-card__title"><a href="{% url 'movies:retrieve' movie.id %}">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -80,7 +81,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'movies:retrieve' movie.id %}"><img src="{{ movie.cover.url }}" alt=""
<a href="{% url 'movies:retrieve' movie.id %}"><img src="{{ movie.cover|thumb:'normal' }}" alt=""
class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -7,6 +7,7 @@
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -88,7 +89,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'movies:retrieve' movie.id %}"><img src="{{ movie.cover.url }}" alt=""
<a href="{% url 'movies:retrieve' movie.id %}"><img src="{{ movie.cover|thumb:'normal' }}" alt=""
class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -6,7 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load strip_scheme %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -41,7 +41,10 @@
<div class="main-section-wrapper">
<div class="entity-detail">
<img src="{{ album.cover.url }}" class="entity-detail__img" alt="{{ album.title }}">
<a href="{{ album.cover.url }}" class="entity-detail__img-origin" target="_blank" title="{% trans '查看原图' %}">
<img src="{{ album.cover|thumb:'normal' }}" class="entity-detail__img" alt="{{ album.title }}">
</a>
<div class="entity-detail__info">
<h5 class="entity-detail__title">
@ -180,7 +183,7 @@
{% for song in album.album_songs.all %}
<div class="track-carousel__track">
<a href="{% url 'music:retrieve_song' song.id %}">
<img src="{{ song.cover.url }}" alt="{{ song }}" class="track-carousel__track-image">
<img src="{{ song.cover|thumb:'normal' }}" alt="{{ song }}" class="track-carousel__track-image">
<span class="track-carousel__track-title">
{{ song }}
</span>

View file

@ -7,6 +7,7 @@
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -101,7 +102,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover.url }}"
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover|thumb:'normal' }}"
alt="" class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -84,7 +85,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover.url }}"
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover|thumb:'normal' }}"
alt="" class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -6,7 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -98,7 +98,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover.url }}"
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover|thumb:'normal' }}"
alt="" class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -31,7 +32,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_album' album.id %}">
<img src="{{ album.cover.url }}" alt="" class="item-image float-left">
<img src="{{ album.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -31,7 +32,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_song' song.id %}">
<img src="{{ song.cover.url }}" alt="" class="item-image float-left">
<img src="{{ song.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -33,7 +34,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_album' album.id %}">
<img src="{{ album.cover.url }}" alt="" class="item-image float-left">
<img src="{{ album.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -33,7 +34,7 @@
<div class="entity-card entity-card--horizontal">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_song' song.id %}">
<img src="{{ song.cover.url }}" alt="" class="item-image float-left">
<img src="{{ song.cover|thumb:'normal' }}" alt="" class="item-image float-left">
</a>
</div>
<div class="entity-card__info-wrapper entity-card__info-wrapper--horizontal">

View file

@ -6,7 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load strip_scheme %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -41,7 +41,9 @@
<div class="main-section-wrapper">
<div class="entity-detail">
<img src="{{ song.cover.url }}" class="entity-detail__img" alt="{{ song.title }}">
<a href="{{ song.cover.url }}" class="entity-detail__img-origin" target="_blank" title="{% trans '查看原图' %}">
<img src="{{ song.cover|thumb:'normal' }}" class="entity-detail__img" alt="{{ song.title }}">
</a>
<div class="entity-detail__info">
<h5 class="entity-detail__title">

View file

@ -6,7 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -102,7 +102,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_song' song.id %}"><img src="{{ song.cover.url }}"
<a href="{% url 'music:retrieve_song' song.id %}"><img src="{{ song.cover|thumb:'normal' }}"
alt="" class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -6,6 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -80,7 +81,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_song' song.id %}"><img src="{{ song.cover.url }}" alt=""
<a href="{% url 'music:retrieve_song' song.id %}"><img src="{{ song.cover|thumb:'normal' }}" alt=""
class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -6,7 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -88,7 +88,7 @@
<div class="aside-section-wrapper">
<div class="entity-card">
<div class="entity-card__img-wrapper">
<a href="{% url 'music:retrieve_song' song.id %}"><img src="{{ song.cover.url }}" alt=""
<a href="{% url 'music:retrieve_song' song.id %}"><img src="{{ song.cover|thumb:'normal' }}" alt=""
class="entity-card__img"></a>
</div>
<div class="entity-card__info-wrapper">

View file

@ -1,10 +1,11 @@
{% load static %}
{% load i18n %}
{% load l10n %}
{% load admin_url %}
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -44,7 +45,7 @@
<li class="entity-list__entity">
<div class="entity-list__entity-img-wrapper">
<a href="{% url 'books:retrieve' mark.book.id %}">
<img src="{{ mark.book.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ mark.book.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
</div>
<div class="entity-list__entity-text">

View file

@ -6,7 +6,7 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -46,7 +46,7 @@
<li class="entity-list__entity">
<div class="entity-list__entity-img-wrapper">
<a href="{% url 'movies:retrieve' mark.movie.id %}">
<img src="{{ mark.movie.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ mark.movie.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
</div>
<div class="entity-list__entity-text">

View file

@ -6,7 +6,8 @@
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
<!DOCTYPE html>
<html lang="en">
@ -49,11 +50,11 @@
<div class="entity-list__entity-img-wrapper">
{% if music.category_name|lower == 'album' %}
<a href="{% url 'music:retrieve_album' music.id %}">
<img src="{{ music.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ music.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
{% elif music.category_name|lower == 'song' %}
<a href="{% url 'music:retrieve_song' music.id %}">
<img src="{{ music.cover.url }}" alt="" class="entity-list__entity-img">
<img src="{{ music.cover|thumb:'normal' }}" alt="" class="entity-list__entity-img">
</a>
{% endif %}
</div>