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
28
src/base/theme/aliner/mod.rs
Normal file
28
src/base/theme/aliner/mod.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
use crate::prelude::*;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/aliner.rs"));
|
||||
|
||||
pub struct AlinerTheme;
|
||||
|
||||
impl Theme for AlinerTheme {
|
||||
fn name(&self) -> &str {
|
||||
"Aliner"
|
||||
}
|
||||
|
||||
fn configure_theme(&self, cfg: &mut server::web::ServiceConfig) {
|
||||
cfg.service(actix_web_static_files::ResourceFiles::new(
|
||||
"/aliner",
|
||||
generate()
|
||||
));
|
||||
}
|
||||
|
||||
fn before_render_page(&self, page: &mut Page) {
|
||||
page.assets()
|
||||
.add_stylesheet(
|
||||
StyleSheet::source(
|
||||
"/aliner/css/styles.css"
|
||||
)
|
||||
.with_weight(-99)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue