diff options
| author | Xe Iaso <me@christine.website> | 2023-02-02 08:05:34 -0500 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2023-02-02 08:05:34 -0500 |
| commit | c117eae7c5af977d0299d34169e4a403f77e2afa (patch) | |
| tree | 83438cf5abc605e0ec174aa4a3f0e4b91b640008 /src/frontend/components | |
| parent | 757cee6fdd13502eb62305f77e73698878b01aa2 (diff) | |
| download | xesite-c117eae7c5af977d0299d34169e4a403f77e2afa.tar.xz xesite-c117eae7c5af977d0299d34169e4a403f77e2afa.zip | |
add stream VOD page
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src/frontend/components')
| -rw-r--r-- | src/frontend/components/ConvSnippet.tsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/frontend/components/ConvSnippet.tsx b/src/frontend/components/ConvSnippet.tsx new file mode 100644 index 0000000..02b2121 --- /dev/null +++ b/src/frontend/components/ConvSnippet.tsx @@ -0,0 +1,27 @@ +export interface ConvSnippetProps { + name: string; + mood: string; + children: HTMLElement[]; +} + +const ConvSnippet = ({name, mood, children}: ConvSnippetProps) => { + const nameLower = name.toLowerCase(); + name = name.replace(" ", "_"); + + return ( + <div className="conversation"> + <div className="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; |
