📄 Huge intl feature
Some checks failed
Build and Deploy Next.js Blog to Staging / 🔍 Code Quality Checks (push) Failing after 15s
Build and Deploy Next.js Blog to Staging / 🏗️ Build and Push Docker Image (push) Has been skipped
Build and Deploy Next.js Blog to Staging / 🚀 Deploy to Staging (push) Has been skipped

This commit was merged in pull request #10.
This commit is contained in:
RJ
2025-12-03 00:17:34 +02:00
committed by Rares J
parent 072320ed73
commit 91afe03109
48 changed files with 955 additions and 138 deletions

View File

@@ -1,4 +1,5 @@
import Link from 'next/link'
import { useTranslations } from 'next-intl'
import { Link } from '@/i18n/navigation'
import Image from 'next/image'
import { Post } from '@/lib/types/frontmatter'
import { formatDate } from '@/lib/utils'
@@ -9,6 +10,7 @@ interface BlogCardProps {
}
export function BlogCard({ post, variant }: BlogCardProps) {
const t = useTranslations('BlogPost')
const hasImage = !!post.frontmatter.image
if (!hasImage || variant === 'text-only') {
@@ -38,7 +40,7 @@ export function BlogCard({ post, variant }: BlogCardProps) {
))}
</div>
<span className="inline-flex items-center font-mono text-xs uppercase text-cyan-400 hover:text-cyan-300 transition-colors">
&gt; READ [{post.readingTime}MIN]
&gt; {t('readingTime', {minutes: post.readingTime})}
</span>
</article>
</Link>
@@ -82,7 +84,7 @@ export function BlogCard({ post, variant }: BlogCardProps) {
))}
</div>
<span className="inline-flex items-center font-mono text-xs uppercase text-cyan-400 hover:text-cyan-300 transition-colors">
&gt; READ [{post.readingTime}MIN]
&gt; {t('readingTime', {minutes: post.readingTime})}
</span>
</div>
</div>
@@ -127,7 +129,7 @@ export function BlogCard({ post, variant }: BlogCardProps) {
))}
</div>
<span className="inline-flex items-center font-mono text-xs uppercase text-cyan-400 hover:text-cyan-300 transition-colors">
&gt; READ [{post.readingTime}MIN]
&gt; {t('readingTime', {minutes: post.readingTime})}
</span>
</div>
</article>