From 9cd42987645b3b5a58812ebefbc99e3d8dea3468 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Sun, 7 Jan 2024 23:00:54 +0100 Subject: [PATCH 01/10] Refactor title to nav --- Cargo.lock | 2 +- Cargo.toml | 1 + data_src/posts/test.md | 2 +- src/app/components/mod.rs | 4 ++-- src/app/components/nav.rs | 21 +++++++++++++++++++ src/app/components/title.rs | 17 --------------- src/app/pages/experience.rs | 4 ++-- src/app/pages/home.rs | 2 +- src/app/pages/posts.rs | 12 +++-------- style/nav.css | 30 +++++++++++++++++++++++++++ style/portfolio.css | 8 ++++++-- style/post.css | 41 ++++++++++++++++++++++++------------- style/title.css | 9 -------- style/top_component.css | 6 +++--- 14 files changed, 98 insertions(+), 61 deletions(-) create mode 100644 src/app/components/nav.rs delete mode 100644 src/app/components/title.rs create mode 100644 style/nav.css delete mode 100644 style/title.css diff --git a/Cargo.lock b/Cargo.lock index bbb1144..43d09c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1787,7 +1787,7 @@ checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "portfolio" -version = "0.3.0" +version = "0.4.0" dependencies = [ "actix-files", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index 27bc945..270d96d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ serde = "1.0" # https://carlosted.github.io/icondata/ leptos_icons = { version = "0.1.0", features = [ + "FiMenu", "FiExternalLink", "FaGithubBrands", "FaLinkedinBrands", diff --git a/data_src/posts/test.md b/data_src/posts/test.md index 0cc74e5..f4a940a 100644 --- a/data_src/posts/test.md +++ b/data_src/posts/test.md @@ -17,7 +17,7 @@ tags: ##### Heading 5 ###### Heading 6 -This is a paragraph tag. It's used for displaying text content. +This is a paragraph tag. It's used `for` displaying text content. [Click me to visit Example website!](https://www.example.com) diff --git a/src/app/components/mod.rs b/src/app/components/mod.rs index 2eebd68..169c72b 100644 --- a/src/app/components/mod.rs +++ b/src/app/components/mod.rs @@ -27,8 +27,8 @@ mod loading; pub use loading::Loading; -mod title; +mod nav; -pub use title::Title; +pub use nav::Nav; pub use mon_parcours::MonParcours; diff --git a/src/app/components/nav.rs b/src/app/components/nav.rs new file mode 100644 index 0000000..fb27d95 --- /dev/null +++ b/src/app/components/nav.rs @@ -0,0 +1,21 @@ +use leptos::*; +use leptos_router::*; +use leptos_icons::FiIcon::FiMenu; +use leptos_icons::*; + +#[component] +pub fn Nav() -> impl IntoView { + let (mobile_menu, set_mobile_menu) = create_signal(false); + + view! { + + } +} \ No newline at end of file diff --git a/src/app/components/title.rs b/src/app/components/title.rs deleted file mode 100644 index e834a8d..0000000 --- a/src/app/components/title.rs +++ /dev/null @@ -1,17 +0,0 @@ -use leptos::*; -use leptos_router::A; - -#[component] -pub fn Title( - href: String, - #[prop[optional]] - title: Option -) -> impl IntoView { - view! { -
- r"< Retour" -

{title}

- -
- } -} diff --git a/src/app/pages/experience.rs b/src/app/pages/experience.rs index a216fe7..e05f646 100644 --- a/src/app/pages/experience.rs +++ b/src/app/pages/experience.rs @@ -1,10 +1,10 @@ use leptos::*; -use super::super::components::{Title, MonParcours}; +use super::super::components::{Nav, MonParcours}; #[component] pub fn Experience() -> impl IntoView { view! { +