feat: add series

This commit is contained in:
2023-08-07 14:44:04 +02:00
parent 990db3ae50
commit 7390d35a98
16 changed files with 275 additions and 23 deletions

View File

@ -5,6 +5,8 @@ import { MainLayout } from "@components/layouts/main.tsx";
import Counter from "@islands/Counter.tsx";
import { useSignal } from "@preact/signals";
import { getRecipe, Recipe } from "@lib/resource/recipes.ts";
import { RedirectSearchHandler } from "@islands/Search.tsx";
import { KMenu } from "@islands/KMenu.tsx";
export const handler: Handlers<Recipe | null> = {
async GET(_, ctx) {
@ -29,6 +31,8 @@ export default function Greet(props: PageProps<Recipe>) {
title={`Recipes > ${recipe.name}`}
context={recipe}
>
<RedirectSearchHandler />
<KMenu type="main" context={recipe} />
<RecipeHero
data={recipe}
backlink="/recipes"

View File

@ -4,6 +4,8 @@ import { MainLayout } from "@components/layouts/main.tsx";
import { getAllRecipes, Recipe } from "@lib/resource/recipes.ts";
import { Grid } from "@components/Grid.tsx";
import { IconArrowLeft } from "@components/icons.tsx";
import { KMenu } from "@islands/KMenu.tsx";
import { RedirectSearchHandler } from "@islands/Search.tsx";
export const handler: Handlers<Recipe[] | null> = {
async GET(_, ctx) {
@ -15,6 +17,8 @@ export const handler: Handlers<Recipe[] | null> = {
export default function Greet(props: PageProps<Recipe[] | null>) {
return (
<MainLayout url={props.url} title="Recipes" context={{ type: "recipe" }}>
<RedirectSearchHandler />
<KMenu type="main" context={{ type: "recipe" }} />
<header class="flex gap-4 items-center mb-2 lg:mb-5 md:hidden">
<a
class="px-4 lg:ml-4 py-2 bg-gray-300 text-gray-800 rounded-lg flex items-center gap-1"