feat: some shit

This commit is contained in:
2023-07-27 15:28:50 +02:00
parent 07b5e44f22
commit 866a521508
10 changed files with 36 additions and 31 deletions

View File

@ -1,5 +1,5 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocuments } from "../../lib/documents.ts";
import { getDocuments } from "@lib/documents.ts";
export const handler = async (
_req: Request,

View File

@ -1,6 +1,6 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocument } from "../../../lib/documents.ts";
import { parseRecipe } from "../../../lib/recipes.ts";
import { getDocument } from "@lib/documents.ts";
import { parseRecipe } from "@lib/recipes.ts";
export async function getRecipe(name: string) {
const document = await getDocument(`Recipes/${name}.md`);

View File

@ -5,7 +5,7 @@ import {
MagickGeometry,
} from "https://deno.land/x/imagemagick_deno@0.0.14/mod.ts";
import { parseMediaType } from "https://deno.land/std@0.175.0/media_types/parse_media_type.ts";
import * as cache from "../../../../lib/cache.ts";
import * as cache from "@lib/cache.ts";
await initializeImageMagick();

View File

@ -1,6 +1,6 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocument, getDocuments } from "../../../lib/documents.ts";
import { parseRecipe } from "../../../lib/recipes.ts";
import { getDocument, getDocuments } from "@lib/documents.ts";
import { parseRecipe } from "@lib/recipes.ts";
export async function getRecipes() {
const documents = await getDocuments();

View File

@ -1,6 +1,6 @@
import { Head } from "$fresh/runtime.ts";
import { useSignal } from "@preact/signals";
import Counter from "../islands/Counter.tsx";
import Counter from "@islands/Counter.tsx";
export default function Home() {
const count = useSignal(3);

View File

@ -1,8 +1,8 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { IngredientsList } from "../../components/IngredientsList.tsx";
import { RecipeHero } from "../../components/RecipeHero.tsx";
import { MainLayout } from "../../components/layouts/main.tsx";
import { Recipe } from "../../lib/recipes.ts";
import { IngredientsList } from "@components/IngredientsList.tsx";
import { RecipeHero } from "@components/RecipeHero.tsx";
import { MainLayout } from "@components/layouts/main.tsx";
import { Recipe } from "@lib/recipes.ts";
import { getRecipe } from "../api/recipes/[name].ts";
export const handler: Handlers<Recipe | null> = {

View File

@ -1,8 +1,8 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { RecipeCard } from "../../components/RecipeCard.tsx";
import { MainLayout } from "../../components/layouts/main.tsx";
import type { Document } from "../../lib/documents.ts";
import { Recipe } from "../../lib/recipes.ts";
import { RecipeCard } from "@components/RecipeCard.tsx";
import { MainLayout } from "@components/layouts/main.tsx";
import type { Document } from "@lib/documents.ts";
import { Recipe } from "@lib/recipes.ts";
import { getRecipes } from "../api/recipes/index.ts";
export const handler: Handlers<Recipe[] | null> = {