From 5f97fa1ddbb2ef7cce3428c2c370c350b322492c Mon Sep 17 00:00:00 2001 From: Ruben Kharel Date: Wed, 8 May 2024 18:49:43 -0400 Subject: [PATCH] Resume complete --- src/_data/projects.toml | 6 --- src/custom_widgets.rs | 9 +++- src/pages/resume.rs | 81 +++++++++++++----------------------- src/pages/resume/projects.rs | 18 +------- 4 files changed, 38 insertions(+), 76 deletions(-) diff --git a/src/_data/projects.toml b/src/_data/projects.toml index b11dff4..2755b20 100644 --- a/src/_data/projects.toml +++ b/src/_data/projects.toml @@ -1,7 +1,5 @@ [[project]] name = "eReKon" -role = "Developer, Open-Source Contributor" -duration = "2021 — Present" url = "https://github.com/rukh-debug/erekon" description = """ eReKon is a web recon tool that helps search and scan information related to a website or domain. It mines domain info, gathers subdomains, scrapes and indexes public information, finds website technologies, and retrieves DNS and WHOIS information. In a nutshell, it is a single solution to quickly identify public information, find hidden targets, and monitor changes. @@ -9,8 +7,6 @@ eReKon is a web recon tool that helps search and scan information related to a w [[project]] name = "talking-pdf" -role = "React Dev, Open-Source Contributor" -duration = "2023 — Present" url = "https://rubenk.dev/talking-pdf" description = """ A simple web app that takes PDF as input and lets you interact with it through a chat interface. It is built using React, Next.js, and SCSS. Powered by OpenAI's GPT-3 API. @@ -18,8 +14,6 @@ A simple web app that takes PDF as input and lets you interact with it through a [[project]] name = "vstatus" -role = "Developer" -duration = "2023 — Present" url = "https://github.com/rukh-debug/vstatus" description = """ vstatus is a Visual Studio Code extension that tracks your workspace and file durations, generates insightful activity visualizations, and provides a live status image via an HTTP server. Initially intended to be used for a GitHub readme page. diff --git a/src/custom_widgets.rs b/src/custom_widgets.rs index a5d1999..61ae49b 100644 --- a/src/custom_widgets.rs +++ b/src/custom_widgets.rs @@ -43,6 +43,13 @@ pub fn separator_size(ui: &mut egui::Ui, large: bool) { } } +pub fn resume_section_seperator(ui: &mut egui::Ui, title: &str) { + ui.add_space(10.0); + ui.separator(); + ui.monospace(title); + ui.separator(); +} + pub fn wrapped_label(ui: &mut egui::Ui, text: &str) { ui.add(egui::Label::new(text).wrap(true)); -} \ No newline at end of file +} diff --git a/src/pages/resume.rs b/src/pages/resume.rs index 20df74c..b54667c 100644 --- a/src/pages/resume.rs +++ b/src/pages/resume.rs @@ -17,7 +17,7 @@ mod interests; pub use self::links::Links; mod links; -pub use crate::custom_widgets::{footer, powered_by_egui_and_eframe, wrapped_label}; +pub use crate::custom_widgets::{footer, powered_by_egui_and_eframe, wrapped_label, resume_section_seperator}; #[derive(Debug, serde::Deserialize, serde::Serialize)] struct Resume { @@ -186,7 +186,6 @@ impl eframe::App for ResumePage { .show(ctx, |ui| { egui::ScrollArea::vertical().show(ui, |ui| { make_header(ui, &mut self.resume); - if self.resume.sections.skills { make_skills(ui, &mut self.resume); } @@ -196,14 +195,12 @@ impl eframe::App for ResumePage { if self.resume.sections.recognition { make_recognition(ui, &mut self.resume); } - if self.resume.sections.education { make_education(ui, &mut self.resume) } if self.resume.sections.projects { make_projects(ui, &mut self.resume); } - if self.resume.sections.interests { make_interests(ui, &mut self.resume); } @@ -244,10 +241,7 @@ fn make_header(ui: &mut Ui, resume: &mut Resume) { } fn make_skills(ui: &mut Ui, resume: &mut Resume) { - ui.add_space(20.0); - ui.separator(); - ui.monospace("Skills"); - ui.separator(); + resume_section_seperator(ui, "Skills"); ui.label(format!("{}", resume.skills.name)); ui.label(format!("{}", resume.skills.description)); @@ -289,14 +283,11 @@ fn make_skills(ui: &mut Ui, resume: &mut Resume) { } fn make_experience(ui: &mut Ui, resume: &mut Resume, ctx: &egui::Context) { - ui.add_space(20.0); - ui.separator(); - ui.monospace("Experience"); - ui.separator(); + resume_section_seperator(ui, "Experience"); for experience in &resume.experience.experiences { install_image_loaders(ctx); - + ui.add_space(10.0); ui.horizontal(|ui| { let image = format!("{}", experience.logo); // image url should be provided ui.image(image); @@ -304,7 +295,7 @@ fn make_experience(ui: &mut Ui, resume: &mut Resume, ctx: &egui::Context) { ui.separator(); ui.label(&experience.url); }); - ui.add_space(10.0); + ui.add_space(5.0); for role in &experience.roles { ui.monospace(&role.title); ui.horizontal(|ui| { @@ -316,20 +307,15 @@ fn make_experience(ui: &mut Ui, resume: &mut Resume, ctx: &egui::Context) { for highlight in &role.highlights { wrapped_label(ui, &highlight) } - ui.add_space(5.0); - } - // if this is the last iteration dont show the separator - if !std::ptr::eq(experience, resume.experience.experiences.last().unwrap()) { - ui.separator(); + ui.add_space(8.0); } } } fn make_recognition(ui: &mut Ui, resume: &mut Resume) { - ui.add_space(20.0); - ui.separator(); - ui.monospace("Recognition"); - ui.separator(); + resume_section_seperator(ui, "Recognition"); + + ui.add_space(10.0); let stroke: egui::Stroke = egui::Stroke::new(1.0, egui::Color32::from_rgb(128, 128, 128)); egui::ScrollArea::horizontal() @@ -370,12 +356,10 @@ fn make_recognition(ui: &mut Ui, resume: &mut Resume) { } fn make_education(ui: &mut Ui, resume: &mut Resume) { - ui.add_space(20.0); - ui.separator(); - ui.monospace("Education"); - ui.separator(); + resume_section_seperator(ui, "Education"); for education in &resume.education.educations { + ui.add_space(10.0); ui.monospace(format!("{}", education.degree)); ui.horizontal(|ui| { ui.label(format!("{}", education.uni)); @@ -384,46 +368,37 @@ fn make_education(ui: &mut Ui, resume: &mut Resume) { }); ui.spacing(); ui.label(format!("{}", education.summary)); - // if this is the last iteration dont show the separator - if !std::ptr::eq(education, resume.education.educations.last().unwrap()) { - ui.separator(); - } } } fn make_projects(ui: &mut Ui, resume: &mut Resume) { + resume_section_seperator(ui, "Projects"); + for project in &resume.projects.projects { ui.monospace(format!("{}", project.name)); - ui.horizontal(|ui| { - ui.label(format!("{}", project.role)); - ui.separator(); - ui.label(format!("{}", project.duration)); - }); - ui.spacing(); - ui.label(format!("{}", project.description)); - // if this is the last iteration dont show the separator - if !std::ptr::eq(project, resume.projects.projects.last().unwrap()) { - ui.separator(); - } + wrapped_label(ui, &project.description); } } fn make_interests(ui: &mut Ui, resume: &mut Resume) { + resume_section_seperator(ui, "Other Interest"); + for interest in &resume.interests.interests { - ui.label(format!("{}", interest.description)); - // if this is the last iteration dont show the separator - if !std::ptr::eq(interest, resume.interests.interests.last().unwrap()) { - ui.separator(); - } + // ui.label(format!("{}", interest.description)); + wrapped_label(ui, &interest.description) } } fn make_links(ui: &mut Ui, resume: &mut Resume) { - for link in &resume.links.links { - ui.hyperlink_to(link.name.clone(), link.url.clone()); - // if this is the last iteration dont show the separator - if !std::ptr::eq(link, resume.links.links.last().unwrap()) { - ui.separator(); + resume_section_seperator(ui, "Links"); + + ui.horizontal(|ui| { + for link in &resume.links.links { + ui.hyperlink_to(&link.name, &link.url); + // if this is the last iteration dont show the separator + if !std::ptr::eq(link, resume.links.links.last().unwrap()) { + ui.separator(); + } } - } + }); } diff --git a/src/pages/resume/projects.rs b/src/pages/resume/projects.rs index 846bd89..f0af6d0 100644 --- a/src/pages/resume/projects.rs +++ b/src/pages/resume/projects.rs @@ -6,18 +6,14 @@ pub struct Projects { #[derive(Debug, serde::Deserialize, serde::Serialize)] pub struct Project { pub name: String, - pub role: String, - pub duration: String, pub url: String, pub description: String, } impl Project { - fn new(name: String, role: String, duration: String, url: String, description: String) -> Self { + fn new(name: String, url: String, description: String) -> Self { Project { name, - role, - duration, url, description, } @@ -39,16 +35,6 @@ impl Default for Projects { .and_then(|s| s.as_str()) .unwrap_or("") .to_string(); - let role = x - .get("role") - .and_then(|s| s.as_str()) - .unwrap_or("") - .to_string(); - let duration = x - .get("duration") - .and_then(|s| s.as_str()) - .unwrap_or("") - .to_string(); let url = x .get("url") .and_then(|s| s.as_str()) @@ -60,7 +46,7 @@ impl Default for Projects { .unwrap_or("") .to_string(); - Project::new(name, role, duration, url, description) + Project::new(name, url, description) }) .collect();