Skip to content

Commit

Permalink
Update to support Account.Name in signin navi; add header-signin elem…
Browse files Browse the repository at this point in the history
…ent ID and corresponding CSS
  • Loading branch information
thisisaaronland committed Mar 29, 2023
1 parent 20e5499 commit 1ded116
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions static/css/sfomuseum.common.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ body {
color: #616161 !important;
}

#header-signin {
background-color:#e0c877;
}

#pagination-previous-page {
color:#8a741d !important;
}
Expand Down
9 changes: 8 additions & 1 deletion templates/html/navi_signin.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ define "navi_signin" }}
<div class="header" style="background-color:#e0c877;">
<div class="header" id="header-signin">
<div class="container container-collection">

<nav class="navbar navbar-expand-lg" id="navbar-signin">
Expand All @@ -9,7 +9,14 @@
{{ if (IsAvailable "Account" .) }}

{{ if .Account }}
{{ if (IsAvailable "GivenName" .Account) }}
<a class="navbar-brand" href="#" id="navbar-signin-logo" href="/">Hi, {{ .Account.GivenName }}</a>
{{ else if (IsAvailable "Name" .Account) }}
<a class="navbar-brand" href="#" id="navbar-signin-logo" href="/">Hi, {{ .Account.Name }}</a>
{{ else }}
Hi, Mystery User...
{{ end }}

{{ else }}
<a class="navbar-brand" href="/signin/" id="navbar-signin-logo" href="/">Sign in</a>
{{ end }}
Expand Down

0 comments on commit 1ded116

Please sign in to comment.