introduce search interface

This commit is contained in:
www
2020-12-07 09:57:30 +00:00
parent 894a99cdef
commit ad36db964e
21 changed files with 32004 additions and 52 deletions

38
templates/search.html Normal file
View File

@@ -0,0 +1,38 @@
{# -*-jinja2-*- #}
{% extends "layout.html" %}
{% block content %}
<h1>Suche</h1>
<form action="/" method="GET">
<div class="input-group input-group-rounded">
<!---<span class="input-group-label">$</span>-->
<input class="input-group-field " name="query" type="text" placeholder="search">
<div class="input-group-button">
<input type="submit" class="button" value="Submit">
</div>
</div>
</form>
{% if query %}
Ergebnisse für: {{query}}
{% for post in results %}
<a href="{{post['url']}}">
<div class="media-object">
{% if post["image"]%}
<div class="media-object-section">
<div class="thumbnail small-thumb">
<img src="{{post['image']}}">
</div>
</div>
{% endif %}
<div class="media-object-section">
<h1><b>{{post["title"]}}</b></h1>
<p>{{post["highlights"] | safe}}</p>
</div>
</div>
</a>
{% endfor %}
{% endif %}
{% endblock %}