Skip to content

Commit

Permalink
Organize stories a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
addisonbeck committed Sep 15, 2023
1 parent f215830 commit 8966cfd
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/Education.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import Education from './Education.svelte';

const meta = {
title: 'Education',
title: 'Resume/Education',
component: Education,
tags: ['autodocs'],
} satisfies Meta<Education>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import Header from './Header.svelte';

const meta = {
title: 'Header',
title: 'Layout/Header',
component: Header,
tags: ['autodocs'],
parameters: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Nav.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import Nav from './Nav.svelte';

const meta = {
title: 'Nav',
title: 'Layout/Header/Nav',
component: Nav,
tags: ['autodocs'],
} satisfies Meta<Nav>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ResumeHeader.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import ResumeHeader from './ResumeHeader.svelte';

const meta = {
title: 'Resume Header',
title: 'Resume/Header',
component: ResumeHeader,
tags: ['autodocs'],
} satisfies Meta<ResumeHeader>;
Expand Down
8 changes: 7 additions & 1 deletion src/lib/components/ResumePdf.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import ResumePdf from './ResumePdf.svelte';

const meta = {
title: 'Resume PDF',
title: 'Resume/PDF Download',
component: ResumePdf,
tags: ['autodocs'],
} satisfies Meta<ResumePdf>;
Expand All @@ -12,3 +12,9 @@ type Story = StoryObj<typeof meta>;

export const Default: Story = {
};

export const OpenPdf: Story = {
args: {
action: "open"
}
};
6 changes: 5 additions & 1 deletion src/lib/components/ResumePdf.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import ResumeSections from "./ResumeSections.svelte"
import jsPDF from "jspdf"
export let action: "download" | "open" = "download";
function download() {
const result = document.createElement('div');
const r = <HTMLElement>document.querySelector("#pdf")?.cloneNode(true);
Expand All @@ -16,7 +18,9 @@
pdf.html(<HTMLElement>result, {
callback: function () {
document.body.removeChild(result);
pdf.save("Resume")
action === "download" ?
pdf.save("Resume") :
window.open(pdf.output('bloburl'));
},
html2canvas: {
scale: 600 / r.scrollWidth
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ResumeSections.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import ResumeSections from './ResumeSections.svelte';

const meta = {
title: 'Resume Sections',
title: 'Resume/Sections',
component: ResumeSections,
tags: ['autodocs'],
} satisfies Meta<ResumeSections>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ResumeSummary.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import ResumeSummary from './ResumeSummary.svelte';

const meta = {
title: 'Resume Summary',
title: 'Resume/Summary',
component: ResumeSummary,
tags: ['autodocs'],
} satisfies Meta<ResumeSummary>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ResumeWeb.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import ResumeWeb from './ResumeWeb.svelte';

const meta = {
title: 'Resume Web',
title: 'Resume/Web',
component: ResumeWeb,
tags: ['autodocs'],
} satisfies Meta<ResumeWeb>;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/SiteSummary.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import SiteSummary from './SiteSummary.svelte';

const meta = {
title: 'Site Summary',
title: 'Home/Site Summary',
component: SiteSummary,
tags: ['autodocs'],
} satisfies Meta<Home>;
} satisfies Meta<SiteSummary>;

export default meta;
type Story = StoryObj<typeof meta>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/SiteTools.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import SiteTools from './SiteTools.svelte';

const meta = {
title: 'Site Tools',
title: 'Home/Site Tools',
component: SiteTools,
tags: ['autodocs'],
} satisfies Meta<SiteTools>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Skills.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import Skills from './Skills.svelte';

const meta = {
title: 'Skills',
title: 'Resume/Skills',
component: Skills,
tags: ['autodocs'],
} satisfies Meta<Skills>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ThemeToggle.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import ThemeToggle from './ThemeToggle.svelte';

const meta = {
title: 'Theme Toggle',
title: 'Layout/Header/Theme Toggle',
component: ThemeToggle,
tags: ['autodocs'],
} satisfies Meta<ThemeToggle>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/WorkExperience.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/svelte';
import WorkExperience from './WorkExperience.svelte';

const meta = {
title: 'Work Experience',
title: 'Resume/Work Experience',
component: WorkExperience,
tags: ['autodocs'],
} satisfies Meta<WorkExperience>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/data/resume.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"endDate": "2023-10",
"summary": "As a member of the Site Reliability team at Skykick I was responsible for:",
"highlights": [
"Understanding the full breadth of Skykick's software catalogue from a technical and product perspective in order to quickly work and resolve escalated issues related to Skykick's cloud infrastructure, codebases, and SLOs.",
"Understanding the full breadth of Skykick's software catalogue from a technical and product perspective in order to quickly work and resolve escalated issues related to Skykick's cloud infrastructure, codebases, and service agreements.",
"Developing and maintaining internal tools to decrease developer toil at Skykick."
]
},
Expand Down

0 comments on commit 8966cfd

Please sign in to comment.