diff --git a/src/app.rs b/src/app.rs index 59287cd..210be27 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,18 +1,9 @@ use crate::pages::{About, Home}; use yew::prelude::*; use yew_router::{prelude::*, route::Route, switch::Permissive, Switch}; -use yew_styles::{ - navbar::{ - navbar_component::{Fixed, Navbar}, - navbar_container::NavbarContainer, - navbar_item::NavbarItem, - }, - styles::{Palette, Style}, -}; pub struct App { - navbar_items: Vec, - link: ComponentLink, + _link: ComponentLink, } #[derive(Switch, Debug, Clone)] @@ -25,31 +16,17 @@ pub enum AppRouter { PageNotFound(Permissive), } -pub enum Msg { - ChangeNavbarItem(usize), -} +pub enum Msg {} impl Component for App { type Message = Msg; type Properties = (); - fn create(_: Self::Properties, link: ComponentLink) -> Self { - App { - navbar_items: vec![true, false], - link, - } + fn create(_: Self::Properties, _link: ComponentLink) -> Self { + App { _link } } - fn update(&mut self, msg: Self::Message) -> ShouldRender { - match msg { - Msg::ChangeNavbarItem(index) => { - for (i, _) in self.navbar_items.clone().into_iter().enumerate() { - self.navbar_items[i] = false; - } - - self.navbar_items[index] = true; - } - } + fn update(&mut self, _msg: Self::Message) -> ShouldRender { true } @@ -60,36 +37,6 @@ impl Component for App { fn view(&self) -> Html { html! {
- } - > - - - route=AppRouter::RootPath>{"Home"}> - - {"GitHub"} - - - {"Discord"} - - - route=AppRouter::AboutPath>{"About this Website"}> - - render = Router::render(|switch: AppRouter | { match switch { diff --git a/src/assets/discord-logo.png b/src/assets/discord-logo.png new file mode 100644 index 0000000..820ac08 Binary files /dev/null and b/src/assets/discord-logo.png differ diff --git a/src/assets/github-logo.png b/src/assets/github-logo.png new file mode 100644 index 0000000..192846a Binary files /dev/null and b/src/assets/github-logo.png differ diff --git a/src/pages/home.rs b/src/pages/home.rs index 9c97f20..5e68295 100644 --- a/src/pages/home.rs +++ b/src/pages/home.rs @@ -25,6 +25,14 @@ impl Component for Home { fn view(&self) -> Html { html! { + + + + + + + +

{"Welcome to my website"}

diff --git a/src/styles/main.scss b/src/styles/main.scss index 9748b38..b1688b8 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -27,7 +27,6 @@ body { animation: 1s ease-out 0s 1 appear; } - .content { - margin: 10% 15% 5em; + margin: 5% 15% 5em; } \ No newline at end of file diff --git a/src/styles/pages/home.scss b/src/styles/pages/home.scss index 7298aba..df4fcf4 100644 --- a/src/styles/pages/home.scss +++ b/src/styles/pages/home.scss @@ -27,4 +27,19 @@ margin: auto; display: flex; } +} + +.home-icons { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + + .icon { + padding: 15px; + img { + height: 50px; + width: auto; + } + } } \ No newline at end of file