From 73b1ce69db102a689129db86ef84ba67900d4344 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 29 Feb 2020 15:59:41 +0100 Subject: [PATCH] basic structure, master template --- .gitignore | 1 + homepage.py | 8 ++++---- static/style.css | 1 + templates/master.html | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 static/style.css create mode 100644 templates/master.html diff --git a/.gitignore b/.gitignore index 93526df..66d4641 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ venv/ __pycache__/ +*.swp diff --git a/homepage.py b/homepage.py index 888e994..01e40c7 100644 --- a/homepage.py +++ b/homepage.py @@ -1,13 +1,14 @@ from flask import Flask +from flask import render_template app = Flask(__name__) @app.route('/') def index(): - return 'Index Page' + return render_template('master.html') @app.route('/projects') def projects(): - return 'My Projects' + return render_template('master.html', subpage='Projekte') @app.route('/monitoring') def monitoring(): @@ -16,8 +17,7 @@ def monitoring(): @app.route('/disclaimer') def disclaimer(): - return 'disclaimer' - + return render_template('master.html', subpage='Disclaimer') diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/static/style.css @@ -0,0 +1 @@ + diff --git a/templates/master.html b/templates/master.html new file mode 100644 index 0000000..51ce6e4 --- /dev/null +++ b/templates/master.html @@ -0,0 +1,15 @@ + + + + + + {% if subpage %} + Felix Pankratz - {{subpage}} + {% else %} + Felix Pankratz + {% endif %} + + +

Felix Pankratz

+ Persönliche Webseite +