2023-01-30 00:04:05 +00:00
< script lang = "ts" >
2024-12-03 17:35:23 +00:00
import ExternalLink from '$lib/components/ExternalLink.svelte';
2024-12-04 01:50:08 +00:00
import Portfolio from '$root/routes/portfolio/Portfolio.svelte';
2024-12-03 17:35:23 +00:00
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
import OldWebsite from '$lib/content/portfolio/personal/old-website.md';
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
import PersonalWebsiteSvelteKit from '$lib/content/portfolio/personal/personal-website-sveltekit.md';
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
import WeddingWebsite from '$lib/content/portfolio/personal/wedding-website.md';
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
import MarkShellnutArchitect from '$lib/content/portfolio/professional/mark-shellnut-architect.md';
import type { ExternalLinkType } from '$lib/types/externalLinkType';
import GitHub from '@iconify-icons/simple-icons/github';
import { createTabs , melt } from '@melt-ui/svelte';
import personalSite from '../../lib/assets/images/portfolio/Bradley_Shellnut_New_Site.png?enhanced';
import shellnutArchitectWebsite from '../../lib/assets/images/portfolio/Mark_Shellnut_Architect.png?enhanced';
import oldSite from '../../lib/assets/images/portfolio/Old_Website_Bradley_Shellnut.png?enhanced';
import weddingWebsite from '../../lib/assets/images/portfolio/Wedding_Website.png?enhanced';
2023-07-13 05:53:25 +00:00
2024-12-03 17:35:23 +00:00
const {
elements: { root , list , content , trigger } ,
} = createTabs({
defaultValue: 'personal',
});
2023-09-28 09:02:11 +00:00
2024-12-03 17:35:23 +00:00
const triggers = [
{ id : 'personal' , title : 'Personal Sites' } ,
{ id : 'professional' , title : 'Professional Sites' } ,
];
2023-01-30 00:04:05 +00:00
< / script >
2024-12-03 17:35:23 +00:00
{ # snippet links ( externalLinks : ExternalLinkType [])}
< span >
{ #each externalLinks as link }
< ExternalLink
ariaLabel={ link . ariaLabel }
href={ link . href }
icon={ link . icon }
showIcon={ link . showIcon }
>
{ link . text }
< / ExternalLink >
{ /each }
< / span >
{ /snippet }
2024-12-03 19:55:16 +00:00
{ # snippet details ( portfolioDetails )}
{ @const PortfolioDetails = portfolioDetails }
< PortfolioDetails / >
2024-12-03 17:35:23 +00:00
{ /snippet }
2023-01-31 07:10:17 +00:00
< h1 > Portfolio!< / h1 >
2023-09-28 09:02:11 +00:00
< div use:melt = { $root } class="root tab-group " >
< div use:melt = { $list } aria-label="tabs portfolios " class = "list tab-list" >
{ #each triggers as triggerItem }
< button use:melt = { $trigger ( triggerItem . id )} class="trigger" type = "button" >
2024-12-03 19:55:16 +00:00
< span > { triggerItem . title } </ span >
2023-09-28 09:02:11 +00:00
< / button >
{ /each }
2023-07-13 05:53:25 +00:00
< / div >
2023-09-28 09:02:11 +00:00
< div use:melt = { $content ( 'personal' )} class="content" >
2023-07-13 05:53:25 +00:00
< Portfolio name = "Personal Website"
2023-12-06 00:43:37 +00:00
style="max-height: 550px;"
2023-07-13 05:53:25 +00:00
src={ personalSite }
loading="eager"
2024-12-03 17:35:23 +00:00
alt="Picture of Bradley Shellnut's Personal Website"
{ links }
{ details }
portfolioDetails={ PersonalWebsiteSvelteKit }
externalLinks={[{ ariaLabel : 'View GitHub repository for my personal website' , href : 'https://github.com/BradNut/personal-website-sveltekit' , icon : GitHub , showIcon : true , text : 'GitHub repository' }]} >
2023-07-13 05:53:25 +00:00
< / Portfolio >
< Portfolio name = "Wedding Website"
2023-12-06 00:43:37 +00:00
style="max-height: 550px;"
2023-07-13 05:53:25 +00:00
src={ weddingWebsite }
2024-12-03 17:35:23 +00:00
alt="Picture of NextJS Wedding Website"
{ links }
{ details }
portfolioDetails={ WeddingWebsite }
externalLinks={[{ ariaLabel : 'View GitHub repository for the wedding site' , href : 'https://github.com/BradNut/weddingsite' , icon : GitHub , showIcon : true , text : 'GitHub repository' }]} />
< Portfolio name = "Old Personal Website"
2023-07-13 05:53:25 +00:00
style="max-height: 320px;"
src={ oldSite }
2024-12-03 17:35:23 +00:00
alt="Home Page of the old bradleyshellnut.com website"
{ links }
{ details }
portfolioDetails={ OldWebsite }
externalLinks={[{ ariaLabel : 'Archive of bradleyshellnut.com' , href : 'https://web.archive.org/web/20201205233507/https://bradleyshellnut.com/about' , icon : GitHub , showIcon : true , text : 'Link to an archive snapshot' }]} />
2023-07-13 05:53:25 +00:00
< / div >
2023-09-28 09:02:11 +00:00
< div use:melt = { $content ( 'professional' )} class="content" >
2023-07-13 05:53:25 +00:00
< Portfolio name = "Mark Shellnut Architect"
2023-12-06 00:43:37 +00:00
style="max-height: 550px;"
2023-07-13 05:53:25 +00:00
src={ shellnutArchitectWebsite }
2024-12-03 17:35:23 +00:00
alt="Picture of Mark Shellnut Architect's Website"
{ links }
{ details }
portfolioDetails={ MarkShellnutArchitect }
externalLinks={[{ ariaLabel : 'View Mark Shellnut Architect' , href : 'https://markshellnutarchitect.com' , showIcon : false , text : 'Link to Mark Shellnut Architect' }]} />
2023-07-13 05:53:25 +00:00
< / div >
< / div >
2023-01-31 07:10:17 +00:00
< style lang = "postcss" >
2023-07-13 05:53:25 +00:00
.root {
display: flex;
flex-direction: column;
/* overflow: hidden; */
/* border-radius: var(--border-radius); */
2023-09-28 09:02:11 +00:00
& [data-orientation="vertical"] {
2023-07-13 05:53:25 +00:00
flex-direction: row;
}
2023-04-20 22:18:23 +00:00
@media(min-width: 1000px) {
max-width: 50vw;
}
}
2023-07-13 05:53:25 +00:00
.list {
2023-02-28 23:42:00 +00:00
display: grid;
gap: 1rem;
grid-template-columns: auto auto;
place-content: start;
place-items: center;
margin-bottom: 1.5rem;
2023-07-13 05:53:25 +00:00
cursor: default;
user-select: none;
2023-02-28 23:42:00 +00:00
}
2023-09-28 09:02:11 +00:00
.trigger {
2024-12-03 19:55:16 +00:00
font-size: var(--h2);
2023-09-28 09:02:11 +00:00
& [data-state='active'] {
2024-12-03 19:55:16 +00:00
span {
2023-09-28 09:02:11 +00:00
border-bottom: 2px solid var(--shellYellow);
}
2023-07-13 05:53:25 +00:00
}
2023-02-02 20:03:53 +00:00
2023-09-28 09:02:11 +00:00
& [data-state='inactive'] {
2024-12-03 19:55:16 +00:00
span {
2023-09-28 09:02:11 +00:00
border-bottom: 2px solid var(--white);
}
2023-01-31 07:10:17 +00:00
}
}
2023-07-13 05:53:25 +00:00
:global(img) {
border-radius: 3px;
2023-01-31 07:10:17 +00:00
}
< / style >