Show indicator for pinned answers

This commit is contained in:
Karina Kwiatek 2023-02-07 23:12:13 +01:00
parent 6cbce2c157
commit de73532bef
3 changed files with 18 additions and 0 deletions

View file

@ -82,11 +82,23 @@
}
}
&__pinned {
display: none;
}
.card-body {
padding-bottom: .6rem;
}
}
#pinned-answers {
.answerbox {
&__pinned {
display: inline;
}
}
}
body:not(.cap-web-share) {
[name="ab-share"] {
display: none;

View file

@ -27,6 +27,11 @@
.col-md-6.text-start.text-muted
%i.fa.fa-clock-o
= link_to(raw(t("time.distance_ago", time: time_tooltip(a))), answer_path(a.user.screen_name, a.id), class: "answerbox__permalink")
- if instance_variable_defined?(:@user) && @user == a.user && a.pinned_at.present?
%span.answerbox__pinned
·
%i.fa.fa-thumbtack
= t(".pinned")
.col-md-6.d-md-flex.answerbox__actions
= render "answerbox/actions", a: a, display_all: display_all
.card-footer{ id: "ab-comments-section-#{a.id}", class: display_all.nil? ? "d-none" : nil }

View file

@ -126,6 +126,7 @@ en:
read: "Read the entire answer"
answered: "%{hide} %{user}" # resolves into "Answered by %{user}"
hide: "Answered by"
pinned: "Pinned"
questionbox:
title: "Ask something!"
placeholder: "Type your question here…"