From 0ee20e28335ccb1c86054919f81323a6e0cbeac1 Mon Sep 17 00:00:00 2001 From: schn33fuchs Date: Wed, 3 Jun 2026 16:10:37 +0200 Subject: [PATCH] Icon in the corner --- frontend/index.html | 1 + frontend/src/lib.rs | 1 + frontend/src/pages/basic_pages.rs | 7 +++++++ frontend/src/styles/components/_icon.scss | 17 +++++++++++++++++ frontend/src/styles/main.scss | 3 ++- 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 frontend/src/styles/components/_icon.scss diff --git a/frontend/index.html b/frontend/index.html index 550b2da..3386746 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,6 +5,7 @@ + Yew App diff --git a/frontend/src/lib.rs b/frontend/src/lib.rs index e8e8222..f1a4bcb 100644 --- a/frontend/src/lib.rs +++ b/frontend/src/lib.rs @@ -269,6 +269,7 @@ fn switch(route: Route) -> Html { pub fn app() -> Html { html! { + render={switch} /> } diff --git a/frontend/src/pages/basic_pages.rs b/frontend/src/pages/basic_pages.rs index c918599..7ebbbac 100644 --- a/frontend/src/pages/basic_pages.rs +++ b/frontend/src/pages/basic_pages.rs @@ -109,3 +109,10 @@ pub fn denied_component() -> Html { } } + +#[component(Icon)] +pub fn icon_component() -> Html { + html! { + + } +} diff --git a/frontend/src/styles/components/_icon.scss b/frontend/src/styles/components/_icon.scss new file mode 100644 index 0000000..28272fe --- /dev/null +++ b/frontend/src/styles/components/_icon.scss @@ -0,0 +1,17 @@ +.csg-icon { + position: fixed; + top: 1rem; + right: 1rem; + z-index: 9999; + width: auto; + height: auto; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + + img { + width: auto; + height: auto; + } +} diff --git a/frontend/src/styles/main.scss b/frontend/src/styles/main.scss index 0a2830a..bfaabff 100644 --- a/frontend/src/styles/main.scss +++ b/frontend/src/styles/main.scss @@ -5,6 +5,7 @@ @use "components/tickets"; @use "components/diagnostics"; @use "components/frontpage"; +@use "components/icon"; body { background: variables.$color-bg; @@ -68,4 +69,4 @@ body { } -} \ No newline at end of file +}