mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-25 15:13:14 +01:00
things
This commit is contained in:
1 parent
9f41bab28a
commit
92e9073939
3 files changed
+70
-16
No files matched your search
+23
-6
@@ -11,13 +11,30 @@ import * as styles from './page.css';
|
|||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
<Flex direction="column" gap="4" justify="center" style={{ flex: 1 }}>
|
{/* <Flex
|
||||||
{/* <TextField.Root placeholder="Search anything...">
|
direction="column"
|
||||||
<TextField.Slot>
|
gap="6"
|
||||||
<MagnifyingGlassIcon height="16" width="16" />
|
align="center"
|
||||||
</TextField.Slot>
|
justify="center"
|
||||||
</TextField.Root> */}
|
style={{
|
||||||
|
height: '80vh',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<BlitzkriegWormWide
|
||||||
|
style={{
|
||||||
|
height: 48,
|
||||||
|
width: '100%',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<EverythingSearch size="3" style={{ width: '100%' }} />
|
||||||
|
|
||||||
|
<Button variant="ghost">
|
||||||
|
All tools <CaretDownIcon />
|
||||||
|
</Button>
|
||||||
|
</Flex> */}
|
||||||
|
|
||||||
|
<Flex direction="column" gap="4" justify="center" style={{ flex: 1 }}>
|
||||||
<Flex gap="3" wrap="wrap" align="center" justify="center">
|
<Flex gap="3" wrap="wrap" align="center" justify="center">
|
||||||
{TOOLS.map((tool) => (
|
{TOOLS.map((tool) => (
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
||||||
|
import { Card, TextField } from '@radix-ui/themes';
|
||||||
|
import { ComponentProps, useState } from 'react';
|
||||||
|
|
||||||
|
export function EverythingSearch({
|
||||||
|
style,
|
||||||
|
...props
|
||||||
|
}: ComponentProps<typeof TextField.Root>) {
|
||||||
|
const [search, setSearch] = useState('');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<TextField.Root
|
||||||
|
value={search}
|
||||||
|
placeholder="Search tanks, players, clans..."
|
||||||
|
style={{ position: 'relative', ...style }}
|
||||||
|
onChange={(event) => {
|
||||||
|
setSearch(event.target.value.trim());
|
||||||
|
}}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<TextField.Slot>
|
||||||
|
<MagnifyingGlassIcon />
|
||||||
|
</TextField.Slot>
|
||||||
|
|
||||||
|
{search.length > 0 && (
|
||||||
|
<TextField.Slot>
|
||||||
|
<Card
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: 'calc(100% + 8px)',
|
||||||
|
left: 0,
|
||||||
|
width: '100%',
|
||||||
|
zIndex: 1,
|
||||||
|
}}
|
||||||
|
></Card>
|
||||||
|
</TextField.Slot>
|
||||||
|
)}
|
||||||
|
</TextField.Root>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
import { HamburgerMenuIcon, MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
import { HamburgerMenuIcon } from '@radix-ui/react-icons';
|
||||||
import { Flex, IconButton, TextField } from '@radix-ui/themes';
|
import { Flex, IconButton } from '@radix-ui/themes';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useFullScreen } from '../../hooks/useFullScreen';
|
import { useFullScreen } from '../../hooks/useFullScreen';
|
||||||
import { BlitzkriegWormWide } from '../../icons/BlitzkriegWormWide';
|
import { BlitzkriegWormWide } from '../../icons/BlitzkriegWormWide';
|
||||||
import { theme } from '../../stitches.config';
|
import { theme } from '../../stitches.config';
|
||||||
|
import { EverythingSearch } from './components/EverythingSearch';
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
const isFullScreen = useFullScreen();
|
const isFullScreen = useFullScreen();
|
||||||
|
// const pathName = usePathname();
|
||||||
|
|
||||||
if (isFullScreen) return null;
|
if (isFullScreen) return null;
|
||||||
|
|
||||||
@@ -44,14 +46,7 @@ export default function Navbar() {
|
|||||||
<BlitzkriegWormWide />
|
<BlitzkriegWormWide />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<TextField.Root
|
<EverythingSearch style={{ flex: 1 }} />
|
||||||
placeholder="Search player, tanks, clans, anything..."
|
|
||||||
style={{ flex: 1 }}
|
|
||||||
>
|
|
||||||
<TextField.Slot>
|
|
||||||
<MagnifyingGlassIcon />
|
|
||||||
</TextField.Slot>
|
|
||||||
</TextField.Root>
|
|
||||||
|
|
||||||
<IconButton variant="ghost">
|
<IconButton variant="ghost">
|
||||||
<HamburgerMenuIcon />
|
<HamburgerMenuIcon />
|
||||||
|
|||||||
Reference in new issue
Block a user