use splices for template rendering
This commit is contained in:
parent
85231a20c7
commit
3a7b499742
|
@ -55,7 +55,7 @@ pub fn build_template() -> PreEscaped<String> {
|
|||
}
|
||||
(PreEscaped("<!-- middle -->"))
|
||||
a class="middle" {
|
||||
div class={ "circle circle-large" (circle_color) } {
|
||||
div class={ "circle circle-large " (circle_color) } {
|
||||
p style="font-size: 4rem; color: var(--near-black);" {
|
||||
(center_circle_text)
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ pub fn build_template() -> PreEscaped<String> {
|
|||
(PreEscaped("<!-- bottom-left -->"))
|
||||
(PreEscaped("<!-- SYSTEM STATUS LINK AND ICON -->"))
|
||||
a class="bottom-left" href="/status/scuttlebutt" title="Status" {
|
||||
div class={ "circle circle-small border-circle-small" (circle_border) } {
|
||||
div class={ "circle circle-small border-circle-small " (circle_border) } {
|
||||
img class="icon-medium" src="/icons/heart-pulse.svg";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@ use crate::utils::sbot;
|
|||
|
||||
// HTML RENDERING FOR ELEMENTS
|
||||
|
||||
// TODO: refactor this to make better use of splices
|
||||
// https://maud.lambda.xyz/splices-toggles.html
|
||||
|
||||
fn downtime_element(downtime: &Option<String>) -> Markup {
|
||||
match downtime {
|
||||
Some(time) => {
|
||||
|
|
Loading…
Reference in New Issue