♻️ Use of manganis for wallpaper pattern

This commit is contained in:
2024-09-22 18:49:56 +02:00
parent 27934c7fc9
commit 5206fb13c8
2 changed files with 6 additions and 1 deletions

View File

@@ -7,6 +7,11 @@ turf::style_sheet!("src/ui/components/wallpaper.scss");
#[component] #[component]
pub fn Wallpaper(display_version: Option<bool>) -> Element { pub fn Wallpaper(display_version: Option<bool>) -> Element {
let background_image = format!(
"url({})",
manganis::mg!(file("public/images/wallpaper-pattern.svg"))
);
let version = display_version.map(|flag| if flag { Some(GIT_VERSION) } else { None }); let version = display_version.map(|flag| if flag { Some(GIT_VERSION) } else { None });
rsx! { rsx! {
@@ -17,6 +22,7 @@ pub fn Wallpaper(display_version: Option<bool>) -> Element {
div { div {
class: ClassName::WALLPAPER_CONTENT, class: ClassName::WALLPAPER_CONTENT,
background_image: "{background_image}",
} }
div { div {

View File

@@ -12,7 +12,6 @@
overflow: hidden; overflow: hidden;
&__content { &__content {
background-image: url("./images/wallpaper-pattern.svg");
background-position: center; background-position: center;
width: 150%; width: 150%;