fix: order of tailwind classes
This commit is contained in:
1 parent
5528a84ee7
commit
3b03df3ff5
33 files changed
+135
-1250
No files matched your search
+16
-38
@@ -1,54 +1,32 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals",
|
||||
"plugins": [
|
||||
"simple-import-sort"
|
||||
],
|
||||
"extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended"],
|
||||
"plugins": ["simple-import-sort", "tailwindcss"],
|
||||
"rules": {
|
||||
"tailwindcss/classnames-order": "error",
|
||||
"simple-import-sort/imports": "error",
|
||||
"simple-import-sort/exports": "error",
|
||||
"quotes": ["error", "single"]
|
||||
},
|
||||
"settings": {
|
||||
"tailwindcss": {
|
||||
// Tailwind config path, relative to the project root
|
||||
"config": "./tailwind.config.js"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
|
||||
"rules": {
|
||||
"simple-import-sort/imports": [
|
||||
"error",
|
||||
{
|
||||
"groups": [
|
||||
// Packages `react` related packages come first.
|
||||
[
|
||||
"^react",
|
||||
"^@?\\w"
|
||||
],
|
||||
// Internal packages.
|
||||
[
|
||||
"^(@|components)(/.*|$)"
|
||||
],
|
||||
// Side effect imports.
|
||||
[
|
||||
"^\\u0000"
|
||||
],
|
||||
// Parent imports. Put `..` last.
|
||||
[
|
||||
"^\\.\\.(?!/?$)",
|
||||
"^\\.\\./?$"
|
||||
],
|
||||
// Other relative imports. Put same-folder imports and `.` last.
|
||||
[
|
||||
"^\\./(?=.*/)(?!/?$)",
|
||||
"^\\.(?!/?$)",
|
||||
"^\\./?$"
|
||||
],
|
||||
// Style imports.
|
||||
[
|
||||
"^.+\\.?(css)$"
|
||||
]
|
||||
["^react", "^@?\\w"],
|
||||
["^(@|components)(/.*|$)"],
|
||||
["^\\u0000"],
|
||||
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
|
||||
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
|
||||
["^.+\\.?(css)$"]
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,14 +2,14 @@ import Random from '@/components/Random';
|
||||
import Trending from '@/components/Trending';
|
||||
|
||||
const Container = () => (
|
||||
<div className='flex flex-col flex-1'>
|
||||
<div className='flex flex-1 flex-col'>
|
||||
<div className='xs:mb-4'>
|
||||
<Random />
|
||||
<div className='w-full h-2' />
|
||||
<div className='h-2 w-full' />
|
||||
</div>
|
||||
<div className='xs:block hidden w-full rounded-lg'>
|
||||
<div className='hidden w-full rounded-lg xs:block'>
|
||||
<Trending />
|
||||
<div className='w-full h-2' />
|
||||
<div className='h-2 w-full' />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function Container() {
|
||||
|
||||
if (!shows.length)
|
||||
return (
|
||||
<div className='h-40 w-full flex items-center text-center justify-center text-xl text-muted-foreground'>
|
||||
<div className='flex h-40 w-full items-center justify-center text-center text-xl text-muted-foreground'>
|
||||
There are no items in your favorites list
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Loader } from 'lucide-react';
|
||||
|
||||
const Loading = () => (
|
||||
<div className='w-full min-h-[70vh] flex items-center justify-center'>
|
||||
<div className='flex min-h-[70vh] w-full items-center justify-center'>
|
||||
<div className='animate-spin'>
|
||||
<Loader />
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@ const Container = () => {
|
||||
return (
|
||||
<>
|
||||
{Boolean(title) && (
|
||||
<span className='inline-flex w-full h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground mb-2'>
|
||||
<span className='mb-2 inline-flex h-10 w-full items-center justify-center rounded-md bg-muted p-1 text-muted-foreground'>
|
||||
Similar: {decodeURIComponent(title)}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -18,7 +18,7 @@ const Container = () => {
|
||||
return (
|
||||
<>
|
||||
{Boolean(title) && (
|
||||
<span className='inline-flex w-full h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground mb-2'>
|
||||
<span className='mb-2 inline-flex h-10 w-full items-center justify-center rounded-md bg-muted p-1 text-muted-foreground'>
|
||||
Starring: {decodeURIComponent(title || '')}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -22,12 +22,12 @@ export const MobileNavigation = () => {
|
||||
<Menu size={19} />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className='w-44 flex flex-col gap-2 p-2'>
|
||||
<DropdownMenuContent className='flex w-44 flex-col gap-2 p-2'>
|
||||
{paths.map(({ path, title }) => (
|
||||
<DropdownMenuItem key={path} asChild>
|
||||
<Link href={path}>
|
||||
<div>
|
||||
<Button className='w-full relative' variant={currentPath === path ? 'default' : 'outline'}>
|
||||
<Button className='relative w-full' variant={currentPath === path ? 'default' : 'outline'}>
|
||||
{title}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ export const showSearchModal = create(({ onResolve }) => {
|
||||
const isFetched = movies.isFetched && series.isFetched;
|
||||
|
||||
return (
|
||||
<Modal className='block p-0 max-w-[932px]' onClose={onResolve} scrollRef={scrollRef}>
|
||||
<Modal className='block max-w-[932px] p-0' onClose={onResolve} scrollRef={scrollRef}>
|
||||
<div className='relative p-2'>
|
||||
<Input
|
||||
autoFocus
|
||||
|
||||
@@ -8,11 +8,11 @@ import ToggleSearch from './components/Search';
|
||||
import ToggleTheme from './components/ThemeToggle';
|
||||
|
||||
const Header: FC = () => (
|
||||
<header className='flex justify-center bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 py-2'>
|
||||
<header className='flex justify-center bg-background/95 py-2 backdrop-blur supports-[backdrop-filter]:bg-background/60'>
|
||||
<div className='container'>
|
||||
<div className='flex items-center justify-between gap-2 xs:flex-nowrap'>
|
||||
<Link shallow href='/'>
|
||||
<Badge className='whitespace-nowrap cursor-pointer font-normal'>Movie advisor</Badge>
|
||||
<Badge className='cursor-pointer whitespace-nowrap font-normal'>Movie advisor</Badge>
|
||||
</Link>
|
||||
<DesktopNavigation />
|
||||
<div className='flex items-center gap-2'>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const NoResults = () => (
|
||||
<div className='h-40 w-full flex items-center justify-center text-xl text-muted-foreground'>Nothing was found</div>
|
||||
<div className='flex h-40 w-full items-center justify-center text-xl text-muted-foreground'>Nothing was found</div>
|
||||
);
|
||||
|
||||
export default NoResults;
|
||||
@@ -15,13 +15,13 @@ const Actions = ({ onClose, show }: Props) => (
|
||||
<>
|
||||
<ToggleTrailer showType={show.type} showId={show.id}>
|
||||
{({ onPlay, disabled }) => (
|
||||
<Button className='h-8 flex-grow w-[50%]' onClick={onPlay} disabled={disabled}>
|
||||
<Button className='h-8 w-1/2 grow' onClick={onPlay} disabled={disabled}>
|
||||
Trailer
|
||||
</Button>
|
||||
)}
|
||||
</ToggleTrailer>
|
||||
<Button
|
||||
className='h-8 flex-grow w-[50%]'
|
||||
className='h-8 w-1/2 grow'
|
||||
onClick={() =>
|
||||
showTorrentsModal({
|
||||
showId: show.id,
|
||||
@@ -35,11 +35,11 @@ const Actions = ({ onClose, show }: Props) => (
|
||||
Torrents
|
||||
</Button>
|
||||
<Link
|
||||
className='flex w-[50%]'
|
||||
className='flex w-1/2'
|
||||
href={`/similar?id=${show.id}&title=${encodeURIComponent(show.title)}&type=${show.type}`}
|
||||
onClick={onClose}
|
||||
>
|
||||
<Button className='h-8 flex-grow'>Similar</Button>
|
||||
<Button className='h-8 grow'>Similar</Button>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -25,13 +25,13 @@ const Preview: FC<Props> = ({ show, className, onClose, children, card }) => {
|
||||
return (
|
||||
<div className={cn('flex flex-col md:flex-row gap-2 rounded-xl', { 'p-2': Boolean(onClose) }, className)}>
|
||||
{card || <Card className='mx-auto' show={show} />}
|
||||
<div className='flex flex-col grow'>
|
||||
{children && <div className='flex hover-none:hidden w-full max-sm:mb-0 mb-2 gap-2'>{children}</div>}
|
||||
<div className='flex grow flex-col'>
|
||||
{children && <div className='mb-2 flex w-full gap-2 hover-none:hidden max-sm:mb-0'>{children}</div>}
|
||||
<div className='flex w-full gap-2'>
|
||||
<Actions show={show} onClose={onClose} />
|
||||
</div>
|
||||
<Separator className='my-2' />
|
||||
<p key={show.id} className='leading-7 mb-3'>
|
||||
<p key={show.id} className='mb-3 leading-7'>
|
||||
{show.overview}
|
||||
</p>
|
||||
<div className='mt-auto grid grid-cols-1 rounded-lg'>
|
||||
|
||||
@@ -43,7 +43,7 @@ const components: VirtuosoProps<Show, (index: number) => void>['components'] = {
|
||||
}),
|
||||
Scroller: forwardRef(function Scroller({ context, ...props }, ref) {
|
||||
return (
|
||||
<div {...props} ref={ref} className='overflow-hidden no-scrollbar snap-mandatory snap-x rounded-lg h-full' />
|
||||
<div {...props} ref={ref} className='no-scrollbar h-full snap-x snap-mandatory overflow-hidden rounded-lg' />
|
||||
);
|
||||
})
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ const Random = () => {
|
||||
return (
|
||||
<Preview
|
||||
show={movie}
|
||||
className='bg-background rounded-md'
|
||||
className='rounded-md bg-background'
|
||||
card={<Carousel index={index} shows={movies} onIndexChange={onIndexChange} onEndReached={fetchNextPage} />}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -18,18 +18,18 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
|
||||
|
||||
return (
|
||||
Boolean(credits?.length) && (
|
||||
<ul className='flex gap-2 no-scrollbar overflow-auto rounded-lg snap-mandatory snap-x opacity-0 animate-fade-aside-slide-in'>
|
||||
<ul className='no-scrollbar flex animate-fade-aside-slide-in snap-x snap-mandatory gap-2 overflow-auto rounded-lg opacity-0'>
|
||||
{credits?.map((actor) => (
|
||||
<li
|
||||
key={`${actor.id}_${actor.cast_id}`}
|
||||
title={actor.name}
|
||||
className='bg-card text-card-foreground self-end max-w-[120px] w-full shrink-0 cursor-pointer transition-shadow hover:shadow-lg relative snap-start'
|
||||
className='relative w-full max-w-[120px] shrink-0 cursor-pointer snap-start self-end bg-card text-card-foreground transition-shadow hover:shadow-lg'
|
||||
>
|
||||
<Link
|
||||
href={`/starring?actorId=${actor.id}&title=${encodeURIComponent(actor.name)}`}
|
||||
onClick={() => onPersonClick?.(actor.id.toString())}
|
||||
>
|
||||
<div className='rounded-lg overflow-hidden'>
|
||||
<div className='overflow-hidden rounded-lg'>
|
||||
{actor.profile_path ? (
|
||||
<Image
|
||||
unoptimized
|
||||
@@ -39,15 +39,15 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
|
||||
alt={actor.name}
|
||||
/>
|
||||
) : (
|
||||
<div className='h-[180px] w-[120px] flex items-center justify-center rounded-lg'>
|
||||
<div className='flex h-[180px] w-[120px] items-center justify-center rounded-lg'>
|
||||
<User2 size={120} strokeWidth={1} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className='text-white text-sm absolute w-full h-full top-0 left-0 rounded-md flex flex-col justify-between p-2 py-1 bg-vignette'>
|
||||
<p className=' overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.name}</p>
|
||||
<div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 py-1 text-sm text-white'>
|
||||
<p className=' truncate'>{actor.name}</p>
|
||||
{Boolean(actor.character) && (
|
||||
<p className='overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.character}</p>
|
||||
<p className='truncate'>{actor.character}</p>
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
@@ -12,7 +12,7 @@ interface Props {
|
||||
const Handlers: FC<Props> = ({ onClick, show }) => {
|
||||
const { toggle } = useFavoriteToggle(show);
|
||||
|
||||
return <div onClick={onClick} onDoubleClick={toggle} className='absolute top-0 left-0 w-full h-full' />;
|
||||
return <div onClick={onClick} onDoubleClick={toggle} className='absolute left-0 top-0 size-full' />;
|
||||
};
|
||||
|
||||
export default Handlers;
|
||||
@@ -8,9 +8,9 @@ interface Props {
|
||||
|
||||
const Poster: FC<Props> = ({ title, poster }) => {
|
||||
return poster ? (
|
||||
<img className='rounded-lg w-full h-full object-cover' src={poster} alt={title} />
|
||||
<img className='size-full rounded-lg object-cover' src={poster} alt={title} />
|
||||
) : (
|
||||
<div className='w-full flex items-center justify-center rounded-lg grow'>
|
||||
<div className='flex w-full grow items-center justify-center rounded-lg'>
|
||||
<ImageOff size={100} strokeWidth={1} color='hsl(215.4 16.3% 46.9%)' />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ const showHostManagerModal = create<InstanceProps<string>>(({ onResolve, onRejec
|
||||
const setPrefix = useSetPrefix();
|
||||
|
||||
return (
|
||||
<Modal className='p-2 max-w-[200px] m-auto' onClose={onReject}>
|
||||
<Modal className='m-auto max-w-[200px] p-2' onClose={onReject}>
|
||||
<Input
|
||||
autoFocus
|
||||
placeholder='Enter address of your torrents streamer'
|
||||
|
||||
@@ -37,7 +37,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
|
||||
|
||||
return (
|
||||
<Modal
|
||||
className='p-0 border-none rounded-lg overflow-hidden flex items-center justify-center relative'
|
||||
className='relative flex items-center justify-center overflow-hidden rounded-lg border-none p-0'
|
||||
style={{ aspectRatio: '16/9' }}
|
||||
onClose={onResolve}
|
||||
>
|
||||
@@ -62,7 +62,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
|
||||
</Player>
|
||||
{isLoading && (
|
||||
<>
|
||||
<div className='w-full h-full left-0 top-0 absolute flex items-center justify-center bg-black/70'>
|
||||
<div className='absolute left-0 top-0 flex size-full items-center justify-center bg-black/70'>
|
||||
<div className='animate-spin'>
|
||||
<Loader color='white' />
|
||||
</div>
|
||||
|
||||
@@ -19,10 +19,10 @@ const TableHeadSortable: FC<Props> = ({ title, sort, value, sortable, onChange }
|
||||
|
||||
return (
|
||||
<TableHead onClick={handleSort} className={cn('select-none px-2', sortable && 'cursor-pointer')}>
|
||||
<div className='flex gap-1 items-center'>
|
||||
<div className='flex items-center gap-1'>
|
||||
<span>{title}</span>
|
||||
{sortable &&
|
||||
(sort === value ? <ArrowDownIcon className='ml-2 h-4 w-4' /> : <CaretSortIcon className='ml-2 h-4 w-4' />)}
|
||||
(sort === value ? <ArrowDownIcon className='ml-2 size-4' /> : <CaretSortIcon className='ml-2 size-4' />)}
|
||||
</div>
|
||||
</TableHead>
|
||||
);
|
||||
|
||||
@@ -49,12 +49,12 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
||||
|
||||
return (
|
||||
<Modal className='p-0' onClose={onResolve}>
|
||||
<Table className='rounded-xl overflow-hidden'>
|
||||
<Table className='overflow-hidden rounded-xl'>
|
||||
<TableHeader>
|
||||
<TableRow className='!border-b-0'>
|
||||
<TableHead className='px-2' colSpan={4}>
|
||||
<div className='grid grid-cols-[1fr_auto] items-center gap-3'>
|
||||
<span className='overflow-ellipsis overflow-hidden text-base whitespace-nowrap'>{title}</span>
|
||||
<span className='truncate text-base'>{title}</span>
|
||||
<Button
|
||||
className='h-6 p-2'
|
||||
variant={withYear ? 'default' : 'ghost'}
|
||||
@@ -82,7 +82,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
||||
{!isMobile && <TableHead className='px-2'>Title</TableHead>}
|
||||
<TableHeadSortable sortable={sortable} title='Size' sort={Sort.size} value={sort} onChange={setSort} />
|
||||
<TableHeadSortable sortable={sortable} title='Seeders' sort={Sort.seeds} value={sort} onChange={setSort} />
|
||||
<TableHead className='px-2 cursor-pointer select-none' onClick={() => showHostManagerModal()} />
|
||||
<TableHead className='cursor-pointer select-none px-2' onClick={() => showHostManagerModal()} />
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
@@ -102,24 +102,24 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
||||
</TableCell>
|
||||
)}
|
||||
<TableCell className='p-2'>
|
||||
<div className='flex items-center gap-1 shrink-0'>{torrent.size}</div>
|
||||
<div className='flex shrink-0 items-center gap-1'>{torrent.size}</div>
|
||||
</TableCell>
|
||||
<TableCell className='p-2'>{torrent.seeders}</TableCell>
|
||||
<TableCell className='text-center p-1 pr-2'>
|
||||
<div className='flex gap-2 justify-end'>
|
||||
<TableCell className='p-1 pr-2 text-center'>
|
||||
<div className='flex justify-end gap-2'>
|
||||
{Boolean(key === providers.yts.key && torrent.seeders) && (
|
||||
<div
|
||||
className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
|
||||
onClick={() => showPlayer({ magnet: torrent.magnet, backdrop })}
|
||||
>
|
||||
<Play size={20} />
|
||||
</div>
|
||||
)}
|
||||
<a href={torrent.magnet} className='flex items-center justify-center h-8 w-8 border rounded-lg'>
|
||||
<a href={torrent.magnet} className='flex size-8 items-center justify-center rounded-lg border'>
|
||||
<Magnet size={20} />
|
||||
</a>
|
||||
<div
|
||||
className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
|
||||
onClick={() => navigator.clipboard.writeText(torrent.magnet)}
|
||||
>
|
||||
<Copy size={20} />
|
||||
@@ -127,7 +127,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
||||
{prefix && !prefix.includes('{host}') && (
|
||||
<div
|
||||
onClick={() => cast(torrent.magnet!)}
|
||||
className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
|
||||
>
|
||||
<Cast size={20} />
|
||||
</div>
|
||||
@@ -140,7 +140,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
||||
{isLoading && (
|
||||
<TableRow>
|
||||
<TableCell colSpan={4}>
|
||||
<div className='h-40 w-full flex items-center justify-center'>
|
||||
<div className='flex h-40 w-full items-center justify-center'>
|
||||
<Loader className='animate-spin' />
|
||||
</div>
|
||||
</TableCell>
|
||||
@@ -149,7 +149,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
||||
{!isLoading && isFetched && !torrents?.length && (
|
||||
<TableRow>
|
||||
<TableCell colSpan={4}>
|
||||
<div className='h-40 w-full flex items-center justify-center text-xl text-muted-foreground'>
|
||||
<div className='flex h-40 w-full items-center justify-center text-xl text-muted-foreground'>
|
||||
Nothing was found
|
||||
</div>
|
||||
</TableCell>
|
||||
|
||||
@@ -17,11 +17,11 @@ const showTrailerModal = create(({ trailerKey, onResolve }: { trailerKey?: strin
|
||||
if (!trailerKey) return;
|
||||
|
||||
return (
|
||||
<Modal className='block p-0 max-w-[930px] border-none bg-black' style={{ aspectRatio: '16/9' }} onClose={onResolve}>
|
||||
<Modal className='block max-w-[930px] border-none bg-black p-0' style={{ aspectRatio: '16/9' }} onClose={onResolve}>
|
||||
<iframe
|
||||
allowFullScreen
|
||||
allow='autoplay'
|
||||
className='border-none rounded-lg'
|
||||
className='rounded-lg border-none'
|
||||
width='100%'
|
||||
height='100%'
|
||||
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}
|
||||
|
||||
@@ -25,17 +25,17 @@ const Show: FC<Props> = ({ show, onClick, className, containerProps }) => {
|
||||
className
|
||||
)}
|
||||
>
|
||||
<div className='flex w-full h-full'>
|
||||
<div className='flex size-full'>
|
||||
<Poster title={show.title} poster={show.poster} />
|
||||
</div>
|
||||
<div className='text-white absolute w-full h-full top-0 left-0 rounded-md flex flex-col justify-between p-2 bg-vignette'>
|
||||
<div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 text-white'>
|
||||
<Handlers show={show} onClick={onClick} />
|
||||
<div className='grid grid-cols-[1fr_auto] opacity-75 gap-2'>
|
||||
<span className='overflow-ellipsis overflow-hidden whitespace-nowrap'>{show.title}</span>
|
||||
<div className='grid grid-cols-[1fr_auto] gap-2 opacity-75'>
|
||||
<span className='truncate'>{show.title}</span>
|
||||
{Boolean(show.release) && <span>{new Date(show.release).getFullYear()}</span>}
|
||||
</div>
|
||||
<div className='opacity-75 mb-[-5px]'>
|
||||
<span className='select-none flex w-full items-center ml-auto gap-1 mt-[-8px] justify-between z-[1]'>
|
||||
<div className='mb-[-5px] opacity-75'>
|
||||
<span className='z-[1] ml-auto mt-[-8px] flex w-full select-none items-center justify-between gap-1'>
|
||||
<Favorite show={show} />
|
||||
<Rating rating={show.rating} />
|
||||
</span>
|
||||
|
||||
@@ -8,7 +8,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const Marquee: FC<Props> = ({ shows }) => (
|
||||
<ul className='flex overflow-auto gap-2 rounded-lg snap-mandatory snap-x no-scrollbar opacity-0 animate-fade-aside-slide-in'>
|
||||
<ul className='no-scrollbar flex animate-fade-aside-slide-in snap-x snap-mandatory gap-2 overflow-auto rounded-lg opacity-0'>
|
||||
{shows.map((show) => (
|
||||
<li key={show.id} className='snap-start'>
|
||||
<Card className='!h-[350px] !w-[230px] text-sm' show={show} onClick={() => showPreviewModal({ show })} />
|
||||
|
||||
@@ -8,7 +8,7 @@ const buttonVariants = cva(
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm active:shadow',
|
||||
default: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:shadow',
|
||||
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
||||
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
||||
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||
@@ -19,7 +19,7 @@ const buttonVariants = cva(
|
||||
default: 'h-10 px-4 py-2',
|
||||
sm: 'h-9 rounded-md px-3',
|
||||
lg: 'h-11 rounded-md px-8',
|
||||
icon: 'h-10 w-10'
|
||||
icon: 'size-10'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
|
||||
@@ -90,7 +90,7 @@ const DialogContent = React.forwardRef<
|
||||
|
||||
return (
|
||||
<DialogPortal>
|
||||
<div className='fixed inset-0 w-full h-full bg-black/50 z-50' ref={wrapperRef}>
|
||||
<div className='fixed inset-0 z-50 size-full bg-black/50' ref={wrapperRef}>
|
||||
<DialogOverlay
|
||||
ref={(element) => {
|
||||
if (!element) return;
|
||||
@@ -115,7 +115,7 @@ const DialogContent = React.forwardRef<
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
<div className='absolute top-full block w-10 h-[20vh] pointer-events-none' />
|
||||
<div className='pointer-events-none absolute top-full block h-[20vh] w-10' />
|
||||
</DialogPrimitive.Content>
|
||||
</DialogOverlay>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<ChevronRight className='ml-auto h-4 w-4' />
|
||||
<ChevronRight className='ml-auto size-4' />
|
||||
</DropdownMenuPrimitive.SubTrigger>
|
||||
));
|
||||
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
||||
@@ -103,9 +103,9 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
||||
checked={checked}
|
||||
{...props}
|
||||
>
|
||||
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
||||
<span className='absolute left-2 flex size-3.5 items-center justify-center'>
|
||||
<DropdownMenuPrimitive.ItemIndicator>
|
||||
<Check className='h-4 w-4' />
|
||||
<Check className='size-4' />
|
||||
</DropdownMenuPrimitive.ItemIndicator>
|
||||
</span>
|
||||
{children}
|
||||
@@ -125,9 +125,9 @@ const DropdownMenuRadioItem = React.forwardRef<
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
||||
<span className='absolute left-2 flex size-3.5 items-center justify-center'>
|
||||
<DropdownMenuPrimitive.ItemIndicator>
|
||||
<Circle className='h-2 w-2 fill-current' />
|
||||
<Circle className='size-2 fill-current' />
|
||||
</DropdownMenuPrimitive.ItemIndicator>
|
||||
</span>
|
||||
{children}
|
||||
|
||||
@@ -8,7 +8,7 @@ type CursorProps = { left: number; width: number; opacity: number };
|
||||
|
||||
const Cursor: FC<CursorProps> = ({ width, left, opacity }) => (
|
||||
<li
|
||||
className='pointer-events-none absolute bg-primary rounded-2xl h-full z-0 transition-all'
|
||||
className='pointer-events-none absolute z-0 h-full rounded-2xl bg-primary transition-all'
|
||||
style={{ width, left, opacity }}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -83,7 +83,7 @@ const ToastClose = React.forwardRef<
|
||||
toast-close=""
|
||||
{...props}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
<X className="size-4" />
|
||||
</ToastPrimitives.Close>
|
||||
))
|
||||
ToastClose.displayName = ToastPrimitives.Close.displayName
|
||||
|
||||
+2
-3
@@ -1,9 +1,7 @@
|
||||
import { type ClassValue, clsx } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
|
||||
|
||||
export const createUniqueRandomGenerator = (max: number) => {
|
||||
const numbers = Array.from({ length: max }, (_, i) => i + 1);
|
||||
@@ -19,6 +17,7 @@ export const createUniqueRandomGenerator = (max: number) => {
|
||||
if (index >= numbers.length) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
return numbers[index++];
|
||||
};
|
||||
};
|
||||
Generated
+44
-1135
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -6,7 +6,7 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
"lint": "next lint --fix ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-dialog": "^1.1.1",
|
||||
@@ -38,8 +38,7 @@
|
||||
"tailwindcss-animate": "^1.0.6",
|
||||
"typescript": "5.1.6",
|
||||
"vaul": "^0.8.9",
|
||||
"video-react": "^0.16.0",
|
||||
"video.js": "^8.17.4"
|
||||
"video-react": "^0.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-cookie": "^3.0.3",
|
||||
@@ -49,6 +48,7 @@
|
||||
"@types/video-react": "^0.15.8",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||
"eslint-plugin-tailwindcss": "^3.17.4",
|
||||
"postcss": "^8.4.27",
|
||||
"prettier": "^3.0.0",
|
||||
"tailwindcss": "^3.3.3",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
Reference in new issue
Block a user