This commit is contained in:
Edward Betts 2023-09-29 14:17:56 +01:00
parent 7813d1a7f0
commit b6953cf52f
7 changed files with 135 additions and 34 deletions

View file

@ -53,7 +53,7 @@ a.new { color: red; }
<div id="dabs" class="p-3">
<h1>{{ article.enwiki }}</h1>
<div id="save-panel" class="d-none">
<form method="POST" action="{{ article.save_endpoint() }}">
<form method="POST" action="{{ article.preview_endpoint() }}">
<button class="btn btn-primary" id="save-btn">Preview before save</button>
<span id="edit-count"></span>
<input type="hidden" value="{}" id="save-edits" name="edits">

View file

@ -1,7 +1,21 @@
{% extends "base.html" %}
{% block title %}DAB Mechanic{% endblock %}
{% block content %}
<div class="m-3">
<form>
article title:
<input name="title" value="{{ request.args.get("title", "") }}">
<button class="btn btn-sm btn-primary">go</button>
</form>
{% if title and not exists %}
<p>No article titled "{{ title }}" found in Wikipedia.</p>
{% endif %}
<ol>
{% for enwiki, count in articles %}
<li>

View file

@ -15,13 +15,7 @@
<a class="navbar-brand" href="{{ url_for('index') }}">Dab Mechanic</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled">Disabled</a>
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
</ul>

View file

@ -30,7 +30,10 @@
</tbody>
</table>
<form method="POST" action="{{ url_for("save", enwiki=title) }}">
<button class="btn btn-primary" id="save-btn">Save changes</button>
<input type="hidden" value="{{ request.form.edits }}" id="save-edits" name="edits">
</form>
</body>
</html>