make search results a table

This commit is contained in:
Joe Ardent 2023-12-30 16:59:27 -08:00
parent 64474c8673
commit beec047caf
3 changed files with 23 additions and 11 deletions

View File

@ -13,9 +13,9 @@
</div>
</div>
{% else %} <!-- this is for the `when` statement -->
{% when None %} <!-- this is for the `when` statement -->
<div class="header_logged_out">
Heya, why don't you <a href="/login">log in</a> or <a href="/signup">sign up</a>?
<a href="/login">log in</a> or <a href="/signup">sign up</a>?
</div>
{% endmatch %}

View File

@ -6,17 +6,23 @@
{% block content %}
<h1>Whatcha Watchin?</h1>
<div class="quicksearch-query">{{self.search}}</div>
<div class="watchlist">
<ul>
{% for watch in watches %}
<li><span class="watchtitle">{{watch.title}}</span> -- {% call m::get_or_default(watch.year(), "when??") -%}:
{{watch.kind}} </li>
{% endfor %}
</ul>
<table>
<thead>
<tr>
<th>Title</th>
<th>Type</th>
<th>Year</th>
</tr>
</thead>
<tbody>
{% for watch in watches %}
{% include "watch-search-result.html" %}
{% endfor %}
</tbody>
</table>
</div>
<h2>Simple Search</h2>
<div class="simplesearch">
<form action="/search" enctype="application/x-www-form-urlencoded" method="get">
@ -24,6 +30,7 @@
<input type="text" name="search" id="search"></br>
<input type="submit" value="Let's go!">
</div>
<h2>Fussy Search</h2>
<div class="fullsearch">
<label for="title">Title</label>

View File

@ -0,0 +1,5 @@
<tr id="watchlist-item-{{watch.id}}">
<td><span class="watchtitle">{{watch.title}}</span></td>
<td>{{watch.kind}}</td>
<td> {% call m::get_or_default(watch.year(), "when??") -%}</td>
</tr>