diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..38da6d9d19382a882083f11e5392e50cb36fb031 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +.vscode/ diff --git a/main.py b/main.py new file mode 100644 index 0000000000000000000000000000000000000000..e4e1c863a35c1522c4e6649881c2b4ad565aded9 --- /dev/null +++ b/main.py @@ -0,0 +1,11 @@ +from flask import Flask, request, render_template + +app = Flask(__name__) + +@app.route("/", methods = ["GET"]) +def home(): + if request.method == "GET": + return render_template("home.html") + +if __name__ == "__main__": + app.run(debug = True) diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000000000000000000000000000000000000..214431d31fe2bdef17ebc8a7224a35c3119377a2 --- /dev/null +++ b/templates/home.html @@ -0,0 +1,2 @@ +{% extends "main.html" %} +{% block title %}Home{% endblock %} \ No newline at end of file diff --git a/home.html b/templates/main.html similarity index 84% rename from home.html rename to templates/main.html index e8399080004118fe0ab514abd758068986f48cf2..56b139ea50d539de076f84644843fb0a63c32cb6 100644 --- a/home.html +++ b/templates/main.html @@ -12,7 +12,7 @@ "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> - <title>Hello</title> + <title>{% block title %}{% endblock %} - Tramshed Workspaces</title> </head> <div class="parallax"> @@ -26,4 +26,7 @@ <li><a href="#contactUs">Contact Us</a></li> <li style="float:right"><a class="active" href="#about">About</a></li> </ul> - </nav><br><br><br> + </nav> + {% block mainBlock %}{% endblock %} + </body> +</html>