Initial CV lib commit
This commit is contained in:
35
src/work.rs
Normal file
35
src/work.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
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>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user