Files
cv_lib/src/work.rs

36 lines
1.1 KiB
Rust

use crate::section::Section;
use leptos::{component, view, Children, For, IntoView};
#[component]
#[must_use]
pub fn WorkExperience(children: Children) -> impl IntoView {
view! { <Section title="Work Experience">{children()}</Section> }
}
#[component]
#[must_use]
pub fn Job(
company: &'static str,
title: &'static str,
time_period: &'static str,
achievements: Vec<&'static str>,
) -> impl IntoView {
view! {
<div class="flex flex-col space-y-1">
<div class="flex flex-row justify-between w-full text-sm">
<div class="flex flex-row font-sans font-medium text-black">
<h4>{company} {" - "} {title}</h4>
</div>
<div class="flex flex-row font-sans text-gray-500">
<p>{time_period}</p>
</div>
</div>
<ul class="space-y-1 font-sans list-disc list-inside">
<For each=move || achievements.clone() key=std::clone::Clone::clone let:achievement>
<li class="px-2">{achievement}</li>
</For>
</ul>
</div>
}
}