summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.org>2020-05-28 19:58:23 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.org>2020-05-28 19:58:23 -0400
commitc4939e02b80bf857419a257be316b5f87eae3445 (patch)
tree132545095d855a3e55c5a7b997ef4bd9ade129ed /templates
parent2d8035f4724f38875d0f29faa1069772d6aadb79 (diff)
Implement per-image information and display.
Diffstat (limited to 'templates')
-rw-r--r--templates/image.hbs35
-rw-r--r--templates/index.hbs6
2 files changed, 38 insertions, 3 deletions
diff --git a/templates/image.hbs b/templates/image.hbs
new file mode 100644
index 0000000..8c3ceb6
--- /dev/null
+++ b/templates/image.hbs
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>бирка-тян - {{ orig_filename }}</title>
+ <link rel="stylesheet" type="text/css" href="/public/css/style.css">
+ <meta charset="UTF-8">
+</head>
+<body>
+ <header>
+ <h1><a href="/">бирка-тян</a></h1>
+ </header>
+ <main>
+ <h2>{{ orig_filename }}</h2>
+ <img src="/image/{{filename}}">
+ </main>
+ <aside id="tag-view">
+ <section id="search">
+ <h2>Search</h2>
+ <form id="search-box" method="GET" action="/posts">
+ <input id="tags" name="tags" 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?tags={{ . }}">{{ . }}</a></li>
+ {{/each}}
+ </ul>
+ </section>
+ </aside>
+</body>
+</html>
diff --git a/templates/index.hbs b/templates/index.hbs
index c3311b9..1279a5e 100644
--- a/templates/index.hbs
+++ b/templates/index.hbs
@@ -7,11 +7,11 @@
</head>
<body>
<header>
- <h1>бирка-тян</h1>
+ <h1><a href="/">бирка-тян</a></h1>
</header>
<main>
{{#each images}}
- <img src="/image/{{thumb_filename}}">
+ <a href="/posts/{{ id }}"><img src="/image/{{thumb_filename}}"></a>
{{/each}}
{{#if next_page}}
<p><a href="{{next_page}}">next</a></p>
@@ -26,7 +26,7 @@
</form>
</section>
- <section id="search">
+ <section id="tags">
<h2>Tags</h2>
<ul>
{{#each tags}}