Improvements
This commit is contained in:
parent
084c886933
commit
bec16f8dcb
6
main.py
6
main.py
|
@ -48,7 +48,11 @@ def show_message() -> str:
|
|||
wiki_part2=wiki_part2,
|
||||
)
|
||||
|
||||
return flask.render_template("show_message.html", msg=msg)
|
||||
subject = f"Request to use your photo of {name} on Wikipedia"
|
||||
|
||||
lines = msg.split("\n\n")
|
||||
|
||||
return flask.render_template("show_message.html", subject=subject, lines=lines)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{# vim:ft=jinja
|
||||
#}
|
||||
Request to use your photo of {{ name }} on Wikipedia
|
||||
|
||||
Hi,
|
||||
|
||||
I wanted to get in touch regarding your photo of {{ name }}, which I came across on Flickr:
|
||||
|
|
|
@ -1,11 +1,24 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Flickr Mail</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<pre>{{ msg }}</pre>
|
||||
<div class="container my-3">
|
||||
<div><strong>Subject:</strong> {{ subject }}
|
||||
<div>
|
||||
<h3>message</h3>
|
||||
{% for p in lines %}
|
||||
<p>{{ p }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,19 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>URL Input Form</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Flickr Mail</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<h1>Enter URLs</h1>
|
||||
<form action="{{ url_for("show_message") }}">
|
||||
<label for="flickr_url">Flickr URL:</label>
|
||||
<input type="text" id="flickr" name="flickr" required><br><br>
|
||||
<div class="mb-3">
|
||||
<label for="flickr" class="form-label">Flickr URL:</label>
|
||||
<input type="text" class="form-control" id="flickr" name="flickr" required>
|
||||
</div>
|
||||
|
||||
<label for="wikipedia_url">Wikipedia URL:</label>
|
||||
<input type="text" id="wikipedia" name="wikipedia" required><br><br>
|
||||
<div class="mb-3">
|
||||
<label for="wikipedia" class="form-label">Wikipedia URL:</label>
|
||||
<input type="text" class="form-control" id="wikipedia" name="wikipedia" required>
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
Loading…
Reference in a new issue