Reworked assets & improved image optimization #13

Merged
Firq merged 9 commits from dev into main 2023-12-26 00:09:06 +00:00
Showing only changes of commit 3c97d6687c - Show all commits

View file

@ -1,6 +1,6 @@
---
import type { ImageMetadata } from 'astro';
import { Image } from 'astro:assets';
import type { ImageMetadata } from 'astro'
import { Image } from 'astro:assets'
import mlb_ce from '../assets/ce/mlb.webp'
export interface Props {
@ -11,7 +11,9 @@ export interface Props {
const { mlb, imageFile, name } = Astro.props
const imagePath = `/src/assets/ce/${imageFile}`
const images_ces = import.meta.glob<{ default: ImageMetadata }>('/src/assets/ce/*.webp')
const images_ces = import.meta.glob<{ default: ImageMetadata }>(
'/src/assets/ce/*.webp'
)
let mlb_image: string = 'mlbalign'
if (mlb === 'false') {
@ -89,6 +91,7 @@ if (mlb === 'false') {
.mlb {
width: 5.5rem;
height: auto;
margin-left: auto;
margin-right: auto;
}