bookends

ref: 3da94146cf7e50145c027e8528321d29c9b72b29

./template.html


 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
    <head>
        <title>Reading List --- Honza Pokorny</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">

        <style>
            .star {
                width: 13px;
                height: 12px;
                display: inline-block;
                background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMzA5IDkuMjJMMi40MDkgMTJsMS40NC00LjU2N0wwIDQuNTgzbDQuNzg4LS4wNDJMNi4zMDggMCA3LjgzIDQuNTRsNC43ODkuMDQ0LTMuODUgMi44NDlMMTAuMjA5IDEyeiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+);
            }
            .star-1 { width: 13px; }
            .star-2 { width: 26px; }
            .star-3 { width: 39px; }
            .star-4 { width: 52px; }
            .star-5 { width: 65px; }
        </style>
    </head>
    <body>
        <section class="section">
            <div class="container">
                <h1 class="title">Reading List</h1>
                <p class="subtitle">What is Honza reading these days?</p>
            </div>
        </section>

        <section class="section">
            <div class="container">
                {{ range . }}
                    <div class="columns">
                        <div class="column is-2">
                            <figure class="image">
                                <img src="{{ .CacheCoverURL }}" alt="Placeholder image">
                            </figure>
                        </div>
                        <div class="column is-10">
                            <div class="media">
                                <div class="media-content">
                                    <p class="title is-4">{{ .Title }}</p>
                                    <p class="subtitle is-6">{{ .Author }}</p>
                                </div>
                            </div>

                            <div class="content">
                                <div class="star star-{{ .Rating }}"></div>
                                <div>
                                    Finished on <time datetime="2016-1-1">{{ .DateRead.Format "January 2, 2006" }}</time>
                                </div>
                                <div>
                                    {{ range .Tags }}
                                        <span class="tag">{{ . }}</span>
                                    {{ end }}
                                </div>
                                <div>
                                    {{ .Review }}
                                </div>
                            </div>
                        </div>
                    </div>
                {{ end }}
            </div>
        </section>

    </body>
</html>