-
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
1 parent
6a47c30
commit 8b45373
Showing
4 changed files
with
64 additions
and
61 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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
const Works = [ | ||
{ | ||
name: "Large Language Model", | ||
description: "Medical field chat application.", | ||
href: "/project/llm", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "Data Visualization", | ||
description: "Chart and 3D models.", | ||
href: "/project/data-visualization", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "Hybrid Mobile App", | ||
description: "QQ Music / We Sing Living Room.", | ||
href: "/project/tme", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "Large Language Model", | ||
description: "Medical field chat application.", | ||
href: "/project/llm", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "Data Visualization", | ||
description: "Chart and 3D models.", | ||
href: "/project/data-visualization", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "Hybrid Mobile App", | ||
description: "QQ Music / We Sing Living Room.", | ||
href: "/project/tme", | ||
background: "/1.png", | ||
}, | ||
]; | ||
|
||
const OpenSourceProjects = [ | ||
{ | ||
name: "Comments", | ||
description: "Add comments to your website.", | ||
href: "/project/comments", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "daviddong.me", | ||
description: "Personal website template.", | ||
href: "/project/website", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "Comments", | ||
description: "Add comments to your website.", | ||
href: "/project/comments", | ||
background: "/1.png", | ||
}, | ||
{ | ||
name: "daviddong.me", | ||
description: "Personal website template.", | ||
href: "/project/website", | ||
background: "/1.png", | ||
}, | ||
]; | ||
|
||
export { Works, OpenSourceProjects } | ||
export { Works, OpenSourceProjects }; |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { usePageContext } from 'vike-react/usePageContext' | ||
import { usePageContext } from "vike-react/usePageContext"; | ||
export default function Page() { | ||
const pageContext = usePageContext() | ||
const pageContext = usePageContext(); | ||
return ( | ||
<div className='h-screen w-full flex justify-center items-center'> | ||
<h1 className='text-3xl'> Hello {pageContext.routeParams.name}</h1> | ||
<div className="h-screen w-full flex justify-center items-center"> | ||
<h1 className="text-3xl"> Hello {pageContext.routeParams.name}</h1> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
import React from 'react' | ||
import { Button } from "@/components/ui/button"; | ||
import { OpenSourceProjects, Works } from "@/config/project"; | ||
import { Button } from '@/components/ui/button'; | ||
import { navigate } from 'vike/client/router'; | ||
import React from "react"; | ||
import { navigate } from "vike/client/router"; | ||
|
||
const ProjectLists = ({ title, items }) => ( | ||
<section> | ||
<h3>{title}</h3> | ||
<ul> | ||
{items.map(({ name, href }) => ( | ||
<li key={name}> | ||
<Button variant="link" className="text-md text-neutral-500 hover:text-neutral-800" onClick={() => navigate(href)}> | ||
{name} | ||
</Button> | ||
</li> | ||
))} | ||
</ul> | ||
</section> | ||
<section> | ||
<h3>{title}</h3> | ||
<ul> | ||
{items.map(({ name, href }) => ( | ||
<li key={name}> | ||
<Button | ||
variant="link" | ||
className="text-md text-neutral-500 hover:text-neutral-800" | ||
onClick={() => navigate(href)} | ||
> | ||
{name} | ||
</Button> | ||
</li> | ||
))} | ||
</ul> | ||
</section> | ||
); | ||
|
||
|
||
export default function Page() { | ||
return ( | ||
<main className="prose prose-p:text-neutral-500 p-12 h-screen"> | ||
<ProjectLists title="Works" items={Works} /> | ||
<ProjectLists title="Open Source Projects" items={OpenSourceProjects} /> | ||
</main> | ||
) | ||
return ( | ||
<main className="prose prose-p:text-neutral-500 p-12 h-screen"> | ||
<ProjectLists title="Works" items={Works} /> | ||
<ProjectLists title="Open Source Projects" items={OpenSourceProjects} /> | ||
</main> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Environment: Node.js | ||
import { OpenSourceProjects, Works } from "@/config/project"; | ||
export { onBeforePrerenderStart } | ||
export { onBeforePrerenderStart }; | ||
async function onBeforePrerenderStart() { | ||
const lists = [...OpenSourceProjects, ...Works] | ||
return lists.map(list => list.href) | ||
} | ||
const lists = [...OpenSourceProjects, ...Works]; | ||
return lists.map((list) => list.href); | ||
} |