Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jannik Hellenkamp
website
Commits
3db2624d
Commit
3db2624d
authored
Aug 18, 2016
by
Julian Rother
Browse files
Moved active_page definition into templates
parent
30a210b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
3db2624d
...
...
@@ -46,11 +46,11 @@ def index():
@
app
.
route
(
'/videos'
)
def
videos
():
return
render_template
(
'videos.html'
,
active_page
=
'videos'
)
return
render_template
(
'videos.html'
)
@
app
.
route
(
'/faq'
)
def
faq
():
return
render_template
(
'faq.html'
,
active_page
=
'faq'
)
return
render_template
(
'faq.html'
)
if
__name__
==
'__main__'
:
app
.
debug
=
True
...
...
templates/base.html
View file @
3db2624d
...
...
@@ -16,6 +16,7 @@
</head>
<body>
{%include "header.html" %}
{% set active_page = active_page %}
{% block content %}
<h1>
This is a Heading
</h1>
<p>
This is a paragraph.
</p>
...
...
templates/faq.html
View file @
3db2624d
{% from 'macros.html' import preview %}
{% extends "base.html" %}
{% set active_page = "faq" %}
{% block content %}
<div
class=
"container"
>
<br
/>
...
...
templates/index.html
View file @
3db2624d
{% from 'macros.html' import preview %}
{% extends "base.html" %}
{% set active_page = "index" %}
{% block content %}
<div
class=
"container-fluid"
>
<div
class=
"row"
>
...
...
templates/videos.html
View file @
3db2624d
{% from 'macros.html' import preview %}
{% extends "base.html" %}
{% set active_page = "videos" %}
{% block content %}
<div
class=
"container-fluid"
>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment