Displaying WPT thumbnails
This commit is contained in:
parent
014e58a31b
commit
e08d6993c1
|
@ -6,3 +6,8 @@
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
padding-top: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
|
@ -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()}
|
||||||
|
|
Loading…
Reference in New Issue