-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.js
35 lines (34 loc) · 1.11 KB
/
source.js
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
import { Component } from 'preact'
import { PubDate } from './date'
import './styles'
export class Source extends Component {
render({
title,
author,
publisher,
pubdate,
thumb,
preview
}) {
return (
<div class="box container" style="margin-top: 3em; margin-bottom: 3em;">
<div class="row">
<div class="column book-preview">
<img src={thumb} class="box material"></img>
</div>
<div class="column full-width">
<h2><b>{title}</b> By {author.join(', ')}</h2>
<h3><a href={preview} target="_blank">Preview</a></h3>
<span>
{author[0].split(' ').reverse().join(', ')}.
<i>{title}</i>.
<PubDate date={pubdate} />. {publisher}
</span>
</div>
</div>
</div>
)
}
}