add-links/templates/index.html
Edward Betts bc6265d4cd Redesign UI and fix several bugs
- Add navbar with login/logout, search form, and Find Link branding
- Clean up index page: search-only, examples behind ?debug=1
- Improve article page: remove debug clutter, named Wikipedia links, collapsible candidates
- Add SVG favicon (🔗 emoji)
- Fix diff CSS: compact layout, auto table layout to eliminate wide marker column gap
- Catch TokenRequestDenied in OAuth start and show error page
- Store username in session at login; clear bad session on API failure
- Raise NoMatch when diff is empty (edit already applied)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 11:30:12 +01:00

44 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% block title %}Find Link{% endblock %}
{% block content %}
<div class="container">
<div class="row justify-content-center mt-5">
<div class="col-md-6 text-center">
<h1 class="mb-2">Find Link</h1>
<p class="text-muted mb-4">Find unlinked mentions of a Wikipedia article and add the links.</p>
<form class="d-flex gap-2 justify-content-center" action="{{ url_for('index') }}">
<input class="form-control" name="q" placeholder="Article title…" style="max-width:360px" autofocus>
<button class="btn btn-primary" type="submit">Search</button>
</form>
</div>
</div>
{% if debug %}
<div class="row mt-5">
<div class="col">
<h2 class="h6 text-muted text-uppercase mb-3">Examples</h2>
<table class="table table-sm table-hover w-auto">
<thead class="table-light">
<tr>
<th>Article</th>
<th class="text-end">Total</th>
<th class="text-end">% linked</th>
</tr>
</thead>
<tbody>
{% for item in examples %}
<tr>
<td><a href="{{ article_url(item.title) }}">{{ item.title }}</a></td>
<td class="text-end text-muted">{{ item.total }}</td>
<td class="text-end text-muted">{{ "{:.0%}".format(item.with_links / item.total) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
</div>
{% endblock %}