feat: enhance layout of search
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user