diff --git a/atst/app.py b/atst/app.py index f4cfe183..23ad724b 100644 --- a/atst/app.py +++ b/atst/app.py @@ -42,6 +42,12 @@ def make_flask_callbacks(app): g.dev = os.getenv("TORNADO_ENV", "dev") == "dev" g.matchesPath = lambda href: re.match('^'+href, request.url) g.modalOpen = request.args.get("modal", False) + g.current_user = { + "id": "cce17030-4109-4719-b958-ed109dbb87c8", + "first_name": "Amanda", + "last_name": "Adamson", + "atat_role": "default" + } # TODO: Make me a macro def modal(self, body): diff --git a/templates/components.html b/templates/components.html new file mode 100644 index 00000000..06d487ea --- /dev/null +++ b/templates/components.html @@ -0,0 +1,32 @@ +{% macro Icon(name, classes="") -%} + {% autoescape false %} + + {% endautoescape %} +{%- endmacro %} + +{% macro SidenavItem(label, href, active=False, icon=None, subnav=None) -%} +
  • + + {% if icon %} + {{ Icon(icon, classes="sidenav__link-icon") }} + {% endif %} + + {{label}} + + + {% if subnav and active %} + + {% endif %} +
  • +{%- endmacro %} diff --git a/templates/navigation/global_navigation.html.to b/templates/navigation/global_navigation.html.to index 60991d47..594bf574 100644 --- a/templates/navigation/global_navigation.html.to +++ b/templates/navigation/global_navigation.html.to @@ -1,24 +1,25 @@ +{% from "components.html" import SidenavItem %} diff --git a/templates/navigation/topbar.html.to b/templates/navigation/topbar.html.to index 9af26690..10fc0c6d 100644 --- a/templates/navigation/topbar.html.to +++ b/templates/navigation/topbar.html.to @@ -1,18 +1,19 @@ +{% from "components.html" import Icon %}