diff --git a/src/components/Article.astro b/src/components/Article.astro index 5e4c354..c07965f 100644 --- a/src/components/Article.astro +++ b/src/components/Article.astro @@ -1,8 +1,11 @@ --- +import ArticleMenu from './ArticleMenu.astro'; + import { AstroComponentFactory } from 'astro/dist/runtime/server'; export interface Props { PostContent: AstroComponentFactory; + slug: string; title: string; description: string; readingTime: number; @@ -12,8 +15,9 @@ export interface Props { } const { - PostContent, title, description, - readingTime, date, image, + PostContent, slug, + title, description, + readingTime, date, preview = false, } = Astro.props; @@ -32,13 +36,28 @@ const locale = 'ru'; {readingTime.toFixed(1)} min read + { + !preview ? + : + "" + } { !preview ?
: -
+
{description}
} + + diff --git a/src/components/ArticleCard.astro b/src/components/ArticleCard.astro index df2ee33..b7fb3bf 100644 --- a/src/components/ArticleCard.astro +++ b/src/components/ArticleCard.astro @@ -1,7 +1,6 @@ --- import Article from './Article.astro'; -import SimpleMenu from '../layouts/SimpleMenu.astro'; -import MenuItem from './MenuItem.astro'; +import ArticleMenu from './ArticleMenu.astro'; import postRenderer from '../post-renderer.mjs'; import { postType } from '../post-renderer.mjs'; @@ -15,7 +14,6 @@ const { PostContent, title, description, readingTime, date, image, } = await postRenderer(post); -const link = `/blog/${post.slug}`; ---
@@ -28,41 +26,7 @@ const link = `/blog/${post.slug}`; image={image} preview={true} /> - - - - - - - - - - - - +
- diff --git a/src/layouts/SimpleMenu.astro b/src/layouts/SimpleMenu.astro index dadbce3..e296e00 100644 --- a/src/layouts/SimpleMenu.astro +++ b/src/layouts/SimpleMenu.astro @@ -1,16 +1,17 @@ --- export interface Props { - jcc: "start" | "center" | "end" | "space-around" | "space-between"; + jc: "start" | "center" | "end" | "space-around" | "space-between"; + largeGap?: boolean; } -const { jcc } = Astro.props; +const { jc, largeGap = false } = Astro.props; --- -