mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
feat: regularize front-matter, add new-post command
This commit is contained in:
@@ -24,7 +24,7 @@ const { Content } = await entry.render();
|
||||
const { remarkPluginFrontmatter } = await entry.render();
|
||||
|
||||
---
|
||||
<MainGridLayout banner={entry.data.cover} title={entry.data.title}>
|
||||
<MainGridLayout banner={entry.data.cover.url} title={entry.data.title}>
|
||||
<div class="flex w-full rounded-[var(--radius-large)] overflow-hidden relative mb-4">
|
||||
<div class:list={["card-base z-10 px-4 md:px-9 py-6 relative w-full ",
|
||||
{}
|
||||
@@ -61,18 +61,18 @@ const { remarkPluginFrontmatter } = await entry.render();
|
||||
<!-- metadata -->
|
||||
<PostMetadata
|
||||
class="mb-5"
|
||||
pubDate={entry.data.pubDate}
|
||||
published={entry.data.published}
|
||||
tags={entry.data.tags}
|
||||
categories={entry.data.categories}
|
||||
></PostMetadata>
|
||||
|
||||
<!-- always show cover as long as it has one -->
|
||||
|
||||
{entry.data.cover &&
|
||||
<ImageBox src={entry.data.cover} class="mb-8 rounded-xl"/>
|
||||
{entry.data.cover.url &&
|
||||
<ImageBox src={entry.data.cover.url} class="mb-8 rounded-xl"/>
|
||||
}
|
||||
|
||||
{!entry.data.cover && <div class="border-[var(--line-divider)] border-dashed border-b-[1px] mb-5"></div>}
|
||||
{!entry.data.cover.url && <div class="border-[var(--line-divider)] border-dashed border-b-[1px] mb-5"></div>}
|
||||
|
||||
<div class="prose dark:prose-invert prose-sm md:prose-base max-w-none custom-md
|
||||
">
|
||||
|
||||
Reference in New Issue
Block a user