feat: enhance modal image handling and SEO improvements

- Optimized modal image dimensions for better responsiveness
- Ensured modal images maintain aspect ratio and scale appropriately
- Added eager loading for header images to improve initial load performance
- Corrected GitHub link title typo for SEO accuracy
- Enhanced post content handling by normalizing emoji styles and search link paths
- Improved cache key management for channel info requests to include type and ID
- Streamlined channel info fetching logic for efficiency
- Updated breadcrumb image handling to support static proxy and void file fallback
This commit is contained in:
ccbikai
2024-08-05 12:05:19 +08:00
parent 10fe7b3da3
commit bfb8974612
6 changed files with 47 additions and 13 deletions

View File

@@ -27,6 +27,7 @@ const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
? staticProxy + channel?.avatar
: voidFile.src}
alt={channel?.title}
loading="eager"
class="header-avatar"
/>
</a>
@@ -73,7 +74,7 @@ const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
{
GITHUB && GITHUB.length > 0 && (
<a href={`https://github.com/${GITHUB}`} title="Github" target="_blank">
<a href={`https://github.com/${GITHUB}`} title="GitHub" target="_blank">
<img
{...github}
alt={`github.com/${GITHUB}`}

View File

@@ -174,4 +174,12 @@ const timeago = datetime.isBefore(dayjs().subtract(1, 'w'))
background-size: cover;
}
}
.content :global(.emoji) {
font-style: normal;
}
.tag-box {
flex-wrap: wrap;
}
</style>