use css rule instead of js to hide mark buttons for TVShow and Work

This commit is contained in:
mein Name 2025-02-28 07:38:24 -05:00 committed by Henri Dickson
parent d3cf4da641
commit a162db081a
3 changed files with 25 additions and 4 deletions
catalog/templates
common/static/scss

View file

@ -9,7 +9,8 @@
{% load duration %}
{% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}" class="item-page">
<html lang="{{ LANGUAGE_CODE }}"
class="item-page item-type-{{ item.get_type }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -64,12 +65,12 @@
{% endif %}
{% endfor %}
</div>
<div class="tv-tip" style="display:none;">
<div class="tvshow-tip">
{% trans 'select one of the seasons to comment' %}
{% if item.class_name == 'tvshow' %}
{% with item.all_seasons as seasons %}
{% if seasons %}
<div _="init hide .item-mark-buttons then hide .item-mark-icon then show .tv-tip end">
<div>
{% for s in seasons %}
<span class="season-number">
<a href="{{ s.url }}">{{ s.season_number|default:"#" }}</a>

View file

@ -12,7 +12,7 @@
<div>{% include '_people.html' with people=item.author role='author' max=5 %}</div>
{% endblock %}
{% block left_sidebar %}
<div _="init hide .item-mark-buttons then hide .item-mark-icon end">
<div>
<details open>
<summary>{% trans 'Editions' %}</summary>
{% for b in item.editions.all %}

View file

@ -29,6 +29,10 @@
}
.tvshow-tip {
display: none;
}
span.season-number {
line-height: 1.2em;
display: inline-block;
@ -207,3 +211,19 @@
}
}
}
.item-type-TVShow {
.tvshow-tip {
display: unset;
}
.item-mark-buttons {
display: none;
}
}
.item-type-Work {
.item-mark-buttons {
display: none;
}
}