Skip to content

Commit aa33094

Browse files
committed
wip: site
1 parent 7ce707a commit aa33094

File tree

12 files changed

+466
-194
lines changed

12 files changed

+466
-194
lines changed

web/components/counter.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

web/components/icons.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
11
import * as React from "react";
22
import { IconSvgProps } from "@/types";
33

4-
export const Logo: React.FC<IconSvgProps> = ({
5-
size = 36,
6-
width,
7-
height,
8-
...props
9-
}) => (
10-
<svg
11-
fill="none"
12-
height={size || height}
13-
viewBox="0 0 32 32"
14-
width={size || width}
15-
{...props}
16-
>
17-
<path
18-
clipRule="evenodd"
19-
d="M17.6482 10.1305L15.8785 7.02583L7.02979 22.5499H10.5278L17.6482 10.1305ZM19.8798 14.0457L18.11 17.1983L19.394 19.4511H16.8453L15.1056 22.5499H24.7272L19.8798 14.0457Z"
20-
fill="currentColor"
21-
fillRule="evenodd"
22-
/>
23-
</svg>
24-
);
25-
264
export const DiscordIcon: React.FC<IconSvgProps> = ({
275
size = 24,
286
width,

web/components/navbar.tsx

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import {
2-
Button,
3-
Kbd,
42
Link,
5-
Input,
63
Navbar as NextUINavbar,
74
NavbarContent,
85
NavbarMenu,
@@ -23,41 +20,15 @@ import {
2320
TwitterIcon,
2421
GithubIcon,
2522
DiscordIcon,
26-
HeartFilledIcon,
27-
SearchIcon,
2823
} from "@/components/icons";
2924

30-
import { Logo } from "@/components/icons";
31-
3225
export const Navbar = () => {
33-
const searchInput = (
34-
<Input
35-
aria-label="Search"
36-
classNames={{
37-
inputWrapper: "bg-default-100",
38-
input: "text-sm",
39-
}}
40-
endContent={
41-
<Kbd className="hidden lg:inline-block" keys={["command"]}>
42-
K
43-
</Kbd>
44-
}
45-
labelPlacement="outside"
46-
placeholder="Search..."
47-
startContent={
48-
<SearchIcon className="text-base text-default-400 pointer-events-none flex-shrink-0" />
49-
}
50-
type="search"
51-
/>
52-
);
53-
5426
return (
5527
<NextUINavbar maxWidth="xl" position="sticky">
5628
<NavbarContent className="basis-1/5 sm:basis-full" justify="start">
5729
<NavbarBrand className="gap-3 max-w-fit">
5830
<NextLink className="flex justify-start items-center gap-1" href="/">
59-
<Logo />
60-
<p className="font-bold text-inherit">ACME</p>
31+
<p className="font-bold text-inherit">Chatr</p>
6132
</NextLink>
6233
</NavbarBrand>
6334
<div className="hidden lg:flex gap-4 justify-start ml-2">
@@ -78,7 +49,7 @@ export const Navbar = () => {
7849
</div>
7950
</NavbarContent>
8051

81-
<NavbarContent className="hidden sm:flex basis-1/5 sm:basis-full" justify="end">
52+
<NavbarContent className="hidden sm:flex basis-1/5 sm:basis-full" justify="end">
8253
<NavbarItem className="hidden sm:flex gap-2">
8354
<Link isExternal href={siteConfig.links.twitter}>
8455
<TwitterIcon className="text-default-500" />
@@ -91,9 +62,8 @@ export const Navbar = () => {
9162
</Link>
9263
<ThemeSwitch />
9364
</NavbarItem>
94-
<NavbarItem className="hidden lg:flex">{searchInput}</NavbarItem>
9565
<NavbarItem className="hidden md:flex">
96-
<Button
66+
{/* <Button
9767
isExternal
9868
as={Link}
9969
className="text-sm font-normal text-default-600 bg-default-100"
@@ -102,30 +72,29 @@ export const Navbar = () => {
10272
variant="flat"
10373
>
10474
Sponsor
105-
</Button>
75+
</Button> */}
10676
</NavbarItem>
10777
</NavbarContent>
10878

10979
<NavbarContent className="sm:hidden basis-1 pl-4" justify="end">
110-
<Link isExternal href={siteConfig.links.github}>
111-
<GithubIcon className="text-default-500" />
112-
</Link>
113-
<ThemeSwitch />
80+
<Link isExternal href={siteConfig.links.github}>
81+
<GithubIcon className="text-default-500" />
82+
</Link>
83+
<ThemeSwitch />
11484
<NavbarMenuToggle />
115-
</NavbarContent>
85+
</NavbarContent>
11686

117-
<NavbarMenu>
118-
{searchInput}
87+
<NavbarMenu>
11988
<div className="mx-4 mt-2 flex flex-col gap-2">
120-
{siteConfig.navMenuItems.map((item, index) => (
89+
{siteConfig.navItems.map((item, index) => (
12190
<NavbarMenuItem key={`${item}-${index}`}>
12291
<Link
12392
color={
124-
index === 2
93+
index === 1
12594
? "primary"
126-
: index === siteConfig.navMenuItems.length - 1
127-
? "danger"
128-
: "foreground"
95+
: index === siteConfig.navItems.length - 1
96+
? "danger"
97+
: "foreground"
12998
}
13099
href="#"
131100
size="lg"

web/components/search.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { useState } from 'react';
2+
import { useRouter } from 'next/router';
3+
import { subtitle } from "@/components/primitives";
4+
5+
export const Search = () => {
6+
const router = useRouter();
7+
const [searchQuery, setSearchQuery] = useState('');
8+
9+
const handleSearch = () => {
10+
if (searchQuery.trim() !== '') {
11+
router.push(`/leaderboard/${searchQuery}`);
12+
}
13+
};
14+
15+
const handleInputChange = (event: any) => {
16+
setSearchQuery(event.target.value);
17+
};
18+
19+
return (
20+
<div className="w-min-full">
21+
<div className="flex flex-col">
22+
<input
23+
type="text"
24+
value={searchQuery}
25+
onChange={handleInputChange}
26+
placeholder="Enter guild ID"
27+
className="border border-gray-300 rounded-md px-4 py-3 focus:outline-none focus:ring focus:ring-blue-200 w-full text-lg"
28+
/>
29+
30+
<button
31+
onClick={handleSearch}
32+
className="bg-[#111] hover:bg-blue-500 text-white font-semibold py-2 px-4 rounded-lg transform hover:scale-105 transition-transform border border-blue-500 w-full mt-2"
33+
>
34+
<h3 className={subtitle()}>Go</h3>
35+
</button>
36+
</div>
37+
</div>
38+
);
39+
}

web/config/site.ts

Lines changed: 12 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,29 @@
11
export type SiteConfig = typeof siteConfig;
22

33
export const siteConfig = {
4-
name: "Next.js + NextUI",
5-
description: "Make beautiful websites regardless of your design experience.",
4+
name: "Chatr",
5+
description: "Chatr is a next generation Discord XP bot.",
66
navItems: [
77
{
88
label: "Home",
99
href: "/",
1010
},
11-
{
12-
label: "Docs",
13-
href: "/docs",
14-
},
15-
{
16-
label: "Pricing",
17-
href: "/pricing",
18-
},
19-
{
20-
label: "Blog",
21-
href: "/blog",
22-
},
23-
{
24-
label: "About",
25-
href: "/about",
26-
}
27-
],
28-
navMenuItems: [
29-
{
30-
label: "Profile",
31-
href: "/profile",
32-
},
3311
{
3412
label: "Dashboard",
35-
href: "/dashboard",
36-
},
37-
{
38-
label: "Projects",
39-
href: "/projects",
40-
},
41-
{
42-
label: "Team",
43-
href: "/team",
44-
},
45-
{
46-
label: "Calendar",
47-
href: "/calendar",
48-
},
49-
{
50-
label: "Settings",
51-
href: "/settings",
52-
},
53-
{
54-
label: "Help & Feedback",
55-
href: "/help-feedback",
13+
href: "https://dashboard.chatr.fun",
5614
},
5715
{
58-
label: "Logout",
59-
href: "/logout",
16+
label: "Docs",
17+
href: "https://docs.chatr.fun",
6018
},
19+
// {
20+
// label: "#",
21+
// href: "#",
22+
// },
6123
],
6224
links: {
63-
github: "https://github.com/nextui-org/nextui",
64-
twitter: "https://twitter.com/getnextui",
65-
docs: "https://nextui-docs-v2.vercel.app",
66-
discord: "https://discord.gg/9b6yyZKmH4",
67-
sponsor: "https://patreon.com/jrgarciadev"
25+
github: "https://github.com/GalvinPython/chatr",
26+
twitter: "https://twitter.com/reallygalvin",
27+
discord: "https://discord.gg/fpJVTkVngm",
6828
},
6929
};

web/layouts/default.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Navbar } from "@/components/navbar";
2-
import { Link } from "@nextui-org/link";
32
import { Head } from "./head";
43

54
export default function DefaultLayout({
@@ -11,20 +10,9 @@ export default function DefaultLayout({
1110
<div className="relative flex flex-col h-screen">
1211
<Head />
1312
<Navbar />
14-
<main className="container mx-auto max-w-7xl px-6 flex-grow">
13+
<main className="container mx-auto px-6 flex-grow">
1514
{children}
1615
</main>
17-
<footer className="w-full flex items-center justify-center py-3">
18-
<Link
19-
isExternal
20-
className="flex items-center gap-1 text-current"
21-
href="https://nextui-docs-v2.vercel.app?utm_source=next-app-template"
22-
title="nextui.org homepage"
23-
>
24-
<span className="text-default-600">Powered by</span>
25-
<p className="text-primary">NextUI</p>
26-
</Link>
27-
</footer>
2816
</div>
2917
);
3018
}

web/next.config.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
reactStrictMode: true,
3+
reactStrictMode: true,
4+
poweredByHeader: false,
5+
images: {
6+
remotePatterns: [
7+
{
8+
protocol: 'https',
9+
hostname: '**',
10+
port: '',
11+
pathname: '**',
12+
},
13+
],
14+
},
415
}
516

617
export default nextConfig

web/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,27 @@
55
"scripts": {
66
"dev": "next dev --port 56413",
77
"build": "next build",
8-
"start": "next start",
8+
"start": "next start --port 56414",
99
"lint": "next lint"
1010
},
1111
"dependencies": {
1212
"@nextui-org/react": "^2.3.0",
13-
"framer-motion": "^11.1.1",
1413
"@types/node": "20.5.7",
1514
"@types/react": "18.2.21",
1615
"@types/react-dom": "18.2.7",
1716
"autoprefixer": "10.4.19",
1817
"clsx": "^2.0.0",
18+
"framer-motion": "^11.1.1",
19+
"highcharts": "^11.4.6",
20+
"highcharts-react-official": "^3.2.1",
1921
"intl-messageformat": "^10.5.0",
2022
"next": "14.2.1",
2123
"next-themes": "^0.2.1",
2224
"postcss": "8.4.38",
2325
"react": "18.2.0",
2426
"react-dom": "18.2.0",
27+
"react-odometer": "^0.0.1",
28+
"react-odometerjs": "^3.1.3",
2529
"tailwind-variants": "^0.1.20",
2630
"tailwindcss": "3.4.3",
2731
"typescript": "5.0.4"

web/pages/_document.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Html, Head, Main, NextScript } from 'next/document'
22

33
export default function Document() {
4-
return (
5-
<Html lang="en">
6-
<Head />
7-
<body className="min-h-screen bg-background font-sans antialiased">
8-
<Main />
9-
<NextScript />
10-
</body>
11-
</Html>
12-
)
4+
return (
5+
<Html lang="en">
6+
<Head />
7+
<body className="min-h-screen bg-background font-sans antialiased">
8+
<Main />
9+
<NextScript />
10+
</body>
11+
</Html>
12+
)
1313
}

web/pages/api/hello.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)