Show list of hits on article page
This commit is contained in:
parent
8901831568
commit
f54401ef05
2 changed files with 33 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Link '{{ title }}' in '{{ hit.title }}'{% endblock %}
|
||||
{% block title %}Link '{{ title }}' in '{{ hit_title }}'{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
<link href="{{ url_for("static", filename="css/diff.css") }}" rel="stylesheet"/>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1>Link '{{ title }}' in '{{ hit.title }}'</h1>
|
||||
<h1>Link '{{ title }}' in '{{ hit_title }}'</h1>
|
||||
<form action="{{ url_for("index") }}">
|
||||
<input name="q">
|
||||
<input type="submit" value="search">
|
||||
|
|
@ -30,12 +30,19 @@
|
|||
{{ diff | safe }}
|
||||
</table>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="hit" value="{{ hit.title }}">
|
||||
<input type="hidden" name="hit" value="{{ hit_title }}">
|
||||
<div class="my-3">
|
||||
<input type="submit" class="btn btn-primary" value="save"/>
|
||||
<a href="{{url_for("article_page", url_title=url_title, after=hit["title"])}}" class="btn btn-primary">skip</a>
|
||||
<a href="{{url_for("article_page", url_title=url_title, after=hit_title)}}" class="btn btn-primary">skip</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ol>
|
||||
{% for hit in hits %}
|
||||
{% set url = url_for("article_page", url_title=url_title, title=hit.title) %}
|
||||
<li><a href="{{ url }}">{{ hit.title }}</a> – {{ hit.snippet | safe }}</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue