Skip to content

Commit

Permalink
Resume complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Kharel committed May 8, 2024
1 parent 7f0f230 commit 5f97fa1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 76 deletions.
6 changes: 0 additions & 6 deletions src/_data/projects.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
[[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.
"""

[[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.
"""

[[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.
Expand Down
9 changes: 8 additions & 1 deletion src/custom_widgets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
81 changes: 28 additions & 53 deletions src/pages/resume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -289,22 +283,19 @@ 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);
ui.monospace(&experience.company);
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| {
Expand All @@ -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()
Expand Down Expand Up @@ -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));
Expand All @@ -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();
}
}
}
});
}
18 changes: 2 additions & 16 deletions src/pages/resume/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand All @@ -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())
Expand All @@ -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();

Expand Down

0 comments on commit 5f97fa1

Please sign in to comment.