From 714edbe767bb57c5802bb5cbc76c8abad82073b5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 9 Jun 2023 10:52:44 -0400 Subject: [PATCH] fix card --- catalog/templates/_item_card_metadata_album.html | 6 +++++- catalog/templates/_item_card_metadata_base.html | 4 +++- catalog/templates/_item_card_metadata_edition.html | 4 +++- catalog/templates/_item_card_metadata_movie.html | 4 +++- catalog/templates/_item_card_metadata_performance.html | 4 +++- .../_item_card_metadata_performanceproduction.html | 4 +++- catalog/templates/_item_card_metadata_podcast.html | 4 +++- catalog/templates/_item_card_metadata_tvseason.html | 4 +++- catalog/templates/_item_card_metadata_tvshow.html | 4 +++- common/static/scss/_card.scss | 5 +++-- 10 files changed, 32 insertions(+), 11 deletions(-) diff --git a/catalog/templates/_item_card_metadata_album.html b/catalog/templates/_item_card_metadata_album.html index 1741b589..dc7f3daf 100644 --- a/catalog/templates/_item_card_metadata_album.html +++ b/catalog/templates/_item_card_metadata_album.html @@ -15,5 +15,9 @@ {% if item.release_date %}发行时间:{{ item.release_date }}{% endif %} {% include '_people.html' with people=item.company role='发行方' max=2 %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_base.html b/catalog/templates/_item_card_metadata_base.html index db5040f2..3cad9768 100644 --- a/catalog/templates/_item_card_metadata_base.html +++ b/catalog/templates/_item_card_metadata_base.html @@ -40,7 +40,9 @@
{% block full %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %}
{% if show_tags %} diff --git a/catalog/templates/_item_card_metadata_edition.html b/catalog/templates/_item_card_metadata_edition.html index 22d0f2f4..0a4b5cc4 100644 --- a/catalog/templates/_item_card_metadata_edition.html +++ b/catalog/templates/_item_card_metadata_edition.html @@ -39,5 +39,7 @@ {% include '_people.html' with people=item.other_title role='又名' max=2 %}
{% endif %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_movie.html b/catalog/templates/_item_card_metadata_movie.html index 170123ca..dcbfb4a5 100644 --- a/catalog/templates/_item_card_metadata_movie.html +++ b/catalog/templates/_item_card_metadata_movie.html @@ -16,5 +16,7 @@ {% include '_people.html' with people=item.other_title role='又名' max=5 %} {% endif %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_performance.html b/catalog/templates/_item_card_metadata_performance.html index 1a2ff6ba..282429a1 100644 --- a/catalog/templates/_item_card_metadata_performance.html +++ b/catalog/templates/_item_card_metadata_performance.html @@ -23,5 +23,7 @@ {% include '_actor.html' with people=item.actor role='主演' max=5 %} {% include '_people.html' with people=item.performer role='表演者' max=5 %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_performanceproduction.html b/catalog/templates/_item_card_metadata_performanceproduction.html index 67c794b6..a795fad3 100644 --- a/catalog/templates/_item_card_metadata_performanceproduction.html +++ b/catalog/templates/_item_card_metadata_performanceproduction.html @@ -23,5 +23,7 @@ {% include '_actor.html' with people=item.actor role='主演' max=2 %} {% include '_people.html' with people=item.performer role='表演者' max=2 %} - {% if not hide_brief %}{{ item.brief | default:item.parent_item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | default:item.parent_item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_podcast.html b/catalog/templates/_item_card_metadata_podcast.html index fdb7ba78..1f5dbf34 100644 --- a/catalog/templates/_item_card_metadata_podcast.html +++ b/catalog/templates/_item_card_metadata_podcast.html @@ -10,5 +10,7 @@ {% endblock brief %} {% block full %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_tvseason.html b/catalog/templates/_item_card_metadata_tvseason.html index 170123ca..dcbfb4a5 100644 --- a/catalog/templates/_item_card_metadata_tvseason.html +++ b/catalog/templates/_item_card_metadata_tvseason.html @@ -16,5 +16,7 @@ {% include '_people.html' with people=item.other_title role='又名' max=5 %} {% endif %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/catalog/templates/_item_card_metadata_tvshow.html b/catalog/templates/_item_card_metadata_tvshow.html index 170123ca..dcbfb4a5 100644 --- a/catalog/templates/_item_card_metadata_tvshow.html +++ b/catalog/templates/_item_card_metadata_tvshow.html @@ -16,5 +16,7 @@ {% include '_people.html' with people=item.other_title role='又名' max=5 %} {% endif %} - {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
+ {% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %} +
{% endblock full %} diff --git a/common/static/scss/_card.scss b/common/static/scss/_card.scss index bc1e0144..cc6188de 100644 --- a/common/static/scss/_card.scss +++ b/common/static/scss/_card.scss @@ -39,14 +39,15 @@ div.item { } } - .full { + .full>div { text-overflow: ellipsis; word-wrap: break-word; overflow: hidden; - -webkit-line-clamp: 4; + -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; font-size: 80%; + } }