feat: enhance layout of search

This commit is contained in:
2023-08-06 17:47:26 +02:00
parent 0e0d26c939
commit 6f650b568d
25 changed files with 518 additions and 172 deletions

View File

@@ -1,5 +1,5 @@
import { ComponentChildren } from "preact";
import { menu } from "@lib/menus.ts";
import { resources } from "@lib/resources.ts";
import { CSS, KATEX_CSS } from "https://deno.land/x/gfm@0.2.5/mod.ts";
import { Head } from "$fresh/runtime.ts";
import Search, { RedirectSearchHandler } from "@islands/Search.tsx";
@@ -29,7 +29,7 @@ export const MainLayout = ({ children, url, title, context }: Props) => {
</Head>
<aside class="p-4 hidden md:block">
<nav class="min-h-fit rounded-3xl p-3 grid gap-3 fixed t-0">
{menu.map((m) => {
{Object.values(resources).map((m) => {
return (
<a
href={m.link}
@@ -37,7 +37,7 @@ export const MainLayout = ({ children, url, title, context }: Props) => {
m.link === url.pathname ? "bg-white text-black" : "text-white"
} p-3 text-xl w-full rounded-2xl`}
>
{m.name}
&nbsp;{m.emoji} {m.name}
</a>
);
})}