Change opacity of locked topics.

This commit is contained in:
flash 2019-01-03 17:06:35 +01:00
parent fe58c66d9d
commit f8d9abce0a
2 changed files with 12 additions and 4 deletions

View file

@ -1,7 +1,7 @@
.forum__topic {
border-radius: 2px;
background-color: fade(#111, 60%);
transition: background-color .2s, box-shadow .2s;
transition: background-color .2s, box-shadow .2s, opacity .2s;
&:nth-child(even) {
background-color: fade(#191919, 60%);
@ -17,14 +17,21 @@
}
&--deleted {
opacity: .5;
transition: opacity .2s;
opacity: .4;
&:hover {
opacity: .8;
}
}
&--locked {
opacity: .6;
&:hover {
opacity: 1;
}
}
&__link {
display: block;
position: absolute;

View file

@ -241,6 +241,7 @@
{% macro forum_topic_entry(topic, topic_type, topic_unread) %}
{% set topic_type = topic_type|default(null) %}
{% set topic_unread = topic_unread|default(topic.topic_unread|default(false)) ? 'unread' : 'read' %}
{% set topic_important = topic.topic_type == constant('MSZ_TOPIC_TYPE_STICKY') or topic.topic_type == constant('MSZ_TOPIC_TYPE_ANNOUNCEMENT') or topic.topic_type == constant('MSZ_TOPIC_TYPE_GLOBAL_ANNOUNCEMENT') %}
{% if topic_type is null %}
{% if topic.topic_deleted is defined and topic.topic_deleted is not null %}
@ -258,7 +259,7 @@
{% endif %}
{% endif %}
<div class="forum__topic{% if topic.topic_deleted is not null %} forum__topic--deleted{% endif %}">
<div class="forum__topic{% if topic.topic_deleted is not null %} forum__topic--deleted{% elseif topic.topic_locked is not null and not topic_important %} forum__topic--locked{% endif %}">
<a href="/forum/topic.php?t={{ topic.topic_id }}" class="forum__topic__link"></a>
<div class="forum__topic__container">