diff --git a/app/components/external-link.tsx b/app/components/external-link.tsx index 3be39ea..b6c9010 100644 --- a/app/components/external-link.tsx +++ b/app/components/external-link.tsx @@ -1,20 +1,26 @@ +import { cn } from '#app/utils/misc.js' + interface ExternalLinkProps extends React.AnchorHTMLAttributes { href: string children: React.ReactNode className?: string + applyBaseClassName?: boolean } +const baseClassName = + 'ring-offset-background transition-colors outline-none focus-visible:ring-2 focus-within:ring-2 ring-ring ring-offset-2' export default function ExternalLink({ href, children, className = 'underlined text-foreground/70', + applyBaseClassName = true, ...props }: ExternalLinkProps) { return (
@@ -178,7 +178,7 @@ export function Header({ @@ -186,7 +186,7 @@ export function Header({
  • - + Blog
  • diff --git a/app/components/hero-highlight.tsx b/app/components/hero-highlight.tsx index 66c9da9..61fe942 100644 --- a/app/components/hero-highlight.tsx +++ b/app/components/hero-highlight.tsx @@ -27,7 +27,7 @@ export const HeroHighlight = ({ } return ( -
    <>{children}
    -
+ ) } diff --git a/app/components/ui/badge.tsx b/app/components/ui/badge.tsx new file mode 100644 index 0000000..11a49f3 --- /dev/null +++ b/app/components/ui/badge.tsx @@ -0,0 +1,36 @@ +import { cva, type VariantProps } from 'class-variance-authority' +import * as React from 'react' + +import { cn } from '#app/utils/misc.tsx' + +const badgeVariants = cva( + 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', + { + variants: { + variant: { + default: + 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80', + secondary: + 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80', + destructive: + 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80', + outline: 'text-foreground', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) + +export interface BadgeProps + extends React.HTMLAttributes, + VariantProps {} + +function Badge({ className, variant, ...props }: BadgeProps) { + return ( +
+ ) +} + +export { Badge, badgeVariants } diff --git a/app/components/ui/icons/name.d.ts b/app/components/ui/icons/name.d.ts index 3d61ba0..c091fc0 100644 --- a/app/components/ui/icons/name.d.ts +++ b/app/components/ui/icons/name.d.ts @@ -2,6 +2,8 @@ export type IconName = | 'arrow-left-outline' + | 'arrow-up-outline' + | 'arrow-up-right-outline' | 'brand-github-outline' | 'brand-linkedin-outline' | 'brand-x-outline' diff --git a/app/components/ui/icons/sprite.svg b/app/components/ui/icons/sprite.svg index 94a437e..83c8bb2 100644 --- a/app/components/ui/icons/sprite.svg +++ b/app/components/ui/icons/sprite.svg @@ -7,6 +7,15 @@ + + + + + + + + + diff --git a/app/components/work-experience.tsx b/app/components/work-experience.tsx new file mode 100644 index 0000000..35045f3 --- /dev/null +++ b/app/components/work-experience.tsx @@ -0,0 +1,103 @@ +import ExternalLink from '#app/components/external-link.js' +import { Badge } from '#app/components/ui/badge.js' +import { Icon } from '#app/components/ui/icon.js' + +export type WorkExperienceCardProps = { + title: string + previousTitles?: string[] + link: string + company: string + location: string + description: string + startDate: string + endDate: string + technologies: string[] +} +export function WorkExperienceCard({ + title, + previousTitles, + link, + company, + location, + description, + startDate, + endDate, + technologies, +}: WorkExperienceCardProps) { + return ( +
  • +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    + + + + {title} ยท{' '} + + {company} + + + + +

    + {previousTitles && previousTitles.length > 0 && ( +
      + {previousTitles.map(previousTitle => ( +
    1. + + {previousTitle} + +
    2. + ))} +
    + )} +

    {location}

    +

    {description}

    +
      + {technologies.map(technology => ( + {technology} + ))} +
    +
    +
    +
  • + ) +} diff --git a/app/root.tsx b/app/root.tsx index 54b8e10..81350ef 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -17,6 +17,7 @@ import { import { withSentry } from '@sentry/remix' import { ClientOnly } from 'remix-utils/client-only' import { HoneypotProvider } from 'remix-utils/honeypot/react' +import ExternalLink from '#app/components/external-link.js' import { Header, ClientHeader } from '#app/components/header.tsx' import { Logo, @@ -190,7 +191,10 @@ function Footer() { return (