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>
</div> </div>
{% else %} <!-- this is for the `when` statement --> {% when None %} <!-- this is for the `when` statement -->
<div class="header_logged_out"> <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> </div>
{% endmatch %} {% endmatch %}

View file

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