starter主题,空图片处理

This commit is contained in:
tangly1024.com
2024-10-12 14:48:24 +08:00
parent b8f58108f4
commit 675def4936
2 changed files with 17 additions and 10 deletions

View File

@@ -40,13 +40,15 @@ export const Blog = ({ posts }) => {
className='wow fadeInUp group mb-10'
data-wow-delay='.1s'>
<div className='mb-8 overflow-hidden rounded-[5px]'>
<Link href={item?.href} className='block'>
<img
src={item.pageCoverThumbnail}
alt={item.title}
className='w-full transition group-hover:rotate-6 group-hover:scale-125'
/>
</Link>
{item.pageCoverThumbnail && (
<Link href={item?.href} className='block'>
<img
src={item.pageCoverThumbnail}
alt={item.title}
className='w-full transition group-hover:rotate-6 group-hover:scale-125'
/>
</Link>
)}
</div>
<div>
<span className='mb-6 inline-block rounded-[5px] bg-primary px-4 py-0.5 text-center text-xs font-medium leading-loose text-white'>

View File

@@ -73,9 +73,14 @@ export const Footer = props => {
key={index}
href={item?.href}
className='group flex items-center gap-[22px]'>
<div className='overflow-hidden rounded w-20 h-12'>
<img src={item.pageCoverThumbnail} alt={item.title} />
</div>
{item.pageCoverThumbnail && (
<div className='overflow-hidden rounded w-20 h-12'>
<img
src={item.pageCoverThumbnail}
alt={item.title}
/>
</div>
)}
<span className='line-clamp-2 max-w-[180px] text-base text-gray-7 group-hover:text-white'>
{item.title}
</span>