Added navbar and redirect to create page

This commit is contained in:
FrederikBaerentsen 2024-04-18 07:53:06 +02:00
parent 36883bed26
commit 59064a6088
2 changed files with 24 additions and 14 deletions

5
app.py
View File

@ -222,12 +222,13 @@ def create():
conn.commit()
conn.close()
return redirect('/')
conn.close()
print('Count: ' + str(count))
return render_template('create.html')
def generate_unique_set_unique():
@ -513,4 +514,4 @@ def save_number(tmp):
return Response(status=204)
if __name__ == '__main__':
app.run(host='192.168.10.109', debug=True, port=3333)
app.run(host='0.0.0.0', debug=True, port=3333)

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<html data-theme="light" class="has-navbar-fixed-top">
<head
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
@ -9,9 +9,26 @@
href="https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css">
</head>
<body>
<nav class="navbar is-dark is-fixed-top" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
Home
</a>
</div>
<div id="navMenu" class="navbar-menu">
<div class="navbar-start">
</div>
<div class="navbar-end">
</div>
</div>
</nav>
<section class="section">
<div class="container">
<div class="container">
<form id="createForm" action="/create" method="post">
<div class="field">
<label class="label" for="inputField">Input:</label>
@ -19,21 +36,13 @@
<input class="input" type="text" id="inputField" name="inputField">
</div>
</div>
<div class="field">
<div class="control">
<label class="checkbox">
<input type="checkbox" name="addDuplicate" value="true">
Add duplicate
</label>
</div>
</div>
<div class="field">
<div class="control">
<button class="button is-primary" type="submit">Submit</button>
</div>
</div>
</form>
</div>
</div>
</section>
</body>