basic structure, master template

This commit is contained in:
Felix Pankratz 2020-02-29 15:59:41 +01:00
parent 75318b5b35
commit 73b1ce69db
4 changed files with 21 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
venv/
__pycache__/
*.swp

View File

@ -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')

1
static/style.css Normal file
View File

@ -0,0 +1 @@

15
templates/master.html Normal file
View File

@ -0,0 +1,15 @@
<docctype html>
<head>
<meta charset="utf-8">
<link rel="icon" href="favicon.png" type="image/x-icon">
{% if subpage %}
<title>Felix Pankratz - {{subpage}}</title>
{% else %}
<title>Felix Pankratz</title>
{% endif %}
</head>
<body>
<h1>Felix Pankratz</h1>
</h2>Persönliche Webseite</h2>
</body>