Skip to content

Commit

Permalink
Merge pull request #1 from danielgoldelman/initial-homepage
Browse files Browse the repository at this point in the history
initial homepage implemented
  • Loading branch information
danielgoldelman authored Sep 7, 2023
2 parents 5ca27bb + 8885245 commit d8903dd
Show file tree
Hide file tree
Showing 15 changed files with 279 additions and 112 deletions.
Binary file added public/Daniel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/cwlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

8 changes: 8 additions & 0 deletions public/vectors/discord-icon-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions public/vectors/github-color-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/vectors/wesnest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vercel.svg

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
title: 'Code_Wes',
description: 'Code_Wes Website',
}

export default function RootLayout({
Expand Down
120 changes: 12 additions & 108 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,113 +1,17 @@
import Image from 'next/image'
import Landing from "@/components/landing/landing";
// import Team from "@/components/team/team";
import Links from "@/components/links/links";

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">src/app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{' '}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
<div className="bg-[#0d1117] overscroll-contain text-white">
<main className="justify-center">
<div className="">
<Landing />
{/* <Team /> */}
<Links />
</div>
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800 hover:dark:bg-opacity-30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore the Next.js 13 playground.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
)
</main>
</div>
);
}
27 changes: 27 additions & 0 deletions src/components/landing/landing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Image from "next/image";
import LandingTitle from "./title";

export default function Landing() {
return (
<div className="h-screen flex flex-col justify-center px-72">
<div className="grid grid-cols-3 py-32">
<div className="my-auto col-span-2 py-10">
<LandingTitle />
<p className="pt-4 text-lg">
A place where students interested in coding can discuss the CS
major,
<br />
interact outside of classes, and work on cool projects.
</p>
</div>
<Image
src="/cwlogo.png"
alt="Code_Wes Logo"
height={10000}
width={10000}
className="m-auto"
/>
</div>
</div>
);
}
95 changes: 95 additions & 0 deletions src/components/landing/title.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
"use client";
import { useEffect, useState } from "react";

export default function LandingTitle() {
const [title, setTitle] = useState(" ");

const landings = [
{
lang: "js",
start: "const name = ",
},
{
lang: "python",
start: "name = ",
},
{
lang: "java",
start: "String name = ",
},
{
lang: "C++",
start: "std::string name = ",
},
{
lang: "swift",
start: "let name = ",
},
{
lang: "go",
start: "var name string = ",
},
{
lang: "goShort",
start: "name := "
},
{
lang: "PHP",
start: "$name = ",
},
{
lang: "lua",
start: "local name = "
},
{
lang: "R",
start: "name <- "
},
{
lang: "Perl",
start: "my $myString = "
},
];

function chooseLang(len: number): number {
return Math.floor(Math.random() * len);
}

async function type(str: string) {
for (let i = 1; i <= str.length; i++) {
setTitle(str.substring(0, i) + "|");
await new Promise((res) => setTimeout(res, 50));
}

for (let i = 0; i < 3; i++){
await new Promise((res) => setTimeout(res, 700));
setTitle(str)
await new Promise((res) => setTimeout(res, 300));
setTitle(str + "|")
}
await new Promise((res) => setTimeout(res, 700));
setTitle(str)
await new Promise((res) => setTimeout(res, 300));

for (let i = str.length; i > 0; i--) {
setTitle(str.substring(0, i) + "|");
await new Promise((res) => setTimeout(res, 25));
}

setTitle("|");
await new Promise((res) => setTimeout(res, 500));
}

async function runTitle() {
const langnum = chooseLang(landings.length);
const choice = landings[langnum];
await type(choice.start + '"We are Code_Wes!"');
runTitle()
}

useEffect(() => {
runTitle()
}, []);

return <div className="text-4xl mb-5">{title}</div>;
}
10 changes: 10 additions & 0 deletions src/components/links/links.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import LinkTags from "./linktags";

export default function Links() {
return (
<div className="h-screen flex flex-col justify-center px-52">
<div className="text-5xl text-center pb-36">Important Links</div>
<LinkTags />
</div>
);
}
60 changes: 60 additions & 0 deletions src/components/links/linktags.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import Image from "next/image";

export default function LinkTags() {
const sources = [
{
thing: "Discord",
img: "/vectors/discord-icon-svgrepo-com.svg",
typ: "svg",
link: "https://discord.gg/abTZpXBM7",
bg: "bg-[#0d1117] ",
},
{
thing: "GitHub",
img: "/vectors/github-color-svgrepo-com.svg",
typ: "svg",
link: "https://github.com/orgs/Code-Wes/repositories",
bg: "bg-[#0d1117] ",
},
{
thing: "WesNest",
img: "/vectors/wesnest.png",
typ: "png",
link: "https://wesleyan.campuslabs.com/engage/organization/code_wes",
bg: "bg-white ",
},
];

return (
<div className="grid grid-cols-5 place-items-center">
<div></div> {/* Here to take the first col */}
{sources.map((source) => {
if (source.typ == "svg") {
return (
<a href={source.link} target="_blank">
<Image
src={source.img}
height={100}
width={100}
alt={source.thing + " Link"}
className={source.bg}
/>
</a>
);
} else {
return (
<a href={source.link} target="_blank">
<Image
src={source.img}
height={100}
width={150}
alt={source.thing + " Link"}
className={source.bg}
/>
</a>
);
}
})}
</div>
);
}
23 changes: 23 additions & 0 deletions src/components/team/person.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Image from "next/image";

interface personinput {
name: string;
img: string;
desc: string;
}

export default function Person({ name, img, desc }: personinput) {
return (
<div className="border-2 border-slate-700 bg-[#404040] pb-4 pt-6">
<Image
src={img}
height={200}
width={200}
alt={"Photo of " + name}
className="mx-auto pt-3"
/>
<div className="text-xl pt-4">{name}</div>
<div className="italic">{desc}</div>
</div>
);
}
Loading

0 comments on commit d8903dd

Please sign in to comment.