Skip to content

Commit

Permalink
Merge pull request #2 from goodeats/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
goodeats authored Jan 14, 2024
2 parents 3020125 + 8b3875a commit bf23cdf
Show file tree
Hide file tree
Showing 15 changed files with 253 additions and 109 deletions.
1 change: 1 addition & 0 deletions app/components/ui/icons/name.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type IconName =
| 'exit'
| 'file-text'
| 'github-logo'
| 'instagram-logo'
| 'laptop'
| 'link-2'
| 'lock-closed'
Expand Down
3 changes: 3 additions & 0 deletions app/components/ui/icons/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
useFetcher,
useFetchers,
useLoaderData,
useMatches,
useSubmit,
} from '@remix-run/react'
import { withSentry } from '@sentry/remix'
Expand All @@ -33,7 +32,6 @@ import { GeneralErrorBoundary } from './components/error-boundary.tsx'
import { ErrorList } from './components/forms.tsx'
import Logo from './components/logo.tsx'
import { EpicProgress } from './components/progress-bar.tsx'
import { SearchBar } from './components/search-bar.tsx'
import { useToast } from './components/toaster.tsx'
import { Button } from './components/ui/button.tsx'
import {
Expand Down Expand Up @@ -231,9 +229,9 @@ function App() {
const nonce = useNonce()
const user = useOptionalUser()
const theme = useTheme()
const matches = useMatches()
const isOnSearchPage = matches.find(m => m.id === 'routes/users+/index')
const searchBar = isOnSearchPage ? null : <SearchBar status="idle" />
// const matches = useMatches()
// const isOnSearchPage = matches.find(m => m.id === 'routes/users+/index')
// const searchBar = isOnSearchPage ? null : <SearchBar status="idle" />
useToast(data.toast)

return (
Expand All @@ -242,19 +240,20 @@ function App() {
<header className="container py-6">
<nav className="flex flex-wrap items-center justify-between gap-4 sm:flex-nowrap md:gap-8">
<Logo />
<div className="ml-auto hidden max-w-sm flex-1 sm:block">
{/* <div className="ml-auto hidden max-w-sm flex-1 sm:block">
{searchBar}
</div>
</div> */}
<div className="flex items-center gap-10">
{user ? (
<UserDropdown />
) : (
<Button asChild variant="default" size="lg">
<Link to="/login">Log In</Link>
<Link to="/login">Coming Soon</Link>
{/* <Link to="/login">Log In</Link> */}
</Button>
)}
</div>
<div className="block w-full sm:hidden">{searchBar}</div>
{/* <div className="block w-full sm:hidden">{searchBar}</div> */}
</nav>
</header>

Expand Down
74 changes: 74 additions & 0 deletions app/routes/_marketing+/components/content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { Icon } from '#app/components/ui/icon'

export const ContentLogo = () => {
return (
<a
href="https://github.com/goodeats/epic-pppaaattt.xyz"
className="animate-slide-top [animation-fill-mode:backwards] xl:animate-slide-left xl:[animation-delay:0.5s] xl:[animation-fill-mode:backwards]"
>
<svg
className="size-20 text-foreground xl:-mt-4"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 65 65"
>
<polygon fill="currentColor" points="32.5,22.33 20.5,2.66 44.5,2.66" />
<polygon fill="currentColor" points="12.5,42.66 0.5,62.33 24.5,62.33" />
<polygon
fill="currentColor"
points="52.5,64.33 40.5,44.66 64.5,44.66"
/>
</svg>
</a>
)
}

export const ContentHeader = () => {
return (
<h1
data-heading
className="mt-8 animate-slide-top text-4xl font-medium text-foreground [animation-fill-mode:backwards] [animation-delay:0.3s] md:text-5xl xl:mt-4 xl:animate-slide-left xl:text-6xl xl:[animation-fill-mode:backwards] xl:[animation-delay:0.8s]"
>
<a href="https://github.com/goodeats/epic-pppaaattt.xyz">PPPAAATTT</a>
</h1>
)
}

export const ContentBody = () => {
return (
<p
data-paragraph
className="mt-6 animate-slide-top text-xl/7 text-muted-foreground [animation-fill-mode:backwards] [animation-delay:0.8s] xl:mt-8 xl:animate-slide-left xl:text-xl/6 xl:leading-10 xl:[animation-fill-mode:backwards] xl:[animation-delay:1s]"
>
I am a software engineer from Maine, now living in New York City. My art
consists of printing equilateral triangles in different ways on a canvas
using JavaScript. I have worked mostly used my coding skills in various
startups and now I am excited to pursue the lengths of my creativity.
</p>
)
}

export const ContentContact = () => {
return (
<ul className="mt-6 flex animate-slide-top space-x-4 [animation-fill-mode:backwards] [animation-delay:1.2s] xl:mt-8 xl:animate-slide-left xl:[animation-fill-mode:backwards] xl:[animation-delay:1.2s]">
<li>
<a
href="https://www.instagram.com/pppaaattt.xyz"
target="_blank"
rel="noopener noreferrer"
>
<Icon name="instagram-logo" size="xl" />
</a>
</li>
<li>
<a
href="https://github.com/goodeats"
target="_blank"
rel="noopener noreferrer"
>
<Icon name="github-logo" size="xl" />
</a>
</li>
</ul>
)
}
44 changes: 44 additions & 0 deletions app/routes/_marketing+/components/images-grid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { cn } from '#app/utils/misc.tsx'
import { images } from '../images/images'

// Tailwind Grid cell classes lookup
const columnClasses: Record<(typeof images)[number]['column'], string> = {
1: 'xl:col-start-1',
2: 'xl:col-start-2',
3: 'xl:col-start-3',
4: 'xl:col-start-4',
5: 'xl:col-start-5',
}
const rowClasses: Record<(typeof images)[number]['row'], string> = {
1: 'xl:row-start-1',
2: 'xl:row-start-2',
3: 'xl:row-start-3',
4: 'xl:row-start-4',
5: 'xl:row-start-5',
6: 'xl:row-start-6',
}

export const ImagesGrid = () => {
return (
<div className="mt-16 flex max-w-3xl flex-wrap gap-8 xl:mt-0 xl:grid xl:grid-flow-col xl:grid-cols-2 xl:grid-rows-2">
{images.map((image, index) => {
return (
<div
key={index}
className={cn(
columnClasses[image.column],
rowClasses[image.row],
'relative',
)}
>
<img
src={image.src}
alt={image.alt}
className="relative left-0 top-0 h-full w-full object-cover"
/>
</div>
)
})}
</div>
)
}
57 changes: 57 additions & 0 deletions app/routes/_marketing+/components/logos.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '#app/components/ui/tooltip'
import { cn } from '#app/utils/misc'
import { logos } from '../logos/logos.ts'

// Tailwind Grid cell classes lookup
const columnClasses: Record<(typeof logos)[number]['column'], string> = {
1: 'xl:col-start-1',
2: 'xl:col-start-2',
3: 'xl:col-start-3',
4: 'xl:col-start-4',
5: 'xl:col-start-5',
}
const rowClasses: Record<(typeof logos)[number]['row'], string> = {
1: 'xl:row-start-1',
2: 'xl:row-start-2',
3: 'xl:row-start-3',
4: 'xl:row-start-4',
5: 'xl:row-start-5',
6: 'xl:row-start-6',
}

export const Logos = () => {
return (
<ul className="mt-16 flex max-w-3xl flex-wrap justify-center gap-2 sm:gap-4 xl:mt-0 xl:grid xl:grid-flow-col xl:grid-cols-5 xl:grid-rows-6">
<TooltipProvider>
{logos.map((logo, i) => (
<li
key={logo.href}
className={cn(
columnClasses[logo.column],
rowClasses[logo.row],
'animate-roll-reveal [animation-fill-mode:backwards]',
)}
style={{ animationDelay: `${i * 0.07}s` }}
>
<Tooltip>
<TooltipTrigger asChild>
<a
href={logo.href}
className="grid size-20 place-items-center rounded-2xl bg-violet-600/10 p-4 transition hover:-rotate-6 hover:bg-violet-600/15 sm:size-24 dark:bg-violet-200 dark:hover:bg-violet-100"
>
<img src={logo.src} alt="" />
</a>
</TooltipTrigger>
<TooltipContent>{logo.alt}</TooltipContent>
</Tooltip>
</li>
))}
</TooltipProvider>
</ul>
)
}
Binary file added app/routes/_marketing+/images/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/routes/_marketing+/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/routes/_marketing+/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/routes/_marketing+/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions app/routes/_marketing+/images/images.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import image0 from './0.png'
import image1 from './1.png'
import image2 from './2.png'
import image3 from './3.png'

export const images = [
{
src: image0,
alt: 'image0',
column: 1,
row: 1,
},
{
src: image1,
alt: 'image1',
column: 2,
row: 1,
},
{
src: image2,
alt: 'image2',
column: 1,
row: 2,
},
{
src: image3,
alt: 'image3',
column: 2,
row: 2,
},
]
103 changes: 14 additions & 89 deletions app/routes/_marketing+/index.tsx
Original file line number Diff line number Diff line change
@@ -1,100 +1,25 @@
import { type MetaFunction } from '@remix-run/node'
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '#app/components/ui/tooltip.tsx'
import { cn } from '#app/utils/misc.tsx'
import { logos } from './logos/logos.ts'
ContentBody,
ContentContact,
ContentHeader,
ContentLogo,
} from './components/content.tsx'
import { ImagesGrid } from './components/images-grid.tsx'

export const meta: MetaFunction = () => [{ title: 'Epic Notes' }]

// Tailwind Grid cell classes lookup
const columnClasses: Record<(typeof logos)[number]['column'], string> = {
1: 'xl:col-start-1',
2: 'xl:col-start-2',
3: 'xl:col-start-3',
4: 'xl:col-start-4',
5: 'xl:col-start-5',
}
const rowClasses: Record<(typeof logos)[number]['row'], string> = {
1: 'xl:row-start-1',
2: 'xl:row-start-2',
3: 'xl:row-start-3',
4: 'xl:row-start-4',
5: 'xl:row-start-5',
6: 'xl:row-start-6',
}
export const meta: MetaFunction = () => [{ title: 'PPPAAATTT' }]

export default function Index() {
return (
<main className="font-poppins grid h-full place-items-center">
<div className="grid place-items-center px-4 py-16 xl:grid-cols-2 xl:gap-24">
<div className="flex max-w-md flex-col items-center text-center xl:order-2 xl:items-start xl:text-left">
<a
href="https://www.epicweb.dev/stack"
className="animate-slide-top [animation-fill-mode:backwards] xl:animate-slide-left xl:[animation-delay:0.5s] xl:[animation-fill-mode:backwards]"
>
<svg
className="size-20 text-foreground xl:-mt-4"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 65 65"
>
<path
fill="currentColor"
d="M39.445 25.555 37 17.163 65 0 47.821 28l-8.376-2.445Zm-13.89 0L28 17.163 0 0l17.179 28 8.376-2.445Zm13.89 13.89L37 47.837 65 65 47.821 37l-8.376 2.445Zm-13.89 0L28 47.837 0 65l17.179-28 8.376 2.445Z"
></path>
</svg>
</a>
<h1
data-heading
className="mt-8 animate-slide-top text-4xl font-medium text-foreground [animation-fill-mode:backwards] [animation-delay:0.3s] md:text-5xl xl:mt-4 xl:animate-slide-left xl:text-6xl xl:[animation-fill-mode:backwards] xl:[animation-delay:0.8s]"
>
<a href="https://www.epicweb.dev/stack">The Epic Stack</a>
</h1>
<p
data-paragraph
className="mt-6 animate-slide-top text-xl/7 text-muted-foreground [animation-fill-mode:backwards] [animation-delay:0.8s] xl:mt-8 xl:animate-slide-left xl:text-xl/6 xl:leading-10 xl:[animation-fill-mode:backwards] xl:[animation-delay:1s]"
>
Check the{' '}
<a
className="underline hover:no-underline"
href="https://github.com/epicweb-dev/epic-stack/blob/main/docs/getting-started.md"
>
Getting Started guide
</a>{' '}
file for how to get your project off the ground!
</p>
<div className="grid place-items-center px-4 py-16 xl:grid-cols-2 xl:gap-4">
<div className="mb-4 flex max-w-lg flex-col items-center text-left xl:order-2 xl:items-start">
<ContentLogo />
<ContentHeader />
<ContentBody />
<ContentContact />
</div>
<ul className="mt-16 flex max-w-3xl flex-wrap justify-center gap-2 sm:gap-4 xl:mt-0 xl:grid xl:grid-flow-col xl:grid-cols-5 xl:grid-rows-6">
<TooltipProvider>
{logos.map((logo, i) => (
<li
key={logo.href}
className={cn(
columnClasses[logo.column],
rowClasses[logo.row],
'animate-roll-reveal [animation-fill-mode:backwards]',
)}
style={{ animationDelay: `${i * 0.07}s` }}
>
<Tooltip>
<TooltipTrigger asChild>
<a
href={logo.href}
className="grid size-20 place-items-center rounded-2xl bg-violet-600/10 p-4 transition hover:-rotate-6 hover:bg-violet-600/15 sm:size-24 dark:bg-violet-200 dark:hover:bg-violet-100"
>
<img src={logo.src} alt="" />
</a>
</TooltipTrigger>
<TooltipContent>{logo.alt}</TooltipContent>
</Tooltip>
</li>
))}
</TooltipProvider>
</ul>
<ImagesGrid />
</div>
</main>
)
Expand Down
Loading

0 comments on commit bf23cdf

Please sign in to comment.