aboutsummaryrefslogtreecommitdiff
path: root/lume/src/_components/XeblogSlide.tsx
blob: 91f9ff4c0d9f82ab9813eabf90240e09a72e7ae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export interface XeblogSlideProps {
  name: string;
  essential?: boolean;
  desc?: string;
}

export default function XeblogSlide({
  name,
  essential,
  desc,
}: XeblogSlideProps) {
  return (
    <figure
      class={essential ? "xeblog-sides-essential" : "xeblog-slides-fluff"}
    >
      <picture>
        <source
          type="image/avif"
          srcset={`https://files.xeiaso.net/talks/${name}.avif`}
        />
        <source
          type="image/webp"
          srcset={`https://files.xeiaso.net/talks/${name}.webp`}
        />
        <img
          alt={desc || `Slide ${name}`}
          loading="lazy"
          src={`hhttps://files.xeiaso.net/talks/${name}.jpg`}
        />
      </picture>
      {desc && <figcaption>{desc}</figcaption>}
    </figure>
  );
}