38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { Head } from "$fresh/runtime.ts";
 | |
| import { MainLayout } from "@components/layouts/main.tsx";
 | |
| import { Card } from "@components/Card.tsx";
 | |
| import { PageProps } from "$fresh/server.ts";
 | |
| import { resources } from "@lib/resources.ts";
 | |
| import { RedirectSearchHandler } from "@islands/Search.tsx";
 | |
| import { KMenu } from "@islands/KMenu.tsx";
 | |
| 
 | |
| export default function Home(props: PageProps) {
 | |
|   return (
 | |
|     <>
 | |
|       <Head>
 | |
|         <title>app</title>
 | |
|       </Head>
 | |
|       <RedirectSearchHandler />
 | |
|       <KMenu type="main" context={false} />
 | |
|       <MainLayout url={props.url}>
 | |
|         <div class="flex flex-wrap items-center gap-4 px-4">
 | |
|           {Object.values(resources).map((m) => {
 | |
|             return (
 | |
|               <Card
 | |
|                 title={`${m.name}`}
 | |
|                 backgroundSize={80}
 | |
|                 image={`${
 | |
|                   m.emoji.endsWith(".png")
 | |
|                     ? `/emojis/${encodeURIComponent(m.emoji)}`
 | |
|                     : "/placeholder.svg"
 | |
|                 }`}
 | |
|                 link={m.link}
 | |
|               />
 | |
|             );
 | |
|           })}
 | |
|         </div>
 | |
|       </MainLayout>
 | |
|     </>
 | |
|   );
 | |
| }
 |