add dot syntax

This commit is contained in:
Clément 2018-10-17 23:04:03 +02:00
parent 78551c4579
commit ca4735d3bc
11 changed files with 130 additions and 35 deletions

View File

@ -7,7 +7,7 @@ SCRIPT_DEST := $(SCRIPT_SRC:src/%=$(DIST_DIR)/%)
default: build
clean:
git clean -fXd
git clean -fXd -e !src/config.pug
install: node_modules copy_lib copy_samples submodules
@ -37,7 +37,7 @@ node_modules:
copy_lib:
@node copy_lib.js
# sample
# samples
copy_samples:
@cp -n src/config.sample.pug src/config.pug
@ -57,11 +57,16 @@ $(DIST_DIR)/%.js: src/%.js
@mkdir -p $(dir $@)
@node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@
buildprod:
buildprod: build
export SDN="https://test-paris.happy-dev.fr"; \
$(MAKE) $(DIST_DIR)/index.html -B
deploy: pull install bluid
pull:
git pull
sync:
rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/oidc-client-config.json
.PHONY: default install submodules copy_lib copy_samples build watch serve clean sync buildprod
.PHONY: default install submodules copy_lib copy_samples build watch serve clean sync buildprod pull deploy

View File

@ -1,3 +1,5 @@
node_modules/normalize.css/normalize.css
node_modules/@webcomponents/webcomponentsjs
node_modules/@webcomponents/html-imports/src/html-imports.js
node_modules/@webcomponents/html-imports/src/html-imports.js
node_modules/oidc-client/dist/oidc-client.min.js
node_modules/oidc-client/dist/oidc-client.js

81
package-lock.json generated
View File

@ -1050,11 +1050,29 @@
"is-buffer": "^1.1.5"
}
},
"babel-polyfill": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
"integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
"optional": true,
"requires": {
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"regenerator-runtime": "^0.10.5"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
"optional": true
}
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
@ -1841,8 +1859,7 @@
"core-js": {
"version": "2.5.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",
"integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==",
"dev": true
"integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw=="
},
"core-util-is": {
"version": "1.0.2",
@ -2580,7 +2597,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -2601,12 +2619,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -2621,17 +2641,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -2748,7 +2771,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -2760,6 +2784,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -2774,6 +2799,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -2781,12 +2807,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -2805,6 +2833,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -2885,7 +2914,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -2897,6 +2927,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -2982,7 +3013,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -3018,6 +3050,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -3037,6 +3070,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -3080,12 +3114,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@ -3844,6 +3880,11 @@
"verror": "1.10.0"
}
},
"jsrsasign": {
"version": "8.0.12",
"resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.12.tgz",
"integrity": "sha1-Iqu5ZW00owuVMENnIINeicLlwxY="
},
"jstransformer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
@ -4432,6 +4473,15 @@
"isobject": "^3.0.1"
}
},
"oidc-client": {
"version": "1.5.3-beta.1",
"resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.5.3-beta.1.tgz",
"integrity": "sha512-p4EcEuMuVV2mwcH59BSNE/0zNalksELSpOp/r7oH4vGppIwsE1cHvXhHqc4hX7jpfrxU7wYsEZ74ECNXXnZB5g==",
"requires": {
"babel-polyfill": ">=6.9.1",
"jsrsasign": "^8.0.12"
}
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@ -4995,8 +5045,7 @@
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"regenerator-transform": {
"version": "0.13.3",

View File

@ -16,6 +16,7 @@
"@webcomponents/webcomponentsjs": "^1.2.7",
"include-media": "^1.4.9",
"normalize.css": "^8.0.0",
"oidc-client": "^1.5.3-beta.1",
"simple-line-icons": "^2.4.1"
}
}

View File

