Displaying WPT thumbnails

This commit is contained in:
Eric van der Vlist 2023-04-24 15:03:34 +02:00
parent 014e58a31b
commit e08d6993c1
2 changed files with 10 additions and 0 deletions

View File

@ -6,3 +6,8 @@
padding-top: 10px; padding-top: 10px;
font-style: italic; font-style: italic;
} }
.thumbnail {
padding-top: 10px;
text-align: center;
}

View File

@ -73,6 +73,11 @@ const WptViewer: Component<Props> = ({ wptId }) => {
content={ content={
<div> <div>
<div class={style.description}>{wpt().desc}</div> <div class={style.description}>{wpt().desc}</div>
<Show when={wpt().extensions?.thumbnailUrl}>
<div class={style.thumbnail}>
<img src={wpt().extensions?.thumbnailUrl}></img>
</div>
</Show>
<Show when={wpt().extensions?.startTime}> <Show when={wpt().extensions?.startTime}>
<div class={style.date}> <div class={style.date}>
{new Date(wpt().extensions?.startTime).toLocaleDateString()} {new Date(wpt().extensions?.startTime).toLocaleDateString()}