blob: 9644333c761b6e9c52ba3521ceae21cf23a2653e (
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
35
36
37
38
39
40
41
42
43
44
45
|
// @jsxImportSource xeact
// @jsxRuntime automatic
export interface ConvSnippetProps {
name: string;
mood: string;
children: HTMLElement[];
}
const ConvSnippet = ({ name, mood, children }: ConvSnippetProps) => {
const nameLower = name.toLowerCase();
name = name.replace(" ", "_");
return (
<div class="conversation">
<div class="conversation-standalone">
<picture>
<source
type="image/avif"
srcset={`https://cdn.xeiaso.net/file/christine-static/stickers/${nameLower}/${mood}.avif`}
/>
<source
type="image/webp"
srcset={`https://cdn.xeiaso.net/file/christine-static/stickers/${nameLower}/${mood}.webp`}
/>
<img
style="max-height:4.5rem"
alt={`${name} is ${mood}`}
loading="lazy"
src={`https://cdn.xeiaso.net/file/christine-static/stickers/${nameLower}/${mood}.png`}
/>
</picture>
</div>
<div className="conversation-chat">
{"<"}
<a href={`/characters#${nameLower}`}>
<b>{name}</b>
</a>
{">"} {children}
</div>
</div>
);
};
export default ConvSnippet;
|