Bootstrap CDN link to add in the <head> part of the code:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
Bootstrap Template for Flask project:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
</head>
<body class="bg-dark text-white">
<nav class="navbar navbar-expand-sm navbar-dark">
<div class="container-fluid">
<a class="navbar-brand text-white navbar-item" href="#">Home</a>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active text-white navbar-item" href="#">NavItem1</a>
</li>
<li class="nav-item">
<a class="nav-link active text-white navbar-item" href="#">NavItem2</a>
</li>
<li class="nav-item">
<a class="nav-link active text-white navbar-item" href="#">NavItem3</a>
</li>
</ul>
</div>
<a class="btn btn-outline-success me-2 navbar-item" href="#">Login</a>
<a class="btn btn-outline-danger navbar-item" href="#">Sign Up</a>
</div>
</nav>
{% block content %}
{% endblock %}
</body>
</html>
Sample Content
{% extends "base.html" %}
{% block content %}
<div class="text-center text-white d-flex flex-column min-vh-100 justify-content-center">
<h1 class="title is-1">Welcome to MyFitness Gym!</h1>
<hr>
<h4 class="title is-4">If you don't make time for exercise, you'll probably have to make time for illness!</h4>
<h5 class="title is-5">Stay Fit, Stay Healthy!</h5>
</div>
{% endblock %}
Template for Forms
{% extends "base.html" %}
{% block content %}
<h1 class="title text-center justify-content-center">{% block title %} Add New Player {% endblock %}</h1>
<hr>
<div class="d-flex justify-content-center text-black">
<form method="post">
<div class="form-floating mb-3">
<input type="text" name="name" class="form-control" id="floatingInput"
placeholder="Name">
<label for="floatingInput">Name</label>
</div>
<div class="form-floating mb-3">
<input type="number" name="age" class="form-control" id="floatingInput"
placeholder="Age">
<label for="floatingInput">Age</label>
</div>
<p><button class="btn btn-primary" type="submit">Submit</button></p>
</form>
</div>
{% endblock %}
Template for Displaying Data
{% extends "base.html" %}
{% block content %}
<span class="title"><h1>{% block title %} Players {% endblock %}</h1></span>
<hr>
{% for player in players %}
<div class="bg-dark text-white">
<ul class="list-group w-25 mx-auto my-3">
<li class="list-group-item">Name: {{ player.name }}</li>
<li class="list-group-item">Year: {{ player.age }}</li>
</ul>
</div>
{% endfor %}
{% endblock %}
Sign Up Page Template
{% extends "base.html" %}
{% block content %}
<h2 class="title">Sign Up</h2><hr>
<div class="box d-flex justify-content-center">
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-danger">
{{ messages[0] }}. Go to <a href="{{ url_for('login') }}" >login page</a>
</div>
{% endif %}
{% endwith %}
</div>
<div class="box d-flex justify-content-center">
<div class="text-black w-25">
<form method="POST" action="/signup">
<div class="form-floating mb-3">
<input type="email" name="email" class="form-control" id="floatingInput"
placeholder="Email">
<label for="floatingInput">Email</label>
</div>
<div class="form-floating mb-3">
<input type="text" name="name" class="form-control" id="floatingInput"
placeholder="Name">
<label for="floatingInput">Name</label>
</div>
<div class="form-floating mb-3">
<input type="password" name="password" class="form-control" id="floatingInput"
placeholder="Password">
<label for="floatingInput">Password</label>
</div>
<button class="btn btn-primary">Sign Up</button>
</form>
</div>
</div>
{% endblock %}
Log In Page Template
{% extends "base.html" %}
{% block content %}
<h2 class="title">Login</h2><hr>
<div class="box d-flex justify-content-center">
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-danger" role="alert">
{{ messages[0] }}
</div>
{% endif %}
{% endwith %}
</div>
<div class="box d-flex justify-content-center">
<div class="text-black w-25">
<form method="POST" action="/login">
<div class="form-floating mb-3">
<input type="email" name="email" class="form-control" id="floatingInput"
placeholder="Email">
<label for="floatingInput">Email</label>
</div>
<div class="form-floating mb-3">
<input type="password" name="password" class="form-control" id="floatingInput"
placeholder="Password">
<label for="floatingInput">Password</label>
</div>
<div class="form-check d-flex justify-content-center text-white">
<input class="form-check-input me-3" name="remember" type="checkbox" value=""
id="flexCheckDefault">
<label class="form-check-label" for="flexCheckDefault">Remember me</label>
</div>
<button class="btn btn-primary">Login</button>
</form>
</div>
</div>
{% endblock %}