home.html is rendering

- Converted Icon and SidenavItem into macros
- Setting a mock user on g.current_user
This commit is contained in:
richard-dds
2018-08-01 11:40:07 -04:00
parent 29c68151de
commit 0976aed778
4 changed files with 56 additions and 16 deletions

View File

@@ -1,18 +1,19 @@
{% from "components.html" import Icon %}
<header class="topbar">
<nav class="topbar__navigation">
<a href="/home" class="topbar__link topbar__link--shield" title="JEDI Home">
{% module Icon('shield', classes='topbar__link-icon') %}
{{ Icon('shield', classes='topbar__link-icon') }}
</a>
<div class="topbar__context topbar__context--{{context}}">
<a href="/" class="topbar__link">
<span class="topbar__link-label">{{ "Workspace 123456" if context == 'workspace' else "JEDI" }}</span>
{% module Icon('caret_down', classes='topbar__link-icon icon--tiny') %}
{{ Icon('caret_down', classes='topbar__link-icon icon--tiny') }}
</a>
<a href="/" class="topbar__link">
<span class="topbar__link-label">{{ current_user["first_name"] + " " + current_user["last_name"] }}</span>
{% module Icon('avatar', classes='topbar__link-icon') %}
<span class="topbar__link-label">{{ g.current_user.first_name + " " + g.current_user.last_name }}</span>
{{ Icon('avatar', classes='topbar__link-icon') }}
</a>
</div>
</nav>