aboutsummaryrefslogtreecommitdiff
path: root/templates/beerpage.jinja2
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-07-28 13:55:47 -0400
committerBen Burwell <ben@benburwell.com>2019-07-28 13:56:01 -0400
commita60be578d65dd0e06e468623412814d861b6e8d7 (patch)
tree2d867e35e230b5710b8005c16dee20224a46e214 /templates/beerpage.jinja2
parentdd4104ff80c4613482a5de8a98fff5687e5f2b13 (diff)
Post the shit
Diffstat (limited to 'templates/beerpage.jinja2')
-rw-r--r--templates/beerpage.jinja240
1 files changed, 26 insertions, 14 deletions
diff --git a/templates/beerpage.jinja2 b/templates/beerpage.jinja2
index 6202422..92bb896 100644
--- a/templates/beerpage.jinja2
+++ b/templates/beerpage.jinja2
@@ -17,20 +17,32 @@
</tr>
</table>
</div>
- <div class="row">
- <select>
- <option value="3">Much more</option>
- <option value="2">More</option>
- <option value="1">Little more</option>
- <option value="-1">Little less</option>
- <option value="-2">Less</option>
- <option value="-3">Much less</option>
- </select>
- <select>
- {% for attr in attrs %}
+ <form action="" method="post">
+ <p>
+ Show me beers which are
+ <select name="direction">
+ <option value="3">Much more</option>
+ <option value="2">More</option>
+ <option value="1">Little more</option>
+ <option value="-1">Little less</option>
+ <option value="-2">Less</option>
+ <option value="-3">Much less</option>
+ </select>
+ <select name="attr">
+ {% for attr in attrs %}
<option value="{{ attr }}"> {{ attr }}</option>
- {% endfor %}
- </select>
- </div>
+ {% endfor %}
+ </select>
+ <input type="submit" value="Go">
+ </p>
+ </form>
+ {% if direction and attr %}
+ <h5>Beers like {{ beer_data.name }} but {{ direction }} {{ attr }}</h5>
+ <ul>
+ {% for similar_beer in similar_beers %}
+ <li>{{ similar_beer }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
{% endblock %}