Remove navigationContext variable
This commit is contained in:
parent
34d652f33a
commit
0631b69503
@ -62,11 +62,6 @@ def make_app(config):
|
|||||||
def make_flask_callbacks(app):
|
def make_flask_callbacks(app):
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def _set_globals():
|
def _set_globals():
|
||||||
g.navigationContext = (
|
|
||||||
"workspace"
|
|
||||||
if re.match("\/workspaces\/[A-Za-z0-9]*", request.path)
|
|
||||||
else "global"
|
|
||||||
)
|
|
||||||
g.dev = os.getenv("FLASK_ENV", "dev") == "dev"
|
g.dev = os.getenv("FLASK_ENV", "dev") == "dev"
|
||||||
g.matchesPath = lambda href: re.match("^" + href, request.path)
|
g.matchesPath = lambda href: re.match("^" + href, request.path)
|
||||||
g.modal = request.args.get("modal", None)
|
g.modal = request.args.get("modal", None)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
{# TODO: set this context elsewhere #}
|
|
||||||
{# set context='workspace' #}
|
|
||||||
{% set context=g.navigationContext %}
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
{# TODO: set this context elsewhere #}
|
|
||||||
{# set context='workspace' #}
|
|
||||||
{% set context=g.navigationContext %}
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% from "components/sidenav_item.html" import SidenavItem %}
|
{% from "components/sidenav_item.html" import SidenavItem %}
|
||||||
|
|
||||||
<div class="global-navigation sidenav global-navigation__context--{{context}}">
|
<div class="global-navigation sidenav">
|
||||||
<ul>
|
<ul>
|
||||||
{% if g.dev %}
|
{% if g.dev %}
|
||||||
{{ SidenavItem("Styleguide",
|
{{ SidenavItem("Styleguide",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user