hubl/src/views/partials/header.pug

134 lines
6.4 KiB
Plaintext
Raw Normal View History

div
2021-01-15 13:00:06 +00:00
solid-link.segment.sm-hidden(next='dashboard')
2021-01-12 08:50:48 +00:00
img.logo(src=`${clientLogo || '/images/logo.webp'}`)
2021-01-15 13:00:06 +00:00
button.notLoggedIn.segment.lg-hidden.icon-menu#toggleMainMenu
2020-12-14 15:21:02 +00:00
span.tag.reversed.text-semibold(data-trans='header.beta')
2020-12-16 18:39:19 +00:00
div
2021-01-19 18:59:24 +00:00
solid-notifications.segment.sm-margin-right-xlarge.notLoggedIn(
nested-field="inbox"
2020-12-15 15:33:24 +00:00
bind-user
)
2021-01-12 08:50:48 +00:00
if themeChecker
div.selector
each val, index in ['primary', 'secondary', 'complementary', 'complementary-darken']
label= 'Couleur ' + (index+1)
input.input-color(
id='color-'+val
type="text"
)
2021-01-18 15:21:59 +00:00
//- User menu visible on large screens
2021-01-15 13:00:06 +00:00
details.segment.sm-hidden.notLoggedIn
summary.text-right
2021-01-18 15:21:59 +00:00
solid-display.labelled-avatar.padding-top-xsmall(
fields='segment1(account.picture), segment2(first_name), segment3(button)'
class-segment1='segment'
class-segment2='segment margin-left-small'
class-segment3='segment margin-left-xxsmall'
class-account.picture="avatar"
class-first_name="text-semibold text-color-heading"
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
div.panel
nav.bg-color-white.text-semibold.text-color-heading
ul
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
li.border-bottom.border-color-grey
solid-link.segment.padding-small.text-hover(next='profile' data-trans='header.myProfile')
li.segment.padding-small.border-bottom.border-color-grey
div(data-trans='header.admin')
ul.text-normal
if endpoints.get.users
solid-link.text-hover(next='admin-communities')
li.segment.padding-top-small
2021-01-18 10:51:33 +00:00
a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community')
if endpoints.get.circles
solid-link.text-hover(next='admin')
li.segment.padding-top-small
2021-01-18 10:51:33 +00:00
a.icon.icon-globe.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.circles')
if endpoints.get.projects
solid-link.text-hover(next='admin-projects')
li.segment.padding-top-small
2021-01-18 10:51:33 +00:00
a.icon.icon-folder-alt.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.projects')
li.border-bottom.border-color-grey
solid-link.segment.padding-small.text-hover(next='about' data-trans='header.about')
li
button.segment.padding-small.text-hover.text-bold.text-color-heading(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
button.notLoggedIn.segment.lg-hidden.icon-menu#toggleMainMenu
sib-auth(style='display:none!important', auto-login)
sib-auth-provider(
data-authority=`${authority}`
data-id=`${authorityName || "authority"}`
data-client-name=`${clientName || "Hubl"}`
)
2020-12-14 17:02:28 +00:00
2021-01-18 15:21:59 +00:00
//- User menu visible on small screens
details.user-menu.segment.lg-hidden.notLoggedIn
summary
2021-01-15 13:00:06 +00:00
solid-display.labelled-avatar(
fields='segment1(account.picture), segment3(button)'
class-segment1='segment'
2021-01-18 15:21:59 +00:00
class-segment3='segment sm-arrow-down'
class-account.picture="avatar"
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
solid-display.user-firstname(
fields='segment1(account.picture), segment2(first_name), segment3(button)'
class-segment1='segment'
class-segment2='segment margin-left-small'
2021-01-15 13:00:06 +00:00
class-segment3='segment'
class-account.picture="avatar"
2021-01-18 15:21:59 +00:00
class-first_name="text-semibold text-color-heading"
2021-01-15 13:00:06 +00:00
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
div.panel
nav.bg-color-white.text-semibold.text-color-heading
ul
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
li.border-bottom.border-color-grey
2021-01-18 15:21:59 +00:00
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next='profile' data-trans='header.myProfile')
li.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.border-bottom.border-color-grey
2021-01-15 13:00:06 +00:00
div(data-trans='header.admin')
ul.text-normal
if endpoints.get.users
solid-link.text-hover(next='admin-communities')
2021-01-18 15:21:59 +00:00
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community')
if endpoints.get.circles
solid-link.text-hover(next='admin')
2021-01-18 15:21:59 +00:00
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-globe.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.circles')
if endpoints.get.projects
solid-link.text-hover(next='admin-projects')
2021-01-18 15:21:59 +00:00
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-folder-alt.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.projects')
2021-01-15 13:00:06 +00:00
li.border-bottom.border-color-grey
2021-01-18 15:21:59 +00:00
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next='about' data-trans='header.about')
2021-01-15 13:00:06 +00:00
li
2021-01-18 15:21:59 +00:00
button.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover.text-bold.text-color-heading(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
2021-01-15 13:00:06 +00:00
button.notLoggedIn.segment.lg-hidden.icon-menu#toggleMainMenu
sib-auth(style='display:none!important', auto-login)
sib-auth-provider(
data-authority=`${authority}`
data-id=`${authorityName || "authority"}`
data-client-name=`${clientName || "Hubl"}`
)