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",
"clientCSS": "/path/to/custom.css",
"authorityName": "djangoldp-server-name",
"publicDirectory": false,
"endpoints": {
"get": {
"circles": "http://localhost:8000/circles/",

View File

@ -6,6 +6,7 @@
"clientLogoHeight": "32px",
"clientCSS": "/path/to/custom.css",
"authorityName": "djangoldp-server-name",
"publicDirectory": false,
"endpoints": {
"circles": "http://localhost:8000/circles/",
"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")
//- local
//- script(type="module" src="/lib/sib-router/src/index.js")
//- script(type="module" src="/lib/sib-chat/sib-chat.js")
//- script(type="module" src="/lib/sib-notifications/sib-notifications.js")
//- script(type="module" src="/lib/sib-event/sib-event.js")
//- script(type="module" src="/lib/sib-conversation/sib-conversation.js")
//- script(type="module" src="/lib/sib-directory/sib-directory.js")
//- script(type="module" src="/lib/sib-job-board/sib-job-board.js")
//- CDN
//- Scripts - use add `"libLocal" = true` on config.json to use your local `lib` folder
if libLocal
script(type="module" src="/lib/sib-oidc/index.js")
script(type="module" src="/lib/sib-router/src/index.js")
script(type="module" src="/lib/sib-notifications/index.js")
if endpoints.users || (endpoints.get && endpoints.get.users)
script(type="module" src="/lib/sib-chat/sib-chat.js")
if endpoints.events || (endpoints.get && endpoints.get.events)
script(type="module" src="/lib/sib-event/sib-event.js")
if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
script(type="module" src="/lib/sib-job-board/sib-job-board.js")
script(type="module" src="/lib/sib-conversation/sib-conversation.js")
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
script(type="module" src="/lib/sib-directory/sib-directory.js")
else
script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8")
script(type="module" src="https://unpkg.com/@startinblox/core@0.9")
script(type="module" src="https://unpkg.com/@startinblox/router@0.7")
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.4")
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")
//- script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3")
//- script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3")
//- script(type="module" src="https://unpkg.com/@startinblox/component-job-board@0.3")
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
link(rel='stylesheet', href='/styles/index.css')

View File

@ -22,7 +22,16 @@ details#user-controls.notLoggedIn
bind-user
)
#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

View File

@ -17,19 +17,13 @@ html(lang="en")
include menu-left.pug
div#viewport
//- #members(hidden).no-sidebar
//- include page-members-directory.pug
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
#members(hidden).no-sidebar
include page-directory.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.joboffers || (endpoints.get && endpoints.get.joboffers)
#job-offers(hidden).no-sidebar
include page-job-offers.pug
if endpoints.projects || (endpoints.get && endpoints.get.projects)
#project(hidden).with-sidebar
@ -49,6 +43,3 @@ html(lang="en")
#admin(hidden).with-sidebar
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
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
sib-router#navbar-router(default-route='members')
//- sib-route.menu(name='members')
//- div.menu-label Members
//- div.menu-icon.icon-people
//- div.divider
//- sib-route.menu(name='job-offers', rdf-type='hd:joboffer')
//- div.menu-label Job offers
//- div.menu-icon.icon-briefcase
//- sib-route(name='job-offer-create', hidden)
//- sib-route(name='job-offer-edit', use-id, hidden)
//- div.divider
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
sib-route.menu(name='members')
div.menu-label Members
div.menu-icon.icon-people
div.divider
if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
sib-route.menu(name='job-offers', rdf-type='hd:joboffer')
div.menu-label Job offers
div.menu-icon.icon-briefcase
div.divider
if endpoints.events || (endpoints.get && endpoints.get.events)
sib-route.menu(name='events')
div.menu-label Events
@ -35,20 +57,13 @@ nav#main__menu.jsLeftMenu
sib-route(name='project', rdf-type='hd:project', use-id='', hidden)
div.sub-menu.menu-notification
sib-display.project-tab(
data-src=`${endpoints.projects || (endpoints.get && endpoints.get.projects)}`
fields='project(customer.name, name), badge'
class-customer.name='project-customer'
class-name='project-name'
bind-user
nested-field='projects'
fields='project'
empty-widget='hd-create'
empty-value='project'
search-fields='team'
search-widget-team='sib-form-hidden'
search-value-team='-'
hd-inherit-user-id='search-value-team'
hd-inherit-widgets
widget-badge='hd-counter'
action-badge='badge'
order-by='customer.name'
widget-project='menu-fix-url-project'
order-by='project.customer.name'
next='project'
)
div.divider
@ -62,22 +77,13 @@ nav#main__menu.jsLeftMenu
div.menu-icon.icon-folder-alt
sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden)
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(
bind-user
nested-field='circles'
fields='circle'
empty-widget='hd-create'
empty-value='circle'
widget-circle='menu-circle-fix-url'
widget-circle='menu-fix-url-circle'
order-by='circle.name'
next='circle'
)

View File

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

View File

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

View File

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

View File

@ -1,3 +1,5 @@
.content-box.full-width
#job-offer-board
.job-offers__container
sib-job-board(
data-src=`${endpoints.joboffers || endpoints.get.joboffers}`,
@ -8,3 +10,16 @@
sib-link(next="job-offer-create").plus-button
div.icon-plus
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
sib-ac-checker(permission='acl:Read', bind-resources)
#project-chat(hidden)
include page-project-chat.pug
include views/project/page-project-chat.pug
#project-information(hidden)
include page-project-profile.pug
include views/project/page-project-profile.pug
dialog(id='project-contributions-help').modal
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 {
color: $color-244-10-70;
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;
}
}
@ -156,7 +157,8 @@
}
&>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;
color: $color-233-18-29;
font-weight: bold;
@ -164,11 +166,13 @@
}
&.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;
}
> 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;
sib-display-div {
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 {
width: 100%;
font-family: "Facit";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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