Правки в компонент поста
This commit is contained in:
parent
d0f41672d1
commit
9c5b9a1dbe
11 changed files with 405 additions and 316 deletions
|
|
@ -20,16 +20,6 @@ const {
|
|||
imageUrl = '/images/blog/default.avif',
|
||||
slug = '#'
|
||||
} = Astro.props;
|
||||
|
||||
// Форматируем дату
|
||||
const formatDate = (dateStr: string) => {
|
||||
const d = new Date(dateStr);
|
||||
return d.toLocaleDateString('ru-RU', {
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
year: 'numeric'
|
||||
});
|
||||
};
|
||||
---
|
||||
|
||||
<article class="blog-card" data-animation="fade-up">
|
||||
|
|
@ -53,7 +43,7 @@ const formatDate = (dateStr: string) => {
|
|||
<line x1="8" x2="8" y1="2" y2="6"></line>
|
||||
<line x1="3" x2="21" y1="10" y2="10"></line>
|
||||
</svg>
|
||||
{formatDate(date)}
|
||||
{date}
|
||||
</span>
|
||||
<span class="meta-item">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="meta-icon">
|
||||
|
|
@ -178,7 +168,7 @@ const formatDate = (dateStr: string) => {
|
|||
.card-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
justify-content: space-between;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid #f1f5f9;
|
||||
margin-top: auto;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue