-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(index): add Italian flag icon separately
Instead of installing the entire flags icon pack (which for some reason isn't being tree shaken properly and is causing my Vercel functions to be around 1.91 MB in size), this patch updates the index page to simply add that single icon as a React component. Fixes: e1dae96 ("feat(index): replace timeline with "dolce" definition")
- Loading branch information
1 parent
5996d84
commit 129e757
Showing
7 changed files
with
108 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Link } from '@remix-run/react' | ||
import { ChevronRight, Plus } from 'lucide-react' | ||
import { Fragment } from 'react' | ||
|
||
import { HeaderWrapper, HeaderActions } from 'components/header' | ||
|
||
const links = [ | ||
{ to: '/shows', label: 'Shows' }, | ||
{ to: '/products', label: 'Products' }, | ||
{ to: '/brands', label: 'Brands' }, | ||
{ to: '/designers', label: 'Designers' }, | ||
] | ||
|
||
export function Header() { | ||
return ( | ||
<HeaderWrapper> | ||
<ol className='flex items-center gap-2 text-lg tracking-tighter lowercase'> | ||
<h1>dolce</h1> | ||
<ChevronRight className='text-gray-300 dark:text-gray-600 h-4 w-4 mt-0.5' /> | ||
{links.map((link, index) => ( | ||
<Fragment key={link.to}> | ||
{index !== 0 && ( | ||
<Plus className='text-gray-300 dark:text-gray-600 h-4 w-4 mt-0.5' /> | ||
)} | ||
<li className='text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 transition-colors'> | ||
<Link prefetch='intent' to={link.to}> | ||
{link.label} | ||
</Link> | ||
</li> | ||
</Fragment> | ||
))} | ||
</ol> | ||
<HeaderActions /> | ||
</HeaderWrapper> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { type PropsWithChildren } from 'react' | ||
|
||
import { Italy } from './italy' | ||
|
||
export function Hero() { | ||
return ( | ||
<main className='flex flex-col sm:flex-row sm:items-center justify-center mt-6 p-6 gap-6'> | ||
<div className='aspect-square w-full sm:w-72 sm:h-72 bg-gray-100 dark:bg-gray-900'> | ||
<img src='/brands.jpg' className='object-cover h-full w-full' alt='' /> | ||
</div> | ||
<article> | ||
<h1 className='text-2xl font-medium mb-4 tracking-tighter flex items-center gap-0.5'> | ||
<span>dol</span> | ||
<span>·</span> | ||
<span>ce</span> | ||
</h1> | ||
<dl> | ||
<Definition label='adverb'> | ||
(especially as a direction) sweetly and softly. | ||
</Definition> | ||
<Definition label='adjective'> | ||
performed in a sweet and soft manner. | ||
</Definition> | ||
<Definition label='origin'> | ||
<Italy className='border border-gray-900 dark:border-white rounded-full mt-1' /> | ||
</Definition> | ||
</dl> | ||
</article> | ||
</main> | ||
) | ||
} | ||
|
||
function Definition({ label, children }: PropsWithChildren<{ label: string }>) { | ||
return ( | ||
<> | ||
<dt className='italic text-gray-400 dark:text-gray-600'>{label}</dt> | ||
<dd className='mb-4'>{children}</dd> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as React from 'react' | ||
|
||
export const Italy = React.forwardRef< | ||
SVGSVGElement, | ||
React.SVGProps<SVGSVGElement> | ||
>((props, ref) => ( | ||
<svg | ||
xmlns='http://www.w3.org/2000/svg' | ||
viewBox='0 0 512 512' | ||
height='1em' | ||
width='1em' | ||
ref={ref} | ||
{...props} | ||
> | ||
<g fillRule='evenodd' strokeWidth='1pt'> | ||
<path fill='#fff' d='M0 0h512v512H0z' /> | ||
<path fill='#009246' d='M0 0h170.7v512H0z' /> | ||
<path fill='#ce2b37' d='M341.3 0H512v512H341.3z' /> | ||
</g> | ||
</svg> | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Header } from './header' | ||
import { Hero } from './hero' | ||
|
||
export default function IndexPage() { | ||
return ( | ||
<> | ||
<Header /> | ||
<Hero /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
129e757
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
site – ./
site-git-main-nicholaschiang.vercel.app
www.dolce.so
site-nicholaschiang.vercel.app
nicholas.engineering
dolce.so
www.rottenfashion.com
www.nicholas.engineering
rottenfashion.com