♻️ Use of manganis for wallpaper pattern
This commit is contained in:
@@ -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 {
|
||||||
|
@@ -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%;
|
||||||
|
Reference in New Issue
Block a user