mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: missing avatar when sizing down window
This commit is contained in:
parent
da91ab25cf
commit
4e91059f89
2 changed files with 5 additions and 6 deletions
|
@ -123,7 +123,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.avatar {
|
.avatar {
|
||||||
&.latest {
|
&.latest:not(.single) {
|
||||||
@include box-shadow(0 0 6px 1px desaturate(scale-color($tertiary, $lightness: 30%), 35%));
|
@include box-shadow(0 0 6px 1px desaturate(scale-color($tertiary, $lightness: 30%), 35%));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,10 @@ class TopicPostersSummary
|
||||||
TopicPoster.new.tap do |topic_poster|
|
TopicPoster.new.tap do |topic_poster|
|
||||||
topic_poster.user = user
|
topic_poster.user = user
|
||||||
topic_poster.description = descriptions_for(user)
|
topic_poster.description = descriptions_for(user)
|
||||||
topic_poster.extras = 'latest' if include_latest_class?(user)
|
if topic.last_post_user_id == user.id
|
||||||
|
topic_poster.extras = 'latest'
|
||||||
|
topic_poster.extras << ' single' if user_ids.uniq.size == 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -29,10 +32,6 @@ class TopicPostersSummary
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def include_latest_class?(user)
|
|
||||||
topic.last_post_user_id == user.id && user_ids.uniq.size > 1
|
|
||||||
end
|
|
||||||
|
|
||||||
def descriptions_for(user)
|
def descriptions_for(user)
|
||||||
descriptions_by_id[user.id].join ', '
|
descriptions_by_id[user.id].join ', '
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue