From ff3e7f66670ec66acdd9849fd5db4fe4ed5ddf6b Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 2 Aug 2023 00:23:51 +0200 Subject: [PATCH] feat: fix recipe hero layout --- components/RecipeHero.tsx | 37 ++++++++++++++++--------------------- routes/api/images/index.ts | 6 +++--- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/components/RecipeHero.tsx b/components/RecipeHero.tsx index 754d01a..6ab92e0 100644 --- a/components/RecipeHero.tsx +++ b/components/RecipeHero.tsx @@ -16,7 +16,7 @@ export function RecipeHero( return (
@@ -25,37 +25,21 @@ export function RecipeHero( Recipe Banner )} -
+ - {data.meta?.link && - ( -
- - - -
- )} -
{data.name} + {data.meta?.link && + ( + + + + )} {data.meta?.rating && } diff --git a/routes/api/images/index.ts b/routes/api/images/index.ts index 3a7b3ea..2e2bc91 100644 --- a/routes/api/images/index.ts +++ b/routes/api/images/index.ts @@ -1,14 +1,14 @@ import { HandlerContext, Handlers } from "$fresh/server.ts"; import { ImageMagick, - initializeImageMagick, + initialize, MagickGeometry, -} from "https://deno.land/x/imagemagick_deno@0.0.14/mod.ts"; +} from "https://deno.land/x/imagemagick_deno@0.0.25/mod.ts"; import { parseMediaType } from "https://deno.land/std@0.175.0/media_types/parse_media_type.ts"; import * as cache from "@lib/cache/image.ts"; import { SILVERBULLET_SERVER } from "@lib/env.ts"; -await initializeImageMagick(); +await initialize(); async function getRemoteImage(image: string) { console.log("[api/image] fetching", { image });