about summary refs log tree commit diff
path: root/templates/index.html
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-09T21·37+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-09T21·37+0200
commitfb7df7a34680524cd269d12e6b49fa487cef38b3 (patch)
treecd53b1ab608f9e5ee44a394d4769016310e06043 /templates/index.html
parent7c73949066cf1b730a2c8c3408fa016048538716 (diff)
feat(templates): Slightly less barebones index & thread templates
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html57
1 files changed, 35 insertions, 22 deletions
diff --git a/templates/index.html b/templates/index.html
index fe35eb7bc03d..5fc0d9a77c52 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,28 +1,41 @@
-<!DOCTYPE html>
-<html>
+<!doctype html>
+<html lang="en">
   <head>
-    <title>Converse Index page</title>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+    <!-- Bootstrap CSS -->
+    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
+    <title>Converse Index</title>
   </head>
   <body>
-    <h1>Welcome to Converse</h1>
-    <ul>
-      {% for thread in threads -%}
-        <li><a href="/thread/{{ thread.id }}">{{ thread.title }}</a> (posted at {{ thread.posted }} by {{ thread.author_name }})</li>
-      {%- endfor %}
-    </ul>
-    <hr>
-    <form action="/thread/submit" method="post">
-      <div>
-        <label for="title">Title:</label>
-        <input type="text" id="title" name="title">
+    <header>
+      <nav class="navbar navbar-light bg-light justify-content-between mb-3">
+        <a class="navbar-brand" href="/">
+          <h2>Converse</h2>
+        </a>
+        <form class="form-inline">
+          <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search" disabled>
+          <button class="btn btn-outline-success my-2 my-sm-0 mr-1" type="submit" disabled>Search</button>
+          <a class="btn btn-outline-secondary my-2" href="/thread/new">New thread</a>
+        </form>
+      </nav>
+    </header>
+    <div class="container">
+      <div class="row">
+        <div class="col-12">
+          <div class="list-group">
+            {% for thread in threads -%}
+            <a href="/thread/{{ thread.id }}" class="list-group-item list-group-item-action flex-column align-items-start">
+              <div class="d-flex w-100 justify-content-between">
+                <h5 class="mb-1">{{ thread.title }}</h5>
+                <small class="text-muted">{{ thread.posted }}</small>
+              </div>
+              <p class="mb-1">Created by {{ thread.author_name }}</p>
+            </a>
+            {%- endfor %}
+          </div>
+        </div>
       </div>
-      <div>
-        <label for="body">Content:</label>
-        <textarea id="body" name="body"></textarea>
-      </div>
-      <div>
-        <input type="submit" value="Submit">
-      </div>
-    </form>
+    </div>
   </body>
 </html>