Skip to content

Commit 74971c7

Browse files
committed
Bruh, fixed errors
1 parent dc39614 commit 74971c7

3 files changed

Lines changed: 147 additions & 55 deletions

File tree

src/app.rs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
use crate::home::Home;
2+
use crate::resume::Resume;
3+
use leptos::prelude::*;
4+
use leptos_router::components::{A, Route, Router, Routes};
5+
use leptos_router::path;
6+
7+
#[component]
8+
pub fn App() -> impl IntoView {
9+
view! {
10+
<style>
11+
"
12+
:root {
13+
--base: #1e1e2e; --mantle: #181825; --text: #cdd6f4; --subtext: #bac2de;
14+
--pink: #f5c2e7; --mauve: #cba6f7; --green: #a6e3a1; --yellow: #f9e2af;
15+
--red: #f38ba8; --surface: #313244; --surface-border: #45475a;
16+
}
17+
body { margin: 0; background-color: var(--base); color: var(--text); font-family: 'Nunito', system-ui, sans-serif; }
18+
.container { max-width: 950px; margin: 0 auto; padding: 3rem 1.5rem; }
19+
.header { border-bottom: 2px dashed var(--pink); padding-bottom: 2rem; margin-bottom: 3rem; text-align: center; }
20+
.header h1 { color: var(--pink); font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.5rem 0; line-height: 1.2; }
21+
.header p { color: var(--subtext); font-size: 1.1rem; font-style: italic; margin: 0; }
22+
23+
/* Nav bar styling */
24+
.nav-bar { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
25+
.nav-link { text-decoration: none; font-weight: bold; padding: 0.5rem 1.2rem; border-radius: 8px; transition: all 0.2s; }
26+
.nav-link.home { color: var(--mauve); border: 1px solid var(--mauve); }
27+
.nav-link.home:hover { background-color: rgba(203, 166, 247, 0.1); }
28+
.nav-link.resume { color: var(--green); border: 1px solid var(--green); }
29+
.nav-link.resume:hover { background-color: rgba(166, 227, 161, 0.1); }
30+
31+
/* Card styling reused across pages */
32+
.card { background-color: var(--mantle); border-radius: 16px; padding: 2.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
33+
"
34+
</style>
35+
36+
<Router>
37+
<main>
38+
<div class="container">
39+
<header class="header">
40+
<h1>"✨ Sofia Duarte's Mission Control ✨"</h1>
41+
<p>"Aerospace Engineering @ IST 🚀 | RED Rocketry | Embedded Rustacean 🦀"</p>
42+
43+
<nav class="nav-bar">
44+
<a href="/" class="nav-link home">"👾Home"</a>
45+
<a href="/resume" class="nav-link resume">"📄 Resume"</a>
46+
</nav>
47+
</header>
48+
49+
// The Routes component swaps out the page below the header!
50+
<Routes fallback=|| view! { <h2>"404 - Page not found in this orbit."</h2> }>
51+
<Route path=path!("/") view=Home />
52+
<Route path=path!("/resume") view=Resume />
53+
</Routes>
54+
</div>
55+
</main>
56+
</Router>
57+
}
58+
}

src/main.rs

Lines changed: 9 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,12 @@
1-
use crate::home::Home;
2-
use crate::resume::Resume;
3-
use leptos::prelude::*;
4-
use leptos_router::components::{A, Route, Router, Routes};
5-
use leptos_router::path;
6-
7-
#[component]
8-
pub fn App() -> impl IntoView {
9-
view! {
10-
<style>
11-
"
12-
:root {
13-
--base: #1e1e2e; --mantle: #181825; --text: #cdd6f4; --subtext: #bac2de;
14-
--pink: #f5c2e7; --mauve: #cba6f7; --green: #a6e3a1; --yellow: #f9e2af;
15-
--red: #f38ba8; --surface: #313244; --surface-border: #45475a;
16-
}
17-
body { margin: 0; background-color: var(--base); color: var(--text); font-family: 'Nunito', system-ui, sans-serif; }
18-
.container { max-width: 950px; margin: 0 auto; padding: 3rem 1.5rem; }
19-
.header { border-bottom: 2px dashed var(--pink); padding-bottom: 2rem; margin-bottom: 3rem; text-align: center; }
20-
.header h1 { color: var(--pink); font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.5rem 0; line-height: 1.2; }
21-
.header p { color: var(--subtext); font-size: 1.1rem; font-style: italic; margin: 0; }
22-
23-
/* Nav bar styling */
24-
.nav-bar { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
25-
.nav-link { text-decoration: none; font-weight: bold; padding: 0.5rem 1.2rem; border-radius: 8px; transition: all 0.2s; }
26-
.nav-link.home { color: var(--mauve); border: 1px solid var(--mauve); }
27-
.nav-link.home:hover { background-color: rgba(203, 166, 247, 0.1); }
28-
.nav-link.resume { color: var(--green); border: 1px solid var(--green); }
29-
.nav-link.resume:hover { background-color: rgba(166, 227, 161, 0.1); }
30-
31-
/* Card styling reused across pages */
32-
.card { background-color: var(--mantle); border-radius: 16px; padding: 2.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
33-
"
34-
</style>
1+
mod app;
2+
mod home;
3+
mod resume;
354

36-
<Router>
37-
<main>
38-
<div class="container">
39-
<header class="header">
40-
<h1>"✨ Sofia Duarte's Blog ✨"</h1>
41-
<p>"Aerospace Engineering @ IST 🚀 | RED Rocketry | Embedded Rustacean 🦀"</p>
42-
43-
<nav class="nav-bar">
44-
<A href="/" class="nav-link home">"👾Home"</A>
45-
<A href="/resume" class="nav-link resume">" Resume"</A>
46-
</nav>
47-
</header>
5+
use app::App;
6+
use leptos::mount::mount_to_body;
7+
use leptos::prelude::*;
488

49-
// The Routes component swaps out the page below the header!
50-
<Routes fallback=|| view! { <h2>"404 - Page not found in this orbit."</h2> }>
51-
<Route path=path!("/") view=Home />
52-
<Route path=path!("/resume") view=Resume />
53-
</Routes>
54-
</div>
55-
</main>
56-
</Router>
57-
}
9+
fn main() {
10+
console_error_panic_hook::set_once();
11+
mount_to_body(|| view! { <App /> })
5812
}

src/resume.rs

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
use leptos::prelude::*;
2+
3+
#[component]
4+
pub fn Resume() -> impl IntoView {
5+
view! {
6+
<style>
7+
"
8+
.resume { border: 2px solid var(--green); }
9+
.resume h2 { color: var(--green); margin: 0 0 1.5rem 0; text-align: center; font-size: 1.8rem; }
10+
.resume-grid { display: grid; gap: 3rem; }
11+
@media (min-width: 768px) { .resume-grid { grid-template-columns: 1fr 1fr; } }
12+
.section-heading { border-bottom: 1px solid var(--surface-border); padding-bottom: 0.5rem; margin-bottom: 1.5rem; font-size: 1.2rem; margin-top: 0; }
13+
.col-left .section-heading { color: var(--yellow); }
14+
.col-right .section-heading { color: var(--red); }
15+
.experience-list { list-style-type: none; padding: 0; margin: 0; }
16+
.experience-list li { margin-bottom: 1.5rem; }
17+
.role-title { color: var(--text); font-weight: bold; display: block; margin-bottom: 0.3rem; font-size: 1.05rem; }
18+
.role-desc { color: var(--subtext); font-size: 0.95rem; line-height: 1.5; }
19+
.skills-container { display: flex; flex-wrap: wrap; gap: 0.6rem; }
20+
.skill-badge { background-color: var(--surface); color: #f5e0dc; padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.9rem; border: 1px solid var(--surface-border); font-weight: bold; }
21+
22+
.download-btn { background-color: var(--pink); color: var(--base); padding: 0.7rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: bold; display: inline-block; transition: opacity 0.2s; margin-bottom: 2rem; }
23+
.download-btn:hover { opacity: 0.8; }
24+
"
25+
</style>
26+
<section class="card resume">
27+
<h2>"Service Record & Tech Stack"</h2>
28+
29+
<div style="text-align: center;">
30+
// Make sure your PDF is inside the 'public' folder of your project!
31+
<a href="/Sofia_Duarte_CV.pdf" download="Sofia_Duarte_CV.pdf" class="download-btn">
32+
"Download Full CV"
33+
</a>
34+
</div>
35+
36+
<div class="resume-grid">
37+
<div class="col-left">
38+
<h3 class="section-heading">"🚀 Flight & Space Systems"</h3>
39+
<ul class="experience-list">
40+
<li>
41+
<span class="role-title">"Co-Team Leader @ RED Electronics"</span>
42+
<span class="role-desc">"Architecting hybrid rocket flight software on an RTOS. Managing distributed avionics, HIL testing, and driving the transition to embedded Rust."</span>
43+
</li>
44+
<li>
45+
<span class="role-title">"Command & Data Handling @ LISAT"</span>
46+
<span class="role-desc">"Developed cache optimization algorithms to streamline orbit data processing for satellite onboard computers."</span>
47+
</li>
48+
</ul>
49+
50+
<h3 class="section-heading" style="margin-top: 2rem;">"🦀 Open Source & Projects"</h3>
51+
<ul class="experience-list">
52+
<li>
53+
<span class="role-title">"Rust HIL & Ground Station Framework"</span>
54+
<span class="role-desc">"Modular, asynchronous simulation engine for avionics validation using Embassy and Rust."</span>
55+
</li>
56+
</ul>
57+
</div>
58+
59+
<div class="col-right">
60+
<h3 class="section-heading">"💻 Hardware & Embedded"</h3>
61+
<div class="skills-container">
62+
<SkillBadge text="C/C++" /><SkillBadge text="Embedded Rust" /><SkillBadge text="RISC-V" />
63+
<SkillBadge text="STM32 & ESP32" /><SkillBadge text="FreeRTOS" /><SkillBadge text="KiCad" />
64+
</div>
65+
66+
<h3 class="section-heading" style="margin-top: 2.5rem;">"⚙️ Systems & Analysis"</h3>
67+
<div class="skills-container">
68+
<SkillBadge text="Async/Await (Embassy)" /><SkillBadge text="Python" /><SkillBadge text="MATLAB" />
69+
<SkillBadge text="GitHub Actions CI/CD" /><SkillBadge text="Linux/Bash" />
70+
</div>
71+
</div>
72+
</div>
73+
</section>
74+
}
75+
}
76+
77+
#[component]
78+
fn SkillBadge(text: &'static str) -> impl IntoView {
79+
view! { <span class="skill-badge">{text}</span> }
80+
}

0 commit comments

Comments
 (0)