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;
---
-
+
-
diff --git a/src/pages/blog/[slug].astro b/src/pages/blog/[slug].astro
index ce26e12..b623381 100644
--- a/src/pages/blog/[slug].astro
+++ b/src/pages/blog/[slug].astro
@@ -3,7 +3,9 @@ import BlogLayout from "../../layouts/BlogLayout.astro";
import Article from "../../components/Article.astro";
import { getCollection } from "astro:content";
+
import postRenderer from "../../post-renderer.mjs";
+import { postType } from "../../post-renderer.mjs";
export async function getStaticPaths() {
const posts = await getCollection("blog");
@@ -15,7 +17,7 @@ export async function getStaticPaths() {
}));
}
-const { post } = Astro.props;
+const post: postType = Astro.props.post;
const {
PostContent, title, description,
readingTime, date, image,
@@ -37,6 +39,7 @@ const {