feat: add some highlighting to markdown renderer

This commit is contained in:
2023-08-02 17:21:03 +02:00
parent 21871a72e6
commit 70d16913f3
10 changed files with 485 additions and 15 deletions

View File

@ -31,7 +31,7 @@ export function RecipeHero(
<img
src={imageUrl}
alt="Recipe Banner"
style={{ objectPosition: "0% 30%" }}
style={{ objectPosition: "0% 25%" }}
class="absolute object-cover w-full h-full -z-10"
/>
)}

View File

@ -1,5 +1,7 @@
import { ComponentChildren } from "preact";
import { menu } from "@lib/menus.ts";
import { CSS, KATEX_CSS,render } from "https://deno.land/x/gfm/mod.ts";
import { Head } from "$fresh/runtime.ts";
export type Props = {
children: ComponentChildren;
@ -15,6 +17,10 @@ export const MainLayout = ({ children, url }: Props) => {
class="md:grid mx-auto"
style={{ gridTemplateColumns: "200px 1fr", maxWidth: "1024px" }}
>
<Head>
<style>{CSS}</style>
<style>{KATEX_CSS}</style>
</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) => {