Skip to content

Commit

Permalink
create jobs outside of root, add os
Browse files Browse the repository at this point in the history
  • Loading branch information
Austionian committed Mar 23, 2024
1 parent e0ec585 commit 7175569
Show file tree
Hide file tree
Showing 6 changed files with 2,665 additions and 62 deletions.
Binary file added assets/images/100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/os.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,597 changes: 2,596 additions & 1 deletion assets/styles.css

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions src/job.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#[derive(serde::Serialize, Clone)]
pub struct Job {
company: &'static str,
title: &'static str,
start_year: &'static str,
end_year: &'static str,
image: &'static str,
tech: [&'static str; 5],
description: &'static str,
link: &'static str,
}

pub static JOBS: [Job; 3] = [
Job {
company: "Northwestern Mutual",
title: "Software Engineer",
start_year: "2022",
end_year: "Present",
image: "nm.webp",
tech: ["React", "Redux", "TypeScript", "Express", "Graphql"],
description: "I work on the client website building new products, \
supporting legacy apps, and contributing to interal libraries \
to support easier development. Helped transition the org to \
Graphql. Lead the team in testing and performance strategies \
for our React code and subgraph.<br /><br />Was recognized as \
the individual contributor of Q2 2023 of Northwestern Mutual’s \
web and mobile engineers for having decreased the entire client \
website’s LCP by ~500ms. Also decreased the SSI header's size \
by 57% (2 MB).",
link: "https://northwesternmutual.com",
},
Job {
company: "Oxidized Systems",
title: "Owner, Software Engineer",
start_year: "2021",
end_year: "Present",
image: "os.png",
tech: ["Rust", "Actix", "TypeScript", "Qwik", "Postgres"],
description: "Previous work includes converting a headless JS app into a \
Qwik/ Qwik-City (TypeScript) frontend and an Actix (Rust) backend \
for web and native mobile clients to consume.<br /><br />The \
frontend scores <image src=\"assets/images/100.png\" style=\"height: 2rem; display: inline\"/> \
across every Lighthouse metric on <span style=\"font-weight: bold\">both</span> web and mobile. \
The backend test coverage is over 65%.",
link: "https://oxidized.systems",
},
Job {
company: "Catholic Charities of St. Paul and Minneapolis",
title: "Software Developer/ Administrator",
start_year: "2017",
end_year: "2022",
image: "ccspm.webp",
tech: ["Python", "Django", "Flask", "Postgres", "HTMX"],
description: "I built and maintained internal web apps (Flask and \
Django) for critical agency wide functions, e.g. critical \
incidents, employee management. Also administrated and built out \
instances of SharePoint and EHR (Credible).",
link: "https://cctwincities.org",
},
];
9 changes: 8 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod configuration;
mod frontmatter;
mod helpers;
mod job;
mod project;
mod routes;

Expand All @@ -15,6 +16,7 @@ use tower_http::trace::TraceLayer;

pub use configuration::get_configuration;
pub use frontmatter::FrontMatter;
use job::{Job, JOBS};
pub use project::Project;

lazy_static! {
Expand All @@ -36,6 +38,7 @@ lazy_static! {
pub struct AppState {
posts: Vec<FrontMatter>,
projects: Vec<Project>,
jobs: &'static [Job; 3],
}

pub fn startup() -> Result<Router, String> {
Expand Down Expand Up @@ -68,7 +71,11 @@ pub fn startup() -> Result<Router, String> {
Err(e) => Err(format!("Unable to read files in projects directory, {}", e)),
}?;

let state = AppState { posts, projects };
let state = AppState {
posts,
projects,
jobs: &JOBS,
};

let blog_routes = Router::new()
.route("/", get(routes::blog))
Expand Down
61 changes: 1 addition & 60 deletions src/routes/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,10 @@ use crate::{AppState, TEMPLATES};
use axum::{extract::State, response::Html};
use std::sync::Arc;

#[derive(serde::Serialize)]
struct Job {
company: &'static str,
title: &'static str,
start_year: &'static str,
end_year: &'static str,
image: &'static str,
tech: Vec<&'static str>,
description: &'static str,
link: &'static str,
}

/// Handler to return the website's index and display
/// a certain number of posts from the app's state.
pub async fn root(State(state): State<Arc<AppState>>) -> Html<String> {
let mut context = tera::Context::new();
let jobs: [Job; 3] = [
Job {
company: "Northwestern Mutual",
title: "Software Engineer",
start_year: "2022",
end_year: "Present",
image: "nm.webp",
tech: vec!["React", "Redux", "TypeScript", "Express", "Graphql"],
description: "I work on the client website building new products, \
supporting legacy apps, and contributing to interal libraries \
to support easier development. Helped transition the org to \
Graphql. Lead the team in testing and performance strategies \
for our React code and subgraph.<br /><br />Was recognized as \
the individual contributor of Q2 2023 of Northwestern Mutual’s \
web and mobile engineers for having decreased the entire client \
website’s LCP by ~500ms. Also decreased the SSI header's size \
by 57% (2 MB).",
link: "https://northwesternmutual.com",
},
Job {
company: "Shorewood Tech",
title: "Software Engineer (contract)",
start_year: "2021",
end_year: "Present",
image: "st.webp",
tech: vec!["Rust", "Actix", "TypeScript", "Qwik", "Postgres"],
description: "I was contracted to convert a headless JS app into a \
Qwik/ Qwik-City frontend and an Actix backend for the web and \
native mobile clients to consume.<br /><br />The frontend scores perfectly on \
Google's Lighthouse metrics for web and mobile. The backend test \
coverage is over 65%.",
link: "https://shorewoodtech.com",
},
Job {
company: "Catholic Charities of St. Paul and Minneapolis",
title: "Software Developer/ Administrator",
start_year: "2017",
end_year: "2022",
image: "ccspm.webp",
tech: vec!["Python", "Django", "Flask", "Postgres"],
description: "I built and maintained internal web apps (Flask and \
Django) for critical agency wide functions, e.g. critical \
incidents, employee management. Also administrated and built out \
instances of SharePoint and EHR (Credible).",
link: "https://cctwincities.org",
},
];

const NUMBER_OF_POSTS: usize = 3;

Expand All @@ -74,7 +15,7 @@ pub async fn root(State(state): State<Arc<AppState>>) -> Html<String> {
context.insert("posts", &state.posts);
}

context.insert("jobs", &jobs);
context.insert("jobs", &state.jobs);

match TEMPLATES.render("index.html", &context) {
Ok(s) => Html(s),
Expand Down

0 comments on commit 7175569

Please sign in to comment.