add sbot error template

This commit is contained in:
glyph 2022-03-21 11:17:42 +02:00
parent 0353586705
commit a379de179d
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
use maud::{html, Markup, PreEscaped};
/// Sbot error template builder.
///
/// Display a message to the operator when an sbot command returns an error.
pub fn build_template(error_msg: String) -> Markup {
html! {
(PreEscaped("<!-- SBOT ERROR -->"))
div class="card center" {
div class="capsule capsule-container border-danger center-text" {
p class="card-text" style="font-size: var(--font-size-4);" {
"Sbot Error"
}
p class="card-text" { (error_msg) }
p class="card-text" {
"Visit the "
strong {
a href="/settings/scuttlebutt" class="link" {
"Scuttlebutt settings menu"
}
}
" to start the Sbot and then try again."
}
}
}
}
}