-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Isaac Jin
committed
Dec 19, 2022
1 parent
1a64485
commit c637d6a
Showing
12 changed files
with
262 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,13 @@ const isDev = process.env.NODE_ENV === 'development' | |
export default function Layout({children, section}: { | ||
children: ReactNode, section?: string | ||
}) { | ||
|
||
const profileButton = (section === "profile") ? | ||
<div className={"navi-selected"}>Profile</div> : | ||
<Link href={"/profile"}> | ||
<div className={"navi-unselected hover:navi-selected"}>Profile</div> | ||
</Link> | ||
|
||
const articleButton = (section === "articles") ? | ||
<div className={"navi-selected"}>Articles</div> : | ||
<Link href={"/articles"}> | ||
|
@@ -52,34 +59,109 @@ export default function Layout({children, section}: { | |
|
||
{/* navigator bar */} | ||
<div | ||
className="px-[12%] items-center select-none fixed h-10 inset-x-0 flex justify-end z-10 gap-10 backdrop-blur-lg border-b border-gray-700/20"> | ||
<div className={"flex-grow justify-items-start flex items-center"}> | ||
<Link href={"/"}> | ||
<div className={"cursor-pointer flex gap-2 text-black hover:text-[#996E5C]"}> | ||
<Image src={"/favicon.svg"} width={"28"} height={"28"} alt={"icon"}></Image> | ||
<div className={"font-extrabold text-2xl"}>{siteTitle}</div> | ||
</div> | ||
</Link> | ||
</div> | ||
<div className={"flex flex-none"}> | ||
{articleButton} | ||
{talkButton} | ||
{friendButton} | ||
</div> | ||
<div className={"flex-none flex gap-4"}> | ||
<Image src={"/icons/night.svg"} className={"cursor-pointer"} width={"20"} height={"20"} | ||
alt={"night"}></Image> | ||
<Image src={"/icons/night.svg"} className={"cursor-pointer"} width={"20"} height={"20"} | ||
alt={"night"}></Image> | ||
className={"backdrop-blur-lg border-b border-gray-700/20 select-none fixed h-10 inset-x-0 z-10 gap-x-10 flex justify-center"}> | ||
<div className={"flex justify-end grow max-w-[1080px]"}> | ||
<div className={"flex items-center grow align-self-start"}> | ||
<Link href={"/"}> | ||
<div className={"cursor-pointer flex gap-2 text-black hover:text-[#996E5C]"}> | ||
<Image src={"/favicon.svg"} width={"28"} height={"28"} alt={"icon"}></Image> | ||
<div className={"font-extrabold text-2xl"}>{siteTitle}</div> | ||
</div> | ||
</Link> | ||
</div> | ||
<div className={"flex flex-none"}> | ||
{profileButton} | ||
{articleButton} | ||
{talkButton} | ||
{friendButton} | ||
</div> | ||
{/* TODO: Night Mode */} | ||
{/*<div className={"flex-none flex gap-4"}>*/} | ||
{/* <Image src={"/icons/night.svg"} className={"cursor-pointer"} width={"20"} height={"20"}*/} | ||
{/* alt={"night"}></Image>*/} | ||
{/* <Image src={"/icons/night.svg"} className={"cursor-pointer"} width={"20"} height={"20"}*/} | ||
{/* alt={"night"}></Image>*/} | ||
{/*</div>*/} | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
{/* background */} | ||
<div className={"blur-sm bg-cover bg-repeat-y bg-center bg-fixed absolute inset-0 opacity-[.02] -z-10"} | ||
style={{backgroundImage: "url(/favicon.svg)"}}></div> | ||
|
||
<div className={"mt-20 px-[12%]"}> | ||
<main>{children}</main> | ||
<div className={"mt-20 flex justify-center"}> | ||
<div className={"grid-cols-5 grid gap-3 max-w-[1080px] grow"}> | ||
{/* Personal Profile on Left */} | ||
<div> | ||
<div className={"grid border-r fixed max-w-[230px] w-[16%] pr-4 top-20 bottom-10 content-between"}> | ||
<div className={"grid gap-y-2 justify-items-start"}> | ||
<div> | ||
<Image | ||
priority | ||
src={"/images/profile.jpg"} | ||
className={"rounded-3xl"} | ||
height={"180"} | ||
width={"180"} | ||
alt={name} | ||
/> | ||
</div> | ||
<div className={"text-3xl font-extrabold"}>{name}</div> | ||
<div className={"text-gray-400"}>{`Control freak.`}</div> | ||
<div>UG Student @ <Link href={"https://www.sustech.edu.cn/"}><span | ||
className={"link-ina"}>SUSTech</span></Link></div> | ||
<div>Visiting Student<br/>@ <Link href={"https://www.wisc.edu"}><span | ||
className={"link-ina"}>UW - Madison</span></Link></div> | ||
</div> | ||
|
||
<div className={"grid gap-y-2 justify-items-start"}> | ||
<div className={"flex gap-x-4"}> | ||
<div> | ||
<Link href={"https://twitter.com/Whale__Eye"}> | ||
<Image src={"/icons/twitter-icon.svg"} className={"cursor-pointer"} | ||
width={"30"} | ||
height={"30"} alt={"GitHub"}></Image> | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href={"https://www.github.com/WHALEEYE"}> | ||
<Image src={"/icons/github-icon.svg"} className={"cursor-pointer"} | ||
width={"30"} | ||
height={"30"} alt={"Twitter"}> | ||
</Image> | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href={"https://steamcommunity.com/id/whaleeye/"}> | ||
<Image src={"/icons/steam-icon.svg"} className={"cursor-pointer"} | ||
width={"30"} | ||
height={"30"} alt={"Steam"}> | ||
</Image> | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href={"https://www.facebook.com/whale.swaggy"}> | ||
<Image src={"/icons/facebook-icon.svg"} className={"cursor-pointer"} | ||
width={"30"} height={"30"} alt={"Steam"}> | ||
</Image> | ||
</Link> | ||
</div> | ||
</div> | ||
<div> | ||
<Link href={"mailto:[email protected]"}> | ||
<div className={"link-ina"}>Contact me</div> | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{/* Brief information on the right */} | ||
<div className={"col-span-4 ml-20"}> | ||
<main>{children}</main> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Head from 'next/head' | ||
import Layout, {siteTitle} from '../components/layout' | ||
import React from "react"; | ||
|
||
export const sectionName = "profile"; | ||
|
||
export default function Home() { | ||
return ( | ||
<Layout section={sectionName}> | ||
<Head> | ||
<title>{siteTitle}</title> | ||
</Head> | ||
|
||
{/* Education */} | ||
<div> | ||
<div className={"heading-2xl"}>Education</div> | ||
<div className={"leading-loose"}> | ||
<div className={"grid gap-y-1"}> | ||
<div><b>Undergraduate</b> student of <br/><b>Southern University of Science and | ||
Technology</b></div> | ||
<div className={"text-gray-400 text-sm"}><b>2019.9</b> to <b>Present</b></div> | ||
</div> | ||
<div className={"grid gap-y-1"}> | ||
<div><b>Visiting</b> student of <br/><b>University of Wisconsin - Madison</b> | ||
</div> | ||
<div className={"text-gray-400 text-sm"}><b>2022.9</b> to <b>Present</b></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className={"grid gap-y-12"}> | ||
</div> | ||
</Layout> | ||
) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: 'Two Forms of Pre-rendering' | ||
date: '2020-01-01' | ||
--- | ||
|
||
Next.js has two forms of pre-rendering: **Static Generation** and **Server-side Rendering**. The difference is in **when** it generates the HTML for a page. | ||
|
||
- **Static Generation** is the pre-rendering method that generates the HTML at **build time**. The pre-rendered HTML is then _reused_ on each request. | ||
- **Server-side Rendering** is the pre-rendering method that generates the HTML on **each request**. | ||
|
||
Importantly, Next.js let's you **choose** which pre-rendering form to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others. | ||
|
||
Next.js has two forms of pre-rendering: **Static Generation** and **Server-side Rendering**. The difference is in **when** it generates the HTML for a page. | ||
|
||
- **Static Generation** is the pre-rendering method that generates the HTML at **build time**. The pre-rendered HTML is then _reused_ on each request. | ||
- **Server-side Rendering** is the pre-rendering method that generates the HTML on **each request**. | ||
|
||
Importantly, Next.js let's you **choose** which pre-rendering form to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others. | ||
|
||
Next.js has two forms of pre-rendering: **Static Generation** and **Server-side Rendering**. The difference is in **when** it generates the HTML for a page. | ||
|
||
- **Static Generation** is the pre-rendering method that generates the HTML at **build time**. The pre-rendered HTML is then _reused_ on each request. | ||
- **Server-side Rendering** is the pre-rendering method that generates the HTML on **each request**. | ||
|
||
Importantly, Next.js let's you **choose** which pre-rendering form to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others. | ||
|
||
Next.js has two forms of pre-rendering: **Static Generation** and **Server-side Rendering**. The difference is in **when** it generates the HTML for a page. | ||
|
||
- **Static Generation** is the pre-rendering method that generates the HTML at **build time**. The pre-rendered HTML is then _reused_ on each request. | ||
- **Server-side Rendering** is the pre-rendering method that generates the HTML on **each request**. | ||
|
||
Importantly, Next.js let's you **choose** which pre-rendering form to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others. | ||
|
||
中文测试 |
Oops, something went wrong.
c637d6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
chaos – ./
chaos-whaleeye.vercel.app
chaos-git-main-whaleeye.vercel.app
chaos-xi.vercel.app
www.whale3ye.com
whale3ye.com