From c5fa636b39829806dda219a5b080f09d6e8b2fad Mon Sep 17 00:00:00 2001 From: darkicewolf50 Date: Wed, 23 Apr 2025 12:27:47 -0600 Subject: [PATCH] feat(dioxus): added all techs/tools to hashmap --- assets/styling/projectCards.css | 11 +- src/helper_fun.rs | 172 +++++++++++++++++++++++++++++++- src/views/projects.rs | 16 ++- 3 files changed, 195 insertions(+), 4 deletions(-) diff --git a/assets/styling/projectCards.css b/assets/styling/projectCards.css index a5a9e95..fa5f0aa 100644 --- a/assets/styling/projectCards.css +++ b/assets/styling/projectCards.css @@ -1,8 +1,15 @@ +.project-section { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} .project-card { display: flex; flex-direction: column; flex-wrap: wrap; /* background-color: aqua; */ + flex: 0 1 48%; + gap: 1svw; } .project-card img { @@ -18,8 +25,8 @@ border-bottom: var(--underlineTitle); width: 80%; - margin: 0px 4svw; - padding: 0px 4svw; + margin: 0px 2svw; + padding: 0px 2svw; justify-content: space-between; align-items: center; diff --git a/src/helper_fun.rs b/src/helper_fun.rs index b014269..6cf09ad 100644 --- a/src/helper_fun.rs +++ b/src/helper_fun.rs @@ -11,12 +11,20 @@ pub fn get_tech_logos_from_str(used_tech: &'static str) -> Element { #[derive(PartialEq, Props, Clone, Copy)] pub struct TechDes { - // to be removed soon pub lang_logo: &'static str, pub project_site: &'static str, pub skill_level: u8, } +#[derive(PartialEq, Props, Clone)] +pub struct ProjectDes { + website_prop: Option<&'static str>, + github_prop: Option<&'static str>, + project_name: &'static str, + techs_used: Vec<&'static str>, + project_des: &'static str, +} + pub fn tech_table_lookup(to_lookup: &str) -> TechDes { let techs_tools_frameworks_lookup = HashMap::from([ ( @@ -115,6 +123,168 @@ pub fn tech_table_lookup(to_lookup: &str) -> TechDes { skill_level: 99, }, ), + ( + "React", + TechDes { + lang_logo: "https://www.svgrepo.com/show/452092/react.svg", + project_site: "https://react.dev", + skill_level: 60, + }, + ), + ( + "Docker", + TechDes { + lang_logo: "https://www.svgrepo.com/show/448221/docker.svg", + project_site: "https://www.docker.com", + skill_level: 70, + }, + ), + ( + "FastAPI", + TechDes { + lang_logo: "https://fastapi.tiangolo.com/img/favicon.png", + project_site: "https://fastapi.tiangolo.com", + skill_level: 80, + }, + ), + ( + "Actix", + TechDes { + lang_logo: "https://actix.rs/img/logo.png", + project_site: "https://actix.rs", + skill_level: 20, + }, + ), + ( + "HTML5", + TechDes { + lang_logo: "https://www.svgrepo.com/show/452228/html-5.svg", + project_site: "https://google.com", + skill_level: 90, + }, + ), + ( + "CSS", + TechDes { + lang_logo: "https://www.svgrepo.com/show/452185/css-3.svg", + project_site: "https://google.com", + skill_level: 40, + }, + ), + ( + "Git", + TechDes { + lang_logo: "https://www.svgrepo.com/show/452210/git.svg", + project_site: "https://git-scm.com", + skill_level: 50, + }, + ), + ( + "Github Actions", + TechDes { + lang_logo: "https://cdn.simpleicons.org/githubactions/2088FF", + project_site: "https://github.com/", + skill_level: 40, + }, + ), + ( + "Vs Code", + TechDes { + lang_logo: "https://www.svgrepo.com/show/452129/vs-code.svg", + project_site: "https://code.visualstudio.com", + skill_level: 60, + }, + ), + ( + "Gitea", + TechDes { + lang_logo: "https://www.svgrepo.com/show/349372/gitea.svg", + project_site: "https://about.gitea.com", + skill_level: 85, + }, + ), + ( + "AWS", + TechDes { + lang_logo: "https://www.svgrepo.com/show/448266/aws.svg", + project_site: "https://aws.amazon.com", + skill_level: 30, + }, + ), + ( + "Firefox", + TechDes { + lang_logo: + "https://www.svgrepo.com/show/378808/firefox-developer-edition-57-70.svg", + project_site: "https://www.mozilla.org/en-CA/firefox/developer/", + skill_level: 80, + }, + ), + ( + "Markdown", + TechDes { + lang_logo: "https://www.svgrepo.com/show/510065/markdown.svg", + project_site: "https://www.markdownguide.org", + skill_level: 90, + }, + ), + ( + "Prettier", + TechDes { + lang_logo: "https://prettier.io/icon.png +", + project_site: "https://prettier.io", + skill_level: 90, + }, + ), + ( + "DynamoDB", + TechDes { + lang_logo: "https://www.svgrepo.com/show/473526/amazondynamodb.svg", + project_site: "https://aws.amazon.com/dynamodb/", + skill_level: 20, + }, + ), + ( + "Cloudflare", + TechDes { + lang_logo: "https://qualified-production.s3.us-east-1.amazonaws.com/uploads/3b522ef84c409e4457032e4b4e3b984abbc92522c6f100f4ccc55c0ccfd3062b.png", + project_site: "https://www.cloudflare.com/en-ca/", + skill_level: 35, + }, + ), + ( + "Netlify", + TechDes { + lang_logo: "https://qualified-production.s3.us-east-1.amazonaws.com/uploads/0f63ae7280d8d193e346973a1915bf99aea8c63e254eb062bad0bde99b43a9b7.png", + project_site: "https://www.netlify.com", + skill_level: 34, + }, + ), + ( + "Vercel", + TechDes { + lang_logo: "https://www.svgrepo.com/show/361653/vercel-logo.svg", + project_site: "https://vercel.com/home", + skill_level: 30 + }, + ), + ( + "Dioxus", + TechDes { + lang_logo: "https://dioxuslabs.com/assets/smalllogo-b1926fd214dc8427.png", + project_site: "https://dioxuslabs.com", + skill_level: 40, + }, + ), + ( + "Vue", + TechDes { + lang_logo: "https://vuejs.org/logo.svg", + project_site: "https://vuejs.org", + skill_level: 1, + }, + ), ]); techs_tools_frameworks_lookup[to_lookup] diff --git a/src/views/projects.rs b/src/views/projects.rs index 3537e6a..6c0553c 100644 --- a/src/views/projects.rs +++ b/src/views/projects.rs @@ -8,7 +8,7 @@ pub fn Projects() -> Element { h2 { "Projects" } p { "Top Featured and Recent Projects" } } - div { + div { class: "project-section", ProjectCards { project_name: "Project Name", website_prop: "https://google.com", @@ -16,6 +16,20 @@ pub fn Projects() -> Element { techs_used: vec!["Rust", "Rust", "Rust", "Rust", "Rust", "Rust", "Rust"], project_des: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet risus tristique nisi euismod elementum. Duis et est sed neque pulvinar sodales sit amet non purus. Nam ut ultrices enim. Vestibulum blandit sapien dui. Aliquam sit amet ex quis lectus consectetur tempor at non arcu. Curabitur placerat justo sed nulla lobortis molestie. Sed eget justo sit amet justo lobortis tempus. Phasellus laoreet leo est, in lacinia ante aliquet ut. Etiam ultricies fermentum dolor id pretium. Sed dictum nisl id felis pulvinar varius.", } + ProjectCards { + project_name: "Project Name 2", + website_prop: "https://google.com", + github_prop: "https://google.com", + techs_used: vec!["Rust", "Rust", "Rust", "Rust", "Rust", "Rust", "Rust"], + project_des: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet risus tristique nisi euismod elementum. Duis et est sed neque pulvinar sodales sit amet non purus. Nam ut ultrices enim. Vestibulum blandit sapien dui. Aliquam sit amet ex quis lectus consectetur tempor at non arcu. Curabitur placerat justo sed nulla lobortis molestie. Sed eget justo sit amet justo lobortis tempus. Phasellus laoreet leo est, in lacinia ante aliquet ut. Etiam ultricies fermentum dolor id pretium. Sed dictum nisl id felis pulvinar varius.", + } + ProjectCards { + project_name: "Project Name 3", + website_prop: "https://google.com", + github_prop: "https://google.com", + techs_used: vec!["Rust", "Rust", "Rust", "Rust", "Rust", "Rust", "Rust"], + project_des: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet risus tristique nisi euismod elementum. Duis et est sed neque pulvinar sodales sit amet non purus. Nam ut ultrices enim. Vestibulum blandit sapien dui. Aliquam sit amet ex quis lectus consectetur tempor at non arcu. Curabitur placerat justo sed nulla lobortis molestie. Sed eget justo sit amet justo lobortis tempus. Phasellus laoreet leo est, in lacinia ante aliquet ut. Etiam ultricies fermentum dolor id pretium. Sed dictum nisl id felis pulvinar varius.", + } } } }