sorted src, activate condition for public directory and job offers, dev parameter for local lib folder

This commit is contained in:
Jean-Baptiste Pasquier 2020-02-10 13:59:23 +01:00
parent b512cf3e9a
commit 31bd34df98
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
30 changed files with 142 additions and 119 deletions

View File

@ -6,6 +6,7 @@
"clientLogoHeight": "32px", "clientLogoHeight": "32px",
"clientCSS": "/path/to/custom.css", "clientCSS": "/path/to/custom.css",
"authorityName": "djangoldp-server-name", "authorityName": "djangoldp-server-name",
"publicDirectory": false,
"endpoints": { "endpoints": {
"get": { "get": {
"circles": "http://localhost:8000/circles/", "circles": "http://localhost:8000/circles/",

View File

@ -6,6 +6,7 @@
"clientLogoHeight": "32px", "clientLogoHeight": "32px",
"clientCSS": "/path/to/custom.css", "clientCSS": "/path/to/custom.css",
"authorityName": "djangoldp-server-name", "authorityName": "djangoldp-server-name",
"publicDirectory": false,
"endpoints": { "endpoints": {
"circles": "http://localhost:8000/circles/", "circles": "http://localhost:8000/circles/",
"projects": "http://localhost:8000/projects/", "projects": "http://localhost:8000/projects/",

View File

@ -1,24 +1,33 @@
script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8")
script(src="/scripts/index.js") script(src="/scripts/index.js")
//- local //- Scripts - use add `"libLocal" = true` on config.json to use your local `lib` folder
//- script(type="module" src="/lib/sib-router/src/index.js") if libLocal
//- script(type="module" src="/lib/sib-chat/sib-chat.js") script(type="module" src="/lib/sib-oidc/index.js")
//- script(type="module" src="/lib/sib-notifications/sib-notifications.js") script(type="module" src="/lib/sib-router/src/index.js")
//- script(type="module" src="/lib/sib-event/sib-event.js") script(type="module" src="/lib/sib-notifications/index.js")
//- script(type="module" src="/lib/sib-conversation/sib-conversation.js") if endpoints.users || (endpoints.get && endpoints.get.users)
//- script(type="module" src="/lib/sib-directory/sib-directory.js") script(type="module" src="/lib/sib-chat/sib-chat.js")
//- script(type="module" src="/lib/sib-job-board/sib-job-board.js") if endpoints.events || (endpoints.get && endpoints.get.events)
script(type="module" src="/lib/sib-event/sib-event.js")
//- CDN if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
script(type="module" src="https://unpkg.com/@startinblox/core@0.9") script(type="module" src="/lib/sib-job-board/sib-job-board.js")
script(type="module" src="https://unpkg.com/@startinblox/router@0.7") script(type="module" src="/lib/sib-conversation/sib-conversation.js")
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.4") if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.3") script(type="module" src="/lib/sib-directory/sib-directory.js")
script(type="module" src="https://unpkg.com/@startinblox/component-event@0.1") else
//- script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3") script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8")
//- script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3") script(type="module" src="https://unpkg.com/@startinblox/core@0.9")
//- script(type="module" src="https://unpkg.com/@startinblox/component-job-board@0.3") script(type="module" src="https://unpkg.com/@startinblox/router@0.7")
script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.3")
if endpoints.users || (endpoints.get && endpoints.get.users)
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.4")
if endpoints.events || (endpoints.get && endpoints.get.events)
script(type="module" src="https://unpkg.com/@startinblox/component-event@0.1")
if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
script(type="module" src="https://unpkg.com/@startinblox/component-job-board@0.3")
script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3")
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3")
//- Stylesheets //- Stylesheets
link(rel='stylesheet', href='/styles/index.css') link(rel='stylesheet', href='/styles/index.css')

View File

@ -22,7 +22,16 @@ details#user-controls.notLoggedIn
bind-user bind-user
) )
#user-controls__panel #user-controls__panel
include page-user-panel.pug nav(role="user's functionalities menu")
ul
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
li
sib-link(next='my-profile') My profile
//-li
sib-link(next='user-settings') Settings
li
sib-link(next='admin') Admin
button(role='log out' onclick="document.querySelector('sib-auth').logout();") Log out
button(role='log in' onclick="document.querySelector('sib-auth').login();") Login button(role='log in' onclick="document.querySelector('sib-auth').login();") Login

View File

@ -17,19 +17,13 @@ html(lang="en")
include menu-left.pug include menu-left.pug
div#viewport div#viewport
//- #members(hidden).no-sidebar if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
//- include page-members-directory.pug #members(hidden).no-sidebar
include page-directory.pug
//- #job-offers(hidden).no-sidebar if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
//- include page-job-offers.pug #job-offers(hidden).no-sidebar
include page-job-offers.pug
//- #job-offer-create(hidden).no-sidebar
//- sib-link(class="backlink", next="job-offers") Back
//- include page-job-offer-create.pug
//- #job-offer-edit(hidden).no-sidebar
//- sib-link(class="backlink", next="job-offers") Back
//- include page-job-offer-edit.pug
if endpoints.projects || (endpoints.get && endpoints.get.projects) if endpoints.projects || (endpoints.get && endpoints.get.projects)
#project(hidden).with-sidebar #project(hidden).with-sidebar
@ -49,6 +43,3 @@ html(lang="en")
#admin(hidden).with-sidebar #admin(hidden).with-sidebar
include page-admin.pug include page-admin.pug
//- #my-profile(hidden).no-sidebar
//- include page-user-profile.pug

View File

@ -7,18 +7,40 @@ sib-widget(name='hd-create')
p.create You are not part of any ${value} yet. To create a new one, you can go to the p.create You are not part of any ${value} yet. To create a new one, you can go to the
sib-link(next='admin') administration panel sib-link(next='admin') administration panel
sib-widget(name='menu-fix-url-circle')
template
sib-display(
data-src='${value}'
fields='name, badge'
value-badge='${value}'
widget-badge='hd-counter'
widget-name='sib-display-div'
)
sib-widget(name='menu-fix-url-project')
template
sib-display(
data-src='${value}'
fields='project(customer.name, name), badge'
class-name='project-name'
class-customer.name='project-customer'
value-badge='${value}'
widget-badge='hd-counter'
widget-name='sib-display-div'
)
nav#main__menu.jsLeftMenu nav#main__menu.jsLeftMenu
sib-router#navbar-router(default-route='members') sib-router#navbar-router(default-route='members')
//- sib-route.menu(name='members') if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
//- div.menu-label Members sib-route.menu(name='members')
//- div.menu-icon.icon-people div.menu-label Members
//- div.divider div.menu-icon.icon-people
//- sib-route.menu(name='job-offers', rdf-type='hd:joboffer') div.divider
//- div.menu-label Job offers if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
//- div.menu-icon.icon-briefcase sib-route.menu(name='job-offers', rdf-type='hd:joboffer')
//- sib-route(name='job-offer-create', hidden) div.menu-label Job offers
//- sib-route(name='job-offer-edit', use-id, hidden) div.menu-icon.icon-briefcase
//- div.divider div.divider
if endpoints.events || (endpoints.get && endpoints.get.events) if endpoints.events || (endpoints.get && endpoints.get.events)
sib-route.menu(name='events') sib-route.menu(name='events')
div.menu-label Events div.menu-label Events
@ -35,20 +57,13 @@ nav#main__menu.jsLeftMenu
sib-route(name='project', rdf-type='hd:project', use-id='', hidden) sib-route(name='project', rdf-type='hd:project', use-id='', hidden)
div.sub-menu.menu-notification div.sub-menu.menu-notification
sib-display.project-tab( sib-display.project-tab(
data-src=`${endpoints.projects || (endpoints.get && endpoints.get.projects)}` bind-user
fields='project(customer.name, name), badge' nested-field='projects'
class-customer.name='project-customer' fields='project'
class-name='project-name'
empty-widget='hd-create' empty-widget='hd-create'
empty-value='project' empty-value='project'
search-fields='team' widget-project='menu-fix-url-project'
search-widget-team='sib-form-hidden' order-by='project.customer.name'
search-value-team='-'
hd-inherit-user-id='search-value-team'
hd-inherit-widgets
widget-badge='hd-counter'
action-badge='badge'
order-by='customer.name'
next='project' next='project'
) )
div.divider div.divider
@ -62,22 +77,13 @@ nav#main__menu.jsLeftMenu
div.menu-icon.icon-folder-alt div.menu-icon.icon-folder-alt
sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden) sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden)
div.sub-menu.menu-notification div.sub-menu.menu-notification
sib-widget(name='menu-circle-fix-url')
template
sib-display(
data-src='${value}'
fields='name, badge'
value-badge='${value}'
widget-badge='hd-counter'
widget-name='sib-display-div'
)
sib-display( sib-display(
bind-user bind-user
nested-field='circles' nested-field='circles'
fields='circle' fields='circle'
empty-widget='hd-create' empty-widget='hd-create'
empty-value='circle' empty-value='circle'
widget-circle='menu-circle-fix-url' widget-circle='menu-fix-url-circle'
order-by='circle.name' order-by='circle.name'
next='circle' next='circle'
) )

View File

@ -1,20 +1,22 @@
.views-container.sidebar-is-closed .views-container.sidebar-is-closed
if endpoints.circles || (endpoints.get && endpoints.get.circles) if endpoints.circles || (endpoints.get && endpoints.get.circles)
#admin-circles(hidden) #admin-circles(hidden)
include page-admin-circles.pug include views/admin/page-admin-circles.pug
if endpoints.projects || (endpoints.get && endpoints.get.projects) if endpoints.projects || (endpoints.get && endpoints.get.projects)
#admin-projects(hidden) #admin-projects(hidden)
include page-admin-projects.pug include views/admin/page-admin-projects.pug
//- #admin-users(hidden) if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
include page-admin-users.pug #admin-users(hidden)
include views/admin/page-admin-users.pug
nav.jsRightMenu(role='navigation') nav.jsRightMenu(role='navigation')
sib-router(default-route='admin-circles') sib-router(default-route='admin-circles')
ul ul
li.jsOffsiteToggle li.jsOffsiteToggle
a Fold menu a Fold menu
//- sib-route(name='admin-users') if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
li sib-route(name='admin-users')
a Users li
a Users
if endpoints.circles || (endpoints.get && endpoints.get.circles) if endpoints.circles || (endpoints.get && endpoints.get.circles)
sib-route(name='admin-circles') sib-route(name='admin-circles')
li li

View File

@ -13,9 +13,9 @@
div.content-box__info div.content-box__info
sib-ac-checker(permission='acl:Read', bind-resources) sib-ac-checker(permission='acl:Read', bind-resources)
#circle-chat(hidden) #circle-chat(hidden)
include page-circle-chat.pug include views/circle/page-circle-chat.pug
#circle-information(hidden) #circle-information(hidden)
include page-circle-profile.pug include views/circle/page-circle-profile.pug
nav.jsRightMenu(role='navigation') nav.jsRightMenu(role='navigation')
sib-router(default-route='circle-chat') sib-router(default-route='circle-chat')

View File

@ -3,4 +3,3 @@ sib-directory(
range-groups=`${endpoints.groups || endpoints.get.groups}`, range-groups=`${endpoints.groups || endpoints.get.groups}`,
range-skills=`${endpoints.skills || endpoints.get.skills}` range-skills=`${endpoints.skills || endpoints.get.skills}`
) )

