hubl/src/header.pug

102 lines
3.5 KiB
Plaintext
Raw Normal View History

2020-11-16 17:48:42 +00:00
.segment.lg-three-quarter.float-left
.logo
solid-link(next='dashboard')
img(src=`${clientLogo || '/images/logo.png'}` style=`max-height:${clientLogoHeight || '32px'}`)
span.tag.beta.reversed.color-primary(data-trans='header.beta')
.segment.lg-quarter.float-right
.segment.lg-auto.float-left
solid-notifications.notLoggedIn(
nested-field="inbox"
bind-user
)
.segment.lg-auto.float-right
details#user-controls.notLoggedIn
summary(tabindex='0' role='button')
solid-display#user-controls__profile(
fields='first_name, account.picture'
class-first_name='flex'
class-account.picture='avatar'
widget-account.picture='hubl-user-avatar'
bind-user
)
#user-controls__panel
nav(role="user's functionalities menu")
ul
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
li
solid-link(next='profile' data-trans='header.myProfile')
li
solid-link(next='admin' data-trans='header.admin')
li
solid-link(next='about' data-trans='header.about')
button(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
button.loggedIn.segment.float-right(role='log in' onclick="document.querySelector('sib-auth').login();" data-trans='header.logIn')
button.notLoggedIn.mobile-menu-icon.icon-menu#toggleMainMenu
sib-auth(style='display:none!important')
sib-auth-provider(
data-authority=`${authority}`
data-id=`${authorityName || "authority"}`
data-client-name=`${clientName || "Hubl"}`
)
//-.header-left
2020-09-28 12:47:37 +00:00
.logo
solid-link(next='dashboard')
img(src=`${clientLogo || '/images/logo.png'}` style=`max-height:${clientLogoHeight || '32px'}`)
2020-10-21 13:31:05 +00:00
span.beta-tag(data-trans='header.beta')
2018-10-05 09:55:29 +00:00
2020-11-16 17:48:42 +00:00
//-solid-notifications.notLoggedIn(
2019-07-23 13:08:59 +00:00
nested-field="inbox"
bind-user
2020-11-16 17:48:42 +00:00
//-)
2018-10-05 09:55:29 +00:00
//- Templates for notifications from circles and from other users
2020-09-24 10:56:19 +00:00
include views/notifications/message-circle.pug
include views/notifications/message-private.pug
2020-05-08 13:27:44 +00:00
include templates/hubl-user-avatar.pug
2019-04-16 12:56:25 +00:00
2020-11-16 17:48:42 +00:00
//-details#user-controls.notLoggedIn
summary(tabindex='0' role='button')
2020-06-18 18:02:54 +00:00
solid-display#user-controls__profile(
2020-04-02 16:09:23 +00:00
fields='first_name, account.picture'
class-first_name='flex'
class-account.picture='avatar'
2020-05-08 13:27:44 +00:00
widget-account.picture='hubl-user-avatar'
bind-user
)
#user-controls__panel
nav(role="user's functionalities menu")
ul
2020-05-27 06:44:54 +00:00
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
li
2020-10-21 13:31:05 +00:00
solid-link(next='profile' data-trans='header.myProfile')
li
2020-10-21 13:31:05 +00:00
solid-link(next='admin' data-trans='header.admin')
li
2020-10-21 13:31:05 +00:00
solid-link(next='about' data-trans='header.about')
button(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
2020-11-16 17:48:42 +00:00
//-button.loggedIn(role='log in' onclick="document.querySelector('sib-auth').login();" data-trans='header.logIn')
2019-04-03 13:28:47 +00:00
2020-11-16 17:48:42 +00:00
//-button.notLoggedIn.mobile-menu-icon.icon-menu#toggleMainMenu
2020-11-16 17:48:42 +00:00
//-sib-auth(style='display:none!important')
2019-04-03 13:28:47 +00:00
sib-auth-provider(
2019-06-24 11:56:49 +00:00
data-authority=`${authority}`
data-id=`${authorityName || "authority"}`
2020-05-08 13:27:44 +00:00
data-client-name=`${clientName || "Hubl"}`
2019-04-03 13:28:47 +00:00
)