apps/library/templates/index.html 2.6 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</title>
14
    <meta name="description" content="Personal book tracker" />
15
    <meta property="og:url" content="{{.BaseURL}}" />
16
    <meta property="og:type" content="website" />
17
    <meta property="og:title" content="Library" />
18
    <meta property="og:description" content="Personal book tracker" />
19
    <meta property="og:image" content="{{.BaseURL}}/static/og.png" />
20
    <meta name="twitter:card" content="summary_large_image" />
21
    <meta property="twitter:url" content="{{.BaseURL}}" />
22
    <meta name="twitter:title" content="Library" />
23
    <meta name="twitter:description" content="Personal book tracker" />
24
    <meta name="twitter:image" content="{{.BaseURL}}/static/og.png" />
25
  </head>
26
  <body>
27
    <div class="header">
28
      <a href="/" class="logo"><h1>LIBRARY</h1></a>
29
      <nav class="links">
30
        {{if .NavMode}}
31
        {{range .NavCategories}}
32
        <a href="/?category={{.Slug}}"{{if .Active}} class="active"{{end}}>{{.Label}}</a>
33
        {{end}}
34
        {{end}}
35
        <a href="/admin">add</a>
36
      </nav>
37
    </div>
38
39
    {{if not .Sections}}
40
    <p class="no-books">No books yet.</p>
41
    {{else}}
42
    {{range .Sections}}
43
    <div class="section">
44
      {{if not $.NavMode}}
45
      <h2 class="section-label">{{.Label}}</h2>
46
      {{end}}
47
      {{if not .Books}}
48
      <p class="no-books">No books in {{.Label}}.</p>
49
      {{else}}
50
      <div class="books-list">
51
        {{range .Books}}
52
        <article class="book-card">
53
          {{if .CoverURL}}
54
          <img class="book-cover" src="{{.CoverURL}}" alt="" loading="lazy" />
55
          {{else}}
56
          <div class="book-cover placeholder"></div>
57
          {{end}}
58
          <div class="book-info">
59
            <h3 class="book-title">{{.Title}}</h3>
60
            <p class="book-authors">{{.Authors}}</p>
61
            {{if .Notes}}
62
            <p class="book-notes">{{.Notes}}</p>
63
            {{end}}
64
          </div>
65
        </article>
66
        {{end}}
67
      </div>
68
      {{end}}
69
    </div>
70
    {{end}}
71
    {{end}}
72
  </body>
73
</html>