Icon #42
@@ -5,6 +5,7 @@
|
||||
<link data-trunk rel="rust" data-bin="bin" />
|
||||
<link data-trunk rel="scss" href="src/styles/main.scss" />
|
||||
<link data-trunk rel="icon" href="src/assets/favicon.ico" type="image/x-icon" />
|
||||
<link data-trunk rel="copy-dir" href="src/assets" />
|
||||
<meta charset="utf-8" />
|
||||
<title>Yew App</title>
|
||||
</head>
|
||||
|
||||
@@ -269,6 +269,7 @@ fn switch(route: Route) -> Html {
|
||||
pub fn app() -> Html {
|
||||
html! {
|
||||
<BrowserRouter>
|
||||
<basic_pages::Icon/>
|
||||
<Switch<Route> render={switch} />
|
||||
</BrowserRouter>
|
||||
}
|
||||
|
||||
@@ -109,3 +109,10 @@ pub fn denied_component() -> Html {
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
#[component(Icon)]
|
||||
pub fn icon_component() -> Html {
|
||||
html! {
|
||||
<img src="assets/csg.png" class="csg-icon" />
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user