From 9bc41e31ec9cc5638bfbd7e255d456952c191dd8 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 2 Mar 2024 21:35:05 +0100 Subject: [PATCH] Remove human-readable "Answered by" answerbox text --- app/views/application/_answerbox.html.haml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/views/application/_answerbox.html.haml b/app/views/application/_answerbox.html.haml index abbf319d..b4b1e537 100644 --- a/app/views/application/_answerbox.html.haml +++ b/app/views/application/_answerbox.html.haml @@ -9,11 +9,19 @@ = markdown a.content - if a.long? && !display_all = render "shared/collapse", type: "answer" + .d-md-flex + .text-muted + .d-flex.align-items-center + .flex-shrink-0 + %a{ href: user_path(a.user) } + = render AvatarComponent.new(user: a.user, size: "sm", classes: ["answerbox__answer-user-avatar"]) + .flex-grow-1 + %h6.answerbox__answer-user + = user_screen_name(a.user) ยท - %i.fa.fa-thumbtack - = t(".pinned") - .col-md-6.d-md-flex.answerbox__actions - = render "answerbox/actions", a:, display_all: + = link_to(time_tooltip(a), answer_path(a.user.screen_name, a.id), data: { selection_hotkey: "l" }) + .d-flex.d-md-block.answerbox__actions.ms-auto + = render "answerbox/actions", a:, display_all: .card-footer{ id: "ab-comments-section-#{a.id}", class: display_all.nil? ? "d-none" : nil } = turbo_frame_tag("ab-reactions-list-#{a.id}", src: reactions_path(a.question, a), loading: :lazy) do .d-flex.smiles