diff --git a/Makefile b/Makefile index 0193aaf..7819c28 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ default: build config.pug: - cp -n config-sample.pug config.pug + @cp -n config-sample.pug config.pug node_modules: npm install diff --git a/preprod.sh b/preprod.sh index 26463f8..23a7f5c 100755 --- a/preprod.sh +++ b/preprod.sh @@ -1,12 +1,18 @@ #!/bin/bash -export DN="http://staging-app.happy-dev.fr" +export DN="https://staging-app.happy-dev.fr" export SDN="https://test-paris.happy-dev.fr" -export CDN="http://staging-app.happy-dev.fr/dist/lib" -make prod -# ssh staging-app@ssh-staging-app.happy-dev.fr "rm -R staging-app.happy-dev.fr; mkdir staging-app.happy-dev.fr; cd staging-app.happy-dev.fr; mkdir -p src/fonts; mkdir -p dist/css;" +export CDN="https://staging-app.happy-dev.fr/dist/lib" + +make -B build + +# ssh staging-app@ssh-staging-app.happy-dev.fr "rm -R staging-app.happy-dev.fr" +ssh staging-app@ssh-staging-app.happy-dev.fr "mkdir -p staging-app.happy-dev.fr/src/fonts; cd staging-app.happy-dev.fr; mkdir -p dist/css;" + +echo sync... rsync -u index.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ rsync -u .htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ rsync -u oidc-client-preprod-config.json staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/oidc-client-config.json -rsync -zr dist/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ -rsync -zr src/fonts/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/ -rsync -zr src/js/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/ +rsync -r dist/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/dist/ +rsync -r src/fonts/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/fonts/ +rsync -r src/js/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/js/ +echo ...done \ No newline at end of file diff --git a/src/pug/html.pug b/src/pug/html.pug index e14c661..6121a96 100644 --- a/src/pug/html.pug +++ b/src/pug/html.pug @@ -6,7 +6,7 @@ html(lang='fr') meta(http-equiv='X-UA-Compatible', content='ie=edge') title Happy Dev App //- Prod/Dev setup - if (['http://app.happy-dev.fr', 'http://staging-app.happy-dev.fr'].includes(dn)) + if (['https://app.happy-dev.fr', 'https://staging-app.happy-dev.fr'].includes(dn)) include dependencies-prod.pug else include dependencies-dev.pug @@ -26,7 +26,7 @@ html(lang='fr') include channel.pug //- include search.pug sib-chat#chat-singleton(data-authentication='login', data-auto-login='true', data-bosh-service-url='https://jabber.happy-dev.fr/http-bind/', data-debug='false', data-locales-url='en', bind-resources='') - //- script. + script. // Move the chat singleton to the right view on "page load" window.onload = function() { if (window.location.pathname.indexOf("-chat") !== -1) { @@ -34,6 +34,7 @@ html(lang='fr') var pathnameParts = window.location.pathname.split("/"); var viewName = pathnameParts[pathnameParts.length - 1]; var view = document.getElementById(viewName); + console.log({chatSingleton,pathnameParts,viewName,view}); view.appendChild(chatSingleton); chatSingleton.dataset.src = view.dataset.src; diff --git a/src/pug/menu.pug b/src/pug/menu.pug index 6f0e0bb..273c4a3 100644 --- a/src/pug/menu.pug +++ b/src/pug/menu.pug @@ -6,11 +6,12 @@ div div(hidden) sib-route(name='member', id-prefix=`${sdn}/members/`) sib-route(name='project', id-prefix=`${sdn}/projects/`) + sib-route(name='channel', id-prefix=`${sdn}/channels/`) div#menu-items sib-route(name='members') div - i.fa.fa-users - | Membres + i.fa.fa-users + | Membres sib-route(name='job-offers') div i.fa.fa-handshake-o @@ -33,14 +34,6 @@ div data-fields='name', next='channel' ) - - //- sib-route(name='projects') - i.fa.fa-tasks(aria-hidden='true') - | Projets //- sib-route(name='client-create') i.fa.fa-plus(aria-hidden='true') - | New client - //- sib-route(name='channels') - i.fa.fa-comments(aria-hidden='true') - | Network - //- sib-route(name='channel', id-prefix=`${sdn}/channels/`) \ No newline at end of file + | New client \ No newline at end of file diff --git a/src/scss/_chat.scss b/src/scss/_chat.scss index d220ffe..c7e853d 100644 --- a/src/scss/_chat.scss +++ b/src/scss/_chat.scss @@ -1,17 +1,17 @@ sib-chat { - // position: absolute; - border: 1px dotted red; - top: $menu-height; - bottom: 0px; - left: 0px; - right: 0px; + //position: absolute; + border: 5px dotted red; + top: 0; + bottom: 0; + left: 0; + right: 0; margin: auto; display: none; + min-height: 300px; } .chat-view { sib-chat { display: block; - top: $menu-height + 30px; } } diff --git a/src/scss/_menu.scss b/src/scss/_menu.scss index 0aa66b9..f5d3ff4 100644 --- a/src/scss/_menu.scss +++ b/src/scss/_menu.scss @@ -38,7 +38,7 @@ background-image: linear-gradient( to right, rgba(0, 0, 0, $shadow-opacity), - #0000 + transparent ); } }