feat: add title
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user