Apply hotkeys on question pages

This commit is contained in:
Karina Kwiatek 2023-03-05 18:53:53 +01:00
parent d684e8d782
commit b22fc0bd16
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@
= render "question", question: @question, hidden: false
= render "question", question: @question, hidden: true
.container.question-page
#answers
#answers{ data: { controller: "navigation" } }
%button.d-none{ data: { hotkey: "j", action: "navigation#down" } }
%button.d-none{ data: { hotkey: "k", action: "navigation#up" } }
- @answers.each do |a|
= render "answerbox", a: a, show_question: false