Skip to content

Commit f6ca46d

Browse files
committed
Content addition
1 parent 7fdf636 commit f6ca46d

17 files changed

Lines changed: 803 additions & 0 deletions

src/routes/resume/+layout.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script lang="ts">
2+
import Layout from "$lib/Layout.svelte";
3+
</script>
4+
<Layout>
5+
<slot />
6+
</Layout>

src/routes/resume/+page.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { getAllFeeds } from '$lib/Feed.server';
2+
3+
export async function load() {
4+
const feeds = await getAllFeeds(true);
5+
return { feeds };
6+
}

src/routes/resume/+page.svx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script lang="ts">
2+
import HideDuringPrint from "$joeysvelte/HideDuringPrint.svelte";
3+
import Resume from "./Resume.svx";
4+
export let data;
5+
</script>
6+
7+
<HideDuringPrint>
8+
9+
---
10+
11+
This interactive resume contains additional details, links, and proofs of work. For the best experience, view on a device with JavaScript enabled.
12+
13+
If this was directly sent this to you, make sure you're using your customized link to see only what is relevant to the application.
14+
15+
---
16+
17+
</HideDuringPrint>
18+
19+
<Resume data={data} />

src/routes/resume/Citation.svelte

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<script lang="ts">
2+
import HoverContent from "$lib/HoverContent.svelte";
3+
import SvPost from "$lib/Post.svelte";
4+
import { type Post } from "$lib/Feed";
5+
import HideDuringPrint from "$joeysvelte/HideDuringPrint.svelte";
6+
7+
export let post: Post | undefined = undefined;
8+
</script>
9+
10+
{#if post}
11+
<HoverContent>
12+
<SvPost
13+
slot="hover"
14+
post={post}
15+
inEmbed={true}
16+
/>
17+
<HideDuringPrint>
18+
<a href={post.url}>🔖</a>
19+
</HideDuringPrint>
20+
<slot />
21+
</HoverContent>
22+
{:else}
23+
<slot />
24+
{/if}

src/routes/resume/EditTag.svelte

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script lang="ts">
2+
import Tag from "$lib/Tag.svelte"
3+
4+
export let icon: string = "";
5+
export let text: string = "";
6+
</script>
7+
8+
9+
<Tag on:click={() => {
10+
let result = prompt("Tag text", text);
11+
text = result || text;
12+
}}>{icon} {text}</Tag>
13+

src/routes/resume/Education.svelte

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<script lang="ts">
2+
import Tag from "$lib/Tag.svelte"
3+
4+
export let degree: string;
5+
export let university: string;
6+
export let gpa: number;
7+
export let where: string;
8+
export let when: string;
9+
</script>
10+
11+
<div class="outer">
12+
<div>
13+
{degree}, {university}
14+
</div>
15+
<div class="tags">
16+
<Tag>🎓 {gpa.toFixed(2)} GPA</Tag>
17+
<Tag>📍 {where}</Tag>
18+
<Tag>📅 {when}</Tag>
19+
</div>
20+
</div>
21+
22+
<style lang="scss">
23+
.outer {
24+
display: flex;
25+
flex-direction: row;
26+
justify-content: space-between;
27+
margin-bottom: 8px;
28+
}
29+
30+
.tags {
31+
display: flex;
32+
flex-direction: row;
33+
flex-wrap: wrap;
34+
justify-content: right;
35+
gap: 8px;
36+
}
37+
</style>

src/routes/resume/ExpItem.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { Post } from "$lib/Feed";
2+
3+
export default class ExpItem {
4+
constructor(
5+
public text: string,
6+
public citation: null | Post | string = null,
7+
public children: ExpItem[] = []
8+
) {}
9+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<script lang="ts">
2+
import AvoidPageBreak from "$joeysvelte/AvoidPageBreak.svelte"
3+
import Tag from "$lib/Tag.svelte"
4+
import ExperienceItem from "./ExperienceItem.svelte";
5+
import ExpItem from "./ExpItem";
6+
import type Profile from "./Profile";
7+
8+
export let id: string = "";
9+
export let title: string = "";
10+
export let subtitle: string = "";
11+
export let where: string = "";
12+
export let when: string;
13+
export let items: ExpItem[] = [];
14+
export let profile: Profile;
15+
16+
let hide = profile.experience?.[id] === null;
17+
</script>
18+
19+
{#if !hide}
20+
<AvoidPageBreak>
21+
<div class="experience">
22+
<div>
23+
<h2>{title}</h2>
24+
{#if subtitle}
25+
<h3>{subtitle}</h3>
26+
{/if}
27+
</div>
28+
<div class="tags">
29+
{#if where}
30+
<Tag>📍 {where}</Tag>
31+
{/if}
32+
<Tag>📅 {when}</Tag>
33+
</div>
34+
</div>
35+
36+
<ul>
37+
{#each items as item, index}
38+
{#if !(profile.experience?.[id]?.includes(index))}
39+
<ExperienceItem {item} />
40+
{/if}
41+
{/each}
42+
</ul>
43+
</AvoidPageBreak>
44+
{/if}
45+
46+
<style lang="scss">
47+
48+
.experience {
49+
display: flex;
50+
flex-direction: row;
51+
margin-bottom: 12px;
52+
align-items: center;
53+
justify-content: space-between;
54+
}
55+
56+
.tags {
57+
display: flex;
58+
flex-direction: row;
59+
flex-wrap: wrap;
60+
justify-content: right;
61+
gap: 8px;
62+
}
63+
</style>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<script lang="ts">
2+
import ExpItem from "./ExpItem";
3+
import Citation from "./Citation.svelte";
4+
5+
export let item: ExpItem;
6+
</script>
7+
8+
<li>
9+
{#if item.citation && typeof item.citation === 'string'}
10+
<a href={item.citation}>
11+
{@html item.text}
12+
</a>
13+
{:else if item.citation && typeof item.citation === 'object'}
14+
<Citation post={item.citation}>
15+
{@html item.text}
16+
</Citation>
17+
{:else}
18+
{@html item.text}
19+
{/if}
20+
</li>
21+
22+
{#each item.children as child}
23+
<ul>
24+
<!--
25+
I don't know why you'd ever want to create a recursive item list
26+
but if you did this is where it would crash the compiler
27+
-->
28+
<svelte:self item={child} />
29+
</ul>
30+
{/each}
31+
32+
<style lang="scss">
33+
a {
34+
&::before {
35+
content: "🔗 ";
36+
}
37+
}
38+
39+
@media print {
40+
a {
41+
color: inherit;
42+
&::before {
43+
content: "";
44+
}
45+
}
46+
}
47+
</style>

src/routes/resume/Profile.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default interface Profile {
2+
experience?: {
3+
[key: string]: number[] | null;
4+
},
5+
skills?: {
6+
[key: string]: string[] | null;
7+
}
8+
}

0 commit comments

Comments
 (0)