feat: enhance layout of search

This commit is contained in:
2023-08-06 17:47:26 +02:00
parent 0e0d26c939
commit 6f650b568d
25 changed files with 518 additions and 172 deletions

View File

@ -6,6 +6,7 @@ import { KMenu } from "@islands/KMenu.tsx";
import { YoutubePlayer } from "@components/Youtube.tsx";
import { HashTags } from "@components/HashTags.tsx";
import { isYoutubeLink } from "@lib/string.ts";
import { renderMarkdown } from "@lib/documents.ts";
export const handler: Handlers<Article | null> = {
async GET(_, ctx) {
@ -19,6 +20,8 @@ export default function Greet(props: PageProps<Article>) {
const { author = "", date = "" } = article.meta;
const content = renderMarkdown(article.content);
return (
<MainLayout url={props.url} title={`Article > ${article.name}`}>
<RecipeHero
@ -43,9 +46,9 @@ export default function Greet(props: PageProps<Article>) {
class="whitespace-break-spaces markdown-body"
data-color-mode="dark"
data-dark-theme="dark"
dangerouslySetInnerHTML={{ __html: article.content || "" }}
dangerouslySetInnerHTML={{ __html: content || "" }}
>
{article.content||""}
{content||""}
</pre>
</div>
</MainLayout>