Skip to content

Add attr #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
help="Run application in debug mode",
)

parser.add_option(
"-p",
"--port",
action="store",
type="int",
dest="port",
default="8080",
help="Change dev server port (default is 8080)",
)

(options, args) = parser.parse_args()

app = Flask(__name__)
Expand Down Expand Up @@ -70,4 +80,4 @@ def fetch_mf2(url):


if options.debug:
app.run(debug=True, port=8080)
app.run(debug=True, port=options.port)
6 changes: 3 additions & 3 deletions templates/index.jinja2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand Down Expand Up @@ -52,7 +52,7 @@
<form action="/" accept-charset="UTF-8" method="get">
<div class="form-group">
<label for="url">Enter a URL</label>
<input id="url" class="form-control form-control-lg" type="url" name="url" placeholder="https://example.com/person.html" />
<input required id="url" class="form-control form-control-lg" type="url" name="url" placeholder="https://example.com/person.html" />
</div>

<div class="form-group">
Expand All @@ -79,7 +79,7 @@
<form method="post" action="/" class="mb-5">
<div class="form-group">
<label for="doc">HTML</label>
<textarea id="doc" name="doc" rows="6" class="form-control form-control-lg"></textarea>
<textarea required id="doc" name="doc" rows="6" class="form-control form-control-lg"></textarea>
</div>

<div class="form-group">
Expand Down