add-links/templates/article.html

49 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2023-10-04 12:56:21 +01:00
{% extends "base.html" %}
2023-11-26 14:13:51 +00:00
{% block title %}Link '{{ title }}' in '{{ hit_title }}'{% endblock %}
2023-10-04 12:56:21 +01:00
{% block style %}
2023-11-26 14:13:51 +00:00
<link href="{{ url_for("static", filename="css/diff.css") }}" rel="stylesheet"/>
2023-10-04 12:56:21 +01:00
{% endblock %}
{% block content %}
<div class="container">
2023-11-26 14:13:51 +00:00
<h1>Link '{{ title }}' in '{{ hit_title }}'</h1>
<form action="{{ url_for("index") }}">
2023-10-04 12:56:21 +01:00
<input name="q">
<input type="submit" value="search">
</form>
2023-11-26 14:13:51 +00:00
<div>Username: {{ g.user }}</div>
<div><a href="https://en.wikipedia.org/wiki/{{ title }}" target="_blank">view article</a></div>
<div><a href="{{ url_for('index') }}">back to index </a></div>
<div>total: {{ total }}</div>
<div>with link: {{ with_link }}</div>
<div>ratio: {{ "{:.1%}".format(with_link / total) }}</div>
{# <div>hit: {{ hit }}</div> #}
<div>replacement: {{ found.replacement }}</div>
<div>section: {{ found.section }}</div>
<table>
{{ diff | safe }}
</table>
<form method="POST">
<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>
</div>
</form>
2023-10-04 12:56:21 +01:00
2023-11-26 14:13:51 +00:00
<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> &ndash; {{ hit.snippet | safe }}</li>
{% endfor %}
</ol>
</div>
2023-10-04 12:56:21 +01:00
{% endblock %}