|
1 | 1 | import type {AppProps} from 'next/app'
|
2 | 2 | import GlobalStyles from "../components/GlobalStyles";
|
3 | 3 | import tw, {css} from "twin.macro";
|
4 |
| -import Link from 'next/link' |
5 |
| -import {ReactNode, useState} from "react"; |
6 | 4 | import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
7 |
| -import {faChevronDown, faChevronRight} from "@fortawesome/free-solid-svg-icons"; |
| 5 | +import {faChevronDown, faToolbox} from "@fortawesome/free-solid-svg-icons"; |
| 6 | +import Link from 'next/link'; |
8 | 7 |
|
9 |
| -function Converter({Component, pageProps}: AppProps) { |
| 8 | +function Toolbox({Component, pageProps}: AppProps) { |
10 | 9 | return (
|
11 | 10 | <div>
|
12 | 11 | <GlobalStyles/>
|
13 | 12 | <div css={tw`flex flex-row`}>
|
14 |
| - <div css={tw`w-48 bg-gray-700 flex flex-col text-white py-4 px-4`}> |
15 |
| - <Link href={'/'}> |
16 |
| - <div css={tw`text-lg font-bold mr-auto hover:cursor-pointer mx-auto mb-8`}>HelpChat Tools</div> |
17 |
| - </Link> |
18 |
| - <Collapsable name={"Config Converters"}> |
19 |
| - <Collapsable name={"ChatChat"}> |
20 |
| - <Link href={'/converters/chatchat/deluxechat'}> |
21 |
| - <p css={tw`hover:cursor-pointer`}>DeluxeChat</p> |
22 |
| - </Link> |
23 |
| - <Link href={'/converters/chatchat/essentialschat'}> |
24 |
| - <p css={tw`hover:cursor-pointer`}>EssentialsChat</p> |
25 |
| - </Link> |
26 |
| - <Link href={'/converters/chatchat/venturechat'}> |
27 |
| - <p css={tw`hover:cursor-pointer`}>VentureChat</p> |
28 |
| - </Link> |
29 |
| - </Collapsable> |
30 |
| - </Collapsable> |
31 |
| - <Collapsable name={'Validators'}> |
32 |
| - <Link href={'/validators/yaml'}> |
33 |
| - <p css={tw`hover:cursor-pointer`}>Yaml Validator</p> |
34 |
| - </Link> |
35 |
| - </Collapsable> |
36 |
| - </div> |
37 | 13 | <div css={tw`flex-grow flex-shrink`}>
|
38 |
| - <div css={tw`text-white bg-blue-500 w-full md:px-8 p-2 h-11 flex flex-row`} /> |
| 14 | + <div css={tw`text-white bg-black w-full md:px-8 p-2 h-14 flex flex-row text-white md:px-12`}> |
| 15 | + <div css={tw`flex flex-row w-full`}> |
| 16 | + <div css={tw`flex flex-row hover:cursor-pointer`}> |
| 17 | + <Link href={"/"}> |
| 18 | + <> |
| 19 | + <div css={tw`my-auto`}> |
| 20 | + <FontAwesomeIcon icon={faToolbox} size={"2x"}/> |
| 21 | + </div> |
| 22 | + <div css={tw`ml-2 my-auto font-bold text-center`}> |
| 23 | + <p css={css` |
| 24 | + margin-bottom: -0.2rem; |
| 25 | + `}>HelpChat</p> |
| 26 | + <p css={css` |
| 27 | + margin-top: -0.2rem; |
| 28 | + ${tw`text-xs`} |
| 29 | + `}>ToolBox</p> |
| 30 | + </div> |
| 31 | + </> |
| 32 | + </Link> |
| 33 | + </div> |
| 34 | + <div css={tw`flex flex-row flex-grow flex-shrink`}> |
| 35 | + <Link href={"/"}> |
| 36 | + <p css={tw`px-3 mx-1 py-2 my-auto ml-auto hover:cursor-pointer`}>Home</p> |
| 37 | + </Link> |
| 38 | + <Link href={"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}> |
| 39 | + <p css={tw`px-3 mx-1 py-2 my-auto hover:cursor-pointer`}>Spigot</p> |
| 40 | + </Link> |
| 41 | + <Link href={"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}> |
| 42 | + <p css={tw`px-3 mx-1 py-2 my-auto hover:cursor-pointer`}>Github</p> |
| 43 | + </Link> |
| 44 | + <div css={css` |
| 45 | + ${tw`my-auto hover:cursor-pointer inline-block relative py-2 rounded-t-md`} |
| 46 | + :hover { |
| 47 | + ${tw`bg-gray-800`} |
| 48 | + > .dropdown { |
| 49 | + ${tw`block`} |
| 50 | + } |
| 51 | + } |
| 52 | + `}><p css={tw`pl-3 ml-1 inline`}>More Tools</p> |
| 53 | + <div css={tw`ml-1 pr-3 mr-1 inline`}><FontAwesomeIcon icon={faChevronDown}/></div> |
| 54 | + <div css={tw`hidden absolute bg-gray-800 w-full rounded-b-md`} className={"dropdown"}> |
| 55 | + <p css={tw`px-3 mx-1 pt-3 font-bold pb-1 hover:cursor-default`}>Converters</p> |
| 56 | + <p css={tw`px-3 mx-1 ml-2 pb-1 hover:cursor-default`}>ChatChat</p> |
| 57 | + <Link href={"/converters/chatchat/deluxechat"}> |
| 58 | + <p css={tw`px-3 mx-1 ml-3 pb-1 hover:cursor-pointer`}>DeluxeChat</p> |
| 59 | + </Link> |
| 60 | + <Link href={"/converters/chatchat/essentialschat"}> |
| 61 | + <p css={tw`px-3 mx-1 ml-3 pb-1 hover:cursor-pointer`}>Essentials</p> |
| 62 | + </Link> |
| 63 | + <Link href={"/converters/chatchat/venturechat"}> |
| 64 | + <p css={tw`px-3 mx-1 ml-3 hover:cursor-pointer`}>VentureChat</p> |
| 65 | + </Link> |
| 66 | + <p css={tw`px-3 mx-1 pt-3 font-bold pb-1 hover:cursor-default`}>Validators</p> |
| 67 | + <Link href={"/validators/yaml"}> |
| 68 | + <p css={tw`px-2 mx-1 ml-3 hover:cursor-pointer pb-1`}>Yaml</p> |
| 69 | + </Link> |
| 70 | + </div> |
| 71 | + </div> |
| 72 | + <Link href={"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}> |
| 73 | + <p css={tw`px-3 mx-1 py-2 my-auto hover:cursor-pointer bg-white text-black rounded-md`}>Join |
| 74 | + our Discord</p> |
| 75 | + </Link> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | + </div> |
39 | 79 | <Component {...pageProps} /></div>
|
40 | 80 | </div>
|
41 | 81 | </div>
|
42 | 82 | )
|
43 | 83 | }
|
44 | 84 |
|
45 |
| -function Collapsable({children, name}: { children: ReactNode, name: string }) { |
46 |
| - const [open, setOpen] = useState(false); |
47 |
| - return ( |
48 |
| - <div css={tw`flex flex-col mb-2`}> |
49 |
| - <div css={tw`flex flex-row`}> |
50 |
| - {name} |
51 |
| - <div onClick={() => setOpen(!open)} css={tw`ml-auto hover:cursor-pointer`}> |
52 |
| - {open ? <FontAwesomeIcon icon={faChevronDown}/> : <FontAwesomeIcon icon={faChevronRight}/>} |
53 |
| - </div> |
54 |
| - </div> |
55 |
| - <div css={css` |
56 |
| - display: ${open ? 'block' : 'none'}; |
57 |
| - ${tw`ml-3`} |
58 |
| - `}> |
59 |
| - {children} |
60 |
| - </div> |
61 |
| - </div> |
62 |
| - ) |
63 |
| -} |
64 |
| - |
65 |
| -export default Converter |
| 85 | +export default Toolbox |
0 commit comments