View File

@ -1,10 +1,25 @@
.job-offers__container .content-box.full-width
sib-job-board( #job-offer-board
data-src=`${endpoints.joboffers || endpoints.get.joboffers}`, .job-offers__container
range-skills=`${endpoints.skills || endpoints.get.skills}` sib-job-board(
) data-src=`${endpoints.joboffers || endpoints.get.joboffers}`,
range-skills=`${endpoints.skills || endpoints.get.skills}`
)
div.job-offers__newoffer div.job-offers__newoffer
sib-link(next="job-offer-create").plus-button sib-link(next="job-offer-create").plus-button
div.icon-plus div.icon-plus
div Post a new offer div Post a new offer
#job-offer-create(hidden)
sib-link(class="backlink", next="job-offers") Back
include views/job-offer/page-job-offer-create.pug
#job-offer-edit(hidden)
sib-link(class="backlink", next="job-offers") Back
include views/job-offer/page-job-offer-edit.pug
sib-router(default-route='job-offer-board')
sib-route(name='job-offer-board')
sib-route(name='job-offer-create')
sib-route(name='job-offer-edit')

View File

@ -19,9 +19,9 @@
div.content-box__info div.content-box__info
sib-ac-checker(permission='acl:Read', bind-resources) sib-ac-checker(permission='acl:Read', bind-resources)
#project-chat(hidden) #project-chat(hidden)
include page-project-chat.pug include views/project/page-project-chat.pug
#project-information(hidden) #project-information(hidden)
include page-project-profile.pug include views/project/page-project-profile.pug
dialog(id='project-contributions-help').modal dialog(id='project-contributions-help').modal
sib-link(next='project-profile') sib-link(next='project-profile')

