Añade soporte nativo a Bootstrap con un nuevo tema
This commit is contained in:
parent
d38df3a5b6
commit
7f8b94eafe
37 changed files with 652 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use crate::core::server;
|
||||
use crate::core::theme::{Markup, html};
|
||||
use crate::core::response::page::{Page, PageAssets, PageComponent};
|
||||
use crate::base::component::Chunck;
|
||||
|
||||
/// Los temas deben implementar este "trait".
|
||||
pub trait Theme: Send + Sync {
|
||||
|
|
@ -81,4 +82,15 @@ pub trait Theme: Send + Sync {
|
|||
}
|
||||
*/
|
||||
}
|
||||
|
||||
fn render_error_page(&self, s: server::http::StatusCode) -> server::Result<Markup> {
|
||||
Page::prepare()
|
||||
.with_title(format!("Error {}", s.as_str()).as_str())
|
||||
.add_to("content", Chunck::markup(html! {
|
||||
div {
|
||||
h1 { (s) }
|
||||
}
|
||||
}))
|
||||
.render()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue