🚑️ fix
All checks were successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
JMARyA 2025-02-19 17:52:23 +01:00
parent f990311222
commit 7fadc681e9
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
4 changed files with 44 additions and 40 deletions

View file

@ -52,12 +52,15 @@ pub trait AssetRoutes {
impl AssetRoutes for rocket::Rocket<Build> { impl AssetRoutes for rocket::Rocket<Build> {
fn mount_assets(self) -> Self { fn mount_assets(self) -> Self {
self.mount("/", routes![ self.mount(
crate::asset::htmx_script_route, "/",
crate::asset::flowbite_css, routes![
crate::asset::flowbite_js, crate::asset::htmx_script_route,
crate::asset::material_css, crate::asset::flowbite_css,
crate::asset::material_font crate::asset::flowbite_js,
]) crate::asset::material_css,
crate::asset::material_font
],
)
} }
} }

View file

@ -26,9 +26,11 @@ pub fn Modal<T: UIWidget + 'static, E: UIWidget + 'static, F: FnOnce(String) ->
) -> (String, PreEscaped<String>) { ) -> (String, PreEscaped<String>) {
let id = uuid::Uuid::new_v4().to_string(); let id = uuid::Uuid::new_v4().to_string();
(format!("modal-{id}"), html! { (
div id=(format!("modal-{id}")) tabindex="-1" aria-hidden="true" class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full" { format!("modal-{id}"),
div class="relative p-4 w-full max-w-2xl max-h-full" { html! {
div id=(format!("modal-{id}")) tabindex="-1" aria-hidden="true" class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full" {
div class="relative p-4 w-full max-w-2xl max-h-full" {
div class="relative bg-white rounded-lg shadow dark:bg-gray-700" { div class="relative bg-white rounded-lg shadow dark:bg-gray-700" {
div class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600" { div class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600" {
@ -49,15 +51,7 @@ pub fn Modal<T: UIWidget + 'static, E: UIWidget + 'static, F: FnOnce(String) ->
(footer(format!("modal-{id}"))) (footer(format!("modal-{id}")))
}; };
}; };
}};
div class="p-4 md:p-5 space-y-4" { },
(body) )
};
div class="flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600" {
(footer(format!("modal-{id}")))
};
};
}};
})
} }

View file

@ -278,10 +278,13 @@ pub fn BottomNavigationTile<T: UIWidget + 'static>(
) -> ClassicWidget<LinkWidget> { ) -> ClassicWidget<LinkWidget> {
Classic( Classic(
"inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group", "inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",
Link(reference, html! { Link(
(icon.map(|x| x.render()).unwrap_or_default()); reference,
span class="text-sm text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500" { (text) }; html! {
}), (icon.map(|x| x.render()).unwrap_or_default());
span class="text-sm text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500" { (text) };
},
),
) )
} }

View file

@ -274,21 +274,25 @@ impl GridElement {
} }
pub fn span(mut self, value: GridElementValue) -> Self { pub fn span(mut self, value: GridElementValue) -> Self {
self.1.push(format!("{}-span-{}", self.2, match value { self.1.push(format!(
GridElementValue::_1 => "1", "{}-span-{}",
GridElementValue::_2 => "2", self.2,
GridElementValue::_3 => "3", match value {
GridElementValue::_4 => "4", GridElementValue::_1 => "1",
GridElementValue::_5 => "5", GridElementValue::_2 => "2",
GridElementValue::_6 => "6", GridElementValue::_3 => "3",
GridElementValue::_7 => "7", GridElementValue::_4 => "4",
GridElementValue::_8 => "8", GridElementValue::_5 => "5",
GridElementValue::_9 => "9", GridElementValue::_6 => "6",
GridElementValue::_10 => "10", GridElementValue::_7 => "7",
GridElementValue::_11 => "11", GridElementValue::_8 => "8",
GridElementValue::_12 => "12", GridElementValue::_9 => "9",
GridElementValue::Auto => "full", GridElementValue::_10 => "10",
})); GridElementValue::_11 => "11",
GridElementValue::_12 => "12",
GridElementValue::Auto => "full",
}
));
self self
} }