@ -3,9 +3,9 @@
script(src="/lib/webcomponentsjs/webcomponents-loader.js")
//- script(src="lib/html-imports.js")
script(src="https://cdn.happy-dev.fr/oidc-client/oidc-client.min.js")
script(src="/lib/oidc-client.js")
script(
src="lib/sib-oidc/sib-oidc.js"
src="/lib/sib-oidc/sib-oidc.js"
data-authority='https://test-paris.happy-dev.fr/openid/',
data-client_id='833925',
data-response_type='id_token token',
@ -30,7 +30,7 @@ link(href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,6
//- local
link(rel='import', href='/lib/sib-core/sib-display.html')
link(rel='import', href='/lib/sib-router/sib-router.html')
link(rel='import', href='/lib/sib-chat/sib-chat.html')
//- link(rel='import', href='/lib/sib-chat/sib-chat.html')
//- cdn
link(rel='import', href="https://cdn.happy-dev.fr/sib-core/sib-display.html")

View File

@ -45,7 +45,7 @@ script.
else this.value = [];
return '';
}
return `<span>${city} ${country}</span>`;
return `<span>${city} - ${country}</span>`;
}
}
customElements.define("hdapp-usercell", HDAppCell);
@ -55,13 +55,15 @@ div
h1 Members
sib-display#profiles-list(
data-src=`${sdn}/members/`,
data-fields='header, cell, skills',
data-fields='header, footer'
set-header='avatar, user, pseudonym, bio',
set-footer='cell, roles, skills',
set-pseudonym='before-pseudo, pseudo',
value-before-pseudo='@',
widget-avatar='sib-display-img',
widget-user='hdapp-userinfo',
widget-cell='hdapp-usercell',
widget-roles='sib-display-lookuplist',
widget-skills='sib-display-lookuplist',
set-searchset='user.first_name, user.last_name',
search-fields='searchset',

View File

@ -91,7 +91,7 @@ sib-display#member-info,
cursor: pointer;
label {
// display: none;
display: none;
}
sib-display-img {
$width: 55%;
@ -111,6 +111,29 @@ sib-display#member-info,
object-position: center;
}
}
div[name='header'] {
border-top: 2em solid $color-grey-light;
border-bottom: 1px solid $color-grey-light;
padding-bottom: 1em;
margin: -0.5em;
padding: 0.5em;
margin-bottom: 1em;
text-align: center;
}
hdapp-userinfo {
@extend h1;
}
div[name='pseudonym'] {
div {
display: inline;
}
}
ul{
@include list-reset();
}
}
#profiles-list {

View File

@ -9,5 +9,5 @@
@import 'form';
@import 'content';
@import 'members';
// @import 'members';
@import 'menu';

@ -1 +1 @@
Subproject commit ef607e3aecf6f7091b2fee1fd327e181b376b24d
Subproject commit e34a92abb9529af222b952302b8b25f4b1884905

@ -1 +1 @@
Subproject commit 2d4c97a40e02041b6001fdf51b0490d211144c75
Subproject commit bed0a4d7b743d3e35ec016c880101e8496bc224f

View File

@ -8,7 +8,8 @@
<!-- Scripts-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.7/webcomponents-loader.js" integrity="sha256-fz7VMnmo2h7TlM7CBea8/vpbWpdQnbp20TnwmRwi/KU=" crossorigin="anonymous"></script>
<!-- Web components-->
<link rel="import" href="https://cdn.happy-dev.fr/sib-core/sib-display.html"/>
<!-- <link rel="import" href="https://cdn.happy-dev.fr/sib-core/sib-display.html"/> -->
<link rel="import" href="lib/sib-core/sib-display.html"/>
<style>
body.debug *:not(script):not(button){
@ -17,24 +18,36 @@
margin: 3px;
border: 1px solid #f006;
}
sib-display,
sib-display-div{
display: block;
background-color: #0002;
margin: .5em 0;
min-height: 1em;
}
</style>
</head>
<body>
<button onclick="document.body.classList.toggle('debug')">debug</button>
<div id="job-offers">
<!-- <div id="job-offers">
<h1>Job offers</h1>
<sib-display id="offers-list"
data-src="https://test-paris.happy-dev.fr/job-offers/"
data-fields="title, description, skills"
widget-skills="sib-display-lookuplist"
></sib-display>
</div>
</div> -->
<div id="members">
<h1>Members</h1>
<sib-display id="profiles-list"
data-src="https://test-paris.happy-dev.fr/members/"
data-fields="pseudo, bio"
data-fields="pseudo, user.member.user.member.user.member.bio, a.b"
set-a.b="user.first_name, user.last_name"
></sib-display>
</div>
<!-- <div>
<h1>sib-form</h1>
<sib-form class="block" range-client="https://test-paris.happy-dev.fr/clients/" widget-team="sib-form-multiple-dropdown" range-team="https://test-paris.happy-dev.fr/members/" data-src="https://test-paris.happy-dev.fr/projects/1/"></sib-form>
</div> -->
</body>
</html>
</html>