@@ -5,13 +5,24 @@ import Image from "next/image"
55import Slide from "./slide"
66import { TextBlock } from "../components/TextUtils"
77import Link from "next/link"
8- import fs from 'node:fs/promises'
9- import { join } from 'node:path'
108
11- export default async function Page ( ) {
12- const publicDir = join ( process . cwd ( ) , "public" , "nabla" ) ;
13- const files = await fs . readdir ( publicDir )
9+ import fluidGif from "@/public/nabla/fluid.gif"
10+ import imguiPng from "@/public/nabla/imgui.png"
11+ import rt_screenshotJpg from "@/public/nabla/rt_screenshot.jpg"
12+ import rt_screenshot1Jpg from "@/public/nabla/rt_screenshot1.jpg"
13+ import sdf_function_manipGif from "@/public/nabla/sdf_func_manip.gif"
14+ import volume_reconstructPng from "@/public/nabla/volume_reconstruct.png"
15+
16+ const images = [
17+ { path : fluidGif , optimized : false } ,
18+ { path : imguiPng , optimized : true } ,
19+ { path : rt_screenshotJpg , optimized : true } ,
20+ { path : rt_screenshot1Jpg , optimized : true } ,
21+ { path : sdf_function_manipGif , optimized : false } ,
22+ { path : volume_reconstructPng , optimized : true }
23+ ]
1424
25+ export default async function Page ( ) {
1526 return (
1627 < div id = "scroll-override" className = "w-full h-full max-h-full max-w-full overflow-y-auto snap-y snap-mandatory" >
1728 < Slide
@@ -70,29 +81,20 @@ export default async function Page() {
7081 >
7182 < h1 > Showcase</ h1 >
7283 < div className = "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-full overflow-y-scroll" >
73- { files . map ( ( file , index ) => (
84+ { images . map ( ( image , index ) => (
7485 < div key = { index } className = "relative w-full h-full aspect-video" >
7586 < Image
76- src = { `/nabla/ ${ file } ` }
87+ src = { image . path }
7788 width = { 1280 }
7889 height = { 720 }
7990 alt = "Showcase screenshot"
8091 className = "object-contain"
92+ unoptimized = { image . optimized ? false : true }
8193 />
8294 </ div >
8395 ) ) }
8496 </ div >
8597 </ Slide >
86- { /* <Slide
87- visible={{ opacity: 1 }}
88- invisible={{ opacity: 0 }}
89- transition={{ duration: 0.5 }}
90- className="container mx-auto flex flex-col items-center justify-center gap-4 px-4 lg:px-8 py-2"
91- >
92- <div className="max-w-xl">
93- <LatestCommits repo="Nabla"/>
94- </div>
95- </Slide> WIP*/ }
9698 </ div >
9799 )
98100}
0 commit comments