Skip to content
Snippets Groups Projects
Commit 3db2624d authored by Julian Rother's avatar Julian Rother
Browse files

Moved active_page definition into templates

parent 30a210b6
Branches
No related tags found
No related merge requests found
...@@ -46,11 +46,11 @@ def index(): ...@@ -46,11 +46,11 @@ def index():
@app.route('/videos') @app.route('/videos')
def videos(): def videos():
return render_template('videos.html', active_page='videos') return render_template('videos.html')
@app.route('/faq') @app.route('/faq')
def faq(): def faq():
return render_template('faq.html', active_page='faq') return render_template('faq.html')
if __name__ == '__main__': if __name__ == '__main__':
app.debug = True app.debug = True
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</head> </head>
<body> <body>
{%include "header.html" %} {%include "header.html" %}
{% set active_page = active_page %}
{% block content %} {% block content %}
<h1>This is a Heading</h1> <h1>This is a Heading</h1>
<p>This is a paragraph.</p> <p>This is a paragraph.</p>
......
{% from 'macros.html' import preview %} {% from 'macros.html' import preview %}
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "faq" %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<br /> <br />
......
{% from 'macros.html' import preview %} {% from 'macros.html' import preview %}
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "index" %}
{% block content %} {% block content %}
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
......
{% from 'macros.html' import preview %}
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "videos" %}
{% block content %} {% block content %}
<div class="container-fluid"> <div class="container-fluid">
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment