head metadata and team init
This commit is contained in:
parent
63c8d394cc
commit
d2d4ee5813
6 changed files with 107 additions and 54 deletions
|
@ -20,16 +20,27 @@ function HomeLayout(props: HomeLayoutProps) {
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>InvestBot</title>
|
<title>InvestBot</title>
|
||||||
<meta name="description" content="Temporary home :)" />
|
<meta name="description" content="Serving anny's community est. 2022" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<meta name="theme-color" content="#c084fc" />
|
||||||
|
<meta property="og:title" content="InvestBot" />
|
||||||
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content="Serving anny's community est. 2022"
|
||||||
|
/>
|
||||||
|
<meta property="og:image" content="/img/logo.webp" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:site_name" content="InvestBot" />
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<LazyMotion features={domAnimation}>
|
<LazyMotion features={domAnimation}>
|
||||||
<AnimatePresence exitBeforeEnter>
|
<AnimatePresence mode="wait">
|
||||||
<NavBar options={navOptions} />
|
<NavBar options={navOptions} />
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
</LazyMotion>
|
</LazyMotion>
|
||||||
|
|
||||||
<LazyMotion features={domAnimation}>
|
<LazyMotion features={domAnimation}>
|
||||||
<AnimatePresence exitBeforeEnter>
|
<AnimatePresence mode="wait">
|
||||||
<m.div
|
<m.div
|
||||||
key={router.route.concat("layout-fade")}
|
key={router.route.concat("layout-fade")}
|
||||||
className="h-screen w-screen"
|
className="h-screen w-screen"
|
||||||
|
|
|
@ -27,7 +27,7 @@ const DefaultNavOption = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Link href={href} key={label}>
|
<Link href={href} key={label}>
|
||||||
<p className="pointer-events-auto relative select-none pl-3 pr-3 text-white md:pl-5 md:pr-5">
|
<p className="pointer-events-auto relative select-none pl-3 pr-3 font-plusJakarta text-white md:pl-5 md:pr-5">
|
||||||
{label}
|
{label}
|
||||||
</p>
|
</p>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -42,6 +42,7 @@ interface NavTemplate {
|
||||||
const homeMain: NavTemplate[] = [
|
const homeMain: NavTemplate[] = [
|
||||||
{ content: <DefaultNavOption label="Home" href="/" /> },
|
{ content: <DefaultNavOption label="Home" href="/" /> },
|
||||||
{ content: <DefaultNavOption label="About" href="/about" /> },
|
{ content: <DefaultNavOption label="About" href="/about" /> },
|
||||||
|
{ content: <DefaultNavOption label="Team" href="/team" /> },
|
||||||
{ content: <DefaultNavOption label="Contact" href="/contact" /> },
|
{ content: <DefaultNavOption label="Contact" href="/contact" /> },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,14 @@ import { homeMain } from "../layouts/NavTemplates";
|
||||||
|
|
||||||
function About() {
|
function About() {
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>About - InvestBot</title>
|
||||||
|
</Head>
|
||||||
<div className="flex min-h-screen flex-col items-center justify-center py-2">
|
<div className="flex min-h-screen flex-col items-center justify-center py-2">
|
||||||
<p>about</p>
|
<p>about</p>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,14 @@ import { homeMain } from "../layouts/NavTemplates";
|
||||||
|
|
||||||
function About() {
|
function About() {
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Contact - InvestBot</title>
|
||||||
|
</Head>
|
||||||
<div className="flex min-h-screen flex-col items-center justify-center py-2">
|
<div className="flex min-h-screen flex-col items-center justify-center py-2">
|
||||||
<p>contact</p>
|
<p>contact</p>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,13 @@ import HomeLayout from "../layouts/HomeLayout";
|
||||||
import { homeMain } from "../layouts/NavTemplates";
|
import { homeMain } from "../layouts/NavTemplates";
|
||||||
import type { NextPageWithLayout } from "./_app";
|
import type { NextPageWithLayout } from "./_app";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
const Home: NextPageWithLayout = () => {
|
const Home: NextPageWithLayout = () => {
|
||||||
let api7tvEmotes = `/api/7tv/emotes?c=61ad997effa9aba101bcfddf`;
|
let api7tvEmotes = `/api/7tv/emotes?c=61ad997effa9aba101bcfddf`;
|
||||||
const [emotesUrls, setEmotes] = useState([]);
|
const [emotesUrls, setEmotes] = useState([]);
|
||||||
const [currentEmote, setCurrentEmote] = useState(0);
|
const [currentEmote, setCurrentEmote] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch(api7tvEmotes)
|
fetch(api7tvEmotes)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
|
@ -40,6 +42,7 @@ const Home: NextPageWithLayout = () => {
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// change emote every 5 seconds, separated from the fetch call so it only initializes once when the emotes are loaded
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
// choose a random emote
|
// choose a random emote
|
||||||
|
@ -72,6 +75,10 @@ const Home: NextPageWithLayout = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Home - InvestBot</title>
|
||||||
|
</Head>
|
||||||
<div className="flex h-full w-full flex-col items-center justify-center">
|
<div className="flex h-full w-full flex-col items-center justify-center">
|
||||||
<div className="inline-grid grid-cols-1 gap-10 text-white md:grid-cols-3">
|
<div className="inline-grid grid-cols-1 gap-10 text-white md:grid-cols-3">
|
||||||
<m.div
|
<m.div
|
||||||
|
@ -121,6 +128,7 @@ const Home: NextPageWithLayout = () => {
|
||||||
</m.div>
|
</m.div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
23
pages/team.tsx
Normal file
23
pages/team.tsx
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import Head from "next/head";
|
||||||
|
import { ReactElement } from "react";
|
||||||
|
import HomeLayout from "../layouts/HomeLayout";
|
||||||
|
import { homeMain } from "../layouts/NavTemplates";
|
||||||
|
|
||||||
|
function Team() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Team - InvestBot</title>
|
||||||
|
</Head>
|
||||||
|
<div className="flex min-h-screen flex-col items-center justify-center py-2">
|
||||||
|
<p>Team</p>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Team.getLayout = function getLayout(page: ReactElement) {
|
||||||
|
return <HomeLayout navOptions={homeMain}>{page}</HomeLayout>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Team;
|
Loading…
Reference in a new issue