Bootstrap eingefügt, Buttons ausprobiert
This commit is contained in:
6
app.py
6
app.py
@@ -1,11 +1,11 @@
|
||||
from flask import Flask, redirect, url_for, render_template
|
||||
from flask import Flask, render_template
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def home():
|
||||
return render_template('index.html', content=5)
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
app.run(debug=True)
|
||||
22
templates/base.html
Normal file
22
templates/base.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<html>
|
||||
<head>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Homepage</h1>
|
||||
<input type="radio" class="btn-check" name="options-base" id="option5" autocomplete="off" checked>
|
||||
<label class="btn" for="option5">Fuck yes!</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="options-base" id="option6" autocomplete="off">
|
||||
<label class="btn" for="option6">Fuck no!</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="options-base" id="option7" autocomplete="off">
|
||||
<label class="btn" for="option7">Fuck you!</label>
|
||||
|
||||
<button type="button" class="btn btn-primary">Submit</button>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,13 +1,3 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Homepage</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Homepage</h1>
|
||||
{% for x in range(content) %}
|
||||
<p>{{x}}</p>
|
||||
{% endfor %}
|
||||
<p>{{x}}<p>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Homepage{% endblock %}
|
||||
{% block content %}<h1>Test</h1>{% endblock %}
|
||||
Reference in New Issue
Block a user