introduce search interface
This commit is contained in:
38
templates/search.html
Normal file
38
templates/search.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user