hyaenidae/server/templates/comments/report.rs.html

42 lines
1.6 KiB
HTML
Raw Normal View History

@use crate::comments::ReportView;
@use crate::nav::NavState;
@use crate::templates::layouts::home;
@use crate::templates::comments::profile_box;
@use hyaenidae_toolkit::{templates::button_group, Button};
@use hyaenidae_toolkit::{templates::{card, card_title, card_body}, Card};
@use hyaenidae_toolkit::templates::text_input;
@(view: &ReportView, nav_state: &NavState)
@:home("Report Comment", &format!("Report comment by {}", view.author.name()), nav_state, {}, {
@:card(Card::full_width().dark(nav_state.dark()), {
@:card_title({ Report Comment })
@:card_body({
<div class="comment">
<div class="comment-body">
@:profile_box(&view.author, &view.comment, &view.parent, nav_state.dark(), {}, {
<div class="comment-text">
@view.comment.body()
</div>
})
</div>
</div>
})
@:card_body({
<form method="POST" action="@view.report_path()">
<h3>Report Comment</h3>
<p>
Please include any relevant information for moderators to act on this report.
</p>
@:text_input(&view.input)
<div class="button-section">
@:button_group(&[
Button::primary("Report").dark(nav_state.dark()),
Button::secondary("Back to Comment").href(&view.comment_path()).dark(nav_state.dark()),
])
</div>
</form>
})
})
})