summaryrefslogtreecommitdiff
path: root/templates/index.hbs
blob: 9f85a85f1bf513b2763036f60117c0185c74c855 (plain)
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
<!DOCTYPE html>
<html>
<head>
  <title>Kona</title>
  <link rel="stylesheet" type="text/css" href="/public/css/style.css">
  <meta charset="UTF-8">
</head>
<body>
  <header>
    <h1><a href="/">Kona</a></h1>
  </header>
  <main id="main">
    {{#each images}}
    <div id="image-{{ id }}" class="image-container">
      <a href="/posts/{{ id }}">
        <img src="/image/{{thumb_filename}}">
      </a>
    </div>
    {{/each}}
    {{#if next_page}}
    <p><a href="{{next_page}}">next</a></p>
    {{/if}}
  </main>
  <aside id="tag-view">
    <section id="search">
      <h2>Search</h2>
      <form id="search-box" method="GET" action="/posts">
        <input id="tags" name="query" type="text" autocomplete="off">
        <button id="search-box-submit" type="submit">Search</button>
      </form>
    </section>
    
    <section id="tags">
      <h2>Tags</h2>
      <ul>
        {{#each tags}}
        <li><a href="/posts?query={{ name }}">{{ name }}</a> {{ count }}</li>
        {{/each}}
      </ul>
    </section>
  </aside>
  <script src="/public/js/infinite_scroll.js"></script>
</body>
</html>