chore: myriad fixes + book year pages
This commit is contained in:
parent
3ab6f77a69
commit
aec8471b06
45 changed files with 508 additions and 293 deletions
|
@ -12,14 +12,13 @@ import Npm from '@components/blocks/banners/Npm.astro';
|
|||
import Rss from '@components/blocks/banners/Rss.astro';
|
||||
import YouTubePlayer from '@components/blocks//YouTubePlayer.astro';
|
||||
|
||||
import { md } from '@utils/helpers.js';
|
||||
import { md } from '@utils/helpers/general.js';
|
||||
import { getPopularPosts } from '@utils/getPopularPosts.js';
|
||||
|
||||
const analytics = await fetchAnalyticsData();
|
||||
const links = await fetchLinks();
|
||||
const posts = await fetchAllPosts();
|
||||
const popularPosts = getPopularPosts(posts, analytics);
|
||||
|
||||
const { block } = Astro.props;
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,26 @@
|
|||
---
|
||||
import { fetchGlobals } from "@utils/data/globals.js";
|
||||
|
||||
const { image, alt } = Astro.props;
|
||||
const globals = await fetchGlobals(Astro);
|
||||
---
|
||||
|
||||
<div class="hero">
|
||||
<img src={image} alt={alt} />
|
||||
</div>
|
||||
<img
|
||||
srcset={`
|
||||
${globals.cdn_url}${image}?class=bannersm&type=webp 256w,
|
||||
${globals.cdn_url}${image}?class=bannermd&type=webp 512w,
|
||||
${globals.cdn_url}${image}?class=bannerbase&type=webp 1024w
|
||||
`}
|
||||
sizes="(max-width: 450px) 256px,
|
||||
(max-width: 850px) 512px,
|
||||
1024px"
|
||||
src={`${globals.cdn_url}${image}?class=bannersm&type=webp`}
|
||||
alt={alt}
|
||||
class="image-banner"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="720"
|
||||
height="480"
|
||||
/>
|
||||
</div>
|
||||
|
|
Reference in a new issue