View File

@ -1,9 +0,0 @@
nav(role="user's functionalities menu")
ul
//- li
//- sib-link(next='my-profile') My profile
//-li
sib-link(next='user-settings') Settings
li
sib-link(next='admin') Admin
button(role='log out' onclick="document.querySelector('sib-auth').logout();") Log out

View File

@ -145,7 +145,8 @@
>div { >div {
color: $color-244-10-70; color: $color-244-10-70;
cursor: pointer; cursor: pointer;
>menu-circle-fix-url>sib-display>div { >menu-fix-url-circle>sib-display>div,
>menu-fix-url-project>sib-display>div {
padding: 1rem 1rem 1rem 3.2rem; padding: 1rem 1rem 1rem 3.2rem;
} }
} }
@ -156,7 +157,8 @@
} }
&>sib-display[active]>div, &>sib-display[active]>div,
&>sib-display>div>menu-circle-fix-url>sib-display[active]>div { &>sib-display>div>menu-fix-url-circle>sib-display[active]>div,
&>sib-display>div>menu-fix-url-project>sib-display[active]>div {
background-color: $color-46-100-67; background-color: $color-46-100-67;
color: $color-233-18-29; color: $color-233-18-29;
font-weight: bold; font-weight: bold;
@ -164,11 +166,13 @@
} }
&.menu-notification { &.menu-notification {
> sib-display > div > sib-display > div > menu-circle-fix-url { > sib-display > div > sib-display > div > menu-fix-url-circle,
> sib-display > div > sib-display > div > menu-fix-url-project {
flex: 1; flex: 1;
} }
> sib-display > div > sib-display > div, > sib-display > div > sib-display > div,
> sib-display > div > sib-display > div > menu-circle-fix-url > sib-display > div { > sib-display > div > sib-display > div > menu-fix-url-circle > sib-display > div,
> sib-display > div > sib-display > div > menu-fix-url-project > sib-display > div {
display: flex; display: flex;
sib-display-div { sib-display-div {
flex: 3; flex: 3;

View File

@ -1 +1 @@
@import 'events'; @import 'events.scss';

View File

@ -1,7 +1,3 @@
$color-203-87-19: hsl(203, 87.8%, 19.2%);
$color-357-67-45: hsl(357,67.5%,45.9%);
$color-212-4-50: hsl(212.7,4.3%,50%);
$color-0-0-22: hsl(0,0%,22.7%);
#events { #events {
width: 100%; width: 100%;
font-family: "Facit"; font-family: "Facit";

View File

@ -9,12 +9,11 @@
#circle-left(hidden) #circle-left(hidden)
include page-circle-left.pug include ../circle/page-circle-left.pug
#admin-circle-list(hidden) #admin-circle-list(hidden)
include ../../templates/hd-user-avatar.pug
include templates/hd-user-avatar.pug
sib-widget(name='circle-owner') sib-widget(name='circle-owner')
template template

View File

@ -8,10 +8,10 @@
h1.title-left.without-margin Administration h1.title-left.without-margin Administration
#project-left(hidden) #project-left(hidden)
include page-project-left.pug include ../project/page-project-left.pug
#admin-project-list(hidden) #admin-project-list(hidden)
include templates/hd-user-avatar.pug include ../../templates/hd-user-avatar.pug
div.content-box__info div.content-box__info
div.admin-header div.admin-header

View File

@ -1,6 +1,6 @@
div.content-box__info div.content-box__info
include templates/hd-user-avatar.pug include ../../templates/hd-user-avatar.pug
sib-widget(name='hd-user-groups') sib-widget(name='hd-user-groups')
template ${await value.name} template ${await value.name}

View File

@ -3,7 +3,7 @@ sib-router(default-route='circle-profile', hidden)
sib-route(name='circle-edit') sib-route(name='circle-edit')
#circle-profile(hidden) #circle-profile(hidden)
include templates/hd-circle-team.pug include ../../templates/hd-circle-team.pug
.content-box__info .content-box__info
.space-between .space-between

View File

@ -1,6 +1,6 @@
div.content-box__info div.content-box__info
include templates/hd-user-avatar.pug include ../../templates/hd-user-avatar.pug
sib-widget(name='hd-fieldset-title') sib-widget(name='hd-fieldset-title')
template template

View File

@ -3,11 +3,11 @@ sib-router(default-route='project-profile', hidden)
sib-route(name='project-edit') sib-route(name='project-edit')
#project-profile(hidden) #project-profile(hidden)
include templates/hd-business-provider.pug include ../../templates/hd-business-provider.pug
include templates/hd-captain.pug include ../../templates/hd-captain.pug
include templates/hd-circle-team.pug include ../../templates/hd-circle-team.pug
include templates/hd-customer.pug include ../../templates/hd-customer.pug
include templates/hd-project-team.pug include ../../templates/hd-project-team.pug
.content-box__info .content-box__info