diff --git a/frontend/src/assets/blog/link-preview-images/clima-quem-anda-a-cegar-e-usar-jornalistas_link-preview-image.jpg b/frontend/src/assets/blog/link-preview-images/clima-quem-anda-a-cegar-e-usar-jornalistas_link-preview-image.jpg new file mode 100644 index 0000000..4af49ca Binary files /dev/null and b/frontend/src/assets/blog/link-preview-images/clima-quem-anda-a-cegar-e-usar-jornalistas_link-preview-image.jpg differ diff --git a/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/annual-co2-emissions.png b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/annual-co2-emissions.png new file mode 100644 index 0000000..3ddae39 Binary files /dev/null and b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/annual-co2-emissions.png differ diff --git a/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/if-aviation-were-a-country.png b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/if-aviation-were-a-country.png new file mode 100644 index 0000000..9dd5a25 Binary files /dev/null and b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/if-aviation-were-a-country.png differ diff --git a/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/poverty-over-time.png b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/poverty-over-time.png new file mode 100644 index 0000000..1806c3e Binary files /dev/null and b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/poverty-over-time.png differ diff --git a/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/trends-in-atmospheric-co2.png b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/trends-in-atmospheric-co2.png new file mode 100644 index 0000000..c4d3859 Binary files /dev/null and b/frontend/src/assets/blog/posts/clima-quem-anda-a-cegar-e-usar-jornalistas/trends-in-atmospheric-co2.png differ diff --git a/frontend/src/assets/blog/posts/somos-uma-familia-pobre/somos-uma-familia-pobre.jpeg b/frontend/src/assets/blog/posts/somos-uma-familia-pobre/somos-uma-familia-pobre.jpeg deleted file mode 100644 index 752a3af..0000000 Binary files a/frontend/src/assets/blog/posts/somos-uma-familia-pobre/somos-uma-familia-pobre.jpeg and /dev/null differ diff --git a/frontend/src/components/mdx/components/ShowableFigure.astro b/frontend/src/components/mdx/components/ShowableFigure.astro index 4cd5f5f..96be80c 100644 --- a/frontend/src/components/mdx/components/ShowableFigure.astro +++ b/frontend/src/components/mdx/components/ShowableFigure.astro @@ -1,6 +1,11 @@ --- import ShowableImage from './ShowableImage.astro'; +interface Props { + src: ImageMetadata; + alt: string; +} + const caption = Astro.slots.default; --- diff --git a/frontend/src/components/mdx/components/ShowableImage.astro b/frontend/src/components/mdx/components/ShowableImage.astro index 25e651c..8f14591 100644 --- a/frontend/src/components/mdx/components/ShowableImage.astro +++ b/frontend/src/components/mdx/components/ShowableImage.astro @@ -1,7 +1,15 @@ --- +import type { ImageMetadata } from 'astro'; import { Image, getImage } from 'astro:assets'; -const imageSrc = Astro.props.src.src as string; +interface Props { + src: ImageMetadata; + alt: string; +} + +const imageSrc = Astro.props.src.src; + +console.log(imageSrc); const originalImageUrl = ( await getImage({ @@ -9,8 +17,8 @@ const originalImageUrl = ( // these dimensions are required by https://docs.astro.build/en/reference/errors/missing-image-dimension/ // although we don't need them here because I will replace this big image over the scaled down version // so we avoid CLS "manually" :) - width: 100000, - height: 100000, + width: Astro.props.src.width, + height: Astro.props.src.height, }) ).src; --- @@ -23,10 +31,10 @@ const originalImageUrl = ( class="w-full border-2 border-primary-800" data-url={originalImageUrl} title={Astro.props.alt} - height={10} + height={8} />