Files
inventory-plus-plus/templates/component_bodies/nav_bar.html.tmpl
T
2026-01-13 22:07:20 -07:00

71 lines
924 B
Cheetah

{{/* TODO: delete, once not needed */}}
{{/* "dot" . */}}
<nav
style="
margin: 0;
padding: 1em;
background-color: #bdf;
font-size: 1.25em;
display: flex;
flex-direction: column;
align-items: center;
"
>
<ul>
<li>
<a href="/ui">
Home
</a>
</li>
{{/* */}}
{{- $userID := .dot.Identity.User.UserID }}
{{- $acct := .dot.Identity.Account }}
{{- $acctID := 0 }}
{{- if $acct }}
{{- $acctID = $acct.AccountID }}
{{- end }}
{{- if not $userID }}
<li>
<a href="/api/auth/login">
Log In / Sign Up
</a>
</li>
{{- else if $acctID }}
<li>
<a href="/ui/accounts/{{$acctID}}">
Account
</a>
</li>
<li>
<a href="/ui/accounts/{{$acctID}}/reports">
Reports
</a>
</li>
<li>
<a href="/ui/accounts/{{$acctID}}/inventory">
Inventory
</a>
</li>
<li>
<a href="/api/auth/logout">
Log Out
</a>
</li>
{{- end }}
</ul>
</nav>