Merge branch 'master' into dpo/switch-to-skypack
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { store, Sib, StoreMixin } from 'https://cdn.skypack.dev/@startinblox/core@0.13';
|
||||
import { store, Sib, StoreMixin } from 'https://cdn.skypack.dev/@startinblox/core@0.14';
|
||||
|
||||
export const HublReactivity = {
|
||||
name: 'hubl-reactivity',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { widgetFactory } from 'https://cdn.skypack.dev/@startinblox/core@0.13';
|
||||
import { widgetFactory } from 'https://cdn.skypack.dev/@startinblox/core@0.14';
|
||||
|
||||
const HublSearchUsers = widgetFactory(
|
||||
'hubl-search-users',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { widgetFactory, Helpers } from 'https://cdn.skypack.dev/@startinblox/core@0.13';
|
||||
import { widgetFactory, Helpers } from 'https://cdn.skypack.dev/@startinblox/core@0.14';
|
||||
import SlimSelect from 'https://cdn.skypack.dev/slim-select@1.23';
|
||||
|
||||
const HublStatus = widgetFactory(
|
||||
|
10
src/context.pug
Normal file
10
src/context.pug
Normal file
@ -0,0 +1,10 @@
|
||||
//- Context - Fix for default context
|
||||
script(data-default-context, type="application/ld+json")
|
||||
| {
|
||||
| "inbox": "http://happy-dev.fr/owl/#inbox",
|
||||
| "object": "http://happy-dev.fr/owl/#object",
|
||||
| "author": "http://happy-dev.fr/owl/#author",
|
||||
| "account": "http://happy-dev.fr/owl/#account",
|
||||
| "jabberID": "foaf:jabberID",
|
||||
| "picture": "foaf:depiction"
|
||||
| }
|
@ -1,70 +1,40 @@
|
||||
//- script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer)
|
||||
//- script(type="module" src="/components/sentry.js" defer)
|
||||
script(type="module" src="/components/hubl-search-users.js" defer)
|
||||
script(type="module" src="/components/hubl-status.js" defer)
|
||||
script(type="module" src="/components/hubl-reactivity.js" defer)
|
||||
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/core@0.13" defer)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/core@0.14" defer)
|
||||
//- script(type="module" src="/lib/sib-core/dist/index.js" defer)
|
||||
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/oidc@0.11" defer)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/oidc@0.12" defer)
|
||||
//- script(type="module" src="/lib/sib-auth/index.js" defer)
|
||||
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/router@0.11" defer)
|
||||
//- script(type="module" src="/lib/sib-router/src/index.js" defer)
|
||||
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-notifications@0.8" defer)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-notifications@0.9" defer)
|
||||
//- script(type="module" src="/lib/sib-notifications/index.js" defer)
|
||||
|
||||
if (endpoints.events || (endpoints.get && endpoints.get.events)) && (endpoints.typeevents || (endpoints.get && endpoints.get.typeevents))
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-event@1.3" defer)
|
||||
//- script(type="module" src="/lib/sib-event-component/sib-event.js" defer)
|
||||
if endpoints.get
|
||||
if endpoints.get.events && endpoints.get.typeevents
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-event@1.3" defer)
|
||||
//- script(type="module" src="/lib/sib-event-component/sib-event.js" defer)
|
||||
|
||||
if endpoints.polls || (endpoints.get && endpoints.get.polls)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-conversation@0.6" defer)
|
||||
//- script(type="module" src="/lib/sib-conversation/sib-conversation.js" defer)
|
||||
if endpoints.get.resources && endpoints.get.resourceskeywords && endpoints.get.resourcestypes
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-resource@1.1" defer)
|
||||
//- script(type="module" src="/lib/sib-resource/sib-resource.js" defer)
|
||||
|
||||
if (endpoints.resources || (endpoints.get && endpoints.get.resources)) && (endpoints.resourceskeywords || (endpoints.get && endpoints.get.resourceskeywords)) && (endpoints.resourcestypes || (endpoints.get && endpoints.get.resourcestypes))
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-resource@1.1" defer)
|
||||
//- script(type="module" src="/lib/sib-resource/sib-resource.js" defer)
|
||||
if endpoints.get.joboffers
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-job-board@1.3" defer)
|
||||
//- script(type="module" src="/lib/solid-job-board/dist/index.js" defer)
|
||||
|
||||
if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-job-board@1.2" defer)
|
||||
//- script(type="module" src="/lib/solid-job-board/dist/index.js" defer)
|
||||
if endpoints.get.uploads && endpoints.get.skills && endpoints.get.users
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-directory@1.3" defer)
|
||||
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer)
|
||||
|
||||
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-directory@1.2" defer)
|
||||
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer)
|
||||
if endpoints.get.dashboards
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-dashboard@0.7" defer)
|
||||
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
|
||||
|
||||
if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-dashboard@0.6" defer)
|
||||
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
|
||||
if endpoints.get.users
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@1.7" defer)
|
||||
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
|
||||
|
||||
if endpoints.users || (endpoints.get && endpoints.get.users)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@1.4" defer)
|
||||
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
|
||||
|
||||
if endpoints.polls || (endpoints.get && endpoints.get.polls)
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-poll@1.1" defer)
|
||||
//- script(type="module" src="/lib/sib-polls-component/index.js" defer)
|
||||
|
||||
//- swal2 does not work with skypack
|
||||
script(src="https://cdn.jsdelivr.net/npm/sweetalert2@10")
|
||||
|
||||
script(src="/scripts/index.js" defer)
|
||||
|
||||
//- Stylesheets
|
||||
link(rel='stylesheet', href='/styles/index.css')
|
||||
link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700&subset=latin-ext')
|
||||
link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i')
|
||||
|
||||
//- Context - Fix for LDFlex
|
||||
script(data-default-context, type="application/ld+json")
|
||||
| {
|
||||
| "inbox": "http://happy-dev.fr/owl/#inbox",
|
||||
| "object": "http://happy-dev.fr/owl/#object",
|
||||
| "author": "http://happy-dev.fr/owl/#author",
|
||||
| "account": "http://happy-dev.fr/owl/#account",
|
||||
| "jabberID": "foaf:jabberID",
|
||||
| "picture": "foaf:depiction"
|
||||
| }
|
||||
if endpoints.get.polls
|
||||
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-poll@1.1" defer)
|
||||
//- script(type="module" src="/lib/sib-polls-component/index.js" defer)
|
||||
|
@ -1,5 +0,0 @@
|
||||
-
|
||||
var __env = locals[process.env.ENV]
|
||||
for(k in __env){
|
||||
eval(`var ${k} = __env[${JSON.stringify(k)}]`);
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 78 KiB |
2
src/index.js
Normal file
2
src/index.js
Normal file
@ -0,0 +1,2 @@
|
||||
//- Automatically import every scripts
|
||||
import './scripts/**/*.js';
|
168
src/index.pug
168
src/index.pug
@ -1,107 +1,137 @@
|
||||
include get_config.pug
|
||||
doctype html
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset="UTF-8")
|
||||
|
||||
title #{clientName || "My Personal Hubl"}
|
||||
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
meta(http-equiv="X-UA-Compatible", content="ie=edge")
|
||||
|
||||
if clientFavicon
|
||||
link(rel="icon" type="image/png" href=`${clientFavicon}`)
|
||||
else
|
||||
link(rel="icon" type="image/webp" href="/images/favicon.webp")
|
||||
include dependencies.pug
|
||||
link(rel="icon" type="image/webp" href="./images/favicon.webp")
|
||||
|
||||
link(rel="preconnect" href="https://fonts.gstatic.com")
|
||||
link(rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap")
|
||||
|
||||
link(rel='stylesheet', href='/styles/index.scss')
|
||||
|
||||
if clientCSS
|
||||
link(rel='stylesheet', href=`${clientCSS}`)
|
||||
|
||||
link(rel="manifest" href="/manifest.webmanifest")
|
||||
|
||||
script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer)
|
||||
|
||||
script(type="module" src="/components/sentry.js" defer)
|
||||
script(type="module" src="/components/hubl-search-users.js" defer)
|
||||
script(type="module" src="/components/hubl-status.js" defer)
|
||||
script(type="module" src="/components/hubl-reactivity.js" defer)
|
||||
|
||||
include dependencies.pug
|
||||
include context.pug
|
||||
|
||||
//- swal2 does not work with skypack
|
||||
script(src="https://cdn.jsdelivr.net/npm/sweetalert2@10" defer)
|
||||
|
||||
script(src="index.js" defer)
|
||||
|
||||
body
|
||||
if endpoints.get && endpoints.post
|
||||
|
||||
.wrapper
|
||||
include views/partials/notifications.pug
|
||||
include views/partials/widgets.pug
|
||||
|
||||
header#header.header.is-spaced(role='banner')
|
||||
include header.pug
|
||||
.wrapper
|
||||
|
||||
nav#main__menu.left-menu.jsLeftMenu
|
||||
include menu-left.pug
|
||||
header#header.header.is-spaced(role='banner')
|
||||
include views/partials/header.pug
|
||||
|
||||
main#viewport.content.notLoggedIn
|
||||
nav#main__menu.left-menu.jsLeftMenu
|
||||
include views/partials/menu-left.pug
|
||||
|
||||
if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
|
||||
#dashboard(hidden, data-view="dashboard").no-sidebar.with-padding
|
||||
include page-dashboard.pug
|
||||
main#viewport.content.notLoggedIn
|
||||
|
||||
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
|
||||
#members(hidden, data-view="members", no-render).no-sidebar.with-padding
|
||||
include page-directory.pug
|
||||
if endpoints.get.dashboards
|
||||
#dashboard(hidden, data-view="dashboard").no-sidebar.with-padding
|
||||
include views/page-dashboard.pug
|
||||
|
||||
if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
|
||||
#job-offers(hidden, data-view="job-offers", no-render).no-sidebar.with-padding
|
||||
if (endpoints.post && endpoints.post.joboffers) && (endpoints.get && endpoints.get.joboffers)
|
||||
if publicDirectory && endpoints.get.users
|
||||
#members(hidden, data-view="members", no-render).no-sidebar.with-padding
|
||||
include views/page-directory.pug
|
||||
|
||||
if endpoints.get.joboffers
|
||||
#job-offers(hidden, data-view="job-offers", no-render).no-sidebar.with-padding
|
||||
hubl-reactivity(data-src=`${endpoints.post.joboffers}current/` target-src=`${endpoints.get.joboffers}`)
|
||||
hubl-reactivity(data-src=`${endpoints.post.joboffers}expired/` target-src=`${endpoints.get.joboffers}`)
|
||||
hubl-reactivity(data-src=`${endpoints.post.joboffers}` target-src=`${endpoints.get.joboffers}`)
|
||||
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}current/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
|
||||
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}current/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
|
||||
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
|
||||
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
|
||||
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
|
||||
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}current/`)
|
||||
include page-job-offers.pug
|
||||
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}current/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
|
||||
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}current/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
|
||||
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
|
||||
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
|
||||
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
|
||||
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}current/`)
|
||||
include views/page-job-offers.pug
|
||||
|
||||
if endpoints.projects || (endpoints.get && endpoints.get.projects)
|
||||
#project(hidden, data-view="project", no-render).with-sidebar
|
||||
if (endpoints.post && endpoints.post.projects) && (endpoints.get && endpoints.get.projects)
|
||||
if endpoints.get.projects
|
||||
#project(hidden, data-view="project", no-render).with-sidebar
|
||||
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.projects")
|
||||
hubl-reactivity(data-src=`${endpoints.post.projects}joinable/` target-src=`${endpoints.get.projects}`)
|
||||
hubl-reactivity(data-src=`${endpoints.post.projects}` target-src=`${endpoints.get.projects}`)
|
||||
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.post.projects}`)
|
||||
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.post.projects}joinable/`)
|
||||
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}joinable/` target-src=`${endpoints.projects || endpoints.get.projects}`)
|
||||
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.projects || endpoints.get.projects}`)
|
||||
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.projects || endpoints.get.projects}joinable/`)
|
||||
include page-project.pug
|
||||
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}joinable/` target-src=`${endpoints.projects || endpoints.get.projects}`)
|
||||
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.projects || endpoints.get.projects}`)
|
||||
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.projects || endpoints.get.projects}joinable/`)
|
||||
include views/page-project.pug
|
||||
|
||||
if endpoints.circles || (endpoints.get && endpoints.get.circles)
|
||||
#circle(hidden, data-view="circle", no-render).with-sidebar
|
||||
if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles)
|
||||
if endpoints.get.circles
|
||||
#circle(hidden, data-view="circle", no-render).with-sidebar
|
||||
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.circles")
|
||||
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${endpoints.get.circles}`)
|
||||
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${endpoints.get.circles}`)
|
||||
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.post.circles}`)
|
||||
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.post.circles}joinable/`)
|
||||
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src=`${endpoints.circles || endpoints.get.circles}`)
|
||||
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}`)
|
||||
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}joinable/`)
|
||||
include page-circle.pug
|
||||
if endpoints.users || (endpoints.get && endpoints.get.users)
|
||||
#messages(hidden, data-view="messages", no-render).with-sidebar
|
||||
include page-messages.pug
|
||||
|
||||
if endpoints.polls || (endpoints.get && endpoints.get.polls)
|
||||
#polls(hidden, data-view="polls").with-sidebar
|
||||
include page-polls.pug
|
||||
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src=`${endpoints.circles || endpoints.get.circles}`)
|
||||
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}`)
|
||||
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}joinable/`)
|
||||
include views/page-circle.pug
|
||||
if endpoints.get.users
|
||||
#messages(hidden, data-view="messages", no-render).with-sidebar
|
||||
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.contacts")
|
||||
include views/page-messages.pug
|
||||
|
||||
if endpoints.get.polls
|
||||
#polls(hidden, data-view="polls").with-sidebar
|
||||
include views/page-polls.pug
|
||||
|
||||
if endpoints.events || (endpoints.get && endpoints.get.events)
|
||||
#events(hidden, data-view="events")
|
||||
include page-events.pug
|
||||
if endpoints.get.events
|
||||
#events(hidden, data-view="events")
|
||||
include views/page-events.pug
|
||||
|
||||
if endpoints.resources || (endpoints.get && endpoints.get.resources)
|
||||
#resources(hidden, data-view="resources")
|
||||
include page-resources.pug
|
||||
if endpoints.get.resources
|
||||
#resources(hidden, data-view="resources")
|
||||
include views/page-resources.pug
|
||||
|
||||
#admin(hidden, data-view="admin", no-render).with-sidebar
|
||||
include page-admin.pug
|
||||
#admin(hidden, data-view="admin", no-render).with-sidebar
|
||||
include views/page-admin.pug
|
||||
|
||||
#about(data-view="about", no-render).no-sidebar.with-padding
|
||||
include page-about.pug
|
||||
|
||||
if (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.uploads || (endpoints.post && endpoints.post.uploads)) && (endpoints.users || (endpoints.post && endpoints.post.users))
|
||||
#profile(hidden, data-view="profile", no-render).no-sidebar
|
||||
include page-profile.pug
|
||||
|
||||
if analytics
|
||||
each provider in analytics
|
||||
if provider.type && provider.url && provider.url
|
||||
solid-analytics(
|
||||
type=`${provider.type}`
|
||||
url=`${provider.url}`
|
||||
id=`${provider.id}`
|
||||
)
|
||||
#about(data-view="about", no-render).no-sidebar.with-padding
|
||||
include views/page-about.pug
|
||||
|
||||
if endpoints.get.skills && endpoints.post.uploads && endpoints.post.users
|
||||
#profile(hidden, data-view="profile", no-render).no-sidebar
|
||||
include views/page-profile.pug
|
||||
|
||||
if analytics
|
||||
each provider in analytics
|
||||
if provider.type && provider.url && provider.url
|
||||
solid-analytics(
|
||||
type=`${provider.type}`
|
||||
url=`${provider.url}`
|
||||
id=`${provider.id}`
|
||||
)
|
||||
else
|
||||
h1(style='color:red') Invalid config.json (missing `endpoints.get` or `endpoints.post`)
|
||||
|
@ -15,6 +15,11 @@
|
||||
"project": "project",
|
||||
"circle": "circle"
|
||||
},
|
||||
"contact": {
|
||||
"create": "Find your contacts on the",
|
||||
"profileDir": "profile directory",
|
||||
"create2": ""
|
||||
},
|
||||
"dashboard": "Dashboard",
|
||||
"events": "Events",
|
||||
"gov": "Governance",
|
||||
|
@ -15,6 +15,11 @@
|
||||
"project": "proyecto",
|
||||
"circle": "círculo"
|
||||
},
|
||||
"contact": {
|
||||
"create": "Encuentre sus contactos en el",
|
||||
"profileDir": "directorio de miembros",
|
||||
"create2": ""
|
||||
},
|
||||
"dashboard": "Panel de control",
|
||||
"events": "Eventos",
|
||||
"gov": "Gobernanza",
|
||||
|
@ -15,6 +15,11 @@
|
||||
"project": "projet",
|
||||
"circle": "cercle"
|
||||
},
|
||||
"contact": {
|
||||
"create": "Retrouve tes contacts sur",
|
||||
"profileDir": "l'annuaire des membres",
|
||||
"create2": ""
|
||||
},
|
||||
"dashboard": "Tableau de bord",
|
||||
"events": "Evènements",
|
||||
"gov": "Gouvernance",
|
||||
|
6
src/pug.config.js
Normal file
6
src/pug.config.js
Normal file
@ -0,0 +1,6 @@
|
||||
let configPath = process.env.CONFIG_PATH || 'config.json';
|
||||
const config = require(`../${configPath}`);
|
||||
|
||||
module.exports = {
|
||||
locals: config
|
||||
};
|
@ -187,10 +187,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
*/
|
||||
function recursivePopulate(element) {
|
||||
Array.from(element.querySelectorAll('*')).forEach((e) => {
|
||||
e.addEventListener("populate", (e) => {
|
||||
recursivePopulate(e.target);
|
||||
jsI18n.processNode(e.target);
|
||||
});
|
||||
if(e.content && e.content instanceof DocumentFragment) {
|
||||
recursivePopulate(e.content);
|
||||
} else if(e instanceof HTMLElement) {
|
||||
e.addEventListener("populate", (el) => {
|
||||
recursivePopulate(el.target);
|
||||
jsI18n.processNode(el.target);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// Process every children from document
|
||||
|
284
src/styles/base/buttons.scss
Normal file
284
src/styles/base/buttons.scss
Normal file
@ -0,0 +1,284 @@
|
||||
// Button global CSS
|
||||
solid-delete,
|
||||
solid-route,
|
||||
solid-link,
|
||||
button,
|
||||
input[type='submit'],
|
||||
a,
|
||||
.button {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
|
||||
&.button {
|
||||
padding: 0.55rem 2.5rem;
|
||||
border-radius: 100em;
|
||||
|
||||
*,
|
||||
& {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
&.mobile-full-width {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 5rem;
|
||||
width: -webkit-fill-available;
|
||||
width: -moz-available;
|
||||
|
||||
@include breakpoint(lg) {
|
||||
margin-bottom: 0;
|
||||
padding-left: 2.5rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
&::before {
|
||||
margin-left: -2.6rem;
|
||||
|
||||
@include breakpoint(lg) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.desktop-btn-margin__left {
|
||||
margin: 0;
|
||||
|
||||
@include breakpoint(lg) {
|
||||
margin-left: 2.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.small {
|
||||
|
||||
*,
|
||||
& {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.text-bold {
|
||||
|
||||
*,
|
||||
& {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&.text-uppercase {
|
||||
|
||||
*,
|
||||
& {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
&.rounded {
|
||||
border-radius: 50%;
|
||||
font-size: 1.8rem;
|
||||
padding: 1rem;
|
||||
height: 42px;
|
||||
width: 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&.button-link {
|
||||
border-radius: 100em;
|
||||
|
||||
*,
|
||||
& {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.with-icon::before {
|
||||
font-size: 1.6rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
&.button-primary{
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-primary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-disabled{
|
||||
cursor: not-allowed;
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-grey-3);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-grey-3);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-grey-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-secondary {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-secondary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-secondary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-complementary {
|
||||
color: var(--color-complementary);
|
||||
background-color: var(--color-white);
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-complementary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-complementary);
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
|
||||
&.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&.reversed {
|
||||
&.button-primary {
|
||||
background-color: var(--color-primary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
color: var(--color-primary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-disabled{
|
||||
cursor: not-allowed;
|
||||
background-color: var(--color-grey-3);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-grey-3);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-secondary {
|
||||
background-color: var(--color-secondary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-secondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-complementary {
|
||||
background-color: var(--color-complementary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-complementary);
|
||||
}
|
||||
|
||||
&.bordered, &.button-bordered {
|
||||
border: 1px solid var(--color-complementary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -18,13 +18,14 @@ solid-form {
|
||||
}
|
||||
}
|
||||
|
||||
.button-register>form>input[type=submit] {
|
||||
@extend .button,
|
||||
.text-bold,
|
||||
.text-uppercase,
|
||||
.reversed,
|
||||
.button-secondary,
|
||||
.bordered;
|
||||
|
||||
.button-register input[type=submit] {
|
||||
@extend .button;
|
||||
@extend .text-bold;
|
||||
@extend .text-uppercase;
|
||||
@extend .reversed;
|
||||
@extend .button-secondary;
|
||||
@extend .bordered;
|
||||
height: auto;
|
||||
position: fixed;
|
||||
bottom: 1em;
|
||||
@ -100,37 +101,6 @@ textarea {
|
||||
height: 100px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.content-box {
|
||||
|
||||
&.with-form {
|
||||
|
||||
/*solid-set-default:not([name='user-thumb']) {
|
||||
clear: both;
|
||||
display: flex!important;
|
||||
flex-wrap: wrap;
|
||||
max-width: 100%;
|
||||
|
||||
solid-form-label-text {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
/*solid-form[set-user-id-select] {
|
||||
|
||||
input[type="submit"] {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
select {
|
||||
display: none;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/* WIDGETS SIB (let in .content-box to override default styles) */
|
||||
|
||||
@ -196,12 +166,12 @@ hubl-status {
|
||||
min-width: 35vw;
|
||||
}
|
||||
|
||||
input[type='submit'] {
|
||||
@extend .button,
|
||||
.text-bold,
|
||||
.text-uppercase,
|
||||
.button-complementary,
|
||||
.bordered;
|
||||
input[type=submit] {
|
||||
@extend .button;
|
||||
@extend .text-bold;
|
||||
@extend .text-uppercase;
|
||||
@extend .button-complementary;
|
||||
@extend .bordered;
|
||||
margin: 10px 0;
|
||||
width: 100%;
|
||||
|
||||
@ -280,11 +250,11 @@ solid-form-file {
|
||||
}
|
||||
|
||||
label {
|
||||
@extend .button,
|
||||
.text-bold,
|
||||
.text-uppercase,
|
||||
.button-primary,
|
||||
.bordered;
|
||||
@extend .button;
|
||||
@extend .text-bold;
|
||||
@extend .text-uppercase;
|
||||
@extend .button-primary;
|
||||
@extend .bordered;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
||||
|
@ -294,11 +294,11 @@ h5 {
|
||||
}
|
||||
|
||||
input[type='submit'] {
|
||||
@extend .button,
|
||||
.text-bold,
|
||||
.text-uppercase,
|
||||
.button-primary,
|
||||
.bordered;
|
||||
@extend .button;
|
||||
@extend .text-bold;
|
||||
@extend .text-uppercase;
|
||||
@extend .button-primary;
|
||||
@extend .bordered;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
@ -340,11 +340,11 @@ h5 {
|
||||
}
|
||||
|
||||
input {
|
||||
@extend .button,
|
||||
.text-bold,
|
||||
.text-uppercase,
|
||||
.button-primary,
|
||||
.bordered;
|
||||
@extend .button;
|
||||
@extend .text-bold;
|
||||
@extend .text-uppercase;
|
||||
@extend .button-primary;
|
||||
@extend .bordered;
|
||||
margin: 10px 0;
|
||||
width: 100%;
|
||||
|
||||
@ -618,293 +618,9 @@ h5 {
|
||||
}
|
||||
|
||||
// Other base components
|
||||
@import 'buttons';
|
||||
@import 'form';
|
||||
@import 'table';
|
||||
@import 'header';
|
||||
@import 'menu-left';
|
||||
@import 'user-thumb';
|
||||
|
||||
// Button global CSS
|
||||
solid-delete,
|
||||
solid-route,
|
||||
solid-link,
|
||||
button,
|
||||
input[type='submit'],
|
||||
a,
|
||||
.button {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
|
||||
&.button {
|
||||
padding: 0.55rem 2.5rem;
|
||||
border-radius: 100em;
|
||||
|
||||
*,
|
||||
& {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
&.mobile-full-width {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 5rem;
|
||||
width: -webkit-fill-available;
|
||||
width: -moz-available;
|
||||
|
||||
@include breakpoint(lg) {
|
||||
margin-bottom: 0;
|
||||
padding-left: 2.5rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
&::before {
|
||||
margin-left: -2.6rem;
|
||||
|
||||
@include breakpoint(lg) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.desktop-btn-margin__left {
|
||||
margin: 0;
|
||||
|
||||
@include breakpoint(lg) {
|
||||
margin-left: 2.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.small {
|
||||
|
||||
*,
|
||||
& {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.text-bold {
|
||||
|
||||
*,
|
||||
& {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&.text-uppercase {
|
||||
|
||||
*,
|
||||
& {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
&.rounded {
|
||||
border-radius: 50%;
|
||||
font-size: 1.8rem;
|
||||
padding: 1rem;
|
||||
height: 42px;
|
||||
width: 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&.button-link {
|
||||
border-radius: 100em;
|
||||
|
||||
*,
|
||||
& {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.with-icon::before {
|
||||
font-size: 1.6rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
&.button-primary{
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-primary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-disabled{
|
||||
cursor: not-allowed;
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-grey-3);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-grey-3);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-grey-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-secondary {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-secondary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-secondary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-complementary {
|
||||
color: var(--color-complementary);
|
||||
background-color: var(--color-white);
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-complementary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-complementary);
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
|
||||
&.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&.reversed {
|
||||
&.button-primary {
|
||||
background-color: var(--color-primary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
color: var(--color-primary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-disabled{
|
||||
cursor: not-allowed;
|
||||
background-color: var(--color-grey-3);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-grey-3);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-secondary {
|
||||
background-color: var(--color-secondary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-secondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.button-complementary {
|
||||
background-color: var(--color-complementary);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-white);
|
||||
|
||||
*,
|
||||
& {
|
||||
color: var(--color-complementary);
|
||||
}
|
||||
|
||||
&.bordered {
|
||||
border: 1px solid var(--color-complementary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +164,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
solid-display.nosub>solid-form[fields="name"]>hubl-search-users>input {
|
||||
solid-display>solid-form[fields="contact.name"]>hubl-search-users>input {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 10px;
|
||||
width: calc(80vw - 71px);
|
||||
@ -182,28 +182,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
solid-display.nosub>nav {
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
display: grid;
|
||||
grid-template-columns: auto 50% auto;
|
||||
grid-template-areas: "left middle right";
|
||||
|
||||
>* {
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
>[data-id="prev"] {
|
||||
grid-area: left;
|
||||
}
|
||||
|
||||
>[data-id="next"] {
|
||||
grid-area: right;
|
||||
}
|
||||
|
||||
>span {
|
||||
grid-area: middle;
|
||||
}
|
||||
hubl-create solid-link,
|
||||
hubl-create-contact solid-link {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
hubl-menu-publicprivate {
|
||||
@ -218,10 +199,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
>solid-display.nosub>div>solid-display>div {
|
||||
padding: 1rem 1rem 1rem 3rem;
|
||||
}
|
||||
|
||||
solid-display>div {
|
||||
|
||||
.create {
|
||||
@ -239,7 +216,8 @@
|
||||
cursor: pointer;
|
||||
|
||||
>hubl-menu-fix-url-circle>solid-link>solid-display>div,
|
||||
>hubl-menu-fix-url-project>solid-link>solid-display>div {
|
||||
>hubl-menu-fix-url-project>solid-link>solid-display>div,
|
||||
>hubl-menu-fix-url-contact>solid-link>solid-display>div {
|
||||
padding: 1rem 1rem 1rem 3rem;
|
||||
}
|
||||
}
|
||||
@ -251,7 +229,8 @@
|
||||
|
||||
&>solid-display[active]>div,
|
||||
&>solid-display>div>hubl-menu-fix-url-circle>solid-link>solid-display[active]>div,
|
||||
&>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display[active]>div {
|
||||
&>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display[active]>div,
|
||||
&>solid-display>div>hubl-menu-fix-url-contact>solid-link>solid-display[active]>div {
|
||||
background-color: var(--color-menu-highlight-primary);
|
||||
color: var(--color-menu-text-active);
|
||||
font-weight: bold;
|
||||
@ -261,13 +240,15 @@
|
||||
&.menu-notification {
|
||||
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-circle,
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-project {
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-project,
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-contact {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
>solid-display>div>solid-display>div,
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-circle>solid-link>solid-display>div,
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display>div {
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display>div,
|
||||
>solid-display>div>solid-display>div>hubl-menu-fix-url-contact>solid-link>solid-display>div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
@ -154,14 +154,13 @@
|
||||
[name='button'] {
|
||||
|
||||
input[type='submit'] {
|
||||
@extend
|
||||
.button,
|
||||
.text-bold,
|
||||
.text-uppercase,
|
||||
.reversed,
|
||||
.button-secondary,
|
||||
.bordered,
|
||||
.desktop-btn-margin__left;
|
||||
@extend .button;
|
||||
@extend .text-bold;
|
||||
@extend .text-uppercase;
|
||||
@extend .reversed;
|
||||
@extend .button-secondary;
|
||||
@extend .bordered;
|
||||
@extend .desktop-btn-margin__left;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,25 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@import '../../node_modules/include-media/dist/include-media';
|
||||
@import '../../node_modules/normalize.css/normalize';
|
||||
@import 'normalize.css';
|
||||
|
||||
@import 'abstracts/fonts';
|
||||
@import 'abstracts/variables';
|
||||
@import 'abstracts/mixins';
|
||||
@import 'components/loader';
|
||||
@import 'components/icons/index';
|
||||
@import 'components/icons';
|
||||
@import 'base/main';
|
||||
@import 'base/about';
|
||||
|
||||
#viewport {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
/*height: auto;
|
||||
min-height: 100vh;*/
|
||||
overflow-y: auto;
|
||||
@import 'components/index';
|
||||
@import 'layout/members/index';
|
||||
@import 'layout/job-offers/index';
|
||||
@import 'layout/user/index';
|
||||
@import 'layout/events/index';
|
||||
@import 'layout/resources/index';
|
||||
@import 'layout/dashboard/index';
|
||||
@import 'layout/polls/index';
|
||||
@import 'components';
|
||||
@import 'layout/members';
|
||||
@import 'layout/job-offers';
|
||||
@import 'layout/user';
|
||||
@import 'layout/events';
|
||||
@import 'layout/resources';
|
||||
@import 'layout/dashboard';
|
||||
@import 'layout/polls';
|
||||
}
|
||||
|
142
src/sw.js
142
src/sw.js
@ -1,4 +1,4 @@
|
||||
const CACHE_NAME = 'hubl-store';
|
||||
const CACHE_NAME = 'hubl-store-cnt82i';
|
||||
|
||||
self.addEventListener('install', function (e) {
|
||||
self.skipWaiting();
|
||||
@ -30,84 +30,86 @@ self.addEventListener('activate', function (e) {
|
||||
self.clients.claim();
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', function (event) {
|
||||
let requestURL = new URL(event.request.url);
|
||||
if (requestURL.origin == location.origin) {
|
||||
// Static asset, cache then network
|
||||
event.respondWith(
|
||||
caches.open(CACHE_NAME).then(function (cache) {
|
||||
return cache.match(event.request).then(function (response) {
|
||||
var fetchPromise = fetch(event.request).then(function (networkResponse) {
|
||||
cache.put(event.request, networkResponse.clone());
|
||||
return networkResponse;
|
||||
if(process.env.NODE_ENV === 'production'){
|
||||
self.addEventListener('fetch', function (event) {
|
||||
let requestURL = new URL(event.request.url);
|
||||
if (requestURL.origin == location.origin) {
|
||||
// Static asset, cache then network
|
||||
event.respondWith(
|
||||
caches.open(CACHE_NAME).then(function (cache) {
|
||||
return cache.match(event.request).then(function (response) {
|
||||
var fetchPromise = fetch(event.request).then(function (networkResponse) {
|
||||
cache.put(event.request, networkResponse.clone());
|
||||
return networkResponse;
|
||||
});
|
||||
return response || fetchPromise;
|
||||
});
|
||||
return response || fetchPromise;
|
||||
});
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
if (
|
||||
event.request.method == 'POST' ||
|
||||
event.request.method == 'PUT'
|
||||
) {
|
||||
// disabled: lead to cors errors
|
||||
// // POST/PUT to api, rewrite the cache
|
||||
// event.respondWith(
|
||||
// caches.open(CACHE_NAME + '-api').then(function (cache) {
|
||||
// return fetch(event.request).then(function (response) {
|
||||
// cache.put(event.request, response.clone());
|
||||
// return response;
|
||||
// })
|
||||
// }));
|
||||
// api: no cache
|
||||
event.respondWith(fetch(event.request));
|
||||
} else if (
|
||||
/matomo/.test(requestURL.origin) ||
|
||||
/sentry/.test(requestURL.origin) ||
|
||||
/jabber/.test(requestURL.origin) ||
|
||||
/xmpp/.test(requestURL.origin)
|
||||
) {
|
||||
// analytics, always distant
|
||||
event.respondWith(fetch(event.request));
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
if (
|
||||
/unpkg/.test(requestURL.origin) ||
|
||||
/skypack/.test(request.origin) ||
|
||||
/jspm/.test(requestURL.origin) ||
|
||||
/jsdeliver/.test(requestURL.origin) ||
|
||||
/cdn/.test(requestURL.origin) ||
|
||||
/googleapis/.test(requestURL.origin)
|
||||
event.request.method == 'POST' ||
|
||||
event.request.method == 'PUT'
|
||||
) {
|
||||
// cdn: cache then network
|
||||
event.respondWith(
|
||||
caches.open(CACHE_NAME + '-cdn').then(function (cache) {
|
||||
return cache.match(event.request).then(function (response) {
|
||||
var fetchPromise = fetch(event.request).then(function (networkResponse) {
|
||||
cache.put(event.request, networkResponse.clone());
|
||||
return networkResponse;
|
||||
});
|
||||
return response || fetchPromise;
|
||||
});
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
// disabled: lead to cors errors
|
||||
// // api: distant then cache
|
||||
// // POST/PUT to api, rewrite the cache
|
||||
// event.respondWith(
|
||||
// fetch(event.request)
|
||||
// .then((response) => {
|
||||
// caches.open(CACHE_NAME + '-api').then(function (cache) {
|
||||
// caches.open(CACHE_NAME + '-api').then(function (cache) {
|
||||
// return fetch(event.request).then(function (response) {
|
||||
// cache.put(event.request, response.clone());
|
||||
// return response;
|
||||
// });
|
||||
// })
|
||||
// .catch(() => {
|
||||
// return caches.match(event.request);
|
||||
// })
|
||||
// );
|
||||
// })
|
||||
// }));
|
||||
// api: no cache
|
||||
event.respondWith(fetch(event.request));
|
||||
} else if (
|
||||
/matomo/.test(requestURL.origin) ||
|
||||
/sentry/.test(requestURL.origin) ||
|
||||
/jabber/.test(requestURL.origin) ||
|
||||
/xmpp/.test(requestURL.origin)
|
||||
) {
|
||||
// analytics, always distant
|
||||
event.respondWith(fetch(event.request));
|
||||
} else {
|
||||
if (
|
||||
/unpkg/.test(requestURL.origin) ||
|
||||
/skypack/.test(requestURL.origin) ||
|
||||
/jspm/.test(requestURL.origin) ||
|
||||
/jsdeliver/.test(requestURL.origin) ||
|
||||
/cdn/.test(requestURL.origin) ||
|
||||
/googleapis/.test(requestURL.origin)
|
||||
) {
|
||||
// cdn: cache then network
|
||||
event.respondWith(
|
||||
caches.open(CACHE_NAME + '-cdn').then(function (cache) {
|
||||
return cache.match(event.request).then(function (response) {
|
||||
var fetchPromise = fetch(event.request).then(function (networkResponse) {
|
||||
cache.put(event.request, networkResponse.clone());
|
||||
return networkResponse;
|
||||
});
|
||||
return response || fetchPromise;
|
||||
});
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
// disabled: lead to cors errors
|
||||
// // api: distant then cache
|
||||
// event.respondWith(
|
||||
// fetch(event.request)
|
||||
// .then((response) => {
|
||||
// caches.open(CACHE_NAME + '-api').then(function (cache) {
|
||||
// cache.put(event.request, response.clone());
|
||||
// return response;
|
||||
// });
|
||||
// })
|
||||
// .catch(() => {
|
||||
// return caches.match(event.request);
|
||||
// })
|
||||
// );
|
||||
// api: no cache
|
||||
event.respondWith(fetch(event.request));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
solid-widget(name='hubl-user-avatar')
|
||||
template ${await value ? `<img src="${await value}" style="max-width:100%; max-height: 100%;" />` : `<object type="image/svg+xml" data="/images/alien.svg"></object>`}
|
@ -1,13 +1,13 @@
|
||||
.views-container.sidebar-is-closed
|
||||
if endpoints.circles || (endpoints.get && endpoints.get.circles)
|
||||
#admin-circles(hidden, data-view="admin-circles")
|
||||
include views/admin/page-admin-circles.pug
|
||||
include partials/admin/page-admin-circles.pug
|
||||
if endpoints.projects || (endpoints.get && endpoints.get.projects)
|
||||
#admin-projects(hidden, data-view="admin-projects")
|
||||
include views/admin/page-admin-projects.pug
|
||||
include partials/admin/page-admin-projects.pug
|
||||
if (endpoints.users || (endpoints.get && endpoints.get.users))
|
||||
#admin-communities(hidden, data-view="admin-communities")
|
||||
include views/admin/page-admin-communities.pug
|
||||
include partials/admin/page-admin-communities.pug
|
||||
nav.jsRightMenu(role='navigation')
|
||||
solid-router(default-route='admin-circles')
|
||||
ul
|
@ -13,15 +13,15 @@
|
||||
div.content-box__height
|
||||
solid-ac-checker(permission='acl:Read', bind-resources)
|
||||
#circle-chat(hidden, data-view="circle-chat")
|
||||
include views/circle/page-circle-chat.pug
|
||||
include partials/circle/page-circle-chat.pug
|
||||
#circle-information.content-box__height(hidden, data-view="circle-information")
|
||||
include views/circle/page-circle-profile.pug
|
||||
include partials/circle/page-circle-profile.pug
|
||||
#circle-events(hidden, data-view="circle-events")
|
||||
include views/circle/page-circle-events.pug
|
||||
include partials/circle/page-circle-events.pug
|
||||
#circle-resources(hidden, data-view="circle-resources")
|
||||
include views/circle/page-circle-resources.pug
|
||||
include partials/circle/page-circle-resources.pug
|
||||
#circle-polls(hidden, data-view="circle-polls")
|
||||
include views/circle/page-circle-polls.pug
|
||||
include partials/circle/page-circle-polls.pug
|
||||
|
||||
nav.jsRightMenu(role='navigation')
|
||||
solid-router(default-route='circle-chat')
|
@ -17,11 +17,11 @@
|
||||
div.content-box__height
|
||||
solid-ac-checker(permission='acl:Read', bind-resources)
|
||||
#project-chat(hidden, data-view="project-chat")
|
||||
include views/project/page-project-chat.pug
|
||||
include partials/project/page-project-chat.pug
|
||||
#project-information.content-box__height(hidden, data-view="project-information")
|
||||
include views/project/page-project-profile.pug
|
||||
include partials/project/page-project-profile.pug
|
||||
#project-picture(hidden, data-view="project-picture")
|
||||
include views/project/page-project-picture.pug
|
||||
include partials/project/page-project-picture.pug
|
||||
|
||||
nav.jsRightMenu(role='navigation')
|
||||
solid-router(default-route='project-chat')
|
@ -11,7 +11,6 @@
|
||||
include ../circle/page-circle-left.pug
|
||||
|
||||
#admin-circle-list.content-box__height(hidden, data-view="admin-circle-list")
|
||||
include ../../templates/hubl-user-avatar.pug
|
||||
|
||||
solid-widget(name='hubl-circle-owner')
|
||||
template
|
||||
@ -90,7 +89,7 @@
|
||||
value-user.username='hubl-workaround-493'
|
||||
widget-user.username='solid-form-hidden'
|
||||
|
||||
submit-button='Rejoindre'
|
||||
submit-button=''
|
||||
data-trans='submit-button=circle.list.buttonJoin'
|
||||
)
|
||||
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}` target-src='${value}')
|
@ -12,7 +12,6 @@
|
||||
include ../project/page-project-left.pug
|
||||
|
||||
#admin-project-list.content-box__height(hidden, data-view="admin-project-list")
|
||||
include ../../templates/hubl-user-avatar.pug
|
||||
|
||||
div.content-box__info.flex
|
||||
div.admin-header.flex
|
@ -1,7 +1,5 @@
|
||||
div.content-box__info
|
||||
|
||||
include ../../templates/hubl-user-avatar.pug
|
||||
|
||||
solid-widget(name="circle-edit-members-delete")
|
||||
template
|
||||
solid-ac-checker(permission="acl:Delete" data-src="${src}")
|
@ -10,12 +10,6 @@ solid-notifications.notLoggedIn(
|
||||
bind-user
|
||||
)
|
||||
|
||||
//- Templates for notifications from circles and from other users
|
||||
include views/notifications/message-circle.pug
|
||||
include views/notifications/message-private.pug
|
||||
|
||||
include templates/hubl-user-avatar.pug
|
||||
|
||||
details#user-controls.notLoggedIn
|
||||
summary(tabindex='0' role='button')
|
||||
solid-display#user-controls__profile(
|
@ -12,6 +12,15 @@ solid-widget(name='hubl-menu-publicprivate')
|
||||
template
|
||||
div ${value == 'Public' ? '#' : ''}
|
||||
|
||||
solid-widget(name='hubl-create-contact')
|
||||
template
|
||||
p.create
|
||||
span(data-trans="menuLeft.contact.create")
|
||||
span
|
||||
solid-link(next="members" data-trans="menuLeft.contact.profileDir")
|
||||
span
|
||||
span(data-trans="menuLeft.contact.create2")
|
||||
|
||||
solid-widget(name='hubl-create')
|
||||
template
|
||||
p.create
|
||||
@ -22,6 +31,19 @@ solid-widget(name='hubl-create')
|
||||
span
|
||||
solid-link(next="${value == 'projet' ? 'admin-projects' : 'admin-circles'}", data-trans="menuLeft.emptyCircleProject.adminPanel")
|
||||
|
||||
solid-widget(name='hubl-menu-fix-url-contact')
|
||||
template
|
||||
solid-link(data-src="${value}" next="messages")
|
||||
solid-display(
|
||||
data-src='${value}'
|
||||
fields='name, chatProfile.jabberID, badge'
|
||||
value-badge='${value}'
|
||||
widget-badge='hubl-counter'
|
||||
widget-chatProfile.jabberID='hubl-menu-jabberid'
|
||||
widget-name='solid-display-div'
|
||||
order-asc='username'
|
||||
)
|
||||
|
||||
solid-widget(name='hubl-menu-fix-url-circle')
|
||||
template
|
||||
solid-link(data-src="${value}" next="circle")
|
||||
@ -33,7 +55,7 @@ solid-widget(name='hubl-menu-fix-url-circle')
|
||||
widget-badge='hubl-counter'
|
||||
widget-jabberID='hubl-menu-jabberid'
|
||||
widget-name='solid-display-div'
|
||||
order-by="name"
|
||||
order-asc="name"
|
||||
)
|
||||
|
||||
solid-widget(name='hubl-menu-fix-url-project')
|
||||
@ -49,7 +71,7 @@ solid-widget(name='hubl-menu-fix-url-project')
|
||||
widget-jabberID='hubl-menu-jabberid'
|
||||
widget-badge='hubl-counter'
|
||||
widget-name='solid-display-div'
|
||||
order-by="customer.name"
|
||||
order-asc="customer.name"
|
||||
)
|
||||
|
||||
|
||||
@ -110,7 +132,7 @@ solid-router#navbar-router(default-route='dashboard')
|
||||
empty-value=''
|
||||
data-trans="empty-value=menuLeft.emptyCircleProject.project"
|
||||
widget-project='hubl-menu-fix-url-project'
|
||||
order-by="project.customer.name"
|
||||
order-asc="project.customer.name"
|
||||
)
|
||||
div.divider
|
||||
if endpoints.circles || (endpoints.get && endpoints.get.circles)
|
||||
@ -139,40 +161,37 @@ solid-router#navbar-router(default-route='dashboard')
|
||||
empty-value=''
|
||||
data-trans="empty-value=menuLeft.emptyCircleProject.circle"
|
||||
widget-circle='hubl-menu-fix-url-circle'
|
||||
order-by="circle.name"
|
||||
)
|
||||
div.divider
|
||||
if endpoints.users || (endpoints.get && endpoints.get.users)
|
||||
div.menu-wrapper
|
||||
div.menu
|
||||
div.menu-chevron
|
||||
div.menu-icon.icon-arrow-up
|
||||
div.menu-label(data-trans="menuLeft.messages")
|
||||
div.menu-icon.icon-envelope-letter
|
||||
solid-route(name='messages', rdf-type='foaf:user', use-id='', hidden)
|
||||
div.sub-menu.menu-notification
|
||||
div#loader-messages.loader.loader-menu
|
||||
div
|
||||
div
|
||||
div
|
||||
div
|
||||
solid-display.nosub.message-tab(
|
||||
data-src=`${endpoints.users || (endpoints.get && endpoints.get.users)}`
|
||||
fields='name, chatProfile.jabberID, badge'
|
||||
loader-id='loader-messages'
|
||||
search-fields="name"
|
||||
search-label-name=""
|
||||
data-trans="search-label-name=menuLeft.search"
|
||||
search-widget-name="hubl-search-users"
|
||||
widget-name='solid-display-div'
|
||||
widget-badge='hubl-counter'
|
||||
widget-chatProfile.jabberID='hubl-menu-jabberid'
|
||||
action-badge='badge'
|
||||
order-by='username'
|
||||
next='messages'
|
||||
paginate-by='10'
|
||||
order-asc="circle.name"
|
||||
)
|
||||
div.divider
|
||||
div.menu-wrapper
|
||||
div.menu
|
||||
div.menu-chevron
|
||||
div.menu-icon.icon-arrow-up
|
||||
div.menu-label(data-trans="menuLeft.messages")
|
||||
div.menu-icon.icon-envelope-letter
|
||||
solid-route(name='messages', rdf-type='foaf:user', use-id='', hidden)
|
||||
div.sub-menu.menu-notification
|
||||
div#loader-messages.loader.loader-menu
|
||||
div
|
||||
div
|
||||
div
|
||||
div
|
||||
//- search-fields="contact.name"
|
||||
//- search-label-contact.name=""
|
||||
//- data-trans="search-label-contact.name=menuLeft.search"
|
||||
//- search-widget-contact.name="hubl-search-users"
|
||||
solid-display.message-tab(
|
||||
bind-user
|
||||
nested-field='contacts'
|
||||
fields='contact'
|
||||
loader-id='loader-messages'
|
||||
empty-widget='hubl-create-contact'
|
||||
empty-value=''
|
||||
widget-contact='hubl-menu-fix-url-contact'
|
||||
order-asc="contact.username"
|
||||
)
|
||||
div.divider
|
||||
|
||||
solid-route(name='admin', hidden)
|
||||
solid-route.menu(name='profile', hidden)
|
4
src/views/partials/notifications.pug
Normal file
4
src/views/partials/notifications.pug
Normal file
@ -0,0 +1,4 @@
|
||||
//- Templates for notifications
|
||||
|
||||
include notifications/message-circle.pug
|
||||
include notifications/message-private.pug
|
@ -1,7 +1,5 @@
|
||||
div.content-box__info
|
||||
|
||||
include ../../templates/hubl-user-avatar.pug
|
||||
|
||||
solid-widget(name="project-edit-members-delete")
|
||||
template
|
||||
solid-ac-checker(permission="acl:Delete" data-src="${src}")
|
@ -3,7 +3,6 @@ solid-router(default-route='project-profile', hidden)
|
||||
solid-route(name='project-edit')
|
||||
|
||||
#project-profile(hidden, data-view="project-profile")
|
||||
include ../../templates/hubl-captain.pug
|
||||
|
||||
solid-widget(name='hubl-project-team-contact')
|
||||
template
|
4
src/views/partials/widgets.pug
Normal file
4
src/views/partials/widgets.pug
Normal file
@ -0,0 +1,4 @@
|
||||
//- Import your widgets from the `widget`folder here
|
||||
|
||||
include widgets/hubl-captain.pug
|
||||
include widgets/hubl-user-avatar.pug
|
@ -1,9 +1,7 @@
|
||||
include hubl-user-avatar.pug
|
||||
|
||||
solid-widget(name='hubl-captain')
|
||||
template
|
||||
solid-display.user-thumb(
|
||||
data-src="${await value}"
|
||||
data-src="${value}"
|
||||
fields='account.picture, sup(name), sub(is_lead)'
|
||||
|
||||
class-account.picture='avatar user-thumb__picture'
|
2
src/views/partials/widgets/hubl-user-avatar.pug
Normal file
2
src/views/partials/widgets/hubl-user-avatar.pug
Normal file
@ -0,0 +1,2 @@
|
||||
solid-widget(name='hubl-user-avatar')
|
||||
template ${value ? `<img src="${value}" style="max-width:100%; max-height: 100%;" />` : `<object type="image/svg+xml" data="/images/alien.svg"></object>`}
|
Reference in New Issue
Block a user