Convert ui methods into Flask globals

This commit is contained in:
richard-dds
2018-08-01 11:22:21 -04:00
parent 6a5d3d57cf
commit 29c68151de
4 changed files with 42 additions and 17 deletions

View File

@@ -1,21 +1,21 @@
{# TODO: set this context elsewhere #}
{# set context='workspace' #}
{% set context=navigationContext() %}
{% set context=g.navigationContext %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% block title %}JEDI{% end %}</title>
{% for url in assets['css'].urls() %}
<link rel="stylesheet" href="{{ url }}" type="text/css">
{% end %}
<title>{% block title %}JEDI{% endblock %}</title>
{% assets "css" %}
<link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css">
{% endassets %}
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
</head>
<body class="{% if modalOpen() %} modalOpen{% end %}">
<body class="{% if g.modalOpen %} modalOpen{% endif %}">
{% block template_vars %}{% end %}
{% block template_vars %}{% endblock %}
{% include 'navigation/topbar.html.to' %}
@@ -23,18 +23,16 @@
{% include 'navigation/global_navigation.html.to' %}
<div class='global-panel-container'>
{% block sidenav %}{% end %}
{% block sidenav %}{% endblock %}
{% block content %}
these are not the droids you are looking for
{% end %}
{% endblock %}
</div>
</div>
{% include 'footer.html.to' %}
{% block modal %}{% end %}
{% block modal %}{% endblock %}
</body>
</html>

View File

@@ -1,4 +1,4 @@
{% extends "base.html.to" %}
{% extends "base.html" %}
{% block content %}
@@ -8,7 +8,7 @@
</main>
{% end %}
{% endblock %}