apps/library/templates/book.html 1.8 K raw
1
<!doctype html>
2
<html lang="en">
3
  <head>
4
    <meta charset="UTF-8" />
5
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
    <meta name="theme-color" content="#121113" />
7
    <link rel="stylesheet" href="/assets/darkmatter.css" />
8
    <link rel="stylesheet" href="/static/styles.css" />
9
    <link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png" />
10
    <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png" />
11
    <link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png" />
12
    <link rel="manifest" href="/static/site.webmanifest" />
13
    <title>Library | {{.Book.Title}}</title>
14
  </head>
15
  <body>
16
    <div class="header">
17
      <a href="/" class="logo"><h1>LIBRARY</h1></a>
18
      <nav class="links">
19
        <a href="/quotes">quotes</a>
20
      </nav>
21
    </div>
22
23
    <article class="book-card detail">
24
      {{if .Book.CoverURL}}
25
      <img class="book-cover" src="{{.Book.CoverURL}}" alt="" />
26
      {{else}}
27
      <div class="book-cover placeholder"></div>
28
      {{end}}
29
      <div class="book-info">
30
        <h2 class="book-title">{{.Book.Title}}</h2>
31
        <p class="book-authors">{{.Book.Authors}}</p>
32
        {{if .Book.ISBN}}<p class="book-meta">ISBN: {{.Book.ISBN}}</p>{{end}}
33
      </div>
34
    </article>
35
36
    <section class="section">
37
      <h3 class="section-label">Quotes</h3>
38
      {{if not .Quotes}}
39
      <p class="no-books">No quotes from this book yet.</p>
40
      {{else}}
41
      <div class="quotes-list">
42
        {{range .Quotes}}
43
        <a class="quote-item" href="/quotes/{{.ID}}">
44
          <blockquote class="quote-text">{{.Quote}}</blockquote>
45
          {{if .Page}}<p class="quote-page">p. {{.Page}}</p>{{end}}
46
        </a>
47
        {{end}}
48
      </div>
49
      {{end}}
50
    </section>
51
    <script src="/pwa.js" defer></script>
52
  </body>
53
</html>