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

@ -4,6 +4,7 @@ import { getMovie, Movie } from "@lib/resource/movies.ts";
import { RecipeHero } from "@components/RecipeHero.tsx";
import { KMenu } from "@islands/KMenu.tsx";
import { HashTags } from "@components/HashTags.tsx";
import { renderMarkdown } from "@lib/documents.ts";
export const handler: Handlers<Movie | null> = {
async GET(_, ctx) {
@ -17,6 +18,8 @@ export default function Greet(props: PageProps<Movie>) {
const { author = "", date = "" } = movie.meta;
const content = renderMarkdown(movie.description || "");
return (
<MainLayout url={props.url} title={`Movie > ${movie.name}`}>
<RecipeHero
@ -38,9 +41,9 @@ export default function Greet(props: PageProps<Movie>) {
: <></>}
<pre
class="whitespace-break-spaces"
dangerouslySetInnerHTML={{ __html: movie.description || "" }}
dangerouslySetInnerHTML={{ __html: content || "" }}
>
{movie.description}
{content}
</pre>
</div>
</MainLayout>