Новые правки в проект
This commit is contained in:
parent
214988af13
commit
54b92c3015
3 changed files with 12 additions and 3 deletions
|
|
@ -22,6 +22,8 @@ const { posts, total, totalPages } = await getPosts({
|
|||
perPage: POSTS_PER_PAGE
|
||||
});
|
||||
|
||||
const postsCountText = String(total);
|
||||
|
||||
const formatDate = (date: string) => {
|
||||
const d = new Date(date);
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
|
|
@ -54,6 +56,7 @@ const formatDate = (date: string) => {
|
|||
text: "СТАТЕЙ"
|
||||
}}
|
||||
bgImage="/images/blog/blogBg.avif"
|
||||
icon="edit"
|
||||
/>
|
||||
|
||||
<BlogCategories categories={categories} activeCategory={categoryName} currentPage={1} />
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ const { posts, total, totalPages } = await getPosts({
|
|||
perPage: POSTS_PER_PAGE
|
||||
});
|
||||
|
||||
const postsCountText = String(total);
|
||||
|
||||
const formatDate = (date: string) => {
|
||||
const d = new Date(date);
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
|
|
@ -55,6 +57,7 @@ const formatDate = (date: string) => {
|
|||
text: "СТАТЕЙ"
|
||||
}}
|
||||
bgImage="/images/blog/blogBg.avif"
|
||||
icon="edit"
|
||||
/>
|
||||
|
||||
<BlogCategories categories={categories} activeCategory={categoryName} currentPage={currentPage} />
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ const currentPage = Number(Astro.params.page) || 1;
|
|||
const { posts, total, totalPages } = await getPosts({ page: currentPage, perPage: POSTS_PER_PAGE });
|
||||
const categories = await getAllCategories();
|
||||
|
||||
const postsCountText = String(total);
|
||||
|
||||
const formatDate = (date: string) => {
|
||||
const d = new Date(date);
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
|
|
@ -41,13 +43,14 @@ const formatDate = (date: string) => {
|
|||
titleGold="для автовладельцев"
|
||||
description="Разбираем сложные юридические вопросы простым языком. Советы юриста по автоспорам, ДТП, ОСАГО и защите прав водителей."
|
||||
layout="with-image"
|
||||
sideImage="/images/home/avtourist-surgut.avif"
|
||||
sideImage="/images/blog/blogImg.avif"
|
||||
sideImageAlt="Автоюрист Сургут"
|
||||
experienceBadge={{
|
||||
number: "50+",
|
||||
number: postsCountText,
|
||||
text: "ПОЛЕЗНЫХ СТАТЕЙ"
|
||||
}}
|
||||
bgImage="/images/home/bg_hero.avif"
|
||||
bgImage="/images/blog/blogBg.avif"
|
||||
icon="edit"
|
||||
/>
|
||||
|
||||
<BlogCategories categories={categories} activeCategory="Все" currentPage={currentPage} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue