feat: add title

This commit is contained in:
2023-08-04 22:38:09 +02:00
parent 469db6525d
commit a765ce7f74
6 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import { ComponentChildren } from "preact";
import { menu } from "@lib/menus.ts";
import { CSS, KATEX_CSS,render } from "https://deno.land/x/gfm/mod.ts";
import { CSS, KATEX_CSS, render } from "https://deno.land/x/gfm/mod.ts";
import { Head } from "$fresh/runtime.ts";
export type Props = {
@ -11,7 +11,7 @@ export type Props = {
description?: string;
};
export const MainLayout = ({ children, url }: Props) => {
export const MainLayout = ({ children, url, title }: Props) => {
return (
<div
class="md:grid mx-auto"
@ -20,6 +20,8 @@ export const MainLayout = ({ children, url }: Props) => {
<Head>
<style>{CSS}</style>
<style>{KATEX_CSS}</style>
{title &&
<title>{title}</title>}
</Head>
<aside class="p-4 hidden md:block">
<nav class="min-h-fit rounded-3xl p-3 grid gap-3 fixed t-0">