From 9b9012f9a38626d82427f2e6703f47e8574245bc Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Thu, 2 Apr 2020 17:34:56 +0200 Subject: [PATCH 1/5] update: test to display the size and the content in the same element --- src/dependencies.pug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index 2bc5473..2e7f26f 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -14,7 +14,7 @@ if libLocal 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") - if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) + if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") else script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8") @@ -30,7 +30,7 @@ else 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") - if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) + if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1") //- Stylesheets From 43d17d7b1c9ae00ad9cba1e7c2c9b9d2120565a8 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Thu, 2 Apr 2020 17:39:25 +0200 Subject: [PATCH 2/5] update: test in dependencies --- src/dependencies.pug | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/dependencies.pug b/src/dependencies.pug index 2e7f26f..76ab35d 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -14,7 +14,11 @@ if libLocal 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") +<<<<<<< HEAD if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) +======= + if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) +>>>>>>> 7e58f36... update: test in dependencies script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") else script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8") @@ -30,8 +34,57 @@ else 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") +<<<<<<< HEAD if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1") +======= + if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) + script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1") + + + + + +//- script(src="/scripts/index.js") + +//- 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-notifications@0.3") + if endpoints.users || (endpoints.get && endpoints.get.users) + script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.5") + 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") + + script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") + + + + + + +>>>>>>> 7e58f36... update: test in dependencies //- Stylesheets link(rel='stylesheet', href='/styles/index.css') From 55c8b2019c0deedb109edcad3f989a43f52ae085 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Mon, 13 Apr 2020 10:41:04 +0200 Subject: [PATCH 3/5] update: wip on the 'Leave button' --- src/dependencies.pug | 62 +++++++++++----------- src/styles/layout/circle/circle-admin.scss | 32 +++++++++++ src/views/admin/page-admin-circles.pug | 2 +- 3 files changed, 64 insertions(+), 32 deletions(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index 76ab35d..9efccab 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -1,7 +1,7 @@ script(src="/scripts/index.js") //- Scripts - use add `"libLocal" = true` on config.json to use your local `lib` folder -if libLocal +//-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") @@ -20,7 +20,7 @@ if libLocal if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) >>>>>>> 7e58f36... update: test in dependencies script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") -else +//-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") @@ -48,36 +48,36 @@ else //- script(src="/scripts/index.js") //- 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-notifications@0.3") - if endpoints.users || (endpoints.get && endpoints.get.users) - script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.5") - 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") - script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") +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-notifications@0.3") + if endpoints.users || (endpoints.get && endpoints.get.users) + script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.5") + 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") + +script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") diff --git a/src/styles/layout/circle/circle-admin.scss b/src/styles/layout/circle/circle-admin.scss index d3241dc..79dd808 100644 --- a/src/styles/layout/circle/circle-admin.scss +++ b/src/styles/layout/circle/circle-admin.scss @@ -6,4 +6,36 @@ .admin-header__title { @extend h3; } +} + +#admin-circle-list { + + /* Allow click on the sib-delete instead of only on the button */ + sib-delete { + background: none; + border: none; + position: relative; + background: purple; + border: purple; + width: 122px; + height: 17px; + } + + .patate>button { + display: inline-block; + background: none; + border: none; + position: absolute; + z-index: 1000; + left: 0; + color: white; + width: 100%; + text-align: center; + } +} + +sib-delete::before{ + position: absolute; + z-index: 900; + left: 1rem; } \ No newline at end of file diff --git a/src/views/admin/page-admin-circles.pug b/src/views/admin/page-admin-circles.pug index c4428bd..dfd2c34 100644 --- a/src/views/admin/page-admin-circles.pug +++ b/src/views/admin/page-admin-circles.pug @@ -46,7 +46,7 @@ sib-widget(name='admin-circle-leave-button') template sib-delete( - class='button text-bold text-uppercase reversed button-dark bordered with-icon icon-close' + class='button text-bold text-uppercase reversed button-dark bordered with-icon icon-close patate' data-src="${src}" data-label='Leave circle' ) From 546ce765f54ec0e5c723e9f277dd1967d9e98554 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 15 Apr 2020 15:21:02 +0200 Subject: [PATCH 4/5] update: new endpoint added --- config.sample.federated.json | 8 +++++ config.sample.json | 4 +++ src/dependencies.pug | 61 +++--------------------------------- src/index.pug | 2 +- src/menu-left.pug | 2 +- src/page-dashboard.pug | 2 +- 6 files changed, 19 insertions(+), 60 deletions(-) diff --git a/config.sample.federated.json b/config.sample.federated.json index 57aa616..f37a338 100644 --- a/config.sample.federated.json +++ b/config.sample.federated.json @@ -9,18 +9,26 @@ "publicDirectory": false, "endpoints": { "get": { + "dashboards": "http://localhost:8000/dashboards/", + "groups": "http://localhost:8000/groups/", "circles": "http://localhost:8000/circles/", "projects": "http://localhost:8000/projects/", "customers": "http://localhost:8000/customers/", + "businessproviders": "http://localhost:8000/sources/businessproviders/", + "skills": "http://localhost:8000/sources/skills/", "events": "http://localhost:8000/events/", "typeevents": "http://localhost:8000/typeevents/", "users": "http://localhost:8000/users/", "uploads": "http://localhost:8000/upload/" }, "post": { + "dashboards": "http://localhost:8000/dashboards/", + "groups": "http://localhost:8000/groups/", "circles": "http://localhost:8000/circles/", "projects": "http://localhost:8000/projects/", "customers": "http://localhost:8000/customers/", + "businessproviders": "http://localhost:8000/sources/businessproviders/", + "skills": "http://localhost:8000/sources/skills/", "events": "http://localhost:8000/events/", "typeevents": "http://localhost:8000/typeevents/", "users": "http://localhost:8000/users/", diff --git a/config.sample.json b/config.sample.json index 1741c1c..61a14c9 100644 --- a/config.sample.json +++ b/config.sample.json @@ -8,9 +8,13 @@ "authorityName": "djangoldp-server-name", "publicDirectory": false, "endpoints": { + "dashboards": "http://localhost:8000/dashboards/", + "groups": "http://localhost:8000/groups/", "circles": "http://localhost:8000/circles/", "projects": "http://localhost:8000/projects/", "customers": "http://localhost:8000/customers/", + "businessproviders": "http://localhost:8000/sources/businessproviders/", + "skills": "http://localhost:8000/sources/skills/", "events": "http://localhost:8000/events/", "typeevents": "http://localhost:8000/typeevents/", "users": "http://localhost:8000/users/", diff --git a/src/dependencies.pug b/src/dependencies.pug index 9efccab..2e7f26f 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -1,54 +1,6 @@ script(src="/scripts/index.js") //- 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") -<<<<<<< HEAD - if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) -======= - if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) ->>>>>>> 7e58f36... update: test in dependencies - script(type="module" src="/lib/sib-dashboard/sib-dashboard.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-notifications@0.3") - if endpoints.users || (endpoints.get && endpoints.get.users) - script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.5") - 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") -<<<<<<< HEAD - if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) - script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1") -======= - if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) - script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1") - - - - - -//- script(src="/scripts/index.js") - -//- 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") @@ -62,6 +14,8 @@ if libLocal 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") + if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) + script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") else script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8") script(type="module" src="https://unpkg.com/@startinblox/core@0.9") @@ -76,15 +30,8 @@ else 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") - -script(type="module" src="/lib/sib-dashboard/sib-dashboard.js") - - - - - - ->>>>>>> 7e58f36... update: test in dependencies + if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) + script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1") //- Stylesheets link(rel='stylesheet', href='/styles/index.css') diff --git a/src/index.pug b/src/index.pug index 2ffceea..a6fd51f 100644 --- a/src/index.pug +++ b/src/index.pug @@ -18,7 +18,7 @@ html(lang="en") include menu-left.pug div#viewport - if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) + if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) #dashboard(hidden).no-sidebar include page-dashboard.pug diff --git a/src/menu-left.pug b/src/menu-left.pug index b3e9a36..b5ffa8c 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -31,7 +31,7 @@ sib-widget(name='menu-fix-url-project') nav#main__menu.jsLeftMenu sib-router#navbar-router(default-route='dashboard') - if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard) + if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) sib-route.menu(name='dashboard') div.menu-label Dashboard div.menu-icon.icon-dashboard diff --git a/src/page-dashboard.pug b/src/page-dashboard.pug index 2c6e8ea..15444c2 100644 --- a/src/page-dashboard.pug +++ b/src/page-dashboard.pug @@ -1,5 +1,5 @@ .views-container h2 Dashboard sib-dashboard( - data-src=`${endpoints.dashboard || endpoints.get.dashboard}` + data-src=`${endpoints.dashboards || endpoints.get.dashboards}` ) From 896bd2dc6cae61a4e18e24ee2780934acfe72f03 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 15 Apr 2020 15:52:30 +0200 Subject: [PATCH 5/5] update: some CSS added --- src/styles/index.scss | 1 + src/styles/layout/circle/circle-admin.scss | 32 ---------------------- src/styles/layout/dashboard/_index.scss | 1 + src/styles/layout/dashboard/dashboard.scss | 3 ++ src/views/admin/page-admin-circles.pug | 2 +- 5 files changed, 6 insertions(+), 33 deletions(-) create mode 100644 src/styles/layout/dashboard/_index.scss create mode 100644 src/styles/layout/dashboard/dashboard.scss diff --git a/src/styles/index.scss b/src/styles/index.scss index b2b17ba..6b3f166 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -22,4 +22,5 @@ div#viewport { @import 'layout/circle/index'; @import 'layout/user/index'; @import 'layout/events/index'; + @import 'layout/dashboard/index'; } \ No newline at end of file diff --git a/src/styles/layout/circle/circle-admin.scss b/src/styles/layout/circle/circle-admin.scss index 79dd808..d3241dc 100644 --- a/src/styles/layout/circle/circle-admin.scss +++ b/src/styles/layout/circle/circle-admin.scss @@ -6,36 +6,4 @@ .admin-header__title { @extend h3; } -} - -#admin-circle-list { - - /* Allow click on the sib-delete instead of only on the button */ - sib-delete { - background: none; - border: none; - position: relative; - background: purple; - border: purple; - width: 122px; - height: 17px; - } - - .patate>button { - display: inline-block; - background: none; - border: none; - position: absolute; - z-index: 1000; - left: 0; - color: white; - width: 100%; - text-align: center; - } -} - -sib-delete::before{ - position: absolute; - z-index: 900; - left: 1rem; } \ No newline at end of file diff --git a/src/styles/layout/dashboard/_index.scss b/src/styles/layout/dashboard/_index.scss new file mode 100644 index 0000000..686996f --- /dev/null +++ b/src/styles/layout/dashboard/_index.scss @@ -0,0 +1 @@ +@import 'dashboard.scss'; \ No newline at end of file diff --git a/src/styles/layout/dashboard/dashboard.scss b/src/styles/layout/dashboard/dashboard.scss new file mode 100644 index 0000000..f3ffc7a --- /dev/null +++ b/src/styles/layout/dashboard/dashboard.scss @@ -0,0 +1,3 @@ +.dashboard>div { + margin: 0 2px; +} diff --git a/src/views/admin/page-admin-circles.pug b/src/views/admin/page-admin-circles.pug index dfd2c34..c4428bd 100644 --- a/src/views/admin/page-admin-circles.pug +++ b/src/views/admin/page-admin-circles.pug @@ -46,7 +46,7 @@ sib-widget(name='admin-circle-leave-button') template sib-delete( - class='button text-bold text-uppercase reversed button-dark bordered with-icon icon-close patate' + class='button text-bold text-uppercase reversed button-dark bordered with-icon icon-close' data-src="${src}" data-label='Leave circle' )