💄 Change to THEME_DEFAULT name & improve regions

This commit is contained in:
Manuel Cillero 2024-02-27 17:48:40 +01:00
parent 2cd1d1332c
commit 470223e684
4 changed files with 28 additions and 18 deletions

View file

@ -1,5 +1,5 @@
use crate::base::component::add_base_assets;
use crate::core::theme::all::{theme_by_single_name, THEME};
use crate::core::theme::all::{theme_by_single_name, THEME_DEFAULT};
use crate::core::theme::ThemeRef;
use crate::html::{html, Assets, HeadScript, HeadStyles, JavaScript, Markup, StyleSheet};
use crate::locale::{LanguageIdentifier, LANGID_DEFAULT};
@ -47,7 +47,7 @@ impl Context {
Context {
request,
langid : &LANGID_DEFAULT,
theme : *THEME,
theme : *THEME_DEFAULT,
stylesheet: Assets::<StyleSheet>::new(), // Stylesheets.
headstyles: Assets::<HeadStyles>::new(), // Styles in head.
javascript: Assets::<JavaScript>::new(), // JavaScripts.
@ -64,7 +64,7 @@ impl Context {
self.langid = langid;
}
ContextOp::Theme(theme_name) => {
self.theme = theme_by_single_name(theme_name).unwrap_or(*THEME);
self.theme = theme_by_single_name(theme_name).unwrap_or(*THEME_DEFAULT);
}
// Stylesheets.